This repository has been archived on 2023-11-07. You can view files and clone it, but cannot push or open issues or pull requests.
rpmbuild/README.md
Robert Kaussow 35a21e8ec2
Some checks reported errors
continuous-integration/drone/push Build was killed
feat: build base image for rh8 (#2)
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
Co-committed-by: Robert Kaussow <xoxys@rknet.org>
2021-10-23 16:16:55 +02:00

36 lines
1.7 KiB
Markdown

# rpmbuild
Base image to build RPM packages
[![Build Status](https://img.shields.io/drone/build/docker/rpmbuild?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/docker/rpmbuild)
[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/rpmbuild)
[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/rpmbuild)
[![Source: Gitea](https://img.shields.io/badge/source-gitea-blue.svg?logo=gitea&logoColor=white)](https://gitea.rknet.org/docker/rpmbuild)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitea.rknet.org/docker/rpmbuild/src/branch/main/LICENSE)
Simple Docker images based on CentOS 7/Rocky Linux 8 to build RPM packages.
## Environment variables
```Shell
RPMBUILD_BASE_DIR=/drone/src
```
## How to use
There are two wrapper scripts around the rpmbuild command you could use:
- `/usr/local/bin/rpmbuild-official`: This will simply forward your command to the official binary at `/usr/bin/rpmbuild`
- `/usr/local/bin/rpmbuil`: This is a modified wrapper to prepare the environment before calling rpmbuil
The wrapper `/usr/local/bin/rpmbuil` will do the following:
- create `$RPMBUILD_BASE_DIR/dist`
- create rpmbuild folder structure (`BUILDRPMS|SOURCES|SPECS|SRPMS`) under `$RPMBUILD_BASE_DIR/dist`
- sync local patchfiles from `$RPMBUILD_BASE_DIR/patch` to `$RPMBUILD_BASE_DIR/dist/SOURCES` if the `patch` folder exist
- call `/bin/rpmbuil` with the given parameters
## License
This project is licensed under the MIT License - see the [LICENSE](https://gitea.rknet.org/docker/rpmbuild/src/branch/main/LICENSE) file for details.