mock unique buildroot extension test
by Dan Williams
Hi,
This patch provides the ability to specify a unique extension to the buildroot
directory. This provides the ability for more than one mock process building
the same .cfg file, but isolated from each other. Useful for build systems :)
Dan
18 years, 5 months
Possible addition to buildgroups.xml: pkg-config
by Andreas Thienemann
Hi,
during a recent rebuild of all RHEL4 packages in mock, I saw a number of
packages which expect pkg-config to be present during the build stage, but
do not define it as a BuildRequire.
A short discussion of this issue on #fedora-devel suggested dropping
pkg-config into the buildgroups.xml definitions, so that it gets installed
by mock in each case.
Comments?
regards,
andreas
18 years, 5 months
[PATCH] mock statedir fixes
by Dan Williams
Hi,
A few missing bits in the statedir stuff...
1) It wasn't actually using --statedir
2) The mock-config didn't have newlines
If its OK, I can commit.
Dan
18 years, 5 months
mock feature requests
by Dan Williams
Hi,
I would like to request a couple additions to mock for the build
system...
The important ones:
---------------------
1) Ability to pass $statedir from mock's command line. Since the
process calling mock has no clue where the buildroot actually is
(without parsing the *.cfg file for the buildroot, see issues with that
below), the builder needs to be able to specify where mock writes its
state so that the builder can read that state. We talked about adding a
"--statedir" parameter to mock.
2) Doing multiple concurrent builds with two separate mock processes for
the same target/buildroot will fail because the mock *.cfg file for a
buildroot doesn't distinguish between different processes. We've talked
about making the config file have something like:
config_opts['root'] = 'aurora-development-sparc-core-%s' % os.getpid()
If there was any way to embed the addition of the PID into mock though,
I think that would be better since there's less possibility of the users
accidentally screwing that line up.
Perhaps another solution would be to add a mock argument like
"--rootdir-suffix" such that the calling process could specify a suffix
to add, and in the buildsystem that would most likely be the jobid of
the build job.
3) The build client is expected to clean up after the mock process, and
it cannot know what directory to delete unless it's able to find out
what the buildroot dir is from mock. Ideally the client wouldn't have
to parse the mock .cfg file, but perhaps mock would write out the
buildroot dir to its stdout first thing, or some other mechanism of
telling the calling process what the buildroot dir is.
Less important:
------------------------------------
4) commands.getstatusoutput() seems to buffer the output of the child
until the child has exited. It would be nice (and somewhat useful) to
stream the command output to a file rather than grab it all at once and
write it out at the end. Packages like OpenOffice.org generate lots of
build output, around 25MB. That's a lot of memory usage at the end of
the job when the output buffer is acquired and written out all at once.
I've also thought of adding a feature to the build system like "get last
500 lines of buildlog output" so that users might be able to see where
in the package the build is (for OOo, the build takes about 3 - 7 hrs on
moderate hardware).
Thanks,
Dan
18 years, 5 months
[PATCH] mock simple fixes
by Dan Williams
1) Fixes traceback when the buildroot directory doesn't exist (which
will be the case when we start specifying buildroots on the mock command
line)
2) Fixes traceback when Root() fails for some reason (wrong user/group
config, mock user doesn't exist with same GID as the mock executable,
etc)
If it looks OK, I can apply.
Dan
18 years, 5 months
mock problems
by Josh Boyer
Anyone know what the following means:
Errors cleaning out chroot: mock-helper: error: /var/lib/mock//fedora-development-i386-core: No such file or directory
Starting Prep
Preparing Root
making /dev devices
making misc files of use
making yum.conf
yum: command /usr/sbin/mock-helper yum --installroot /var/lib/mock//fedora-development-i386-core/root groupinstall build
Creating user for builds
Closed
Non-zero return value 127 on executing /usr/sbin/mock-helper chroot /var/lib/mock//fedora-development-i386-core/root /sbin/runuser - root -c "/usr/sbin/useradd -u 500 -d /builddir mockbuild"
I've added myself to the mock group, and I'm using mock-0.3-2.fc4. I'm
probably forgetting a step somewhere...
josh
18 years, 5 months
[patch] - mock config and unique log names
by Jeff Pitman
For anyone interested, I've patched mock against CVS for the following:
1. Make available configs in the following order, with the latter config
overriding the prior config:
/etc/mock/general.cfg
/etc/mock/$CHROOT.cfg <-- Originally, only this was available.
$HOME/.mockrc
This is in: mock.py-config.patch
2. Make the build.log and root.log prefixed with the name of the srpm
just built.
This is in: mock.py-uniquify.patch
Patches: http://symbiont.mn.sabren.com/sandbox/mock/
YMMV. WORKSFORME.
take care,
--
-jeff
18 years, 5 months
[patch] - flexible config for mock
by Jeff Pitman
This patch helps by cutting down on the repetition seen in the different
chroot cfgs. Right now, root/target_arch/yum.conf goes in my chroot
cfgs and the rest is dumped into general.cfg. The name can change to
whatever, but I think the gist of it is clear. ~/.mockrc is good for
things like custom rpmmacros that you don't want to su for
editing /etc/mock/* stuff all the time.
have fun,
jeff
Index: mock.py
===================================================================
RCS file: /cvs/fedora/mock/mock.py,v
retrieving revision 1.6
diff -u -3 -p -r1.6 mock.py
--- mock.py 28 May 2005 17:18:49 -0000 1.6
+++ mock.py 7 Jun 2005 16:07:15 -0000
@@ -628,6 +628,18 @@ def main():
sys.exit(50)
srpm = args[0] # we only take one and I don't care. :)
+
+ # bring in an optional generic config file
+ general_cfg = os.path.join(config_path, "general.cfg")
+
+ if os.path.exists(general_cfg):
+ execfile(general_cfg)
+
+ # and optional user config file
+ user_cfg = os.path.join(os.path.expanduser("~/.mockrc"))
+
+ if os.path.exists(user_cfg):
+ execfile(user_cfg)
# read in the config file by chroot name
if options.chroot.endswith('.cfg'):
18 years, 6 months
[PATCH] cleanup empty directories in /needsign
by Josh Boyer
Hi,
The patch below cleans up the empty directories in extras-push.py. My
python isn't the best, but it should work well enough. Feel free to
apply it if you'd like.
josh
extras-push.py | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletion(-)
Index: utils/extras-push.py
===================================================================
--- utils.orig/extras-push.py 2005-05-31 23:17:07.000000000 -0500
+++ utils/extras-push.py 2005-06-04 09:43:45.013729048 -0500
@@ -82,6 +82,14 @@ def find_files(path):
filedict[which].append(fullfile)
return filedict
+def prune_empty_dirs(top):
+ for root, dirs, files in os.walk(top, topdown=False):
+ for name in dirs:
+ try:
+ os.rmdir(os.path.join(root, name))
+ except:
+ debugprint('%s was not empty' % os.path.join(root, name))
+
def naevr(pkg):
"""return nevra from the package srpm"""
@@ -279,7 +287,8 @@ def main(dist):
debugprint('removing %s' % file)
os.unlink(file)
- # FIXME clean up empty dirs, too.
+ # clean up empty dirs, too.
+ prune_empty_dirs(needsign)
if __name__ == '__main__':
me = os.getcwd()
18 years, 6 months