rename binary from deb-mock to mock - update package name, entry points, and all references
Some checks failed
Build Deb-Mock Package / build (push) Successful in 53s
Test Deb-Mock Build / test (push) Has been cancelled
Build and Publish Debian Package / build-deb (push) Failing after 2s
Release Deb-Mock / release (push) Successful in 59s

This commit is contained in:
robojerk 2025-08-04 01:18:18 +00:00
parent 20947d240e
commit b5eb266f80
8 changed files with 104 additions and 99 deletions

4
debian/control vendored
View file

@ -1,4 +1,4 @@
Source: deb-mock
Source: mock
Section: devel
Priority: optional
Maintainer: Deb-Mock Team <deb-mock@raines.xyz>
@ -8,7 +8,7 @@ Homepage: https://git.raines.xyz/robojerk/deb-mock
Vcs-Git: https://git.raines.xyz/robojerk/deb-mock.git
Vcs-Browser: https://git.raines.xyz/robojerk/deb-mock
Package: deb-mock
Package: mock
Architecture: all
Depends: ${python3:Depends}, ${misc:Depends}, python3-click (>= 8.0.0), python3-yaml (>= 6.0), python3-jinja2 (>= 3.0.0), python3-requests (>= 2.25.0), sbuild, schroot, debootstrap
Recommends: ccache, python3-pytest, python3-pytest-cov

40
debian/postinst vendored
View file

@ -1,27 +1,27 @@
#!/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
# Create necessary directories
mkdir -p /var/lib/mock/chroots
mkdir -p /var/cache/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
# Set proper permissions
chown root:root /var/lib/mock/chroots
chmod 755 /var/lib/mock/chroots
chown root:root /var/cache/mock
chmod 755 /var/cache/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
# Create mock group if it doesn't exist
if ! getent group mock >/dev/null 2>&1; then
addgroup --system 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
# Add users to mock group if they exist
if getent passwd build >/dev/null 2>&1; then
usermod -a -G 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>"
echo "mock package installed successfully."
echo "Users in the 'mock' group can use mock without sudo."
echo "To add a user to the mock group: sudo usermod -a -G mock <username>"

20
debian/prerm vendored
View file

@ -1,14 +1,14 @@
#!/bin/sh
set -e
# Remove users from deb-mock group
if getent passwd build >/dev/null 2>&1; then
gpasswd -d build deb-mock || true
fi
# Remove users from mock group
if getent passwd build >/dev/null 2>&1; then
gpasswd -d build mock || true
fi
# Remove deb-mock group if it's empty
if getent group deb-mock >/dev/null 2>&1; then
if [ $(getent group deb-mock | cut -d: -f4 | tr ',' '\n' | wc -l) -eq 0 ]; then
delgroup deb-mock || true
fi
fi
# Remove mock group if it's empty
if getent group mock >/dev/null 2>&1; then
if [ $(getent group mock | cut -d: -f4 | tr ',' '\n' | wc -l) -eq 0 ]; then
delgroup mock || true
fi
fi

22
debian/rules vendored
View file

@ -9,17 +9,17 @@ export PYBUILD_NAME=deb-mock
override_dh_auto_install:
dh_auto_install
# Create necessary directories
mkdir -p debian/deb-mock/usr/bin
mkdir -p debian/deb-mock/usr/share/deb-mock/configs
mkdir -p debian/deb-mock/usr/share/doc/deb-mock
# Install the deb-mock executable
install -D -m 755 deb_mock/cli.py debian/deb-mock/usr/bin/deb-mock
# Install configuration files
install -D -m 644 deb_mock/configs/*.yaml debian/deb-mock/usr/share/deb-mock/configs/
# Install documentation
install -D -m 644 README.md debian/deb-mock/usr/share/doc/deb-mock/README.md
install -D -m 644 docs/*.md debian/deb-mock/usr/share/doc/deb-mock/ 2>/dev/null || true
# Create necessary directories
mkdir -p debian/mock/usr/bin
mkdir -p debian/mock/usr/share/mock/configs
mkdir -p debian/mock/usr/share/doc/mock
# Install the mock executable
install -D -m 755 deb_mock/cli.py debian/mock/usr/bin/mock
# Install configuration files
install -D -m 644 deb_mock/configs/*.yaml debian/mock/usr/share/mock/configs/
# Install documentation
install -D -m 644 README.md debian/mock/usr/share/doc/mock/README.md
install -D -m 644 docs/*.md debian/mock/usr/share/doc/mock/ 2>/dev/null || true
override_dh_auto_test:
# Skip tests during package build - they're run in CI/CD