From jwboyer at jdub.homelinux.org Sat Jun 4 14:47:48 2005 From: jwboyer at jdub.homelinux.org (Josh Boyer) Date: Sat, 04 Jun 2005 09:47:48 -0500 Subject: [PATCH] cleanup empty directories in /needsign Message-ID: <1117896468.3107.105.camel@yoda.jdub.homelinux.org> 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() From symbiont at berlios.de Tue Jun 7 16:11:05 2005 From: symbiont at berlios.de (Jeff Pitman) Date: Wed, 8 Jun 2005 00:11:05 +0800 Subject: [patch] - flexible config for mock Message-ID: <200506080011.05522.symbiont@berlios.de> 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'): From symbiont at berlios.de Mon Jun 13 12:11:43 2005 From: symbiont at berlios.de (Jeff Pitman) Date: Mon, 13 Jun 2005 20:11:43 +0800 Subject: [patch] - mock config and unique log names Message-ID: <200506132011.43353.symbiont@berlios.de> 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 From jwboyer at jdub.homelinux.org Wed Jun 15 11:19:02 2005 From: jwboyer at jdub.homelinux.org (Josh Boyer) Date: Wed, 15 Jun 2005 06:19:02 -0500 Subject: mock problems Message-ID: <1118834342.28705.1.camel@yoda.jdub.homelinux.org> 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 From andreas at bawue.net Wed Jun 15 11:52:29 2005 From: andreas at bawue.net (Andreas Thienemann) Date: Wed, 15 Jun 2005 13:52:29 +0200 (CEST) Subject: mock problems In-Reply-To: <1118834342.28705.1.camel@yoda.jdub.homelinux.org> References: <1118834342.28705.1.camel@yoda.jdub.homelinux.org> Message-ID: On Wed, 15 Jun 2005, Josh Boyer wrote: > 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... You're working as root? Don't do that then. regards, andreas From jwboyer at jdub.homelinux.org Wed Jun 15 14:16:11 2005 From: jwboyer at jdub.homelinux.org (Josh Boyer) Date: Wed, 15 Jun 2005 09:16:11 -0500 (CDT) Subject: mock problems In-Reply-To: References: <1118834342.28705.1.camel@yoda.jdub.homelinux.org> Message-ID: <53912.129.42.161.36.1118844971.squirrel@jdub.homelinux.org> > On Wed, 15 Jun 2005, Josh Boyer wrote: > >> 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... > You're working as root? No, I'm working as my local user. The above is the output from mock when I run as myself. And yes, my userid is in the mock group. josh From skvidal at phy.duke.edu Wed Jun 15 14:10:44 2005 From: skvidal at phy.duke.edu (seth vidal) Date: Wed, 15 Jun 2005 10:10:44 -0400 Subject: mock problems In-Reply-To: <53912.129.42.161.36.1118844971.squirrel@jdub.homelinux.org> References: <1118834342.28705.1.camel@yoda.jdub.homelinux.org> <53912.129.42.161.36.1118844971.squirrel@jdub.homelinux.org> Message-ID: <1118844644.7105.0.camel@cutter> On Wed, 2005-06-15 at 09:16 -0500, Josh Boyer wrote: > > On Wed, 15 Jun 2005, Josh Boyer wrote: > > > >> 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... > > > You're working as root? > > No, I'm working as my local user. The above is the output from mock when > I run as myself. And yes, my userid is in the mock group. selinux enabled? -sv From jwboyer at jdub.homelinux.org Wed Jun 15 17:16:41 2005 From: jwboyer at jdub.homelinux.org (Josh Boyer) Date: Wed, 15 Jun 2005 12:16:41 -0500 (CDT) Subject: mock problems In-Reply-To: <1118844644.7105.0.camel@cutter> References: <1118834342.28705.1.camel@yoda.jdub.homelinux.org> <53912.129.42.161.36.1118844971.squirrel@jdub.homelinux.org> <1118844644.7105.0.camel@cutter> Message-ID: <55897.129.42.161.36.1118855801.squirrel@jdub.homelinux.org> > On Wed, 2005-06-15 at 09:16 -0500, Josh Boyer wrote: >> > On Wed, 15 Jun 2005, Josh Boyer wrote: >> > >> >> 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... >> >> > You're working as root? >> >> No, I'm working as my local user. The above is the output from mock >> when >> I run as myself. And yes, my userid is in the mock group. > > selinux enabled? Tried it both ways actually. I disabled selinux with "setenforce 0" and it still fails with the same error. josh From dcbw at redhat.com Wed Jun 15 17:13:10 2005 From: dcbw at redhat.com (Dan Williams) Date: Wed, 15 Jun 2005 13:13:10 -0400 Subject: mock problems In-Reply-To: <55897.129.42.161.36.1118855801.squirrel@jdub.homelinux.org> References: <1118834342.28705.1.camel@yoda.jdub.homelinux.org> <53912.129.42.161.36.1118844971.squirrel@jdub.homelinux.org> <1118844644.7105.0.camel@cutter> <55897.129.42.161.36.1118855801.squirrel@jdub.homelinux.org> Message-ID: <1118855590.5082.13.camel@dcbw.boston.redhat.com> On Wed, 2005-06-15 at 12:16 -0500, Josh Boyer wrote: > > On Wed, 2005-06-15 at 09:16 -0500, Josh Boyer wrote: > >> > On Wed, 15 Jun 2005, Josh Boyer wrote: > >> > > >> >> 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... > >> > >> > You're working as root? > >> > >> No, I'm working as my local user. The above is the output from mock > >> when > >> I run as myself. And yes, my userid is in the mock group. > > > > selinux enabled? > > Tried it both ways actually. I disabled selinux with "setenforce 0" and > it still fails with the same error. Instead of that, try "selinux=0" on the kernel boot line, and set selinux=Disabled in /etc/sysconfig/selinux Does that make a difference? Dan From skvidal at phy.duke.edu Wed Jun 15 18:16:41 2005 From: skvidal at phy.duke.edu (seth vidal) Date: Wed, 15 Jun 2005 14:16:41 -0400 Subject: mock problems In-Reply-To: <55897.129.42.161.36.1118855801.squirrel@jdub.homelinux.org> References: <1118834342.28705.1.camel@yoda.jdub.homelinux.org> <53912.129.42.161.36.1118844971.squirrel@jdub.homelinux.org> <1118844644.7105.0.camel@cutter> <55897.129.42.161.36.1118855801.squirrel@jdub.homelinux.org> Message-ID: <1118859401.8922.4.camel@cutter> On Wed, 2005-06-15 at 12:16 -0500, Josh Boyer wrote: > > On Wed, 2005-06-15 at 09:16 -0500, Josh Boyer wrote: > >> > On Wed, 15 Jun 2005, Josh Boyer wrote: > >> > > >> >> 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... > >> > >> > You're working as root? > >> > >> No, I'm working as my local user. The above is the output from mock > >> when > >> I run as myself. And yes, my userid is in the mock group. > > > > selinux enabled? > > Tried it both ways actually. I disabled selinux with "setenforce 0" and > it still fails with the same error. > disable it with setenforce 0 and modify /etc/selinux/config -sv From jwboyer at jdub.homelinux.org Thu Jun 16 01:41:14 2005 From: jwboyer at jdub.homelinux.org (Josh Boyer) Date: Wed, 15 Jun 2005 20:41:14 -0500 Subject: mock problems In-Reply-To: <1118855590.5082.13.camel@dcbw.boston.redhat.com> References: <1118834342.28705.1.camel@yoda.jdub.homelinux.org> <53912.129.42.161.36.1118844971.squirrel@jdub.homelinux.org> <1118844644.7105.0.camel@cutter> <55897.129.42.161.36.1118855801.squirrel@jdub.homelinux.org> <1118855590.5082.13.camel@dcbw.boston.redhat.com> Message-ID: <1118886074.3339.4.camel@yoda.jdub.homelinux.org> On Wed, 2005-06-15 at 13:13 -0400, Dan Williams wrote: > On Wed, 2005-06-15 at 12:16 -0500, Josh Boyer wrote: > > > On Wed, 2005-06-15 at 09:16 -0500, Josh Boyer wrote: > > >> > On Wed, 15 Jun 2005, Josh Boyer wrote: > > >> > > > >> >> 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... > > >> > > >> > You're working as root? > > >> > > >> No, I'm working as my local user. The above is the output from mock > > >> when > > >> I run as myself. And yes, my userid is in the mock group. > > > > > > selinux enabled? > > > > Tried it both ways actually. I disabled selinux with "setenforce 0" and > > it still fails with the same error. > > Instead of that, try "selinux=0" on the kernel boot line, and set > selinux=Disabled in /etc/sysconfig/selinux > > Does that make a difference? Actually, yeah. Now I get a different error, but I think this is something else. I don't know if it was the reboot that did it or what, but thanks :). josh From ivazquez at ivazquez.net Thu Jun 16 07:15:55 2005 From: ivazquez at ivazquez.net (Ignacio Vazquez-Abrams) Date: Thu, 16 Jun 2005 03:15:55 -0400 Subject: mock problems In-Reply-To: <1118859401.8922.4.camel@cutter> References: <1118834342.28705.1.camel@yoda.jdub.homelinux.org> <53912.129.42.161.36.1118844971.squirrel@jdub.homelinux.org> <1118844644.7105.0.camel@cutter> <55897.129.42.161.36.1118855801.squirrel@jdub.homelinux.org> <1118859401.8922.4.camel@cutter> Message-ID: <1118906155.31315.19.camel@ignacio.ignacio.lan> On Wed, 2005-06-15 at 14:16 -0400, seth vidal wrote: > disable it with setenforce 0 and modify /etc/selinux/config FYI, I got mock to work with SELinux by doing a "chcon -R -t default_t /var/lib/mock". It's not a real solution, but it works for now under targeted. -- Ignacio Vazquez-Abrams http://fedora.ivazquez.net/ gpg --keyserver hkp://subkeys.pgp.net --recv-key 38028b72 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From andreas at bawue.net Mon Jun 20 17:07:12 2005 From: andreas at bawue.net (Andreas Thienemann) Date: Mon, 20 Jun 2005 19:07:12 +0200 (CEST) Subject: Possible addition to buildgroups.xml: pkg-config Message-ID: 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 From dcbw at redhat.com Mon Jun 20 17:26:01 2005 From: dcbw at redhat.com (Dan Williams) Date: Mon, 20 Jun 2005 13:26:01 -0400 Subject: mock feature requests Message-ID: <1119288361.3225.37.camel@dcbw.boston.redhat.com> 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 From dcbw at redhat.com Mon Jun 20 17:28:56 2005 From: dcbw at redhat.com (Dan Williams) Date: Mon, 20 Jun 2005 13:28:56 -0400 Subject: Possible addition to buildgroups.xml: pkg-config In-Reply-To: References: Message-ID: <1119288536.3225.40.camel@dcbw.boston.redhat.com> On Mon, 2005-06-20 at 19:07 +0200, Andreas Thienemann wrote: > 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? pkgconfig (the RPM name is pkgconfig and the binary is pkg-config) is quite small and depends _only_ on glibc, so this seems logical to me. Dan From dcbw at redhat.com Mon Jun 20 18:17:30 2005 From: dcbw at redhat.com (Dan Williams) Date: Mon, 20 Jun 2005 14:17:30 -0400 Subject: [PATCH] Re: mock feature requests In-Reply-To: <1119288361.3225.37.camel@dcbw.boston.redhat.com> References: <1119288361.3225.37.camel@dcbw.boston.redhat.com> Message-ID: <1119291450.3225.48.camel@dcbw.boston.redhat.com> On Mon, 2005-06-20 at 13:26 -0400, Dan Williams wrote: > 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. The attached patch negates this issue, since the process calling mock can determine the buildroot directory from the first line of mock's stdout. > 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 > 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. The attached patch fixes this by adding a "--buildroot-suffix" switch that allows the caller to pass an string (allowed characters are _-[a-z][A-Z][0-9]) which is appended to the buildroots directory. Default is nothing, and the new functionality is only triggered by usage of this switch. > 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. This is fixed in the attached patch because the client can find the buildroot dir from the first line of mock output. The patch also fixes a traceback where 'my' is undefined if the call to Root() fails for any reason (usually, in the cleaning stage). my.close() was unconditionally called no matter whether or not 'my' had already been defined. Seth: if the patch looks OK and the solutions are acceptable, I can commit when you give the ack. Dan -------------- next part -------------- A non-text attachment was scrubbed... Name: mock-buildroot-stuff.patch Type: text/x-patch Size: 2805 bytes Desc: not available URL: From skvidal at phy.duke.edu Tue Jun 21 05:22:56 2005 From: skvidal at phy.duke.edu (seth vidal) Date: Tue, 21 Jun 2005 01:22:56 -0400 Subject: Possible addition to buildgroups.xml: pkg-config In-Reply-To: References: Message-ID: <1119331377.29877.16.camel@cutter> On Mon, 2005-06-20 at 19:07 +0200, Andreas Thienemann wrote: > 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. I don't see any problem with that. anyone object? -sv From skvidal at phy.duke.edu Tue Jun 21 05:29:07 2005 From: skvidal at phy.duke.edu (seth vidal) Date: Tue, 21 Jun 2005 01:29:07 -0400 Subject: [PATCH] Re: mock feature requests In-Reply-To: <1119291450.3225.48.camel@dcbw.boston.redhat.com> References: <1119288361.3225.37.camel@dcbw.boston.redhat.com> <1119291450.3225.48.camel@dcbw.boston.redhat.com> Message-ID: <1119331747.29877.23.camel@cutter> On Mon, 2005-06-20 at 14:17 -0400, Dan Williams wrote: > On Mon, 2005-06-20 at 13:26 -0400, Dan Williams wrote: > > 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. > > The attached patch negates this issue, since the process calling mock > can determine the buildroot directory from the first line of mock's > stdout. relying on screenscraping results seems like a bad idea. We'd be better off writing out config information to the resultdir or the statedir and having both of those be specifiable on the cli. In fact - writint out config info variables to the resultdir might make a lot of sense as it will give us more info on the buildroot environment. > The attached patch fixes this by adding a "--buildroot-suffix" switch > that allows the caller to pass an string (allowed characters are > _-[a-z][A-Z][0-9]) which is appended to the buildroots directory. > Default is nothing, and the new functionality is only triggered by usage > of this switch. but does the suggestion before deal with that? > The patch also fixes a traceback where 'my' is undefined if the call to > Root() fails for any reason (usually, in the cleaning stage). > my.close() was unconditionally called no matter whether or not 'my' had > already been defined. > > Seth: if the patch looks OK and the solutions are acceptable, I can > commit when you give the ack. I guess I'm thinking writing out config information into the resultdir immediately when mock starts up would be safer in some ways. Does that sound reasonable to you? -sv From andreas at bawue.net Tue Jun 21 05:41:44 2005 From: andreas at bawue.net (Andreas Thienemann) Date: Tue, 21 Jun 2005 07:41:44 +0200 (CEST) Subject: Possible addition to buildgroups.xml: pkg-config In-Reply-To: <1119331377.29877.16.camel@cutter> References: <1119331377.29877.16.camel@cutter> Message-ID: On Tue, 21 Jun 2005, seth vidal wrote: > > 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. > I don't see any problem with that. Good. > anyone object? I hope not. ;) Something else, I forgot: The same goes for '/usr/bin/which'. configure uses it, but it isn't defined as BuildPreReq. I already added a few bugs about this to bugzilla, but the more I think about, the more sense it probably would make to just add it to buildgroups as well. Again, it is only linked against glibc, so that we won't land in dependency hell. regards, andreas From dcbw at redhat.com Tue Jun 21 13:48:12 2005 From: dcbw at redhat.com (Dan Williams) Date: Tue, 21 Jun 2005 09:48:12 -0400 Subject: [PATCH] mock simple fixes Message-ID: <1119361692.17041.14.camel@dcbw.boston.redhat.com> 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: simple-fixes.patch Type: text/x-patch Size: 935 bytes Desc: not available URL: From dcbw at redhat.com Tue Jun 21 13:49:46 2005 From: dcbw at redhat.com (Dan Williams) Date: Tue, 21 Jun 2005 09:49:46 -0400 Subject: [PATCH] mock simple fixes In-Reply-To: <1119361692.17041.14.camel@dcbw.boston.redhat.com> References: <1119361692.17041.14.camel@dcbw.boston.redhat.com> Message-ID: <1119361786.17041.16.camel@dcbw.boston.redhat.com> On Tue, 2005-06-21 at 09:48 -0400, Dan Williams wrote: > 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) The other fix to this is to move the self._ensure_dir(self.basedir) above the clean, but I'm assuming there was some reason that it was originally _below_ the clean (perhaps a wrong assumption). Dan From dcbw at redhat.com Tue Jun 21 13:52:49 2005 From: dcbw at redhat.com (Dan Williams) Date: Tue, 21 Jun 2005 09:52:49 -0400 Subject: [PATCH] mock simple fixes In-Reply-To: <1119361786.17041.16.camel@dcbw.boston.redhat.com> References: <1119361692.17041.14.camel@dcbw.boston.redhat.com> <1119361786.17041.16.camel@dcbw.boston.redhat.com> Message-ID: <1119361969.17041.18.camel@dcbw.boston.redhat.com> On Tue, 2005-06-21 at 09:49 -0400, Dan Williams wrote: > On Tue, 2005-06-21 at 09:48 -0400, Dan Williams wrote: > > 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) > > The other fix to this is to move the self._ensure_dir(self.basedir) > above the clean, but I'm assuming there was some reason that it was > originally _below_ the clean (perhaps a wrong assumption). Eh, I see the logic now. _Correct_ patch attached. Dan -------------- next part -------------- A non-text attachment was scrubbed... Name: simple-fixes.patch Type: text/x-patch Size: 1597 bytes Desc: not available URL: From skvidal at phy.duke.edu Tue Jun 21 13:54:53 2005 From: skvidal at phy.duke.edu (seth vidal) Date: Tue, 21 Jun 2005 09:54:53 -0400 Subject: [PATCH] mock simple fixes In-Reply-To: <1119361692.17041.14.camel@dcbw.boston.redhat.com> References: <1119361692.17041.14.camel@dcbw.boston.redhat.com> Message-ID: <1119362093.1342.5.camel@cutter> On Tue, 2005-06-21 at 09:48 -0400, Dan Williams wrote: > 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) > yah - go. thanks. -sv From skvidal at phy.duke.edu Tue Jun 21 13:56:21 2005 From: skvidal at phy.duke.edu (seth vidal) Date: Tue, 21 Jun 2005 09:56:21 -0400 Subject: [PATCH] mock simple fixes In-Reply-To: <1119361969.17041.18.camel@dcbw.boston.redhat.com> References: <1119361692.17041.14.camel@dcbw.boston.redhat.com> <1119361786.17041.16.camel@dcbw.boston.redhat.com> <1119361969.17041.18.camel@dcbw.boston.redhat.com> Message-ID: <1119362181.1342.9.camel@cutter> On Tue, 2005-06-21 at 09:52 -0400, Dan Williams wrote: > On Tue, 2005-06-21 at 09:49 -0400, Dan Williams wrote: > > On Tue, 2005-06-21 at 09:48 -0400, Dan Williams wrote: > > > 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) > > > > The other fix to this is to move the self._ensure_dir(self.basedir) > > above the clean, but I'm assuming there was some reason that it was > > originally _below_ the clean (perhaps a wrong assumption). > > Eh, I see the logic now. _Correct_ patch attached. > ah, okay - yes, got it. thanks, -sv From dcbw at redhat.com Tue Jun 21 14:14:11 2005 From: dcbw at redhat.com (Dan Williams) Date: Tue, 21 Jun 2005 10:14:11 -0400 Subject: [PATCH] Re: mock feature requests In-Reply-To: <1119331747.29877.23.camel@cutter> References: <1119288361.3225.37.camel@dcbw.boston.redhat.com> <1119291450.3225.48.camel@dcbw.boston.redhat.com> <1119331747.29877.23.camel@cutter> Message-ID: <1119363251.17041.20.camel@dcbw.boston.redhat.com> On Tue, 2005-06-21 at 01:29 -0400, seth vidal wrote: > I guess I'm thinking writing out config information into the resultdir > immediately when mock starts up would be safer in some ways. Does that > sound reasonable to you? Yeah. So we already allow "resultdir" to be specified, statedir needs to get added. What format would the "writing out config information" take? Dan From skvidal at phy.duke.edu Tue Jun 21 14:20:57 2005 From: skvidal at phy.duke.edu (seth vidal) Date: Tue, 21 Jun 2005 10:20:57 -0400 Subject: [PATCH] Re: mock feature requests In-Reply-To: <1119363251.17041.20.camel@dcbw.boston.redhat.com> References: <1119288361.3225.37.camel@dcbw.boston.redhat.com> <1119291450.3225.48.camel@dcbw.boston.redhat.com> <1119331747.29877.23.camel@cutter> <1119363251.17041.20.camel@dcbw.boston.redhat.com> Message-ID: <1119363657.24920.3.camel@opus.phy.duke.edu> On Tue, 2005-06-21 at 10:14 -0400, Dan Williams wrote: > On Tue, 2005-06-21 at 01:29 -0400, seth vidal wrote: > > I guess I'm thinking writing out config information into the resultdir > > immediately when mock starts up would be safer in some ways. Does that > > sound reasonable to you? > > Yeah. So we already allow "resultdir" to be specified, statedir needs > to get added. What format would the "writing out config information" > take? > - statedir got added this morning - I checked it in about 30 min ago. You should join -commits-list - I also added the config information write out this morning - it's just a short key = value file. I can change it if something else is more useful. -sv From dcbw at redhat.com Tue Jun 21 16:02:04 2005 From: dcbw at redhat.com (Dan Williams) Date: Tue, 21 Jun 2005 12:02:04 -0400 Subject: [PATCH] mock statedir fixes Message-ID: <1119369724.17041.23.camel@dcbw.boston.redhat.com> 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: mock-statedir-fixes.patch Type: text/x-patch Size: 1977 bytes Desc: not available URL: From dcbw at redhat.com Tue Jun 21 16:04:10 2005 From: dcbw at redhat.com (Dan Williams) Date: Tue, 21 Jun 2005 12:04:10 -0400 Subject: [PATCH] mock statedir fixes In-Reply-To: <1119369724.17041.23.camel@dcbw.boston.redhat.com> References: <1119369724.17041.23.camel@dcbw.boston.redhat.com> Message-ID: <1119369850.17041.24.camel@dcbw.boston.redhat.com> On Tue, 2005-06-21 at 12:02 -0400, Dan Williams wrote: > 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. There should be a ':' after the else in the first hunk of this patch BTW... Dan From dcbw at redhat.com Tue Jun 21 16:12:27 2005 From: dcbw at redhat.com (Dan Williams) Date: Tue, 21 Jun 2005 12:12:27 -0400 Subject: [PATCH] Updated mock statedir fixes In-Reply-To: <1119369724.17041.23.camel@dcbw.boston.redhat.com> References: <1119369724.17041.23.camel@dcbw.boston.redhat.com> Message-ID: <1119370347.17041.27.camel@dcbw.boston.redhat.com> On Tue, 2005-06-21 at 12:02 -0400, Dan Williams wrote: > 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. Updated patch attached, found another bug near the bottom where statedir was getting assigned to options.resultdir. Dan -------------- next part -------------- A non-text attachment was scrubbed... Name: mock-statedir-fixes.patch Type: text/x-patch Size: 2199 bytes Desc: not available URL: From skvidal at phy.duke.edu Tue Jun 21 17:40:00 2005 From: skvidal at phy.duke.edu (seth vidal) Date: Tue, 21 Jun 2005 13:40:00 -0400 Subject: [PATCH] Updated mock statedir fixes In-Reply-To: <1119370347.17041.27.camel@dcbw.boston.redhat.com> References: <1119369724.17041.23.camel@dcbw.boston.redhat.com> <1119370347.17041.27.camel@dcbw.boston.redhat.com> Message-ID: <1119375600.24920.26.camel@opus.phy.duke.edu> On Tue, 2005-06-21 at 12:12 -0400, Dan Williams wrote: > On Tue, 2005-06-21 at 12:02 -0400, Dan Williams wrote: > > 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. > > Updated patch attached, found another bug near the bottom where statedir > was getting assigned to options.resultdir. > go ahead and commit it, thanks. -sv From skvidal at phy.duke.edu Tue Jun 21 21:29:34 2005 From: skvidal at phy.duke.edu (seth vidal) Date: Tue, 21 Jun 2005 17:29:34 -0400 Subject: Possible addition to buildgroups.xml: pkg-config In-Reply-To: <1119331377.29877.16.camel@cutter> References: <1119331377.29877.16.camel@cutter> Message-ID: <1119389374.24920.51.camel@opus.phy.duke.edu> On Tue, 2005-06-21 at 01:22 -0400, seth vidal wrote: > On Mon, 2005-06-20 at 19:07 +0200, Andreas Thienemann wrote: > > 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. > > I don't see any problem with that. > > anyone object? I've added which and pkgconfig to the buildgroups.xml file. -sv From dcbw at redhat.com Sat Jun 25 16:30:16 2005 From: dcbw at redhat.com (Dan Williams) Date: Sat, 25 Jun 2005 12:30:16 -0400 (EDT) Subject: mock unique buildroot extension test Message-ID: 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 -------------- next part -------------- ? mock-0.3.tar.gz ? mock-uniqueext.patch ? src/mock-helper Index: mock.py =================================================================== RCS file: /cvs/fedora/mock/mock.py,v retrieving revision 1.17 diff -u -r1.17 mock.py --- mock.py 24 Jun 2005 01:35:28 -0000 1.17 +++ mock.py 25 Jun 2005 16:09:38 -0000 @@ -46,7 +46,10 @@ self._state = 'unstarted' self.tmplog = [] self.config = config - self.basedir = '%s/%s' % (config['basedir'], config['root']) + basedir = config['basedir'] + if config.has_key('unique-ext'): + basedir = "%s-%s" % (config['basedir'], config['unique-ext']) + self.basedir = os.path.join(basedir, config['root']) self.target_arch = config['target_arch'] self.rootdir = os.path.join(self.basedir, 'root') self.homedir = self.config['chroothome'] @@ -585,6 +588,8 @@ default=None, help="path for resulting files to be put") parser.add_option("--statedir", action="store", type="string", default=None, 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") return parser.parse_args() @@ -677,6 +682,8 @@ if options.statedir: config_opts['statedir'] = options.statedir + if options.uniqueext: + config_opts['unique-ext'] = options.uniqueext # do whatever we're here to do if args[0] == 'clean': From skvidal at phy.duke.edu Sat Jun 25 17:35:35 2005 From: skvidal at phy.duke.edu (seth vidal) Date: Sat, 25 Jun 2005 13:35:35 -0400 Subject: mock unique buildroot extension test In-Reply-To: References: Message-ID: <1119720935.2440.4.camel@cutter> On Sat, 2005-06-25 at 12:30 -0400, Dan Williams wrote: > 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 checked in, thanks. -sv From dcbw at redhat.com Sat Jun 25 19:03:11 2005 From: dcbw at redhat.com (Dan Williams) Date: Sat, 25 Jun 2005 15:03:11 -0400 (EDT) Subject: mock unique buildroot extension test In-Reply-To: <1119720935.2440.4.camel@cutter> References: <1119720935.2440.4.camel@cutter> Message-ID: On Sat, 25 Jun 2005, seth vidal wrote: > On Sat, 2005-06-25 at 12:30 -0400, Dan Williams wrote: > > 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 > > checked in, thanks. So, after this got checked in I found an error, my track record with mock patches doesn't seem to be very good :) So config['basedir'] doesn't actually have anything to do with self.basedir in Root(), it needs to be config['root'] that gets stuff appended to it and then self.basedir gets set from that. My bad. I've checking in the fix which (actually) works, hope that's OK. Dan From ivazquez at ivazquez.net Sun Jun 26 12:20:47 2005 From: ivazquez at ivazquez.net (Ignacio Vazquez-Abrams) Date: Sun, 26 Jun 2005 08:20:47 -0400 Subject: Small mock patch Message-ID: <1119788448.4427.16.camel@ignacio.ignacio.lan> This is a patch that adds distclean and rpm targets and fixes a couple of issues I hit in the spec file. -- Ignacio Vazquez-Abrams http://fedora.ivazquez.net/ gpg --keyserver hkp://subkeys.pgp.net --recv-key 38028b72 -------------- next part -------------- A non-text attachment was scrubbed... Name: mock-ignacio.patch Type: text/x-patch Size: 1921 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: