RE : How to disable running installation scriptlets during build time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-bounces@xxxxxxxxxx [mailto:rpm-list-bounces@xxxxxxxxxx] 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 <patrice.elasri@xxxxxxxxxxxx>:

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 

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux