[opensuse-buildservice] preliminary osc patch to add "createpacfromsrcrpm" cmd
Hi! (I'm not sure if this is on-topic for the buildservice list, sorry if not!) As I needed a quick way to create packages from Source RPMs, I thought about controlling osc from a shell script first. But then, I found the TODO entry - and here's my first version of a patch to osc. :-)) The patch should cleanly apply to the current SVN head of osc. However, it's definitely not perfect yet - especially I'm not sure about how to get the unpackaged package transferred to the server nicely. Perhaps it would be more wise to use the Package class in a clever way? Also, the way how I prepare the meta_data template is ugly for sure. Sorry for that, but my Python got a bit rusted - perhaps someone could suggest a better way here? :-) In general, I'd welcome any feedback - is this stuff usable at all or should it be done completely different? Thanks in advance! -- Bye, Gernot
Am Samstag, 16. Dezember 2006 12:32 schrieb Gernot Hillier:
Hi!
(I'm not sure if this is on-topic for the buildservice list, sorry if not!) sure it is...
As I needed a quick way to create packages from Source RPMs, I thought about controlling osc from a shell script first. But then, I found the TODO entry - and here's my first version of a patch to osc. :-)) Cool :-) I think that's the first non-suse-employee code bit for the BS and friends, right? Brilliant! Give us MORE :-) Be part and kick our ashes code-wise!
The patch should cleanly apply to the current SVN head of osc.
However, it's definitely not perfect yet -
oeeaaahahhhh ;-))
In general, I'd welcome any feedback Thanks & have fun,
Klaas
--------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Tue, Dec 19, 2006 at 11:11:48PM +0100, Klaas Freitag wrote:
Cool :-) I think that's the first non-suse-employee code bit for the BS and friends, right?
Not really -- we got quite some contributions from Summer of Code :) Best, Christoph --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
* Christoph Thiel <cthiel@suse.de> [2006-12-20 00:09]:
On Tue, Dec 19, 2006 at 11:11:48PM +0100, Klaas Freitag wrote:
Cool :-) I think that's the first non-suse-employee code bit for the BS and friends, right?
Not really -- we got quite some contributions from Summer of Code :)
Btw, what's about the KDE client. Will it be developed further? Regards, Bernhard
Hi! Am Dienstag, 19. Dezember 2006 23:11 schrieb Klaas Freitag:
As I needed a quick way to create packages from Source RPMs, I thought about controlling osc from a shell script first. But then, I found the TODO entry - and here's my first version of a patch to osc. :-))
Cool :-) I think that's the first non-suse-employee code bit for the BS and friends, right? Brilliant! Give us MORE :-) Be part and kick our ashes code-wise!
So that means you plan to include it in osc? If yes, I'd like to include the suggestions of Mauricio (later on in this thread) before and I also remembered that I forgot to rmdir the temp dir at the end of the operation... -- Ciao, Gernot --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Am Thursday 21 December 2006 11:21 schrieb Gernot Hillier:
Hi!
Am Dienstag, 19. Dezember 2006 23:11 schrieb Klaas Freitag:
As I needed a quick way to create packages from Source RPMs, I thought about controlling osc from a shell script first. But then, I found the TODO entry - and here's my first version of a patch to osc. :-))
Cool :-) I think that's the first non-suse-employee code bit for the BS and friends, right? Brilliant! Give us MORE :-) Be part and kick our ashes code-wise!
So that means you plan to include it in osc?
Peter is on vacation atm and he is guy who should tell about that. But I think it will go inside when he is back in early January next year.
If yes, I'd like to include the suggestions of Mauricio (later on in this thread) before and I also remembered that I forgot to rmdir the temp dir at the end of the operation...
thanks a lot adrian -- Adrian Schroeter SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany email: adrian@suse.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Em Sáb, 2006-12-16 às 12:32 +0100, Gernot Hillier escreveu:
As I needed a quick way to create packages from Source RPMs, I thought about controlling osc from a shell script first. But then, I found the TODO entry -
Nice patch! I already have a bash script to make this conversion, with less comands. Looks like you're converting rpm->cpio in a tmp file then extracting. Why not just piping the two commands? rpm2cpio <file> | cpio -idv With -v you can also get the file list on a 'popen3' like clause (popen3 is Perl, I don't know if it exists in python) and so you don't need to list the dir to guess the spec file name (earning some microsecs). Well, I guess I don't have any more suggestions for now, since I don't have enough time to properly test the patch. But it sure looks pretty cool! Congratulations! :) -- % Mauricio Teixeira (netmask) | Maceio/AL/BR % % mteixeira{a}webset{d}net | http://smartpm.org % % http://mteixeira.webset.net | http://pmping.sf.net % --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hi! Am Mittwoch, 20. Dezember 2006 14:15 schrieb Mauricio Teixeira (netmask):
Em Sáb, 2006-12-16 às 12:32 +0100, Gernot Hillier escreveu:
As I needed a quick way to create packages from Source RPMs, I thought about controlling osc from a shell script first. But then, I found the TODO entry -
Nice patch! I already have a bash script to make this conversion, with less comands.
Yeah, bash scripting is also nice - if you don't plan to have it maintained. :)
Looks like you're converting rpm->cpio in a tmp file then extracting. Why not just piping the two commands?
rpm2cpio <file> | cpio -idv
Yeah, that looks like a good idea. Came to my mind after sending the patch, too. I'll try to integrate it ASAP - perhaps sooner if I get a feedback from the osc team that my patch might be worth for inclusion. :-)
With -v you can also get the file list on a 'popen3' like clause (popen3 is Perl, I don't know if it exists in python) and so you don't need to list the dir to guess the spec file name (earning some microsecs).
Hmmm, Python has popen and friends, but I had a lot of problems with them back in my CapiSuite project (some years ago, though...). So I don't feel like risking stability for a few CPU cycles yet...
But it sure looks pretty cool! Congratulations! :)
Thx. :-) -- Ciao, Gernot --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
* Gernot Hillier <gernot@hillier.de> [2006-12-21 11:25]:
Looks like you're converting rpm->cpio in a tmp file then extracting. Why not just piping the two commands?
rpm2cpio <file> | cpio -idv
Yeah, that looks like a good idea. Came to my mind after sending the patch, too. I'll try to integrate it ASAP - perhaps sooner if I get a feedback from the osc team that my patch might be worth for inclusion. :-)
Why not just using unrpm? That's what I use normally (when I not use mc :)). Regards, Bernhard
Am Thursday 21 December 2006 11:45 schrieb Bernhard Walle:
* Gernot Hillier <gernot@hillier.de> [2006-12-21 11:25]:
Looks like you're converting rpm->cpio in a tmp file then extracting. Why not just piping the two commands?
rpm2cpio <file> | cpio -idv
Yeah, that looks like a good idea. Came to my mind after sending the patch, too. I'll try to integrate it ASAP - perhaps sooner if I get a feedback from the osc team that my patch might be worth for inclusion. :-)
Why not just using unrpm? That's what I use normally (when I not use mc :)).
You need a Requires: build for that, but I think this makes sense for osc anyway. bye adrian -- Adrian Schroeter SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany email: adrian@suse.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hi! Am Donnerstag, 21. Dezember 2006 11:46 schrieb Adrian Schröter:
Am Thursday 21 December 2006 11:45 schrieb Bernhard Walle:
* Gernot Hillier <gernot@hillier.de> [2006-12-21 11:25]:
Looks like you're converting rpm->cpio in a tmp file then extracting. Why not just piping the two commands?
rpm2cpio <file> | cpio -idv
Yeah, that looks like a good idea. Came to my mind after sending the patch, too. I'll try to integrate it ASAP - perhaps sooner if I get a feedback from the osc team that my patch might be worth for inclusion.
:-)
Why not just using unrpm? That's what I use normally (when I not use mc :)).
You need a Requires: build for that, but I think this makes sense for osc anyway.
Hmmm... # cat `which unrpm` #! /bin/bash [...] for f in $FILES; do if test "$QUIET" = "false" ; then echo -ne "$f:\t" fi rpm2cpio $f | cpio ${CPIO_OPTS} done [...] Hmmm - I'm not really sure where the benefit lies in calling "rpm2cpio | cpio" from a shell script instead of calling it directly... -- Ciao, Gernot --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Thu, Dec 21, 2006 at 11:46:45AM +0100, Adrian Schröter wrote:
Am Thursday 21 December 2006 11:45 schrieb Bernhard Walle:
* Gernot Hillier <gernot@hillier.de> [2006-12-21 11:25]:
Looks like you're converting rpm->cpio in a tmp file then extracting. Why not just piping the two commands?
rpm2cpio <file> | cpio -idv
Yeah, that looks like a good idea. Came to my mind after sending the patch, too. I'll try to integrate it ASAP - perhaps sooner if I get a feedback from the osc team that my patch might be worth for inclusion. :-)
Why not just using unrpm? That's what I use normally (when I not use mc :)).
You need a Requires: build for that, but I think this makes sense for osc anyway.
No, it makes less sense than I initially thought. Experience shows that lots of people install osc and are confused by the requirement to also get another package (and a specific version of it, which is only in the buildservice before 10.2), and lots of people don't want to build packages at all and don't bother. Therefore I removed the requirement again, and osc instead tells you what you need when you call its build subcommand, after checking for the presence of a sufficiently new version of build.rpm. Peter -- SUSE LINUX Products GmbH Bug, bogey, bugbear, bugaboo: Research & Development A malevolent monster (not true?); Some mischief microbic; What makes someone phobic; The work one does not want to do. From: Chris Young (The Omnificent English Dictionary In Limerick Form)
On Thursday 21 December 2006 6:25 am, Gernot Hillier wrote:
Hmmm, Python has popen and friends, but I had a lot of problems with them back in my CapiSuite project (some years ago, though...). So I don't feel like risking stability for a few CPU cycles yet...
commands.getstatusoutput() returns a 2-tuple of the return code and the output. -- James Oakley jfunk@funktronics.ca --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hi Gernot, as Adrian wrote, I have been on vacation, and I'm back now. I will look at your patch in the next weeks. Thanks! Regards, Peter -- SUSE LINUX Products GmbH Bug, bogey, bugbear, bugaboo: Research & Development A malevolent monster (not true?); Some mischief microbic; What makes someone phobic; The work one does not want to do. From: Chris Young (The Omnificent English Dictionary In Limerick Form)
participants (8)
-
Adrian Schröter
-
Bernhard Walle
-
Christoph Thiel
-
Dr. Peter Poeml
-
Gernot Hillier
-
James Oakley
-
Klaas Freitag
-
Mauricio Teixeira (netmask)