[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1020883: marked as done (klibc: Autopkgtest failure with .note.GNU-stack stderr messages)



Your message dated Sun, 02 Oct 2022 15:06:54 +0000
with message-id <E1of0YQ-00FoGP-G8@fasolo.debian.org>
and subject line Bug#1020883: fixed in klibc 2.0.11-1
has caused the Debian Bug report #1020883,
regarding klibc: Autopkgtest failure with .note.GNU-stack stderr messages
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1020883: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1020883
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: klibc
Version: 2.0.10-4
Severity: normal
X-Debbugs-Cc: daniel.bungert@canonical.com

Dear Maintainer,

When running autopkgtest for klibc on Sid or Ubuntu Kinetic, the test will fail
due to messages on stderr.  They look like:

https://ci.debian.net/data/autopkgtest/unstable/amd64/k/klibc/26310446/log.gz
/usr/bin/x86_64-linux-gnu-ld: warning: mmap.o: missing .note.GNU-stack section
implies executable stack
/usr/bin/x86_64-linux-gnu-ld: NOTE: This behaviour is deprecated and will be
removed in a future version of the linker

Additionally, and not really related, 32 bit arches have a different problem.
I can reproduce this on Sid in private testing.
https://launchpadlibrarian.net/625440146/buildlog_ubuntu-kinetic-i386.klibc_2.0.10-4_BUILDING.txt.gz
/<<PKGBUILDDIR>>/usr/klibc/__static_init.c
In file included from /<<PKGBUILDDIR>>/usr/klibc/../include/stdlib.h:13,
                 from /<<PKGBUILDDIR>>/usr/klibc/libc_init.c:23,
                 from /<<PKGBUILDDIR>>/usr/klibc/__static_init.c:2:
/<<PKGBUILDDIR>>/usr/klibc/../include/fcntl.h:36:9: error: expected
specifier-qualifier-list before ‘__ARCH_FLOCK64_PAD’
   36 |         __ARCH_FLOCK64_PAD

Applying these commits addresses these items.
* 2acbe15d7a8093cfa295aadc56707892e87a7eaf
* bb2fde5ddbc18a2e7795ca4d24759230c2aae9d0

Attached is what I'm going to upload to Ubuntu.

Hope that helps.

-Dan
diff -Nru klibc-2.0.10/debian/changelog klibc-2.0.10/debian/changelog
--- klibc-2.0.10/debian/changelog	2022-01-30 16:28:16.000000000 -0700
+++ klibc-2.0.10/debian/changelog	2022-09-27 14:58:43.000000000 -0600
@@ -1,3 +1,12 @@
+klibc (2.0.10-4ubuntu1) kinetic; urgency=medium
+
+  * Cherry-pick 2acbe15 to fix a typo for KLIBCSTACKFLAGS, needed so that the
+    correct LDFLAGS are in use.
+  * Cherry-pick bb2fde5 to fix an issue with usage of __ARCH_FLOCK64_PAD on 32
+    bit systems.
+
+ -- Dan Bungert <daniel.bungert@canonical.com>  Tue, 27 Sep 2022 14:58:43 -0600
+
 klibc (2.0.10-4) unstable; urgency=medium
 
   * d/control, d/rules: Remove ccache from $PATH instead of Build-Conflicting
diff -Nru klibc-2.0.10/debian/patches/fix-32bit-vs-FLOCK64.patch klibc-2.0.10/debian/patches/fix-32bit-vs-FLOCK64.patch
--- klibc-2.0.10/debian/patches/fix-32bit-vs-FLOCK64.patch	1969-12-31 17:00:00.000000000 -0700
+++ klibc-2.0.10/debian/patches/fix-32bit-vs-FLOCK64.patch	2022-09-27 14:58:43.000000000 -0600
@@ -0,0 +1,26 @@
+Origin: https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=bb2fde5ddbc18a2e7795ca4d24759230c2aae9d0
+Last-Update: 2022-09-27
+Bug-Debian:
+Forwarded: not-needed
+Subject: [klibc] fcntl: Fix build failure for some architectures with Linux 5.19
+    
+    Starting from Linux 5.19, the kernel UAPI headers now only define
+    __ARCH_FLOCK64_PAD if the architecture actually needs padding in
+    struct flock64.  Wrap its use with #ifdef,
+    
+    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+
+diff --git a/usr/include/fcntl.h b/usr/include/fcntl.h
+index ed703a62..cb2e4e53 100644
+--- a/usr/include/fcntl.h
++++ b/usr/include/fcntl.h
+@@ -33,7 +33,9 @@ struct flock {
+ 	__kernel_loff_t l_start;
+ 	__kernel_loff_t l_len;
+ 	__kernel_pid_t  l_pid;
++#ifdef __ARCH_FLOCK64_PAD
+         __ARCH_FLOCK64_PAD
++#endif
+ };
+ 
+ #ifdef F_GETLK64
diff -Nru klibc-2.0.10/debian/patches/fix-KLIBCSTACKFLAGS.patch klibc-2.0.10/debian/patches/fix-KLIBCSTACKFLAGS.patch
--- klibc-2.0.10/debian/patches/fix-KLIBCSTACKFLAGS.patch	1969-12-31 17:00:00.000000000 -0700
+++ klibc-2.0.10/debian/patches/fix-KLIBCSTACKFLAGS.patch	2022-09-27 14:58:43.000000000 -0600
@@ -0,0 +1,44 @@
+Origin: https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=2acbe15d7a8093cfa295aadc56707892e87a7eaf
+Last-Update: 2022-09-27
+Bug-Debian:
+Forwarded: not-needed
+Subject: [klibc] Kbuild: Properly disable executable stacks in static builds
+    
+    I typo'd the variable name KLIBCSTACKFLAGS in the value of
+    KLIBCCFLAGS, leaving the stack executable in statically linked
+    executables.  Fix that.
+    
+    Executables using a shared library did not have this problem, unless
+    they included assembly language sources.  C compilers generate the
+    no-executable-stack header by default, and the interpreter definition
+    that's statically linked into such executables was built with a
+    correctly spelt KLIBCSTACKFLAGS as an extra option.
+    
+    Fixes: c562319cdba0 ("[klibc] Kbuild: Add a per-architecture option to ...")
+    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+
+diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
+index e88bc003..64da31ac 100644
+--- a/scripts/Kbuild.klibc
++++ b/scripts/Kbuild.klibc
+@@ -133,7 +133,7 @@ KLIBCDEFS        += -D__KLIBC__=$(KLIBCMAJOR)          \
+ 		    -D_BITSIZE=$(KLIBCBITSIZE)
+ KLIBCCPPFLAGS    += $(KLIBCDEFS)
+ KLIBCCFLAGS      += $(KLIBCCPPFLAGS) $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS)  \
+-                    $(KLIBCOPTFLAGS) $(KLIBCSTACKFLGS) $(KLIBCWARNFLAGS)
++                    $(KLIBCOPTFLAGS) $(KLIBCSTACKFLAGS) $(KLIBCWARNFLAGS)
+ KLIBCAFLAGS      += -D__ASSEMBLY__ $(KLIBCCFLAGS)
+ KLIBCSTRIPFLAGS  += --strip-all -R .comment -R .note
+ 
+diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
+index 9ea55a23..5933f89a 100644
+--- a/usr/klibc/Kbuild
++++ b/usr/klibc/Kbuild
+@@ -186,7 +186,6 @@ quiet_cmd_interp = BUILD   $@
+       cmd_interp = $(KLIBCCC) $(klibccflags) -D__ASSEMBLY__     \
+                              -DLIBDIR=\"$(SHLIBDIR)\"         \
+ 			     -DSOHASH=\"$(SOLIBHASH)\" \
+-                             $(KLIBCSTACKFLAGS) \
+ 			     -c -o $@ $<
+ 
+ $(INTERP_O): $(obj)/interp.S $(SOLIB).hash
diff -Nru klibc-2.0.10/debian/patches/series klibc-2.0.10/debian/patches/series
--- klibc-2.0.10/debian/patches/series	2022-01-30 16:27:06.000000000 -0700
+++ klibc-2.0.10/debian/patches/series	2022-09-27 14:58:43.000000000 -0600
@@ -1,3 +1,5 @@
 klibc-kbuild-include-provided-kcflags-in-klibccflags.patch
 0001-klibc-ia64-Fix-out-of-tree-build.patch
 0001-klibc-Fix-header-installation-from-out-of-tree-build.patch
