Gentoo Archives: gentoo-dev

From: Brian Harring <ferringb@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] glep 42 (news) round six
Date: Sun, 18 Dec 2005 07:30:35
Message-Id: 20051218072732.GK22142@nightcrawler.e-centre.net
In Reply to: Re: [gentoo-dev] glep 42 (news) round six by Ciaran McCreesh
1 On Sun, Dec 18, 2005 at 06:23:55AM +0000, Ciaran McCreesh wrote:
2 > On Sat, 17 Dec 2005 21:50:47 -0800 Brian Harring <ferringb@g.o>
3 > wrote:
4 > | Drop the magic-chicken crap (especially in light of your comments
5 > | about 'professional' news inline in the glep).
6 >
7 > Eh, there aren't any magic chickens in the glep.
8
9 Intention was a nudge about keeping snarky comments out of the glep, but yep.
10
11
12 > | Not really. Just requires your code to be space safe.
13 > |
14 > | You write good code, right? Especially since you need to keep our
15 > | path handling safe for osx (/volumes) and for users who do strange
16 > | things?
17 >
18 > The problem isn't my code. My code's fine. So is eselect. The problem is
19 > people who write their own handler scripts to suit their own needs, and
20 > then get nastily bitten because they don't realise we're allowing
21 > spaces in filenames.
22
23 People writing their own plugins/readers are responsible for what they
24 create. They *still* need to handle space's in file paths, thus as I
25 stated the requirement is arbitrary and uneeded.
26
27 Already addressed this in irc; you provide a framework. If plugins to
28 it suck, that's not your problem, nor is it a valid reason to
29 constrain things just because someone might manage something stupid
30 (remember this is gentoo, that line of logic would lock CFLAGS down
31 to a sane set).
32
33 To head off the "don't make features that are easily screwed up", this
34 isn't one of them- this is expecting code to behave correctly from the
35 path standpoint.
36
37 Yes it's harder on bash crap, but that's also a reflection of bash
38 (it's not an issue in python :-P ).
39
40
41 > | > News items should be signed with a detached GPG signature: ::
42 > |
43 > | why should vs must?
44 > | Should leaves open the possibility for a tree compromise and a news
45 > | item with Very Bad(tm) instructions stuck into it.
46 > |
47 > | Moving towards getting the whole tree signed, introducing new
48 > | components that aren't required signed works against that.
49 >
50 > I don't want to introduce any signing requirements that we don't have
51 > already. When signing for everything else becomes mandatory, signing
52 > for news would be too. If I make this a 'must', someone will ask me to
53 > specify how we're handling the Gentoo keyring...
54
55 Pawn the keyring off on others. The issues isn't an established trust
56 ring, it's required signing- yes, a trust ring makes things a helluva
57 lot easier on the user front, but it's useless without a required
58 signing policy.
59
60 We've already had this conversation also btw, in the
61 beginning of glep42 iirc. Obviously I don't agree
62 with your reasoning "I'll do it when it's required I do it". It's
63 useful now, it becomes massively more useful when a trust ring is
64 available.
65
66
67 > | > ``Revision:``
68 > | > Initially 1. Incremented every time a non-trivial change is
69 > | > made. Changes which require a re-read of the news item should
70 > | > instead use a new news item file. Mandatory.
71 > |
72 > | non-trivial changes that don't require a re-read sounds like a
73 > | contradiction. Clarify, especially since portage will mark this as
74 > | read _once_ and only once.
75 >
76 > Hrm, word it as "Changes other than minor formatting tweaks", or remove
77 > "non-trivial"?
78
79 It's not a wording thing, I'm pointing out sans spelling corrections
80 and trivial word mangling, any new info jammed in requires a new item
81 bump so readers can display the changes.
82
83 In light of that, wording above needs correction.
84
85
86 > | This isn't incredibly useful if ranged versions are ever introduced.
87 > | Ammending the glep for that seems stupid, looser language might be
88 > | wise.
89 >
90 > What's the syntax for ranged versions? And how do they differ from SLOT
91 > versions?
92
93 >=kde-base/kde-libs-3.0 <=kde-base/kde-libs-4.0
94 It's not syntax as much as a boolean and of atoms.
95
96
97 > | That's an implementation note, but I'm bringing it up since the time
98 > | to do the filter/cache instantiation is during portage initialization
99 > | (yes it sucks, but your stuck with stable)... so start thinking about
100 > | ways to make it fast, since python -c'import portage' is the slowest
101 > | part of portage queries
102 >
103 > Looks like I might have to do that thing in Python rather than bash
104 > then...
105
106 Do it in bash if you like being on the receiving end of atomic
107 wedgies.
108
109
110 > Once an hour would work fine. On the other hand, the merge is just
111 > copying a few small files -- time-wise, it's less than generating the
112 > cache for a couple of ebuilds.
113
114 More then a couple; this beast will bloat up to hundred or so files
115 I'd expect (remember translation serves as a multiplier).
116
117 Any signed item would need to be verified also, although fortunately
118 this chunk can be done in parallel to regen run.
119
120
121 > | > The main rsync tree will **not** use the ``yyyy/mm/`` subdirectory
122 > | > layout.
123 > |
124 > | What shall it use? Again, be explicit.
125 >
126 > + The news item directories will be moved into the single top level
127 > directory.
128 >
129 > Not sure whether we really want to do that. It makes the client code
130 > slightly easier...
131
132 Your decision.
133
134
135 > | You haven't stated how the 'package manager' will trigger the user's
136 > | reader of choice for these targets. Should also extend this to allow
137 > | a way to disable any news notices, lest someone's cronjob get hung
138 > | displaying news (feature or not, it's needed).
139 >
140 > The same way the package manager handles updating config files: it
141 > won't. It'll just tell the user that some news items need reading.
142
143 And you'll personally handle all of the bug spam from feature requests
144 that --ask trigger $news_reader?
145
146 It's a logical extension, thus people will ask for it.
147
148
149 > | > The package manager must keep track of news items that have already
150 > | > been added to the unread list to avoid repeatedly marking a deleted
151 > | > news item. This could be handled via a ``news-repoid.skip`` file
152 > | > containing the IDs of news items that have already been added to a
153 > | > ``news-repoid.unread`` file, but this method is not required by
154 > | > this GLEP.
155 > |
156 > | Specifics.
157 >
158 > I'm trying to avoid forcing a particular implementation on the skip
159 > file, since I can think of at least three different ways of doing it
160 > and I'm not sure which will be fastest...
161
162 Name them, and let others in on the sekret...
163
164
165 > | > When a news item is read, its name should be removed from the
166 > | > ``news-repoid.unread`` file. If a news client acts as an
167 > | > interactive reader rather than a gateway, it should then add the
168 > | > name to a ``news-repoid.read`` file in the same directory with the
169 > | > same file format.
170 > |
171 > | implementation issue; you need locking on this. If portage has to
172 > | farm out to the users reader of choice, then it needs to lock the
173 > | file to keep readers/writers from screwing with each other.
174 >
175 > We do? Marius told me it wasn't worth it.
176
177 I disagree. It's mainly contingent upon $news_reader being spawned
178 via --ask, although it *also* matters heavily if the user is flipping
179 through their news while a sync in the background is running- if the
180 utility updates on the way out, unless their is some advisorial
181 locking involved, you've just lost all of the new synced unread news.
182
183
184 > | Flock preferably, since it's faster then resorting to hardlink
185 > | trickery (yes this may be harder for shell crap, but so it goes since
186 > | hardlink locking sucks).
187 >
188 > What's wrong with mkdir?
189
190 Note the 'preferably'. mkdir's reliant on all code cleaning up on the
191 way out (that and sleep polling). Flock and friends don't suffer that
192 class of issues.
193
194
195 > | > News items can be removed (by removing the news file from the main
196 > | > tree) when they are no longer relevant, if they are made obsolete
197 > | > by a future news item or after a long period of time. This is the
198 > | > same as the method used for ``updates`` entries.
199 > |
200 > | implementation issue; updating unread/skip crap so it doesn't bloat
201 > | is required, but time frame also matters (crap sync resulting in news
202 > | getting removed, yet it still being valid, just missing from the
203 > | local tree).
204 >
205 > Hrm. We can't take the same approach here as we do with expiring
206 > updates entries?
207
208 We expire updates? If so, someone might want to look at the updates
209 from 3 years back...
210
211
212 > | > There is an existing automated tool [#forums-glsa]_ for posting
213 > | > GLSAs to the forums. A similar tool can be used for these news
214 > | > items.
215 > |
216 > | Pawned it off on someone, or something you'll be doing?
217 >
218 > Hopefully the former. I have it on reasonably good authority that it
219 > won't take more than half an hour if I end up having to do it though...
220
221 Get cracking then (regardless if it's pawning or coding).
222
223 ~harring

Replies

Subject Author
Re: [gentoo-dev] glep 42 (news) round six Marius Mauch <genone@g.o>
Re: [gentoo-dev] glep 42 (news) round six Ciaran McCreesh <ciaranm@g.o>