OpenBSD CVS

CVS log for src/usr.sbin/sysmerge/sysmerge.sh


[BACK] Up to [local] / src / usr.sbin / sysmerge

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.236 / (download) - annotate - [select for diffs], Sun Jul 13 08:15:46 2025 UTC (2 months, 4 weeks ago) by bentley
Branch: MAIN
CVS Tags: OPENBSD_7_8_BASE, OPENBSD_7_8, HEAD
Changes since 1.235: +4 -1 lines
Diff to previous 1.235 (colored)

Change ownership of fontconfig cache to _fc-cache user.

ok kn@ deraadt@

Revision 1.235 / (download) - annotate - [select for diffs], Sat Sep 28 17:30:07 2019 UTC (6 years ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_7_7_BASE, OPENBSD_7_7, OPENBSD_7_6_BASE, OPENBSD_7_6, OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.234: +2 -1 lines
Diff to previous 1.234 (colored)

Add where missing and harmonize PATH to be _PATH_DEFPATH (without local nor
X11R6).
Suggested by tb@

ok deraadt@ tb@ millert@

Revision 1.234 / (download) - annotate - [select for diffs], Sun Sep 8 13:30:46 2019 UTC (6 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.233: +2 -2 lines
Diff to previous 1.233 (colored)

Have sm_install() use install -F (fsync).

Revision 1.233 / (download) - annotate - [select for diffs], Sat Oct 28 07:22:56 2017 UTC (7 years, 11 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.232: +19 -15 lines
Diff to previous 1.232 (colored)

Prefer useradd(1) over chpass(1) so that new users are added before the YP '+'
token.
req. by Miod

Revision 1.232 / (download) - annotate - [select for diffs], Tue Aug 22 13:31:40 2017 UTC (8 years, 1 month ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.231: +1 -4 lines
Diff to previous 1.231 (colored)

Remove legacy code.

Revision 1.231 / (download) - annotate - [select for diffs], Thu Aug 17 07:32:09 2017 UTC (8 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.230: +5 -5 lines
Diff to previous 1.230 (colored)

We're a shell script, so honor TMPDIR.
While here, use consistent variable substitution.

Revision 1.230 / (download) - annotate - [select for diffs], Mon Mar 6 08:16:24 2017 UTC (8 years, 7 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.229: +2 -2 lines
Diff to previous 1.229 (colored)

Just exit 1 instead of printing usage on error.

prodded by deraadt@

Revision 1.229 / (download) - annotate - [select for diffs], Wed Jan 11 08:50:11 2017 UTC (8 years, 9 months ago) by ajacoutot
Branch: MAIN
Changes since 1.228: +2 -2 lines
Diff to previous 1.228 (colored)

Instead of checking if /etc/X11 is around to know whether the xbase set
is installed, check if /var/sysmerge/xetc.tgz exists.

Revision 1.228 / (download) - annotate - [select for diffs], Thu Sep 22 13:08:20 2016 UTC (9 years ago) by ajacoutot
Branch: MAIN
Changes since 1.227: +10 -5 lines
Diff to previous 1.227 (colored)

Make sure we don't have conflicting UIDs/GIDs when adding user/group.

reported by florian@

Revision 1.227 / (download) - annotate - [select for diffs], Sat Jul 30 06:31:17 2016 UTC (9 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.226: +1 -6 lines
Diff to previous 1.226 (colored)

Remove compat code.

Revision 1.226 / (download) - annotate - [select for diffs], Sat May 14 16:14:40 2016 UTC (9 years, 4 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.225: +3 -1 lines
Diff to previous 1.225 (colored)

Be gone /var/sysmerge/examplessum.

Revision 1.225 / (download) - annotate - [select for diffs], Sat May 14 14:44:35 2016 UTC (9 years, 4 months ago) by ajacoutot
Branch: MAIN
Changes since 1.224: +4 -28 lines
Diff to previous 1.224 (colored)

Remove handling of /etc/examples/ files by sysmerge(8). Getting regular messages
about pkg.conf isn't really that helpful and if a big syntax change comes along
well we have current.html.

it was disabled during p2k16 and no one complained so far
discussed with and ok deraadt@

Revision 1.224 / (download) - annotate - [select for diffs], Fri Apr 29 12:32:45 2016 UTC (9 years, 5 months ago) by sthen
Branch: MAIN
Changes since 1.223: +29 -1 lines
Diff to previous 1.223 (colored)

In sysmerge interactive mode, check syntax of several important files after
merging (currently sshd_config, login.conf, pf.conf) to give some protection
against bad merges.  feedback/ok ajacoutot@

Revision 1.223 / (download) - annotate - [select for diffs], Thu Apr 28 16:42:29 2016 UTC (9 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.222: +4 -3 lines
Diff to previous 1.222 (colored)

Comment sm_check_an_eg().

Revision 1.222 / (download) - annotate - [select for diffs], Tue Apr 26 11:19:35 2016 UTC (9 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.221: +3 -3 lines
Diff to previous 1.221 (colored)

Tweak output a bit; to be improved probably (sthen@ and I can't think of a
better wording for now).
Also be consistent in batch and interactive mode: make sure we can just re-run
sysmerge if we leave a file for later; this prevents having to save the tmpdir
to find which files needs to be handled (aka we are self-contained).

Revision 1.221 / (download) - annotate - [select for diffs], Tue Feb 2 07:02:32 2016 UTC (9 years, 8 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.220: +2 -2 lines
Diff to previous 1.220 (colored)

Uppecase.

Revision 1.220 / (download) - annotate - [select for diffs], Thu Jan 14 19:58:32 2016 UTC (9 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.219: +1 -2 lines
Diff to previous 1.219 (colored)

No more /etc/mail/aliases.db.

Revision 1.219 / (download) - annotate - [select for diffs], Wed Dec 23 10:01:58 2015 UTC (9 years, 9 months ago) by ajacoutot
Branch: MAIN
Changes since 1.218: +4 -4 lines
Diff to previous 1.218 (colored)

Tidy up output.

Revision 1.218 / (download) - annotate - [select for diffs], Mon Dec 21 10:54:49 2015 UTC (9 years, 9 months ago) by ajacoutot
Branch: MAIN
Changes since 1.217: +7 -3 lines
Diff to previous 1.217 (colored)

Only run newaliases(8) if we already have an aliases db.

Revision 1.217 / (download) - annotate - [select for diffs], Sat Nov 28 02:42:22 2015 UTC (9 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.216: +2 -2 lines
Diff to previous 1.216 (colored)

chflags -l flag went away.  Noticed this myself 15 minutes
before Chris Hettrick did.

Revision 1.216 / (download) - annotate - [select for diffs], Sun Oct 18 04:45:21 2015 UTC (9 years, 11 months ago) by ajacoutot
Branch: MAIN
Changes since 1.215: +6 -3 lines
Diff to previous 1.215 (colored)

Make sure sm_rotate_bak() is only run once.

Revision 1.215 / (download) - annotate - [select for diffs], Fri Oct 16 19:55:39 2015 UTC (9 years, 11 months ago) by ajacoutot
Branch: MAIN
Changes since 1.214: +2 -2 lines
Diff to previous 1.214 (colored)

Drop usage of TMPDIR.
While here, stop refering to /tmp/sysmerge.XXXXXXXXXX, that's a script
internal we don't need to know about.

Revision 1.214 / (download) - annotate - [select for diffs], Tue Oct 13 18:52:56 2015 UTC (9 years, 11 months ago) by ajacoutot
Branch: MAIN
Changes since 1.213: +2 -2 lines
Diff to previous 1.213 (colored)

sm_error() already does the exit for us.

Revision 1.213 / (download) - annotate - [select for diffs], Mon Oct 12 18:25:16 2015 UTC (10 years ago) by ajacoutot
Branch: MAIN
Changes since 1.212: +2 -2 lines
Diff to previous 1.212 (colored)

Reverse the sm_error call in sm_trap.

pointed out by semarie@... I need some sleep :/

Revision 1.212 / (download) - annotate - [select for diffs], Mon Oct 12 18:13:59 2015 UTC (10 years ago) by ajacoutot
Branch: MAIN
Changes since 1.211: +7 -3 lines
Diff to previous 1.211 (colored)

Only remove existing sum files on trap handlers.

req. by semarie@

Revision 1.211 / (download) - annotate - [select for diffs], Fri Sep 18 18:03:47 2015 UTC (10 years ago) by ajacoutot
Branch: MAIN
Changes since 1.210: +2 -1 lines
Diff to previous 1.210 (colored)

In case of a hard error, remove all checksums except for examplessum which
is special. Otherwise, we may miss comparing files at next run; we may miss
some automation on the next run but it's safer this way.

Revision 1.210 / (download) - annotate - [select for diffs], Fri Sep 18 17:03:44 2015 UTC (10 years ago) by ajacoutot
Branch: MAIN
Changes since 1.209: +8 -9 lines
Diff to previous 1.209 (colored)

Simplify: we don't need a work directory anymore, temproot is enough.

Revision 1.209 / (download) - annotate - [select for diffs], Fri Sep 18 16:00:19 2015 UTC (10 years ago) by ajacoutot
Branch: MAIN
Changes since 1.208: +18 -12 lines
Diff to previous 1.208 (colored)

Tweak warning/error output a bit.
Check for examples changes at the end.

Revision 1.208 / (download) - annotate - [select for diffs], Fri Sep 18 10:55:26 2015 UTC (10 years ago) by ajacoutot
Branch: MAIN
Changes since 1.207: +4 -7 lines
Diff to previous 1.207 (colored)

More dead code.

Revision 1.207 / (download) - annotate - [select for diffs], Wed Sep 9 09:44:31 2015 UTC (10 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.206: +4 -8 lines
Diff to previous 1.206 (colored)

Remove more dead code.

Revision 1.206 / (download) - annotate - [select for diffs], Wed Sep 9 08:10:33 2015 UTC (10 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.205: +5 -8 lines
Diff to previous 1.205 (colored)

Remove unused code.

Revision 1.205 / (download) - annotate - [select for diffs], Wed Sep 9 08:04:22 2015 UTC (10 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.204: +2 -2 lines
Diff to previous 1.204 (colored)

Move and tweak a comment.

Revision 1.204 / (download) - annotate - [select for diffs], Mon Sep 7 10:02:04 2015 UTC (10 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.203: +3 -9 lines
Diff to previous 1.203 (colored)

Simplify handling of sum files.

Revision 1.203 / (download) - annotate - [select for diffs], Mon Sep 7 09:34:56 2015 UTC (10 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.202: +1 -19 lines
Diff to previous 1.202 (colored)

No need to restore backup of sum files; once the new ones are installed,
it means we already processed all relevant files.

Revision 1.202 / (download) - annotate - [select for diffs], Mon Aug 24 12:16:36 2015 UTC (10 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.201: +7 -6 lines
Diff to previous 1.201 (colored)

cp -> mv
Put /usr/share/sysmerge under XXX.

Revision 1.201 / (download) - annotate - [select for diffs], Mon Aug 24 11:03:41 2015 UTC (10 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.200: +38 -28 lines
Diff to previous 1.200 (colored)

Make backup directory of replaced files persistent: /var/sysmerge/backups.
3 rotations so that we have history of modified files.
In batch mode, when a file cannot be handled automatically, remove it from
the checksum file so that the next interactive sysmerge(8) run will ask
to merge the changes.

ok rpe@

Revision 1.200 / (download) - annotate - [select for diffs], Mon Aug 24 10:42:08 2015 UTC (10 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.199: +38 -27 lines
Diff to previous 1.199 (colored)

/usr/share/sysmerge -> /var/sysmerge

requested by several
discussed with deraadt@

Revision 1.199 / (download) - annotate - [select for diffs], Wed Aug 19 09:28:48 2015 UTC (10 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.198: +1 -3 lines
Diff to previous 1.198 (colored)

Remove XXX.

Revision 1.198 / (download) - annotate - [select for diffs], Thu Aug 13 07:06:41 2015 UTC (10 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.197: +9 -11 lines
Diff to previous 1.197 (colored)

Sync stripcom() with /etc/rc.

Revision 1.197 / (download) - annotate - [select for diffs], Sat Jul 18 20:27:37 2015 UTC (10 years, 2 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.196: +10 -10 lines
Diff to previous 1.196 (colored)

Add groups before users.

Revision 1.196 / (download) - annotate - [select for diffs], Tue Jun 2 17:29:28 2015 UTC (10 years, 4 months ago) by jung
Branch: MAIN
Changes since 1.195: +2 -2 lines
Diff to previous 1.195 (colored)

fix variable name typo

ok ajacoutot@

Revision 1.195 / (download) - annotate - [select for diffs], Thu Mar 12 12:46:01 2015 UTC (10 years, 7 months ago) by ajacoutot
Branch: MAIN
Changes since 1.194: +2 -2 lines
Diff to previous 1.194 (colored)

Set TERM if unset. Fixes some remote sysmerge usage by sthen@

ok sthen@

Revision 1.194 / (download) - annotate - [select for diffs], Tue Feb 17 15:43:34 2015 UTC (10 years, 7 months ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.193: +3 -4 lines
Diff to previous 1.193 (colored)

Instead of a relatively complex "stty size | ( read ..." in sysmerge, use
"tput cols". (This from ajacoutot@).

Use it directly in the sdiff command, rather than saving it once at startup.
Handling window size changes at runtime makes sysmerge significantly easier
to use in common cases. Adds around .17s per sdiff invocation on my slowest
machine (486), imperceptible on a faster machine, so it seems a reasonable
trade-off.

ok ajacoutot@

Revision 1.193 / (download) - annotate - [select for diffs], Wed Nov 26 15:52:30 2014 UTC (10 years, 10 months ago) by ajacoutot
Branch: MAIN
Changes since 1.192: +33 -46 lines
Diff to previous 1.192 (colored)

Drop sysmerge.log ; it used to be handy for batch mode but now the
console output is clear and clean in that mode.

Since /var/tmp is now a symlink to /tmp:
- directly use /tmp
- if modifications were done; at the end of the run:
  - display our backup directory (in case we want to move it to survive a reboot)
  - display where and what files are still left for comparison

discussed with and ok sthen@

Revision 1.192 / (download) - annotate - [select for diffs], Thu Oct 9 14:33:51 2014 UTC (11 years ago) by ajacoutot
Branch: MAIN
Changes since 1.191: +4 -4 lines
Diff to previous 1.191 (colored)

Tweak, no functional change.

Revision 1.191 / (download) - annotate - [select for diffs], Thu Oct 9 14:23:58 2014 UTC (11 years ago) by ajacoutot
Branch: MAIN
Changes since 1.190: +2 -1 lines
Diff to previous 1.190 (colored)

Make sure _instdir is not null.

issue reported by jsg@

Revision 1.190 / (download) - annotate - [select for diffs], Tue Sep 16 21:56:42 2014 UTC (11 years ago) by rpe
Branch: MAIN
Changes since 1.189: +13 -13 lines
Diff to previous 1.189 (colored)

zap unnecessary quotes

OK ajacoutot@

Revision 1.189 / (download) - annotate - [select for diffs], Sat Sep 13 12:00:52 2014 UTC (11 years ago) by ajacoutot
Branch: MAIN
Changes since 1.188: +5 -2 lines
Diff to previous 1.188 (colored)

In PKG mode, cope with non-default PREFIX (e.g. /var/www/...).

Revision 1.188 / (download) - annotate - [select for diffs], Tue Sep 9 08:53:51 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.187: +3 -2 lines
Diff to previous 1.187 (colored)

'rm -f' in case we skip a release. No functional change, just cosmetic.

Revision 1.187 / (download) - annotate - [select for diffs], Tue Sep 9 07:47:04 2014 UTC (11 years, 1 month ago) by rpe
Branch: MAIN
Changes since 1.186: +5 -5 lines
Diff to previous 1.186 (colored)

Rreplace [[ -n $(grep..) ]] and [[ -z $(grep..) ]]
with grep -q and ! grep -q.

OK ajacoutot@

Revision 1.186 / (download) - annotate - [select for diffs], Tue Sep 9 06:37:57 2014 UTC (11 years, 1 month ago) by rpe
Branch: MAIN
Changes since 1.185: +5 -5 lines
Diff to previous 1.185 (colored)

Replace last usage of awk in sysmerge with a shell equivalent.

based on a diff from and OK ajacoutot@

Revision 1.185 / (download) - annotate - [select for diffs], Mon Sep 8 16:47:58 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.184: +2 -2 lines
Diff to previous 1.184 (colored)

Put chpass(1) args between quotes.

spotted by matthieu@

Revision 1.184 / (download) - annotate - [select for diffs], Mon Sep 8 11:27:49 2014 UTC (11 years, 1 month ago) by halex
Branch: MAIN
Changes since 1.183: +3 -3 lines
Diff to previous 1.183 (colored)

strip excess verbiage from sed expressions

ok and prodding ajacoutot@

Revision 1.183 / (download) - annotate - [select for diffs], Sun Sep 7 11:41:49 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.182: +3 -4 lines
Diff to previous 1.182 (colored)

Remove last use of xargs(1).

Revision 1.182 / (download) - annotate - [select for diffs], Sun Sep 7 09:46:32 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.181: +4 -3 lines
Diff to previous 1.181 (colored)

Only compare CVS Id when it's not empty.

Revision 1.181 / (download) - annotate - [select for diffs], Sun Sep 7 09:21:42 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.180: +3 -3 lines
Diff to previous 1.180 (colored)

Drop 2 uneeded xargs(1).

Revision 1.180 / (download) - annotate - [select for diffs], Sun Sep 7 08:39:04 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.179: +51 -51 lines
Diff to previous 1.179 (colored)

Consistency in var names.

Revision 1.179 / (download) - annotate - [select for diffs], Sun Sep 7 08:15:42 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.178: +4 -3 lines
Diff to previous 1.178 (colored)

Fix regression in detecting changed files.

Revision 1.178 / (download) - annotate - [select for diffs], Sun Sep 7 07:46:26 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.177: +14 -15 lines
Diff to previous 1.177 (colored)

Use shell substitution instead of dirname.
Fix installing pkg @sample when the target directory is missing.
Fix output when a file fails to install.

Revision 1.177 / (download) - annotate - [select for diffs], Sun Sep 7 06:40:01 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.176: +11 -15 lines
Diff to previous 1.176 (colored)

Simplify checks.

Revision 1.176 / (download) - annotate - [select for diffs], Sat Sep 6 21:46:15 2014 UTC (11 years, 1 month ago) by rpe
Branch: MAIN
Changes since 1.175: +6 -11 lines
Diff to previous 1.175 (colored)

Replace awk with either sed or shell equivalents.

OK ajacoutot@

Revision 1.175 / (download) - annotate - [select for diffs], Sat Sep 6 20:47:44 2014 UTC (11 years, 1 month ago) by rpe
Branch: MAIN
Changes since 1.174: +45 -40 lines
Diff to previous 1.174 (colored)

Convert vars used as boolean (unset or 1) to true or false.

OK ajacoutot@

Revision 1.174 / (download) - annotate - [select for diffs], Sat Sep 6 10:43:24 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.173: +2 -5 lines
Diff to previous 1.173 (colored)

Remove backup checksums after a successfull run.

Revision 1.173 / (download) - annotate - [select for diffs], Sat Sep 6 10:38:01 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.172: +4 -2 lines
Diff to previous 1.172 (colored)

Files may have been removed in the previous step, so make sure they exist
before trying to remove them again.

Revision 1.172 / (download) - annotate - [select for diffs], Fri Sep 5 17:26:08 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.171: +3 -5 lines
Diff to previous 1.171 (colored)

Drop support for SM_MERGE. The goal is to be a less interactive as possible
so there is no point in allowing graphical merge tools to be used; especially
since it is _completely_ untested...

Revision 1.171 / (download) - annotate - [select for diffs], Fri Sep 5 17:22:10 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.170: +8 -4 lines
Diff to previous 1.170 (colored)

Sync _ignorefiles.

Revision 1.170 / (download) - annotate - [select for diffs], Fri Sep 5 17:19:48 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.169: +4 -13 lines
Diff to previous 1.169 (colored)

Drop support for sendmail(8) -- hopefully it'll go away from base soon.

Revision 1.169 / (download) - annotate - [select for diffs], Fri Sep 5 16:59:46 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.168: +143 -176 lines
Diff to previous 1.168 (colored)

Spring cleanup in preparation for more changes.
Lots of moving around.

Revision 1.168 / (download) - annotate - [select for diffs], Fri Sep 5 08:28:12 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.167: +6 -6 lines
Diff to previous 1.167 (colored)

Tweaks, no functionnal change.

Revision 1.167 / (download) - annotate - [select for diffs], Fri Sep 5 07:16:38 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.166: +13 -23 lines
Diff to previous 1.166 (colored)

/etc/{hosts,myname} are going away from etc.tgz.

Revision 1.166 / (download) - annotate - [select for diffs], Mon Sep 1 06:55:37 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.165: +6 -5 lines
Diff to previous 1.165 (colored)

Do not compare checksum of checksums...

Revision 1.165 / (download) - annotate - [select for diffs], Sun Aug 31 09:20:06 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.164: +2 -6 lines
Diff to previous 1.164 (colored)

Make sysmerge(8) completely silent by default when no file is modified.

Revision 1.164 / (download) - annotate - [select for diffs], Sun Aug 31 08:32:41 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.163: +10 -13 lines
Diff to previous 1.163 (colored)

In pkg mode, warn if the directory we want to copy the @sample file into
does not exist and is not a @sample because we have no knowledge of the
required owner/group/mode so we cannot create it.

Revision 1.163 / (download) - annotate - [select for diffs], Sun Aug 31 07:59:58 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.162: +6 -9 lines
Diff to previous 1.162 (colored)

Simplify examples files handling.

Revision 1.162 / (download) - annotate - [select for diffs], Sun Aug 31 07:35:52 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.161: +3 -3 lines
Diff to previous 1.161 (colored)

Only use the sum files corresponding to the mode we run in.

Revision 1.161 / (download) - annotate - [select for diffs], Sun Aug 31 07:31:26 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.160: +3 -4 lines
Diff to previous 1.160 (colored)

When we are not running in pkg mode, /usr/share/sysmerge/examplessum
should always be part of the temproot, so there's not need to check for its
existence.

Revision 1.160 / (download) - annotate - [select for diffs], Sun Aug 31 06:40:46 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.159: +2 -3 lines
Diff to previous 1.159 (colored)

Do not overwrite examplessum; use the one we are provided with.

Revision 1.159 / (download) - annotate - [select for diffs], Sat Aug 30 20:31:03 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.158: +29 -36 lines
Diff to previous 1.158 (colored)

Refactor sum checks; all the information we need is already available so
not need to create sum files anymore (except in pkg mode).

Revision 1.158 / (download) - annotate - [select for diffs], Sat Aug 30 16:37:12 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.157: +2 -2 lines
Diff to previous 1.157 (colored)

sm_warn() always returns 0.

Revision 1.157 / (download) - annotate - [select for diffs], Sat Aug 30 14:40:09 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.156: +2 -2 lines
Diff to previous 1.156 (colored)

DESTDIR is gone.

from Nathanael Rensen, thanks!

Revision 1.156 / (download) - annotate - [select for diffs], Fri Aug 29 06:52:20 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.155: +54 -66 lines
Diff to previous 1.155 (colored)

Some cleanings, no functional change.

Revision 1.155 / (download) - annotate - [select for diffs], Thu Aug 28 17:43:21 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.154: +320 -460 lines
Diff to previous 1.154 (colored)

Major sysmerge cleanup now that both etc and xetc sets are part of base.
Expect more changes/cleanup/... in the near future.

-S (signature) option is gone since we are not fetching sets anymore
-s and -x are gone as well for obvious reasons

Left is:
usage: sysmerge [-bdp]

I would appreciate feedback, *lots* of things have changed and there may be
side effects I missed. Consider sysmerge as WIP for the time being.

Revision 1.154 / (download) - annotate - [select for diffs], Wed Aug 27 14:44:42 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.153: +2 -2 lines
Diff to previous 1.153 (colored)

One less option.

Revision 1.153 / (download) - annotate - [select for diffs], Wed Aug 27 14:13:17 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.152: +25 -19 lines
Diff to previous 1.152 (colored)

Simplify examples handling.

Revision 1.152 / (download) - annotate - [select for diffs], Tue Aug 26 21:29:56 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.151: +27 -78 lines
Diff to previous 1.151 (colored)

Fist shot at fixing sysmerge(8) with etc-in-base; note that it's still in
transition state and the utility will get a lot of revamping in the near
future.

Revision 1.151 / (download) - annotate - [select for diffs], Thu Aug 21 16:50:11 2014 UTC (11 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.150: +2 -2 lines
Diff to previous 1.150 (colored)

Unbreak when "SRCDIR=."

reported by phessler@

Revision 1.150 / (download) - annotate - [select for diffs], Mon Aug 11 09:03:27 2014 UTC (11 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.149: +18 -6 lines
Diff to previous 1.149 (colored)

Steal stripcom() from /etc/rc to parse sysmerge.ignore.

Revision 1.149 / (download) - annotate - [select for diffs], Sun Aug 10 17:15:18 2014 UTC (11 years, 2 months ago) by jmc
Branch: MAIN
Changes since 1.148: +2 -2 lines
Diff to previous 1.148 (colored)

- add -p to SYNOPSIS
- the argument to -s is not optional

ok ajacoutot

Revision 1.148 / (download) - annotate - [select for diffs], Sat Aug 9 12:46:51 2014 UTC (11 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.147: +2 -2 lines
Diff to previous 1.147 (colored)

Extend comment.

Revision 1.147 / (download) - annotate - [select for diffs], Sat Aug 9 12:45:03 2014 UTC (11 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.146: +129 -16 lines
Diff to previous 1.146 (colored)

Initial support for handling configuration files from packages
(aka @sample) -- `sysmerge -p`
Worked done at g2k14.
Committing early so we have plenty of time for testing.

with help from espie@
thanks to landry@ for feedback on initial testing

Revision 1.146 / (download) - annotate - [select for diffs], Sat Aug 9 12:34:05 2014 UTC (11 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.145: +3 -3 lines
Diff to previous 1.145 (colored)

sysctl.conf is an example.
Tweak error output.
Mention that `-S' has no effect when sets aren't used.

Revision 1.145 / (download) - annotate - [select for diffs], Fri Aug 8 16:38:25 2014 UTC (11 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.144: +3 -3 lines
Diff to previous 1.144 (colored)

Tweak verbiage.

Revision 1.144 / (download) - annotate - [select for diffs], Wed Jul 30 16:54:09 2014 UTC (11 years, 2 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.143: +2 -2 lines
Diff to previous 1.143 (colored)

Properly warn when an example changes and the corresponding file is found
under /etc.

issue reported by Nathanael Rensen
"fine" deraadt@

Revision 1.143 / (download) - annotate - [select for diffs], Sun Jul 20 08:19:59 2014 UTC (11 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.142: +2 -2 lines
Diff to previous 1.142 (colored)

Fix auto-upgradable files detection.

from Nathanael Rensen, thanks!

Revision 1.142 / (download) - annotate - [select for diffs], Fri Jul 18 10:43:29 2014 UTC (11 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.141: +5 -5 lines
Diff to previous 1.141 (colored)

Cleanups:
- links are already ignored when creating the sums
- better CVSID match

Revision 1.141 / (download) - annotate - [select for diffs], Tue Jul 15 15:30:56 2014 UTC (11 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.140: +3 -3 lines
Diff to previous 1.140 (colored)

typo

Revision 1.140 / (download) - annotate - [select for diffs], Tue Jul 15 09:27:04 2014 UTC (11 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.139: +5 -5 lines
Diff to previous 1.139 (colored)

/var/db/sysmerge -> /usr/share/sysmerge

ok deraadt@

Revision 1.139 / (download) - annotate - [select for diffs], Sun Jul 13 07:12:41 2014 UTC (11 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.138: +2 -2 lines
Diff to previous 1.138 (colored)

Also ignore examplessum.

Revision 1.138 / (download) - annotate - [select for diffs], Sat Jul 12 22:06:11 2014 UTC (11 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.137: +2 -2 lines
Diff to previous 1.137 (colored)

egsum -> examplessum

Revision 1.137 / (download) - annotate - [select for diffs], Sat Jul 12 16:26:35 2014 UTC (11 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.136: +2 -2 lines
Diff to previous 1.136 (colored)

Extend output a bit.

Revision 1.136 / (download) - annotate - [select for diffs], Sat Jul 12 15:58:14 2014 UTC (11 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.135: +6 -7 lines
Diff to previous 1.135 (colored)

Use sha256(1) for compared files, just like we do for examples.

Revision 1.135 / (download) - annotate - [select for diffs], Sat Jul 12 15:31:54 2014 UTC (11 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.134: +41 -6 lines
Diff to previous 1.134 (colored)

Initial support for /etc/examples.

Revision 1.134 / (download) - annotate - [select for diffs], Thu Jul 10 11:00:03 2014 UTC (11 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.133: +1 -2 lines
Diff to previous 1.133 (colored)

/var/games/tetris.scores will move away from the etc set.

Revision 1.133 / (download) - annotate - [select for diffs], Thu Mar 27 07:27:04 2014 UTC (11 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.132: +2 -1 lines
Diff to previous 1.132 (colored)

restore_sum: remove newly created sum file(s).

Revision 1.132 / (download) - annotate - [select for diffs], Wed Mar 26 23:03:59 2014 UTC (11 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.131: +2 -2 lines
Diff to previous 1.131 (colored)

login.conf(5) is not special anymore.

Revision 1.131 / (download) - annotate - [select for diffs], Mon Mar 24 15:20:32 2014 UTC (11 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.130: +83 -70 lines
Diff to previous 1.130 (colored)

Rework the way we fetch and verify sets to simplify the process.
Don't fetch SHA256 twice when we are updating from the same repo.
Better output.

Simplify extract_set (becomes extract_sets and deal with all sets at once).

Make sure we cannot pass -s xetcXX and/or -x etcXX.
Bring consistency in condition evaluations.
Drop some unused variables.

with inputs from rpe@

Revision 1.130 / (download) - annotate - [select for diffs], Sat Mar 22 12:33:36 2014 UTC (11 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.129: +2 -2 lines
Diff to previous 1.129 (colored)

Fix trap: do not remove the entire WRKDIR -- we may have our backed up files
in there.

Revision 1.129 / (download) - annotate - [select for diffs], Sat Mar 22 12:26:03 2014 UTC (11 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.128: +2 -1 lines
Diff to previous 1.128 (colored)

Also remove TEMPROOT in error_rm_wrkdir.

Revision 1.128 / (download) - annotate - [select for diffs], Sat Mar 22 11:16:42 2014 UTC (11 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.127: +53 -60 lines
Diff to previous 1.127 (colored)

Make sure to add missing users/groups _before_ running the
distribution-etc-root-var target; otherwise mtree(8) can fail.

issue reported and debugged by deraadt@
ok sthen@

Revision 1.127 / (download) - annotate - [select for diffs], Fri Mar 21 08:13:57 2014 UTC (11 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.126: +3 -3 lines
Diff to previous 1.126 (colored)

Use ftp -D.

Revision 1.126 / (download) - annotate - [select for diffs], Fri Mar 21 08:02:11 2014 UTC (11 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.125: +4 -4 lines
Diff to previous 1.125 (colored)

Fix small regression when not using a full path to sets.

Revision 1.125 / (download) - annotate - [select for diffs], Thu Mar 20 09:00:09 2014 UTC (11 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.124: +16 -43 lines
Diff to previous 1.124 (colored)

Cope with recent signify(1) changes and simplify getting/checking the sets.

ok sthen@ rpe@

Revision 1.124 / (download) - annotate - [select for diffs], Tue Mar 18 18:03:44 2014 UTC (11 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.123: +4 -3 lines
Diff to previous 1.123 (colored)

Drop the check for badly formed *etc sets when we check signatures; it saves
us time and if the sets are signed we can assume they are legit (yes, I am
an assumer).

Revision 1.123 / (download) - annotate - [select for diffs], Thu Mar 6 15:07:11 2014 UTC (11 years, 7 months ago) by ajacoutot
Branch: MAIN
Changes since 1.122: +2 -2 lines
Diff to previous 1.122 (colored)

Always print the key signify(1) is using.

sure deraadt@

Revision 1.122 / (download) - annotate - [select for diffs], Sat Mar 1 13:47:26 2014 UTC (11 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.121: +3 -3 lines
Diff to previous 1.121 (colored)

start using the new officially named keys.  This is being done before
any snapshots come out which are signed with that key... but just give
it a day or two.
from ajacoutot

Revision 1.121 / (download) - annotate - [select for diffs], Sat Feb 8 23:58:06 2014 UTC (11 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.120: +5 -2 lines
Diff to previous 1.120 (colored)

Only create DBDIR if it does not exist.

Revision 1.120 / (download) - annotate - [select for diffs], Fri Feb 7 18:15:27 2014 UTC (11 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.119: +14 -7 lines
Diff to previous 1.119 (colored)

When using SM_PATH, fetch the SHA256 file only once since we will not be
using multiple repos.

ok rpe@

Revision 1.119 / (download) - annotate - [select for diffs], Wed Feb 5 15:49:15 2014 UTC (11 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.118: +2 -2 lines
Diff to previous 1.118 (colored)

Sync getopts with usage.

Revision 1.118 / (download) - annotate - [select for diffs], Mon Feb 3 09:11:14 2014 UTC (11 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.117: +14 -10 lines
Diff to previous 1.117 (colored)

Really clean up after a run.
Factorize the sig file name.
Do not through an error when a file got manually removed but is still
present in the sum file.

Revision 1.117 / (download) - annotate - [select for diffs], Tue Jan 28 09:25:22 2014 UTC (11 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.116: +12 -8 lines
Diff to previous 1.116 (colored)

Drop FETCH_CMD and always use ftp(1).
New fetch() function that wraps ftp(1) with our needed knobs
(courtesy of halex@)

input from halex@ rpe@
ok halex@

Revision 1.116 / (download) - annotate - [select for diffs], Mon Jan 27 17:40:42 2014 UTC (11 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.115: +3 -2 lines
Diff to previous 1.115 (colored)

Only remove COMPFILE if it exists.

Revision 1.115 / (download) - annotate - [select for diffs], Mon Jan 27 17:16:53 2014 UTC (11 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.114: +7 -7 lines
Diff to previous 1.114 (colored)

Move "EDIT" to the top.

Revision 1.114 / (download) - annotate - [select for diffs], Mon Jan 27 17:06:56 2014 UTC (11 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.113: +36 -29 lines
Diff to previous 1.113 (colored)

Enhance errors output and display exactly what is going on.
req. by deraadt@

Don't redirect error messages unless in a couple of places where it actually
makes sense.

Revision 1.113 / (download) - annotate - [select for diffs], Thu Jan 23 22:05:59 2014 UTC (11 years, 8 months ago) by rpe
Branch: MAIN
Changes since 1.112: +2 -2 lines
Diff to previous 1.112 (colored)

specifically NOT suppress signify error output

suggested by espie@
OK deraadt@

Revision 1.112 / (download) - annotate - [select for diffs], Thu Jan 23 08:23:45 2014 UTC (11 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.111: +23 -27 lines
Diff to previous 1.111 (colored)

More output enhancements, put errors and warnings where they belong.

Revision 1.111 / (download) - annotate - [select for diffs], Thu Jan 23 07:24:00 2014 UTC (11 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.110: +18 -19 lines
Diff to previous 1.110 (colored)

Verify both the signature and the checksum in check_sig().
Fix a regression with '-s' and '-x' when not using full path to the sets.
Be a little bit more verbose about what we do.

ok rpe@

Revision 1.110 / (download) - annotate - [select for diffs], Wed Jan 22 10:40:07 2014 UTC (11 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.109: +9 -2 lines
Diff to previous 1.109 (colored)

Do not bother comparing/merging empty files. Regression from previous
spotted by kettenis@

Revision 1.109 / (download) - annotate - [select for diffs], Wed Jan 22 08:34:57 2014 UTC (11 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.108: +2 -2 lines
Diff to previous 1.108 (colored)

Don't remove the SHA256 file twice.

Revision 1.108 / (download) - annotate - [select for diffs], Wed Jan 22 08:25:16 2014 UTC (11 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.107: +61 -39 lines
Diff to previous 1.107 (colored)

Cleanup and simplify:

- rename restore_bak to restore_sum since this is what it does
- better clean up after ourselves so only user relevant files are left
  in the work directory after a run
- better handling of symlinks and make sure they match
- tweak output: no need to warn the user when we are finished, it is
  pretty obvious; output that we are veryfing sigs
- simplify signature handling:
  drop get_sig and get signatures at the same time we get the sets -- this
    allows to get a specific SHA256.sig file for each set
  check signature in check_sig() right after getting the corresponding set

ok rpe@

Revision 1.107 / (download) - annotate - [select for diffs], Tue Jan 21 07:58:08 2014 UTC (11 years, 8 months ago) by ajacoutot
Branch: MAIN
Changes since 1.106: +5 -5 lines
Diff to previous 1.106 (colored)

Protect variable names.

Revision 1.106 / (download) - annotate - [select for diffs], Tue Jan 21 07:39:14 2014 UTC (11 years, 8 months ago) by rpe
Branch: MAIN
Changes since 1.105: +30 -7 lines
Diff to previous 1.105 (colored)

Add and enable signature checking per default.
Provide new option -S to skip that step.

idea and initial work from jturner@
with feedback from deraadt@
ok aja@

Revision 1.105 / (download) - annotate - [select for diffs], Tue Sep 10 08:44:38 2013 UTC (12 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.104: +8 -2 lines
Diff to previous 1.104 (colored)

Add support for the SM_PATH environment variable. This changes the
default behavior of sysmerge when no source is specified on the
command line:
* if SM_PATH is set, then sysmerge will search this path for etcXX.tgz
and/or xetcXX.tgz
* if SM_PATH is not set (the default), then the behaviour is the same
as before and /usr/src is used

idea from espie@
man page refactoring jmc@ (who else :-))
"good idea" krw@
ok rpe@ landry@ espie@

Revision 1.104 / (download) - annotate - [select for diffs], Fri Mar 22 08:20:43 2013 UTC (12 years, 6 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.103: +6 -5 lines
Diff to previous 1.103 (colored)

Do not register symlinks in the sum files. This makes no sense and makes
sysmerge(8) output a warning when the target of the link does not yes
exist on the system.

ok sthen@

Revision 1.103 / (download) - annotate - [select for diffs], Sat Mar 2 09:11:15 2013 UTC (12 years, 7 months ago) by ajacoutot
Branch: MAIN
Changes since 1.102: +7 -5 lines
Diff to previous 1.102 (colored)

Always compare aliases(5) at the end of the sysmerge(8) run after all
files have already been merged. This is needed in the case where the
syntax of smtpd.conf changed to prevent newaliases(8) from failing.

issue reported by todd@
ok sthen@

Revision 1.102 / (download) - annotate - [select for diffs], Fri Jan 25 13:32:49 2013 UTC (12 years, 8 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.101: +19 -19 lines
Diff to previous 1.101 (colored)

Rename some functions and bump copyright.
No functionnal change.

Revision 1.101 / (download) - annotate - [select for diffs], Fri Jan 4 07:56:36 2013 UTC (12 years, 9 months ago) by rpe
Branch: MAIN
Changes since 1.100: +4 -18 lines
Diff to previous 1.100 (colored)

simplify chroot cases

ok ajacoutot@

Revision 1.100 / (download) - annotate - [select for diffs], Thu Jan 3 19:45:57 2013 UTC (12 years, 9 months ago) by rpe
Branch: MAIN
Changes since 1.99: +46 -37 lines
Diff to previous 1.99 (colored)

Refactor code for extracting and checksumming of (x)etcXX.tgz sets
or preparing from /usr/src into extract_set() and prepare_src().
- extend error handling and quoting of user supplied input
- move and rename get_sets() to get_set(), change parameter order
  and allow arbitrary filenames in url pattern (see r1.62 msg)

ok halex@, 'go ahead' ajacoutot@

Revision 1.99 / (download) - annotate - [select for diffs], Wed Dec 26 12:28:26 2012 UTC (12 years, 9 months ago) by rpe
Branch: MAIN
Changes since 1.98: +2 -2 lines
Diff to previous 1.98 (colored)

correction of the SRCDIR check

Revision 1.98 / (download) - annotate - [select for diffs], Wed Dec 26 10:38:10 2012 UTC (12 years, 9 months ago) by rpe
Branch: MAIN
Changes since 1.97: +19 -27 lines
Diff to previous 1.97 (colored)

Combine almost identical code for fetching and checking of the
etcXX.tgz/xetcXX.tgz sets into a more generic function get_sets().
Move the SRCDIR check into the getopts while-loop as well.

ok ajacoutot@ halex@

Revision 1.97 / (download) - annotate - [select for diffs], Tue Dec 25 13:26:45 2012 UTC (12 years, 9 months ago) by rpe
Branch: MAIN
Changes since 1.96: +3 -3 lines
Diff to previous 1.96 (colored)

replace one grep with awk patterns and simplify another using -q

ok ajacoutot@

Revision 1.96 / (download) - annotate - [select for diffs], Mon Dec 24 14:31:36 2012 UTC (12 years, 9 months ago) by rpe
Branch: MAIN
Changes since 1.95: +10 -13 lines
Diff to previous 1.95 (colored)

simplify things by using shell patterns

ok ajacoutot@ halex@

Revision 1.95 / (download) - annotate - [select for diffs], Sun Dec 23 11:50:19 2012 UTC (12 years, 9 months ago) by rpe
Branch: MAIN
Changes since 1.94: +2 -6 lines
Diff to previous 1.94 (colored)

simplify setting FETCH_CMD and move it upwards to where the other
global variables are defined

ok ajacoutot@

Revision 1.94 / (download) - annotate - [select for diffs], Wed Dec 19 19:40:30 2012 UTC (12 years, 9 months ago) by rpe
Branch: MAIN
Changes since 1.93: +5 -5 lines
Diff to previous 1.93 (colored)

use (()) for arithmetic tests

ok @ajacoutot

Revision 1.93 / (download) - annotate - [select for diffs], Sat Nov 10 18:48:28 2012 UTC (12 years, 11 months ago) by rpe
Branch: MAIN
Changes since 1.92: +24 -24 lines
Diff to previous 1.92 (colored)

consistently use [ -n "${var}" ] instead of [ "${var}" ]
no functional change

discussed and ok ajacoutot

Revision 1.92 / (download) - annotate - [select for diffs], Sat Nov 10 16:02:52 2012 UTC (12 years, 11 months ago) by rpe
Branch: MAIN
Changes since 1.91: +25 -54 lines
Diff to previous 1.91 (colored)

turn single-command if-then-fi blocks into "[ expr ] && command"
style lines. no change of functionality.

discussed with and ok ajacoutot

Revision 1.91 / (download) - annotate - [select for diffs], Sat Nov 10 09:50:05 2012 UTC (12 years, 11 months ago) by rpe
Branch: MAIN
Changes since 1.90: +13 -17 lines
Diff to previous 1.90 (colored)

enhance error_rm_wrkdir() to print an error message if one is passed
as argument to replace some
        error "message"
        error_rm_workdir
lines by a single
        error_rm_workdir "message"
line.

ok ajacoutot

Revision 1.90 / (download) - annotate - [select for diffs], Thu Nov 8 08:56:41 2012 UTC (12 years, 11 months ago) by rpe
Branch: MAIN
Changes since 1.89: +5 -5 lines
Diff to previous 1.89 (colored)

mark some more variables as local

ok ajacoutot

Revision 1.89 / (download) - annotate - [select for diffs], Tue Aug 28 05:42:07 2012 UTC (13 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.88: +6 -2 lines
Diff to previous 1.88 (colored)

Always compare master.passwd(5) and group(5) regardless of their sums:
this is a sanity check to ensure no system user(s)/group(s) are missing.

ok sthen@

Revision 1.88 / (download) - annotate - [select for diffs], Mon Aug 20 14:10:30 2012 UTC (13 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.87: +14 -10 lines
Diff to previous 1.87 (colored)

Explicitely set local variables as such.
Remove unused DBFILE.

from robert at peichaer dot org

Revision 1.87 / (download) - annotate - [select for diffs], Mon Aug 20 06:10:24 2012 UTC (13 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.86: +1 -2 lines
Diff to previous 1.86 (colored)

Don't unset NEED_NEWALIASES too soon or we will not get the warning.

from robert at peichaer dot org

Revision 1.86 / (download) - annotate - [select for diffs], Sat Aug 4 09:55:29 2012 UTC (13 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.85: +12 -4 lines
Diff to previous 1.85 (colored)

Also log the file(s) we manually merged/installed as it's important
information.

ok sthen@

Revision 1.85 / (download) - annotate - [select for diffs], Sat Aug 4 07:02:14 2012 UTC (13 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.84: +42 -30 lines
Diff to previous 1.84 (colored)

Factorize common warn, error and report outputs into functions.
Remove bogus echo -n "foobar\n", leftover from display output tests.

No functional change but makes the code more readable.

from robert ar peichaer dor org
ok sthen@

Revision 1.84 / (download) - annotate - [select for diffs], Mon Mar 19 10:52:57 2012 UTC (13 years, 6 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.83: +28 -28 lines
Diff to previous 1.83 (colored)

Use $() instead of backticks.

Revision 1.83 / (download) - annotate - [select for diffs], Sun Oct 9 15:02:22 2011 UTC (14 years ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.82: +3 -1 lines
Diff to previous 1.82 (colored)

add a missing newline when you merge login.conf if login.conf.db doesn't exist
ok aja@

Revision 1.82 / (download) - annotate - [select for diffs], Thu Sep 1 07:52:46 2011 UTC (14 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.81: +13 -11 lines
Diff to previous 1.81 (colored)

Fix the display of running utilities (e.g. don't say we are running
makemap when we are in fact running newaliases...).
No functionnal change.

Revision 1.81 / (download) - annotate - [select for diffs], Wed Aug 3 13:33:29 2011 UTC (14 years, 2 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.80: +4 -23 lines
Diff to previous 1.80 (colored)

Remove the 'obsolete file(s)' feature. It may come back at some point
(doubtful) but since files tend to move from one set to another sysmerge
would end up tagging them as obsolete. I see no way to fix this...

req. by and ok deraadt@, ok landry sthen@

Revision 1.80 / (download) - annotate - [select for diffs], Mon Jul 11 04:37:21 2011 UTC (14 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.79: +2 -6 lines
Diff to previous 1.79 (colored)

EDITOR or VISUAL are not a path.  They are a string that needs to be
added to the front of the file, then sent through system() of equiv.
ok aja

Revision 1.79 / (download) - annotate - [select for diffs], Mon Jul 11 04:10:47 2011 UTC (14 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored)

use more XXX for mktemp; ok ajacoutot

Revision 1.78 / (download) - annotate - [select for diffs], Wed Jul 6 23:35:07 2011 UTC (14 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.77: +20 -13 lines
Diff to previous 1.77 (colored)

Harden the checks on the provided sets/src to make sure they are legit.

ok sthen@

Revision 1.77 / (download) - annotate - [select for diffs], Wed Jul 6 17:38:15 2011 UTC (14 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.76: +19 -20 lines
Diff to previous 1.76 (colored)

Consistency in stdout redirections.

Revision 1.76 / (download) - annotate - [select for diffs], Wed Jul 6 17:19:06 2011 UTC (14 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.75: +3 -2 lines
Diff to previous 1.75 (colored)

Indent, no change.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Jul 5 21:43:45 2011 UTC (14 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored)

Make it possible to pass https:// and file:// (along with ftp:// and
http://) so that sysmerge(8) can work with URLs we use in the install
script.

ok sthen@

Revision 1.74 / (download) - annotate - [select for diffs], Mon May 9 14:18:34 2011 UTC (14 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.73: +4 -4 lines
Diff to previous 1.73 (colored)

Installing -> Updating.
Update copyright year while here.

Revision 1.73 / (download) - annotate - [select for diffs], Sun May 8 09:49:34 2011 UTC (14 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.72: +6 -3 lines
Diff to previous 1.72 (colored)

Make sure /etc/group and /etc/master.passwd are handled first in case we
need to install files or directories with newly added user/group
ownerships.

ok sthen@ (on a slightly different diff)

Revision 1.72 / (download) - annotate - [select for diffs], Fri May 6 16:17:18 2011 UTC (14 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.71: +6 -1 lines
Diff to previous 1.71 (colored)

If it doesn't exist, create the directory holding the link we are about
to create, otherwise sysmerge will fail installing it. This can happen
for example when you only installed etcXX but run sysmerge against both
etcXX and xetcXX.

found the hard way by and ok sthen@

Revision 1.71 / (download) - annotate - [select for diffs], Wed Apr 27 08:44:48 2011 UTC (14 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.70: +9 -9 lines
Diff to previous 1.70 (colored)

Cosmetic:
* "Installing foo" -> "{Merging,Upgrading} foo" where it makes sense
* remove the "it will remain to merge by hand" msg, too chatty and we
already tell the user at the end of a sysmerge run if some files are
still left to handle

ok sthen@

Revision 1.70 / (download) - annotate - [select for diffs], Thu Apr 21 15:57:14 2011 UTC (14 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)

Oopsy.

Revision 1.69 / (download) - annotate - [select for diffs], Thu Apr 21 15:54:24 2011 UTC (14 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.68: +5 -4 lines
Diff to previous 1.68 (colored)

Better detection of obsolete files (naddy@ reported a false positive).

help from and ok naddy@

Revision 1.68 / (download) - annotate - [select for diffs], Wed Apr 20 09:37:35 2011 UTC (14 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.67: +48 -48 lines
Diff to previous 1.67 (colored)

Enhance sysmerge(8) output so that it is more readable and make it more
clear if there are any warning/error or things that should be handled
manually.
e.g. output from going from 4.8 to current:

# sysmerge -s etc49.tgz -x xetc49.tgz
===> Populating temporary root under /var/tmp/sysmerge.k1BnD/temproot
===> Starting comparison
===> Installing /.profile
===> Installing /etc/bgpd.conf
<...>
===> Installing /root/.profile
===> Installing /var/www/conf/mime.types
===> Comparison complete
===> Checking directory hierarchy permissions (running mtree(8))
===> Output log available at /var/tmp/sysmerge.k1BnD/sysmerge.log
        *** WARNING: file(s) detected as obsolete: /etc/portal.conf /etc/security /var/msgs/bounds
        *** WARNING: some new/updated file(s) may require a reboot

feedback and ok sthen@

Revision 1.67 / (download) - annotate - [select for diffs], Mon Apr 18 07:50:29 2011 UTC (14 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.66: +5 -4 lines
Diff to previous 1.66 (colored)

Fix a bug where OBSOLETE_FILES would contain only the last appended
occurence.

with a small tweak from an ok sthen@

Revision 1.66 / (download) - annotate - [select for diffs], Thu Nov 11 10:46:10 2010 UTC (14 years, 11 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)

Unconfuse usage.

prodded by and ok espie@, ok jmc@

Revision 1.65 / (download) - annotate - [select for diffs], Mon Nov 8 14:05:09 2010 UTC (14 years, 11 months ago) by ajacoutot
Branch: MAIN
Changes since 1.64: +2 -2 lines
Diff to previous 1.64 (colored)

No need to differentiate newly installed files versus automatically
updated files in the output, this is confusing.

ok sthen@

Revision 1.64 / (download) - annotate - [select for diffs], Thu Nov 4 09:17:38 2010 UTC (14 years, 11 months ago) by ajacoutot
Branch: MAIN
Changes since 1.63: +7 -1 lines
Diff to previous 1.63 (colored)

Make sure we don't end up using /usr/src/etc if we forget to pass the
correct option (e.g. 'sysmerge /tmp/etc48.tgz'). Use OPTIND as all args
are handled by getopts we can catch misusage and we exit with an error.

from Brian Poole, thanks.
ok sthen@

Revision 1.63 / (download) - annotate - [select for diffs], Sat Aug 21 09:32:00 2010 UTC (15 years, 1 month ago) by sthen
Branch: MAIN
Changes since 1.62: +2 -1 lines
Diff to previous 1.62 (colored)

Display usage information as well as the error when a path to
src/*.tgz isn't specified.  ok ajacoutot@

Revision 1.62 / (download) - annotate - [select for diffs], Tue Jul 20 05:35:29 2010 UTC (15 years, 2 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.61: +5 -7 lines
Diff to previous 1.61 (colored)

Instead of checking for the *etcXX.tgz filename, check whether the
tarball contains ./var/db/sysmerge/etcsum or ./var/db/sysmerge/xetcsum.
First, it's more correct and second it allows people to rename the sets
without sysmerge bailing out.

feature requested and tested by oga@

Revision 1.61 / (download) - annotate - [select for diffs], Sat Jul 17 06:47:13 2010 UTC (15 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.60: +13 -57 lines
Diff to previous 1.60 (colored)

When running in full diff mode, don't wait for user input before
starting the comparison anymore. It does not bring us anything and
allows to chop 30 lines of the script.
While here, remove some empty lines.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Jul 6 12:02:54 2010 UTC (15 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.59: +2 -1 lines
Diff to previous 1.59 (colored)

Add a blank line between sections in the output log, it's more readable.

Revision 1.59 / (download) - annotate - [select for diffs], Mon Jul 5 08:30:28 2010 UTC (15 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.58: +64 -3 lines
Diff to previous 1.58 (colored)

Automatically install missing users and groups.
(does *NOT* touch existing users/groups)

"I like it" from several...
inputs from sthen@ and halex@
ok krw@ halex@ sthen@

Revision 1.58 / (download) - annotate - [select for diffs], Sun Jun 27 00:07:22 2010 UTC (15 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.57: +11 -3 lines
Diff to previous 1.57 (colored)

Suggest a reboot if "sh MAKEDEV" was run or login.conf was modified.

reported by matthieu@
req. by and "I like it" deraadt@

Revision 1.57 / (download) - annotate - [select for diffs], Sat Feb 6 14:02:36 2010 UTC (15 years, 8 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.56: +10 -8 lines
Diff to previous 1.56 (colored)

Remove newly generated sum file(s) if it did not exist before and trap
is called.
While here, change shebang to /bin/ksh to reflect reality and bump
copyright year.

"checkbashisms says yes. :-)" && ok sthen@

Revision 1.56 / (download) - annotate - [select for diffs], Wed Jan 13 16:22:56 2010 UTC (15 years, 9 months ago) by sthen
Branch: MAIN
Changes since 1.55: +3 -5 lines
Diff to previous 1.55 (colored)

- move the separator so it's just displayed for files with diffs to
review, specifically it's now not printed for every auto-installed
file, giving a much more compact output. ok ajacoutot@

- skip the blank line before 'Comparison complete' suggested by ajacoutot.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Dec 18 15:33:02 2009 UTC (15 years, 9 months ago) by ajacoutot
Branch: MAIN
Changes since 1.54: +4 -4 lines
Diff to previous 1.54 (colored)

xargs takes the whole list as argument, so no need to append.

ok sthen@

Revision 1.54 / (download) - annotate - [select for diffs], Fri Dec 18 13:51:03 2009 UTC (15 years, 9 months ago) by ajacoutot
Branch: MAIN
Changes since 1.53: +2 -1 lines
Diff to previous 1.53 (colored)

Add etcsum and xetcsum to IGNORE_FILES. Needed for upcoming change.

ok sthen@

Revision 1.53 / (download) - annotate - [select for diffs], Sun Dec 6 16:21:36 2009 UTC (15 years, 10 months ago) by ajacoutot
Branch: MAIN
Changes since 1.52: +9 -2 lines
Diff to previous 1.52 (colored)

Add /var/db/locate.database and /var/games/tetris.scores to IGNORE_FILES.

ok sthen@

Revision 1.52 / (download) - annotate - [select for diffs], Fri Oct 2 11:53:45 2009 UTC (16 years ago) by ajacoutot
Branch: MAIN
Changes since 1.51: +4 -1 lines
Diff to previous 1.51 (colored)

Use BSD.x11.dist mtree file now that it is up-to-date and maintained.

ok sthen@

Revision 1.51 / (download) - annotate - [select for diffs], Mon Aug 24 19:14:13 2009 UTC (16 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.50: +11 -8 lines
Diff to previous 1.50 (colored)

Harden variables setting, prodded by alex@
Fix TMPDIR while here and remove the EDITOR definition, it is only used
once.

ok sthen@

Revision 1.50 / (download) - annotate - [select for diffs], Tue Aug 18 08:27:32 2009 UTC (16 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.49: +12 -12 lines
Diff to previous 1.49 (colored)

HEADS-UP:  change the way sysmerge(8) runs by default.
Remove the '-a' switch (auto-mode) and make this behaviour the default.
Add a new '-d' switch to get former default (full diff) mode.

General idea ok for several.
man page improvements from jmc@
ok jim@ oga@ sobrado@
ok sthen@ "sane defaults++ :)"

Revision 1.49 / (download) - annotate - [select for diffs], Mon Aug 17 12:02:47 2009 UTC (16 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.48: +4 -2 lines
Diff to previous 1.48 (colored)

Don't try to move files that don't exist.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Aug 16 20:15:10 2009 UTC (16 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.47: +5 -2 lines
Diff to previous 1.47 (colored)

Properly initialize the array setting auto-upgradable files.

ok sthen@

Revision 1.47 / (download) - annotate - [select for diffs], Sun Jun 28 21:08:06 2009 UTC (16 years, 3 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)

Fix small regression introduced with symlinks handling.
spotted by jmc@

Revision 1.46 / (download) - annotate - [select for diffs], Sun Jun 28 18:23:43 2009 UTC (16 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

Remove useless blank space in output.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Jun 28 08:14:26 2009 UTC (16 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.44: +48 -12 lines
Diff to previous 1.44 (colored)

Teach sysmerge to deal with links (found the hard way when I realised I
missed some very much needed symlinks under /etc/fonts/conf.d/).
The behaviour is the following, if a link does not exist:
* in '-a' mode, it is created automatically
* in normal mode, sysmerge will ask what you want to do

If one wants to use '-a' mode while still being in control of what
links are created, sysmerge.ignore can be used.

"sounds good to" phessler@, ok sthen@

Revision 1.44 / (download) - annotate - [select for diffs], Sun Jun 14 06:54:40 2009 UTC (16 years, 4 months ago) by ajacoutot
Branch: MAIN
Changes since 1.43: +12 -12 lines
Diff to previous 1.43 (colored)

DBDIR resides in DESTDIR.

ok sthen@

Revision 1.43 / (download) - annotate - [select for diffs], Thu Jun 4 23:24:17 2009 UTC (16 years, 4 months ago) by ajacoutot
Branch: MAIN
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

When in auto-mode, automatically install binary files (from the X set).

``please put it in'', pyr@

Revision 1.42 / (download) - annotate - [select for diffs], Wed May 13 22:27:48 2009 UTC (16 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.41: +2 -8 lines
Diff to previous 1.41 (colored)

Remove unused args from getopts.
Remove top comments already duplicated in the man page.

"sure" sthen@

Revision 1.41 / (download) - annotate - [select for diffs], Tue May 12 13:04:18 2009 UTC (16 years, 5 months ago) by jmc
Branch: MAIN
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

- tweak the description of -a
- remove -SX from usage()

ok ajacoutot

Revision 1.40 / (download) - annotate - [select for diffs], Mon May 11 20:25:55 2009 UTC (16 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.39: +70 -116 lines
Diff to previous 1.39 (colored)

This commit adds a new feature to sysmerge(8), usable in '-a' mode.
From now on, checksums of reference files (sets and/or src) will be
stored under /var/db/sysmerge/{etcsum,xetcsum,srcsum} . This allows for
"remembering last choice" several people have requested.
This deprecates the need for -X and -S which have been removed (these
switches may come back at some point for the auto-patch feature which
halex@ proposed).

It will only compare files which reference sources have changed since
the last run and will attempt to automatically upgrade them to the
newest version provided that they have no local changes.
i.e. first run should dislay differences, second run should not display
anything except if something changed between old and new sets/src. This
way sysmerge can also warn you from files which may have been obsoleted.

General idea taken from Net/FreeBSD but we're doing things differently.

Intensively discussed with oga@, sthen@ and halex@
ok oga@ sthen@

Revision 1.39 / (download) - annotate - [select for diffs], Tue Apr 28 08:25:27 2009 UTC (16 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.38: +26 -16 lines
Diff to previous 1.38 (colored)

Add the possibility to go back from merging mode to the previous menu.
Move unset NO_INSTALLED where it belongs, at the start of the function.
Several minor cleanups.

from Alexander Hall

ok sthen@

Revision 1.38 / (download) - annotate - [select for diffs], Sun Apr 12 11:17:58 2009 UTC (16 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.37: +6 -6 lines
Diff to previous 1.37 (colored)

Better output (i.e. /etc instead of //etc)

mostly from and ok sthen@

Revision 1.37 / (download) - annotate - [select for diffs], Sun Apr 12 07:52:10 2009 UTC (16 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored)

Treat /etc/hosts the same way as /etc/group and /etc/master.passwd: make
it impossible to install a virgin one over the currently installed one.

from Mitja Muzenic, with a tweak

Revision 1.36 / (download) - annotate - [select for diffs], Sun Apr 12 07:43:17 2009 UTC (16 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.35: +14 -1 lines
Diff to previous 1.35 (colored)

When in automode, sysmerge will now automatically install files
that only differ by CVS Id (adapted from FreeBSD mergemaster)

Ground work on the man page, from jmc@
 * do not duplicate info
 * rewordings
 * move some stuffs around

ok jmc@ sthen@

Revision 1.35 / (download) - annotate - [select for diffs], Thu Apr 9 10:44:50 2009 UTC (16 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.34: +24 -13 lines
Diff to previous 1.34 (colored)

Add a hook to deal with special sendmail db files under /etc/mail/
Tweak some outputs and put interesting messages into sysmerge.log.
export the NEED_NEWALIASES variable.

inputs from and ok sthen@

Revision 1.34 / (download) - annotate - [select for diffs], Mon Apr 6 15:25:10 2009 UTC (16 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

Fix regression introduced in r1.32 where after running MAKEDEV sysmerge
would stop comparing files.

breakage reported by and ok naddy@

Revision 1.33 / (download) - annotate - [select for diffs], Mon Apr 6 10:35:20 2009 UTC (16 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.32: +27 -31 lines
Diff to previous 1.32 (colored)

Add a report summary file, ${WRKDIR}/sysmerge.log, that will include all
worthy post run information instead of spreading info into several
files.  Tweak some output while here.

Enchance description for the -S and -X options; thanks to sthen@ and
jmc@ for finding the correct wording... it was not as easy as it seems.
Fix a typo in the man page, spotted by jmc@

ok sthen@ jmc@

Revision 1.32 / (download) - annotate - [select for diffs], Fri Mar 27 15:17:31 2009 UTC (16 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.31: +23 -33 lines
Diff to previous 1.31 (colored)

Mitigate the risk of leaving the system in an inconsistent state
when a "special" file has been installed (e.g. master.passwd) but
sysmerge was interrupted: we now run the corresponding command
right after installing the file and not at the end of sysmerge run.

When DESTDIR is set and a new aliases file has been installed, try
to run newaliases from chrooted DESTDIR.

input from and ok sthen@

Revision 1.31 / (download) - annotate - [select for diffs], Wed Mar 25 18:02:12 2009 UTC (16 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.30: +34 -35 lines
Diff to previous 1.30 (colored)

Several cleanups:

 * constistency in redirections (and fix a wrong one)
 * enclose variables
 * several UPPER -> lowercase rewordings
 * add "" on conditionals (suggested by jared r r spiegel a while ago)
 * use cmp instead of md5 for sets comparison (from sthen@)
 * some man page rewordings from sthen@

ok sthen@

Revision 1.30 / (download) - annotate - [select for diffs], Wed Mar 25 13:20:02 2009 UTC (16 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.29: +143 -23 lines
Diff to previous 1.29 (colored)

You can now feed sysmerge with an etcXX and/or xetcXX tarball(s)
corresponding to your current snapshot or release. Any file that was
modified between this old reference and the new one *and* that you did
not change locally will automatically be updated to the new version.

Make sure we don't compare files that have not changed between old and
new tarball (from Alexander Hall).

man page flushing, tweaking, rewording and enhancing from jmc@

Several people came up with this request or alike, thanks to them.

looked over and tested by several
ok weerd@

Revision 1.29 / (download) - annotate - [select for diffs], Tue Feb 17 16:48:11 2009 UTC (16 years, 7 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.28: +11 -29 lines
Diff to previous 1.28 (colored)

- always run pwd_mdb, newaliases, MAKEDEV and cap_mkdb even when not in
auto-mode so that the system is not left in an inconsistent state
- unify messages
- tweak manpage according to new behavior

based on an initial patch from matthieu@
ok matthieu@

Revision 1.28 / (download) - annotate - [select for diffs], Tue Feb 17 10:57:59 2009 UTC (16 years, 7 months ago) by ajacoutot
Branch: MAIN
Changes since 1.27: +4 -4 lines
Diff to previous 1.27 (colored)

- better output

ok sthen@

Revision 1.27 / (download) - annotate - [select for diffs], Tue Dec 16 22:23:55 2008 UTC (16 years, 9 months ago) by ajacoutot
Branch: MAIN
Changes since 1.26: +20 -3 lines
Diff to previous 1.26 (colored)

- make it possible to edit a merged file using an external editor ;
useful when 'sdiff eb' does not cope with one's needs.

idea and input from weerd@
ok weerd@ sthen@

Revision 1.26 / (download) - annotate - [select for diffs], Mon Dec 15 15:54:55 2008 UTC (16 years, 9 months ago) by fgsch
Branch: MAIN
Changes since 1.25: +4 -5 lines
Diff to previous 1.25 (colored)

Cleanup the temporary directory in all the error paths.
ajacoutot@ ok.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Sep 17 08:04:17 2008 UTC (17 years ago) by ajacoutot
Branch: MAIN
Changes since 1.24: +13 -1 lines
Diff to previous 1.24 (colored)

- when merging a file, add a key to see a diff between the merged file
and the new or old one

requested by todd@ months ago
"I like the idea" fgsch@, "should be in" todd@

Revision 1.24 / (download) - annotate - [select for diffs], Fri Sep 12 13:31:59 2008 UTC (17 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.23: +8 -5 lines
Diff to previous 1.23 (colored)

- make it possible to use a user defined MERGE_CMD instead of sdiff

mostly from andreas@
man page enhancing by jmc@
ok andreas@

Revision 1.23 / (download) - annotate - [select for diffs], Fri Sep 12 13:23:17 2008 UTC (17 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.22: +47 -47 lines
Diff to previous 1.22 (colored)

- use shell built-in getopts instead of getopt(1)
- cleanup by adding usage and error_rm_wrkdir functions

feedbacks from guenther@ sthen@ and jared r r spiegel, thank you!
ok sthen

Revision 1.22 / (download) - annotate - [select for diffs], Sat Sep 6 13:25:48 2008 UTC (17 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

- don't list *.merged files in the "remaining for you to merge by hand"
list, it's very confusing.

ok sthen@

Revision 1.21 / (download) - annotate - [select for diffs], Tue Sep 2 11:38:06 2008 UTC (17 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.20: +10 -6 lines
Diff to previous 1.20 (colored)

- make sure they are no sendmail leftovers in src when sysmerge stops
unexpectedly

feedback and ok sthen@

Revision 1.20 / (download) - annotate - [select for diffs], Fri Aug 29 08:17:28 2008 UTC (17 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.19: +14 -6 lines
Diff to previous 1.19 (colored)

- prevent sysmerge from installing a virgin master.passwd and group
files (only allow delete or merge+install); requested by nick@

no objections from laurent@ krw@ oga@
ok sthen@ nick@

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jul 21 08:28:55 2008 UTC (17 years, 2 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.18: +1 -2 lines
Diff to previous 1.18 (colored)

Leave PATH alone.

noticed by and ok deraadt@

Revision 1.18 / (download) - annotate - [select for diffs], Thu Jul 10 16:49:26 2008 UTC (17 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.17: +5 -3 lines
Diff to previous 1.17 (colored)

Fix "etc source" output when not using a tarball

ok "bien sur!" sthen@

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jul 8 11:04:28 2008 UTC (17 years, 3 months ago) by ajacoutot
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

Typo in summarize output.

ok sthen@

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jul 4 15:03:45 2008 UTC (17 years, 3 months ago) by sthen
Branch: MAIN
Changes since 1.15: +46 -10 lines
Diff to previous 1.15 (colored)

Teach sysmerge to retrieve {etc,xetc}*.tgz files from FTP/HTTP
paths using ftp(1). Thanks ajacoutot and jmc for suggestions.

ok ajacoutot jmc, no objection deraadt

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jun 13 23:56:48 2008 UTC (17 years, 4 months ago) by ajacoutot
Branch: MAIN
Changes since 1.14: +10 -12 lines
Diff to previous 1.14 (colored)

- don't ask for yesno confirmation when running in automatic mode
- allow comments in sysmerge.ignore

suggested by, feedback from and ok naddy@

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jun 13 00:46:57 2008 UTC (17 years, 4 months ago) by ajacoutot
Branch: MAIN
Changes since 1.13: +7 -2 lines
Diff to previous 1.13 (colored)

- add support for ignoring files and directories from comparison
through an optionnal /etc/sysmerge.ignore file
requested by many

man page tweak from jmc@
/etc/changelist addition suggested by sthen@

ok sthen@ jdixon@ jmc@ naddy@

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jun 13 00:33:04 2008 UTC (17 years, 4 months ago) by ajacoutot
Branch: MAIN
Changes since 1.12: +8 -3 lines
Diff to previous 1.12 (colored)

- always force full file check on fbtab, login.conf, sysctl.conf and
ttys since they are created using helper scripts and comparing CVS Id
would not be accurate

original diff from sthen@
man page tweak from jmc@

ok sthen@ jdixon@ jmc@ naddy@

Revision 1.12 / (download) - annotate - [select for diffs], Tue Jun 10 00:36:46 2008 UTC (17 years, 4 months ago) by pyr
Branch: MAIN
Changes since 1.11: +7 -3 lines
Diff to previous 1.11 (colored)

Additionnal checks on the file names supplied for -s and -x.
Based on a diff by ajacoutot@, ok jdixon@ and sthen@ on a previous diff,
ok ajacoutot@.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jun 9 23:57:58 2008 UTC (17 years, 4 months ago) by ajacoutot
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

- add a sanity check on tarballs name to ensure we're not feeding
sysmerge with unrelated sets

ok sthen@ pyr@ jdixon@

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jun 8 21:54:25 2008 UTC (17 years, 4 months ago) by ajacoutot
Branch: MAIN
Changes since 1.9: +6 -1 lines
Diff to previous 1.9 (colored)

- remove sendmail cf files leftover after make in src

issue reported by jmc@
ok pyr@ jdixon@

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jun 8 21:51:25 2008 UTC (17 years, 4 months ago) by ajacoutot
Branch: MAIN
Changes since 1.8: +6 -4 lines
Diff to previous 1.8 (colored)

- enhance output for 80 columns wide terminals

ok pyr@

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jun 1 15:07:00 2008 UTC (17 years, 4 months ago) by ajacoutot
Branch: MAIN
Changes since 1.7: +4 -4 lines
Diff to previous 1.7 (colored)

- make it possible to merge files from xetcXX only

man page bits by jmc@
suggested by an ok jdixon@ merdely@

Revision 1.7 / (download) - annotate - [select for diffs], Wed May 14 15:31:41 2008 UTC (17 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

- fix new directory creation by using the correct variable;
spotted by merdely@ while trying to populate /var/www from scratch

ok merdely@

Revision 1.6 / (download) - annotate - [select for diffs], Wed May 14 07:48:36 2008 UTC (17 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.5: +39 -34 lines
Diff to previous 1.5 (colored)

- add a non-interactive mode to sysmerge ('-b')
- yesno is only used once

man page consulting jmc@ ;)
ok laurent@ pyr@

Revision 1.5 / (download) - annotate - [select for diffs], Wed Apr 30 20:15:55 2008 UTC (17 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.4: +74 -54 lines
Diff to previous 1.4 (colored)

* add xetcXX.tgz support to sysmerge and handle binary files
* update man page accordingly
* several cleanups in the process:
- smaller sendmail configuration files diff check
- remove a condition that would always evaluate to true
- define AUTOMODE to a value we can reuse later
- tell user when installing a file automatically
- better check for src directory validity
- remove full PATH to some commands to be consistent

testing from several
man pages bits ok jmc@
"go ahead" jasper@, ok sthen@ pyr@

Revision 1.4 / (download) - annotate - [select for diffs], Wed Apr 23 20:39:00 2008 UTC (17 years, 5 months ago) by ajacoutot
Branch: MAIN
Changes since 1.3: +4 -3 lines
Diff to previous 1.3 (colored)

- clarify copyright / license

discussed with deraadt@ millert@
wording from millert@

Revision 1.3 / (download) - annotate - [select for diffs], Wed Apr 23 16:50:33 2008 UTC (17 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +3 -9 lines
Diff to previous 1.2 (colored)

usage is only used once; ok millert

Revision 1.2 / (download) - annotate - [select for diffs], Wed Apr 23 16:39:40 2008 UTC (17 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.1: +243 -244 lines
Diff to previous 1.1 (colored)

Re-indent code
Print usage to stderr not stdout
Remove an unneeded check for TEMPROOT
OK and last piece courtesy of ajacoutot@

Revision 1.1 / (download) - annotate - [select for diffs], Tue Apr 22 20:53:16 2008 UTC (17 years, 5 months ago) by ajacoutot
Branch: MAIN

Welcome sysmerge(8), a mergemaster-based utility to help you update
configuration files after upgrading to a new release or snapshot.
The "sysmerge" name was chosen by weingart@

Lots of inputs from deraadt@ jmc@ millert@ krw@ and several, thank you!
Man page enhancements by jmc@
Testings from at least okan@ landry@ gilles@ pyr@ merdely@

Still a _work-in-progress_, not connected to the build.

"fine with me" krw@, "get it in" deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.