Fix multi-package build: Rename packages to match source name
Some checks failed
Comprehensive CI/CD Pipeline / Build and Test (push) Failing after 1m32s
Comprehensive CI/CD Pipeline / Security Audit (push) Successful in 42s
Comprehensive CI/CD Pipeline / Package Validation (push) Successful in 59s
Comprehensive CI/CD Pipeline / Status Report (push) Has been skipped
Some checks failed
Comprehensive CI/CD Pipeline / Build and Test (push) Failing after 1m32s
Comprehensive CI/CD Pipeline / Security Audit (push) Successful in 42s
Comprehensive CI/CD Pipeline / Package Validation (push) Successful in 59s
Comprehensive CI/CD Pipeline / Status Report (push) Has been skipped
- Rename all packages from 'deb-mock-*' to 'mock-*' to match source name 'mock' - Update debian/control package definitions and dependencies - Rename .install files to match new package names - Update CI workflow to look for 'mock_*.deb' instead of 'deb-mock_*.deb' This fixes the core issue where only 1 package was being built instead of 6. The Debian build system now correctly recognizes all 6 packages: - mock (main package) - mock-cache (cache utilities) - mock-configs (configuration files) - mock-dev (development tools) - mock-filesystem (filesystem layout) - mock-plugins (plugin system) All 6 packages now build successfully locally and should work in CI.
This commit is contained in:
parent
70df200863
commit
811b639407
148 changed files with 3209 additions and 19 deletions
1
debian/mock/DEBIAN/conffiles
vendored
Normal file
1
debian/mock/DEBIAN/conffiles
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/deb-mock/config.yaml
|
||||
27
debian/mock/DEBIAN/control
vendored
Normal file
27
debian/mock/DEBIAN/control
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
Package: mock
|
||||
Version: 0.1.0-1
|
||||
Architecture: all
|
||||
Maintainer: Deb-Mock Team <deb-mock@raines.xyz>
|
||||
Installed-Size: 444
|
||||
Depends: python3:any, python3-click (>= 8.0.0), python3-yaml (>= 6.0), python3-jinja2 (>= 3.0.0), python3-requests (>= 2.25.0), python3-psutil (>= 5.8.0), sbuild, schroot, debootstrap, systemd-container, mock-filesystem, mock-configs
|
||||
Recommends: mock-plugins, ccache, python3-pytest, python3-pytest-cov
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Homepage: https://git.raines.xyz/robojerk/deb-mock
|
||||
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.
|
||||
33
debian/mock/DEBIAN/md5sums
vendored
Normal file
33
debian/mock/DEBIAN/md5sums
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
1be4cd929735fed97d2480393b64bebf usr/bin/mock
|
||||
69eaf685cade56df0fb31bb97610dda4 usr/lib/python3/dist-packages/deb_mock/__init__.py
|
||||
9c037352dcde0f707732ca8cf2151255 usr/lib/python3/dist-packages/deb_mock/api.py
|
||||
c78f86fd5308a4d81f6036fc0afd00d7 usr/lib/python3/dist-packages/deb_mock/benchmarking.py
|
||||
351dc51574a5284324382736e7fa0d37 usr/lib/python3/dist-packages/deb_mock/cache.py
|
||||
a57e2a4384d8256c29948cd72962ced2 usr/lib/python3/dist-packages/deb_mock/chroot.py
|
||||
7adb1889863eef143356544d25470a67 usr/lib/python3/dist-packages/deb_mock/cli.py
|
||||
074c4e2a384c32764681443847c243b8 usr/lib/python3/dist-packages/deb_mock/config.py
|
||||
7f73e949ec4e65dbae7fb6db6f2525c8 usr/lib/python3/dist-packages/deb_mock/configs/__init__.py
|
||||
6fbcd9334f6d0b934875f739c0f2252d usr/lib/python3/dist-packages/deb_mock/configs/debian-bookworm-amd64.yaml
|
||||
a28570c0bbf8603381aa394af6e7acf0 usr/lib/python3/dist-packages/deb_mock/configs/debian-sid-amd64.yaml
|
||||
b39f830ef9ecff0107d0dc4449cb0675 usr/lib/python3/dist-packages/deb_mock/configs/debian-trixie-amd64.yaml
|
||||
24d888bad86e9f74d3406b8ae2a1182c usr/lib/python3/dist-packages/deb_mock/configs/ubuntu-jammy-amd64.yaml
|
||||
0ccf439247ced5fc7509a401ae8d2898 usr/lib/python3/dist-packages/deb_mock/configs/ubuntu-noble-amd64.yaml
|
||||
18df474129eaa591fe13c55722fb583d usr/lib/python3/dist-packages/deb_mock/core.py
|
||||
8827c56a005baa9c80caf9701bc80ca6 usr/lib/python3/dist-packages/deb_mock/environment_manager.py
|
||||
b8e195d86f3e85d28901486a361a6b3c usr/lib/python3/dist-packages/deb_mock/exceptions.py
|
||||
9aed2d8734757cf076f785e3c5c61e90 usr/lib/python3/dist-packages/deb_mock/metadata.py
|
||||
b8b0be1770fce5cf707dc743b9ed8bed usr/lib/python3/dist-packages/deb_mock/performance.py
|
||||
762306194ff291ddffb360b3231a54c9 usr/lib/python3/dist-packages/deb_mock/plugin.py
|
||||
935e0fdb8c0984c307054aa9f9678e51 usr/lib/python3/dist-packages/deb_mock/plugins/__init__.py
|
||||
7cd95eabffba99eef3c7519671a47d48 usr/lib/python3/dist-packages/deb_mock/plugins/base.py
|
||||
00c95714409f0a5f2642d35e3e663833 usr/lib/python3/dist-packages/deb_mock/plugins/bind_mount.py
|
||||
8fb789cbe00c162f59cf8f77d9fe764f usr/lib/python3/dist-packages/deb_mock/plugins/compress_logs.py
|
||||
db2e92254fe7a264ca1847be35027117 usr/lib/python3/dist-packages/deb_mock/plugins/example_plugin.py
|
||||
90a494ef3a475ebbe374eeb2ebdfb50e usr/lib/python3/dist-packages/deb_mock/plugins/hook_manager.py
|
||||
f6209005cd825fb375e1d6e33eba33bc usr/lib/python3/dist-packages/deb_mock/plugins/registry.py
|
||||
1927571e9253a047e2ad0d6e54eca243 usr/lib/python3/dist-packages/deb_mock/plugins/root_cache.py
|
||||
67940e00d949efea9617187a117e3734 usr/lib/python3/dist-packages/deb_mock/plugins/tmpfs.py
|
||||
8ab121204ada12a9de6ac47c856efa84 usr/lib/python3/dist-packages/deb_mock/sbuild.py
|
||||
180f9991c5e35dbd9b245f7061de88be usr/lib/python3/dist-packages/deb_mock/uid_manager.py
|
||||
d1ae06c2c12f7e3680f330d78fc2780d usr/share/doc/mock/changelog.Debian.gz
|
||||
6e33bbc8d1428859f9f8b39c0e5d6010 usr/share/doc/mock/copyright
|
||||
27
debian/mock/DEBIAN/postinst
vendored
Executable file
27
debian/mock/DEBIAN/postinst
vendored
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# 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/mock/chroots
|
||||
chmod 755 /var/lib/mock/chroots
|
||||
chown root:root /var/cache/mock
|
||||
chmod 755 /var/cache/mock
|
||||
|
||||
# Create mock group if it doesn't exist
|
||||
if ! getent group mock >/dev/null 2>&1; then
|
||||
addgroup --system mock
|
||||
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 "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>"
|
||||
14
debian/mock/DEBIAN/prerm
vendored
Executable file
14
debian/mock/DEBIAN/prerm
vendored
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Remove users from mock group
|
||||
if getent passwd build >/dev/null 2>&1; then
|
||||
gpasswd -d build mock || true
|
||||
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
|
||||
117
debian/mock/etc/deb-mock/config.yaml
vendored
Normal file
117
debian/mock/etc/deb-mock/config.yaml
vendored
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
# deb-mock configuration file
|
||||
# Debian's equivalent to Fedora's Mock build environment manager
|
||||
|
||||
# Global configuration
|
||||
global:
|
||||
basedir: "/var/lib/deb-mock"
|
||||
rootdir: "/var/lib/deb-mock/chroots"
|
||||
resultdir: "/var/lib/deb-mock/results"
|
||||
cache_dir: "/var/cache/deb-mock"
|
||||
log_dir: "/var/log/deb-mock"
|
||||
|
||||
# Default chroot configuration
|
||||
defaults:
|
||||
distribution: "bookworm"
|
||||
architecture: "amd64"
|
||||
mirror: "http://deb.debian.org/debian"
|
||||
security_mirror: "http://deb.debian.org/debian-security"
|
||||
updates_mirror: "http://deb.debian.org/debian"
|
||||
|
||||
# Package installation
|
||||
install_packages:
|
||||
- "build-essential"
|
||||
- "fakeroot"
|
||||
- "devscripts"
|
||||
- "debhelper"
|
||||
- "dh-make"
|
||||
- "sbuild"
|
||||
- "schroot"
|
||||
|
||||
# Build dependencies
|
||||
build_dependencies:
|
||||
- "build-essential"
|
||||
- "fakeroot"
|
||||
- "devscripts"
|
||||
- "debhelper"
|
||||
- "dh-make"
|
||||
|
||||
# Chroot profiles
|
||||
profiles:
|
||||
bookworm-amd64:
|
||||
distribution: "bookworm"
|
||||
architecture: "amd64"
|
||||
mirror: "http://deb.debian.org/debian"
|
||||
security_mirror: "http://deb.debian.org/debian-security"
|
||||
updates_mirror: "http://deb.debian.org/debian"
|
||||
components: ["main", "contrib", "non-free"]
|
||||
|
||||
bookworm-arm64:
|
||||
distribution: "bookworm"
|
||||
architecture: "arm64"
|
||||
mirror: "http://deb.debian.org/debian"
|
||||
security_mirror: "http://deb.debian.org/debian-security"
|
||||
updates_mirror: "http://deb.debian.org/debian"
|
||||
components: ["main", "contrib", "non-free"]
|
||||
|
||||
sid-amd64:
|
||||
distribution: "sid"
|
||||
architecture: "amd64"
|
||||
mirror: "http://deb.debian.org/debian"
|
||||
components: ["main", "contrib", "non-free"]
|
||||
|
||||
# Plugin configuration
|
||||
plugins:
|
||||
mount:
|
||||
enabled: true
|
||||
mount_points:
|
||||
- source: "/proc"
|
||||
target: "/proc"
|
||||
type: "proc"
|
||||
- source: "/sys"
|
||||
target: "/sys"
|
||||
type: "sysfs"
|
||||
- source: "/dev"
|
||||
target: "/dev"
|
||||
type: "bind"
|
||||
|
||||
cache:
|
||||
enabled: true
|
||||
root_cache: true
|
||||
package_cache: true
|
||||
build_cache: true
|
||||
|
||||
security:
|
||||
enabled: true
|
||||
user_isolation: true
|
||||
network_isolation: true
|
||||
resource_limits: true
|
||||
|
||||
# Integration settings
|
||||
integration:
|
||||
deb_orchestrator_url: "http://localhost:8080"
|
||||
deb_compose_url: "http://localhost:8080"
|
||||
|
||||
# Build tools
|
||||
sbuild_path: "/usr/bin/sbuild"
|
||||
schroot_path: "/usr/bin/schroot"
|
||||
debootstrap_path: "/usr/sbin/debootstrap"
|
||||
|
||||
# Package managers
|
||||
apt_path: "/usr/bin/apt"
|
||||
dpkg_path: "/usr/bin/dpkg"
|
||||
|
||||
# Logging configuration
|
||||
logging:
|
||||
level: "INFO"
|
||||
format: "text"
|
||||
file: "/var/log/deb-mock/deb-mock.log"
|
||||
max_size: "100MB"
|
||||
max_files: 5
|
||||
|
||||
# Performance settings
|
||||
performance:
|
||||
parallel_downloads: 4
|
||||
max_retries: 3
|
||||
timeout: 3600
|
||||
memory_limit: "2G"
|
||||
disk_limit: "10G"
|
||||
27
debian/mock/usr/bin/mock
vendored
Executable file
27
debian/mock/usr/bin/mock
vendored
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#! /usr/bin/python3
|
||||
"""
|
||||
mock - Debian package build environment manager
|
||||
Main executable entry point
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add the deb_mock module to the Python path
|
||||
sys.path.insert(0, '/usr/lib/python3/dist-packages')
|
||||
sys.path.insert(0, '/home/joe/.local/lib/python3.13/site-packages')
|
||||
|
||||
# Also add current directory for development
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
project_root = os.path.dirname(current_dir)
|
||||
sys.path.insert(0, project_root)
|
||||
|
||||
try:
|
||||
from deb_mock.cli import main
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
except ImportError as e:
|
||||
print(f"Error importing deb_mock: {e}")
|
||||
print("Please ensure mock is properly installed")
|
||||
print("You can also run: python3 -m deb_mock.cli")
|
||||
sys.exit(1)
|
||||
45
debian/mock/usr/share/doc/mock/copyright
vendored
Normal file
45
debian/mock/usr/share/doc/mock/copyright
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: mock
|
||||
Source: https://git.raines.xyz/robojerk/deb-mock
|
||||
|
||||
Files: *
|
||||
Copyright: 2025 Mock Team <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 Mock Team <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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue