Page 1 of 1

Spec file / RPM build query for Scott

Posted: Wed Sep 21, 2011 12:48 am
by dayo
Hi Scott.

Just to pick your brains please.

Looking at some of the ART spec files, I notice the %pre, %post% etc sections have the code wrapped in "if [ $1 == x ]" statements.

I have been looking in rpm building documentation for info on this but haven't found anything so far.

Can you kindly enlighten me? I assume $1 represents some default internal argument of sorts passed to the script.

Thanks.

Re: Spec file / RPM build query for Scott

Posted: Wed Sep 21, 2011 2:42 am
by breun
The section Setting Triggers in the RPM Guide says:
Inside your trigger scripts, $1, the first command-line argument, holds the number of instances of your package that will remain after the operation has completed. The second argument, $2, holds the number of instances of the target package that will remain after the operation. Thus, if $2 is 0, the target package will be removed.

Re: Spec file / RPM build query for Scott

Posted: Wed Sep 21, 2011 11:42 am
by scott

Re: Spec file / RPM build query for Scott

Posted: Wed Sep 21, 2011 11:59 am
by dayo
Thanks guys, I'll read up.

BTW Scott, never did thank you for pointing me to mock a while back. I didn't manage to get it working back then when I first tried but later did and been using it since ... mostly to build nginx since I like to upgrade a bit quicker than you release. (BTW the stable version is now at 1.0.6 from the ART 1.0.0 version).

Re: Spec file / RPM build query for Scott

Posted: Wed Sep 21, 2011 12:10 pm
by dayo
Hi Scott,

The link to "art-build" is broken.

Should be "https://www.atomicorp.com/Tutorials/Building_RPMS"

Cheers.

Re: Spec file / RPM build query for Scott

Posted: Thu Sep 22, 2011 11:00 am
by scott
Its too complicated to just drop up there any more. Its a whole mess of things now, you probably dont need it unless youre building for a bunch of distros at once