Spec files and patches used for building the nginx weserv module and dependencies in RHEL 9 (and its derivatives).
Build the nginx-mod-weserv
RPM within a Docker container:
-
Clone this repository.
git clone https://github.com/weserv/rpms.git cd rpms/
-
Build the container locally.
docker build -t weserv/rpms .
-
Create rpmbuild working directory and change the ownership to the builder user (uid 1000).
mkdir ~/rpmbuild chown -R 1000:1000 ~/rpmbuild
-
Build the source RPM.
docker run --privileged -v $(pwd):/rpms -v $HOME/rpmbuild:/rpmbuild weserv/rpms \ mock --buildsrpm -r el9-wsrv-x86_64 --enable-network -D '_disable_source_fetch 0' --resultdir=/rpmbuild/SRPMS \ --spec=/rpms/nginx-mod-weserv/nginx-mod-weserv.spec --sources=/rpms/nginx-mod-weserv
-
Build the RPM.
docker run --privileged -v $HOME/rpmbuild:/rpmbuild weserv/rpms \ mock --rebuild -r el9-wsrv-x86_64 --resultdir=/rpmbuild/RPMS/"{{target_arch}}"/ \ /rpmbuild/SRPMS/nginx-mod-weserv-5.0.0-1.20241101git4133e2f.el9.wsrv.src.rpm