Install builddeps to ensure availability before building on copr
This commit is contained in:
+17
-1
@@ -44,8 +44,24 @@ runs:
|
||||
${{ inputs.copr_config }}
|
||||
EOF
|
||||
|
||||
echo install_weak_deps=false >> /etc/dnf/dnf.conf
|
||||
|
||||
echo Validate builddep availability
|
||||
microdnf builddep -y $SPECFILE
|
||||
|
||||
counter=1
|
||||
RPMBUILDARGS=(--target=${{ inputs.build_arch }} --define="_disable_source_fetch 0" --define "_sourcedir $PWD" --define "_topdir $PWD")
|
||||
until rpmbuild "${RPMBUILDARGS[@]}" -br $SPECFILE || [ $counter -gt 5 ]; do
|
||||
echo Installing missing builddeps round $counter
|
||||
microdnf builddep -y SRPMS/$(rpmspec -q --srpm --qf '%{nevr}' $SPECFILE).buildreqs.nosrc.rpm
|
||||
((counter++))
|
||||
done
|
||||
|
||||
echo RPM autospeccing
|
||||
rpmautospec process-distgit "$SPECFILE" "$SPECFILE"
|
||||
rpmbuild -br --target=${{ inputs.build_arch }} --define="_disable_source_fetch 0" --define "_sourcedir $PWD" --define "_topdir $PWD" --define "_rpmdir $PWD" $SPECFILE
|
||||
|
||||
echo Build src.rpm and build on COPR
|
||||
rpmbuild -bs --target=${{ inputs.build_arch }} --define="_disable_source_fetch 0" --define "_sourcedir $PWD" --define "_topdir $PWD" --define "_rpmdir $PWD" $SPECFILE
|
||||
copr-cli --config config/copr build --chroot fedora-$(echo "${{ inputs.fedora_release }}" | sed 's/^f//' )-${{ inputs.build_arch }} ${{ inputs.copr_project }} SRPMS/*
|
||||
branding:
|
||||
icon: "package"
|
||||
|
||||
Reference in New Issue
Block a user