Gentoo Archives: gentoo-alt

From: Lucas Ramage <ramage.lucas94@×××××.com>
To: gentoo-alt@l.g.o
Subject: [gentoo-alt] Re: Digest of gentoo-alt@lists.gentoo.org issue 488 (7750-7752)
Date: Mon, 25 Jun 2018 16:44:05
Message-Id: CAKkjsY-iOVr+ri2sKqcV8q7A66b=3LnnOGb997OiK1J7kijWig@mail.gmail.com
1 > I don't think venv is the correct way to handle system complexity. And
2 > I don't understand what can be achieved by installing portage inside.
3
4 Being able to install portage via pip [1] makes collaboration easier for
5 people who are already used to Python.
6
7 For example, when attempting to install portage manually, `python setup.py
8 install --help` outputs:
9
10 --prefix installation prefix
11 --exec-prefix (Unix only) prefix for platform-specific files
12 --home (Unix only) home directory to install under
13 --user install in user site-package
14 '/home/lramage/.local/lib64/python2.7/site-packages'
15 --install-base base installation directory (instead of --prefix or
16 --
17 home)
18 --install-platbase base installation directory for platform-specific
19 files (instead of --exec-prefix or --home)
20 --root install everything relative to this alternate root
21 directory
22 --install-purelib installation directory for pure Python module
23 distributions
24 --install-platlib installation directory for non-pure module
25 distributions
26 --install-lib installation directory for all module distributions
27 (overrides --install-purelib and --install-platlib)
28 --install-headers installation directory for C/C++ headers
29 --install-scripts installation directory for Python scripts
30 --install-data installation directory for data files
31 --compile (-c) compile .py to .pyc [default]
32 --no-compile don't compile .py files
33 --optimize (-O) also compile with optimization: -O1 for "python
34 -O", -
35 O2 for "python -OO", and -O0 to disable [default:
36 -O0]
37 --force (-f) force installation (overwrite any existing files)
38 --skip-build skip rebuilding everything (for testing/debugging)
39 --record filename in which to record list of installed files
40 --system-prefix Prefix for architecture-independent data
41 --system-exec-prefix Prefix for architecture-specific data
42 --bindir Install directory for main executables
43 --datarootdir Data install root directory
44 --docdir Documentation install directory
45 --htmldir HTML documentation install directory
46 --mandir Manpage root install directory
47 --portage-base (-b) Portage install base
48 --portage-bindir Install directory for Portage internal-use
49 executables
50 --portage-datadir Install directory for data files
51 --sbindir Install directory for superuser-intended executables
52 --sysconfdir System configuration path
53
54 Even after reading the documentation [2], I still didn't understand how to
55 actually install portage.
56 I also looked at the official ebuild [3] but I still wasted a few hours
57 trying to figure everything out.
58
59 I'm sure there are much smarter developers than me who could figure it out,
60 but I don't think this is practical for proxy-maintainers and power users.
61
62 However, with:
63
64 pip install --user portage
65
66 I can be on my merry way working on my ebuilds within a few minutes.
67
68 >> Not sure how that would work technically.
69
70 > virtualenv It is a dirtier hack than what we do with Prefix.
71
72 Again, I have no idea about the technical details involved with
73 `virtualenv`,
74 I just know that it allows me to quickly setup a development environment
75 without contaminating my system.
76
77 This is why postmarketOS is growing so fast. I already know how to create
78 packages for alpine linux and
79 I am familiar with python so I can port a device in less than a day if
80 there aren't too many hardware restrictions
81 (locked bootloader, no root access, binary blobs).
82
83 References:
84
85 [1]: https://packaging.python.org/tutorials/packaging-projects
86 [2]: https://dev.gentoo.org/~zmedico/portage/doc/portage.html
87 [3]: https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-apps/portage
88
89
90 On Wed, Jun 13, 2018 at 3:02 PM, <gentoo-alt+help@l.g.o> wrote:
91
92 > Topics (messages 7750 through 7752):
93 >
94 > [gentoo-alt] Re: Portage sync on demand
95 > 7750 - Benda Xu <heroxbd@g.o>
96 >
97 > [gentoo-alt] Re: Portage sync on demand
98 > 7751 - Lucas Ramage <ramage.lucas94@×××××.com>
99 >
100 > [gentoo-alt] Re: Portage sync on demand
101 > 7752 - Benda Xu <heroxbd@g.o>
102 >
103 >
104 >
105 > ---------- Forwarded message ----------
106 > From: Benda Xu <heroxbd@g.o>
107 > To: Lucas Ramage <ramage.lucas94@×××××.com>
108 > Cc: gentoo-alt@l.g.o
109 > Bcc:
110 > Date: Sat, 09 Jun 2018 04:03:22 +0900
111 > Subject: [gentoo-alt] Re: Portage sync on demand
112 > Hi Lucas,
113 >
114 > I think gentoo-alt has more expertise to solve the problems.
115 >
116 > Lucas Ramage <ramage.lucas94@×××××.com> writes:
117 >
118 > > So on unprivileged devices, I have been installing portage directly in
119 > > Termux and I have been having issues when attempting to checkout the
120 > > main tree. It's way too big! I don't have ~2GB+ just for ebuilds.
121 > >
122 > > It would be nice if I could run emerge and it would dynamically parse
123 > > the tree for dependencies and then fetch and build them without
124 > > installing them locally.
125 >
126 > Yes, that's a good-to-have.
127 >
128 > I am interpreting "installing them" as installing the gentoo portage
129 > tree.
130 >
131 > > I've used nfs and sshfs for mounting a remote tree
132 >
133 > I would go this way when in short of storage.
134 >
135 > > but I think it would be kind of awesome to use git directly.
136 >
137 > > This would be useful for working on rooting exploits on the fly. I
138 > > know Termux has support for Metasploit but it's ruby-based and pretty
139 > > heavy. Still not as bad as compiling perl though.
140 >
141 > It is a pain in the ass to use a phone without root. I will avoid it
142 > when I buy a phone.
143 >
144 > At the same time I understand that your effort will help those who stuck
145 > in Android normal user jails.
146 >
147 > > Also, I am still trying to figure out a reliable way to run a
148 > > unprivileged Gentoo RAP. So far I have tested
149 > > `/data/data/{com.termux,org.connectbot,jackpal.androidterm}` but I
150 > > assume any other terminal emulator will work. Is it not possible to
151 > > use a relative or dynamic path?
152 >
153 > Our IRC channel #gentoo-prefix freenode had a lot of discussions on
154 > relocating Gentoo Prefix. The conclusion is that portage has support
155 > for it built in, but outdated and need some extra love.
156 >
157 > Yours,
158 > Benda
159 >
160 >
161 > ---------- Forwarded message ----------
162 > From: Lucas Ramage <ramage.lucas94@×××××.com>
163 > To: gentoo-alt@l.g.o
164 > Cc:
165 > Bcc:
166 > Date: Mon, 11 Jun 2018 11:54:56 -0400
167 > Subject: [gentoo-alt] Re: Portage sync on demand
168 > >> It would be nice if I could run emerge and it would dynamically parse
169 > >> the tree for dependencies and then fetch and build them without
170 > >> installing them locally.
171 >
172 > > I am interpreting "installing them" as installing the gentoo portage
173 > tree.
174 >
175 > That is correct. First fetching the ebuilds required, then actually
176 > merging them.
177 >
178 > >> I've used nfs and sshfs for mounting a remote tree
179 >
180 > > I would go this way when in short of storage.
181 >
182 > Are there any performance issues with this approach besides network
183 > speed/bandwidth.
184 >
185 > And let's say I'm not on WiFi. These are mobile devices after all.
186 >
187 > I'm thinking of a proxy server setup that could calculate dependencies on
188 > the fly and only download those specific ebuilds.
189 >
190 > Also, I could see GLEP 9 as being useful for updating over cellular
191 > networks.
192 >
193 > References:
194 >
195 > - [GLEP 9: Gentoo Package Update System](https://www.gentoo.org
196 > /glep/glep-0009.html)
197 >
198 > - [Over-the-Air programming (OTA)](https://en.wikipedia.or
199 > g/wiki/Over-the-air_programming)
200 >
201 > >> Also, I am still trying to figure out a reliable way to run a
202 > >> unprivileged Gentoo RAP. So far I have tested
203 > >> `/data/data/{com.termux,org.connectbot,jackpal.androidterm}` but I
204 > >> assume any other terminal emulator will work. Is it not possible to
205 > >> use a relative or dynamic path?
206 >
207 > > Our IRC channel #gentoo-prefix freenode had a lot of discussions on
208 > > relocating Gentoo Prefix. The conclusion is that portage has support
209 > > for it built in, but outdated and need some extra love.
210 >
211 > That would be excellent. Python's virtualenv utility is pretty neat.
212 > It would be awesome if one could install portage inside of virtualenv, or
213 > to be able to `pip install --user portage`.
214 >
215 > Not sure how that would work technically.
216 >
217 > On Fri, Jun 8, 2018 at 3:03 PM, Benda Xu <heroxbd@g.o> wrote:
218 >
219 >> Hi Lucas,
220 >>
221 >> I think gentoo-alt has more expertise to solve the problems.
222 >>
223 >> Lucas Ramage <ramage.lucas94@×××××.com> writes:
224 >>
225 >> > So on unprivileged devices, I have been installing portage directly in
226 >> > Termux and I have been having issues when attempting to checkout the
227 >> > main tree. It's way too big! I don't have ~2GB+ just for ebuilds.
228 >> >
229 >> > It would be nice if I could run emerge and it would dynamically parse
230 >> > the tree for dependencies and then fetch and build them without
231 >> > installing them locally.
232 >>
233 >> Yes, that's a good-to-have.
234 >>
235 >> I am interpreting "installing them" as installing the gentoo portage
236 >> tree.
237 >>
238 >> > I've used nfs and sshfs for mounting a remote tree
239 >>
240 >> I would go this way when in short of storage.
241 >>
242 >> > but I think it would be kind of awesome to use git directly.
243 >>
244 >> > This would be useful for working on rooting exploits on the fly. I
245 >> > know Termux has support for Metasploit but it's ruby-based and pretty
246 >> > heavy. Still not as bad as compiling perl though.
247 >>
248 >> It is a pain in the ass to use a phone without root. I will avoid it
249 >> when I buy a phone.
250 >>
251 >> At the same time I understand that your effort will help those who stuck
252 >> in Android normal user jails.
253 >>
254 >> > Also, I am still trying to figure out a reliable way to run a
255 >> > unprivileged Gentoo RAP. So far I have tested
256 >> > `/data/data/{com.termux,org.connectbot,jackpal.androidterm}` but I
257 >> > assume any other terminal emulator will work. Is it not possible to
258 >> > use a relative or dynamic path?
259 >>
260 >> Our IRC channel #gentoo-prefix freenode had a lot of discussions on
261 >> relocating Gentoo Prefix. The conclusion is that portage has support
262 >> for it built in, but outdated and need some extra love.
263 >>
264 >> Yours,
265 >> Benda
266 >>
267 >
268 >
269 >
270 > --
271 >
272 > *Lucas Ramage* / Software Engineer
273 > ramage.lucas@××××××××××.com / (941) 404-6794
274 >
275 > *PGP Fingerprint* / Learn More <https://emailselfdefense.fsf.org/en/>
276 > EAE7 45DF 818D 4948 DDA7 0F44 F52A 5A96 7B9B 6FB7
277 > <https://pgp.mit.edu/pks/lookup?op=get&search=0xF52A5A967B9B6FB7>
278 >
279 > *Visit online journal*
280 > http://lramage94.gitlab.io <https://lramage94.gitlab.io>
281 >
282 >
283 >
284 > ---------- Forwarded message ----------
285 > From: Benda Xu <heroxbd@g.o>
286 > To: Lucas Ramage <ramage.lucas94@×××××.com>
287 > Cc: gentoo-alt@l.g.o
288 > Bcc:
289 > Date: Tue, 12 Jun 2018 23:32:53 +0900
290 > Subject: Re: [gentoo-alt] Re: Portage sync on demand
291 > Hi Lucas,
292 >
293 > Lucas Ramage <ramage.lucas94@×××××.com> writes:
294 >
295 > >>> I've used nfs and sshfs for mounting a remote tree
296 > >> I would go this way when in short of storage.
297 > >
298 > > Are there any performance issues with this approach besides network
299 > > speed/bandwidth.
300 > >
301 > > And let's say I'm not on WiFi. These are mobile devices after all.
302 > >
303 > > I'm thinking of a proxy server setup that could calculate dependencies
304 > > on the fly and only download those specific ebuilds.
305 > >
306 > > Also, I could see GLEP 9 as being useful for updating over cellular
307 > > networks.
308 >
309 > Go for it.
310 >
311 > >> Our IRC channel #gentoo-prefix freenode had a lot of discussions on
312 > >> relocating Gentoo Prefix. The conclusion is that portage has support
313 > >> for it built in, but outdated and need some extra love.
314 > >
315 > > That would be excellent. Python's virtualenv utility is pretty neat.
316 > > It would be awesome if one could install portage inside of virtualenv,
317 > > or to be able to `pip install --user portage`.
318 > >
319 > > Not sure how that would work technically.
320 >
321 > I don't think venv is the correct way to handle system complexity. And
322 > I don't understand what can be achieved by installing portage inside.
323 >
324 > virtualenv It is a dirtier hack than what we do with Prefix.
325 >
326 > Benda
327 >
328 >
329
330
331 --
332
333 *Lucas Ramage* / Software Engineer
334 ramage.lucas@××××××××××.com / (941) 404-6794
335
336 *PGP Fingerprint* / Learn More <https://emailselfdefense.fsf.org/en/>
337 EAE7 45DF 818D 4948 DDA7 0F44 F52A 5A96 7B9B 6FB7
338 <https://pgp.mit.edu/pks/lookup?op=get&search=0xF52A5A967B9B6FB7>
339
340 *Visit online journal*
341 http://lramage94.gitlab.io <https://lramage94.gitlab.io>