[osiris-devel] Easier RPM Conversation

David M. Fetter dfetter at pdx.edu
Thu Oct 7 13:56:31 EDT 2004


Well, if I use that then it doesn't try to create the account, but it is
still trying and failing to copy the init scripts.  I don't understand
that though, because it looks like it shouldn't be doing that according
to your install-sh script.  

I also noticed that you're already doing ypcat stuff at least with
IRIX.  So, maybe you can just group or add something in there for all of
the systems.  The only problem with that is everybody is slowly but
surely moving to ldap secure authentication, which means even doing that
will have it's problems.  I see your point on putting perl into the
shell install script, however now days practically every *nix does
install perl even with their most minimal installs.  Using getpwnam
would solve the problem for all potential user authentication methods,
or at least all of the common ones.  Just a thought.  

Anyway, I'm probably just going to manually copy the binaries and
configs into place for the rpm since that is really all the install
script is doing.  At least the only piece that I need for the rpm. 
Unless you have any other ideas.

On Thu, 2004-10-07 at 09:10, Brian Wotring wrote:
> I think adding perl as a requirement to install an agent is not a good idea.
> 
> As far as the whole user detection/creation issue.  If you set 
> PACKAGE_MODE, the installer will skip that whole section.  Is that not 
> sufficient for the creation of your RPM?
> 
> David M. Fetter wrote:
> > How about getpwnam instead of cat and grep?  I see your install is a
> > shell script though and this is a c function, though it also exists in
> > perl.  Since most systems have perl installed you could just put a short
> > perl statement within the install script using getpwnam.  That way you
> > will find the user account no matter what method the system is using for
> > account management.  (perl example:
> > http://www.wellho.net/resources/ex.php4?item=p214/userinfo)
> > 
> > Another option might be to grep for passwd: in /etc/nsswitch.conf and if
> > $1 is equal to files then look in /etc/passwd, if it's compat then do
> > ypmatch username passwd, etc.  The perl way would do this work for you
> > and be shorter to write, but by adding perl into the shell script you
> > now have two dependencies for install.  Either way would fix the problem
> > though.
> > 
> > On Wed, 2004-10-06 at 12:17, Brian Wotring wrote:
> > 
> >>To the first issue, see my recent post.
> >>
> >>As for the NIS user, yes, I believe some change is in order for the 
> >>installer.  The installer has a minor bug in that it prompts for 
> >>continuation after it has already tried to create or locate the osiris 
> >>user/group.
> >>
> >>Suggestions for checking are welcome, but it seems like one easy 
> >>solution would be to prompt for permission to create a local user or 
> >>not.  Admins that have a userbase elsewhere could then opt out.
> >>
> >>David M. Fetter wrote:
> >>
> >>>I would like to suggest/comment on two things regarding the tarball.  
> >>>
> >>>1.  I think that while it's nice to have an rc script included with the
> >>>tarball, it probably shouldn't be installed automatically.  Instead make
> >>>it so the command "make install rc" be required to install them, but
> >>>they won't install with just "make install" or "make install all".  The
> >>>problem (and it's only minor because RPM continues on anyway) is that by
> >>>doing this you get errors when trying to turn it into an rpm such as
> >>>this:
> >>>
> >>>==> installing rc startup for daemon(s).
> >>>./install.sh: /etc/init.d//osirisd.tmp: cannot create
> >>>./install.sh: /etc/init.d//osirisd.tmp: cannot open
> >>>/usr/local/bin/chmod: cannot access `/etc/init.d//osirisd': No such file
> >>>or directory
> >>>/usr/local/bin/rm: cannot lstat `/etc/init.d//osirisd.tmp': No such file
> >>>or directory
> >>>/usr/local/bin/ln: creating symbolic link `/etc/rc2.d//S95osirisd' to
> >>>`/etc/init.d//osirisd': Permission denied
> >>>./install.sh: /etc/init.d//osirismd.tmp: cannot create
> >>>./install.sh: /etc/init.d//osirismd.tmp: cannot open
> >>>/usr/local/bin/chmod: cannot access `/etc/init.d//osirismd': No such
> >>>file or directory
> >>>/usr/local/bin/rm: cannot lstat `/etc/init.d//osirismd.tmp': No such
> >>>file or directory
> >>>/usr/local/bin/ln: creating symbolic link `/etc/rc2.d//S95osirismd' to
> >>>`/etc/init.d//osirismd': Permission denied
> >>>==> Skipping permission setting.
> >>>==> Skipping post install.
> >>>
> >>>2.  It seem that it doesn't detect the user specified if they are in
> >>>NIS.  I would suspect the same is true for ldap.  What happens is that
> >>>even though I have the generic user account existing in NIS, when
> >>>installing osiris it doesn't see it and tries to create the account in
> >>>the local files.  This should probably have better checking.
> >>>
> >>>Otherwise, we're quite pleased with this.  It is very simple and does
> >>>what we need. Thanks.
> >>>
> >>>
> >>>
> >>>------------------------------------------------------------------------
> >>>
> >>>_______________________________________________
> >>>osiris-devel mailing list
> >>>osiris-devel at lists.shmoo.com
> >>>https://lists.shmoo.com/mailman/listinfo/osiris-devel
> >>
> >>_______________________________________________
> >>osiris-devel mailing list
> >>osiris-devel at lists.shmoo.com
> >>https://lists.shmoo.com/mailman/listinfo/osiris-devel
> >>
> >>
> >>------------------------------------------------------------------------
> >>
> >>_______________________________________________
> >>osiris-devel mailing list
> >>osiris-devel at lists.shmoo.com
> >>https://lists.shmoo.com/mailman/listinfo/osiris-devel
> _______________________________________________
> osiris-devel mailing list
> osiris-devel at lists.shmoo.com
> https://lists.shmoo.com/mailman/listinfo/osiris-devel
-- 
David M. Fetter - UNIX Systems Administrator
Portland State University - www.oit.pdx.edu
"Only those who attempt the absurd can achieve the impossible."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.shmoo.com/pipermail/osiris-devel/attachments/20041007/aa418c5b/attachment.pgp 


More information about the osiris-devel mailing list