xref: /openbsd-src/usr.sbin/sysmerge/sysmerge.8 (revision 0b7734b3d77bb9b21afec6f4621cae6c805dbd45)
1.\"	$OpenBSD: sysmerge.8,v 1.77 2016/05/14 14:44:35 ajacoutot Exp $
2.\"
3.\" Copyright (c) 2008 Antoine Jacoutot <ajacoutot@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: May 14 2016 $
18.Dt SYSMERGE 8
19.Os
20.Sh NAME
21.Nm sysmerge
22.Nd update system configuration files
23.Sh SYNOPSIS
24.Nm
25.Bk -words
26.Op Fl bdp
27.Ek
28.Sh DESCRIPTION
29.Nm
30is a utility designed to help the administrator update configuration files
31after upgrading to a new release or snapshot.
32.Pp
33.Nm
34works by comparing a reference root directory against currently installed files.
35.Pp
36.Nm
37will work through the fileset,
38offering the chance to merge any differences using
39.Xr sdiff 1 .
40Merged files may be edited using the default editor or be left to deal
41with at a later date.
42Should any problems occur,
43such as a failure to upgrade a file,
44the user will be notified and will have to deal with the issue by hand.
45.Pp
46By default (if
47.Fl d
48is not used)
49.Nm
50only compares files whose reference sources have changed since the last run
51and attempts to automatically upgrade them to the newest version,
52provided that they have no local changes.
53It automatically installs missing files and binaries,
54and updates files differing only by CVS Id.
55Files whose reference sources have matching CVS Id are skipped from comparison.
56.Pa /etc/fbtab
57and
58.Pa /etc/ttys
59are created using helper scripts and are
60.Sy always
61compared.
62Users and groups that are missing from the current installation but
63present in the new
64.Xr master.passwd 5
65and
66.Xr group 5
67files will
68.Sy always
69be automatically (re)created.
70.Pp
71.Nm
72will finish by running
73.Xr mtree 8
74to make sure the directory structure has correct permissions.
75.Pp
76The options are as follows:
77.Bl -tag -width Ds
78.It Fl b
79Batch mode.
80.Nm
81runs non-interactively,
82saving differing files for later manual processing.
83.It Fl d
84Diff mode.
85.Nm
86does not take any automatic action, allowing for a full diff comparison.
87.It Fl p
88Package mode.
89.Nm
90only compares the default configuration files of installed
91.Xr packages 7
92against their target on the system (@sample).
93.El
94.Pp
95Files can be excluded from comparison by listing them in
96.Pa /etc/sysmerge.ignore .
97Checksum files stored under
98.Pa /var/sysmerge
99as well as the following files will always be skipped from direct comparison:
100.Pa /etc/group ,
101.Pa /etc/localtime ,
102.Pa /etc/master.passwd ,
103.Pa /etc/motd ,
104.Pa /etc/passwd ,
105.Pa /etc/pwd.db ,
106.Pa /etc/spwd.db ,
107.Pa /var/db/locate.database ,
108.Pa /var/mail/root .
109.Sh ENVIRONMENT
110.Bl -tag -width "EDITORXXVISUAL"
111.It Ev EDITOR , VISUAL
112Specifies an editor to use.
113If both
114.Ev EDITOR
115and
116.Ev VISUAL
117are set,
118.Ev VISUAL
119takes precedence.
120If neither
121.Ev EDITOR
122nor
123.Ev VISUAL
124are set,
125the default is
126.Xr vi 1 .
127.It Ev PAGER
128Specifies the pagination program to use.
129.El
130.Sh FILES
131.Bl -tag -width "/var/sysmerge/xetc.tgz" -compact
132.It Pa /etc/sysmerge.ignore
133Files and directories to ignore from comparison.
134.It Pa /var/sysmerge/backups
135Directory containing backup of
136.Nm
137last run modified files.
138Rotated automatically in order of increasing age from
139.Pa backups.0
140to
141.Pa backups.3 .
142.It Pa /var/sysmerge/etc.tgz
143Base system set containing the reference files
144corresponding to the currently installed release.
145.It Pa /var/sysmerge/xetc.tgz
146.Xr X 7
147set containing the reference files
148corresponding to the currently installed release.
149.El
150.Sh SEE ALSO
151.Xr more 1 ,
152.Xr sdiff 1
153.Pp
154.Lk http://www.openbsd.org/faq/current.html
155.Lk http://www.openbsd.org/faq/upgradeXX.html
156.Sh HISTORY
157The
158.Nm
159script first appeared in
160.Ox 4.4 .
161.Sh AUTHORS
162.An -nosplit
163.Nm
164was written by
165.An Antoine Jacoutot Aq Mt ajacoutot@openbsd.org .
166It was originally started as a friendly fork from
167mergemaster by
168.An Douglas Barton Aq Mt DougB@FreeBSD.org .
169