pkexec around sbctl for out-of-the-box sudo-only operation
All checks were successful
PikaOS Package Build Only (amd64-v3) / build (push) Successful in 40s

This commit is contained in:
R L 2024-09-13 15:53:18 -07:00
parent a709dc352e
commit c9202a3b6f
Signed by: cybik
GPG Key ID: A6DD1646CC69863E
5 changed files with 15 additions and 5 deletions

View File

@ -1 +1 @@
13
15

View File

@ -36,7 +36,7 @@ jobs:
- name: Build Package
run: ./main.sh
#- uses: actions/upload-artifact@v3
# with:
# name: sbctl
# path: output/sbctl*.deb
- uses: actions/upload-artifact@v3
with:
name: sbctl
path: output/sbctl*.deb

6
debian/rules vendored
View File

@ -51,6 +51,12 @@ export PIKA_BUILD_ARCH = $(shell cat ../pika-build-arch)
#override_dh_clean:
# echo "disabled"
override_dh_auto_build:
dh_auto_build
mkdir -p "debian/sbctl/usr/bin"
cp -v "debian/sbctl-pkexec" "debian/sbctl/usr/bin/sbctl-pkexec"
chmod 0755 "debian/sbctl/usr/bin/sbctl-pkexec"
override_dh_usrlocal:
echo "disabled"

3
debian/sbctl-pkexec vendored Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
pkexec "/usr/sbin/sbctl" "$@"

View File

@ -17,6 +17,7 @@ cp -rvf ./debian ./${UPSTREAM_NAME}/
# easier than figuring out the right way to override the prefix in the makefile
sed -i "s/usr\/local/usr/" "${UPSTREAM_NAME}/Makefile"
sed -i "s/\$(PREFIX)\/bin/\$(PREFIX)\/sbin/" "${UPSTREAM_NAME}/Makefile"
# Get in there.
pushd "./${UPSTREAM_NAME}/" || exit 1