1 |
On Sat, Oct 19, 2019 at 4:24 PM Joshua Kinard <kumba@g.o> wrote: |
2 |
|
3 |
> On 10/18/2019 09:41, Michał Górny wrote: |
4 |
> > Hi, everybody. |
5 |
> > |
6 |
> > It is my pleasure to announce that yesterday (EU) evening we've switched |
7 |
> > to a new distfile mirror layout. Users will be switching to the new |
8 |
> > layout either as they upgrade Portage to 2.3.77 or -- if they upgraded |
9 |
> > already -- as their caches expire (24hrs). |
10 |
> > |
11 |
> > The new layout is mostly a bow towards mirror admins, for some of whom |
12 |
> > having a 60000+ files in a single directory have been a problem. |
13 |
> > However, I suppose some of you also found e.g. the directory index |
14 |
> > hardly usable due to its size. |
15 |
> > |
16 |
> > Throughout a transitional period (whose exact length hasn't been decided |
17 |
> > yet), both layouts will be available. Afterwards, the old layout will |
18 |
> > be removed from mirrors. This has a few implications: |
19 |
> > |
20 |
> > 1. Users who don't upgrade their package managers in time will lose |
21 |
> > the ability of fetching from Gentoo mirrors. This shouldn't be that |
22 |
> > much of a problem given that the core software needed to upgrade Portage |
23 |
> > should all have reliable upstream SRC_URIs. |
24 |
> > |
25 |
> > 2. mirror://gentoo/file URIs will stop working. While technically you |
26 |
> > could use mirror://gentoo/XX/file, I'd rather recommend finally |
27 |
> > discarding its usage and moving distfiles to devspace. |
28 |
> > |
29 |
> > 3. Directly fetching files from distfiles.gentoo.org will become |
30 |
> > a little harder. To fetch a distfile named 'foo-1.tar.gz', you'd have |
31 |
> > to use something like: |
32 |
> > |
33 |
> > $ printf '%s' foo-1.tar.gz | b2sum | cut -c1-2 |
34 |
> > 1b |
35 |
> > $ wget http://distfiles.gentoo.org/distfiles/1b/foo-1.tar.gz |
36 |
> > ... |
37 |
> > |
38 |
> > |
39 |
> > Alternatively, you can: |
40 |
> > |
41 |
> > $ wget http://distfiles.gentoo.org/distfiles/INDEX |
42 |
> > |
43 |
> > and grep for the right path there. This INDEX is also a more |
44 |
> > lightweight alternative to HTML indexes generated by the servers. |
45 |
> > |
46 |
> > |
47 |
> > If you're interested in more background details and some plots, see [1]. |
48 |
> > |
49 |
> > [1] |
50 |
> https://dev.gentoo.org/~mgorny/articles/improving-distfile-mirror-structure.html |
51 |
> > |
52 |
> |
53 |
> So the answer I didn't really see directly stated here is, where do new |
54 |
> distfiles need to go //now//? E.g., if on woodpecker, I currently cp a |
55 |
> distfile to /space/distfiles-local. What is the new directory I need to |
56 |
> use? And if mirror://gentoo/${FOO} is going away, for the new distfiles |
57 |
> target, what would be the applicable prefix to use? |
58 |
> |
59 |
|
60 |
|
61 |
|
62 |
|
63 |
> |
64 |
> Directly using devspace seems like a bad idea, IMHO. Once long ago, we all |
65 |
> got chastised for doing exactly that. Too much possibility of |
66 |
> fragmentation |
67 |
> as devs retire or package maintainership changes hands. |
68 |
> |
69 |
> I looked at the whitepaper'ish-like writeup, and I kinda don't like using a |
70 |
> hash-based naming scheme on the new distfiles layout. I really kind prefer |
71 |
> breaking the directories up based on the first letter of the distfiles in |
72 |
> question, factoring case-sensitivity in (so you'd have 52 top-level |
73 |
> directories for A-Z and a-z, plus 10 more for 0-9). Under each of those |
74 |
> directories, additional subdirectories for the next few letters (say, |
75 |
> letters 2-3). Yes, this leads to some orphan cases where a distfile might |
76 |
> live on its own, but from a direct navigation standpoint, it's easy to find |
77 |
> for someone browsing the distfiles server and easy to predict where a |
78 |
> distfile is at. |
79 |
> |
80 |
> No math, statistical analysis, or deep-rooted knowledge of filesystems |
81 |
> behind that paragraph. Just a plain old unfiltered opinion. Sometimes, I |
82 |
> need to go get a distfile off the Gentoo mirrors, and being able to quickly |
83 |
> find it in the mirror root is great. Having to do hash calculations to |
84 |
> work |
85 |
> out the file path will be *really* annoying. |
86 |
> |
87 |
|
88 |
So if you want a tool that "downloads a distfile off of the mirrors" we |
89 |
should be able to build such a utility. |
90 |
|
91 |
I'm not really sure why that tool needs to be: |
92 |
*copy DISTFILENAME* |
93 |
wget distilfes.gentoo.org/$PASTE |
94 |
|
95 |
It could just `ebuild portageq download $DISTFILENAME or similar.` |
96 |
|
97 |
-A |
98 |
|
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
> |
105 |
> -- |
106 |
> Joshua Kinard |
107 |
> Gentoo/MIPS |
108 |
> kumba@g.o |
109 |
> rsa6144/5C63F4E3F5C6C943 2015-04-27 |
110 |
> 177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943 |
111 |
> |
112 |
> "The past tempts us, the present confuses us, the future frightens us. And |
113 |
> our lives slip away, moment by moment, lost in that vast, terrible |
114 |
> in-between." |
115 |
> |
116 |
> --Emperor Turhan, Centauri Republic |
117 |
> |
118 |
> |