Skip to content
Snippets Groups Projects
Commit 93231d07 authored by Alex Iribarren's avatar Alex Iribarren
Browse files

Identify GPG validation errors

parent 07ab86af
No related branches found
No related tags found
1 merge request!8Verify GPG keys and add a bunch of repos
FROM cern/cc7-base
RUN yum install -y jq createrepo \
RUN yum install -y jq createrepo patch \
&& yum clean all
RUN rm -rf /etc/yum.repos.d/*
......@@ -8,6 +8,10 @@ COPY gpgkeys/ /etc/pki/rpm-gpg/
RUN find /etc/pki/rpm-gpg/ -type f -exec rpm --import {} \;
COPY runreposync.sh /root/
# Temporary hack, hopefully
COPY reposync.patch /root/
RUN patch /usr/bin/reposync /root/reposync.patch
VOLUME /repo
WORKDIR /root
......
--- reposync 2018-10-10 14:02:54.070891179 +0200
+++ reposync.new 2018-10-10 14:03:24.692535073 +0200
@@ -363,7 +363,7 @@
else:
my.logger.warning('Removing %s due to failed signature check: %s' % rpmfn)
os.unlink(pkg.localpath)
- exit_code = 1
+ exit_code = 2
continue
my.closeRpmDB()
......@@ -74,7 +74,13 @@ if [[ $RUN_REPOSYNC -eq 1 ]]; then
--repoid ${REPOID} 2> /local/stderr
RET=$?
if [[ $RET -ne 0 ]]; then
if [[ $RET -eq 2 ]]; then
cat << EOF | error | tee $OUTPUT
"exit_code": $RET,
"error": "reposync gpg error",
"output": "$(sed 's/"/\\"/g' /local/stderr)"
EOF
elif [[ $RET -ne 0 ]]; then
cat << EOF | error | tee $OUTPUT
"exit_code": $RET,
"error": "reposync failed",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment