diff options
author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2011-01-21 15:52:42 +0100 |
---|---|---|
committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2011-02-05 01:24:12 +0100 |
commit | 267d1e8d17b1845d311c401cfcff13da25643005 (patch) | |
tree | 787e998bff2954c47db27e9474d44daf88987264 /src/fedpkg.py | |
parent | 3738d0af3674b700122265ce173b23ae80d4e31c (diff) | |
download | fedora-packager-267d1e8d17b1845d311c401cfcff13da25643005.tar.gz fedora-packager-267d1e8d17b1845d311c401cfcff13da25643005.tar.xz fedora-packager-267d1e8d17b1845d311c401cfcff13da25643005.zip |
Fix permission of files to be put into SRPM
Add an option '--fix-permissions' to the 'fedpkg srpm' call.
If the '--fix-permissions' option is not given, the behaviour
of 'fedpkg srpm' does not change at all.
If the '--fix-permissions' option is given, fedpkg runs
git ls-files -z | xargs -0 chmod a+r
before running the normal rpmbuild command. This makes sure
that all 0600 files the filesystem are changed to the usual
0644 before including them in .src.rpm file.
Diffstat (limited to 'src/fedpkg.py')
-rwxr-xr-x | src/fedpkg.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fedpkg.py b/src/fedpkg.py index e1e63e9..207f479 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -669,7 +669,8 @@ def srpm(args): try: mymodule = pyfedpkg.PackageModule(args.path, args.dist) pyfedpkg.sources(args.path) - mymodule.srpm(hashtype=args.hashtype) + mymodule.srpm(hashtype=args.hashtype, + fix_permissions=args.fix_permissions) except pyfedpkg.FedpkgError, e: log.error('Could not make an srpm: %s' % e) sys.exit(1) @@ -1147,6 +1148,9 @@ packages will be built sequentially. parser_srpm.add_argument('--md5', action = 'store_const', dest='hashtype', const='md5', default=None, help = 'Use md5 checksums (for older rpm hosts)') + parser_srpm.add_argument('--fix-permissions', action='store_true', + default=False, + help = 'Fix permissions of files to be put into .src.rpm file') parser_srpm.set_defaults(command = srpm) # switch branches |