Skip to content

Commit

Permalink
Make rpm build script executable
Browse files Browse the repository at this point in the history
  • Loading branch information
major committed Jan 26, 2024
1 parent 4c42f61 commit cb1192c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions build_rpm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -euxo pipefail

echo "fastestmirror=1" >>/etc/dnf/dnf.conf
echo "max_parallel_downloads=20" >>/etc/dnf/dnf.conf
dnf -qy install git mock rpm-build rpmdevtools

FEDORA_RELEASE=39
SPEC=/src/*.spec

rpmdev-spectool -R -g $SPEC
rpmbuild -bs $SPEC | tee /tmp/srpm-name.txt
SRPM_NAME=$(grep Wrote /tmp/srpm-name.txt | awk '{print $2}')
mock -r /etc/mock/fedora-${FEDORA_RELEASE}-x86_64.cfg --postinstall $SRPM_NAME
rpmlint /var/lib/mock/fedora-${FEDORA_RELEASE}-x86_64/result/*.rpm

0 comments on commit cb1192c

Please sign in to comment.