+fix-32bit-vs-FLOCK64.patch
+fix-KLIBCSTACKFLAGS.patch

--- End Message ---
--- Begin Message ---
Source: klibc
Source-Version: 2.0.11-1
Done: Ben Hutchings <benh@debian.org>

We believe that the bug you reported is fixed in the latest version of
klibc, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1020883@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ben Hutchings <benh@debian.org> (supplier of updated klibc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 02 Oct 2022 03:09:49 +0200
Source: klibc
Architecture: source
Version: 2.0.11-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Changed-By: Ben Hutchings <benh@debian.org>
Closes: 1020883
Changes:
 klibc (2.0.11-1) unstable; urgency=medium
 .
   * New upstream version:
     - Kbuild: Properly disable executable stacks in static builds
       (Closes: #1020883)
     - fcntl: Fix build failure for some architectures with Linux 5.19
       (fixes FTBFS on several architectures)
 .
   [ Debian Janitor ]
   * Remove constraints unnecessary since buster:
     + klibc-utils: Drop versioned constraint on initramfs-tools in Breaks.
 .
   [ Ben Hutchings ]
   * lintian: Update override in libklibc for lintian 2.115
Checksums-Sha1:
 2c067b277657799cc2ce952534d5576cdf5eb66a 2149 klibc_2.0.11-1.dsc
 e8de8c0903d95aeb58300f06d5ef82dc136b2700 471588 klibc_2.0.11.orig.tar.xz
 3ce9e3fdc6792571a2d6f813422c81f8f4b6cfd0 19996 klibc_2.0.11-1.debian.tar.xz
 a2bf6e7973358d67845f2cd1ba56481826fab7ca 6872 klibc_2.0.11-1_amd64.buildinfo
Checksums-Sha256:
 99ff448c9289c9123639dc2aed348b1a384620eab6a8272d9f92e68c369b3dfe 2149 klibc_2.0.11-1.dsc
 5eb30e5e1ec73dc4e384c60bb943af89c53174c82f87712fdd34dd32864d5f60 471588 klibc_2.0.11.orig.tar.xz
 542502caa101f31f2ae12770425a3ff8de88f492b453dce4f47d26c866af2149 19996 klibc_2.0.11-1.debian.tar.xz
 d18df643a70da89fafd693c767238fba67eca53639cb7bdeb8310c6f072898c5 6872 klibc_2.0.11-1_amd64.buildinfo
Files:
 4a3321067b4e9d9f9509f88cb9bc7cc9 2149 libs optional klibc_2.0.11-1.dsc
 24355b641bbecba456f016cc985912e1 471588 libs optional klibc_2.0.11.orig.tar.xz
 fba85f602306da1860d977cd9ca6f105 19996 libs optional klibc_2.0.11-1.debian.tar.xz
 458736947c37caf89004e46dbdacc9bb 6872 libs optional klibc_2.0.11-1_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAmM5pD8ACgkQ57/I7JWG
EQmjqg//XfQ3IEbK0eSfRjQEvcW41tIytt1gpozCBzvF42SO25nVBmRqaR60HmrL
D9ypl8299JFSdWhcrw4NRRx7+4J/8QyeefMAofTS4YXPsnfhJA2BjGEl82wwph/Z
4h4PAt6AcndlR8aMZ63dzvJsmEx16dylsjPIkBlr/wEl91vwWqZPw6xL8uLUXciF
c+TuAR/T5bdgu/36VJ5qMFPiYgAvSBRATDLv3n6b2ATWaPtz6jLUG9H+i0rZRj46
5kWHvg87A31lO25k+tkz2P4AX6Dmf232m2dDwMHo3hzUZi9uxmMCvPm6JymccVhR
9/+R+IDSDOYL69J9KWabGjtlJXtNI+jkhe+K6FuGEDjRhCl0QlKvw9x/e/XiEAPD
FlsU5EBPdIcDZ7iP1EyOBT/hm4sMH6LpWewYJrhItLsJXoLE9aay71RDAB76Rqbz
AzxwJnzZQeoGBJtKTY9+x6QOy0voNff+swVa/TgqJFcixCSqAmqggSqUJ9JN0PS0
7H40K1CJPNK1CD60Zr0ci2jyA6zTPwZh9zOx1JC/id7NyI2G14/LXyiJDrtrjaiG
45SKqrk8nq4k3vKIoBXKhiyb2P89vxaQjFWEMsA208QEhOSpFUKoudgBO/nQvDPf
VqCGLIgIudozkTB2KNpHyB6tNu22gFSsytkUuQVMBRWJANcrJ/s=
=qRBS
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: