CouchDB
  1. CouchDB
  2. COUCHDB-1042

make libcurl a soft (optional) dependency

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.1
    • Fix Version/s: 1.2, 2.0.0
    • Component/s: Build System
    • Labels:
      None
    • Skill Level:
      New Contributors Level (Easy)

      Description

      CouchDB currently uses libcurl only in couchjs to expose HTTP client functions to the JavaScript environment. This functionality is used by the JavaScript unit tests. For idempotent views it is discouraged to perform I/O in a view function. Therefore, I propose that libcurl be made an optional dependency, automatically detected at build time, and a flag added to couchjs so it can be explicitly enabled in the unit tests (but disabled, by default, for the query server).

      1. 0001-make-cURL-an-optional-dependency.patch
        5 kB
        Randall Leeds
      2. curl_as_soft_dep.patch
        5 kB
        Paul Joseph Davis
      3. curl_as_soft_dep_v2.patch
        5 kB
        Randall Leeds
      4. 0001-no-lcurl-if-no-curl-support.patch
        2 kB
        Randall Leeds

        Issue Links

          Activity

          Hide
          Randall Leeds added a comment -

          Resolved again by 39d81d5..bf7c74e

          Show
          Randall Leeds added a comment - Resolved again by 39d81d5..bf7c74e
          Hide
          Randall Leeds added a comment -

          I think now that the js tests run with make check something is needed here. We should issue a warning that these tests won't be run when the dependency isn't satisfied, and then not run them.

          Show
          Randall Leeds added a comment - I think now that the js tests run with make check something is needed here. We should issue a warning that these tests won't be run when the dependency isn't satisfied, and then not run them.
          Hide
          Paul Joseph Davis added a comment -

          Randall's patch applied in 1086934

          Show
          Paul Joseph Davis added a comment - Randall's patch applied in 1086934
          Hide
          Randall Leeds added a comment -

          The patch I attached should take care of 961 as well.

          Show
          Randall Leeds added a comment - The patch I attached should take care of 961 as well.
          Hide
          Randall Leeds added a comment -

          The following patch fully resolves this issue.

          Show
          Randall Leeds added a comment - The following patch fully resolves this issue.
          Hide
          Randall Leeds added a comment -

          Reopening because another patch is needed to fully close.

          Show
          Randall Leeds added a comment - Reopening because another patch is needed to fully close.
          Hide
          Paul Joseph Davis added a comment -

          Shipped. Updated NEWS, CHANGES, and INSTALL while I was at it.

          Show
          Paul Joseph Davis added a comment - Shipped. Updated NEWS, CHANGES, and INSTALL while I was at it.
          Hide
          Randall Leeds added a comment -

          Two small changes.
          1) combined the sed regex. just cause. so there.
          2) removed whitespace from a line in main.c

          Ship it.

          Show
          Randall Leeds added a comment - Two small changes. 1) combined the sed regex. just cause. so there. 2) removed whitespace from a line in main.c Ship it.
          Hide
          Paul Joseph Davis added a comment -

          Whoops. Typo in the last version.

          Show
          Paul Joseph Davis added a comment - Whoops. Typo in the last version.
          Hide
          Paul Joseph Davis added a comment -

          Just a slightly modified patch that agrees on most bits.

          Only big changes are that http.c puts the "no curl support" version at the top so that people that just open the file will realize straight away why the whole file is enclosed in a #ifndef instead of being required to scroll all the way to the bottom.

          Second bit cleans up the command line parsing in couchjs (binary) by doing a couple extra steps in couchjs shell script. I'm not as enamored with this bit so if you think your way is better feel free to reject that part. Thought he http.c ifdef switch I would like to keep.

          Show
          Paul Joseph Davis added a comment - Just a slightly modified patch that agrees on most bits. Only big changes are that http.c puts the "no curl support" version at the top so that people that just open the file will realize straight away why the whole file is enclosed in a #ifndef instead of being required to scroll all the way to the bottom. Second bit cleans up the command line parsing in couchjs (binary) by doing a couple extra steps in couchjs shell script. I'm not as enamored with this bit so if you think your way is better feel free to reject that part. Thought he http.c ifdef switch I would like to keep.
          Hide
          Randall Leeds added a comment -

          Patch that solves the issue as described.
          Tested both with and without a compliant cURL installation.

          Show
          Randall Leeds added a comment - Patch that solves the issue as described. Tested both with and without a compliant cURL installation.

            People

            • Assignee:
              Randall Leeds
              Reporter:
              Randall Leeds
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development