From 1179491f3cd4ff9ddc7a061f39ef47ff8cf78d01 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Fri, 14 Dec 2007 16:10:46 -0600 Subject: added help target --- Makefile.am | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 12559d3..c839228 100644 --- a/Makefile.am +++ b/Makefile.am @@ -89,7 +89,7 @@ RPM_DEFINES = --define "_topdir $(TOPDIR)" \ --define "_specdir $(SPECDIR)" \ --define "_srcrpmdir $(SRCRPMDIR)" -.PHONY: rpm srpm +.PHONY: rpm srpm help rpm: dist mkdir -p $(BUILDDIR) rpmbuild $(RPM_DEFINES) -ba --nodeps $(PACKAGE_NAME).spec @@ -99,3 +99,14 @@ srpm: dist mkdir -p $(BUILDDIR) rpmbuild $(RPM_DEFINES) -ba --nodeps $(PACKAGE_NAME).spec rm -rf $(BUILDDIR) + + +help: + @echo + @echo "Mock Makefile targets:" + @echo " dist - generate Changelog and Authors file" + @echo " rpm - build binary RPM" + @echo " srpm - build source RPM" + @echo " help - print this message" + @echo "Additionally, all standard automake targets are supported" + @echo -- cgit From bddf95fb16486532a0eb88bc6590243e936c84c4 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Fri, 14 Dec 2007 16:11:05 -0600 Subject: updated changelog info --- mock.spec.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mock.spec.in b/mock.spec.in index 4fae6ce..0d698d6 100644 --- a/mock.spec.in +++ b/mock.spec.in @@ -70,6 +70,13 @@ fi %attr(02775, root, mock) %dir /var/lib/mock %changelog +* Fri Dec 14 2007 Clark Williams - 0.9.3-1 +- added '--copyin' and '--copyout' modes +- added makeChrootPath() method to Root +- replaced most ad hock usages of .rootdir with makeChrootPath() +- updated man page && added test cases +- added 'help' target to Makefile.am + * Thu Dec 13 2007 Michael Brown - 0.9.2-1 - add '--update' mode - fix '--shell' mode -- cgit From 3542beca1ed0f1d13b1bde95f338c777bbaf6ccc Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Fri, 14 Dec 2007 16:32:57 -0600 Subject: replaced references to rootdir with calls to makeChrootPath() --- py/mock/backend.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/py/mock/backend.py b/py/mock/backend.py index c850118..6b8bc1a 100644 --- a/py/mock/backend.py +++ b/py/mock/backend.py @@ -83,11 +83,11 @@ class Root(object): self.pluginConf[key]["root"] = self.sharedRootName # mount/umount - self.umountCmds = ['umount -n %s/proc' % self.rootdir, - 'umount -n %s/sys' % self.rootdir, + self.umountCmds = ['umount -n %s' % self.makeChrootPath('proc') + 'umount -n %s' % self.makeChrootPath('sys') ] - self.mountCmds = ['mount -n -t proc mock_chroot_proc %s/proc' % self.rootdir, - 'mount -n -t sysfs mock_chroot_sysfs %s/sys' % self.rootdir, + self.mountCmds = ['mount -n -t proc mock_chroot_proc %s' % self.makeChrootPath('proc'), + 'mount -n -t sysfs mock_chroot_sysfs %s' % self.makeChrootPath('sys'), ] self.build_log_fmt_str = config['build_log_fmt_str'] @@ -159,7 +159,7 @@ class Root(object): # create our base directory heirarchy mock.util.mkdirIfAbsent(self.basedir) - mock.util.mkdirIfAbsent(self.rootdir) + mock.util.mkdirIfAbsent(self.makeChrootPath()) self.uidManager.dropPrivsTemp() try: @@ -175,7 +175,7 @@ class Root(object): self._resetLogging() # write out config details - self.root_log.debug('rootdir = %s' % self.rootdir) + self.root_log.debug('rootdir = %s' % self.makeChrootPath()) self.root_log.debug('resultdir = %s' % self.resultdir) # set up plugins: @@ -299,7 +299,7 @@ class Root(object): decorate(traceLog()) def doChroot(self, command, env="", *args, **kargs): """execute given command in root""" - return mock.util.do( command, personality=self.personality, chrootPath=self.rootdir, *args, **kargs ) + return mock.util.do( command, personality=self.personality, chrootPath=self.makeChrootPath(), *args, **kargs ) decorate(traceLog()) def yumInstall(self, *srpms): @@ -377,12 +377,12 @@ class Root(object): ) # rebuild srpm/rpm from SPEC file - specs = glob.glob("%s/%s/SPECS/*.spec" % (self.rootdir, self.builddir)) + specs = glob.glob("%s/%s/SPECS/*.spec" % (self.makeChrootPath(), self.builddir)) if len(specs) < 1: raise mock.exception.PkgError, "No Spec file found in srpm: %s" % srpmBasename spec = specs[0] # if there's more than one then someone is an idiot - chrootspec = spec.replace(self.rootdir, '') # get rid of rootdir prefix + chrootspec = spec.replace(self.makeChrootPath(), '') # get rid of rootdir prefix # Completely/Permanently drop privs while running the following: self.doChroot( "rpmbuild -bs --target %s --nodeps %s" % (self.target_arch, chrootspec), @@ -392,7 +392,7 @@ class Root(object): gid=self.chrootgid, ) - rebuiltSrpmFile = glob.glob("%s/%s/SRPMS/*.src.rpm" % (self.rootdir, self.builddir)) + rebuiltSrpmFile = glob.glob("%s/%s/SRPMS/*.src.rpm" % (self.makeChrootPath(), self.builddir)) if len(rebuiltSrpmFile) != 1: raise mock.exception.PkgError, "Didnt find single rebuilt srpm." @@ -477,7 +477,7 @@ class Root(object): if not self.online: cmdOpts = "-C" - cmd = '%s --installroot %s %s %s' % (self.yum_path, self.rootdir, cmdOpts, cmd) + cmd = '%s --installroot %s %s %s' % (self.yum_path, self.makeChrootPath(), cmdOpts, cmd) self.root_log.debug(cmd) output = "" try: -- cgit From d4458262ddcd3d55ba7009ff3dd131947f4f01e6 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Fri, 14 Dec 2007 16:33:05 -0600 Subject: replaced references to rootdir with calls to makeChrootPath() --- py/mock/plugins/bind_mount.py | 1 - 1 file changed, 1 deletion(-) diff --git a/py/mock/plugins/bind_mount.py b/py/mock/plugins/bind_mount.py index df5e215..ff531f0 100644 --- a/py/mock/plugins/bind_mount.py +++ b/py/mock/plugins/bind_mount.py @@ -25,7 +25,6 @@ class BindMount(object): def __init__(self, rootObj, conf): self.rootObj = rootObj self.bind_opts = conf - self.rootdir = rootObj.rootdir rootObj.bindMountObj = self rootObj.addHook("preinit", self._bindMountPreInitHook) for srcdir, destdir in self.bind_opts['dirs']: -- cgit From 39ee6e19397207468751d6308e0a7895543d9733 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Fri, 14 Dec 2007 16:33:09 -0600 Subject: replaced references to rootdir with calls to makeChrootPath() --- py/mock/plugins/root_cache.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/py/mock/plugins/root_cache.py b/py/mock/plugins/root_cache.py index 5082925..81f7c5f 100644 --- a/py/mock/plugins/root_cache.py +++ b/py/mock/plugins/root_cache.py @@ -30,7 +30,6 @@ class RootCache(object): self.rootCacheFile = os.path.join(self.rootSharedCachePath, "cache.tar.gz") self.rootCacheLock = None self.state = rootObj.state - self.rootdir = rootObj.rootdir rootObj.rootCacheObj = self rootObj.addHook("preinit", self._rootCachePreInitHook) rootObj.addHook("postinit", self._rootCachePostInitHook) @@ -75,7 +74,7 @@ class RootCache(object): if os.path.exists(self.rootCacheFile) and self.rootObj.chrootWasCleaned: self.state("unpacking cache") self._rootCacheLock() - mock.util.do("tar xzf %s -C %s" % (self.rootCacheFile, self.rootdir)) + mock.util.do("tar xzf %s -C %s" % (self.rootCacheFile, rootObj.makeChrootPath())) self._rootCacheUnlock() self.chroot_setup_cmd = "update" self.rootObj.chrootWasCleaned = False @@ -86,6 +85,6 @@ class RootCache(object): if self.rootObj.chrootWasCleaned: self.state("creating cache") self._rootCacheLock(shared=0) - mock.util.do("tar czf %s -C %s ." % (self.rootCacheFile, self.rootdir)) + mock.util.do("tar czf %s -C %s ." % (self.rootCacheFile, self.rootObj.makeChrootPath())) self._rootCacheUnlock() -- cgit From 0da58fadfe9367dca44785ed0459bb65dbfa14d2 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Sun, 16 Dec 2007 08:48:34 -0600 Subject: fixed syntax error --- py/mock/backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/mock/backend.py b/py/mock/backend.py index 6b8bc1a..42f396f 100644 --- a/py/mock/backend.py +++ b/py/mock/backend.py @@ -83,7 +83,7 @@ class Root(object): self.pluginConf[key]["root"] = self.sharedRootName # mount/umount - self.umountCmds = ['umount -n %s' % self.makeChrootPath('proc') + self.umountCmds = ['umount -n %s' % self.makeChrootPath('proc'), 'umount -n %s' % self.makeChrootPath('sys') ] self.mountCmds = ['mount -n -t proc mock_chroot_proc %s' % self.makeChrootPath('proc'), -- cgit From 874f6f228128cb0a72a57d0b644d5ad3c8c7caea Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Sun, 16 Dec 2007 08:48:57 -0600 Subject: first cut at updated release instructions --- docs/release-instructions.txt | 80 +++++++++++++++++++++++++++++++------------ 1 file changed, 58 insertions(+), 22 deletions(-) diff --git a/docs/release-instructions.txt b/docs/release-instructions.txt index 8b1cc20..7a5cd90 100644 --- a/docs/release-instructions.txt +++ b/docs/release-instructions.txt @@ -1,27 +1,63 @@ +# Work in progress... + Release checklist overview: - -) ensure all source changes are checked into git - -) run 'make distclean' to remove generated files - -) remove ChangeLog and AUTHORS - -) update version info in 'configure.ac' - -) run 'autogen.sh' to update autoconf files - -) run 'configure' to generate Makefile and mock.spec - -) run 'make dist' to generate ChangeLog and AUTHORS files - -) run make rpm to generate binary RPM and propagate version changes - - 1) update both the ChangeLog file and the specfile %changelog section - - remove existing ChangeLog and AUTHORS file - - run 'make dist' to regenerate them - - edit mock.spec.in with %changelog info - 2) update version in 'configure.ac' - 3) run 'autogen.sh' to update autoconf files - 4) run 'make rpm' to update version in all files - 5) check all changes into git and push upstream - 6) properly tag git tree with signature - 7) check release into fedora cvs - 8) do build for -devel - 9) do build for F-7, push to testing, then stable - 10) do a build for FC-6 + 1) git tree: pull, merge, checkin, tag and push + 2) koji tree: for each release: checkin tarball and spec, kick off builds + 3) bodhi: schedule releases + +===================================================================== + +In the git tree: + + 1) switch to the master branch + $ git checkout master + 2) merge any changes from local branches + $ git merge mybranch + 3) run 'autogen.sh' to update autoconf files + 4) run 'configure' to generate Makefile and mock.spec + 5) run 'make rpm' to generate binary RPM and propagate version changes + 6) run 'make check' until it passes + 7) check in any changes + 8) remove ChangeLog and AUTHORS + 9) run 'make dist' to generate ChangeLog and AUTHORS files + 10) update version info in 'configure.ac' and commit it: + $ git commit -m 'version bump' configure.ac + 11) tag the git tree: + $ git tag -u mock- + 12) push to main git repo: + $ git push + 13) run 'autogen.sh && ./configure' + 14) run 'make rpm' again to generate source tarball + +===================================================================== + +In the fedora CVS (koji) tree + + 1) update the cvs tree + $ cvs update + 2) upload the tarball for the devel release + $ cd devel + $ make new-source FILES=../../mock.git/mock-0.9.3.tar.gz + 3) copy the new specfile from the git tree + $ cp ../../mock.git/mock.spec . + 4) create a changelog entry (clog) + $ make clog + 5) checkin the new specfile using the clog + $ cvs commit -F clog + 6) create the koji tag + $ make tag + 7) initiate a koji build + $ make build + 8) repeat above for released tree and released tree -1 + +===================================================================== +Michaels old stuff + + 1) check release into fedora cvs + 2) do build for -devel + 3) do build for F-8, push to testing, then stable + 4) do a build for F-7 ## script form: # vim ChangeLog mock.spec.in -- cgit From cd12f3519ffd7f0bfb01203a6980d6930c11ca23 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Sun, 16 Dec 2007 08:51:54 -0600 Subject: more on release instructions --- docs/release-instructions.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/release-instructions.txt b/docs/release-instructions.txt index 7a5cd90..cffb38a 100644 --- a/docs/release-instructions.txt +++ b/docs/release-instructions.txt @@ -27,8 +27,6 @@ In the git tree: $ git tag -u mock- 12) push to main git repo: $ git push - 13) run 'autogen.sh && ./configure' - 14) run 'make rpm' again to generate source tarball ===================================================================== -- cgit