OSDN Git Service

An incorrect change for "show" command was fixed back.
[portsreinstall/current.git] / portsreinstall.8
1 .\" ==================================================================================
2 .\" ports reinstall installation guide
3 .\" Copyright (C) 2010-2012 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
4 .\" ==================================================================================
5 .TH PORTSREINSTALL 8 "08 January 2011" "FreeBSD" "FreeBSD System Manager's Manual"
6 .SH NAME
7 portsreinstall \- ports upgrading utility for massive forced reinstallation
8 .SH SYNOPSIS
9 .B portsreinstall
10 [
11 .I
12 OPTIONS
13 ] [
14 .I
15 command
16 ]
17 .SH NOTATIONS
18 The "glob" is either of pkgname_glob or portorigin_glob explained in the man page of portsdb(1) and ports_glob(1): for example, zip\-3.0, zip\-*, and archivers .zip. Here the wild card symbol "*" must be quoted or escaped.
19 In evaluation of globs, ports_glob(1) is used if it is installed for better compatibility, otherwise an alternative internal function is used.
20 .SH DESCRIPTION
21 This utility is an alternative to portupgrade(1) and portmaster(8), and designed to be suitable for reinstallation of all packages after major version upgrade of the system or very long absence of ports upgrade.
22 Usually, execute with no option nor argument, or with \fB\-p\fR or \fB\-P\fR if you have installed portupgrade(1).
23 .SH ARGUMENTS
24 One of the following \fIcommands\fR can be given for optional operations or confirmation.
25 .TP
26 \fBdo\fR
27 Full execution (default).
28 .TP
29 \fBprepare\fR
30 Stop before the actual operations to the ports/packages.
31 .TP
32 \fBredo\fR
33 Execute again for failed ports and their dependents.
34 .TP
35 \fBclean\fR
36 Clean up the temporal database.
37 .TP
38 \fBok add\fR \fIglob1\fR [\fIglob2\fR ...]
39 Register manually resolved ports.
40 Each port globs are separated by commas or spaces.
41 .TP
42 \fBok del\fR \fIglob1\fR [\fIglob2\fR ...]
43 deregister manually resolved ports.
44 Each port globs are separated by commas or spaces.
45 .TP
46 \fBtaboo add\fR \fIglob1\fR [\fIglob2\fR ...]
47 Register taboo ports.
48 Each port globs are separated by commas or spaces.
49 .TP
50 \fBtaboo del\fR \fIglob1\fR [\fIglob2\fR ...]
51 Deregister taboo ports.
52 Each port globs are separated by commas or spaces.
53 .TP
54 \fBsave\fR [\fIdir\fR]
55 Save the current temporal database as a .tar.gz archive.
56 The file name is created automatically by containing the current date time.
57 By default save directory is the current directory.
58 .TP
59 \fBload\fR \fIpath\fR
60 Load a temporal database archive.
61 Note that the currently temporal database is removed.
62 .TP
63 \fBshow\fR [\fIarg\fR]
64 Show the list of ports to be reinstalled.
65 The following \fIargs\fR are available.
66 .IP
67 \fBtodo\fR : ports to be reinstalled (default)
68
69 \fBdone\fR : already reinstalled ports
70
71 \fBresolved\fR : manually reinstalled ports
72
73 \fBfailure\fR : failed ports
74
75 \fBtaboo\fR : taboo ports
76
77 \fBdeleted\fR : obsolete ports to be or have been deleted
78
79 \fBrequirements\fR \fIglob1\fR [\fIglob2\fR ...] : ports required by matching ports
80
81 \fBdependents\fR \fIglob1\fR [\fIglob2\fR ...] : ports depending on matching ports
82 .SH OPTIONS
83 The following options are available.
84 They must be given separately with each other.
85 .TP
86 \fB\-h\fR
87 Show short help.
88 .TP
89 \fB\-H\fR
90 Show this long help.
91 .TP
92 \fB\-V\fR
93 Show the current version.
94 .TP
95 \fB\-t\fR \fIglob1\fR[\fB,\fIglob2\fR[\fB,\fR...]]
96 Reinstall only target ports and their dependents.
97 Target ports which are not installed yet are newly installed.
98 Target ports which are obsolete are deinstalled.
99 This option can be given multiply.
100 This option is recognized in the first \fBdo\fR or \fBredo\fR runs, and transferred to the restarted runs.
101 Dependency relations are inspected for all installed packages as well.
102 Combination with options \fB\-T\f','\fB\-r\fR and \fB\-R\fR is available..
103 .TP
104 \fB\-r\fR \fIglob\fR
105 Reinstall only target ports and their dependents.
106 This option can be given multiply.
107 The difference from \fB\-t\fR is that only one port glob can be specified.
108 Thus a package name with commas is available.
109 Combination with options \fB\-t\fR, \fB\-T\fR and \fB\-R\fR is available.
110 .TP
111 \fB\-T\fR \fIglob1\fR[\fB,\fIglob2\fR[\fB,\fR...]]
112 Reinstall only target ports and their requirements.
113 Target ports which are not installed yet are newly installed.
114 Target ports which are obsolete are deinstalled.
115 This option can be given multiply.
116 This option is recognized in the first \fBdo\fR or \fBredo\fR runs, and transferred to the restarted runs.
117 Dependency relations are inspected for all installed packages as well.
118 Combination with options \fB\-t\fR, \fB\-r\fR and \fB\-R\fR is available.
119 .TP
120 \fB\-R\fR \fIglob\fR
121 Reinstall only target ports and their requirements.
122 This option can be given multiply.
123 The difference from \fB\-T\fR is that only one port glob can be specified.
124 Thus a package name with commas is available.
125 Combination with options \fB\-t\fR, \fB\-r\fR and \fB\-T\fR is available.
126 .TP
127 \fB\-x\fR \fIglob1\fR[\fB,\fIglob2\fR[\fB,\fR...]]
128 Set the port glob(s) to be taboo.
129 This option registers a port to be ignored as taboo.
130 This option can be given multiply.
131 Mainly for ports that show terrible behaviors resulting in system crash.
132 This option is recognized in the first \fBdo\fR or \fBredo\fR runs, and transferred to the restarted runs.
133 Alternatively you can do the same thing by
134 .B portsreinstall taboo
135 .I globs
136 .
137 If you want to register permanently, set to the configuration file.
138 Combination with options \fB\-X\fR is available.
139 .TP
140 \fB\-X\fR \fIglob\fR
141 This option can be given multiply.
142 The difference from \fB\-x\fR is that only one port glob can be specified.
143 Thus a package name with commas is available.
144 Combination with options \fB\-x\fR is available.
145 .TP
146 \fB\-p\fR
147 Import settings from pkgtools.conf(5) as the primary (Default; ignored if ports\-mgmt/portupgrade* is not installed).
148 For duplicated configurations, values in pkgtools.conf(5) are applied first and then those in portsreinstall.conf are.
149 This option is ignored when you restart a terminated process.
150 .TP
151 \fB\-P\fR
152 Import settings from pkgtools.conf(5) as the secondary (Ignored if ports\-mgmt/portupgrade* is not installed).
153 For duplicated configurations, values in portsreinstall.conf are applied first and then those in pkgtools.conf(5) are.
154 This option is ignored when you restart a terminated process.
155 .TP
156 \fB\-Q\fR
157 Ignore pkgtools.conf(5) even if it exists.
158 This option is ignored when you restart a terminated process.
159 .TP
160 \fB\-s\fR
161 Build of vulnerable ports are avoided by triggering errors.
162 Note that already installed vulnerable packages are untouched.
163 If you desire to uninstall them, do it manually.
164 This specification will be reasonable for the practical situations.
165 This option is fixed at the first \fBdo\fR run, and transferred to the following runs.
166 If you want to continue the reinstallation process by resetting this option, execute by \fBredo\fR command with \fB\-N\fR option.
167 .TP
168 \fB\-q\fR
169 Ports whose all requirements and themselves are not new are skipped.
170 This option is safe and useful when the all of the major version of the system, configuration options of each ports, pkgtools.conf(5), portsreinstall.conf are unchanged.
171 This option is fixed at the first \fBdo\fR run, and transferred to the following runs.
172 If you want to continue the reinstallation process by resetting this option, execute by \fBredo\fR command with \fB\-N\fR option.
173 .TP
174 \fB\-d\fR
175 Do not clean up obsolete or unused distfiles.
176 This option is fixed at the first \fBdo\fR run, and transferred to the following runs.
177 If you want to continue the reinstallation process by resetting this option, execute by \fBredo\fR command with \fB\-N\fR option.
178 .TP
179 \fB\-N\fR
180 Renew option settings.
181 This option is effective only with \fBredo\fR command.
182 Option settings for \fB\-s\fR, \fB\-q\fR and \fB\-d\fR are reset according to the simultaneously given ones.
183 .TP
184 \fB\-k\fR
185 Keep portsreinstall itself untouched.
186 This option supresses update, deinstallation and reinstallation of the currently installed portsreinstall.
187 .TP
188 \fB\-c\fR
189 Suppress cleaning the temporal database even if its obsolete.
190 By default, the temporal database is automatically cleaned up if it is older than the ports tree or portsreinstall itself is to be updated.
191 This option replace this behavior with termination with warnings.
192 This option should not be used unless the user has special intentions.
193 .SH DETAILS
194 This utility realizes smart reinstallation of a large number of ports by allowing you to run when when the machine is free and terminate when busy.
195 Concretely, you can stop the process by CTRL+C anytime and restart quickly.
196 This functionality allows you, for example, to start this utility before lunch, terminate after lunch, restart before dinner, terminate after dinner, restart before going to bed, terminate after breakfast, restart before lunch, ..., and finally complete.
197 .PP
198 The policy of this utility is to complete the job by the most automatic and finally successful way even if it will take a long time in total.
199 All missing build\- and run\-time dependencies are newly installed if any.
200 All reinstallation processes are tried to be proceeded forcibly by ignoring errors or vulnerabilities as possible.
201 This utility pursues the consistency of the dependency relations in the latest version of the ports tree by on-the-fly entire reconstruction of the relations while portupgrade(1) and portmaster(8) believe the existing relations of the installed packages to reduce the total work time as much as possible.
202 .PP
203 In the simplest case, all a user has to do toward complete reinstallation is execute this utility without any arguments (corresponding to \fBdo\fR command).
204 If the run completes with notations on failures for any ports, after resolving the errors manually, register the resolved ports by executing this utility with \fBok add\fR command and then execute with \fBredo\fR command.
205 This task is continued until successful completion.
206 .PP
207 The algorithms of this utility are customized for massive reinstallation to be invoked after major upgrade of the system where rebuild of all third\-party applications are encouraged before cleaning up obsolete system libraries.
208 Nevertheless, the all functionalities of this utility is applicable to any situations where complete reinstallation of the all or parts of ports is preferred, e.g., when you have been lazy in upgrade of ports for too long time.
209 For the usual purposes of upgrading packages installed by ports, you are recommended to use ports\-mgmt/portupgrade or ports\-mgmt/portmaster instead.
210 .PP
211 If this utility has been installed by ports/packages and the corresponding port is renewed, update of this utility is carried out first and then the following processes are continued by the new version after cleaning up the temporal database.
212 .PP
213 The scheme of this utility is divided into the temporal database construction phase and the reinstallation phase.
214 Execution by
215 .B portsreinstall prepare
216 procedes to the end the first phase, and that without any argument procedes to the end of the second phase.
217 Each of these two major phases is divided into minor phases.
218 When a previously terminated process is restarted, completed minor phases are skipped.
219 .PP
220 The massive minor phases belong to "collecting dependencies of installed/missing packages", "ordering dependencies" for the first major phase and "reinstallation" "package database update" for the second.
221 Most of them are divided into more minor phases except for "package database update".
222 .PP
223 When option(s) \fB\-t\fR,  \fB\-r\fR, \fB\-T\fR or \fB\-R\fR is/are given in the first run of \fBdo\fR or \fBredo\fR commands, only the targets and their required or dependent ports are reinstalled.
224 This specification is effective until the completion of the run.
225 Run by \fBredo\fR command without the options inherits the previous settings.
226 Meanwhile, run by \fBredo\fR command with the options resets the previous settings, and inspects the dependencies again if new ports are to be installed.
227 .PP
228 The user is encouraged to run this utility under script(1) so as to record all logs in order to resolve problems that you may (rather "will", practically) encounter.
229 The solutions depend on the individual cases.
230 If the problem will be resolved by reconfiguration of the port option, execute
231 .B make config
232 at the corresponding port directory, and then restart this utility.
233 If the problem will be resolved by manual fetch of tarballs, do it and then restart this utility.
234 If the problem will be resolved by deleting a concerned package, do it by
235 .B pkg_delete \-f
236 .I package
237 (conventional package),
238 .B pkg delete \-f
239 .I package
240 (new generation package, pkgng) or execute
241 .B make deinstall
242 at the corresponding port directory, execute
243 .B portsreinstall ok add
244 .I glob
245 where \fIglob\fR is the ports glob of the concerned port, and then restart this utility.
246 If the problem will be resolved by manual reinstallation using pkg_add(1) (conventional package), pkg add (pkg\-add(8), pkgng) or so on, do it and execute
247 .B portsreinstall ok add
248 .I glob
249 where \fIglob\fR is the ports glob of the concerned port, and then restart this utility by
250 .B portsreinstall redo
251 command.
252 .PP
253 The current package system is automatically detected; the new generation package (pkgng) is used if it is installed and 'WITH_PKGNG=yes' is set and "WITHOUT_PKGNG=yes" is not set /etc/make.conf, and otherwise the conventional package is used.
254 .PP
255 If you are familiar to the mechanism of Ports Collections system, in order to minimize package conflictions, it may be a good idea to delete packages which you don't think necessary before starting to use this utility.
256 Don't be afraid to delete necessary dependencies because all required ports are automatically installed.
257 .PP
258 If you run into confusion, it may be a good idea to clean up the temporal database by executing
259 .B portsreinstall clean
260 and start again from the first.
261 .SH "ENVIRONMENT VARIABLES"
262 The following environment variables can be used to change the behavior of \fBportsreinstall\fR.
263 Usually they should be kept to be the system default or empty.
264 .TP
265 .B PORTSDIR
266 Location of the ports tree.
267 See also ports(7).
268 .TP
269 .B PREFIX
270 Where to install things in general (/usr/local by default).
271 .SH FILES/DIRECTORIES
272 The following files and directories are referred to.
273 .TP
274 ${PREFIX}/etc/portsreinstall.conf
275 Configuration file.
276 .TP
277 /var/tmp/portsreinstall.db
278 Temporal database directory.
279 The whole contents can be saved by \fBportsreinstall save\fR command.
280 .TP
281 ${PREFIX}/etc/pkgtools.conf
282 Configuration file of portupgrade(1).
283 .SH HISTORY
284 \fBportsreinstall\fR has been developed as below.
285 .TP
286 2.0.1 (09 December 2012)
287 [NEW] New generation package (pkgng) is supported.
288
289 [IMPROVED] A countermeasure for a build failure in a restarted build from a terminated build is implemented.
290
291 [BUG FIX] Restoration of backup packages after failed installation was not working correctly.
292
293 [BUG FIX] The transferring mechanism of option values to restarted run was broken.
294
295 [BUG FIX] Error end in case that no packages are installed is fixed.
296 .TP
297 2.0.0 (12 August 2012)
298 [NEW] Options \fB\-X\fR, \fB\-r\fR and \fB\-R\fR are added so as to compensate a fact that \fB\-x\fR, \fB\-t\fR and \fB\-T\fR cannot specify package names with commas.
299
300 [NEW] Commands of \fBshow requirements\fR and  \fBshow dependents\fR are added.
301
302 [NEW] A functionality of self-update is added so as to be carried out first if the port of portsreinstall is new.
303
304 [NEW] Option \fB\-k\fR is added for cases that update of portsreinstall should be avoided.
305
306 [IMPROVED] Messages are extended to output configuration parameter values.
307
308 [CHANGED] Functionalities of options \fB\-t\fR and \fB\-T\fR are changed so as to prevent deinstallation of irrelevant packages and detect obsolete installed dependencies.
309
310 [CHANGED] Use of commas as delimiters in \fBok\fR and \fBtaboo\fR commands is abolished.
311
312 [CHANGED] The specification of \fBshow\fR command is changed to exclude irrelevant packages/ports and output messages about the matching targets when options \fB\-r\fR, \fB\-R\fR, \fB\-t\fR and \fB\-T\fR are enabled.
313
314 [CHANGED] The default behavior in case that the temporal database is older than the ports tree is changed from warnings to automatic reconstruction; the old behavior is recovered by option \fB\-c\fR.
315
316 [BUG FIX] Termination message is corrected (portsreinstall ok => portsreinstall ok add).
317
318 [BUG FIX] Values of BEFOREBUILD, BEFOREDEINSTALL and AFTERINSTALL were not correctly imported from pkgtools.conf(5).
319
320 [BUG FIX] The file name given by save command was with a wrong time stamp.
321 .TP
322 1.1.0 (28 April 2012)
323 [NEW] Command of show deleted is newly added.
324
325 [CHANGED] Origin names in messages and results of show command are changed to be accompanied with package names.
326
327 [CHANGED] The default option for treating pkgtools.conf(5) is changed to \fB\-p\fR and \fB\-Q\fR is newly added.
328
329 [IMPROVED] Custom make environment variables and arguments are changed to be reflected in the phase of inspection of dependencies.
330
331 [IMPROVED] Command of show todo is now available before starting reinstallation.
332
333 [BUG FIX] Independence from ports\-mgmt/portupgrade* was incomplete.
334
335 [BUG FIX] Error messages for show command when the temporal database does not exist are improved.
336
337 [BUG FIX] Ports with names contaning '+' were not correctly treated.
338
339 [BUG FIX] Save and load commands were broken.
340
341 [BUG FIX] Deletion of MOVED-back packages is now prevented.
342 .TP
343 1.0.0 (14 March 2012)
344 [MISC] Explanations for \fB\-p\fR and \fB\-P\fR are revised because the previous ones were somewhat confusing.
345
346 [MISC] The output device of helps is changed from stderr to stdout.
347
348 [MISC] Messages for termination during deinstallation and reinstallation are improved by showing the target port/package names at that time.
349
350 [BUG FIX] Glob patterns for package/port names were not fully supported.
351
352 [BUG FIX] Values of MARG_* and MENV_* (MAKE_ARGS and MAKE_ENV in pkgtools.conf(5)) were not working.
353
354 [BUG FIX] Globs of obsolete packages were not detected, so especially HOLD_PKGS and IGNORE_MOVED in pkgtools.conf(5) and portsreinstall.conf had lost their functionalities.
355
356 [BUG FIX] Values of IGNORE_MOVED partially overwrote HOLD_PKGS in pkgtools.conf(5).
357
358 [BUG FIX] Typographic and grammatical errors in the main script and documents are revised.
359 .TP
360 0.13.1 (29 October 2011)
361 [BUG FIX] Inspection of missing ports was incomplete.
362
363 [BUG FIX] Origin names with '+' were not correctly treated.
364
365 [IMPROVED] Inspection of dependencies of installed packages gets faster.
366 .TP
367 0.13.0 (28 August 2011)
368 [IMPROVED] Phase of "Order the ports considering dependencies" is accelerated.
369 .TP
370 0.12.0 (22 June 2011)
371 [NEW] \fB\-q\fR, \fB\-d\fR and \fB\-N\fR options are added.
372
373 [CHANGED] Settings for \fB\-x\fR and \fB\-s\fR options becomes to be transferred to restarted runs.
374 .TP
375 0.11.0 (17 May 2011)
376 [NEW] Causes of errors are added to the report of failed ports.
377
378 [CHANGED] Functionality of \fB\-t\fR option is changed and partly splitted into \fB\-T\fR.
379
380 [IMPROVED] Refetch after fetch failure becomes smarter so as not to clean up distfiles.
381
382 [MISC] Terminology 'abort' is corrected to be 'terminate'.
383 .TP
384 0.10.0 (11 Mar 2011)
385 [NEW] Version check for temporal database and portupgrade is added (as a template).
386
387 [BUG FIX] Old packages for ports whose package names was renamed were not deleted.
388
389 [BUG FIX] Duplicated cleans were executed after successful installation.
390 .TP
391 0.9.8 (02 Mar 2011)
392 [MISC] Installation methods of non-executable files in Makefile are improved again.
393 .TP
394 0.9.7 (02 Mar 2011)
395 [MISC] Installation methods of non-executable files in Makefile are improved.
396 .TP
397 0.9.6 (01 Mar 2011)
398 [BUG FIX] Fix at version 0.9.5 was incomplete.
399
400 [BUG FIX] The update date of 0.9.5 was wrong in the manpage.
401 .TP
402 0.9.5 (28 Feb 2011)
403 [BUG FIX] "install" target in Makefile installed non-executable files as executables.
404 .TP
405 0.9.4 (17 Jan 2011)
406 [BUG FIX] "all" target in Makefile was missing.
407 .TP
408 0.9.3 (16 Jan 2011)
409 [MISC] Makefile is modified to compress manpage in the build process.
410 .TP
411 0.9.2 (10 Jan 2011)
412 [MISC] The 2-Clause BSD License is applied from this version.
413
414 [NEW] Manpage is created.
415
416 [NEW] Makefile for installation/uninstallation is added.
417
418 [BUG FIX] Recovery from distfile checksum error was broken.
419 .TP
420 0.9.1 (27 Dec 2010)     
421 [BUG FIX] Wrong warning for \fB-p\fR/\fB-P\fR options in the first run.
422
423 [BUG FIX] Broken support of recursive chase of MOVED ports.
424
425 [BUG FIX] Option configuration menus were not accessable.
426
427 [BUG FIX] The mechanism of loading the configuration file was broken.
428
429 [BUG FIX] Optionally added taboo ports were not always effective in restart.
430 .TP
431 0.9.0 (21 Nov 2010)
432 First version.
433 .SH "SEE ALSO"
434 pkg_glob(1),
435 portupgrade(1),
436 pkgtools.conf(5),
437 ports(7),
438 portmaster(8)
439 .SH COPYRIGHT
440 This software is distributed under the 2-Clause BSD License.
441 .PP
442 (C)\ 2010\-2011\ Mamoru\ Sakaue,\ MwGhennndo,\ All\ Rights\ Reserved.
443 .PP
444 Email:\ sakaue.mamoru@samurai.mwghennn.net
445 .PP
446 Homepage:\ http://www.mwghennndo.com/softwares/portsreinstall/