Skip to content

Commit 74cf4ae

Browse files
committed
Merge branch 'master' into arraybolt3/trixie
2 parents 6ba62c6 + 7d5fff8 commit 74cf4ae

File tree

6 files changed

+86
-21
lines changed

6 files changed

+86
-21
lines changed

changelog.upstream

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
1+
commit 09a9ca3335066150caf9bbf0749b410016b7f68c
2+
Author: Patrick Schleizer <[email protected]>
3+
Date: Fri Nov 14 01:40:19 2025 -0500
4+
5+
build
6+
7+
commit 18f4fd0f275734040b5dafe83b810b29f2fccae0
8+
Author: Patrick Schleizer <[email protected]>
9+
Date: Fri Nov 14 01:39:36 2025 -0500
10+
11+
sanity test
12+
13+
commit 0e06495156ddb350ad5d602e8ca95d68e04d6aaf
14+
Author: Patrick Schleizer <[email protected]>
15+
Date: Fri Nov 14 01:34:43 2025 -0500
16+
17+
sanity test
18+
19+
commit ff05a6c1fc8f8f0afcdb1762200fa2bcf2316173
20+
Author: Patrick Schleizer <[email protected]>
21+
Date: Fri Nov 14 06:23:23 2025 +0000
22+
23+
bumped changelog version
24+
25+
commit 9a77741140d0e3691c8323658de3205a5a1ef7ce
26+
Author: Patrick Schleizer <[email protected]>
27+
Date: Fri Nov 14 00:55:09 2025 -0500
28+
29+
refactoring
30+
31+
commit b4ec9848808289576a36204346014c3cf869d212
32+
Author: Patrick Schleizer <[email protected]>
33+
Date: Fri Nov 14 00:52:03 2025 -0500
34+
35+
build
36+
37+
commit a340d35cdc895afa0df32757f37db1530fdad8dc
38+
Author: Patrick Schleizer <[email protected]>
39+
Date: Fri Nov 14 00:51:37 2025 -0500
40+
41+
refactoring
42+
43+
commit db7ca3f878a92e0d795f249e89a97a312373b07d
44+
Author: Patrick Schleizer <[email protected]>
45+
Date: Thu Nov 13 12:20:23 2025 +0000
46+
47+
bumped changelog version
48+
149
commit 02f6353ee46b7bdde15f1cd19211b5cdd8a138e6
250
Author: Patrick Schleizer <[email protected]>
351
Date: Thu Nov 13 07:19:04 2025 -0500

debian/changelog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
usability-misc (3:33.5-1) unstable; urgency=medium
2+
3+
* New upstream version (local package).
4+
5+
-- Patrick Schleizer <[email protected]> Fri, 14 Nov 2025 06:56:52 +0000
6+
7+
usability-misc (3:33.4-1) unstable; urgency=medium
8+
9+
* New upstream version (local package).
10+
11+
-- Patrick Schleizer <[email protected]> Fri, 14 Nov 2025 06:23:23 +0000
12+
113
usability-misc (3:33.3-1) unstable; urgency=medium
214

315
* New upstream version (local package).

testscript

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44

55
source usr/bin/dist-installer-cli
66

7-
target_user=root
7+
set_target_user_account root
88

99
test_file -f /etc/hostname
1010
test_file -d /
@@ -17,3 +17,8 @@ if ! test_file -f /nonexisting; then
1717
else
1818
exit 1
1919
fi
20+
21+
test_run_as_target_user
22+
23+
true "$0: END"
24+

usr/bin/dist-installer-cli

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ source /usr/libexec/helper-scripts/wc-test.sh
197197
# shellcheck source=../../../helper-scripts/usr/libexec/helper-scripts/get_colors.sh
198198
source /usr/libexec/helper-scripts/get_colors.sh
199199

200-
# shellcheck source=../../../helper-scripts/usr/libexec/helper-scripts/package_installed_check.bsh
201-
source /usr/libexec/helper-scripts/package_installed_check.bsh
200+
# shellcheck source=../../../helper-scripts/usr/libexec/helper-scripts/package_installed_check.sh
201+
source /usr/libexec/helper-scripts/package_installed_check.sh
202202

