Gentoo Archives: gentoo-science

From: "François Bissey" <frp.bissey@×××××.com>
To: gentoo-science@l.g.o
Subject: [gentoo-science] tip for installing files from tarballs
Date: Mon, 08 Feb 2021 22:31:24
Message-Id: 9F00DA5B-BC10-4795-8D2A-20CF9074D3EE@gmail.com
1 Hi all,
2
3 I discovered an issue in a couple of packages for which sage-on-gentoo
4 provides ebuilds.
5 Some packages install data directly from a tar command. By that I mean
6 Makefile.am will a line like
7 cd $(DESTDIR)$(dbdir) && tar xf $(dist_db_DATA) && rm $(dist_db_DATA)
8
9 From a real Makefile at
10 https://github.com/sagemath/p_group_cohomology/blob/master/present/Makefile.am
11
12 I looks innocuous until you realise it has some funny effects on ownership.
13 fbissey@moonloop ~ $ ll /usr/share/pGroupCohomology/
14 total 1.1M
15 drwxr-xr-x 270 root root 12K Feb 3 21:55 .
16 drwxr-xr-x 319 root root 12K Feb 3 21:55 ..
17 drwxr-xr-x 3 fbissey fbissey 4.0K Feb 9 10:46 64gp1
18 drwxr-xr-x 4 fbissey fbissey 4.0K Feb 9 10:46 64gp10
19 drwxr-xr-x 4 fbissey fbissey 4.0K Feb 9 10:46 64gp100
20 drwxr-xr-x 4 fbissey fbissey 4.0K Feb 9 10:46 64gp101
21 drwxr-xr-x 4 fbissey fbissey 4.0K Feb 9 10:46 64gp102
22
23 the files in the tarball are owned by user/group 1001:1001
24 and on my system it is my personal user.
25 sci-mathematics/singular and that may include the version in the main tree,
26 would have to check, install its documentation from a tarball as well
27 fbissey@moonloop ~ $ ll /usr/share/doc/singular-4.1.1_p2-r3/
28 total 216K
29 drwxr-xr-x 3 2345 uucp 4.0K Nov 10 10:49 .
30 drwxr-xr-x 1361 root root 64K Feb 9 10:39 ..
31 drwxr-xr-x 2 2345 uucp 128K Nov 10 10:49 html
32 -rw-r--r-- 1 root root 497 Nov 10 10:48 README.bz2
33 -rw-r--r-- 1 root root 517 Nov 10 10:48 README.md.bz2
34 -rw-r--r-- 1 root root 585 Nov 10 10:48 README.pkg.bz2
35 fbissey@moonloop ~ $ ll /usr/share/doc/singular-4.1.1_p2-r3/html
36 total 30M
37 drwxr-xr-x 2 2345 uucp 128K Nov 10 10:49 .
38 drwxr-xr-x 3 2345 uucp 4.0K Nov 10 10:49 ..
39 -rwxr-xr-x 1 2345 uucp 915 Feb 14 2018 a_begin.gif
40 -rwxr-xr-x 1 2345 uucp 909 Feb 14 2018 a_begin_na.gif
41 -rwxr-xr-x 1 2345 uucp 927 Feb 14 2018 a_document.gif
42
43 I tried to use fowners inside the ebuild, but it only fixes file ownership,
44 folders are not touched. I tried to insert “—no-same-owner” in the call to tar
45 and that didn’t really help either. At best, I am expecting ownership to change
46 to portage:portage.
47
48 Has anyone dealt with something like this before? Apart from “recursively”
49 scripting install in the make file is there anything simple I could do?
50
51 Cheers,
52 François

Replies

Subject Author
Re: [gentoo-science] tip for installing files from tarballs Aisha Tammy <gentoo.science@×××××.cc>