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

How do you meet the Post Install Script /bin/sh dependency requirements on Solaris

181 views
Skip to first unread message

t.l....@siep.shell.com

unread,
Mar 9, 2000, 3:00:00 AM3/9/00
to

Dear Red Hat List,

We have built RPM 3.0.3 on Solaris (and IRIX, and AIX) which we are
planning to use to distribute around 20GB of applications as binary
RPMs. Everything appears to be working fine, except for one little
nasty. Anytime I add a post install or post uninstall section to my
spec file the binary RPM then requires /bin/sh.

We of course have /bin/sh on Solaris, but it was not installed using an
RPM database. I can not find a way to get around this anywhere in the
configuration. We can use --nodeps to force the script to run but then
we lose all of the benifits of using the dependencies for the rest of
the package.

Is there any way out? A configuration file I can change. Something I
can set when building RPM. The only things I can think of are to make a
fake package which says it provides /bin/sh. I consider this option an
uneccessary pain. The only other way out I can think of is to write a
program using rpmlib to remove this requirement from the binary
packages after they are build. Another real pain.

Any help or suggestions is greatly appreciated.

Sincerly,
Tim Roden
Shell International E&P
Rijswijk, The Netherlands


--
To unsubscribe: mail -s unsubscribe rpm-list...@redhat.com < /dev/null


Tim Mooney

unread,
Mar 9, 2000, 3:00:00 AM3/9/00
to
In regard to: How do you meet the Post Install Script /bin/sh dependency...:

>Is there any way out? A configuration file I can change. Something I
>can set when building RPM. The only things I can think of are to make a
>fake package which says it provides /bin/sh. I consider this option an
>uneccessary pain. The only other way out I can think of is to write a
>program using rpmlib to remove this requirement from the binary
>packages after they are build. Another real pain.
>
>Any help or suggestions is greatly appreciated.

Tim-

Lots of other people are doing the same thing you are, and the RPM maintainers
have been very friendly to non-Linux platforms, despite their roots. :-)

You have at least two options:

1) Add

Provides: /bin/sh

(and any other needed items, like libc.so.1, etc) to the system-specific
rpmrc file (probably /etc/rpmrc).

2) build a virtual package from a spec file that has an existant
*but empty* %files section, and after the beginning part
(Summary, Name, Vendor, etc -- the stuff that goes at the top), have a
section like:

Provides: /bin/sh
Provides: libc.so.1

etc. Once you've built that binary "virtual package", include it with
the software you ship, so that the people install it at the same time as
your software.


Some notes:

Option 1 is the "old way", and was the only option available under RPM 2.x.
It's probably not the way for *you* to go, because the virtual package is
a cleaner idea *and* it doesn't require your customers have an /etc/rpmrc
file with a big long nasty `Provides:' line.

Option 2 is new with rpm 3.x, and it's the preferred method for people using
3.x.

rpm 3.0.3 and (soon to be released) 3.0.4 includes a script called
`vpkg-provides.sh' that is designed to help you generate the spec file that
you would use to build your virtual package. Take a look at that, and ask
questions on the list if you have any.

Tim
--
Tim Mooney moo...@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J1, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

suz...@file.phys.tohoku.ac.jp

unread,
Mar 9, 2000, 3:00:00 AM3/9/00
to
>We of course have /bin/sh on Solaris,
>but it was not installed using an RPM database.

>Is there any way out?

Please add

Provides: /bin/sh /bin/csh /usr/bin/ksh /usr/bin/csh

into your default rpmrc. Still RPM database has no entry
for /bin/sh, but RPM command won't ask /bin/sh, I suppose.

suzuki

Scott Lampert

unread,
Mar 9, 2000, 3:00:00 AM3/9/00
to
On Wed, Mar 08, 2000 at 07:42:02PM +0100, t.l....@siep.shell.com wrote:
>
> Dear Red Hat List,
>
> We have built RPM 3.0.3 on Solaris (and IRIX, and AIX) which we are
> planning to use to distribute around 20GB of applications as binary
> RPMs. Everything appears to be working fine, except for one little
> nasty. Anytime I add a post install or post uninstall section to my
> spec file the binary RPM then requires /bin/sh.
>
> We of course have /bin/sh on Solaris, but it was not installed using an
> RPM database. I can not find a way to get around this anywhere in the
> configuration. We can use --nodeps to force the script to run but then
> we lose all of the benifits of using the dependencies for the rest of
> the package.
>
> Is there any way out? A configuration file I can change. Something I
> can set when building RPM. The only things I can think of are to make a
> fake package which says it provides /bin/sh. I consider this option an
> uneccessary pain. The only other way out I can think of is to write a
> program using rpmlib to remove this requirement from the binary
> packages after they are build. Another real pain.
>
> Any help or suggestions is greatly appreciated.
>
> Sincerly,
> Tim Roden
> Shell International E&P
> Rijswijk, The Netherlands
>
>

