mock ChangeLog, 1.10, 1.11 Makefile, 1.12, 1.13 README, 1.9, 1.10 buildsys-build.spec, 1.5, 1.6 mock.py, 1.58, 1.59 mock.spec, 1.20, 1.21

John Clark Williams (jcwillia) fedora-extras-commits at redhat.com
Thu Jan 4 16:11:19 UTC 2007


Author: jcwillia

Update of /cvs/fedora/mock
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10993

Modified Files:
	ChangeLog Makefile README buildsys-build.spec mock.py 
	mock.spec 
Log Message:
merged mock-0-6-branch fixes into HEAD


Index: ChangeLog
===================================================================
RCS file: /cvs/fedora/mock/ChangeLog,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ChangeLog	8 Sep 2006 18:04:00 -0000	1.10
+++ ChangeLog	4 Jan 2007 16:10:48 -0000	1.11
@@ -1,3 +1,8 @@
+2007-01-03  Clark Williams  <williams at redhat.com>
+	
+	* mock.py, Makefile, etc/*.cfg
+	merged BZ fixes from mock-0.6 branch
+	
 2006-09-08  Clark Williams  <williams at redhat.com>
 
 	* mock.c
@@ -118,6 +123,7 @@
 
 	* etc/defaults.cfg: use defaults more intelligently
 
+
 2006-05-24 11:15  skvidal
 
 	* mock.py, src/mock-helper.c: 


Index: Makefile
===================================================================
RCS file: /cvs/fedora/mock/Makefile,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Makefile	8 Sep 2006 18:04:00 -0000	1.12
+++ Makefile	4 Jan 2007 16:10:48 -0000	1.13
@@ -24,8 +24,8 @@
 	mkdir -p $(DESTDIR)/var/lib/mock
 	for d in $(SUBDIRS); do make  DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done
 
-archive:
-	@rm -rf ${PKGNAME}-%{VERSION}.tar.gz
+archive: clean
+	@rm -rf ${PKGNAME}-*.tar.gz
 	@rm -rf /tmp/${PKGNAME}-$(VERSION) /tmp/${PKGNAME}
 	@dir=$$PWD; cd /tmp; cp -a $$dir ${PKGNAME}
 	@rm -rf /tmp/${PKGNAME}/${PKGNAME}-daily.spec /tmp/${PKGNAME}/build /tmp/${PKGNAME}/dist
@@ -47,6 +47,16 @@
 		   --define "_srcrpmdir $(PWD)/buildsys" \
 		   --define "_rpmdir $(PWD)/buildsys" 
 
+RPMARGS 	:= --define "_sourcedir $(PWD)" \
+		   --define "_builddir $(PWD)/buildsys" \
+		   --define "_srcrpmdir $(PWD)/buildsys" \
+		   --define "_rpmdir $(PWD)/buildsys" 
+
+RPMARGS 	:= --define "_sourcedir $(PWD)" \
+		   --define "_builddir $(PWD)/buildsys" \
+		   --define "_srcrpmdir $(PWD)/buildsys" \
+		   --define "_rpmdir $(PWD)/buildsys" 
+
 buildsys-rpm:
 	rm -rf buildsys
 	mkdir buildsys
@@ -54,5 +64,9 @@
 		rpmbuild $(RPMARGS) --define "fedora $$i" --define "dist .fc$$i" -bb buildsys-build.spec; \
 	done
 	for i in 3 4; do \
-		rpmbuild $(RPMARGS) --define "el $$i" --define "dist .el$$i" -bb buildsys-build.spec; \
+		rpmbuild $(RPMARGS) --define "rhel $$i" --define "dist .el$$i" -bb buildsys-build.spec; \
+	done
+	for i in 73 8 9; do \
+		rpmbuild $(RPMARGS) --define "rhl $$i" --define "dist .rh$$i" -bb buildsys-build.spec; \
 	done
+        rpmbuild $(RPMARGS) --define "fedora development" --define "dist .fc7" -bb buildsys-build.spec


Index: README
===================================================================
RCS file: /cvs/fedora/mock/README,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- README	29 Mar 2006 06:23:21 -0000	1.9
+++ README	4 Jan 2007 16:10:48 -0000	1.10
@@ -2,25 +2,34 @@
 Mock is a simple chroot/rpm building program. It doesn't do anything
 terribly fancy other than build a single srpm at a time in a chroot.
 
-You invoke it as:
-mock -r name-of-chroot /path/to/srpm
+You invoke mock using one of the following forms:
+
+   mock [options] [rebuild] /path/to/srpm(s)
+   mock [options] chroot <cmd>
+   mock [options] {init|clean|shell}
 
 options:
   -r CHROOT             chroot name/config file name default: chroot.cfg
   --no-clean            do not clean chroot before building
   --arch=ARCH           target build arch
   --debug               Output copious debugging information
-  --resultdir=RESULTDIR
-                        path for resulting files to be put
+  --resultdir=RESDIR	path for resulting files to be put
   --statedir=STATEDIR   path for state file is written
-  --uniqueext=UNIQUEEXT
-                        Arbitrary, unique extension to append to buildroot
+  --uniqueext=UNIQUEEXT Arbitrary, unique extension to append to buildroot
                         directory name
+  --configdir=CONFIGDIR Change directory where config files are found
+  --quiet		Suppress most output
+  --autocache		Turn on build-root caching
+  --rebuildcache	Force rebuild of build-root cache
+  --help		Show usage information and exit
+  --version		Show version number and exit
 
  commands:
-  init  - initialize a chroot (install pkgs, setup devices, etc,) then exit
-  clean - purge the chroot tree - normally this happens right before a build
+  init   - initialize a chroot (install pkgs, setup devices, etc,) then exit
+  chroot - run the specified command in an (already initialized) chroot
+  clean  - purge the chroot tree - normally this happens right before a build
           but this is for the tidy-minded
+  shell  - start an interactive shell in the specified chroot
   rebuild <srpm> - for mach compatibility
 
 mock does:
@@ -34,6 +43,3 @@
 - logs nicely so that chroot creation and build logs are separate
 - outputs little unless it needs to.
 
-
-TODO: document more
-TODO: man page?


Index: buildsys-build.spec
===================================================================
RCS file: /cvs/fedora/mock/buildsys-build.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- buildsys-build.spec	25 Aug 2006 16:40:30 -0000	1.5
+++ buildsys-build.spec	4 Jan 2007 16:10:48 -0000	1.6
@@ -4,7 +4,7 @@
 Summary: The base set of packages for a mock chroot
 Name: buildsys-build
 Version: 0.7
-Release: 2%{?dist}
+Release: 1%{?dist}
 License: GPL
 Group: Development/Build Tools
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -45,12 +45,12 @@
 %endif
 
 # RHEL block
-%if "%{?el}" != ""
+%if "%{?rhel}" != ""
 Requires: redhat-release
 Requires: coreutils
 Requires: elfutils
 Requires: redhat-rpm-config
-%if "%{?el}" == "4"
+%if "%{?rhel}" == "4"
 Requires: python
 %endif
 %endif
@@ -100,12 +100,22 @@
 %files
 %defattr(-,root,root,-)
 %doc
-
 %changelog
-* Fri Aug 25 2006 Dennis Gilmore <dennis at ausil.us> - 0.7-2
+* Wed Jan  3 2007 Clark Williams <williams at redhat.com>
+- merged mock-0.6 BZ fixes to trunk
+
+* Thu Dec 14 2006 Clark Williams <williams at redhat.com>
+- added fix from David Lutterkort for RHEL
+- refactored some conditional blocks for simplicity
+- added this entry for Dennis Gilmore's aurora SPARC fixes
+
+* Tue Aug 29 2006 Clark Williams <williams at redhat.com>
+- added rhl buildsys-build rpms
+
+* Fri Aug 25 2006 Dennis Gilmore <dennis at ausil.us>
 - add aurora SPARC linux conditionals
 
-* Mon Aug  7 2006 Clark Williams <williams at redhat.com> - 0.7-1
+* Mon Aug  7 2006 Clark Williams <williams at redhat.com>
 - refactored conditional blocks for simplicity
 - bumped version to match mock
 


Index: mock.py
===================================================================
RCS file: /cvs/fedora/mock/mock.py,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- mock.py	26 Sep 2006 16:29:22 -0000	1.58
+++ mock.py	4 Jan 2007 16:10:48 -0000	1.59
@@ -19,6 +19,10 @@
 import os.path
 import sys
 import rpmUtils
+try:
+    test = rpmUtils.transaction.initReadOnlyTransaction()
+except:
+    import rpmUtils.transaction
 import rpm
 import glob
 import shutil
@@ -122,6 +126,8 @@
         if config.has_key('unique-ext'):
             root = "%s-%s" % (root, config['unique-ext'])
         self.basedir = os.path.join(config['basedir'], root)
+        if self.basedir.find("/var/lib/mock") != 0:
+            raise RootError, "Cannot change basedir location!"
         self.target_arch = config['target_arch']
         self.rootdir = os.path.join(self.basedir, 'root')
         self.homedir = self.config['chroothome']
@@ -784,7 +790,7 @@
         self._make_our_user()
         self._build_dir_setup()
         self._mountall() # check it again
-        
+
 def command_parse():
     """return options and args from parsing the command line"""
     
@@ -813,7 +819,7 @@
     parser.add_option("--resultdir", action="store", type="string", 
                       default=None, help="path for resulting files to be put")
     parser.add_option("--statedir", action="store", type="string", default=None,
-                      help="path for state file is written")
+                      help="Path to directory where state information is written")
     parser.add_option("--uniqueext", action="store", type="string", default=None,
                       help="Arbitrary, unique extension to append to buildroot directory name")
     parser.add_option("--configdir", action="store", dest="configdir", default=None,
@@ -871,22 +877,24 @@
     # do some other options and stuff
     if options.arch:
         config_opts['target_arch'] = options.arch
-    
-    config_opts['clean'] = options.clean
-    config_opts['debug'] = options.debug
-    config_opts['quiet'] = options.quiet
-    config_opts['use_cache'] = options.use_cache
-    config_opts['rebuild_cache'] = options.rebuild_cache
-    
+    if not options.clean:
+        config_opts['clean'] = options.clean
+    if options.debug:
+        config_opts['debug'] = options.debug
+    if options.quiet:
+        config_opts['quiet'] = options.quiet
+    if options.use_cache:
+        config_opts['use_cache'] = options.use_cache
+    if options.rebuild_cache:
+        config_opts['rebuild_cache'] = options.rebuild_cache
+    if config_opts['rebuild_cache']: 
+        config_opts['use_cache'] = True
     if config_opts['rebuild_cache']: 
         config_opts['use_cache'] = True
-    
     if options.resultdir:
         config_opts['resultdir'] = options.resultdir
-
     if options.statedir:
         config_opts['statedir'] = options.statedir
-
     if options.uniqueext:
         config_opts['unique-ext'] = options.uniqueext
 
@@ -983,7 +991,8 @@
     if os.path.exists(cfg):
         execfile(cfg)
     else:
-        pass # not finding the defaults.cfg file is no error
+        if config_path != "/etc/mock" and os.file.exists("/etc/mock/defaults.cfg"):
+            execfile("/etc/mock/defaults.cfg")
     
     # read in the config file by chroot name
     if options.chroot.endswith('.cfg'):


Index: mock.spec
===================================================================
RCS file: /cvs/fedora/mock/mock.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- mock.spec	8 Sep 2006 18:04:00 -0000	1.20
+++ mock.spec	4 Jan 2007 16:10:48 -0000	1.21
@@ -7,7 +7,7 @@
 Source: http://fedoraproject.org/projects/mock/releases/%{name}-%{version}.tar.gz
 URL: http://fedoraproject.org/wiki/Projects/Mock
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires: python, yum >= 2.2.1
+Requires: python, yum >= 3.0
 Requires(pre): shadow-utils
 BuildRequires: libselinux-devel
 
@@ -21,7 +21,6 @@
 %build
 make
 
-
 %install
 rm -rf $RPM_BUILD_ROOT
 make DESTDIR=$RPM_BUILD_ROOT install
@@ -30,7 +29,7 @@
 
 %if 0%{?fedora:1}
 if [ -f fedora-%{fedora}-%{_target_cpu}-core.cfg ]; then
-   	ln -s fedora-%{fedora}-%{_target_cpu}-core.cfg default.cfg
+        ln -s fedora-%{fedora}-%{_target_cpu}-core.cfg default.cfg
 fi
 %endif
 
@@ -38,13 +37,15 @@
 if [ ! -f default.cfg ]; then
     if [ -f fedora-development-%{_target_cpu}-core.cfg ]; then
         ln -s fedora-development-%{_target_cpu}-core.cfg default.cfg
-    else
+    elif [ -f fedora-devel-%{_target_cpu}-core.cfg ]; then
+        ln -s fedora-devel-%{_target_cpu}-core.cfg default.cfg
+    elif [ -f fedora-development-i386-core.cfg ]; then
         ln -s fedora-development-i386-core.cfg default.cfg
+    elif [ -f fedora-devel-i386-core.cfg ]; then
+        ln -s fedora-devel-i386-core.cfg default.cfg
     fi
 fi
 
-cd $RPM_BUILD_ROOT/%{_bindir}
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -68,6 +69,9 @@
 
 
 %changelog
+* Wed Jan  3 2007 Clark Williams <williams at redhat.com>
+- Merged mock-0.6 BZ fixes into head
+
 * Fri Sep  8 2006 Clark Williams <williams at redhat.com> - 0.7.1-1
 - Change mock.py to /usr/libexec
 




More information about the scm-commits mailing list