Red Hat SATELLITE 5.3.0 RELEASE NOTES Información técnica Pagina 72

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 199
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 71
# This script will generate a GPG key to use for the App Channel,
# resign the javaApp package, and make the pub key available.
# -- create profile with GPG key?
# Generate the key
gpg --batch --gen-key /root/resources/AppPGP
# Determine the key name
KNAME=`gpg --list-keys --fingerprint --with-colons |grep Vijay | cut -f5 -d':' | cut -c9-`
# Prep for signing
cat <<EOF>>~/.rpmmacros
%_signature gpg
%_gpg_name ${KNAME}
EOF
# Determine the package name
JFILE=`ls /root/resources/javaApp-*.noarch.rpm`
JNUM=`echo $JFILE | wc -w`
if [[ $JNUM -eq 0 ]]
then
echo "No javaApp rpm!"
exit -2
elif [[ $JNUM -gt 1 ]]
then
echo "More than one javaApp RPMs!"
exit -3
fi
# Resign the key
/root/resources/sign_rpm.py ${JFILE} "Cloud Foundations"
# Export the public key
gpg --export -a 'Vijay Trehan' > javaApp_pubKey.txt
# Copy the key to satellite web public area
/bin/cp javaApp_pubKey.txt /var/www/html/pub/APP-RPM-GPG-KEY
sign_rpm.py – python expect script to sign the package
#!/usr/bin/python
import sys, os, pexpect
filename = sys.argv[1]
passphrase = sys.argv[2]
signproc = pexpect.spawn("rpm --resign %s" % filename)
match = signproc.expect(["Enter pass phrase:"])
signproc.sendline(passphrase)
www.redhat.com 72
Vista de pagina 71
1 2 ... 67 68 69 70 71 72 73 74 75 76 77 ... 198 199

Comentarios a estos manuales

Sin comentarios