-
Notifications
You must be signed in to change notification settings - Fork 39
/
genup.8
371 lines (349 loc) · 13.8 KB
/
genup.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
.TH GENUP 8 "Version 1.0.28: September 2020"
.SH NAME
genup \- update Portage tree, all installed packages, and kernel
.SH SYNOPSIS
.B genup
[\fIoptions\fR]
.SH DESCRIPTION
.B genup
is a utility intended to simplify the process of keeping your Gentoo system
up to date.
When invoked, it automatically performs the following steps, in order:
.br
.RS
.IP \(bu 2
updates Portage tree & overlays; syncs \fBeix\fR(1)
(if desired)
.br
(using (if needed) \fBemaint sync --auto\fR, and \fBeix-sync\fR)
.IP \(bu 2
removes any prior \fBemerge\fR(1) resume history
.br
(using \fBemaint --fix cleanresume\fR)
.IP \(bu 2
on aarch64, attempts to apply any pending fixups
.br
(if desired, by running \fI/etc/cron.weekly/fixup\fR; errors non-fatal)
.IP \(bu 2
ensures Portage itself is up-to-date
.br
(using \fBemerge --oneshot --update portage\fR)
.IP \(bu 2
ensures genup itself is up-to-date (restarting if not)
.br
(using \fBemerge --oneshot --update genup\fR)
.IP \(bu 2
updates all packages in the @world set
.br
(first using \fBemtee\fR, if the matching USE flag is set, and then using \fBemerge --deep --with-bdeps=y --changed-use --update @world\fR)
.IP \(bu 2
removes unreferenced packages
.br
(using \fBemerge --depclean\fR)
.IP \(bu 2
builds any external modules (such as those for VirtualBox)
.br
(using \fBemerge @module-rebuild --exclude '*-bin'\fR)
.IP \(bu 2
rebuilds any packages depending on stale libraries
.br
(using \fBemerge @preserved-rebuild\fR)
.IP \(bu 2
updates any old \fBperl\fR(1) modules (if desired)
.br
(using \fBperl-cleaner --all\fR)
.IP \(bu 2
removes stale versions of \fBpython\fR(1) from eselect list
.br
(using \fBeselect python cleanup\fR)
.IP \(bu 2
resolves clashing config file changes (in interactive mode)
.br
(using \fBdispatch-conf\fR)
.IP \(bu 2
upgrades the kernel if possible (to staging, in \fI/boot\fR)
.br
(using \fBbuildkernel --stage-only\fR)
.IP \(bu 2
removes unreferenced packages (again)
.br
(using \fBemerge --depclean\fR)
.IP \(bu 2
fixes missing shared library dependencies
.br
(using \fBrevdep-rebuild\fR)
.IP \(bu 2
rebuilds any packages depending on stale libraries (again)
.br
(using \fBemerge @preserved-rebuild\fR)
.IP \(bu 2
removes any unused source tarballs (if desired)
.br
(using \fBeclean --deep distfiles\fR)
.IP \(bu 2
deploys new kernel from staging (if desired and available)
.br
(using \fBbuildkernel --copy-from-staging\fR)
.IP \(bu 2
updates environment settings (as a precautionary measure)
.br
(using \fBenv-update\fR)
.IP \(bu 2
updates the \fBeix\fR(1) package metadata (if desired)
.br
(using \fBeix-sync -0\fR)
.IP \(bu 2
runs any custom updaters in \fI/etc/genup/updaters.d\fR
.PP
.RE
The \fBgenup\fR utility can be invoked in non-interative (default) or
interactive mode (see the \fB--ask\fR option, below).
Non-interactive mode is suitable for use in a scripted invocation, for example
as part of a nightly \fBcron\fR(8) job (see \fBAUTOMATING GENUP\fR, below).
.SH OPTIONS
.TP
.BR \-a ", " \-\-ask
By default, \fBgenup\fR will:
a) attempt to perform the update automatically;
b) attempt to rebuild the kernel (if a new version becomes available);
c) fail immediately on any error;
d) invoke underlying tools (such as \fBbuildkernel\fR(8)) in non-interactive
mode; and
e) not invoke \fBdispatch-conf\fR(1) to resolve clashing configuration file
updates (unless the \fB--dispatch-conf\fR option has been specified)
However, if you supply the \fB--ask\fR option, then \fBgenup\fR will instead:
a) prompt for confirmation during important steps of the update;
b) ask whether or not you wish to rebuild the kernel
(if a new version becomes available)
c) fail immediately on any error, \fBexcept\fR when that error occurs during the
@world update \fBemerge\fR(1) (in which case, prompt whether or not to retry,
allowing the problem \(em for example, a missing use flag \(em to be fixed in
a separate terminal);
d) invoke most underlying tools (such as \fBbuildkernel\fR(8)) in interactive mode; and
e) invoke \fBdispatch-conf\fR(1) to resolve clashing configuration file updates.
In both interactive and non-interactive modes, \fBgenup\fR can be instructed
to skip the kernel rebuild check, using the \fB--no-kernel-upgrade\fR option
(see below).
.TP
.BR \-A ", " \-\-alert
If possible, sounds the terminal bell when interaction is needed.
Selecting this option automatically selects \fB--ask\fR.
.TP
.BR \-b ", " \-\-buildkernel\-args\=ADDITIONAL_ARGS
Passes the specified arguments to the main
.BR buildkernel (8)
invocation (the one used to create a new kernel in the \fI/boot\fR staging
area). These arguments are \fInot\fR passed to the second invocation, where used
(which copies the built kernel to from the staging area to the system
partition).
.TP
.BR \-c ", " \-\-dispatch\-conf
Always forces \fBdispatch-conf\fR(1) to be run, where necessary, even if
not in interactive mode.
.TP
.BR \-C ", " \-\-no\-custom\-updaters
Do not attempt to run any custom updaters found in
\fI/etc/genup/updaters.d\fR.
.TP
.BR \-d ", " \-\-deploy\-from\-staging
When a new kernel is available (and, if in interactive mode, you so request)
\fBgenup\fR will build that new kernel to the staging area in \fI/boot\fR
(using \fBbuildkernel\fR(8) with the \fB--stage-only\fR option).
This ensures that the build can proceed without needing your boot USB key
(if used) to be inserted, so it can be completed in an unattended context.
When the \fB--deploy-from-staging\fR option is specified, \fBgenkernel\fR will
also attempt to deploy the new kernel (if any) at the end of the process
to your EFI system partition (NB, in
interactive mode, you will be asked whether you wish to do this anyway).
If you create a new kernel as the result of a \fBgenup\fR run, but do \fInot\fR
choose to deploy it at the time, you can always do so later by issuing:
\fBbuildkernel --ask --copy-from-staging\fR.
.TP
.BR \-e ", " \-\-emerge\-args\=ADDITIONAL_ARGS
Passes the specified arguments to the main
.BR emerge (1)
invocation. One possible use here is to specify:
.br
\fB--emerge-args="--autounmask-write"\fR
This instructs \fBemerge\fR(1) to automatically make any necessary changes to
Portage configuration files to ensure that the process can proceed (adding
additional use flags, allowing libraries, and so on), provided the Portage
\fB--autounmask\fR option is enabled (which by default it is).
This can be useful when
running \fBgenup\fR in an unattended situation (assuming of course you are
comfortable with such changes being made automatically on your behalf; you
will of course still get a chance to review any changes made via
the \fBdispatch-conf\fR(1) mechanism).
Note also that if you do use this approach, you should also specify
the \fB--ignore-required-changes\fR option.
.TP
.BR \-E ", " \-\-no\-emtee
Do not attempt to use the \fBemtee\fR(1) tool, even when the
eponymous USE flag has been enabled.
.TP
.BR \-F ", " \-\-no\-fixups
Do not attempt to run any custom fixups on aarch64, even if the file
\fI/etc/cron.weekly/fixup\fR is present and executable.
.TP
.BR \-h ", " \-\-help
Displays a short help screen, and exits.
.TP
.BR \-i ", " \-\-ignore\-required\-changes
By default, when running in non-interactive mode, \fBgenup\fR checks to see if
the \fBemerge @world\fR step would fail due to required user changes
(to \fI/etc/portage/package.use\fR etc.), and stops with an error if so.
This option suppresses that check.
Note that specifying this option (in non-interactive mode) can result in cases
where your \fBgenup\fR run completes successfully, but the \fB@world\fR set
has \fBnot\fR, in fact, been brought fully up to date.
It has no effect in interactive mode.
.TP
.BR \-k ", " \-\-keep\-old\-distfiles
By default, \fBgenup\fR will remove any source tarballs that have previously
been downloaded by Portage, but which do not relate to the installed version of
any package.
This option inhibits such cleaning.
.TP
.BR \-m ", " \-\-no\-eix\-metadata\-update
Do not perform an update of the \fBeix\fR metadata at the end-of-run (NB, specifying
this may cause odd results to be reported when using the \fBeix\fR tool
subsequently).
.TP
.BR \-M ", " \-\-no\-module\-rebuild
Do not attempt to rebuild external modules by default.
.TP
.BR \-n ", " \-\-no\-kernel\-upgrade
Do not perform (in non-interactive mode) or offer to perform (in interactive
mode) a kernel recompile, even should a newer version be available.
This option is implied if the \fBbuildkernel\fR USE flag is unset.
Note, this does \fBnot\fR itself prevent the update of \fBgentoo-sources\fR (or similar
package), during the @world \fBemerge\fR(1) step.
.TP
.BR \-N ", " \-\-no\-nocache
Do not attempt to use \fBnocache\fR(1) with \fBeix-sync\fR(1), even when
the \fBnocache\fR USE flag is set.
.TP
.BR \-p ", " \-\-no\-perl\-cleaner
Do not attempt to run \fBperl-cleaner\fR(1) during the process.
.TP
.BR \-r ", " \-\-adjustment\=N
Specifies the \fBnice\fR(1) adjustment value N (-20<=N<=19) under which
to run \fBemerge\fR(1) and \fBbuildkernel\fR(8) operations.
If this option is unspecified, the default niceness adjustment value is 19,
which causes builds to run at the lowest possible
priority; this is useful to prevent \fBgenup\fR clogging up your
system. Be careful about using negative values!
.TP
.BR \-S ", " \-\-no\-eix\-sync
Do not attempt to run \fBeix-sync\fR(1) at the start of the process.
.TP
.BR \-v ", " \-\-verbose
Provides more verbose output from invoked tools, where possible.
.TP
.BR \-V ", " \-\-version
Displays the version number of \fBgenup\fR, and exits.
.TP
.BR \-x ", " \-\-eix\-sync\-args\=ADDITIONAL_ARGS
Passes the specified arguments to the main
.BR eix-sync (1)
invocation. One possible use here is to specify:
.br
\fB--eix-sync-args="-q"\fR
This instructs \fBeix-sync\fR(1) to suppress its otherwise verbose output
(which was the default behaviour of \fBgenup\fR prior to version 1.0.14).
.SH EXIT STATUS
The exit status is 0 if the update completed successfully, and 1 otherwise.
.SH PARALLEL MAKE
Quite frequently, large \fBemerge\fR(1) runs fail because one
or more of the invoked ebuilds have problems running with parallel
\fBmake\fR(1) (as set via MAKEOPTS="-jN", where N>1).
Because of this, \fBgenup\fR will attempt to
automatically resume any \fBemerge\fR(1) operation with parallel make
inhibited, should the original operation fail. A warning is issued if this
happens.
In a similar fashion, if you are using distributed compilation
with the \fBdistcc\fR and \fBdistcc-pump\fR features, these will be
automatically inhibited if operations are retried.
.SH AUTOMATING GENUP
Should you wish to run \fBgenup\fR automatically, you need to ensure it has
an appropriate environment.
For example, you could put the following script in
\fI/etc/cron.daily/genup\fR, to execute an update nightly (be sure to make
the file executable):
.nf
.RS
#!/bin/bash
export PATH="/usr/local/sbin:/usr/local/bin:"\\
"/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin"
genup >/var/log/latest-genup-run.log 2>&1
.fi
.SH EFFECT OF USE FLAGS
If the \fBbuildkernel\fR USE flag is \fIun\fRset when \fBgenup\fR is emerged
(it is set by default), then in effect the \fB--no-kernel-upgrade\fR option
is always forced on, and as such
\fBgenup\fR will never attempt to call
\fBbuildkernel\fR(8).
This makes it suitable for use in an embedded context (where there may
be no EFI system partition etc.).
If the \fBemtee\fR USE flag is set when \fBgenup\fR is emerged
(it is \fIun\fRset by default), then the \fB@world\fR update will first be
attempted using the (often, more efficient) \fBemtee\fR tool. This behaviour
may always be suppressed by using the \fB--no-emtee\fR option. Note that even when
\fBemtee\fR \fIis\fR used, and even when it returns successfully, a regular
\fB@world\fR \fBemerge\fR will always still be attempted immediately afterwards
(nomally a relatively rapid no-op, this behaviour ensures all corner cases are
resoved correctly).
If the \fBnocache\fR USE flag is set when \fBgenup\fR is emerged
(it is \fIun\fRset by default), then all repo sync steps will be prefixed
by \fBnocache\fR, which can prevent overswapping etc. on limited
memory systems. This behaviour may always be suppressed by using the
\fB--no-nocache\fR option.
.SH EXTENDING GENUP
At the end of the main process, \fBgenup\fR will attempt to run any executable
files found in the \fI/etc/genup/updaters.d\fR directory
(symlinks to executable files are also OK). You can use this facility to add
your own custom update steps should you need to do so.
Should any such custom updater exit with a non-zero
exit status, \fBgenup\fR will also exit (immediately) with a failure code.
Note that you can suppress the running of custom updaters, by passing the
\fB--no-custom-updaters\fR option to \fBgenup\fR.
.SH USE WITH WEBRSYNC-GPG
If you have the webrsync-gpg FEATURE enabled in \fI/etc/portage/make.conf\fR,
\fBgenup\fR will select the -w option when calling \fBeix-sync\fR.
Since, in this
mode, \fBeix-sync\fR does not automatically sync (non-layman) overlays,
\fBgenup\fR will
call \fBemaint sync --auto\fR to do this for you, before \fBeix-sync\fR.
As such, you must make sure you have set "auto-sync = no" in
\fI/etc/portage/repos.conf/gentoo.conf\fR when using the webrsync-gpg FEATURE,
to prevent \fBemaint sync --auto\fR from also updating the main gentoo repo
using rsync (which will almost certainly not be what you want).
NB: most users will \fBnot\fR have the webrsync-gpg FEATURE set, and so should ignore
this note.
.SH COPYRIGHT
.nf
Copyright \(co 2014-2020 sakaki
License GPLv3+ (GNU GPL version 3 or later)
<http://gnu.org/licenses/gpl.html>
This is free software, you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.fi
.SH AUTHORS
sakaki \(em send bug reports or comments to <[email protected]>
.SH "SEE ALSO"
.BR dispatch-conf (1),
.BR eclean (1),
.BR emerge (1),
.BR emtee (1),
.BR eix (1),
.BR eix-sync (1),
.BR emaint (1),
.BR nice (1),
.BR nocache (1),
.BR make (1),
.BR python (1),
.BR perl-cleaner (1),
.BR buildkernel (8),
.BR revdep-rebuild (1),
.BR cron (8),
.BR portage (5).