dpkg-buildpackage and obsolete library files
Posted: Mon Aug 26, 2024 2:06 pm
Having tried to use the binary installer on LinuxMint 22, I ended up manually copying libraries from an older distro into $HOME/GNUstep/Applications/Oolite/oolite-deps/lib (LinuxMint 21.3 was a suitable donor. Got it working, but came to the conclusion that the bundled libraries in the source are a bit of a mess. Some of them are obsolete and not used by Oolite, so the system versions of those libraries have to 'happen' to be the right version for it all to work. Ultimately, the distro vintage has to be 'just right' for the installer version to work without lots of tinkering.
IMO, it's clear that the libraries bundled with the Linux binary installer need an overhaul to get it to work on more recent distros. If binaries of libraries are to be bundled for compatibility, then should not all of them be bundled, and obsolete ones pruned from the installer? Bundling ALL relevant versions of libraries in the installer version will make it work on a wider range of distros, past, present, and probably future.
Given that hassle, and thinking of new users, I felt the urge to walk the path of building a deb package. If it works easily, then perhaps it might be worth churning out deb packages for a couple of current distros on the releases. A much more elegant solution (where applicable) than bundling a heap of libraries.
On the README.md at Oolite's github, the process of building a deb on Linux is described by one line:-
I grabbed the latest dev source tarball from the releases page, unpacked it, changed dir into the root of it, and straying from the one line clue, ran dpkg-checkbuilddeps to figure out the deps to install. It wanted to install 'python', not python3. I edited the debian/control file to change that, and did an "apt install" for the rest of the list.
Deps aboard. I then tried "dpkg-buildpackage -uc -us", (no point trying to sign it at this point).
debian/changelog.in exists, but needs processing. Here's the top of the file.
So a brutal attempt at progress, knowing it's just for me, and not for publlication, I copy changelog.in to chagelog an try again.
Right. Let's just try and skip the issue.
So, I guess it's not a one-line job
I very rarely build deb packages, so the details are not resident in my head. I could dig deeper to find the solutions, but hope someone can give me a leg-up. Between us, perhaps we could fix the docs and source to make building a deb package trivial.
I'd hope there's merit in this, not just for individual users wanting to better use system resources, but also for distros to be able to include Oolite. Wouldn't it be good to be able to simply "apt install oolite", and/or attach a ppa to have bleeding edge versions on "apt upgrade".
IMO, it's clear that the libraries bundled with the Linux binary installer need an overhaul to get it to work on more recent distros. If binaries of libraries are to be bundled for compatibility, then should not all of them be bundled, and obsolete ones pruned from the installer? Bundling ALL relevant versions of libraries in the installer version will make it work on a wider range of distros, past, present, and probably future.
Given that hassle, and thinking of new users, I felt the urge to walk the path of building a deb package. If it works easily, then perhaps it might be worth churning out deb packages for a couple of current distros on the releases. A much more elegant solution (where applicable) than bundling a heap of libraries.
On the README.md at Oolite's github, the process of building a deb on Linux is described by one line:-
Hmm. I know it won't be THAT easy.If you have the Debian package tools (installed by default with Debian and Ubuntu), use dpkg-buildpackage.
I grabbed the latest dev source tarball from the releases page, unpacked it, changed dir into the root of it, and straying from the one line clue, ran dpkg-checkbuilddeps to figure out the deps to install. It wanted to install 'python', not python3. I edited the debian/control file to change that, and did an "apt install" for the rest of the list.
Deps aboard. I then tried "dpkg-buildpackage -uc -us", (no point trying to sign it at this point).
Code: Select all
dpkg-buildpackage: error: cannot open file debian/changelog: No such file or directory
Code: Select all
oolite (@@VERSION@@-@@REVISION@@) stable; urgency=low
* Snapshot release of Oolite @@VERSION@@.
See /usr/share/doc/oolite/changelog.gz for upstream changes.
-- Darren Salt <[email protected]> @@TIMESTAMP@@
Code: Select all
$ dpkg-buildpackage -uc -us
dpkg-buildpackage: warning: debian/changelog(l1): version '@@VERSION@@-@@REVISION@@' is invalid: version number does not start with a digit
LINE: oolite (@@VERSION@@-@@REVISION@@) stable; urgency=low
dpkg-buildpackage: warning: debian/changelog(l6): badly formatted trailer line
LINE: -- Darren Salt <[email protected]> @@TIMESTAMP@@
dpkg-buildpackage: warning: debian/changelog(l8): found start of entry where expected more change data or trailer
LINE: oolite (1.73.3-1) stable; urgency=low
dpkg-buildpackage: warning: debian/changelog(l8): found end of file where expected more change data or trailer
dpkg-buildpackage: info: source package oolite
dpkg-buildpackage: info: source version unknown
dpkg-buildpackage: error: version number does not start with a digit
Code: Select all
$ echo "Flibble woz 'ere" > debian/changelog
$ dpkg-buildpackage -uc -us
dpkg-buildpackage: warning: debian/changelog(l1): badly formatted heading line
LINE: Flibble woz 'ere.
dpkg-buildpackage: warning: debian/changelog(l1): found end of file where expected first heading
dpkg-buildpackage: error: fatal error occurred while parsing debian/changelog
I very rarely build deb packages, so the details are not resident in my head. I could dig deeper to find the solutions, but hope someone can give me a leg-up. Between us, perhaps we could fix the docs and source to make building a deb package trivial.
I'd hope there's merit in this, not just for individual users wanting to better use system resources, but also for distros to be able to include Oolite. Wouldn't it be good to be able to simply "apt install oolite", and/or attach a ppa to have bleeding edge versions on "apt upgrade".