Bug#1089385: memstat: Supporting rootless builds by default

2025-01-01 Thread Niels Thykier

Michael Meskes:



Niels,


I intend to NMU to make progress on the MBF if I do not hear from you
on
this. It would help me if you either uploaded this soon or approved
the
NMU (enabling me to skip the delay). Thanks in advance.


Please go ahead with the NMU and skip the delay. Thanks for your
efforts.

Michael


Thanks for the approval. It is much appreciated to be able to skip the 
delay! :)


Upload incoming.

Best regards,
Niels



OpenPGP_signature.asc
Description: OpenPGP digital signature


Bug#1089385: memstat: Supporting rootless builds by default

2025-01-01 Thread Michael Meskes


Niels,

> I intend to NMU to make progress on the MBF if I do not hear from you
> on 
> this. It would help me if you either uploaded this soon or approved
> the 
> NMU (enabling me to skip the delay). Thanks in advance.

Please go ahead with the NMU and skip the delay. Thanks for your
efforts.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De
Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org


signature.asc
Description: This is a digitally signed message part


Bug#1089385: memstat: Supporting rootless builds by default

2024-12-31 Thread Niels Thykier

Control: tags -1 patch

On Sat, 7 Dec 2024 20:43:29 +0100 Niels Thykier  wrote:

Source: memstat
Version: 1.1+nmu1
Severity: important
Tags: ftbfs
Justification: FTBFS
X-Debbugs-Cc: ni...@thykier.net
User: ni...@thykier.net
Usertags: rrr-no-as-default-issue

Dear maintainer,

During a test rebuild for building packages with
`Rules-Requires-Root: no` as the default in `dpkg`,
memstat failed to rebuild.

Log Summary:
---
[...]


Hi

Please see attached as a patch.

I intend to NMU to make progress on the MBF if I do not hear from you on 
this. It would help me if you either uploaded this soon or approved the 
NMU (enabling me to skip the delay). Thanks in advance.


Best regards,
Niels

