summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael E Brown <mebrown@michaels-house.net>2007-12-16 22:11:30 -0600
committerMichael E Brown <mebrown@michaels-house.net>2007-12-16 22:11:30 -0600
commitec01cc18d36138777597a68a3ddd9f7aea29e705 (patch)
tree1d6d49f4750f58d2570f39397612d653642cf959
parentbc0ff1a2c7788e92264bb13c4706ec6a1714925f (diff)
parentcd12f3519ffd7f0bfb01203a6980d6930c11ca23 (diff)
downloadmock-ec01cc18d36138777597a68a3ddd9f7aea29e705.tar.gz
mock-ec01cc18d36138777597a68a3ddd9f7aea29e705.tar.xz
mock-ec01cc18d36138777597a68a3ddd9f7aea29e705.zip
Merge branch 'master' of ssh://mebrown@git.fedorahosted.org/git/mock
* 'master' of ssh://mebrown@git.fedorahosted.org/git/mock: more on release instructions first cut at updated release instructions fixed syntax error replaced references to rootdir with calls to makeChrootPath() replaced references to rootdir with calls to makeChrootPath() replaced references to rootdir with calls to makeChrootPath() updated changelog info added help target
-rw-r--r--Makefile.am13
-rw-r--r--docs/release-instructions.txt66
-rw-r--r--mock.spec.in7
-rw-r--r--py/mock/backend.py22
4 files changed, 86 insertions, 22 deletions
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
diff --git a/docs/release-instructions.txt b/docs/release-instructions.txt
index 9cc1288..cffb38a 100644
--- a/docs/release-instructions.txt
+++ b/docs/release-instructions.txt
@@ -1,15 +1,61 @@
+# Work in progress...
+
Release checklist overview:
- 1) update both the ChangeLog file and the specfile %changelog section
- 2) update version in 'configure.ac'
- 3) run 'autoreconf' 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 <your key> mock-<version>
+ 12) push to main git repo:
+ $ git push
+
+=====================================================================
+
+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
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 <williams@redhat.com> - 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 <mebrown@michaels-house.net> - 0.9.2-1
- add '--update' mode
- fix '--shell' mode
diff --git a/py/mock/backend.py b/py/mock/backend.py
index c850118..42f396f 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: