{"id":31040148,"url":"https://github.com/getpagespeed/debbuilder","last_synced_at":"2025-09-14T08:12:36.662Z","repository":{"id":306748381,"uuid":"1026822029","full_name":"GetPageSpeed/debbuilder","owner":"GetPageSpeed","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-28T05:56:40.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-29T04:49:58.019Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hub.docker.com/repository/docker/getpagespeed/debuilder/general","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GetPageSpeed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-26T17:25:05.000Z","updated_at":"2025-07-28T05:56:44.000Z","dependencies_parsed_at":"2025-07-27T12:09:16.675Z","dependency_job_id":"fa3bc626-c4ed-4c86-b940-9b84817706b1","html_url":"https://github.com/GetPageSpeed/debbuilder","commit_stats":null,"previous_names":["getpagespeed/debbuilder"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GetPageSpeed/debbuilder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetPageSpeed%2Fdebbuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetPageSpeed%2Fdebbuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetPageSpeed%2Fdebbuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetPageSpeed%2Fdebbuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GetPageSpeed","download_url":"https://codeload.github.com/GetPageSpeed/debbuilder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetPageSpeed%2Fdebbuilder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275076599,"owners_count":25401319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-14T08:12:35.305Z","updated_at":"2025-09-14T08:12:36.648Z","avatar_url":"https://github.com/GetPageSpeed.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"https://chatgpt.com/c/66eeef52-90fc-8011-8554-a025ed2c2438\n\n# DEB builder Docker images\n\nThis project provides Docker images for building Debian packages (.deb files) across different Ubuntu distributions. It's designed to be simple to use - just mount a directory containing a `debian` folder and get built .deb files as output.\n\n## Features\n\n- **Fast builds**: Optimized for quick package building with proper dependency handling\n- **Multiple Ubuntu versions**: Support for different Ubuntu releases (Focal, Noble, etc.)\n- **Simple usage**: Just mount your source directory and get .deb files as output\n- **Robust error handling**: Retry logic for network operations and better error reporting\n\n## Available versions\n\nCurrently supported Ubuntu versions:\n- `ubuntu/focal` - Ubuntu 20.04 LTS\n- `ubuntu/noble` - Ubuntu 24.04 LTS\n\n## Quick Start\n\n### 1. Build the Docker image\n\nFor Ubuntu Noble (24.04):\n```bash\ndocker build --tag debbuilder:ubuntu-noble ubuntu/noble\n```\n\n### 2. Build a package\n\nMount a directory containing your package source and get .deb files as output:\n\n```bash\n# Set up directories\nSOURCE_DIR=$(pwd)/your-package-source\nOUTPUT_DIR=$(pwd)/output\n\n# Create output directory\nmkdir -p ${OUTPUT_DIR}\n\n# Build the package\ndocker run -v ${SOURCE_DIR}:/sources -v ${OUTPUT_DIR}:/output debbuilder:ubuntu-noble\n```\n\nThe built .deb files will be available in `OUTPUT_DIR`.\n\n**Note**: The source directory should contain both your package directory (with the `debian` folder) and any original tarballs (`.orig.tar.gz` files) in the same directory structure.\n\n### 3. Example with test package\n\n```bash\n# Build the test hello package\nmkdir -p output\ndocker run -v $(pwd)/tests:/sources -v $(pwd)/output:/output debbuilder:ubuntu-noble\n```\n\n## Usage Options\n\n### Force rebuild\nTo force rebuild even if the package already exists in the repository:\n```bash\ndocker run -v ${SOURCE_DIR}:/sources -v ${OUTPUT_DIR}:/output debbuilder:ubuntu-noble --force\n```\n\n### Enable additional repositories\nTo enable additional APT repositories before building:\n```bash\ndocker run -v ${SOURCE_DIR}:/sources -v ${OUTPUT_DIR}:/output debbuilder:ubuntu-noble --enable-repos \"ppa:some-ppa/ppa\"\n```\n\n## Debugging\n\nFor interactive debugging, you can run the container with a bash shell:\n\n```bash\ndocker run --rm -it --entrypoint bash \\\n    -v ${SOURCE_DIR}:/sources \\\n    -v ${OUTPUT_DIR}:/output \\\n    debbuilder:ubuntu-noble\n```\n\nFrom within the container, you can run `build` to build packages or debug issues.\n\n## Volumes\n\nThe following volumes can be mounted from the host:\n\n| Volume | Description |\n|:-------|:------------|\n| `/sources` | Source directory containing the `debian` folder |\n| `/output` | Output directory where built .deb files are placed |\n\n## Package Structure\n\nYour source directory should contain:\n```\nyour-source-directory/\n├── your-package/\n│   ├── debian/\n│   │   ├── control\n│   │   ├── changelog\n│   │   ├── rules\n│   │   └── ...\n│   └── src/\n├── your-package_1.0.orig.tar.gz  # Original source tarball\n└── ...\n```\n\nThe build script will automatically find packages by looking for directories containing a `debian` folder.\n\n## Troubleshooting\n\n### Build takes too long\n- The first build may take longer due to package installation\n- Subsequent builds should be faster as dependencies are cached\n- Check your internet connection as the build process downloads packages\n\n### Missing dependencies\n- The build script automatically installs build dependencies using `mk-build-deps`\n- If you encounter dependency issues, check that your `debian/control` file has correct `Build-Depends` entries\n\n### Permission issues\n- The container runs as root, so output files will be owned by root\n- Use the `OUTPUT_UID` environment variable to change ownership if needed\n\n## GitHub Actions CI/CD\n\nThe project includes GitHub Actions workflows for automated multi-architecture Docker image building and testing.\n\n### Workflow Features\n\n- **Multi-architecture builds**: Automatically builds for both `linux/amd64` and `linux/arm64`\n- **Matrix builds**: Builds all supported Ubuntu and Debian versions in parallel\n- **Retry logic**: Robust retry mechanism for network-related build failures\n- **Automated testing**: Tests x86_64 builds after successful multi-architecture builds\n- **Scheduled builds**: Runs every 6 hours to ensure images stay up-to-date\n\n**Note**: The workflow builds multi-architecture images (x86_64 and ARM64) but tests only the x86_64 version to avoid emulation issues. The ARM64 images are built and pushed to Docker Hub but not tested in CI due to emulation limitations on GitHub Actions runners.\n\n### Configuration Files\n\n- **`.github/workflows/dockerbuild.yml`**: Main CI workflow\n- **`distro_versions.json`**: Matrix configuration for supported distributions\n- **`matrix.json`**: Detailed configuration for distributions and collections\n\n### Required Secrets\n\nSet these secrets in your GitHub repository settings:\n\n- `DOCKER_USER`: Docker Hub username\n- `DOCKER_PASS`: Docker Hub password/token\n\n### Matrix Configuration\n\nThe `distro_versions.json` file defines which distributions to build:\n\n```json\n{\n    \"include\": [\n        {\n            \"os\": \"ubuntu\",\n            \"version\": \"focal\"\n        },\n        {\n            \"os\": \"ubuntu\", \n            \"version\": \"jammy\"\n        },\n        {\n            \"os\": \"ubuntu\",\n            \"version\": \"noble\"\n        },\n        {\n            \"os\": \"debian\",\n            \"version\": \"bookworm\"\n        },\n        {\n            \"os\": \"debian\",\n            \"version\": \"trixie\"\n        }\n    ]\n}\n```\n\n### Adding New Versions\n\n1. **Add to `distro_versions.json`**:\n   ```json\n   {\n       \"os\": \"ubuntu\",\n       \"version\": \"kinetic\"\n   }\n   ```\n\n2. **Add to `defaults`**:\n   ```bash\n   echo \"ubuntu kinetic\" \u003e\u003e defaults\n   ```\n\n3. **Generate and test locally**:\n   ```bash\n   ./crypt-keeper.sh generate ubuntu kinetic\n   docker build --tag debbuilder:ubuntu-kinetic ubuntu/kinetic\n   ```\n\n4. **Commit and push**: The GitHub Actions will automatically build the new version.\n\n## Development\n\n### Adding new Ubuntu/Debian versions\n\n1. **Add the new version to `defaults`**:\n   ```bash\n   echo \"ubuntu kinetic\" \u003e\u003e defaults  # For Ubuntu 22.10\n   echo \"debian sid\" \u003e\u003e defaults      # For Debian unstable\n   ```\n\n2. **Generate the Dockerfile**:\n   ```bash\n   ./crypt-keeper.sh generate ubuntu kinetic\n   ./crypt-keeper.sh generate debian sid\n   ```\n\n3. **Build and test the image**:\n   ```bash\n   docker build --tag debbuilder:ubuntu-kinetic ubuntu/kinetic\n   docker run -v $(pwd)/tests:/sources -v $(pwd)/output:/output debbuilder:ubuntu-kinetic\n   ```\n\n4. **Generate all versions** (optional):\n   ```bash\n   ./crypt-keeper.sh generate all\n   ```\n\n### Customizing the build process\n\nThe build process can be customized by modifying:\n- `assets/build` - Main build script (copied to all generated versions)\n- `assets/transient/setup.sh` - Container setup script (copied to all generated versions)\n- `crypt-keeper.sh` - Dockerfile generation script\n\n**Note**: Changes to `assets/build` and `assets/transient/setup.sh` will only affect newly generated versions. To update existing versions, regenerate them with `./crypt-keeper.sh generate all`.\n\n## Version Control and Dist Tags\n\nFor detailed information about version control strategy and the dist tag system (similar to RPM's `%{?dist}`), see [VERSION_CONTROL.md](VERSION_CONTROL.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetpagespeed%2Fdebbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetpagespeed%2Fdebbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetpagespeed%2Fdebbuilder/lists"}