nickva commented on issue #4706:
URL: https://github.com/apache/couchdb/issues/4706#issuecomment-1695955504

   @jjrodrig one way to check dist behavior is to make a draft pr with a branch 
which starts with `jenkins-...` then we'd run the full CI which makes packages 
as the last step.
   
   It can be done locally as well:
   
   After `./configure && make` if you run `make dist` it should create a 
.tar.gz tarball with all the sources. This tarball will then be used as a 
source from which we build the .deb package.
   
   To build the deb package could clone our bullseye CI image:
   
   ```
   docker run -it apache/couchdbci-debian:bullseye-erlang-24.3.4.10
   ``` 
   
   Copy the dist tarball to it:
   ```
   docker cp ./apache-couchdb-3.3.2-d5701f4.tar.gz $docker-container-name:/tmp
   ```
   
   In the container then in tmp unpack the tgz into /tmp/couchdb directory:
   
   ```
   mkdir -p couchdb
   tar -xf ./apache-couchdb-3.3.2-d5701f4.tar.gz -C ./couchdb
   ```
   
   Then alongside it also in `/tmp` clone couchdb-pkg repo 
https://github.com/apache/couchdb-pkg
   
   So tmp/ would have
   ```
   /tmp/
     couchdb
     couchdb-pkg
     ...
   ```
   
   Then from `couchdb-pkg` run `make`:
   ```
      cd couchdb-pkg
      make
   ```
   
   It should build deb then:
   ```
   jenkins@a52ac07fc336:/tmp/couchdb-pkg$ make
   make `bin/detect-target.sh`
   make[1]: Entering directory '/tmp/couchdb-pkg'
   cp debian/control.in debian/control
   sed -i 's/%SPIDERMONKEY%/libmozjs-78-0/g' debian/control
   sed -i 's/%SPIDERMONKEY_DEV%/libmozjs-78-dev/g' debian/control
   echo 'SM_VER = 78' > debian/sm_ver.mk
   rm -rf /tmp/couchdb/apache-couchdb-3.3.2-d5701f4/debian
   cp -R debian /tmp/couchdb/apache-couchdb-3.3.2-d5701f4
   cd /tmp/couchdb/apache-couchdb-3.3.2-d5701f4 && dch -v 
3.3.2-d5701f4~bullseye "Automatically generated package from upstream."
   cd /tmp/couchdb/apache-couchdb-3.3.2-d5701f4 && dpkg-buildpackage -b -us -uc
   dpkg-buildpackage: info: source package couchdb
   dpkg-buildpackage: info: source version 3.3.2-d5701f4~bullseye
   dpkg-buildpackage: info: source distribution UNRELEASED
   dpkg-buildpackage: info: source changed by "CouchDB Developers" 
<"[email protected]">
   dpkg-buildpackage: info: host architecture amd64
    dpkg-source --before-build .
    ...
   ```
   
   In the end we should end up in with a .deb package in the `pkgs` directory:
   
   ```
   $ ls pkgs/couch/debian-bullseye/*.deb
    pkgs/couch/debian-bullseye/couchdb-dbgsym_3.3.2-d5701f4~bullseye_amd64.deb 
    pkgs/couch/debian-bullseye/couchdb_3.3.2-d5701f4~bullseye_amd64.deb
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to