Bug#1089343: homer-api: Supporting rootless builds by default

Niels Thykier niels at thykier.net
Sat Dec 7 19:21:36 GMT 2024


Source: homer-api
Version: 5.0.6+dfsg2-3.2
Severity: important
Tags: ftbfs
Justification: FTBFS
X-Debbugs-Cc: niels at thykier.net
User: niels at 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`,
homer-api failed to rebuild.

Log Summary:
-------------------------------------------------------------------------------
[...]
dpkg-buildpackage: info: host architecture arm64
  debian/rules clean
dh clean --with apache2
dh: warning: Compatibility levels before 10 are deprecated (level 9 in use)
    dh_clean
	rm -f debian/debhelper-build-stamp
	rm -rf debian/.debhelper/
dh_clean: warning: Compatibility levels before 10 are deprecated (level 
9 in use)
	rm -f -- debian/homer-api.substvars 
debian/homer-api-postgresql.substvars debian/homer-api-mysql.substvars 
debian/files
	rm -fr -- debian/homer-api/ debian/tmp/ debian/homer-api-postgresql/ 
debian/homer-api-mysql/
	find .  \( \( \
		\( -path .\*/.git -o -path .\*/.svn -o -path .\*/.bzr -o -path .\*/.hg 
-o -path .\*/CVS -o -path .\*/.pc -o -path .\*/_darcs \) -prune -o -type 
f -a \
	        \( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
		 -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
		 -o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
		 -o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \
		\) -exec rm -f {} + \) -o \
		\( -type d -a \( -name autom4te.cache -o -name __pycache__ \) -prune 
-exec rm -rf {} + \) \)
  debian/rules binary
dh binary --with apache2
dh: warning: Compatibility levels before 10 are deprecated (level 9 in use)
    dh_update_autotools_config
    debian/rules override_dh_auto_configure
make[1]: Entering directory '/<<PKGBUILDDIR>>'
true
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
    debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
true
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
    dh_prep
	rm -f -- debian/homer-api.substvars 
debian/homer-api-postgresql.substvars debian/homer-api-mysql.substvars
	rm -fr -- debian/.debhelper/generated/homer-api/ debian/homer-api/ 
debian/tmp/ debian/.debhelper/generated/homer-api-postgresql/ 
debian/homer-api-postgresql/ 
debian/.debhelper/generated/homer-api-mysql/ debian/homer-api-mysql/
    debian/rules override_dh_auto_install
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_install \
	-X.htaccess \
	-Xmysql.php -Xpgsql.php \
                 -XCOPYING -XLICENSE \
                 -Xjquery.min.js \
	api usr/share/homer/web
dh_install: warning: Compatibility levels before 10 are deprecated 
(level 9 in use)
	install -m0755 -d debian/homer-api/usr/share/homer/web
	cd './apidoc/..' && find 'apidoc' ! \( -regex .\*\\.htaccess.\* -or 
-regex .\*mysql\\.php.\* -or -regex .\*pgsql\\.php.\* -or -regex 
.\*COPYING.\* -or -regex .\*LICENSE.\* -or -regex 
.\*jquery\\.min\\.js.\* \) \( -type f -or -type l \) -print0 | LC_ALL=C 
sort -z | xargs -0 -I {} cp --reflink=auto --parents -dp {} 
/<<PKGBUILDDIR>>/debian/homer-api/usr/share/homer/web/
	cd './apidoc/..' && find 'apidoc' ! \( -regex .\*\\.htaccess.\* -or 
-regex .\*mysql\\.php.\* -or -regex .\*pgsql\\.php.\* -or -regex 
.\*COPYING.\* -or -regex .\*LICENSE.\* -or -regex 
.\*jquery\\.min\\.js.\* \) \( -type d -and -empty \) -print0 | LC_ALL=C 
sort -z | xargs -0 -I {} cp --reflink=auto --parents -a {} 
/<<PKGBUILDDIR>>/debian/homer-api/usr/share/homer/web/
	install -m0755 -d debian/homer-api/usr/share/homer
	cd './examples/..' && find 'examples' ! \( -regex .\*\\.htaccess.\* -or 
-regex .\*mysql\\.php.\* -or -regex .\*pgsql\\.php.\* -or -regex 
.\*COPYING.\* -or -regex .\*LICENSE.\* -or -regex 
.\*jquery\\.min\\.js.\* \) \( -type f -or -type l \) -print0 | LC_ALL=C 
sort -z | xargs -0 -I {} cp --reflink=auto --parents -dp {} 
/<<PKGBUILDDIR>>/debian/homer-api/usr/share/homer/
	cd './examples/..' && find 'examples' ! \( -regex .\*\\.htaccess.\* -or 
-regex .\*mysql\\.php.\* -or -regex .\*pgsql\\.php.\* -or -regex 
.\*COPYING.\* -or -regex .\*LICENSE.\* -or -regex 
.\*jquery\\.min\\.js.\* \) \( -type d -and -empty \) -print0 | LC_ALL=C 
sort -z | xargs -0 -I {} cp --reflink=auto --parents -a {} 
/<<PKGBUILDDIR>>/debian/homer-api/usr/share/homer/
	install -m0755 -d debian/homer-api/usr/share/homer
	cd './sql/..' && find 'sql' ! \( -regex .\*\\.htaccess.\* -or -regex 
.\*mysql\\.php.\* -or -regex .\*pgsql\\.php.\* -or -regex .\*COPYING.\* 
-or -regex .\*LICENSE.\* -or -regex .\*jquery\\.min\\.js.\* \) \( -type 
f -or -type l \) -print0 | LC_ALL=C sort -z | xargs -0 -I {} cp 
--reflink=auto --parents -dp {} 
/<<PKGBUILDDIR>>/debian/homer-api/usr/share/homer/
	cd './sql/..' && find 'sql' ! \( -regex .\*\\.htaccess.\* -or -regex 
.\*mysql\\.php.\* -or -regex .\*pgsql\\.php.\* -or -regex .\*COPYING.\* 
-or -regex .\*LICENSE.\* -or -regex .\*jquery\\.min\\.js.\* \) \( -type 
d -and -empty \) -print0 | LC_ALL=C sort -z | xargs -0 -I {} cp 
--reflink=auto --parents -a {} 
/<<PKGBUILDDIR>>/debian/homer-api/usr/share/homer/
	install -m0755 -d debian/homer-api/usr/share/homer/web
	cd './api/..' && find 'api' ! \( -regex .\*\\.htaccess.\* -or -regex 
.\*mysql\\.php.\* -or -regex .\*pgsql\\.php.\* -or -regex .\*COPYING.\* 
-or -regex .\*LICENSE.\* -or -regex .\*jquery\\.min\\.js.\* \) \( -type 
f -or -type l \) -print0 | LC_ALL=C sort -z | xargs -0 -I {} cp 
--reflink=auto --parents -dp {} 
/<<PKGBUILDDIR>>/debian/homer-api/usr/share/homer/web/
	cd './api/..' && find 'api' ! \( -regex .\*\\.htaccess.\* -or -regex 
.\*mysql\\.php.\* -or -regex .\*pgsql\\.php.\* -or -regex .\*COPYING.\* 
-or -regex .\*LICENSE.\* -or -regex .\*jquery\\.min\\.js.\* \) \( -type 
d -and -empty \) -print0 | LC_ALL=C sort -z | xargs -0 -I {} cp 
--reflink=auto --parents -a {} 
/<<PKGBUILDDIR>>/debian/homer-api/usr/share/homer/web/
	install -m0755 -d debian/homer-api-postgresql/usr/lib/homer/libexec
	cp --reflink=auto -a ./scripts/pgsql/homer_pgsql_rotate.pl 
debian/homer-api-postgresql/usr/lib/homer/libexec/
	install -m0755 -d debian/homer-api-postgresql/usr/lib/homer/libexec
	cp --reflink=auto -a ./scripts/pgsql/homer_rotate 
debian/homer-api-postgresql/usr/lib/homer/libexec/
	install -m0755 -d debian/homer-api-mysql/usr/lib/homer/libexec
	cp --reflink=auto -a ./scripts/homer_mysql_rotate.pl 
debian/homer-api-mysql/usr/lib/homer/libexec/
	install -m0755 -d debian/homer-api-mysql/usr/lib/homer/libexec
	cp --reflink=auto -a ./scripts/homer_rotate 
debian/homer-api-mysql/usr/lib/homer/libexec/
	install -m0755 -d debian/homer-api-mysql/usr/lib/homer/libexec
	cp --reflink=auto -a ./scripts/homer_mysql_remove_partitions.pl 
debian/homer-api-mysql/usr/lib/homer/libexec/
# must not try to start Kamailio until user manually configures the DB
dh_installinit --name kamailio-homer --no-start
dh_installinit: warning: Compatibility levels before 10 are deprecated 
(level 9 in use)
	install -m0755 -d debian/homer-api/usr/lib/systemd/system
	install -p -m0644 debian/homer-api.kamailio-homer.service 
debian/homer-api/usr/lib/systemd/system/kamailio-homer.service
	install -m0755 -d debian/homer-api/etc/default
	install -p -m0644 debian/homer-api.kamailio-homer.default 
debian/homer-api/etc/default/kamailio-homer
	install -m0755 -d debian/homer-api/etc/init.d
	install -p -m0755 debian/homer-api.kamailio-homer.init 
debian/homer-api/etc/init.d/kamailio-homer
	[META] Append autosnippet "preinst-init-chmod" to preinst 
[debian/.debhelper/generated/homer-api/preinst.service]
	[META] Append autosnippet "postinst-init-nostart" to postinst 
[debian/.debhelper/generated/homer-api/postinst.service]
	[META] Append autosnippet "postrm-init" to postrm 
[debian/.debhelper/generated/homer-api/postrm.service]
install -D -T -m 0640 examples/sipcapture/sipcapture.kamailio 
/<<PKGBUILDDIR>>/debian/homer-api-mysql/etc/homer/kamailio-homer.cfg
install -D -T -m 0640 examples/pgsql/kamailio.cfg 
/<<PKGBUILDDIR>>/debian/homer-api-postgresql/etc/homer/kamailio-homer.cfg
for cfg in 
/<<PKGBUILDDIR>>/debian/homer-api-mysql/etc/homer/kamailio-homer.cfg 
/<<PKGBUILDDIR>>/debian/homer-api-postgresql/etc/homer/kamailio-homer.cfg 
; \
do \
	grep -q ^mpath $cfg || sed -i 
"0,/^loadmodule.*/s!^loadmodule.*!mpath=\"/usr/lib/aarch64-linux-gnu/kamailio/modules/\"\n&!" 
$cfg ; \
done
install -D -T -m 0644 scripts/sipcapture.crontab 
/<<PKGBUILDDIR>>/debian/homer-api/etc/cron.d/homer
sed -i \
	-e 's/ root / homer /g' \
	-e 's!/usr/bin/homer_!/usr/lib/homer/libexec/homer_!g' \
	/<<PKGBUILDDIR>>/debian/homer-api/etc/cron.d/homer
install -D -T -m 0644 examples/sipcapture/sipcapture.rsyslogd 
/<<PKGBUILDDIR>>/debian/homer-api/etc/rsyslog.d/homer.conf
sed -i -e 's/homer$/homer.log/g' 
/<<PKGBUILDDIR>>/debian/homer-api/etc/rsyslog.d/homer.conf
install -D -T -m 0640 -g www-data api/configuration_example.php 
/<<PKGBUILDDIR>>/debian/homer-api/etc/homer/configuration.php
install: cannot change ownership of 
'/<<PKGBUILDDIR>>/debian/homer-api/etc/homer/configuration.php': 
Operation not permitted
make[1]: *** [debian/rules:34: override_dh_auto_install] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:16: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit 
status 2
--------------------------------------------------------------------------------
Build finished at 2024-11-16T14:43:29Z

-------------------------------------------------------------------------------


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/996859.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 fix to this bug.

If this package is listed in
https://people.debian.org/~nthykier/rrr-no-as-default/docs/maybe-misbuilds.list,
then the package was deemed at risk for misbuilding (having wrong
ownership) but had a FTBFS problem we tested it. Please test whether the
package works with `Rules-Requires-Root: no` validating that the
resulting deb has the correct ownership for all paths in the deb.

The goal is to have the default changed in `dpkg` either in `Trixie` or
`Forky`, depending on progress and feasibility with the release schedule
for Trixie.

For more information on this bug filing, please see:
https://lists.debian.org/debian-dpkg/2024/11/msg00016.html

Thanks,


PS: The builds were performed in mid-November. If you fixed the problem
between between then and this bug being filed, then please just close
the bug with the version it was fixed in.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-voip-maintainers/attachments/20241207/4a2ad14d/attachment-0001.sig>


More information about the Pkg-voip-maintainers mailing list