BitgesellOfficial / bitgesell

Bitgesell (BGL) is a digital currency with built-in scarcity
https://www.bitgesell.ca
MIT License
23 stars 37 forks source link

Create Ubuntu/Debian package script so that deb won't require libdb #9

Closed van-orton closed 3 years ago

van-orton commented 4 years ago

Task description

Currently there is a requirement of using libDb (Berkeley DB) package of specific version, which is overlapped in many of modern Linux distributions (It is required for wallet-related functionality, but making several package versions is not convenient). The goal is to get rid of this package dependency (not library itself), which will ease installation on them for most cases (binaries would be immediately runnable).

The scripts for building Ubuntu/Debian package can be created and placed in the 'tools' folder to be created in the repository. There are various documents/information about creating a package, like: https://debian-handbook.info/browse/stable/debian-packaging.html and for bundling shared libraries in the package as well: https://www.debian.org/doc/manuals/maint-guide/advanced.en.html

Acceptance criteria:

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.9936 ETH (349.99 USD @ $352.24/ETH) attached to it.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 266 years, 1 month from now. Please review their action plans below:

1) rezahsnz has applied to start work _(Funders only: approve worker | reject worker)_.

i will have the libdb and its dev libraries contained in the .deb package. 2) vporton has been approved to start work.

I created multiple Debian/Ubuntu packages, even rather advanced ones. 3) irhonin has applied to start work _(Funders only: approve worker | reject worker)_.

Ready to start working on that, never done before but I learn quickly. 4) agbilotia1998 has applied to start work _(Funders only: approve worker | reject worker)_.

  1. Add libDb of specific version as a dependency to Debian package.
  2. Create makefile.
  3. Test the package on Ubuntu Machine.

Learn more on the Gitcoin Issue Details page.

gitcoinbot commented 4 years ago

@vporton Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

vporton commented 4 years ago

I've finished the task interrupting my work on this issue. I will continue working soon.

vporton commented 4 years ago

I need your fullname to write down it as the package maintainer name (I don't want to be a maintainer after fulfilling the bounty, unless you pay me additional money, so the maintainer is you).

vporton commented 4 years ago

Please confirm or reject explicitly if the built binary Debian package should contain GUI features.

vporton commented 4 years ago

Successfully compiled Debian packages on my Ubuntu 20.04.1. Commands do work (at least with --help) option.

It remains:

  1. test on Docker (I will add the full test to the debian/ folder.)
  2. change my name to your name (see above)
  3. decide whether we compile the GUI things (your decision!)
  4. decide if we keep debian/ in the package root (I prefer this variant) or move it to the tools, then add there a script that copies debian/ to package root and then builds it (silly).

Please answer the appeared questions.

vporton commented 4 years ago

I will also distribute libboost together with BGL, as it has the same troubles as libdb.

vporton commented 4 years ago

I will also distribute libboost together with BGL, as it has the same troubles as libdb.

Please increase funding because I need to do this additional work to produce a working .deb package.

vporton commented 4 years ago

Ugh, it appears impossible to make a package that works in both Ubuntu 20.04.1 and Ubuntu 18.04 :-(

When running the binary package built on 20.04.1 in Ubuntu 18.04:

BGLd: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by BGLd)

I set distributing three sources libdb4.8, libboost, and libevent (see https://github.com/vporton/bitgesell), but even after this it does not work. Static libc causes crash of running programs.

Looks like, there is no solution. It may be best to build a separate .deb for each Ubuntu/Debian version instead :-(

vporton commented 4 years ago

Ugh, it appears impossible to make a package that works in both Ubuntu 20.04.1 and Ubuntu 18.04 :-(

The solutions are either:

  1. Use an old Docker image to compile (not just to run).

  2. Distribute also libc and libstdc++ together with our package.

Which of these two solutions do you choose?

Note that I already changed your package to contain libboost (because it has a mess of different version on different versions of Ubuntu), db-4.8, libevent (It seems impossible to link to an old system package, even if it is installed, because there is only a single version of libevent-dev on Ubuntu 20.04.1.)

Please choose your solution (and increase funding, as the task appeared much more difficult than anticipated).

vporton commented 4 years ago

OK, I decided I will do compilation inside Docker. (There is no other choice.) Give me yet some time.

wu-emma commented 4 years ago

Victor thanks for your efforts! please ping me in the comment when I can check it, will also assess the effort and hours spent of course

vporton commented 4 years ago

Victor thanks for your efforts! please ping me in the comment when I can check it, will also assess the effort and hours spent of course

I didn't measure the hours exactly, but I think I already spent about 20-25 hours.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 0.9936 ETH (346.98 USD @ $350.48/ETH) has been submitted by:


wu-emma commented 3 years ago

Thanks for the contribution guys! closing the issue.