Discussion:
rpm user input
nived g
2008-03-04 19:01:45 UTC
Permalink
Hello,

I need to build an RPM that requires the user to input some values during
install time. I've searched regarding this and came to know that RPM doesn't
support interactive installation. But I've seen certain RPMs which, for
example, requires the user to accept license during install time. Is there
any way to do this? The installation of the software that I'm trying to
package will always be manual.
Thanks.

Regards,
Nived
Toralf Lund
2008-04-10 21:09:41 UTC
Permalink
Post by nived g
Hello,
I need to build an RPM that requires the user to input some values
during install time. I've searched regarding this and came to know
that RPM doesn't support interactive installation. But I've seen
certain RPMs which, for example, requires the user to accept license
during install time. Is there any way to do this? The installation of
the software that I'm trying to package will always be manual.
You can enter any program/command in the %pre and %post sections of the
spec, including ones that ask for user input. These sections are
essentially scripts that get executed before and after the files are
installed, respectively. If the %pre script(let) exits with a "false"
(non-0) status, the rpm won't actually be installed.

- Toralf
Post by nived g
Thanks.
Regards,
Nived
------------------------------------------------------------------------
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Brian J. Murrell
2008-04-10 21:13:57 UTC
Permalink
Post by Toralf Lund
You can enter any program/command in the %pre and %post sections of the
spec, including ones that ask for user input. These sections are
essentially scripts that get executed before and after the files are
installed, respectively. If the %pre script(let) exits with a "false"
(non-0) status, the rpm won't actually be installed.
Ehm. I thought interactivity in rpm scripts was verboten. I thought
one of the primary tenets of RPM packages is that they MUST do their
work without any interaction as interaction may not always be possible
(think batch installation).

b.
Toralf Lund
2008-04-11 06:43:25 UTC
Permalink
Post by Brian J. Murrell
Post by Toralf Lund
You can enter any program/command in the %pre and %post sections of the
spec, including ones that ask for user input. These sections are
essentially scripts that get executed before and after the files are
installed, respectively. If the %pre script(let) exits with a "false"
(non-0) status, the rpm won't actually be installed.
Ehm. I thought interactivity in rpm scripts was verboten. I thought
one of the primary tenets of RPM packages is that they MUST do their
work without any interaction as interaction may not always be possible
(think batch installation).
Depends on how you see it and what you mean. Yes, in guidelines for good
& proper packaging, interactivity is probably forbidden. Technically, in
terms of how rpm actually works, it is allowed, as far as I know. Or to
be more precise, rpm doesn't impose any extra restrictions, so
interactivity works, if and only if, it does in the environment rpm is
executed from.

Also, I didn't say *I* would do this, did I?

- Toralf
Jos Vos
2008-04-10 21:20:15 UTC
Permalink
Post by Toralf Lund
You can enter any program/command in the %pre and %post sections of the
spec, including ones that ask for user input. These sections are
essentially scripts that get executed before and after the files are
installed, respectively. If the %pre script(let) exits with a "false"
(non-0) status, the rpm won't actually be installed.
Yes, but be aware that this is "not-done" and that such an RPM will
always be considered an example of bad packaging (and the author will
be flamed forever ;-)).
--
-- Jos Vos <***@xos.nl>
-- X/OS Experts in Open Systems BV | Phone: +31 20 6938364
-- Amsterdam, The Netherlands | Fax: +31 20 6948204
seth vidal
2008-04-10 23:16:49 UTC
Permalink
Post by Jos Vos
Post by Toralf Lund
You can enter any program/command in the %pre and %post sections of the
spec, including ones that ask for user input. These sections are
essentially scripts that get executed before and after the files are
installed, respectively. If the %pre script(let) exits with a "false"
(non-0) status, the rpm won't actually be installed.
Yes, but be aware that this is "not-done" and that such an RPM will
always be considered an example of bad packaging (and the author will
be flamed forever ;-)).
There may also be beatings.

And Nobody expects the spanish inquisition.

-sv
nived g
2008-04-11 05:34:18 UTC
Permalink
Post by Toralf Lund
You can enter any program/command in the %pre and %post sections of
the
Post by Toralf Lund
spec, including ones that ask for user input. These sections are
essentially scripts that get executed before and after the files are
installed, respectively. If the %pre script(let) exits with a "false"
(non-0) status, the rpm won't actually be installed.
I've tried doing that and it didn't work. I ran a script to get some input
from user at %pre, but its not prompting for input during install time.

