summaryrefslogtreecommitdiff
path: root/usr.sbin/sysmerge/sysmerge.8
blob: 872e9c920b5ff529f9dcbfeed01bb9cda58887e1 (plain)
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
.\"	$OpenBSD: sysmerge.8,v 1.77 2016/05/14 14:44:35 ajacoutot Exp $
.\"
.\" Copyright (c) 2008 Antoine Jacoutot <ajacoutot@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: May 14 2016 $
.Dt SYSMERGE 8
.Os
.Sh NAME
.Nm sysmerge
.Nd update system configuration files
.Sh SYNOPSIS
.Nm
.Bk -words
.Op Fl bdp
.Ek
.Sh DESCRIPTION
.Nm
is a utility designed to help the administrator update configuration files
after upgrading to a new release or snapshot.
.Pp
.Nm
works by comparing a reference root directory against currently installed files.
.Pp
.Nm
will work through the fileset,
offering the chance to merge any differences using
.Xr sdiff 1 .
Merged files may be edited using the default editor or be left to deal
with at a later date.
Should any problems occur,
such as a failure to upgrade a file,
the user will be notified and will have to deal with the issue by hand.
.Pp
By default (if
.Fl d
is not used)
.Nm
only compares files whose reference sources have changed since the last run
and attempts to automatically upgrade them to the newest version,
provided that they have no local changes.
It automatically installs missing files and binaries,
and updates files differing only by CVS Id.
Files whose reference sources have matching CVS Id are skipped from comparison.
.Pa /etc/fbtab
and
.Pa /etc/ttys
are created using helper scripts and are
.Sy always
compared.
Users and groups that are missing from the current installation but
present in the new
.Xr master.passwd 5
and
.Xr group 5
files will
.Sy always
be automatically (re)created.
.Pp
.Nm
will finish by running
.Xr mtree 8
to make sure the directory structure has correct permissions.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl b
Batch mode.
.Nm
runs non-interactively,
saving differing files for later manual processing.
.It Fl d
Diff mode.
.Nm
does not take any automatic action, allowing for a full diff comparison.
.It Fl p
Package mode.
.Nm
only compares the default configuration files of installed
.Xr packages 7
against their target on the system (@sample).
.El
.Pp
Files can be excluded from comparison by listing them in
.Pa /etc/sysmerge.ignore .
Checksum files stored under
.Pa /var/sysmerge
as well as the following files will always be skipped from direct comparison:
.Pa /etc/group ,
.Pa /etc/localtime ,
.Pa /etc/master.passwd ,
.Pa /etc/motd ,
.Pa /etc/passwd ,
.Pa /etc/pwd.db ,
.Pa /etc/spwd.db ,
.Pa /var/db/locate.database ,
.Pa /var/mail/root .
.Sh ENVIRONMENT
.Bl -tag -width "EDITORXXVISUAL"
.It Ev EDITOR , VISUAL
Specifies an editor to use.
If both
.Ev EDITOR
and
.Ev VISUAL
are set,
.Ev VISUAL
takes precedence.
If neither
.Ev EDITOR
nor
.Ev VISUAL
are set,
the default is
.Xr vi 1 .
.It Ev PAGER
Specifies the pagination program to use.
.El
.Sh FILES
.Bl -tag -width "/var/sysmerge/xetc.tgz" -compact
.It Pa /etc/sysmerge.ignore
Files and directories to ignore from comparison.
.It Pa /var/sysmerge/backups
Directory containing backup of
.Nm
last run modified files.
Rotated automatically in order of increasing age from
.Pa backups.0
to
.Pa backups.3 .
.It Pa /var/sysmerge/etc.tgz
Base system set containing the reference files
corresponding to the currently installed release.
.It Pa /var/sysmerge/xetc.tgz
.Xr X 7
set containing the reference files
corresponding to the currently installed release.
.El
.Sh SEE ALSO
.Xr more 1 ,
.Xr sdiff 1
.Pp
.Lk http://www.openbsd.org/faq/current.html
.Lk http://www.openbsd.org/faq/upgradeXX.html
.Sh HISTORY
The
.Nm
script first appeared in
.Ox 4.4 .
.Sh AUTHORS
.An -nosplit
.Nm
was written by
.An Antoine Jacoutot Aq Mt ajacoutot@openbsd.org .
It was originally started as a friendly fork from
mergemaster by
.An Douglas Barton Aq Mt DougB@FreeBSD.org .