diff -Nru memstat-1.1+nmu1/debian/changelog memstat-1.1+nmu2/debian/changelog
--- memstat-1.1+nmu1/debian/changelog   2024-02-18 16:13:24.0 +0100
+++ memstat-1.1+nmu2/debian/changelog   2024-12-31 15:39:49.0 +0100
@@ -1,3 +1,11 @@
+memstat (1.1+nmu2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Remove need for root when building the package.
+(Closes: #1089385)
+
+ -- Niels Thykier   Tue, 31 Dec 2024 14:39:49 +
+
 memstat (1.1+nmu1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru memstat-1.1+nmu1/debian/control memstat-1.1+nmu2/debian/control
--- memstat-1.1+nmu1/debian/control 2018-02-09 22:47:32.0 +0100
+++ memstat-1.1+nmu2/debian/control 2024-12-31 15:39:18.0 +0100
@@ -2,6 +2,7 @@
 Section: admin
 Priority: optional
 Maintainer: Michael Meskes 
+Rules-Requires-Root: no
 Standards-Version: 4.1.3
 Build-Depends: debhelper (>= 11)
 
diff -Nru memstat-1.1+nmu1/Makefile memstat-1.1+nmu2/Makefile
--- memstat-1.1+nmu1/Makefile   2018-02-09 22:45:26.0 +0100
+++ memstat-1.1+nmu2/Makefile   2024-12-31 15:38:49.0 +0100
@@ -8,9 +8,9 @@
 exec_prefix = $(prefix)/usr
 
 INSTALL = install
-INSTALL_PROGRAM = $(INSTALL) -p -s -o root -g root  -m  755
-INSTALL_FILE= $(INSTALL) -p-o root -g root  -m  644
-INSTALL_DIR = $(INSTALL) -p -d -o root -g root  -m  755
+INSTALL_PROGRAM = $(INSTALL) -p -s -m  755
+INSTALL_FILE= $(INSTALL) -p-m  644
+INSTALL_DIR = $(INSTALL) -p -d -m  755
 
 memstat: memstat.c
 


OpenPGP_signature.asc
Description: OpenPGP digital signature


Bug#1089385: memstat: Supporting rootless builds by default

2024-12-07 Thread Niels Thykier

Source: memstat
Version: 1.1+nmu1
Severity: important
Tags: ftbfs
Justification: FTBFS
X-Debbugs-Cc: ni...@thykier.net
User: ni...@thykier.net
Usertags: rrr-no-as-default-issue

Dear maintainer,

During a test rebuild for building packages with
`Rules-Requires-Root: no` as the default in `dpkg`,
memstat failed to rebuild.

Log Summary:
---
[...]

+--+
| Build
   |
+--+


Unpack source
-

Format: 3.0 (native)
Source: memstat
Binary: memstat
Architecture: any
Version: 1.1+nmu1
Maintainer: Michael Meskes 
Standards-Version: 4.1.3
Build-Depends: debhelper (>= 11)
Package-List:
 memstat deb admin optional arch=any
Checksums-Sha1:
 123fc16ac688d45ae3b7ade40749de3ab8463d0b 9060 memstat_1.1+nmu1.tar.xz
Checksums-Sha256:
 c201035986201d6c05eff0a2d554f56c561e0a23e16462c1cc8781c3027ea3aa 9060
memstat_1.1+nmu1.tar.xz
Files:
 460b9c7545703b33da21779eeb9afdf9 9060 memstat_1.1+nmu1.tar.xz


gpgv: Signature made Sun Feb 18 15:16:12 2024 UTC
gpgv:using RSA key 406220C8B8552802378CCE411F5C7A8B45564314
gpgv:issuer "b...@debian.org"
gpgv: Can't check signature: No public key
dpkg-source: warning: cannot verify inline signature for ./
memstat_1.1+nmu1.dsc: no acceptable signature found
dpkg-source: info: extracting memstat in /<>
dpkg-source: info: unpacking memstat_1.1+nmu1.tar.xz

Check disk space


Sufficient free space for build

User Environment


APT_CONFIG=/var/lib/sbuild/apt.conf
HOME=/sbuild-nonexistent
LANG=en_US.UTF-8
LC_ALL=C.UTF-8
LOGNAME=debusine-worker
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
SHELL=/bin/sh
USER=debusine-worker

dpkg-buildpackage
-

Command: dpkg-buildpackage -us -uc -b -rfakeroot
dpkg-buildpackage: info: source package memstat
dpkg-buildpackage: info: source version 1.1+nmu1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Bastian Germann 
 dpkg-source --before-build .
dpkg-buildpackage: info: host architecture arm64
 debian/rules clean
dh clean
   dh_auto_clean
make -j8 clean
make[1]: Entering directory '/<>'
rm -f memstat.o memstat DEADJOE *~ */*~
make[1]: Leaving directory '/<>'
   dh_clean
 debian/rules binary
dh binary
   dh_update_autotools_config
   dh_autoreconf
   dh_auto_configure
   dh_auto_build
make -j8 "INSTALL=install --strip-program=true"
make[1]: Entering directory '/<>'
cc -g -Wall -O2 -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now
 memstat.c   -o memstat
memstat.c: In function ‘summarize_usage’:
memstat.c:277:23: warning: writing 1 byte into a region of size 0 [-
Wstringop-overflow=]
  277 | linkname[len] = '\0';
  | ~~^~
memstat.c:267:14: note: at offset -1 into destination object ‘linkname’
of size 4096
  267 | char linkname[PATH_MAX], filename[PATH_MAX];
  |  ^~~~
make[1]: Leaving directory '/<>'
   dh_auto_test
   create-stamp debian/debhelper-build-stamp
   dh_prep
   dh_installdirs
   dh_auto_install --destdir=debian/memstat/
make -j8 install DESTDIR=/<>/memstat-1.1\+nmu1/debian/memstat
AM_UPDATE_INFO_DIR=no "INSTALL=install --strip-program=true"
make[1]: Entering directory '/<>'
install --strip-program=true -p -s -o root -g root  -m  755 memstat /
<>/debian/memstat//usr/bin/memstat
install: cannot change ownership of '/<>/debian/memstat//
usr/bin/memstat': Operation not permitted
make[1]: *** [Makefile:21: install] Error 1
make[1]: Leaving directory '/<>'
dh_auto_install: error: make -j8 install DESTDIR=/<>/
memstat-1.1\+nmu1/debian/memstat AM_UPDATE_INFO_DIR=no "INSTALL=install
--strip-program=true" returned exit code 2
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit
status 2

Build finished at 2024-11-17T11:58:02Z

---


The above is just how the build ends and not necessarily the most
relevant part. If required, the full build log is available here:

https://people.debian.org/~nthykier/rrr-no-as-default/logs/1022574.gz

You can find common solutions at
https://people.debian.org/~nthykier/rrr-no-as-default/docs/solutions.md

If this is really a bug in one of the build-depends, please use
reassign and affects, so that this is still visible in the BTS web
page for this package.

If this package is listed in
https://people.debian.org/~nthykier/rrr-no-as-default/docs/static-
ownership.list,
then please just set `Rules-Requires-Root: binary-targets` to the source
stanza of `debian/control` as a