Discussion:
How to disable running installation scriptlets during build time
p***@sofrecom.com
2008-01-17 10:13:45 UTC
Permalink
rpm : 4.4.7
platforms : HPUX 11.23 / ia64, aix 5.3



Hi,

Building a rpm package, I noticed that, right now, installation
scriptlets are run at build time, during the "processing files" step. It
seems to me having seen on Internet that this is for finding required
files/commands used in those scriptlets.

Is there a way to disable this execution, because I do some things which
cannot be possibly done on the building platform.

Regards,



mailto: ***@sofrecom.com <mailto:***@sofrecom.com>

phone: +33 1 43985883
Jeff Johnson
2008-01-17 15:36:43 UTC
Permalink
*rpm : 4.4.7
platforms : HPUX 11.23 / ia64, aix 5.3*
Hi,
Building a rpm package, I noticed that, right now, installation scriptlets
are run at build time, during the "processing files" step. It seems to me
having seen on Internet that this is for finding required files/commands
used in those scriptlets.
There is a means to automate scriptlet dependencies using bash
--rpm-requires.

In rpm-4.4.4 (and later) the mechanism for automating has been added
#------------------------------------------------------------------------
# executable(...) configuration.
#
# Path to scripts to autogenerate executable(foo) script dependencies,
#
# Note: Used iff _use_internal_dependency_generator is non-zero. The
# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
#%__executable_provides %{_rpmhome}/executabledeps.sh --provides
#%__executable_requires %{_rpmhome}/executabledeps.sh --requires
%__scriptlet_requires /bin/bash --rpm-requires

Tokens in an executable context are parsed as dependencies. E.g. this
scriptlet
rm -rf %{buildroot}
will generate
Requires: executable(rm)
and an executable called "rm" will be checked for on PATH during
installation during dependency checking, just like which(1) or bash(1)
would do.

Meanwhile, note that bash --rpm-requires is not perfect. The patch
to bash needs to be improved before the mechanism is 100% reliable.
Is there a way to disable this execution, because I do some things which
cannot be possibly done on the building platform.
I'm not sure what you ask. You can disable the mechanism on the build
system,
yes. But the mechanism is entirely done on the install, not the build,
platform if
used correctly.

73 de Jeff
p***@sofrecom.com
2008-01-17 16:41:58 UTC
Permalink
I do a relative symlink in the post scriptlet. The problem is when I install the package with a relocation, rpm looks for a dependence on the linked file in its original directory.

Moreover, at install time, I run rpm from a Shell script which sets environment variables that I use in the scriptlets, especially to chown delivered files to a user known at this time only. That's why those scriptlets cannot be ran at build time.



Does I need just to set %__scriptlet_requires to %{nil} to disable it ?





-----Message d'origine-----
De : rpm-list-***@redhat.com [mailto:rpm-list-***@redhat.com] De la part de Jeff Johnson
Envoyé : jeudi 17 janvier 2008 16:37
À : RPM Package Manager
Objet : Re: How to disable running installation scriptlets during build time





2008/1/17 <***@sofrecom.com>:

rpm : 4.4.7
platforms : HPUX 11.23 / ia64, aix 5.3



Hi,

Building a rpm package, I noticed that, right now, installation scriptlets are run at build time, during the "processing files" step. It seems to me having seen on Internet that this is for finding required files/commands used in those scriptlets.



There is a means to automate scriptlet dependencies using bash --rpm-requires.



In rpm-4.4.4 (and later) the mechanism for automating has been added

#------------------------------------------------------------------------

# executable(...) configuration.

#

# Path to scripts to autogenerate executable(foo) script dependencies,

#

# Note: Used iff _use_internal_dependency_generator is non-zero. The

# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.

#%__executable_provides %{_rpmhome}/executabledeps.sh --provides

#%__executable_requires %{_rpmhome}/executabledeps.sh --requires

%__scriptlet_requires /bin/bash --rpm-requires



Tokens in an executable context are parsed as dependencies. E.g. this

scriptlet

rm -rf %{buildroot}

will generate

Requires: executable(rm)

and an executable called "rm" will be checked for on PATH during

installation during dependency checking, just like which(1) or bash(1)

would do.



Meanwhile, note that bash --rpm-requires is not perfect. The patch

to bash needs to be improved before the mechanism is 100% reliable.



Is there a way to disable this execution, because I do some things which cannot be possibly done on the building platform.



I'm not sure what you ask. You can disable the mechanism on the build system,

yes. But the mechanism is entirely done on the install, not the build, platform if

used correctly.



73 de Jeff
p***@sofrecom.com
2008-02-13 16:24:58 UTC
Permalink
rpm : 4.4.7
platforms : HPUX 11.23 / ia64, aix 5.3



Hi,

Is there a way to get the summary/description tag values for a specific
sub-package ?

Regards,



mailto: ***@sofrecom.com <mailto:***@sofrecom.com>

phone: +33 1 43985883

Loading...