Andrea Pappacoda
2024-09-24 22:50:01 UTC
Reply
PermalinkVersion: 13.20
Severity: normal
Hi! Please consider this a follow up to bug #1082719. Consider its
example code, but with the following modifications:
diff --git a/Makefile b/Makefile
index 959dd73..7898fb8 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ main.o: main.c
install: main
$(MKDIR) $(DESTDIR)$(PREFIX)/$(BINDIR)
- $(INSTALL) main $(DESTDIR)$(PREFIX)/$(BINDIR)
+ $(INSTALL) -m 0555 main $(DESTDIR)$(PREFIX)/$(BINDIR)
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/$(BINDIR)/main
diff --git a/debian/rules b/debian/rules
index 2f671b9..fea8621 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,4 +4,4 @@
dh $@
override_dh_auto_install:
- dh_auto_install -- PREFIX=/usr
+ dh_auto_install --destdir=debian/compat-14-test/ -- PREFIX=/usr
As dh_fixperm is now run later in debhelper's sequence, tools trying to
modify the "main" binary will fail, since upstream's build system
installs it with mode 0555 instead of 0755:
dh_strip -a
strip: unable to copy file 'debian/compat-14-test/usr/bin/main'; reason: Permission denied
dh_strip: error: strip --remove-section=.comment --remove-section=.note debian/compat-14-test/usr/bin/main returned exit code 1
dh_strip: error: Aborting due to earlier error
make: *** [debian/rules:4: binary] Error 25
This is somewhat mentioned in the debhelper-compat-upgrade-checklist(7)
manual page, and says to file bugs to the relevant tools. Since
dh_fixpem is owned by debhelper, here I am :)
How do you think should we handle this? I see how dh_fixperm should be
run before dh_compress, but why is it now run so late compared to
before? Why not split dh_fixperm in to parts, one that allows debhelper
tools to act on the files, and the other one which makes sure that
permissions are normalzied? Maybe adding a dh_make_writable command?
Let me know! I'd love to see compat 14 ready to be released!