203203
########################
204204
## END DEFAULT VALUES ##
@@ -4059,6 +4059,10 @@ set_default() {
40594059
set_target_user_account() {
40604060
target_user="${1:-}"
40614061

4062+
if ! id --user -- "${target_user}" >/dev/null; then
4063+
die 1 "target_user '${target_user}' does not exist!"
4064+
fi
4065+
40624066
if [ "${sucmd}" != 'sudo' ]; then
40634067
log warn "Privilege escalation utilities other than 'sudo' for installing to an alternate user account or running under account 'sysmaint' is untested."
40644068
fi

usr/libexec/usability-misc/avoid-needless-polkit-agent

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ set -o nounset
88
set -o errtrace
99
set -o pipefail
1010

11-
source /usr/libexec/helper-scripts/package_installed_check.bsh
12-
13-
if ! pkg_installed user-sysmaint-split ; then
11+
if ! package-installed-check user-sysmaint-split ; then
1412
exit 0
1513
fi
1614

usr/share/usability-misc/dist-installer-cli-standalone

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ if test "${get_colors_sourced:-}" != "1"; then
256256
fi
257257
##### END pasted by build-dist-installer-cli from file /usr/libexec/helper-scripts/get_colors.sh
258258

259-
# shellcheck source=../../../helper-scripts/usr/libexec/helper-scripts/package_installed_check.bsh
260-
##### BEGIN pasted by build-dist-installer-cli from file /usr/libexec/helper-scripts/package_installed_check.bsh
261-
#!/bin/bash
259+
# shellcheck source=../../../helper-scripts/usr/libexec/helper-scripts/package_installed_check.sh
260+
##### BEGIN pasted by build-dist-installer-cli from file /usr/libexec/helper-scripts/package_installed_check.sh
261+
#!/bin/sh
262262

263263
## Copyright (C) 2025 - 2025 ENCRYPTED SUPPORT LLC <[email protected]>
264264
## See the file COPYING for copying conditions.
@@ -278,6 +278,7 @@ pkg_installed() {
278278
## install ok installed
279279

280280
requested_action=$(printf '%s' "$dpkg_query_output" | awk '{print $1}')
281+
# shellcheck disable=SC2034
281282
status=$(printf '%s' "$dpkg_query_output" | awk '{print $2}')
282283
# shellcheck disable=SC2034
283284
error_state=$(printf '%s' "$dpkg_query_output" | awk '{print $3}')
@@ -290,17 +291,7 @@ pkg_installed() {
290291
true "$0: INFO: $package_name is not installed, ok."
291292
return 1
292293
}
293-
294-
if [ "${BASH_SOURCE}" = "${0}" ]; then
295-
## Script was executed.
296-
## This is useful to allow non-Bash shell scripts to use this functionality.
297-
set -o errexit
298-
set -o nounset
299-
set -o errtrace
300-
set -o pipefail
301-
pkg_installed "$1"
302-
fi
303-
##### END pasted by build-dist-installer-cli from file /usr/libexec/helper-scripts/package_installed_check.bsh
294+
##### END pasted by build-dist-installer-cli from file /usr/libexec/helper-scripts/package_installed_check.sh
304295

305296
########################
306297
## END DEFAULT VALUES ##
@@ -462,7 +453,7 @@ test_run_as_target_user() {
462453
## root_output would catch xtrace and hence variable root_output would be non-empty.
463454
## Therefore disabling xtrace.
464455
disable_xtrace
465-
root_output="$(run_as_target_user timeout --kill-after 5 5 test -d /usr 2>&1)"
456+
xtrace_force_no_re_enable=true root_output="$(run_as_target_user timeout --kill-after 5 5 test -d /usr 2>&1)"
466457
re_enable_xtrace_maybe
467458
if test -n "${root_output}"; then
468459
die 1 "${underline}run_as_target_user:${nounderline} 'sudo -u ${target_user}' test produced unexpected output: '${root_output}'"
@@ -1029,6 +1020,9 @@ disable_xtrace() {
10291020
}
10301021

10311022
re_enable_xtrace_maybe() {
1023+
if [ "${xtrace_force_no_re_enable:-}" = "true" ]; then
1024+
return 0
1025+
fi
10321026
if test "${xtrace:-}" = "1"; then
10331027
set -o xtrace
10341028
fi
@@ -4891,6 +4885,10 @@ set_default() {
48914885
set_target_user_account() {
48924886
target_user="${1:-}"
48934887

4888+
if ! id --user -- "${target_user}" >/dev/null; then
4889+
die 1 "target_user '${target_user}' does not exist!"
4890+
fi
4891+
48944892
if [ "${sucmd}" != 'sudo' ]; then
48954893
log warn "Privilege escalation utilities other than 'sudo' for installing to an alternate user account or running under account 'sysmaint' is untested."
48964894
fi

0 commit comments

Comments
 (0)