On Wed, 2014-08-13 at 18:43 +0200, Kurt Jaeger wrote:
> Hi!
> 
> > On Tue, 2014-08-12 at 23:42 -0500, Matthew D. Fuller wrote:
> > > On Tue, Aug 12, 2014 at 09:31:08PM -0700 I heard the voice of
> > > Dennis Glatting, and lo! it spake thus:
> > > > 
> > > > do_install in the Makefile does the chown.
> > > 
> > > Generally you'd want to do something more like using @owner/@group in
> > > plist, rather than chown'ing in the stage.  Doing that would break
> > > building as non-root, too.
> > 
> > What's the order? plist cannot change owner/group unless it is defined.
> > Or, does plist execution happen /after/ the make process creates the
> > owner/group entries?
> 
> If you some file bin/myfile1 in the pkg-plist which need to be owned by some
> user etc, then:
> 
> [...]
> bin/myfile0
> @owner www
> @group www
> bin/myfile1
> @owner root
> @group wheel
> bin/myfile2
> [...]
> 
> should probably work. Can you try it ?
> 

I am setting permissions on directories and the man page for pkg-create
isn't clear. It says:

     @owner user
             Set default ownership for all subsequent files to user.  
             Use without an arg to set back to default (root) ownership.

Perhaps it means "files" in the generic?

Another issue I is the directories are made in the Makefile (do_install)
because pkg-create doesn't mention a "mkdir" function. The Porter's
Handbook mentions "@exec mkdir" however the StageDir WIKI states it is
ignored and directory creation should remain in post-install,
specifically:

        Directory creation should remain in the post-install: target (in
        particular because pkgng doesn't work like pkg_install in that
        area and pkgng ignores the @exec mkdir, and directly packs the
        directory even if empty). 
        
Consequently, I have no idea how to set the owner/group on those
directories in stagedir.







_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to