From b08843cae0ae8aa428a2a654fc48fbd15c65c714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davi=20Ant=C3=B4nio=20da=20Silva=20Santos?= Date: Wed, 1 Mar 2023 23:55:08 -0300 Subject: Abort maintainer scripts on failure The `set -e` flag has been enabled in the maintainer scripts. This fixes the Lintian warnings: * boca-autojudge: maintainer-script-ignores-errors [postinst] * boca-submission-tools: maintainer-script-ignores-errors [postinst] * boca-web: maintainer-script-ignores-errors [postinst] The packages boca-common and boca-db were altered to set the flag as early as possible in their maintainer scripts. --- debian/boca-submission-tools.postinst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'debian/boca-submission-tools.postinst') diff --git a/debian/boca-submission-tools.postinst b/debian/boca-submission-tools.postinst index 21cfdd9..107ddf2 100644 --- a/debian/boca-submission-tools.postinst +++ b/debian/boca-submission-tools.postinst @@ -1,12 +1,13 @@ #!/bin/bash +set -e #Make sure wrapper is suid and others are not readable chmod 700 /usr/sbin/boca-fixes -chmod 700 /usr/sbin/boca-auth-runs -chmod 700 /usr/sbin/boca-outmanage -chmod 700 /usr/sbin/boca-submit-log +chmod 700 /usr/sbin/boca-auth-runs +chmod 700 /usr/sbin/boca-outmanage +chmod 700 /usr/sbin/boca-submit-log chmod 700 /usr/bin/boca-submit-run-* -chmod 4555 /usr/bin/boca-submit-run-root-wrapper +chmod 4555 /usr/bin/boca-submit-run-root-wrapper for i in boca-submit-list boca-submit-oldlist; do rm -f /usr/bin/$i || true -- cgit v1.2.3 From 6695d2384069b7016398b2a55fc6962b1d8e6985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davi=20Ant=C3=B4nio=20da=20Silva=20Santos?= Date: Thu, 2 Mar 2023 00:02:32 -0300 Subject: Enable debhelper automatic generation of shell code The maintainer scripts have been modified with the addition of `#DEBHELPER#`. This enables dh_installdeb to automatically generate shell code on maintainer scripts. The following Lintian warnings have been addressed: * boca source: maintainer-script-lacks-debhelper-token [debian/boca-autojudge.postinst] * boca source: maintainer-script-lacks-debhelper-token [debian/boca-common.postinst] * boca source: maintainer-script-lacks-debhelper-token [debian/boca-db.postinst] * boca source: maintainer-script-lacks-debhelper-token [debian/boca-submission-tools.postinst] * boca source: maintainer-script-lacks-debhelper-token [debian/boca-web.postinst] --- debian/boca-submission-tools.postinst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian/boca-submission-tools.postinst') diff --git a/debian/boca-submission-tools.postinst b/debian/boca-submission-tools.postinst index 107ddf2..6b6e15c 100644 --- a/debian/boca-submission-tools.postinst +++ b/debian/boca-submission-tools.postinst @@ -13,3 +13,10 @@ for i in boca-submit-list boca-submit-oldlist; do rm -f /usr/bin/$i || true ln -s /usr/bin/boca-submit-run /usr/bin/$i done + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 -- cgit v1.2.3