Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Default shell in RPM spec file

611 views
Skip to first unread message

paul.d...@sydac.com.au

unread,
Mar 23, 2009, 6:14:38 AM3/23/09
to
Hi,

I am new to creating RPMs and I'm trying to create my first. I am
trying to package someone elses software and the source must be built
in zsh. I am calling the rpmbuild command from a z-shell but by
putting in a "ps -p $$" command it shows that the shell is /bin/sh.

Is it possible to change the default shell that rpmbuild uses?

I have tried searching the archives but can't find anything.

Thanks for your help.

Paul

Michal Jaegermann

unread,
Mar 23, 2009, 4:07:35 PM3/23/09
to
paul.d...@sydac.com.au wrote:
>
> I am trying to package someone elses software and the source must be
> built in zsh.

That is not the most portable way to build things. A /bin/sh assumption
will pop up in many places.

> Is it possible to change the default shell that rpmbuild uses?

$ rpm --showrc
....
-14: ___build_shell %{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}
....

In other words - if you did not explicitely redefine your _buildshell
in a spec file then does not matter from what you are trying to call
rpmbuild process you will end up with /bin/sh. That nothing will break
after such redefinition this remains to be seen.

You better do not forget 'BuildRequires: zsh' if you change that or
your specs will be quite broken.

> I have tried searching the archives but can't find anything.

Did you try manuals? That would likely help.
http://docs.fedoraproject.org/drafts/rpm-guide-en/

Michal

paul.d...@sydac.com.au

unread,
Mar 23, 2009, 7:49:43 PM3/23/09
to
Thanks Michal, that has helped a lot.
0 new messages