Bug 1003962 - RPM scriptlet -p option not documented
RPM scriptlet -p option not documented
Status: NEW
Product: Fedora Documentation
Classification: Fedora
Component: packager-guide (Show other bugs)
devel
All Linux
high Severity high
: ---
: ---
Assigned To: Petr Kovar
Fedora Docs QA
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-03 10:59 EDT by daniel.neuberger
Modified: 2015-05-11 09:52 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description daniel.neuberger 2013-09-03 10:59:42 EDT
The fedora RPM guide does not document the -p option that can be passed to the RPM scriptlets.  It should probably be located here http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s04s05.html, but I looked through the entire guide and couldn't find it.

The only only place I could find it documented is here https://fedoraproject.org/wiki/Packaging:ScriptletSnippets, but what it says is wrong.  It says:

"The basic syntax is similar to the %build, %install, and other sections of the rpm spec file. The scripts support a special flag, -p which allows the scriptlet to invoke a single program directly rather than having to spawn a shell to invoke the programs. (ie: %post -p /sbin/ldconfig)"

A more accurate description is:

"The basic syntax is similar to the %build, %install, and other sections of the rpm spec file. 

The scripts support a special flag, -p which specifies the interPreter that should be used to run the script (the default is /bin/sh).  Sometimes the -p option is used with no body in order to run a single command directly rather than having to spawn a shell to invoke the programs (i.e. %post -p /sbin/ldconfig).  Note that this form requires that there be nothing but white space (not even comments) until the next section begins."
Comment 1 Jamie Duncan 2013-09-05 23:19:09 EDT
Ben

I'm happy to help out with this one, if we can get it moving to a quick fix.

Thanks,

Jamie Duncan
Comment 2 Petr Kovar 2013-09-06 08:09:34 EDT
Moving to the Packager's Guide.
Comment 3 Jared Smith 2013-09-06 10:02:21 EDT
I've added a patch to the RPM Guide to add that clarification.  The new information should be part of git commit cc44b49e0977e4f50ae09f48b15b8367c59331de.  The new information should show up in the guide the next time the document is rebuilt.

Just as an FYI, the RPM Guide is fairly old and not being actively maintained like it should be.  There's a new effort underway to take the most important information from the RPM Guide and build a Packager's Guide, but that guide doesn't yet go into any detail on scripts.  Petr Kovar reassigned this bug to him, so hopefully he'll add something to the Packager's Guide about scriptlets.
Comment 4 daniel.neuberger 2013-09-06 10:19:40 EDT
Thanks for adding the patch.

Why was the decision made to create a new guide rather than just renaming or updating the old guide?

Also, wouldn't it make more sense to start by documenting the spec file syntax/"language" as part of the rpm-build rpm?  It seems like the problem is that there's a tool, rpmbuild, that processes a syntax, spec files, that isn't documented or standardized.

In my mind, a "guide" is high level documentation that is very nice to have, but should be based on my low level documentation.  The low level documentation for the tool, rpmbuild, exists, but we're missing the low level documentation for what the tool processes, spec files.

Just some thoughts.  Thanks for the help.
Comment 5 Jared Smith 2013-09-06 12:03:15 EDT
(In reply to daniel.neuberger from comment #4)
> Thanks for adding the patch.

You're most welcome.

> Why was the decision made to create a new guide rather than just renaming or
> updating the old guide?

In short, for a couple of reasons.  The first reason is that the exiting guide is a bit overwhelming to new packagers, and we really wanted to have a guide focused on helping novice packagers get up to speed.

The second reason is the simple fact that updating the existing guide would be an enormous undertaking, and nobody has volunteered to step up and do the work.  There's nothing that says we can't have two guides, we just need help to do the work.

> Also, wouldn't it make more sense to start by documenting the spec file
> syntax/"language" as part of the rpm-build rpm?  It seems like the problem
> is that there's a tool, rpmbuild, that processes a syntax, spec files, that
> isn't documented or standardized.

It makes sense to me, but I'm just a volunteer, and I don't have either the time or inclination to dive into documenting every detail at that level.  Until someone volunteers to do the work or gets asked to do it as part of their day job, it's just wishes and dreams.  

One of the unfortunate truths is that writing documentation isn't sexy, and in open source communities, it often doesn't get the attention that developing new code does.  As with everything else in open source, we either have to scratch the itch ourselves, pay someone to scratch it for us, or find a way to convince someone else that it's their itch.
Comment 6 daniel.neuberger 2013-09-06 12:18:00 EDT
Thanks Jared for all the info.  Unfortunately, I can't undertake the complete task myself either (at least not right now).  I will do my best to help push things in the right direction and contribute bits and pieces as I go along with my work.

Note You need to log in before you can comment on or make changes to this bug.