fix missing changes
This commit is contained in:
commit
00ecd91844
17
run.sh
17
run.sh
@ -22,8 +22,8 @@ echo "${PLUGIN_GPG_KEY}" > /key.asc
|
||||
eval $(gpg-agent --daemon --allow-preset-passphrase)
|
||||
|
||||
# retrieving key ID and GRIP
|
||||
ID=$(gpg --with-colons /key.asc 2>/dev/null | grep "^sec" | head -n 1 | cut -d\: -f 5 )
|
||||
GRIP=$(gpg --with-colons --import-options show-only --import /key.asc 2>/dev/null | grep '^grp' | head -n 1 | cut -d\: -f 10 )
|
||||
ID=$(gpg2 --with-colons /key.asc 2>/dev/null | grep "^pub" | head -n 1 | cut -d\: -f 5 )
|
||||
GRIP=$(gpg2 --with-colons --import-options show-only --import /key.asc 2>/dev/null | grep '^grp' | head -n 1 | cut -d\: -f 10 )
|
||||
echo Using GPG key with ID: ${ID} GRIP: ${GRIP}
|
||||
|
||||
# inject the passphrase
|
||||
@ -31,10 +31,11 @@ echo "${PLUGIN_PASSPHRASE}" | /usr/libexec/gpg-preset-passphrase --preset ${GRIP
|
||||
|
||||
# import the key
|
||||
gpg2 --batch --yes --import /key.asc
|
||||
rpm --import /key.asc
|
||||
gpg2 --armor --export ${ID} >/key.pub.asc
|
||||
rpm --import /key.pub.asc
|
||||
|
||||
# get key CN
|
||||
NAME=$(gpg --with-colons /key.asc 2>/dev/null | grep "^uid" | head -n 1 | cut -d\: -f 10)
|
||||
NAME=$(gpg2 --with-colons /key.asc 2>/dev/null | grep "^uid" | head -n 1 | cut -d\: -f 10)
|
||||
|
||||
# and output it to rpmmacros
|
||||
cat <<EOF >~/.rpmmacros
|
||||
@ -43,11 +44,5 @@ EOF
|
||||
|
||||
# parse required files
|
||||
for f in ${PLUGIN_FILES} ; do
|
||||
echo -n "Checking: $f - "
|
||||
S=$(rpm -K $f | grep '\:.*signatures.*OK$')
|
||||
if [ "a$S" = "a" ] ; then
|
||||
rpmsign --addsign $f 2>&1 >/dev/null && echo "SIGNED SUCCESSFULLY" || echo "SIGNING FAILED"
|
||||
else
|
||||
echo "ALREADY SIGNED"
|
||||
fi
|
||||
rpm -K $f | grep "\:.*signatures.*OK$" || rpmsign -v --addsign $f || exit 1
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user