diff --git a/docs/deb-mock-integration-status.md b/docs/deb-mock-integration-status.md index d5bbf109..86f6b8ea 100644 --- a/docs/deb-mock-integration-status.md +++ b/docs/deb-mock-integration-status.md @@ -1,13 +1,13 @@ -# deb-mock Integration Status for debian-forge +# Mock Integration Status for debian-forge ## 🎯 **Overview** -The integration between `debian-forge` and `deb-mock` has been successfully implemented and tested. While the `deb-mock` packages have a dependency issue in the current repository, our integration code is **production-ready** and will work seamlessly once the packaging issue is resolved. +The integration between `debian-forge` and `mock` (formerly `deb-mock`) has been successfully implemented and tested. While the `mock` packages have a dependency issue in the current repository, our integration code is **production-ready** and will work seamlessly once the packaging issue is resolved. ## 📊 **Current Status** ### **✅ COMPLETED - Integration Implementation** -- **Mock Stage Implementation** - Complete `org.osbuild.deb-mock` stage +- **Mock Stage Implementation** - Complete `org.osbuild.mock` stage - **APT Mock Integration** - `org.osbuild.apt.mock` stage for APT operations within mock - **Environment Management** - Mock environment lifecycle management - **Testing Framework** - Comprehensive test suite with 100% pass rate diff --git a/scripts/test-mock-integration.sh b/scripts/test-mock-integration.sh index 79c68a82..3c0e48ff 100755 --- a/scripts/test-mock-integration.sh +++ b/scripts/test-mock-integration.sh @@ -1,6 +1,6 @@ #!/bin/bash # Mock Integration Test Script for debian-forge -# Tests the deb-mock integration functionality +# Tests the mock integration functionality set -e @@ -70,15 +70,15 @@ run_test() { fi } -# Function to check if deb-mock is available -check_deb_mock() { - print_status "INFO" "Checking deb-mock availability..." +# Function to check if mock is available +check_mock() { + print_status "INFO" "Checking mock availability..." - if python3 -c "import deb_mock" 2>/dev/null; then - print_status "SUCCESS" "deb-mock is available" + if python3 -c "import mock" 2>/dev/null; then + print_status "SUCCESS" "mock is available" return 0 else - print_status "WARNING" "deb-mock is not available - some tests will be skipped" + print_status "WARNING" "mock is not available - some tests will be skipped" return 1 fi } @@ -131,8 +131,8 @@ test_mock_stage_compilation() { # Function to test mock stage basic functionality test_mock_stage_basic() { - if ! check_deb_mock; then - print_status "WARNING" "Skipping mock stage tests - deb-mock not available" + if ! check_mock; then + print_status "WARNING" "Skipping mock stage tests - mock not available" return 0 fi @@ -158,8 +158,8 @@ test_manifest_validation() { # Function to test mock integration with osbuild test_osbuild_integration() { - if ! check_deb_mock; then - print_status "WARNING" "Skipping osbuild integration tests - deb-mock not available" + if ! check_mock; then + print_status "WARNING" "Skipping osbuild integration tests - mock not available" return 0 fi @@ -171,8 +171,8 @@ test_osbuild_integration() { # Function to test mock environment management test_mock_environment_management() { - if ! check_deb_mock; then - print_status "WARNING" "Skipping mock environment tests - deb-mock not available" + if ! check_mock; then + print_status "WARNING" "Skipping mock environment tests - mock not available" return 0 fi @@ -190,8 +190,8 @@ test_mock_environment_management() { # Function to test mock file operations test_mock_file_operations() { - if ! check_deb_mock; then - print_status "WARNING" "Skipping mock file operation tests - deb-mock not available" + if ! check_mock; then + print_status "WARNING" "Skipping mock file operation tests - mock not available" return 0 fi @@ -212,8 +212,8 @@ test_mock_file_operations() { # Function to test mock command execution test_mock_command_execution() { - if ! check_deb_mock; then - print_status "WARNING" "Skipping mock command execution tests - deb-mock not available" + if ! check_mock; then + print_status "WARNING" "Skipping mock command execution tests - mock not available" return 0 fi diff --git a/stages/org.osbuild.apt.mock.py b/stages/org.osbuild.apt.mock.py index 4ee4d8de..ad7e9597 100644 --- a/stages/org.osbuild.apt.mock.py +++ b/stages/org.osbuild.apt.mock.py @@ -33,11 +33,11 @@ def main(tree, options): with enhanced isolation and reproducibility. """ try: - # Import deb-mock API + # Import mock API try: - from deb_mock import create_client, MockConfigBuilder, MockAPIClient + from mock import create_client, MockConfigBuilder, MockAPIClient except ImportError: - raise RuntimeError("deb-mock package not available. Please install deb-mock first.") + raise RuntimeError("mock package not available. Please install mock first.") # Parse options mock_options = options.get('mock_options', {}) diff --git a/stages/org.osbuild.deb-mock.py b/stages/org.osbuild.deb-mock.py index 39dccb56..6469e4a3 100644 --- a/stages/org.osbuild.deb-mock.py +++ b/stages/org.osbuild.deb-mock.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 """ -Debian Mock Integration Stage for debian-forge +Mock Integration Stage for debian-forge -This stage provides integration with deb-mock for enhanced build isolation +This stage provides integration with mock (formerly deb-mock) for enhanced build isolation and reproducibility. It allows osbuild stages to run within mock chroot environments for better isolation and consistent builds. @@ -35,11 +35,11 @@ def main(tree, options): proper isolation and caching. """ try: - # Import deb-mock API + # Import mock API try: - from deb_mock import create_client, MockConfigBuilder, MockAPIClient + from mock import create_client, MockConfigBuilder, MockAPIClient except ImportError: - raise RuntimeError("deb-mock package not available. Please install deb-mock first.") + raise RuntimeError("mock package not available. Please install mock first.") # Parse options mock_options = options.get('mock_options', {})