Autospec before builddpes to avoid building multiple src.rpm versions
This commit is contained in:
+8
-3
@@ -21,20 +21,25 @@ runs:
|
|||||||
cd ${{ gitea.workspace }}
|
cd ${{ gitea.workspace }}
|
||||||
SPECFILE=$([ "${{ inputs.specfile }}" ] && echo -n "${{ inputs.specfile }}" || echo -n $([ $(ls -1 *.spec 2>/dev/null| wc -l) -eq 1 ] && echo -n "$(ls -1 *.spec)"))
|
SPECFILE=$([ "${{ inputs.specfile }}" ] && echo -n "${{ inputs.specfile }}" || echo -n $([ $(ls -1 *.spec 2>/dev/null| wc -l) -eq 1 ] && echo -n "$(ls -1 *.spec)"))
|
||||||
[ "$SPECFILE" == "" ] && exit 1
|
[ "$SPECFILE" == "" ] && exit 1
|
||||||
|
|
||||||
|
echo RPM autospeccing
|
||||||
|
rpmautospec process-distgit $SPECFILE $SPECFILE
|
||||||
|
|
||||||
echo install_weak_deps=false >> /etc/dnf/dnf.conf
|
echo install_weak_deps=false >> /etc/dnf/dnf.conf
|
||||||
microdnf builddep -y $SPECFILE
|
microdnf builddep -y $SPECFILE
|
||||||
|
|
||||||
echo Checking for missing builddeps
|
echo Checking for missing builddeps
|
||||||
counter=1
|
counter=1
|
||||||
RPMBUILDARGS=(--target=${{ inputs.build_arch }} --define="_disable_source_fetch 0" --define "_sourcedir $PWD" --define "_topdir $PWD")
|
RPMBUILDARGS=(--target=${{ inputs.build_arch }} --define="_disable_source_fetch 0" --define "_sourcedir $PWD" --define "_topdir $PWD")
|
||||||
until rpmbuild "${RPMBUILDARGS[@]}" -bd $SPECFILE || [ $counter -gt 5 ]; do
|
until rpmbuild "${RPMBUILDARGS[@]}" -br $SPECFILE || [ $counter -gt 5 ]; do
|
||||||
echo Installing missing builddeps round $counter
|
echo Installing missing builddeps round $counter
|
||||||
microdnf builddep -y SRPMS/$(rpmspec -q --srpm --qf '%{nevr}' $SPECFILE).buildreqs.nosrc.rpm
|
microdnf builddep -y SRPMS/$(rpmspec -q --srpm --qf '%{nevr}' $SPECFILE).buildreqs.nosrc.rpm
|
||||||
((counter++))
|
((counter++))
|
||||||
done
|
done
|
||||||
echo RPM autospeccing
|
|
||||||
rpmautospec process-distgit $SPECFILE $SPECFILE
|
|
||||||
echo Building rpm and srpm
|
echo Building rpm and srpm
|
||||||
rpmbuild "${RPMBUILDARGS[@]}" -ba $SPECFILE
|
rpmbuild "${RPMBUILDARGS[@]}" -ba $SPECFILE
|
||||||
|
|
||||||
echo "Built $SPECFILE"
|
echo "Built $SPECFILE"
|
||||||
branding:
|
branding:
|
||||||
icon: "package"
|
icon: "package"
|
||||||
|
|||||||
Reference in New Issue
Block a user