extras-buildsys/utils/pushscript Config_Extras.py, 1.10, 1.11 Push.py, 1.10, 1.11

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Sun Oct 29 17:58:17 UTC 2006


Author: mschwendt

Update of /cvs/fedora/extras-buildsys/utils/pushscript
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21083

Modified Files:
	Config_Extras.py Push.py 
Log Message:
No need to set up ~/.rpmmacros just for this.



Index: Config_Extras.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/pushscript/Config_Extras.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Config_Extras.py	28 Oct 2006 22:52:30 -0000	1.10
+++ Config_Extras.py	29 Oct 2006 17:58:15 -0000	1.11
@@ -28,7 +28,6 @@
     mail = True
     repoprune = True
     repoview = True
-    signkeycheck = True
     doublesync = False
 
 top_workdir = '/srv/rpmbuild'


Index: Push.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/pushscript/Push.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Push.py	25 Oct 2006 23:55:42 -0000	1.10
+++ Push.py	29 Oct 2006 17:58:15 -0000	1.11
@@ -262,7 +262,7 @@
     return hdr['excludearch']
 
 
-def sign_pkgs(filelist):
+def sign_pkgs(filelist,keyname):
     """gpg sign all the rpms"""
     numfiles = len(filelist)
     if numfiles < 1:
@@ -280,7 +280,7 @@
             filelist = []
     
         foo = string.join(files)
-        result = os.system('echo %s | xargs rpm --resign' % foo)
+        result = os.system('echo %s | xargs rpm --define "_signature gpg" --define "_gpg_name %s" --resign' % (foo,keyname))
         if result != 0:
             return result
         numfiles = len(filelist)
@@ -484,7 +484,7 @@
 
     try:
         print "Signing Packages:"
-        rv = sign_pkgs( find_files(signtmpdir,'*.rpm') )
+        rv = sign_pkgs( find_files(signtmpdir,'*.rpm'), cfg.signkeyname )
         if rv:
             print "Error signing packages! Please be patient - cleaning up."
             raise Exception
@@ -582,10 +582,6 @@
 
     os.umask(cfg.signersumask)
     Utils.signer_gid_check(cfg.signersgid)
-    if cfg.opts.signkeycheck:
-        if cfg.signkeyname != os.popen('rpm --eval %_gpg_name','r').read().rstrip():
-            print 'ERROR: Configure ~/.rpmmacros for proper GPG signing before running this!'
-            sys.exit(errno.EPERM)
 
     if '-f' in sys.argv[2:]:
         sys.argv.remove('-f')




More information about the scm-commits mailing list