rpms/mock/devel mock-0.4-setpgrp.patch,NONE,1.1 mock.spec,1.9,1.10

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Tue Jan 24 16:15:55 UTC 2006


Author: dcbw

Update of /cvs/extras/rpms/mock/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28558

Modified Files:
	mock.spec 
Added Files:
	mock-0.4-setpgrp.patch 
Log Message:
* Tue Jan 24 2006 Dan Williams <dcbw at redhat.com> - 0.4-4
- Add option to create new process group so mock and its children
    may be more easily killed



mock-0.4-setpgrp.patch:

--- NEW FILE mock-0.4-setpgrp.patch ---
--- mock-0.4/mock.py.setpgrp	2006-01-24 11:10:40.000000000 -0500
+++ mock-0.4/mock.py	2006-01-24 11:12:08.000000000 -0500
@@ -621,6 +621,8 @@
             help="path for state dirresulting files to be put")
     parser.add_option("--uniqueext", action="store", type="string", default=None,
             help="Arbitrary, unique extension to append to buildroot directory name")
+    parser.add_option("--setpgrp", action ="store_true", dest="setpgrp", 
+            default=False, help="starts a new process group for mock")
 
     return parser.parse_args()
     
@@ -683,7 +685,12 @@
     if len(args) < 1:
         error("No srpm or command specified - nothing to do")
         sys.exit(50)
-    
+
+    # If requested, become a process group leader so that us and
+    # _all_ of our children can more easily be killed with kill(2)
+    if options.setpgrp:
+        os.setpgrp()
+
     # read in the config file by chroot name
     if options.chroot.endswith('.cfg'):
         cfg = '%s/%s' % (config_path, options.chroot)


Index: mock.spec
===================================================================
RCS file: /cvs/extras/rpms/mock/devel/mock.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- mock.spec	18 Jan 2006 22:10:57 -0000	1.9
+++ mock.spec	24 Jan 2006 16:15:54 -0000	1.10
@@ -1,7 +1,7 @@
 Summary: Builds packages inside chroots
 Name: mock
 Version: 0.4
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPL
 Group: Development/Tools
 Source: http://fedoraproject.org/projects/mock/releases/%{name}-%{version}.tar.gz
@@ -11,6 +11,7 @@
 Requires(pre): shadow-utils
 BuildRequires: libselinux-devel
 Patch0: mock-0.4-unpackaged-files-fix.patch
+Patch1: mock-0.4-setpgrp.patch
 
 %description
 Mock takes a srpm and builds it in a chroot
@@ -19,6 +20,7 @@
 %setup -q
 
 %patch0 -p1 -b .unpackaged-files-fix
+%patch1 -p1 -b .setpgrp
 
 %build
 make
@@ -68,6 +70,10 @@
 
 
 %changelog
+* Tue Jan 24 2006 Dan Williams <dcbw at redhat.com> - 0.4-4
+- Add option to create new process group so mock and its children
+    may be more easily killed
+
 * Wed Jan 18 2006 Dan Williams <dcbw at redhat.com> - 0.4-3
 - Add unpackaged files fix from RH#163576 (Adrian Reber)
 




More information about the fedora-extras-commits mailing list