On May 7, 2023, at 19:42, Kastus Shchuka wrote:

> After running port sync I see files extracted from ports.tar owned by a 
> non-existent group with numerical id 505:
> 
> $ ls -l 
> /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/
> total 474776
> -rw-r--r--   1 root  admin   20472245 Apr 30 17:46 PortIndex
> -rw-r--r--   1 root  admin        512 Apr 30 18:29 PortIndex.rmd160
> drwxr-xr-x  30 root  505          960 Jan 30 18:30 base
> -rw-r--r--   1 root  admin  114272256 Jan 30 18:51 base.tar
> -rw-r--r--   1 root  admin        512 Jan 30 18:51 base.tar.rmd160
> drwxr-xr-x  65 root  505         2080 Apr 30 19:21 ports
> -rw-r--r--   1 root  admin  108322816 Apr 30 18:29 ports.tar
> -rw-r--r--   1 root  admin        512 Apr 30 18:29 ports.tar.rmd160
> 
> All files in ports.tar are owned by buildbot:buildbot or numerically 500/505.
> 
> drwxr-xr-x  0 buildbot buildbot    0 Mar 29 17:36 ports/
> -rw-r--r--  0 buildbot buildbot  234 Nov 16  2020 ports/.gitattributes
> drwxr-xr-x  0 buildbot buildbot    0 Nov 26 10:09 ports/.github/
> -rw-r--r--  0 buildbot buildbot   84 Nov 16  2020 ports/.gitignore
> -rw-r--r--  0 buildbot buildbot 1476 Mar 29 17:36 ports/.mailmap
> -rw-r--r--  0 buildbot buildbot 1996 Feb  8 23:57 ports/LICENSE
> 
> drwxr-xr-x  0 500    505         0 Mar 29 17:36 ports/
> -rw-r--r--  0 500    505       234 Nov 16  2020 ports/.gitattributes
> drwxr-xr-x  0 500    505         0 Nov 26 10:09 ports/.github/
> -rw-r--r--  0 500    505        84 Nov 16  2020 ports/.gitignore
> -rw-r--r--  0 500    505      1476 Mar 29 17:36 ports/.mailmap
> -rw-r--r--  0 500    505      1996 Feb  8 23:57 ports/LICENSE
> 
> 
> As I don't have local user with id 500 and neither I have group with id 505,
> I end up with files owned by unknown group.
> 
> I think it is a side effect of extracting ports.tar by user root which can 
> preserve original numeric ids.
> 
> I wonder if extracted tarball should be forced to root:admin ownership after 
> extraction.
> 
> Or do I need to create local user buildbot:buildbot (500:505) to continue 
> using binary packages?

You should not need to do anything. I agree that the use of the 500 uid and 505 
gid is untidy when those users don't exist on your system (or may exist but be 
some random user or group not related to this tarball), but as far as I know it 
should not cause any problems. These just happen to be the uid and gid of the 
buildbot user and group on the server that creates the tarball.

Ideally I should fix the problem on the server by having it use fakeroot to 
change all the user and group names to macports when creating the tarball, but 
I haven't done that yet.

Reply via email to