mergerfs icon indicating copy to clipboard operation
mergerfs copied to clipboard

Build from source files fails on Ubuntu due to missing ChangeLog

Open arnonm opened this issue 1 year ago • 8 comments

Describe the bug

Build from source files fails on Ubuntu due to missing ChangeLog

Steps to reproduce: On Ubuntu 22.10 new system cd /tmp wget https://github.com/trapexit/mergerfs/archive/refs/tags/2.35.0.tar.gz tar xvf mergerfs-2.35.0.tar.gz cd mergerfs-2.35.0 ./tools/install-build-pkgs make deb make distclean make[1]: Entering directory '/opt/src/mergerfs-2.35.0' rm -rf rpmbuild rm -rf build find . -name "*~" -delete make -C libfuse clean make[2]: Entering directory '/opt/src/mergerfs-2.35.0/libfuse' rm -rf build make[2]: Leaving directory '/opt/src/mergerfs-2.35.0/libfuse' make[1]: Leaving directory '/opt/src/mergerfs-2.35.0' make debian-changelog make[1]: Entering directory '/opt/src/mergerfs-2.35.0' cp ChangeLog debian/changelog cp: cannot stat 'ChangeLog': No such file or directory make[1]: *** [Makefile:222: debian-changelog] Error 1 make[1]: Leaving directory '/opt/src/mergerfs-2.35.0' make: *** [Makefile:233: deb] Error 2

Expected - build to work Issue: No ChangeLog is included in src file and it is not a git directory

arnonm avatar Mar 31 '23 11:03 arnonm

Please use the expressly packaged source and not the github generated one.

https://github.com/trapexit/mergerfs/releases/download/2.35.0/mergerfs-2.35.0.tar.gz

trapexit avatar Mar 31 '23 17:03 trapexit

Downloaded the tar and retried. Now generating a debian-buster package, although we are on Ubuntu 22.10 root@hda:/usr/local/src/mergerfs/mergerfs-2.35.0# make deb make distclean make[1]: Entering directory '/usr/local/src/mergerfs/mergerfs-2.35.0' rm -rf rpmbuild rm -rf build find . -name "*~" -delete make -C libfuse clean make[2]: Entering directory '/usr/local/src/mergerfs/mergerfs-2.35.0/libfuse' rm -rf build make[2]: Leaving directory '/usr/local/src/mergerfs/mergerfs-2.35.0/libfuse' make[1]: Leaving directory '/usr/local/src/mergerfs/mergerfs-2.35.0' make debian-changelog make[1]: Entering directory '/usr/local/src/mergerfs/mergerfs-2.35.0' cp ChangeLog debian/changelog make[1]: Leaving directory '/usr/local/src/mergerfs/mergerfs-2.35.0' dpkg-source -b . dpkg-source: warning: no source format specified in debian/source/format, see dpkg-source(1) dpkg-source: info: using source format '1.0' dpkg-source: warning: native package version may not have a revision dpkg-source: warning: source directory 'mergerfs-2.35.0' is not - 'mergerfs-2.35.0~debian' dpkg-source: info: building mergerfs in mergerfs_2.35.0~debian-buster.tar.gz dpkg-source: info: building mergerfs in mergerfs_2.35.0~debian-buster.dsc dpkg-buildpackage -nc -uc -us dpkg-buildpackage: info: source package mergerfs dpkg-buildpackage: info: source version 2.35.0~debian-buster dpkg-buildpackage: info: source distribution buster dpkg-buildpackage: info: source changed by trapexit [email protected] dpkg-buildpackage: info: host architecture amd64 dpkg-source --before-build . debian/rules build make[1]: Entering directory '/usr/local/src/mergerfs/mergerfs-2.35.0' dh build --parallel dh: warning: Compatibility levels before 10 are deprecated (level 9 in use) make[1]: Leaving directory '/usr/local/src/mergerfs/mergerfs-2.35.0' debian/rules binary make[1]: Entering directory '/usr/local/src/mergerfs/mergerfs-2.35.0' dh binary --parallel dh: warning: Compatibility levels before 10 are deprecated (level 9 in use) make[1]: Leaving directory '/usr/local/src/mergerfs/mergerfs-2.35.0' dpkg-genbuildinfo --build=binary -O../mergerfs_2.35.0~debian-buster_amd64.buildinfo dpkg-genchanges --build=binary -O../mergerfs_2.35.0~debian-buster_amd64.changes dpkg-genchanges: info: binary-only upload (no source code included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included) root@hda:/usr/local/src/mergerfs/mergerfs-2.35.0#cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.10 DISTRIB_CODENAME=kinetic DISTRIB_DESCRIPTION="Ubuntu 22.10"

