{"id":13617520,"url":"https://github.com/zalando/package-build","last_synced_at":"2025-04-14T06:34:10.731Z","repository":{"id":28563199,"uuid":"32080735","full_name":"zalando/package-build","owner":"zalando","description":"A toolset for building system packages using Docker and fpm-cookery","archived":true,"fork":false,"pushed_at":"2019-12-20T10:51:56.000Z","size":403,"stargazers_count":35,"open_issues_count":1,"forks_count":8,"subscribers_count":30,"default_branch":"master","last_synced_at":"2024-08-01T20:47:47.662Z","etag":null,"topics":["apt","deb","developer-infrastructure","fpm-cookery","packaging","rpm"],"latest_commit_sha":null,"homepage":"https://tech.zalando.com/blog/building-system-packages-from-python-modules-with-dependencies-included/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zalando.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2015-03-12T14:16:32.000Z","updated_at":"2023-12-14T20:50:43.000Z","dependencies_parsed_at":"2022-08-02T12:52:55.678Z","dependency_job_id":null,"html_url":"https://github.com/zalando/package-build","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalando%2Fpackage-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalando%2Fpackage-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalando%2Fpackage-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalando%2Fpackage-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zalando","download_url":"https://codeload.github.com/zalando/package-build/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223621826,"owners_count":17174765,"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","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":["apt","deb","developer-infrastructure","fpm-cookery","packaging","rpm"],"created_at":"2024-08-01T20:01:43.085Z","updated_at":"2024-11-08T02:30:33.983Z","avatar_url":"https://github.com/zalando.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"Package Build\n=============\n\nPackage-build is a toolset for creating native system packages: .deb for Debian-like and .rpm for RedHat-like OSes. It is useable out-of-the-box.\n\n### The Idea\nWith a few simple scripts, you can use package-build to create isolated, self-contained packages; provide them in your internal repos; and not worry about deployment and dependencies. You can even use these scripts to package tarballs that are randomly dropped into a web folder. Because a simple shell script performs the actual package-building, you can easily use the same commands in a continuous integration context — i.e., to automatically build packages every time a recipe changes or a new one has been added.\n\n#### Details:\n- the whole build process is triggered from [Fabric](https://packages.debian.org/unstable/main/fabric) tasks running on the \"build host\"\n- build slaves are Docker containers to maintain a clean, well-defined environment\n- actual package building is done with [fpm](https://github.com/jordansissel/fpm) and [fpm-cookery](https://github.com/bernd/fpm-cookery)\n\n### Setup\n\nClone the repo and install the Python requirements:\n\n    sudo pip install -r requirements.txt\n\n    cp package-build.yaml-example ~/.config/package-build.yaml\n    vim ~/.config/package-build.yaml # adapt to your repo server and distributions for which you want to build packages\n    fab docker_build # this will setup the required Docker images and could take a while\n\nIf pycrypto makes trouble here, install Python's headers before: `sudo apt-get install python-dev` or `sudo yum install python-devel` depending on your OS.\n\n### How-to\n\nDocker containers provide the build environments, so you'll have to create a new subfolder under `docker/` with a Dockerfile for all the distributions for which you want to create a package. Create an entry in the config file `~/.config/package-build.yaml` for each distribution to map it to a package format (\"rpm\" or \"deb\", see the example config file).\n\nAs stated above, [fpm](https://github.com/jordansissel/fpm) and [fpm-cookery](https://github.com/bernd/fpm-cookery) do the actual package build. (fpm-cookery automatically builds [only a package for the distribution/OS where it's running] (https://github.com/bernd/fpm-cookery/blob/master/spec/facts_spec.rb#L72).) Create a `recipe.rb` under a subfolder in `recipes/`. Optionally, create a script called `prepare.sh`, meant to be run before `fpm-cook package` is executed.\n\n### $ Command Line Examples\nTo start the packaging process for different distributions and packages, see the examples below.\n\nBuild `facter` for Ubuntu 16.04 (\"Xenial\"):\n\n    fab package_build:facter,ubuntu16.04\n\nBuild `facter` for all configured distributions:\n\n    fab package_build:facter\n\nFor testing: The created package will not automatically upload and publish to your repositories unless you set the parameter `upload` to `True`:\n\n    fab package_build:debian7,upload=True\n\nPublish a package to the internal repository for ubuntu16.04 (which is the default distribution):\n\n    fab repo_deb_add:~/path/to/package.deb\n\nTo publish a package in the repos for other distributions, you have to pass them explicitly:\n\n    fab repo_deb_add:~/path/to/package.deb,dist=ubuntu12.04\n\nTo delete a package from the repo for a specified distribution:\n\n    fab repo_deb_del:dist=ubuntu12.04,chimp\n\n### More Recipe Examples\n\n- [https://github.com/bernd/fpm-recipes](https://github.com/bernd/fpm-recipes)\n- [https://github.com/piavlo/fpm-recipes-piavlo](https://github.com/piavlo/fpm-recipes-piavlo)\n- [https://github.com/Graylog2/fpm-recipes.git](https://github.com/Graylog2/fpm-recipes.git)\n- [https://github.com/haf/fpm-recipes.git](https://github.com/haf/fpm-recipes.git)\n\n### Test Coverage\n\nCurrently, there are [no tests for this project](https://github.com/zalando/package-build/issues/22) and test contributions are very welcome. Please see also the _Contributing_ section.\n\n### Contributing\n\nThanks for your interest in contributing! There are many ways to contribute to this project. [Get started here](CONTRIBUTING.md).\n\n### License\n\nThe contents of this repository are licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalando%2Fpackage-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzalando%2Fpackage-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalando%2Fpackage-build/lists"}