You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "joaohf (via GitHub)" <gi...@apache.org> on 2023/05/08 00:23:36 UTC

[GitHub] [couchdb] joaohf opened a new issue, #4580: Support deterministic builds

joaohf opened a new issue, #4580:
URL: https://github.com/apache/couchdb/issues/4580

   [NOTE]: # ( ^^ Provide a general summary of the request in the title above. ^^ )
   
   ## Summary
   
   Prepare couchdb to support deterministic builds.
   
   ## Desired Behaviour
   
   For same use cases [deterministic build](https://reproducible-builds.org/docs/deterministic-build-systems/) is necessary. Erlang 25 supports that via [compile flags](https://github.com/erlang/otp/pull/5965) like:
   
   ```
   export ERL_COMPILER_OPTIONS="deterministic"
   ```
   
   In fact, when setting ERL_COMPILER_OPTIONS to `deterministic` the couchdb build as expected. However a few things should be fixed:
   
   ```
   WARNING: couchdb-3.3.2-r0 do_package_qa: QA Issue: File /opt/couchdb/lib/couch-3.3.2/priv/couch_js/86/util.d in package couchdb contains reference to TMPDIR
   File /opt/couchdb/lib/couch-3.3.2/priv/couch_js/86/main.d in package couchdb contains reference to TMPDIR
   File /opt/couchdb/lib/couch-3.3.2/priv/couch_ejson_compare/couch_ejson_compare.d in package couchdb contains reference to TMPDIR
   File /opt/couchdb/releases/RELEASES in package couchdb contains reference to TMPDIR [buildpaths]
   ```
   
   I'm building couchdb using Yocto Project and there is a quality assurance step which verifies if all installed files do not have references to the build host paths. It looks like the file: _/opt/couchdb/releases/RELEASES_ has some build paths inside the file.
   
   The Makefile says to install the output from rel/couchdb into the destination folder:
   
   ```
   # target: install- install CouchDB :)
   install: release
           @echo
           @echo "Notice: There is no 'make install' command for CouchDB 2.x+."
           @echo
           @echo "    To install CouchDB into your system, copy the rel/couchdb"
           @echo "    to your desired installation location. For example:"
           @echo "    cp -r rel/couchdb /usr/local/lib"
   ```
   
   But installing everything from rel/couchdb also brings some compilation files (.d, .o), I think these files is not necessary to be installed:
   
   ```
   File /opt/couchdb/lib/couch-3.3.2/priv/couch_js/86/main.d in package couchdb contains reference to TMPDIR
   File /opt/couchdb/lib/couch-3.3.2/priv/couch_ejson_compare/couch_ejson_compare.d in package couchdb contains reference to TMPDIR
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] nickva commented on issue #4580: Support deterministic builds

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on issue #4580:
URL: https://github.com/apache/couchdb/issues/4580#issuecomment-1537653384

   Thanks for reaching out @joaohf and for giving a it a try to build CouchDB with a deterministic option. We could probably even make that a configure option or even the default.
   
   Good find about .d .o files we do not need to installed those should not be included in the release. It's an omission on our part.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org