BtbN / FFmpeg-Builds

MIT License
7.76k stars 1.07k forks source link

Files inside tar archives are owned by 1001:127 + inconsistency in latest vs versioned tars ownership #416

Open slowpeek opened 2 weeks ago

slowpeek commented 2 weeks ago
$ tar -tvf ffmpeg-master-latest-linux64-gpl.tar.xz | head -n1
drwxr-xr-x runner/docker     0 2024-11-04 17:38 ffmpeg-master-latest-linux64-gpl/
$ tar --numeric-owner -tvf ffmpeg-master-latest-linux64-gpl.tar.xz | head -n1
drwxr-xr-x 1001/127          0 2024-11-04 17:38 ffmpeg-master-latest-linux64-gpl/
$ tar -tvf ffmpeg-N-117703-gdf00705e00-linux64-gpl.tar.xz | head -n1
drwxr-xr-x 1001/127          0 2024-11-04 14:33 ffmpeg-N-117703-gdf00705e00-linux64-gpl/
  1. I guess, humans prefer everything inside tars to be owned by root.
  2. Latest tars keep ownership in symbolic and numerical form, while versioned ones only has numbers. Under some conditions, extracting both would make the files owned by different entities. Conditions:

    • extract as root
    • plain tar xf without --no-same-owner or --numeric-owner
    • there is a user runner with uid other than 1001 and/or there is a group docker with gid other than 127

    Under these conditions, tar would map runner:docker to something other than 1001:127 for the latest tars, and keep it 1001:127 for the versioned ones.

BtbN commented 2 weeks ago

That's simply the users tar runs as. The files are created very differently. I don't immediately see how that's a problem with it, other than cosmetically?

slowpeek commented 2 weeks ago

It doesnt look clean to me. Like, if someone forgot about the final touch. It should be tar --owner root --group root .. where it packs versioned tars.

Upd: not --user, but --owner