Kaixo!

On Fri, Aug 27, 1999 at 02:08:40AM +0000, Jean-Michel Dault wrote:

> I have a few packages that would require an interactive post-install
> script.

Not possible.
And not negotiable either; rpm *must* be runable from shell scripts, so
no interactive scripts are allowed.

That has been discussed a lot on rpm mailing list; and the conclusion has been
that the smart solution for that problem is to have the post install script
to create a flag file, and when the program is first launched it checks
for that flag file, and if exists launchs the interactive thing.

> For example, MySQL could ask for the database password to
> create, Frontpage could ask for the name of a virtual host.

Those are *configuration* things and must not be done at installation by the
root adminsitrator but instead done by the people in charge to manage such
servers (yes, on home computers he is the same person; but not on most real
life business situations)

> I haven't found the perfect way to do it yet. Assuming defaults is very
> dangerous regarding security when it comes to passwords, and we all know
> the PITA we had with Postgresql over-writing a poor user's database when
> upgrading.

How comes ?
If it does that the rpm package is dead-bugged and the *.spec file must be
rewritten; could you tell me exactly what is overwritten ?

> What would be great is a special attribute to the %post section,
> something like "%post --interactive" that could start an xterm or pause

No, that won't be great as that would hand forever updates done trough
ssh somemachine -c "rpm -Uv *.rpm"
for example. Therefore such thing will never been implemented.

> Maybe there is a better solution. If any of you has an idea,  just let
> me know.

If you really absolutely need to launch some interactive script to have
a program useable, use a flag file (tagged as %ghost on spec file to avoid
rpm -V warnings when it won't exist anymore; and created by a touch on %post
script, depending if it is a first install (if [ "$1" = "1" ] ) or not);
and then have your program chack for that file; you can use a script wrapper
for that also.

> 
> Jean-Michel Dault
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]

-- 
� bient�t,
Pablo Saratxaga

http://www.ping.be/~pin19314/           PGP Key available, key ID: 0x8F0E4975

Reply via email to