[scponly] New scponly Snapshot Release

Kaleb Pederson kaleb.pederson at gmail.com
Sat Nov 20 14:57:39 EST 2010


On Saturday, November 20, 2010 08:49:28 am Sven Hoexter wrote:
> On Sat, Nov 20, 2010 at 08:18:42AM -0800, Kaleb Pederson wrote:
> > On Sat, Nov 20, 2010 at 3:44 AM, Frank Fegert <fra.nospam.nk at gmx.de> wrote:
> 
> > >  chown: /home/$USER/rpmbuild/rpms/scponly-4.8-instroot/opt/freeware/bin/#inst.9764974#: Operation not permitted.
> > >  gmake: *** [install] Error 1
> > >  Bad exit status from /home/$USER/rpmbuild/rpms/rpm-tmp.3464 (%install)
> > 
> > I'll have to think about a good way to fix this as I'm not sure how
> > this is typically handled. If anybody knows, I'd be glad to
> > incorporate changes.
> 
> Three ideas and I'm not sure how they could fit in a non GNU/Linux world
> with a somewhat different toolchain:
> 
> a) Use fakeroot (more or less the default approach in the Debian world)
> b) Use sudo, requires of course a preparation of the system you use for
>    developement and building.
> c) The evil one: Move it to the postinst script.

Thanks for the ideas Sven.

In thinking about it some more, I can probably just check to the uid of the user to see if it's root.  If it is, I'll set the ownership to root, otherwise I just won't set those options.  It's both easy and should be sufficient. I'm curious if it would be sufficient to leave the uid and gid off the install calls as it defaults to the uid/gid of the calling person.  I'll test this.

Is the `id` command available on AIX/Solaris/*BSD?  How about whoami and getent? If there aren't any consistent options, I could add a helper util to scponly that will use a POSIX system call to get the user id and then use that during install. 

-- 
Kaleb Pederson

Blog - http://kalebpederson.com
Twitter - http://twitter.com/kalebpederson



More information about the scponly mailing list