From 89d0e395460fe5c0501d95c1223a866a53bdff6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davi=20Ant=C3=B4nio=20da=20Silva=20Santos?= Date: Wed, 1 Mar 2023 23:47:05 -0300 Subject: Fix chown usage in maintainer scripts The maintainer scripts used by boca-common and boca-web used points to separate the user from its group, which is discouraged. The point has been replaced with a colon as recommended by chown's manpage. This fixes the Lintian warnings: * boca-common: maintainer-script-calls-chown-improperly "chown www-data.www-data" [postinst:51] * boca-web: maintainer-script-calls-chown-improperly "chown -R www-data.www-data" [postinst:5] --- debian/boca-common.postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian/boca-common.postinst') diff --git a/debian/boca-common.postinst b/debian/boca-common.postinst index 0a35a35..2d47988 100644 --- a/debian/boca-common.postinst +++ b/debian/boca-common.postinst @@ -48,6 +48,6 @@ case "$1" in esac chmod 600 /var/www/boca/src/private/conf.php -chown www-data.www-data /var/www/boca/src/private/conf.php +chown www-data:www-data /var/www/boca/src/private/conf.php exit 0 -- cgit v1.2.3 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-common.postinst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'debian/boca-common.postinst') diff --git a/debian/boca-common.postinst b/debian/boca-common.postinst index 2d47988..9492c78 100644 --- a/debian/boca-common.postinst +++ b/debian/boca-common.postinst @@ -1,10 +1,9 @@ #!/bin/bash +set -e chmod 700 /usr/sbin/boca-config-dbhost chmod 700 /usr/sbin/boca-fixssh -set -e - . /usr/share/debconf/confmodule priority=high -- 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-common.postinst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'debian/boca-common.postinst') diff --git a/debian/boca-common.postinst b/debian/boca-common.postinst index 9492c78..3ff74f1 100644 --- a/debian/boca-common.postinst +++ b/debian/boca-common.postinst @@ -49,4 +49,9 @@ esac chmod 600 /var/www/boca/src/private/conf.php chown www-data:www-data /var/www/boca/src/private/conf.php +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + exit 0 -- cgit v1.2.3