Re: Gnome/Linux Application Installer



On Wed, Dec 23, 1998 at 01:50:27PM -0500, Ben 'The Con Man' Kahn wrote:
> 
> 	Yup it does.  (Although not every RPM allows itself to be
> relocated...  I'm not sure why.)  

The reason all RPMs don't allow themselves to be relocated, is that
there is no standardized way for the app to figure out where it's
datafiles are located. As a result, most apps just hardcode the
install path in during the 'configure' stage. If you relocate them,
they are still hardcoded to look in the old install location. There
are a few solutions to this problem, ALL of which require providing
some way for the app to find out it's install location at runtime.

1) Find datafiles in paths relative to the executable location,
otherwise known as the 'emacs method' because emacs tries to do
this. The basic idea is to find the absolute path of the executable
when it's launched, and then locate the datafiles relative to
that. There is no standardized way to find the absolute path of the
executable which was launched. I believe Linux can do it now, but in
some situations, on some unicies, it's not possible. For example, you
can't trust argv[0], because someone could use execvp() and just pull
argv[0] out of nowhere.

2) You can have RPM record the install location somewhere (or perhaps
just use the reciepts it already makes), and code the app to look at
the RPM install information to figure out where it was installed. This
is much like the way InstallShield records the install location of a
windows app in the windows registry. If you don't use RPM, or you lose
your RPM reciepts, the app might not work anymore.

Personally, I much prefer going for #1, but there are some cases where
it won't work perfectly on all unicies.

> But I'm not clear on how it works.  If I
> relocate say...  myapp-0.0.2.i386.rpm which has files like so:
> 
> /usr/bin/myapp
> /usr/lib/myapp/config
> /usr/lib/myapp/config/myapp.conf
> /usr/lib/myapp/config/myapp.jpg
> /usr/lib/myapp/defaults/myapp.userfile
> /etc/myapp.conf
> 
> 	Then...  Where do these files go when I relocate?
> 
> On Wed, 23 Dec 1998, Fox, Kevin M wrote:
> 
> > I think rpm allows you to specify the base install dir from the command
> > line. There could be a gnome program (I think one is in the works) to allow
> > easy installs of RPMS.
> > 
> > > -----Original Message-----
> > > From:	Ben 'The Con Man' Kahn [SMTP:xkahn@cybersites.com]
> > > Sent:	Wednesday, December 23, 1998 10:43 AM
> > > To:	Fox, Kevin M
> > > Cc:	'Jason Tackaberry'; gnome-list@gnome.org
> > > Subject:	RE: Gnome/Linux Application Installer
> > > 
> > > 
> > > 	I think we're getting off topic.  :^)  Of course such a program
> > > can be written.  But, what are the things you would want to do in an
> > > install?  
> > > 
> > > 	Well, there are two basic types of people installing software.
> > > The admin wants everyone to be able to run the program.  (Usually) So
> > > applications installed by the admin need to be in /opt/gnome/bin (or
> > > whatever) and the configuration stuff needs to be accessible to everyone.
> > > 
> > > 
> > > 	A user will install to their home directory and all info will be
> > > local to them.  I don't think RPM can fully express this split at the
> > > moment.  (That's if we want people to be able to install software as
> > > users, I can see why this would be bad.)
> > > 
> > > 	Next, there are two types of installs.  Attended, and unattended.
> > > Certainly most software install *I* do are attended.  But when I do
> > > unattened installs, I want it to work.  
> > > 
> > > 
> > > On Wed, 23 Dec 1998, Fox, Kevin M wrote:
> > > 
> > > > Could there be a dialog program written that detects wether your in X or
> > > not
> > > > and then displays options? That would be nice. It could be added into
> > > the
> > > > RPM or have it installed on the box already...
> > > > 
> > > > I do kinda see the point redhat has with not wanting to show dialogs.
> > > This
> > > > allows for automatic updates and other things. Hmm...
> > > > 
> > > > > -----Original Message-----
> > > > > From:	Ben 'The Con Man' Kahn [SMTP:xkahn@cybersites.com]
> > > > > Sent:	Wednesday, December 23, 1998 10:26 AM
> > > > > To:	Fox, Kevin M
> > > > > Cc:	'Jason Tackaberry'
> > > > > Subject:	RE: Gnome/Linux Application Installer
> > > > > 
> > > > > 
> > > > > 	That's right.  You can run a script before and after the install.
> > > > > I think I remember this being just a shell script, so you can run any
> > > > > program at all.  
> > > > > 
> > > > > 	HOWEVER, interactive input is frowned upon.  And printing things
> > > > > to stdout is too...  (Think about the redhat installer.)  Debian
> > > allows
> > > > > and encourages prompting. (again, if I recall correctly)  
> > > > > 
> > > > > 	Anyway, one thing we could do immediately would be to grab
> > > > > stdout/stdin and put it in a small graphical dialog box. 
> > > > > 
> > > > > 	(An example of printing to STDOUT is the sshd install.  Give it a
> > > > > try.)
> > > > > 
> > > > > On Wed, 23 Dec 1998, Fox, Kevin M wrote:
> > > > > 
> > > > > > From what I have read about RPMS you can have them do just about
> > > > > anything.
> > > > > > Thay can run programs, so you can have it come up with dialogs but
> > > for
> > > > > ease
> > > > > > of use, dialogs have (at least I think) never been used.
> > > > > > 
> > > > > > > > 	And that's just the beginning!  What if things are a little
> > > > > more
> > > > > > > > complex?  What if the application needs to ask questions from
> > > the
> > > > > user
> > > > > > > > doing the install?
> > > > > > > 
> > > > > > > Which is why I think some sort of scripting language would be
> > > needed.
> > > > > > > That
> > > > > > > way you can script dialogs for the user, and also make a more
> > > custom
> > > > > flow
> > > > > > > for
> > > > > > > the install.
> > > > > > > 
> > > > > > > I don't know much about the guts of rpm and deb, but I doubt they
> > > > > support
> > > > > > > this.
> > > > > > > We need to spec out a format that allows scripting, and is also
> > > smart
> > > > > > > enough
> > > > > > > to properly clean up old versions of the package (although RPM
> > > seems
> > > > > to do
> > > > > > > a good job of this).
> > > > > > > 
> > > > > > > Jason.
> > > > > > > 
> > > > > > > 
> > > > > > > -- 
> > > > > > >         FAQ: Frequently-Asked Questions at
> > > > > http://www.gnome.org/gnomefaq
> > > > > > >          To unsubscribe: mail gnome-list-request@gnome.org with 
> > > > > > >                        "unsubscribe" as the Subject.
> > > > > > 
> > > > > 
> > > > > 						-Ben
> > > > > 
> > > > > ------------------------------------ |\      _,,,--,,_  ,) ----------
> > > > > Benjamin Kahn                        /,`.-'`'   -,  ;-;;'
> > > > > (212) 924 - 2220                    |,4-  ) )-,_ ) /\
> > > > > ben@cybersites.com --------------- '---''(_/--' (_/-' ---------------
> > > > >           Meet Linux: Forrest Gump as an operating system. 
> > > > > 
> > > > 
> > > > 
> > > > -- 
> > > >         FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
> > > >          To unsubscribe: mail gnome-list-request@gnome.org with 
> > > >                        "unsubscribe" as the Subject.
> > > > 
> > > 
> > > 						-Ben
> > > 
> > > ------------------------------------ |\      _,,,--,,_  ,) ----------
> > > Benjamin Kahn                        /,`.-'`'   -,  ;-;;'
> > > (212) 924 - 2220                    |,4-  ) )-,_ ) /\
> > > ben@cybersites.com --------------- '---''(_/--' (_/-' ---------------
> > >           Meet Linux: Forrest Gump as an operating system. 
> > > 
> > 
> 
> 						-Ben
> 
> ------------------------------------ |\      _,,,--,,_  ,) ----------
> Benjamin Kahn                        /,`.-'`'   -,  ;-;;'
> (212) 924 - 2220                    |,4-  ) )-,_ ) /\
> ben@cybersites.com --------------- '---''(_/--' (_/-' ---------------
>           Meet Linux: Forrest Gump as an operating system. 
> 
> 
> 
> -- 
>         FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
>          To unsubscribe: mail gnome-list-request@gnome.org with 
>                        "unsubscribe" as the Subject.
> 

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + jeske@chat.net



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]