[pacman-dev] pacman user+group support without mtree
Eli Schwartz
eschwartz at archlinux.org
Mon Jun 4 21:01:22 UTC 2018
On 06/04/2018 04:55 PM, pacman-dev via pacman-dev wrote:
>
> Hello Pacman Dev, The basic question first, is there a way to create
> a tarball with .PKGINFO and use that tarball as a pacman package to
> install files with particular permissions without also adding a
> .MTREE file to that tarball?
>
> More context, currently we install files into our servers using a
> bash script. It pops open a tarball, keeping the users, groups,
> permissions, times for the files in the tarball, then it copies each
> file to the filesystem according to their location in the tarball.
> It works great for a cheap slightly better then POC solution. That
> tarball and a pacman pkg file are vary similar in that those are both
> tar files, with the files listed according to their desired location
> on the filesystem. So my idea was that it would be relatively easy
> for me to add the appropriate .PKGINFO into the tarball and switch
> from using my bash script to using pacman itself. This all worked
> great, except for users. In this case the file was created, in the
> right place, with the right permissions but the wrong user and group.
I'd suggest you have two choices to proceed from here:
- use makepkg to repackage your tarball
- generate the .MTREE which pacman expects
The .MTREE is simple to make, this is where makepkg generates it:
https://git.archlinux.org/pacman.git/tree/scripts/makepkg.sh.in?h=v5.1.0#n763
As you can see, it's really just bsdtar --format=mtree with a couple
other options.
--
Eli Schwartz
Bug Wrangler and Trusted User
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20180604/fb33f22b/attachment.asc>
More information about the pacman-dev
mailing list