add Debian packaging and repository infrastructure
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

This commit is contained in:
robojerk 2025-08-03 23:38:25 +00:00
parent b88f1af666
commit 16bfc027bf
12 changed files with 639 additions and 4 deletions

18
debian/changelog vendored Normal file
View file

@ -0,0 +1,18 @@
deb-mock (0.1.0-1) unstable; urgency=medium
* Initial release
* Debian package build environment manager
* Direct functional replacement for Fedora's Mock
* Features:
- Isolated chroot environments for package building
- Multi-package chain building support
- Build metadata capture and storage
- Reproducible build enforcement
- Core configurations for popular distributions
- Plugin system for extensibility
- Package management within chroots
- Advanced build options and debugging tools
* CI/CD integration with Forgejo Actions
* Comprehensive test suite with 30 tests
-- Deb-Mock Team <deb-mock@raines.xyz> Wed, 22 Jan 2025 12:00:00 +0000

1
debian/compat vendored Normal file
View file

@ -0,0 +1 @@
13

31
debian/control vendored Normal file
View file

@ -0,0 +1,31 @@
Source: deb-mock
Section: devel
Priority: optional
Maintainer: Deb-Mock Team <deb-mock@raines.xyz>
Build-Depends: debhelper-compat (= 13), dh-python, python3-all, python3-setuptools
Standards-Version: 4.6.2
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
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
Description: Debian package build environment manager
Deb-Mock is a low-level utility to create clean, isolated build environments
for single Debian packages. This tool is a direct functional replacement for
Fedora's Mock, adapted specifically for Debian-based ecosystems.
.
Features include:
* Isolated chroot environments for package building
* Multi-package chain building support
* Build metadata capture and storage
* Reproducible build enforcement
* Core configurations for popular distributions
* Plugin system for extensibility
* Package management within chroots
* Advanced build options and debugging tools
.
This tool is designed for developers, packagers, and CI/CD systems that need
reliable, isolated environments for building Debian packages.

45
debian/copyright vendored Normal file
View file

@ -0,0 +1,45 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: deb-mock
Source: https://git.raines.xyz/robojerk/deb-mock
Files: *
Copyright: 2025 Deb-Mock Team <deb-mock@raines.xyz>
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Files: debian/*
Copyright: 2025 Deb-Mock Team <deb-mock@raines.xyz>
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

27
debian/postinst vendored Executable file
View file

@ -0,0 +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
# 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>"

14
debian/prerm vendored Executable file
View file

@ -0,0 +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 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

17
debian/rules vendored Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/make -f
%:
dh $@ --with python3
override_dh_auto_install:
dh_auto_install
# 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
override_dh_python3:
dh_python3 --no-pycentral