Gentoo Archives: gentoo-portage-dev

From: Greg Turner <gmt@×××××.us>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Proposal of "uncooperative-root" in SUPPORTED_FEATURES
Date: Sat, 05 Jul 2014 11:13:43
Message-Id: CA+VB3NRMkdVphRc3svHEjZ1Vwr6nQxkQZFEqC2Qr9VQngWAG2w@mail.gmail.com
In Reply to: [gentoo-portage-dev] Proposal of "uncooperative-root" in SUPPORTED_FEATURES by X dej
1 For a while my cygwin port needed something like this. The problem was,
2 as, no doubt, the gentleman with the ridiculous name is all too familiar,
3 that you are fighting against a very long-standing convention. Anything
4 based on autotools tends to be a serious disaster, for example.
5
6 There was another problem -- more of an institutional/human-nature thing
7 than a technical problem. When I was on this same mission as you,
8 silly-name, it quickly became clear that people didn't give a shit and
9 didn't want those patches.
10
11 I hope those of you who I'm referring to won't be offended by that -- I'm
12 not making a normative statement here, just what I believe to be a factual
13 one. Indeed there were many good reasons for them to feel that way,
14 including:
15
16 1. They (the people who didn't give a shit) didn't share my problem or
17 understand why I should have it. The explanation, in my case, was
18 nontrivial.
19
20 2. The result of my approach was to greatly enlarge many core-system
21 ebuilds with huge patches to the upstream code; those evaluating those
22 patches would have been (I don't think I ever actually submitted them) the
23 same whose responsibility it would have become to maintain them.
24
25 In other words, my patches would have amounted to a request to sign the
26 decision-maker up for a bunch of ongoing busy-work, which they had no
27 personal stake in.
28
29 3. The number of people needing this feature would most likely have been
30 very small (of course, arguably, that number could have grown, once the
31 thing started to get off the ground. But that still left me with a
32 chicken-and-egg problem even if it solved the justification problem).
33
34 4. It made alot of "tidy" ebuilds into "untidy" ebuilds. This creates a
35 very real aesthetic problem and disinclines people to look on the
36 proposition favorably, myself included. Humans like their technology to
37 look pretty.
38
39 I eventually found other ways to deal with it, and was able to drop those
40 patches from my tree. But I lost many days of work screwing around with it.
41
42 I guess my only advice to you is, I strongly suggest you find ways to solve
43 this problem abstractly, rather than at an ebuild level, wherever possible.
44
45 One way you might look at is LD_PRELOAD trickery, allowing you to simply
46 lie about /bin/{ba,}sh and some other files' contents. That probably
47 wouldn't have worked in my case, but I suspect it might in yours. If that
48 won't work, then I guess my next idea would be to maintain a library of
49 code-injection hacks that could automatically fix those out-of-prefix
50 references in scripts and C code.
51
52 Abstract approaches at least stand a chance by avoiding problems #2 and #4,
53 which, I suspect, would be the big ones if you ever intend to upstream this
54 feature. As for the idea of maintaining a huge overlay... sure, go for it,
55 but be warned: it's really hard.
56
57 -gmt
58
59 On Sat, Jul 5, 2014 at 1:24 AM, X dej <
60 dreplaceelettereejbyeletterea@×××××.com> wrote:
61
62 > Hello to all,
63 >
64 > Summary: I have made many mods to sys-app/portage (2013 version). The
65 > result is
66 > a proposal of patch for latest sys-app/portage, see below.
67 >
68 > Main result of my mods to gentoo prefix:
69 >
70 > FEATURES=uncooperative-root emerge -bv =firefox-17
71 >
72 > now works on EPREFIX on Android-4.1 ARM. I use neither fakeroot nor
73 > GNURoot.
74 > root access never required. Distributed as a .tbz2 and a .ebuild by
75 > gentooandroid.sf.net, along with the necessary stage3.
76 >
77 > @dol-sen advised me one week ago on #gentoo-portage to post a rebased
78 > patch for
79 > HEAD of git.overlays.gentoo.org/proj/portage.git : I just hosted this
80 > patch on
81 >
82 > sf.net/projects/gentooandroid/files/sys-app_portage-current-HEAD_patch/download
83 > and it is also attached to this post, and to previous post on gentoo-dev
84 > mailing list; Joshua Kinard from there just advised me to post this patch
85 > at
86 > gentoo-portage-dev (here).
87 >
88 > I request comments and discussions about this patch. Summary:
89 >
90 > pym/portage/const.py + (this is SUPPORTED_FEATURES+=uncooperative-root)
91 > cnf/make.conf.example ++++++++++++++++++++++++++
92 > bin/ebuild-helpers/emake ++++++++
93 > bin/ebuild.sh --+++++++
94 > bin/misc-functions.sh -+++++
95 > bin/phase-helpers.sh +++++
96 >
97 > My aim is to take your remarks into account, then to build an overlay
98 > (will be
99 > hosted at endrood.sf.net) with up-to-date versions of all my mods. The
100 > final
101 > result will be a tested version of above patch, together with lastest
102 > builds
103 > for firefox, squeak, scala, gnucash, ...
104 >
105 > Thanks for you attention.
106 >
107 > Xdej (I disclosed my real identity to Rick "Zero_Chaos" Farina).
108 >