rpmbuild, environment modules and zsh
Fabricio Cannini
fcannini at gmail.com
Mon Sep 15 23:52:07 UTC 2014
On 12-09-2014 22:12, Mike Miller wrote:
> Hi Fabricio, I have also run into this problem when building
> modules-based rpms when the user shell is zsh or (sadly) tcsh.
Hi Mike.
> I think the reason why the module command works when your shell is bash
> is because bash is the only shell that supports exporting shell
> functions (export -f). In all other shells, the module command is a
> shell function or alias, but can't be exported through the environment
> to subshells. Since /etc/profile.d/modules.sh is only loaded in
> interactive shells, it isn't loaded by the rpm build shell scriptlets
> for example.
I see, but wouldn't the 'module' function be exported when rpmbuild
enters the '%build' section of the spec file ?
> The only solution I've found is to start an interactive bash shell
> before rpmbuild, or source the file as you've done.
Is there a way to overload '%build' so that it sources the needeed
scripts automatically ?
[ ]'s
More information about the Rpm-list
mailing list