Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running "quilt" #1

Open
tony-travis opened this issue Oct 23, 2024 · 7 comments
Open

Error running "quilt" #1

tony-travis opened this issue Oct 23, 2024 · 7 comments

Comments

@tony-travis
Copy link

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 <[email protected]>
 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
Copy link
Contributor

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

@uristdwarf
Copy link
Contributor

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
Copy link
Author

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 <[email protected]>
Date:   Wed Oct 23 13:00:54 2024 +0100

    Patch for Debian-12 from Urmas Rist <[email protected]>

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
Copy link
Author

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants