Help!

Help: one binary, one script

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> PRM - Partner Relationship Management RSS
Next:  video driver installation from rpm file  
Author Message
Sebastian Bargmann
External


Since: Jun 27, 2007
Posts: 2



PostPosted: Wed Jun 27, 2007 9:35 pm    Post subject: Help: one binary, one script
Archived from groups: linux>redhat>rpm (more info?)

Hi,

I have a pretty simple setup, but it seems that it doesn't fit well into
RPM(?)

A single binary (a daemon) is to be installed. I have written a
configuration/install script for manual install. The script figures out
where init.d is, if it should use chkconfig or rc-update.d and constructs
the init.d-startup script on the fly.

Now, I'd like my rpm package to just include these two files. When
installing, it should extract the two files to some temporary directory and
run the above mentioned configuration script. On completion it should delete
the files from the temp dir.

Is that possible or just a plain stupid way to "bend" RPM?


Thanks,
Sebastian Bargmann
Back to top
Michal Jaegermann
External


Since: Jun 06, 2004
Posts: 62



PostPosted: Thu Jun 28, 2007 7:24 pm    Post subject: Re: Help: one binary, one script [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Sebastian Bargmann <not.DeleteThis@this.place> wrote:
>
> Now, I'd like my rpm package to just include these two files. When
> installing, it should extract the two files to some temporary directory and
> run the above mentioned configuration script. On completion it should delete
> the files from the temp dir.
>
> Is that possible or just a plain stupid way to "bend" RPM?

It is possible, even trivially easy if you will look how rpm packages
are put together, but it does not buy very much. After you installed
such package then 'rpm -V that_package' check will tell you that
everything installed is "missing" and every integrity verification will
list that as "broken". You just removed all what you installed and it
does not sound that you plan to hack with %{ghost} files. So what you
gained? A record that something like that is installed and maybe some
(weak) dependencies check. Are such results worth to bother? If yes
then start reading documentation.
http://docs.fedoraproject.org/drafts/rpm-guide-en/

LSB compliant distros will not have %{_initrddir} all over the place.

Michal
Back to top
Sebastian Bargmann
External


Since: Jun 27, 2007
Posts: 2



PostPosted: Thu Jun 28, 2007 10:18 pm    Post subject: Re: Help: one binary, one script [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks Michal,

No - that's not what I want. I'll find another route Smile



"Michal Jaegermann" <michal RemoveThis @gortel.phys.ualberta.ca> wrote in message
news:f611sr$7ej$1@tabloid.srv.ualberta.ca...
> Sebastian Bargmann <not RemoveThis @this.place> wrote:
>>
>> Now, I'd like my rpm package to just include these two files. When
>> installing, it should extract the two files to some temporary directory
>> and
>> run the above mentioned configuration script. On completion it should
>> delete
>> the files from the temp dir.
>>
>> Is that possible or just a plain stupid way to "bend" RPM?
>
> It is possible, even trivially easy if you will look how rpm packages
> are put together, but it does not buy very much. After you installed
> such package then 'rpm -V that_package' check will tell you that
> everything installed is "missing" and every integrity verification will
> list that as "broken". You just removed all what you installed and it
> does not sound that you plan to hack with %{ghost} files. So what you
> gained? A record that something like that is installed and maybe some
> (weak) dependencies check. Are such results worth to bother? If yes
> then start reading documentation.
> http://docs.fedoraproject.org/drafts/rpm-guide-en/
>
> LSB compliant distros will not have %{_initrddir} all over the place.
>
> Michal
Back to top
Daniel Ganek
External


Since: Jul 02, 2007
Posts: 1



PostPosted: Mon Jul 02, 2007 1:11 pm    Post subject: Re: Help: one binary, one script [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Sebastian Bargmann wrote:
> Hi,
>
> I have a pretty simple setup, but it seems that it doesn't fit well into
> RPM(?)
>
> A single binary (a daemon) is to be installed. I have written a
> configuration/install script for manual install. The script figures out
> where init.d is, if it should use chkconfig or rc-update.d and constructs
> the init.d-startup script on the fly.
>
> Now, I'd like my rpm package to just include these two files. When
> installing, it should extract the two files to some temporary directory and
> run the above mentioned configuration script. On completion it should delete
> the files from the temp dir.
>
> Is that possible or just a plain stupid way to "bend" RPM?
>
>
> Thanks,
> Sebastian Bargmann
>
>

No reason to "bend" rpm. First, your configure script should be
converted to a postinstall scriptlet. Second, install your daemon
in some permanent place and then have your postinstall scriptlet
create a link in the proper place. You should also create an uninstall
scriptlet to remove this link.

/dan
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> PRM - Partner Relationship Management All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum