Date: Sun, 1 Jul 2018 17:32:18 -0400 From: Joseph Ward <jbwlists@hilltopgroup.com> To: freebsd-ports@freebsd.org Subject: Re: Any way to prevent do-extract chmod and chown? Message-ID: <7efb388d-2ee8-5d63-4dd5-aaaf1ec287bd@hilltopgroup.com> In-Reply-To: <9a359e4c-f1ca-4ee5-45fc-8dd96283695a@hilltopgroup.com> References: <dbfc8dbc-547c-74d9-e2dc-3cb3367293e1@hilltopgroup.com> <20180628082738.uv3bs6jmrrp52h5m@atuin.in.mat.cc> <dca25697-9a4f-deb7-f36d-7753d0fd27ae@hilltopgroup.com> <20180628220559.hwwvidjzwlaxtq4x@atuin.in.mat.cc> <CAOjFWZ7zAFABqyE-H3-JAF2D1_zT==vhEHiG6UstcVq358KsZw@mail.gmail.com> <9a359e4c-f1ca-4ee5-45fc-8dd96283695a@hilltopgroup.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 06/29/2018 09:51, Joseph Ward wrote: > Thank you, I'll look into that tool and will reply back (for future > seekers) if it does what I need. > > -Joseph > > > On 06/28/2018 19:00, Freddie Cash wrote: >> On Thu, Jun 28, 2018, 3:06 PM Mathieu Arnold, <mat@freebsd.org> wrote: >> >>> On Thu, Jun 28, 2018 at 01:43:41PM -0400, Joseph Ward wrote: >>>> Thank you. I found that to be the case; even though changing the >>>> "do-extract" target successfully staged the files and directories with >>>> the original permissions, pkg create seems to strip them out again >>>> without the pkg-plist additions. >>>> >>>> Are you aware of an easy/already existing command to create the >>>> pkg-plist with the user/group/permissions items for each file, or is >>>> that a script I'm going to have to write manually? I'm currently using >>>> the makeplist target as there are no subsitutions or anything else that >>>> would screw up the default scenario. >>> I am not aware of anything. But if you already have "stuff" creating a >>> big hierarchy with many users and groups, it may be easier to adapt >>> "stuff" to generate a pkg-plist file, or maybe to split your ports into >>> smaller, more manageable bits. >>> >>> make makeplist will give you a correct listing of files and >>> directories, but as everything runs as a regular user, it cannot be >>> aware of the users/groups you intend on using in the plist. >>> >> Isn't this something mtree can be used for? >> >> Use it to generate a listing of the files, permissions, and ownership of a >> tree, include the mtree output file in the port, and use a post-install >> script to run mtree to set ownership/permission. >> >> Cheers, >> Freddie >> >> Typos courtesy of my phone's keyboard. >> >> _______________________________________________ >> freebsd-ports@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-ports >> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-ports@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" Using mtree worked well. I generated the mtree file for the hierarchy on the original build machine, packaged it up as part of the package, and then ran mtree -up </path> -f <mtreefile> in the pkg-post-install script and it worked well. One item I did encounter was the following error: pkg: POST-INSTALL script failed but it didn't seem to impact anything; it ran successfully and everything was permissioned as it should be. Thanks, Joseph
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7efb388d-2ee8-5d63-4dd5-aaaf1ec287bd>