-Nived
Toralf Lund
2008-04-11 07:40:44 UTC
Permalink
Post by Toralf Lund
Post by Toralf Lund
You can enter any program/command in the %pre and %post
sections of the
Post by Toralf Lund
spec, including ones that ask for user input. These sections are
essentially scripts that get executed before and after the
files are
Post by Toralf Lund
installed, respectively. If the %pre script(let) exits with a
"false"
Post by Toralf Lund
(non-0) status, the rpm won't actually be installed.
I've tried doing that and it didn't work. I ran a script to get some
input from user at %pre, but its not prompting for input during
install time.
Well, even though rpm doesn't go out of the way to prevent interactive
execution, you can perhaps not expect the standard input to be connected
to your terminal like in a normal interactive shell, so you may have to
use a command that gets its input in some other way. Something like

%pre
zenity --warning --text "Do you really want to open a dialog in an rpm
scriptlet?"

should if you have and an X display (and the program...)

Also, you could try "read < /dev/tty" or similar.

- T
Post by Toralf Lund
-Nived
------------------------------------------------------------------------
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Suresh Sonawane
2008-04-11 09:46:52 UTC
Permalink
I complied libraries and binaries compiled with 64bit support.
I can run the binary successfully.

Then I created rpm using following command
rpmbuild -bb SPECS/epm.spec

But when I try to install it, it gives me following error message

error: Failed dependencies:
libaio.so.1()(64bit) is needed by epm_common-1.4.15-1.x86_64
libaio.so.1(LIBAIO_0.1)(64bit) is needed by epm_common-1.4.15-1.x86_64
libaio.so.1(LIBAIO_0.4)(64bit) is needed by epm_common-1.4.15-1.x86_64

I have removed 'Requires' sections which checks the dependencies, still
I get error while installing rpm.

I can successfully install the rpm with --nodeps option.

But I want clean solution rather that work around.

Anybody please help me into it.
Are there any special command line options to build rpm for 64 machines?



-thanks,
Suresh
devzero2000
2008-04-11 09:47:56 UTC
Permalink
Please install libaio.x86_64.

hth
Post by Suresh Sonawane
I complied libraries and binaries compiled with 64bit support.
I can run the binary successfully.
Then I created rpm using following command
rpmbuild -bb SPECS/epm.spec
But when I try to install it, it gives me following error message
libaio.so.1()(64bit) is needed by epm_common-1.4.15-1.x86_64
libaio.so.1(LIBAIO_0.1)(64bit) is needed by epm_common-1.4.15-1.x86_64
libaio.so.1(LIBAIO_0.4)(64bit) is needed by epm_common-1.4.15-1.x86_64
I have removed 'Requires' sections which checks the dependencies, still
I get error while installing rpm.
I can successfully install the rpm with --nodeps option.
But I want clean solution rather that work around.
Anybody please help me into it.
Are there any special command line options to build rpm for 64 machines?
-thanks,
Suresh
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Suresh Sonawane
2008-04-11 10:50:20 UTC
Permalink
My m/c has /usr/lib64/libaio.so.1.0.0.
/usr/lib64/libaio.so.1.0.0: ELF 64-bit LSB shared object,
AMD x86-64, version 1 (SYSV), stripped


Still I need to install libaio.x86_64? If yes how I can get
libaio.x86_64.

-thanks,
Suresh




-----Original Message-----
From: devzero2000 [mailto:***@gmail.com]
Sent: Friday, April 11, 2008 3:18 PM
To: ***@synechron.com; RPM Package Manager
Subject: Re: building rpm for 64 bit m/c

Please install libaio.x86_64.

hth
On Fri, Apr 11, 2008 at 11:46 AM, Suresh Sonawane
<***@synechron.com> wrote:
I complied libraries and binaries compiled with 64bit support.
I can run the binary successfully.

Then I created rpm using following command
rpmbuild -bb SPECS/epm.spec

But when I try to install it, it gives me following error message

error: Failed dependencies:
libaio.so.1()(64bit) is needed by epm_common-1.4.15-1.x86_64
libaio.so.1(LIBAIO_0.1)(64bit) is needed by epm_common-1.4.15-1.x86_64
libaio.so.1(LIBAIO_0.4)(64bit) is needed by epm_common-1.4.15-1.x86_64

I have removed 'Requires' sections which checks the dependencies, still
I get error while installing rpm.

I can successfully install the rpm with --nodeps option.

But I want clean solution rather that work around.

Anybody please help me into it.
Are there any special command line options to build rpm for 64 machines?



-thanks,
Suresh

Loading...