On Wed, Apr 1, 2009 at 7:12 PM, Matt Brookings <m...@inter7.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Manvendra Bhangui wrote:
> > if [ " $(DESTDIR)" = " " ] ; then \
> > if test `...@idcommand@` != "0" ; then \
> > echo "you are not root"; \
> > exit 1; \
> > fi ; \
> This was basically what I was planning on doing. If they aren't root,
> and they haven't set the path to something they can potentially write to,
> it won't chmod or mkdir.
> That would cover the bases, right?
Yes. You got it right. RPM installation will typically use
DESTDIR=<rpm_base>/<build_root_dir> which will be writeable and hence you
need not do any chmod or chown.
For a user who plans to use source installation the steps would be
% sudo make install-strip
So make will do the usual chmod/chown when it detects that it is running
under root user