Skip to content

Commit

Permalink
Merge pull request rsyslog#56 from alorbach/pr-issue-55
Browse files Browse the repository at this point in the history
PKG_BASE: Changed .rpmmacros and added script to resign packages
  • Loading branch information
alorbach authored Feb 13, 2023
2 parents f70337e + 1009b9a commit 55fc4fe
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 1 deletion.
1 change: 1 addition & 0 deletions dev_env/fedora/pkg_base/36/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ COPY extra/do_upload_delete.sh ./
COPY extra/sync_remote.sh ./
COPY extra/sync_remote_delete.sh ./
COPY extra/cleanup_repo.sh ./
COPY extra/resignrepo.sh ./
RUN chmod +x ./initenv.sh
RUN chmod +x ./do_upload.sh
RUN chmod +x ./do_upload_delete.sh
Expand Down
3 changes: 2 additions & 1 deletion dev_env/fedora/pkg_base/36/extra/.rpmmacros
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
%_signature gpg
%_gpg_name Andre Lorbach (RPM Signing Key) <[email protected]>
%_gpg_path /root/.gnupg
%_gpg_name Andre Lorbach (RPM Package signing key for rsyslog 2023) <[email protected]>

71 changes: 71 additions & 0 deletions dev_env/fedora/pkg_base/36/extra/resignrepo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Definitions common to these scripts
source $(dirname "$0")/config.sh

echo "-------------------------------------"
echo "--- RPMMaker ---"
echo "-------------------------------------"

if [ -z $RPM_PLATFORM ]; then
echo "Which Linux Plattform?:"
select szDist in $PLATOPTIONS "All"
do
case $szDist in "All")
szDist=$PLATOPTIONS;
esac
echo "Making RPM for EPEL '$szDist'
"
break;
done
else
echo "PLATFORM is set to '$RPM_PLATFORM'"
szDist=$RPM_PLATFORM
fi

if [ -z $RPM_ARCH ]; then
echo "Which Architecture?:"
select szArch in $ARCHOPTIONS "All"
do
case $szArch in "All")
szArch=$ARCHOPTIONS;
esac
echo "Making RPM for Plattforms '$szArch'
"
break;
done
else
echo "ARCH is set to '$RPM_ARCH'"
szArch=$RPM_ARCH
fi

if [ -z $RPM_REPO ]; then
echo "Which YUM repository?":
select szSubRepo in $REPOOPTIONS "All"
do
case $szSubRepo in "All")
szSubRepo=$REPOOPTIONS;
esac
break;
done
else
echo "REPO is set to '$RPM_REPO'"
szSubRepo=$RPM_REPO
fi

for distro in $szDist; do
for arch in $szArch; do
echo "Updating REPO $distro-$arch-$szSubRepo"

repo=$szYumRepoDir/$szSubRepo/$distro/$arch;
if sudo rpm --addsign $repo/RPMS/*.rpm; then
sudo createrepo -s sha256 -o $repo -d -p $repo;
sudo rm $repo/repodata/repomd.xml.asc
sudo gpg --passphrase-file passfile.txt --detach-sign --armor $repo/repodata/repomd.xml
else
echo "rpmsign FAILED";
exit 1;
fi
done;
done;

exit 0;

0 comments on commit 55fc4fe

Please sign in to comment.