leil-io / debian-package

Source files for the SaunaFS deb package
https://saunafs.com
0 stars 0 forks source link

Error running "quilt" #1

Open tony-travis opened 1 week ago

tony-travis commented 1 week ago

Hi,

The SaunaFS packages fail to build under Debian 12 in a Proxmox VM:

root@debian-12:/usr/local/src/debian-package# lsb_release -d
No LSB modules are available.
Description:    Debian GNU/Linux 12 (bookworm)

root@debian-12:/usr/local/src/debian-package# bash package.sh |& tee package.log
[...]
+ debuild -us -uc
 dpkg-buildpackage -us -uc -ui
dpkg-buildpackage: info: source package saunafs
dpkg-buildpackage: info: source version 4.5.1
dpkg-buildpackage: info: source distribution stable
dpkg-buildpackage: info: source changed by SaunaFS Team <contact@saunafs.com>
 dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying remove-version-requirement.patch
 debian/rules clean
dh clean
   dh_clean
 dpkg-source -b .
dpkg-source: error: can't build with source format '3.0 (quilt)': non-native package version does not contain a revision
dpkg-buildpackage: error: dpkg-source -b . subprocess returned exit status 25
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui failed
uristdwarf commented 1 week ago

I just pushed a change that adds a revision, can you pull from dev and test it again?

uristdwarf commented 1 week ago

This rule seems to be relaxed on non-Debian systems, since it build fine on Ubuntu for example. Regardless, plan is to use revisions in the future.

tony-travis commented 1 week ago

Same "small_vector" warnings treated as errors before I manually applied your "debian12.patch" and commit to the sources cloned from the "saunafs" repo:

root@debian-12:/usr/local/src/saunafs# git show
commit fcaf623c820202fdcce52c82e853e4005e1fcf20 (HEAD -> main)
Author: root <tony.travis@minke-informatics.co.uk>
Date:   Wed Oct 23 13:00:54 2024 +0100

    Patch for Debian-12 from Urmas Rist <AR@leil.io>

diff --git a/src/common/small_vector.h b/src/common/small_vector.h
index ff64c0fb..8ed98b43 100644
--- a/src/common/small_vector.h
+++ b/src/common/small_vector.h
@@ -24,6 +24,7 @@
 #include <array>
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wstringop-overflow"
+#pragma GCC diagnostic ignored "-Wstringop-overread"
 #include <boost/container/small_vector.hpp>
 #pragma GCC diagnostic pop
 #include <cassert>

I think your patch should be included in the Debian patches made to the original upstream sources.

tony-travis commented 1 week ago

I've added a patch:

root@debian-12:/usr/local/src/debian-package/debian/patches# cat > small_vector.patch << EOF
Index: saunafs-4.5.1/src/common/small_vector.h
===================================================================
--- saunafs-4.5.1.orig/src/common/small_vector.h    2024-09-16 20:35:14.000000000 +0100
+++ saunafs-4.5.1/src/common/small_vector.h 2024-10-23 16:21:27.017088671 +0100
@@ -24,6 +24,7 @@
 #include <array>
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wstringop-overflow"
+#pragma GCC diagnostic ignored "-Wstringop-overread"
 #include <boost/container/small_vector.hpp>
 #pragma GCC diagnostic pop
 #include <cassert>
EOF
root@debian-12:/usr/local/src/debian-package/debian/patches# quilt import small_vector.patch
tony-travis commented 1 week ago

Built successfully with the patch included, but warnings about unused variable "ref" and warnings from "dh_missing" e.g.

root@debian-12:/usr/local/src/debian-package# bash package.sh |& tee package.log
[...]
make[4]: Entering directory '/tmp/package-saunafs/saunafs-4.5.1/build-pack'
[ 88%] Building C object src/nfs-ganesha/CMakeFiles/fsalsaunafs.dir/main.c.o
In file included from /tmp/package-saunafs/saunafs-4.5.1/external/nfs-ganesha-4.3/src/include/FSAL/fsal_commonlib.h:41,
                 from /tmp/package-saunafs/saunafs-4.5.1/src/nfs-ganesha/main.c:23:
/tmp/package-saunafs/saunafs-4.5.1/external/nfs-ganesha-4.3/src/include/fsal_api.h: In function ‘export_root_object_put’:
/tmp/package-saunafs/saunafs-4.5.1/external/nfs-ganesha-4.3/src/include/fsal_api.h:3095:17: warning: unused variable ‘ref’ [-Wunused
-variable]
 3095 |         int32_t ref = atomic_dec_int32_t (&obj_hdl->exp_refcnt);
      |                 ^~~
[...]
   dh_missing
dh_missing: warning: etc/pam.d/saunafs exists in debian/tmp but is not installed to anywhere (related file: "debian/tmp/usr/bin/saun
afs")

    While detecting missing files, dh_missing noted some files with a similar name to those
    that were missing.  This warning /might/ be resolved by replacing references to the
    missing files with the similarly named ones that dh_missing found - assuming the content
    is identical.
[...]

package.log.gz

uristdwarf commented 1 week ago

I would generally prefer to keep patches in debian/ to a minimum (most should go upstream eventually), and that it targets Ubuntu 24.04/22.04 above all else. However my idea is to have distro-specific directories (e.g debian12) and then using package.sh to add the patches. Of course, most of these patches won't be supported by us, but we would be willing accept PR's to improve/fix them

uristdwarf commented 1 week ago

E.g using package.sh -f debian/12, see package.sh -h