From 106d70518d39ca1bcc424127cec3cb0077185ea4 Mon Sep 17 00:00:00 2001 From: Ximon Eighteen <3304436+ximon18@users.noreply.github.com> Date: Wed, 26 Aug 2026 12:29:54 +0200 Subject: [PATCH 1/6] Don't request a home directory we don't need and which causes problems. (fixes #464) This prevents the error "Failed to set up special execution directory in /var/lib: No such file or directory". --- pkg/debian/postinst | 2 +- pkg/rpm/scriptlets.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/debian/postinst b/pkg/debian/postinst index 2d2ca5338..3c3eceb2c 100755 --- a/pkg/debian/postinst +++ b/pkg/debian/postinst @@ -4,7 +4,7 @@ USER_ID="cascade" create_user() { if id ${USER_ID} > /dev/null 2>&1; then return; fi - adduser --system --home /var/lib/${USER_ID} --group ${USER_ID} + adduser --system --group ${USER_ID} } case "$1" in diff --git a/pkg/rpm/scriptlets.toml b/pkg/rpm/scriptlets.toml index c0137cb11..f2f3311ad 100644 --- a/pkg/rpm/scriptlets.toml +++ b/pkg/rpm/scriptlets.toml @@ -14,7 +14,7 @@ if [ $1 -eq 1 ] ; then if ! id ${USER_ID} > /dev/null 2>&1; then # According to the CentOS 7 useradd man page: # --user-group causes a group by the same name as the user to be created - useradd --system --user-group ${USER_ID} --home-dir /var/lib/${USER_ID} --create-home + useradd --system --user-group ${USER_ID} fi mkdir -p /etc/cascade/policies From 68f11ff12c98db9c167739592bc30e96cd83edaf Mon Sep 17 00:00:00 2001 From: Ximon Eighteen <3304436+ximon18@users.noreply.github.com> Date: Wed, 26 Aug 2026 12:58:45 +0200 Subject: [PATCH 2/6] Satisfy Lintian in older O/S versions. --- pkg/debian/postinst | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/pkg/debian/postinst b/pkg/debian/postinst index 3c3eceb2c..c93adefc1 100755 --- a/pkg/debian/postinst +++ b/pkg/debian/postinst @@ -4,7 +4,27 @@ USER_ID="cascade" create_user() { if id ${USER_ID} > /dev/null 2>&1; then return; fi - adduser --system --group ${USER_ID} + + # Set the VERSION_CODENAME environment variable that describes which O/S + # version we are running on. + . /etc/os-release + + case ${VERSION_CODENAME} in + bullseye|jammy) + # Newer versions of Debian/Ubuntu use /nonexistent as the home + # directory by default, and don't actually create it. However, + # the version of Lintian in these older Debian/Ubuntu versions + # requires --home to be specified when calling adduser with + # --system so we explicitly set home to /nonexistent in these + # cases. The older O/S versions that don't default --home include + # that we package Cascade for include Debian Bullseye and Ubuntu + # Jammy so these are the versions we handle separately. + adduser --system --group ${USER_ID} --home /nonexistent + ;; + *) + adduser --system --group ${USER_ID} + ;; + esac } case "$1" in From 7a085b27a4128c424b723903644989f6442193ce Mon Sep 17 00:00:00 2001 From: Ximon Eighteen <3304436+ximon18@users.noreply.github.com> Date: Wed, 26 Aug 2026 13:07:26 +0200 Subject: [PATCH 3/6] Attempt to disable the incorrect Lintian error on Ubuntu Noble. --- pkg/rules/packages-to-build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/rules/packages-to-build.yml b/pkg/rules/packages-to-build.yml index dc61f157d..a14bfe585 100644 --- a/pkg/rules/packages-to-build.yml +++ b/pkg/rules/packages-to-build.yml @@ -38,6 +38,11 @@ include: systemd_service_unit_file: pkg/common/cascade.s* rpm_rpmlint_check_filters: bad-manual-page-folder + # Lintian is wrong on Ubuntu Noble to require --home when invoking adduser with --system. + # See: https://lists.debian.org/debian-lint-maint/2025/08/msg00042.html + - image: 'ubuntu:noble' + deb_extra_lintian_args: "--suppress-tags maintainer-script-lacks-home-in-adduser" + # 'mode' is not used by the package building workflow job, but is used by the package testing workflow job. # Ploutos will not include this key when using this matrix definition to generate package building matrix # permutations but will use it when generating package testing permutations. From ff9665c61d8513f5fd38040732311561695a1d82 Mon Sep 17 00:00:00 2001 From: Ximon Eighteen <3304436+ximon18@users.noreply.github.com> Date: Wed, 26 Aug 2026 13:12:26 +0200 Subject: [PATCH 4/6] Bookworm too. --- pkg/rules/packages-to-build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/rules/packages-to-build.yml b/pkg/rules/packages-to-build.yml index a14bfe585..1f483b92d 100644 --- a/pkg/rules/packages-to-build.yml +++ b/pkg/rules/packages-to-build.yml @@ -38,10 +38,13 @@ include: systemd_service_unit_file: pkg/common/cascade.s* rpm_rpmlint_check_filters: bad-manual-page-folder - # Lintian is wrong on Ubuntu Noble to require --home when invoking adduser with --system. + # Lintian is wrong on Ubuntu Noble and Debian Bookworm to require --home when invoking adduser with --system. # See: https://lists.debian.org/debian-lint-maint/2025/08/msg00042.html + - image: 'debian:bookworm' + deb_extra_lintian_args: "--suppress-tags maintainer-script-lacks-home-in-adduser" + - image: 'ubuntu:noble' - deb_extra_lintian_args: "--suppress-tags maintainer-script-lacks-home-in-adduser" + deb_extra_lintian_args: "--suppress-tags maintainer-script-lacks-home-in-adduser" # 'mode' is not used by the package building workflow job, but is used by the package testing workflow job. # Ploutos will not include this key when using this matrix definition to generate package building matrix From 88c311db41e0ad284b647a15b5b1f31abf17606c Mon Sep 17 00:00:00 2001 From: Ximon Eighteen <3304436+ximon18@users.noreply.github.com> Date: Wed, 26 Aug 2026 13:20:51 +0200 Subject: [PATCH 5/6] Lintian can't handle selective invocation of adduser. It just sees that, irrespective of script logic, there is an "illegal" invocation of adduser without --home. So instead always specify the home directory explicitly using the modern default value. --- pkg/debian/postinst | 29 +++++++++-------------------- pkg/rules/packages-to-build.yml | 8 -------- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/pkg/debian/postinst b/pkg/debian/postinst index c93adefc1..52030400c 100755 --- a/pkg/debian/postinst +++ b/pkg/debian/postinst @@ -5,26 +5,15 @@ USER_ID="cascade" create_user() { if id ${USER_ID} > /dev/null 2>&1; then return; fi - # Set the VERSION_CODENAME environment variable that describes which O/S - # version we are running on. - . /etc/os-release - - case ${VERSION_CODENAME} in - bullseye|jammy) - # Newer versions of Debian/Ubuntu use /nonexistent as the home - # directory by default, and don't actually create it. However, - # the version of Lintian in these older Debian/Ubuntu versions - # requires --home to be specified when calling adduser with - # --system so we explicitly set home to /nonexistent in these - # cases. The older O/S versions that don't default --home include - # that we package Cascade for include Debian Bullseye and Ubuntu - # Jammy so these are the versions we handle separately. - adduser --system --group ${USER_ID} --home /nonexistent - ;; - *) - adduser --system --group ${USER_ID} - ;; - esac + # Newer versions of Debian/Ubuntu adduser use /nonexistent as the home + # directory by default, and don't actually create it. However, the version + # of Lintian in these older Debian/Ubuntu versions requires --home to be + # specified when calling adduser with --system so we explicitly set home + # to /nonexistent to prevent Lintian complaining in the newer O/S versions + # and to prevent adduser failing due to the missing argument/to have + # consistent behaviour in the case of the older O/S versions. + # See: https://lists.debian.org/debian-lint-maint/2025/08/msg00042.html + adduser --system --group ${USER_ID} --home /nonexistent } case "$1" in diff --git a/pkg/rules/packages-to-build.yml b/pkg/rules/packages-to-build.yml index 1f483b92d..dc61f157d 100644 --- a/pkg/rules/packages-to-build.yml +++ b/pkg/rules/packages-to-build.yml @@ -38,14 +38,6 @@ include: systemd_service_unit_file: pkg/common/cascade.s* rpm_rpmlint_check_filters: bad-manual-page-folder - # Lintian is wrong on Ubuntu Noble and Debian Bookworm to require --home when invoking adduser with --system. - # See: https://lists.debian.org/debian-lint-maint/2025/08/msg00042.html - - image: 'debian:bookworm' - deb_extra_lintian_args: "--suppress-tags maintainer-script-lacks-home-in-adduser" - - - image: 'ubuntu:noble' - deb_extra_lintian_args: "--suppress-tags maintainer-script-lacks-home-in-adduser" - # 'mode' is not used by the package building workflow job, but is used by the package testing workflow job. # Ploutos will not include this key when using this matrix definition to generate package building matrix # permutations but will use it when generating package testing permutations. From 621bd8faa9ba34cb3e8eda9b9f0ef20a494b2c02 Mon Sep 17 00:00:00 2001 From: Ximon Eighteen <3304436+ximon18@users.noreply.github.com> Date: Wed, 26 Aug 2026 13:29:34 +0200 Subject: [PATCH 6/6] Be explicit that we don't actually want a home directory. --- pkg/debian/postinst | 2 +- pkg/rpm/scriptlets.toml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/debian/postinst b/pkg/debian/postinst index 52030400c..d36330164 100755 --- a/pkg/debian/postinst +++ b/pkg/debian/postinst @@ -13,7 +13,7 @@ create_user() { # and to prevent adduser failing due to the missing argument/to have # consistent behaviour in the case of the older O/S versions. # See: https://lists.debian.org/debian-lint-maint/2025/08/msg00042.html - adduser --system --group ${USER_ID} --home /nonexistent + adduser --system --group ${USER_ID} --home /nonexistent --no-create-home } case "$1" in diff --git a/pkg/rpm/scriptlets.toml b/pkg/rpm/scriptlets.toml index f2f3311ad..233721128 100644 --- a/pkg/rpm/scriptlets.toml +++ b/pkg/rpm/scriptlets.toml @@ -14,7 +14,8 @@ if [ $1 -eq 1 ] ; then if ! id ${USER_ID} > /dev/null 2>&1; then # According to the CentOS 7 useradd man page: # --user-group causes a group by the same name as the user to be created - useradd --system --user-group ${USER_ID} + # -M prevents the creation of a home directory for the user. + useradd --system --user-group ${USER_ID} -M fi mkdir -p /etc/cascade/policies