Bug#1043836: cmospwd: Fails to build source after successful build

2023-09-16 Thread Bastian Germann

I am uploading a NMU to DELAYED/10 in order to fix this.
The debdiff is attached.diff -Nru cmospwd-5.0+dfsg/debian/changelog cmospwd-5.0+dfsg/debian/changelog
--- cmospwd-5.0+dfsg/debian/changelog   2010-05-10 14:55:37.0 +
+++ cmospwd-5.0+dfsg/debian/changelog   2023-09-16 11:44:58.0 +
@@ -1,3 +1,13 @@
+cmospwd (5.0+dfsg-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * Update maintainer field and unset DMUA
+  * Drop kfreebsd from Architectures and patches (Closes: #1052036)
+  * d/watch: Scan HTTPS
+  * Clean binary (Closes: #1043836)
+
+ -- Bastian Germann   Sat, 16 Sep 2023 11:44:58 +
+
 cmospwd (5.0+dfsg-2) unstable; urgency=low
 
   * Include fix for FTBFS on KFreeBSD (Closes: #580673) 
diff -Nru cmospwd-5.0+dfsg/debian/clean cmospwd-5.0+dfsg/debian/clean
--- cmospwd-5.0+dfsg/debian/clean   1970-01-01 00:00:00.0 +
+++ cmospwd-5.0+dfsg/debian/clean   2023-09-16 11:44:58.0 +
@@ -0,0 +1 @@
+src/cmospwd
diff -Nru cmospwd-5.0+dfsg/debian/control cmospwd-5.0+dfsg/debian/control
--- cmospwd-5.0+dfsg/debian/control 2010-05-10 14:55:37.0 +
+++ cmospwd-5.0+dfsg/debian/control 2023-09-16 11:44:58.0 +
@@ -1,15 +1,14 @@
 Source: cmospwd
 Section: utils
 Priority: optional
-Maintainer: Luke Faraone 
+Maintainer: Luke Faraone 
 Build-Depends: cdbs (>= 0.4.49), debhelper (>= 7)
 Standards-Version: 3.8.4
-DM-Upload-Allowed: yes
 Vcs-Bzr: https://code.launchpad.net/~lfaraone/cmospwd/debian
 Homepage: http://www.cgsecurity.org/wiki/CmosPwd
 
 Package: cmospwd
-Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 
+Architecture: amd64 i386
 Depends: ${shlibs:Depends},  ${misc:Depends},
 Description: decrypt BIOS passwords from CMOS
  CmosPwd is a cross-platform tool to decrypt password stored in CMOS used 
@@ -18,4 +17,3 @@
  This application should work out of the box on most modern systems, but 
  some more esoteric BIOSes may not be supported or may require additional 
  steps. 
- 
diff -Nru cmospwd-5.0+dfsg/debian/patches/ftbfs_kfreebsd.patch 
cmospwd-5.0+dfsg/debian/patches/ftbfs_kfreebsd.patch
--- cmospwd-5.0+dfsg/debian/patches/ftbfs_kfreebsd.patch2010-05-10 
14:55:37.0 +
+++ cmospwd-5.0+dfsg/debian/patches/ftbfs_kfreebsd.patch1970-01-01 
00:00:00.0 +
@@ -1,51 +0,0 @@
 a/src/cmospwd.c
-+++ b/src/cmospwd.c
-@@ -37,7 +37,11 @@
- #define HAVE_SYS_IO_H 1
- #endif
- 
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) && ! defined(__FreeBSD_kernel__)
-+# define __FreeBSD_kernel__ __FreeBSD__
-+#endif
-+
-+#ifdef __FreeBSD_kernel__
- #define HAVE_CTYPE_H 1
- #endif
- 
-@@ -181,7 +185,7 @@
- #define GWIOPM_PARAMCOUNT 3// for most functions
- #define GWIOPM_PARAMCOUNT_BYTES GWIOPM_PARAMCOUNT * 4  // for most functions
- 
--#elif defined(__FreeBSD__)
-+#elif defined(__FreeBSD_kernel__)
- FILE *cmos_fd;
- #endif
- 
-@@ -358,7 +362,7 @@
- };
- 
- 
--#if 
defined(__linux__)||defined(__FreeBSD__)||defined(__NetBSD__)||defined(__CYGWIN32__)||defined(__MINGW32__)
-+#if 
defined(__linux__)||defined(__FreeBSD_kernel__)||defined(__NetBSD__)||defined(__CYGWIN32__)||defined(__MINGW32__)
- static __inline__ void outportb(uint16_t port,uint8_t value)
- {
-   __asm__ volatile ("outb %0,%1"
-@@ -1471,7 +1475,7 @@
- perror("i386_iopl");
- exit(1);
-   }
--#elif defined(__FreeBSD__)
-+#elif defined(__FreeBSD_kernel__)
- cmos_fd = fopen("/dev/io", "r");
- if(cmos_fd==NULL){
-perror("fopen /dev/io failed");
-@@ -1485,7 +1489,7 @@
- {
- #ifdef __linux__
-   ioperm(PORT_CMOS_0,4*2,0);
--#elif defined(__FreeBSD__)
-+#elif defined(__FreeBSD_kernel__)
-   fclose(cmos_fd);
- #endif
- }
diff -Nru cmospwd-5.0+dfsg/debian/patches/series 
cmospwd-5.0+dfsg/debian/patches/series
--- cmospwd-5.0+dfsg/debian/patches/series  2010-05-10 14:55:37.0 
+
+++ cmospwd-5.0+dfsg/debian/patches/series  1970-01-01 00:00:00.0 
+
@@ -1 +0,0 @@
-ftbfs_kfreebsd.patch
diff -Nru cmospwd-5.0+dfsg/debian/watch cmospwd-5.0+dfsg/debian/watch
--- cmospwd-5.0+dfsg/debian/watch   2010-05-10 14:55:37.0 +
+++ cmospwd-5.0+dfsg/debian/watch   2023-09-16 11:44:58.0 +
@@ -1,3 +1,3 @@
 version=3
 opts=dversionmangle=s/\+dfsg$// \
-http://www.cgsecurity.org/wiki/CmosPwd 
http://www.cgsecurity.org/cmospwd-(.*)\.tar\.bz2
+https://www.cgsecurity.org/wiki/CmosPwd 
https://www.cgsecurity.org/cmospwd-(.*)\.tar\.bz2


Bug#1043836: cmospwd: Fails to build source after successful build

2023-08-13 Thread Lucas Nussbaum
Source: cmospwd
Version: 5.0+dfsg-2
Severity: minor
Tags: trixie sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-sab-20230813 ftbfs-source-after-build
User: debian...@lists.debian.org
Usertags: qa-doublebuild

Hi,

This package fails to build a source package after a successful build
(dpkg-buildpackage ; dpkg-buildpackage -S).

This is probably a clear violation of Debian Policy section 4.9 (clean target),
but this is filed as severity:minor for now, because a discussion on
debian-devel showed that we might want to revisit the requirement of a working
'clean' target.

More information about this class of issues, included common problems and
solutions, is available at
https://wiki.debian.org/qa.debian.org/FTBFS/SourceAfterBuild

Relevant part of the build log:
> cd /<> && runuser -u user42 -- dpkg-buildpackage --sanitize-env 
> -us -uc -rfakeroot -S
> 
> 
> dpkg-buildpackage: info: source package cmospwd
> dpkg-buildpackage: info: source version 5.0+dfsg-2
> dpkg-buildpackage: info: source distribution unstable
> dpkg-buildpackage: info: source changed by Luke Faraone 
>  dpkg-source --before-build .
> dpkg-source: warning: unknown information field 'Dm-Upload-Allowed' in input 
> data in general section of control info file
>  fakeroot debian/rules clean
> test -x debian/rules
> rm -f debian/stamp-makefile-build debian/stamp-makefile-install
> /usr/bin/make -C /<>/src CFLAGS="-g -O2 
> -ffile-prefix-map=/<>=. -fstack-protector-strong -Wformat 
> -Werror=format-security" CXXFLAGS="-g -O2 
> -ffile-prefix-map=/<>=. -fstack-protector-strong -Wformat 
> -Werror=format-security" CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=2" 
> LDFLAGS="-Wl,-z,relro" -k clean
> make[1]: Entering directory '/<>/src'
> make[1]: *** No rule to make target 'clean'.
> make[1]: Leaving directory '/<>/src'
> make: [/usr/share/cdbs/1/class/makefile.mk:91: makefile-clean] Error 2 
> (ignored)
> dh_clean 
> dh_clean: warning: Compatibility levels before 10 are deprecated (level 7 in 
> use)
>  dpkg-source -b .
> dpkg-source: warning: unknown information field 'Dm-Upload-Allowed' in input 
> data in general section of control info file
> dpkg-source: info: using source format '3.0 (quilt)'
> dpkg-source: info: building cmospwd using existing 
> ./cmospwd_5.0+dfsg.orig.tar.gz
> dpkg-source: info: using patch list from debian/patches/series
> dpkg-source: error: cannot represent change to src/cmospwd: binary file 
> contents changed
> dpkg-source: error: add src/cmospwd in debian/source/include-binaries if you 
> want to store the modified binary in the debian tarball
> dpkg-source: warning: executable mode 0755 of 'src/cmospwd' will not be 
> represented in diff
> dpkg-source: error: unrepresentable changes to source
> dpkg-buildpackage: error: dpkg-source -b . subprocess returned exit status 1
> 
> E: Command 'cd /<> && runuser -u user42 -- dpkg-buildpackage 
> --sanitize-env -us -uc -rfakeroot -S' failed to run.


The full build log is available from:
http://qa-logs.debian.net/2023/08/13/cmospwd_5.0+dfsg-2_unstable.log

If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.