deb-mock/debian/postinst
robojerk 16bfc027bf
Some checks failed
Build and Publish Debian Package / build-deb (push) Failing after 1m33s
Build Deb-Mock Package / build (push) Successful in 1m22s
Test Deb-Mock Build / test (push) Failing after 50s
add Debian packaging and repository infrastructure
2025-08-03 23:38:25 +00:00

27 lines
No EOL
776 B
Bash
Executable file

#!/bin/sh
set -e
# Create necessary directories
mkdir -p /var/lib/deb-mock/chroots
mkdir -p /var/cache/deb-mock
mkdir -p /etc/schroot/chroot.d
# Set proper permissions
chown root:root /var/lib/deb-mock/chroots
chmod 755 /var/lib/deb-mock/chroots
chown root:root /var/cache/deb-mock
chmod 755 /var/cache/deb-mock
# Create deb-mock group if it doesn't exist
if ! getent group deb-mock >/dev/null 2>&1; then
addgroup --system deb-mock
fi
# Add users to deb-mock group if they exist
if getent passwd build >/dev/null 2>&1; then
usermod -a -G deb-mock build || true
fi
echo "deb-mock package installed successfully."
echo "Users in the 'deb-mock' group can use deb-mock without sudo."
echo "To add a user to the deb-mock group: sudo usermod -a -G deb-mock <username>"