Your message dated Wed, 10 Apr 2024 10:34:16 +0000
with message-id <[email protected]>
and subject line Bug#1030829: fixed in mmc-utils 0+git20240329.f757f413-1
has caused the Debian Bug report #1030829,
regarding mmc-utils: FTBFS on ppc64el with error: ‘cnt’ may be used
uninitialized
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 [email protected]
immediately.)
--
1030829: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030829
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: mmc-utils
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)
User: [email protected]
Usertags: origin-ubuntu lunar ubuntu-patch
Dear Maintainer,
In Ubuntu, mcc-utils FTBFS[1] on ppc64el with the following:
In file included from /usr/include/endian.h:35,
from /usr/include/powerpc64le-linux-gnu/sys/types.h:176,
from /usr/include/stdlib.h:395,
from mmc_cmds.c:21:
In function ‘__bswap_32’,
inlined from ‘do_rpmb_write_block’ at mmc_cmds.c:2462:27:
/usr/include/powerpc64le-linux-gnu/bits/byteswap.h:52:10: error: ‘cnt’ may be
used uninitialized [-Werror=maybe-uninitialized]
52 | return __builtin_bswap32 (__bsx);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
mmc_cmds.c: In function ‘do_rpmb_write_block’:
mmc_cmds.c:2439:22: note: ‘cnt’ was declared here
2439 | unsigned int cnt;
| ^~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:36: mmc_cmds.o] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j4 "INSTALL=install --strip-program=true" returned
exit code 2
make: *** [debian/rules:8: binary-arch] Error 25
dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit
status 2
--------------------------------------------------------------------------------
This was already fixed upstream[2]. We applied the patch in Ubuntu to fix
the build on ppc64el.
Thanks,
Nick
[1]
https://launchpadlibrarian.net/648312622/buildlog_ubuntu-lunar-ppc64el.mmc-utils_0+git20220624.d7b343fd-1_BUILDING.txt.gz
[2]
https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/commit/?id=5086e7c0de4d0094f8674368a88d931b27589d53
diff -Nru
mmc-utils-0+git20220624.d7b343fd/debian/patches/0003-fix-warning-on-uninitialized-cnt.patch
mmc-utils-0+git20220624.d7b343fd/debian/patches/0003-fix-warning-on-uninitialized-cnt.patch
---
mmc-utils-0+git20220624.d7b343fd/debian/patches/0003-fix-warning-on-uninitialized-cnt.patch
1969-12-31 19:00:00.000000000 -0500
+++
mmc-utils-0+git20220624.d7b343fd/debian/patches/0003-fix-warning-on-uninitialized-cnt.patch
2023-02-07 15:14:11.000000000 -0500
@@ -0,0 +1,54 @@
+Description: mmc-utils: fix warning on uninitialized 'cnt'
+Origin:
https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/commit/?id=5086e7c0de4d0094f8674368a88d931b27589d53
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/mmc-utils/+bug/2006505
+Last-Update: 2023-02-07
+---
+From 5086e7c0de4d0094f8674368a88d931b27589d53 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <[email protected]>
+Date: Sun, 18 Sep 2022 18:17:51 +0200
+Subject: mmc-utils: fix warning on uninitialized 'cnt'
+
+When building following warning shows up:
+```
+In function '__bswap_32',
+ inlined from 'do_rpmb_write_block' at mmc_cmds.c:2293:27:
+/home/autobuild/autobuild/instance-15/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/bits/byteswap.h:52:10:
error: 'cnt' may be used uninitialized [-Werror=maybe-uninitialized]
+ 52 | return __builtin_bswap32 (__bsx);
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~
+mmc_cmds.c: In function 'do_rpmb_write_block':
+mmc_cmds.c:2270:22: note: 'cnt' was declared here
+2270 | unsigned int cnt;
+ | ^~~
+cc1: all warnings being treated as errors
+```
+This is due to function rpmb_read_counter() that doesn't set its
+argument 'unsigned int *cnt' in all return points. So let's set
+*cnt to 0 in the return point that misses to initialize it.
+
+Signed-off-by: Giulio Benetti <[email protected]>
+Reviewed-by: Avri Altman <[email protected]>
+Link:
https://lore.kernel.org/r/[email protected]
+Signed-off-by: Ulf Hansson <[email protected]>
+---
+ mmc_cmds.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/mmc_cmds.c b/mmc_cmds.c
+index ef1d8c6..29abd1d 100644
+--- a/mmc_cmds.c
++++ b/mmc_cmds.c
+@@ -2238,8 +2238,10 @@ int rpmb_read_counter(int dev_fd, unsigned int *cnt)
+ }
+
+ /* Check RPMB response */
+- if (frame_out.result != 0)
++ if (frame_out.result != 0) {
++ *cnt = 0;
+ return be16toh(frame_out.result);
++ }
+
+ *cnt = be32toh(frame_out.write_counter);
+
+--
+cgit
+
diff -Nru mmc-utils-0+git20220624.d7b343fd/debian/patches/series
mmc-utils-0+git20220624.d7b343fd/debian/patches/series
--- mmc-utils-0+git20220624.d7b343fd/debian/patches/series 2022-08-04
02:07:11.000000000 -0400
+++ mmc-utils-0+git20220624.d7b343fd/debian/patches/series 2023-02-07
15:09:50.000000000 -0500
@@ -1,2 +1,3 @@
0001-Fix-typo.patch
0002-man-mmc.1-Fix-warning-macro-not-defined.patch
+0003-fix-warning-on-uninitialized-cnt.patch
--- End Message ---
--- Begin Message ---
Source: mmc-utils
Source-Version: 0+git20240329.f757f413-1
Done: Nobuhiro Iwamatsu <[email protected]>
We believe that the bug you reported is fixed in the latest version of
mmc-utils, 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 [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Nobuhiro Iwamatsu <[email protected]> (supplier of updated mmc-utils 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 [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Wed, 10 Apr 2024 18:56:10 +0900
Source: mmc-utils
Architecture: source
Version: 0+git20240329.f757f413-1
Distribution: unstable
Urgency: medium
Maintainer: Nobuhiro Iwamatsu <[email protected]>
Changed-By: Nobuhiro Iwamatsu <[email protected]>
Closes: 1030829 1048836
Changes:
mmc-utils (0+git20240329.f757f413-1) unstable; urgency=medium
.
* Snapshot, taken from the master (20240329) (Closes: #1030829)
* d/control
- Bumped Standards-Version to 4.7.0
* d/manpages
- Remove file
* d/patches
- Add 0003-create-a-directory-to-install-man.patch
* d/patches
- Remove 0002-man-mmc.1-Fix-warning-macro-not-defined.patch
* d/copyright
- Update copyright year
* d/rules
- Define files to be deleted with dh_auto_clean target in d/clean
* d/clean
- Add remove files (Closes: #1048836)
Checksums-Sha1:
b144571631de30a81cc01ebe30bdd0887449c4cb 1987
mmc-utils_0+git20240329.f757f413-1.dsc
e9fc64af8838a0286f72471ec875cd23c9c786e5 43584
mmc-utils_0+git20240329.f757f413.orig.tar.xz
170867bbb5d404ebf5c0fe34afe6b45d14756eba 4632
mmc-utils_0+git20240329.f757f413-1.debian.tar.xz
3e940418310451d284033b2b22170194c3c88b2a 6316
mmc-utils_0+git20240329.f757f413-1_amd64.buildinfo
Checksums-Sha256:
6c02525c9b1d96a2d553a5228d3875fe6a77c24aceb2a40440e3ff623f53a6e3 1987
mmc-utils_0+git20240329.f757f413-1.dsc
26249256eaf5dda6a709133dca6db8c3cb70d4acd9c68b7f43d0fcab9f9faf7e 43584
mmc-utils_0+git20240329.f757f413.orig.tar.xz
49160fecbd331d1d84408e117f8ebd3bc493acbce1376f52dbc2938335c3fbc6 4632
mmc-utils_0+git20240329.f757f413-1.debian.tar.xz
4daa030bd89a6e60cdbef2fe009f6b68434d94a3f5d0a07d81bab48cdf3c4774 6316
mmc-utils_0+git20240329.f757f413-1_amd64.buildinfo
Files:
a5949c929b685d9f5fd58c6b98cfc069 1987 utils optional
mmc-utils_0+git20240329.f757f413-1.dsc
8af11ecd7b134e2c4c2457358935d4da 43584 utils optional
mmc-utils_0+git20240329.f757f413.orig.tar.xz
d7ded89d4f7c4f09b8167d4e63a77d77 4632 utils optional
mmc-utils_0+git20240329.f757f413-1.debian.tar.xz
4431ffece66a4880b0a1d9b8d053f2a5 6316 utils optional
mmc-utils_0+git20240329.f757f413-1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEXmKe5SMhlzV7hM9DMiR/u0CtH6YFAmYWY4sACgkQMiR/u0Ct
H6ZoqQ/9HaftN0wpm+5Nwb3HTvYI+7fC1avrzFO9auz1wilESlebroZNSkUnn+Ip
FHtyfrEwbpftS3cqlLKrNnABcMPLGeqTme5+ST0uTb3sE108OCPSPGa9XUFMRsnA
XTFs1ylYVSBbIv3X0ST6enHapfCROVCTXbOR8JKuDhlsLbNf9S+9jZFzH0L8fcDF
+8p6J6Ueouy6pYQUTqJg0enY+y0jNLhzNil4M+dqKnzKVZTmkHqnzCXgre0ZEqv9
gBNuMeJJMehtArtX8wYe6zf6EcHYrrgW/BgcL8m+iUxP3toqW35hTaX9ZDKB1rcv
bIXGPQjuhSovaqfk2lbSmTx/c+UHO8/x3YIECfz/rYlDX6d0ggZSQr3ZwPekhuRk
fbv3aimqN4Nq5jI0rJF7XgtT2Iy0+ylw/5RaKcy0STTP6UKhWud6e+qbOf4Fzr0O
2RrNMKIZNp7rGc91gYckHsB8QpMcvvDHb++L1KCe4s+cOSROZkkGZH0jpZFtHPP+
uaIQd44WnjKtwBVwTE5nPGW4XGGrAMItPtpKaLQe9oLr1UXjAUJ0wST3dBaPbh4T
SjLCHL2ILo8ZsL4TSIN77KRO+xe7JKcA7RDosRLaLodd3oHjtD1TMEcaI/HVc2q2
xIQ0j00mQQQTMa6PX8BqAqQl9anjBwas7kG7CmWFVdyId1lVIkA=
=qvEk
-----END PGP SIGNATURE-----
pgpmJCPu8Ja3i.pgp
Description: PGP signature
--- End Message ---