27 lines
No EOL
776 B
Bash
Executable file
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>" |