In your /etc/rpmrc put the line:

Provides: /bin/sh


If you don't have a /etc/rpmrc file just create it and put that line in
there. You should generally create a Provides: line for every standard
system library as well on non-redhat systems. I believe this is covered
in the documentation included with RPM.
-Scott

--
Scott Lampert | Home Page: http://www.lampert.org
<fort...@heavymetal.org> | PGP Key: finger fort...@heavymetal.org
"Singe the Hare Hare, +-----------------------------------------
dance the Hoochie Koo!"

t.l....@siep.shell.com

unread,
Mar 9, 2000, 3:00:00 AM3/9/00
to
All,

Thank you for such quick and accurate replies. Two answers using
vpgk-provides, and one setting the Provides: in /etc/rpmrc. I have
confirmed that using the Provides in /etc/rpmrc works (quick to test).
I will now try the vpgk-provides, and decide which solution is best for
our needs.

Sincerely,
Tim Roden


-----Original Message-----
From: ant...@mnt.org [mailto:ant...@mnt.org]
Sent: Thursday, March 09, 2000 10:29 AM
To: Roden, Tim T.L.
Subject: Re: How do you meet the Post Install Script /bin/sh dependency
requirements on Solaris


I think you want to have a look at the vpgk-provides.sh script (in
/usr/lib/rpm/)
and the associated files for solaris (under autodeps in the sources)

The idea is the build a package that will say it provides /bin/sh (and
other files
that might cause dependancies, but were not installed using RPM),
although in reality
it does not. This rpm you make part of the distribution and RPMs should
make sure that
the order of installing is ok. If not you can install this package on
its own, and if you
made it so it checks (using a pre install, to check that /bin/sh is
really there),
you will have to specify --nodeps for this package once and have proper
dependancy checking
after that.

If you are not to much in a hurry I can have a look at generating a
.spec for such an rpm for
you, as I want to look at it anyway. But I would not be able to work on
it until mid next week.
Let me know and I will bump it up my todo list.

Regards
Anthon
-----------------------------------------------------------------------


On Wed, Mar 08, 2000 at 07:42:02PM +0100, t.l....@siep.shell.com
wrote:

You can use the vpkg-provides.sh script to create a package that would
just have all the provides your system has installed. Let me know if
you need more help (like making up a template for the script).

Mate
-----------------------------------------------------------------------

In your /etc/rpmrc put the line:

Provides: /bin/sh


If you don't have a /etc/rpmrc file just create it and put that line in
there. You should generally create a Provides: line for every standard
system library as well on non-redhat systems. I believe this is covered
in the documentation included with RPM.
-Scott

--
Scott Lampert | Home Page: http://www.lampert.org
<fort...@heavymetal.org> | PGP Key: finger fort...@heavymetal.org
"Singe the Hare Hare, +-----------------------------------------
dance the Hoochie Koo!"

suz...@file.phys.tohoku.ac.jp

unread,
Mar 9, 2000, 3:00:00 AM3/9/00
to
Uh, I should have to wait for hearing other people's idea...

>Some notes:
>
>Option 1 is the "old way", and was the only option available
>under RPM 2.x. It's probably not the way for *you* to go,
>because the virtual package is a cleaner idea *and* it
>doesn't require your customers have an /etc/rpmrc file
>with a big long nasty `Provides:' line.
>
>Option 2 is new with rpm 3.x, and it's the preferred method
>for people using 3.x.

Yes, yes, yes! Until reading this report, I didn't know
that rpm-3.0.x can specify the provided file in full-path.
Under rpm-2.x, "Provides: /bin/sh" is rejected,
only the fake packages providing shared libraries are permitted.

>`vpkg-provides.sh' that is designed to help you generate
>the spec file that you would use to build your virtual package.
>Take a look at that, and ask questions on the list if you have any.

That's great!

suzuki

0 new messages