add check for zypper and fix gpg repo sign
This commit is contained in:

committed by
Markus Mäkelä

parent
6555fc0bab
commit
6541f845ea
@ -62,9 +62,13 @@ if [ $z_res -eq 127 ] && [ $y_res -eq 127 ] ; then
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# RPM-based system
|
# RPM-based system
|
||||||
sudo yum install -y createrepo
|
if [ ${y_res} == 0 ]; then
|
||||||
sudo zypper -n remove patterns-openSUSE-minimal_base-conflicts
|
sudo yum install -y createrepo
|
||||||
sudo zypper -n install createrepo
|
fi
|
||||||
|
if [ ${z_res} == 0 ]; then
|
||||||
|
sudo zypper -n remove patterns-openSUSE-minimal_base-conflicts
|
||||||
|
sudo zypper -n install createrepo
|
||||||
|
fi
|
||||||
echo "%_signature gpg" >> ~/.rpmmacros
|
echo "%_signature gpg" >> ~/.rpmmacros
|
||||||
echo "%_gpg_name MariaDB Maxscale" >> ~/.rpmmacros
|
echo "%_gpg_name MariaDB Maxscale" >> ~/.rpmmacros
|
||||||
# echo "%_gpg_name MariaDBManager" >> ~/.rpmmacros
|
# echo "%_gpg_name MariaDBManager" >> ~/.rpmmacros
|
||||||
@ -74,7 +78,7 @@ else
|
|||||||
echo "Package signing failed!"
|
echo "Package signing failed!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
gpg --output repomd.xml.key --sign $sourcedir/repodata/repomd.xml
|
|
||||||
cp $sourcedir/* $destdir/
|
cp $sourcedir/* $destdir/
|
||||||
pushd ${destdir} >/dev/null 2>&1
|
pushd ${destdir} >/dev/null 2>&1
|
||||||
createrepo -d -s sha .
|
createrepo -d -s sha .
|
||||||
@ -84,6 +88,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
popd >/dev/null 2>&1
|
popd >/dev/null 2>&1
|
||||||
|
gpg --output repomd.xml.key --sign $destdir/repodata/repomd.xml
|
||||||
gpg -a --detach-sign $destdir/repodata/repomd.xml
|
gpg -a --detach-sign $destdir/repodata/repomd.xml
|
||||||
if [ $? != 0 ] ; then
|
if [ $? != 0 ] ; then
|
||||||
echo "Package signing failed!"
|
echo "Package signing failed!"
|
||||||
|
Reference in New Issue
Block a user