You are not logged in.

#1 2021-02-09 11:42:31

solskogen
Member
From: Norway
Registered: 2005-03-06
Posts: 117

[Solved] namcap complains (correctly-ish) about wrong owner

By unknown reason, two files in a package that I'm creating doesn't belong to root:root.
Why is that?

aarch64-unknown-linux-gnu-gcc-bootstrap E: File (usr/lib/gcc/aarch64-unknown-linux-gnu/10.2.0/libgcc.a) is owned by solskogen:solskogen
aarch64-unknown-linux-gnu-gcc-bootstrap E: File (usr/lib/gcc/aarch64-unknown-linux-gnu/10.2.0/libgcov.a) is owned by solskogen:solskogen

The all of the other files in that directory is owned by root:root, but for some strange reason those two files are getting owned by me. I don't have anything special like chown is anything like that in the PKGBUILD. It's just from a normal "make install".

[solskogen@archlinux-builder trunk]$ ls -l /usr/lib/gcc/aarch64-unknown-linux-gnu/10.2.0/
total 84100
-rwxr-xr-x 1 root      root      27366088 Feb  9 12:27 cc1
-rwxr-xr-x 1 root      root      29036936 Feb  9 12:27 cc1plus
-rwxr-xr-x 1 root      root        638096 Feb  9 12:27 collect2
-rw-r--r-- 1 root      root          3336 Feb  9 12:27 crtbegin.o
-rw-r--r-- 1 root      root          3464 Feb  9 12:27 crtbeginS.o
-rw-r--r-- 1 root      root          3952 Feb  9 12:27 crtbeginT.o
-rw-r--r-- 1 root      root          1224 Feb  9 12:27 crtend.o
-rw-r--r-- 1 root      root          1224 Feb  9 12:27 crtendS.o
-rw-r--r-- 1 root      root          3464 Feb  9 12:27 crtfastmath.o
drwxr-xr-x 2 root      root          4096 Feb  9 12:29 include
drwxr-xr-x 2 root      root          4096 Feb  9 12:29 include-fixed
drwxr-xr-x 3 root      root          4096 Feb  9 12:29 install-tools
-rw-r--r-- 1 solskogen solskogen  1460762 Feb  9 12:27 libgcc.a
-rw-r--r-- 1 solskogen solskogen    74402 Feb  9 12:27 libgcov.a
lrwxrwxrwx 1 root      root            22 Feb  9 12:27 liblto_plugin.so -> liblto_plugin.so.0.0.0
lrwxrwxrwx 1 root      root            22 Feb  9 12:27 liblto_plugin.so.0 -> liblto_plugin.so.0.0.0
-rwxr-xr-x 1 root      root         91944 Feb  9 12:27 liblto_plugin.so.0.0.0
-rwxr-xr-x 1 root      root      26247056 Feb  9 12:27 lto1
-rwxr-xr-x 1 root      root       1143280 Feb  9 12:27 lto-wrapper
drwxr-xr-x 3 root      root          4096 Feb  9 12:29 plugin

Last edited by solskogen (2021-02-09 17:57:59)

Offline

#2 2021-02-09 12:43:03

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: [Solved] namcap complains (correctly-ish) about wrong owner

What version of binutils?

Offline

#3 2021-02-09 13:02:32

solskogen
Member
From: Norway
Registered: 2005-03-06
Posts: 117

Re: [Solved] namcap complains (correctly-ish) about wrong owner

binutils 2.36-3

Offline

#4 2021-02-09 17:57:25

solskogen
Member
From: Norway
Registered: 2005-03-06
Posts: 117

Re: [Solved] namcap complains (correctly-ish) about wrong owner

Seems this is a bug in either glibc/binutils and/or fakeroot.
https://sourceware.org/pipermail/binuti … 15241.html

Offline

#5 2021-02-09 17:59:24

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: [Solved] namcap complains (correctly-ish) about wrong owner

That's why I asked about the version of binutils. You have 2.36, though, not 2.36.1 which was pulled from testing because of this. There is another issue in 2.36 where things that aren't supposed to be root:root get changed to that, but that's not the situation here.

Last edited by Scimmia (2021-02-09 17:59:57)

Offline

#6 2021-02-09 19:25:01

solskogen
Member
From: Norway
Registered: 2005-03-06
Posts: 117

Re: [Solved] namcap complains (correctly-ish) about wrong owner

It's probably "my" binutils then, because I needed a cross binutils for my target which is 2.36.1.

Offline

#7 2021-02-10 01:35:33

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] namcap complains (correctly-ish) about wrong owner

If you're running strip manually, there are a couple of different potential problems depending on (aarch64-unknown-linux-gnu-)binutils version. You can work around this by running e.g. ${triplet}-strip file -o file.stripped && cat file.stripped > file && rm file.stripped

See https://git.archlinux.org/pacman.git/co … 5bc4d8e170

The other workaround is running chown -R root: <files> in package().


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#8 2021-02-10 07:06:39

solskogen
Member
From: Norway
Registered: 2005-03-06
Posts: 117

Re: [Solved] namcap complains (correctly-ish) about wrong owner

Using chown seems a lot easier smile Thanks!

Offline

Board footer

Powered by FluxBB