Spec file / RPM build query for Scott

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
dayo
Forum Regular
Forum Regular
Posts: 158
Joined: Sun Jul 12, 2009 1:33 pm

Spec file / RPM build query for Scott

Unread post 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.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: Spec file / RPM build query for Scott

Unread post 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.
Lemonbit Internet Dedicated Server Management
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: Spec file / RPM build query for Scott

Unread post by scott »

dayo
Forum Regular
Forum Regular
Posts: 158
Joined: Sun Jul 12, 2009 1:33 pm

Re: Spec file / RPM build query for Scott

Unread post 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).
dayo
Forum Regular
Forum Regular
Posts: 158
Joined: Sun Jul 12, 2009 1:33 pm

Re: Spec file / RPM build query for Scott

Unread post by dayo »

Hi Scott,

The link to "art-build" is broken.

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

Cheers.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: Spec file / RPM build query for Scott

Unread post 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
Post Reply