arnonm avatar Apr 02 '23 11:04 arnonm

It isnt. It's just the changelog was built on that os. Is there some proper way to generate a changelog that isn't just sed?

trapexit avatar Apr 02 '23 13:04 trapexit

Can you please explain to me what your trying to accomplish? Do you just want to build a package without git? You want a specific branded deb for download?

trapexit avatar Apr 02 '23 13:04 trapexit

I am trying to build it from source on a Ubuntu 22.10 machine with Ansible. Ignore the original heading about the ChangeLog. I followed your advice and downloaded the released tar Current steps: wget https://github.com/trapexit/mergerfs/releases/download/2.35.0/mergerfs-2.35.0.tar.gz tar tvf mergerfs-2.35.0.tar.gz make deb Expected result: File in mergerfs named mergerfs_2.35.0~ubuntu-kinetic_amd64.deb Actual result File in mergerfs named mergerfs_2.35.0~debian-buster_amd64.deb

Just to verify that the system is the correct one, I ran: cat /etc/lsb-release and result is: DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.10 DISTRIB_CODENAME=kinetic DISTRIB_DESCRIPTION="Ubuntu 22.10"

So the CODENAME and DISTRIB_ID are correct, the make file is not picking it up.

arnonm-intel avatar Apr 02 '23 19:04 arnonm-intel

It's not the makefile. Deb packages, afaik, need a fixed changelog file and the details about the OS is for some reason in the changelog. The only place that makes sense to pull a changelog is from git. Besides using sed to change those values I honestly don't know what I'm supposed to do. The documentation on this stuff is not great.

trapexit avatar Apr 02 '23 21:04 trapexit

So I see a few options:

  1. Change the changeling before building it for ubuntu. So if I changed debian/changelog first line to read: mergerfs (2.35.0~ubuntu-kenetic) kenetic; urgency=medium I got a mergerfs_2.35.0~ubuntu-kenetic_amd64.deb I guess you could sed the first line with lsb_release -c -s and lab_release -d -s

  2. The other option, according to the docs, is to use debchange which does this for you, but it requires to install devscripts which is heavy. I will submit a PR

On Apr 3, 2023 at 12:21:40 AM, trapexit @.***> wrote:

It's not the makefile. Deb packages, afaik, need a fixed changelog file and the details about the OS is for some reason in the changelog. The only place that makes sense to pull a changelog is from git. Besides using sed to change those values I honestly don't know what I'm supposed to do. The documentation on this stuff is not great.

— Reply to this email directly, view it on GitHub https://github.com/trapexit/mergerfs/issues/1162#issuecomment-1493443112, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5BWKILRWYDFYEOPJATWS3W7HUWJANCNFSM6AAAAAAWOQTVSU . You are receiving this because you authored the thread.Message ID: @.***>

arnonm avatar Apr 03 '23 17:04 arnonm

1 was what I was thinking. It's the simplest. But will need to work with the build process I have for creating the tarball. Need to put some token there to replace. I can do this. Don't worry about it.

trapexit avatar Apr 03 '23 17:04 trapexit