OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.49 / (download) - annotate - [select for diffs], Thu Oct 12 12:31:15 2023 UTC (7 months, 2 weeks ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.48: +1 -2 lines
Diff to previous 1.48 (colored)

Remove default sets answer

The autoinstall(8) response file contains only non-defaults, except for
        Set name(s)? (or 'abort' or 'done') [done] done
which is the hardcoded default since 2009.

Added in 2019 r1.23 "Let sysupgrade(8) create auto_upgrade.conf file [...]"
with all others, remove the exception.

OK florian

Revision 1.48 / (download) - annotate - [select for diffs], Wed Jun 8 09:03:11 2022 UTC (23 months, 3 weeks ago) by mglocker
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.47: +4 -3 lines
Diff to previous 1.47 (colored)

Add a new option which allows to set an alternative base-directory to
download the installation files to.  This is helpful if the default
base-directory /home isn't available for writing, i.e. when using auto
mounted home directories.

Discussed with and input received from
florian@, jmc@, sthen@, schwarze@, and ajacoutot@.

OK florian@, jmc@, sthen@

Revision 1.47 / (download) - annotate - [select for diffs], Thu Jun 2 07:44:18 2022 UTC (2 years ago) by florian
Branch: MAIN
Changes since 1.46: +4 -2 lines
Diff to previous 1.46 (colored)

When running sysupgrade on -stable move to the next release, not
-current.
Found the hard way by & OK sthen

Revision 1.46 / (download) - annotate - [select for diffs], Thu Mar 3 10:12:08 2022 UTC (2 years, 3 months ago) by sdk
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.45: +10 -4 lines
Diff to previous 1.45 (colored)

Pick correct firmware directory. Read the target kernel version and use
the release directory for everything except -current.

OK afresh1@

Revision 1.45 / (download) - annotate - [select for diffs], Fri Feb 11 12:58:18 2022 UTC (2 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

It's fw_update's job to say what went wrong.
input jca
OK kmos sthen deraadt kn

Revision 1.44 / (download) - annotate - [select for diffs], Thu Oct 22 07:19:42 2020 UTC (3 years, 7 months ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

ug_err() was renamed to err() in r1.41.  A new ug_err call was added in
r1.42 by accident (that diff was written before the renaming was done).

From Mikolaj Kucharski

Revision 1.43 / (download) - annotate - [select for diffs], Wed Oct 21 10:28:49 2020 UTC (3 years, 7 months ago) by kn
Branch: MAIN
Changes since 1.42: +4 -2 lines
Diff to previous 1.42 (colored)

Specify version with fw_update(1)

sysupgrade(8) calls fw_update(1) without specifying a path, so
running on pre-6.8 snapshot and upgrading to 6.8 release with "-r"
will update firmware packages to snapshots.

Spotted by sthen
OK sthen
"looks good" deraadt

Revision 1.42 / (download) - annotate - [select for diffs], Thu Oct 8 14:35:20 2020 UTC (3 years, 7 months ago) by kn
Branch: MAIN
Changes since 1.41: +3 -1 lines
Diff to previous 1.41 (colored)

Fail on invalid installurl

Validate the URL's protocol identifier to avoid passing bogus arguments to
ftp(1) which otherwise might drop into the "ftp> " prompt instead of causing
sysupgrade(8) to exit non-zero.

Code taken from syspatch(8) as advised by ajacoutot.

Feedback jca
Feedback OK naddy

Revision 1.41 / (download) - annotate - [select for diffs], Thu Oct 8 14:26:34 2020 UTC (3 years, 7 months ago) by kn
Branch: MAIN
Changes since 1.40: +9 -7 lines
Diff to previous 1.40 (colored)

Print usage to stderr, print error messages in errx(3) fashion

While here, rename sg_err()/ug_err() to just err() and sync code between
syspatch(8) and sysupgrade(8).

Feedback OK naddy

Revision 1.40 / (download) - annotate - [select for diffs], Sat Sep 5 16:52:25 2020 UTC (3 years, 8 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored)

Use SETSDIR consistently.
From Alex Holst, thanks!
OK kn

Revision 1.39 / (download) - annotate - [select for diffs], Sat Jul 4 18:30:46 2020 UTC (3 years, 10 months ago) by ajacoutot
Branch: MAIN
Changes since 1.38: +1 -4 lines
Diff to previous 1.38 (colored)

Our old ksh(1) bug where eval()uating a || compound list would terminate the
shell has been fixed by benno@; remove workaround.

ok naddy@

Revision 1.38 / (download) - annotate - [select for diffs], Wed Jun 17 16:29:02 2020 UTC (3 years, 11 months ago) by florian
Branch: MAIN
Changes since 1.37: +1 -3 lines
Diff to previous 1.37 (colored)

We are no longer using the "keep" file as a flag.
Pointed out by Martin Vahlensieck, thanks!

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jan 26 22:08:36 2020 UTC (4 years, 4 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.36: +2 -1 lines
Diff to previous 1.36 (colored)

Log the old kernel version before doing the upgrade. Makes it easier
to figure out what version you were tunning before the upgrade when
you hit a bug/problem after the upgrade.
ok sthen@

Revision 1.36 / (download) - annotate - [select for diffs], Sun Dec 1 10:30:37 2019 UTC (4 years, 6 months ago) by ajacoutot
Branch: MAIN
Changes since 1.35: +2 -13 lines
Diff to previous 1.35 (colored)

Simplify sets directory check and creation (/home/_syspatch).
It can now be a symlink.

ok naddy@ solene@ kn@

Revision 1.35 / (download) - annotate - [select for diffs], Sun Nov 24 14:05:39 2019 UTC (4 years, 6 months ago) by florian
Branch: MAIN
Changes since 1.34: +1 -2 lines
Diff to previous 1.34 (colored)

revert previous, has not been thought through

Revision 1.34 / (download) - annotate - [select for diffs], Sun Nov 24 11:15:04 2019 UTC (4 years, 6 months ago) by florian
Branch: MAIN
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored)

Show the build date of the (about to be) fetched snapshot / release.
OK phessler, pamela, jung, benno

Revision 1.25.2.2 / (download) - annotate - [select for diffs], Thu Nov 14 18:21:42 2019 UTC (4 years, 6 months ago) by bluhm
Branch: OPENBSD_6_5
Changes since 1.25.2.1: +4 -1 lines
Diff to previous 1.25.2.1 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored)

Opportunisticly run fw_update before rebooting to run the upgrade.
Warn if it fails, but allow the upgrade to continue for now.
discussed with many, refinements by naddy@ sthen@
from beck@ benno@; OK deraadt@

OpenBSD 6.5 errata 016

Revision 1.25.4.1 / (download) - annotate - [select for diffs], Thu Nov 14 18:19:25 2019 UTC (4 years, 6 months ago) by bluhm
Branch: OPENBSD_6_6
Changes since 1.25: +4 -1 lines
Diff to previous 1.25 (colored) next main 1.26 (colored)

Opportunisticly run fw_update before rebooting to run the upgrade.
Warn if it fails, but allow the upgrade to continue for now.
discussed with many, refinements by naddy@ sthen@
from beck@ benno@; OK deraadt@

OpenBSD 6.6 errata 005

Revision 1.33 / (download) - annotate - [select for diffs], Tue Nov 12 08:19:11 2019 UTC (4 years, 6 months ago) by sthen
Branch: MAIN
Changes since 1.32: +2 -4 lines
Diff to previous 1.32 (colored)

use the default URL when running fw_update, we can't guarantee that pkg_add will
be able to cope with packages from the next OpenBSD release - firmware packages
are occasionally updated on the release branch post-release.

this should handle most situations - the corner-case is an old snapshot upgrading
to a new snapshot across some types of pkg_add change, but as fw_update is usually
not mandatory this is usually good enough.

ok beck deraadt

Revision 1.32 / (download) - annotate - [select for diffs], Mon Nov 11 18:26:52 2019 UTC (4 years, 6 months ago) by sthen
Branch: MAIN
Changes since 1.31: +2 -1 lines
Diff to previous 1.31 (colored)

print the URL when sysupgrade fetches new sets, allowing time for a quick ^C
if it's going to the wrong place/dir. ok deraadt@

Revision 1.31 / (download) - annotate - [select for diffs], Sun Nov 10 21:11:01 2019 UTC (4 years, 6 months ago) by beck
Branch: MAIN
Changes since 1.30: +6 -1 lines
Diff to previous 1.30 (colored)

Opportunisticly run fw_update before rebooting to run the upgrade.

Warn if it fails, but allow the upgrade to continue for now.

discussed with many, refinements by naddy@ sthen@

"commit something" deraadt@

Revision 1.30 / (download) - annotate - [select for diffs], Sun Nov 3 18:22:45 2019 UTC (4 years, 6 months ago) by florian
Branch: MAIN
Changes since 1.29: +6 -2 lines
Diff to previous 1.29 (colored)

Our version numbers go
m.n-beta -> m.n
not
m.n-beta -> m.n + 0.1
Handle this correctly for the -r case to stick to a release after
beta.
OK sthen

Revision 1.29 / (download) - annotate - [select for diffs], Sat Oct 26 04:04:20 2019 UTC (4 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

use ftp -N option; ok jca

Revision 1.28 / (download) - annotate - [select for diffs], Sun Oct 20 09:10:43 2019 UTC (4 years, 7 months ago) by ajacoutot
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

Tweak and sync comment.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Oct 19 13:14:23 2019 UTC (4 years, 7 months ago) by tb
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

Determine the OS version in a way that won't break after 9.9.
Do it the same way in all three copies of the code.

Based on a patch from Chris Waddey.
with & ok ajacoutot

Revision 1.26 / (download) - annotate - [select for diffs], Mon Oct 14 06:58:53 2019 UTC (4 years, 7 months ago) by ajacoutot
Branch: MAIN
Changes since 1.25: +4 -1 lines
Diff to previous 1.25 (colored)

unpriv(): propagate error code to the caller instead of failing hard.
This will allow reacting on failure.

ok florian@

Revision 1.25.2.1 / (download) - annotate - [select for diffs], Wed Oct 2 17:18:14 2019 UTC (4 years, 8 months ago) by benno
Branch: OPENBSD_6_5
Changes since 1.25: +1 -1 lines
Diff to previous 1.25 (colored)

Add the sysupgrade utility, that can be used to upgrade a system to the
next release or a new snapshot. Backported from the upcoming 6.6 release.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Sep 28 17:30:07 2019 UTC (4 years, 8 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE
Branch point for: OPENBSD_6_6, OPENBSD_6_5
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (colored)

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

ok deraadt@ tb@ millert@

Revision 1.24 / (download) - annotate - [select for diffs], Wed Sep 25 14:42:52 2019 UTC (4 years, 8 months ago) by florian
Branch: MAIN
Changes since 1.23: +8 -1 lines
Diff to previous 1.23 (colored)

    Let sysupgrade(8) handle cleanup of downloaded sets by filling in
    /etc/rc.firsttime in preparation of moving the functionality out of
    install.sub.
OK deraadt

Revision 1.23 / (download) - annotate - [select for diffs], Tue Sep 24 15:21:26 2019 UTC (4 years, 8 months ago) by florian
Branch: MAIN
Changes since 1.22: +8 -1 lines
Diff to previous 1.22 (colored)

Let sysupgrade(8) create auto_upgrade.conf file in preparation of
moving the functionality out of install.sub.
OK deraadt

Revision 1.22 / (download) - annotate - [select for diffs], Fri Jun 21 16:50:26 2019 UTC (4 years, 11 months ago) by florian
Branch: MAIN
Changes since 1.21: +3 -4 lines
Diff to previous 1.21 (colored)

Try harder to have a complete /bsd.upgrade on disk.
Adapted from recent changes to the KARL infrastructure.
OK deraadt, sthen

Revision 1.21 / (download) - annotate - [select for diffs], Tue May 14 14:27:49 2019 UTC (5 years ago) by ajacoutot
Branch: MAIN
Changes since 1.20: +12 -24 lines
Diff to previous 1.20 (colored)

Revert my recent sysupgrade changes; it broke unattended upgrades for
espie@. Need to look deeper.

Revision 1.20 / (download) - annotate - [select for diffs], Mon May 13 02:25:16 2019 UTC (5 years ago) by ajacoutot
Branch: MAIN
Changes since 1.19: +25 -13 lines
Diff to previous 1.19 (colored)

Use the same heuristic as the installer to find a proper prefetch area for the
sets instead of hardcoding /home. This leads the way to a knob for manually
choosing a sets directory if we want that.

Create /auto_upgrade.conf that will get picked up by the installer for the
unattended upgrade mode.

Similar inputs from naddy@ and kn@
ok florian@ kmos@ kn@

Revision 1.19 / (download) - annotate - [select for diffs], Fri May 10 01:29:14 2019 UTC (5 years ago) by naddy
Branch: MAIN
Changes since 1.18: +7 -4 lines
Diff to previous 1.18 (colored)

tweak verbosity; ok ccardenas@

Revision 1.18 / (download) - annotate - [select for diffs], Thu May 9 21:09:37 2019 UTC (5 years ago) by naddy
Branch: MAIN
Changes since 1.17: +7 -3 lines
Diff to previous 1.17 (colored)

Add a -k flag to keep the files in /home/_sysupgrade, since they
will be deleted after the upgrade by default.  ok kn@

Revision 1.17 / (download) - annotate - [select for diffs], Thu May 9 21:06:09 2019 UTC (5 years ago) by naddy
Branch: MAIN
Changes since 1.16: +7 -7 lines
Diff to previous 1.16 (colored)

sysupgrade already verifies all sets, so eliminate redundant
verification by the installer:

Verification is triggered by the presence of SHA256.sig.
In sysupgrade, remove SHA256.sig once the signature has been verified.
Compare SHA256 against a stored copy from the previous install/upgrade.

In the installer, stash away a copy of SHA256 and move that code
into install_files() where the sets are actually processed.
Confirm in the response file that we want to proceed without
verifying the sets.

ok florian@ tj@

Revision 1.16 / (download) - annotate - [select for diffs], Wed May 8 15:06:20 2019 UTC (5 years ago) by naddy
Branch: MAIN
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored)

It is not an error condition if no new snapshot is available.
ok jasper@ florian@

Revision 1.15 / (download) - annotate - [select for diffs], Sat May 4 20:18:39 2019 UTC (5 years ago) by naddy
Branch: MAIN
Changes since 1.14: +7 -4 lines
Diff to previous 1.14 (colored)

oops, fix unpriv() argument handling; from install.sub

Revision 1.14 / (download) - annotate - [select for diffs], Sat May 4 19:48:55 2019 UTC (5 years ago) by naddy
Branch: MAIN
Changes since 1.13: +9 -6 lines
Diff to previous 1.13 (colored)

* For "unpriv -f file", chown file back to root once the command finishes,
  like install.sub does.
* Only verify the signature once.
* Only checksum the newly downloaded files.

ok florian@

Revision 1.13 / (download) - annotate - [select for diffs], Sat May 4 11:53:40 2019 UTC (5 years ago) by ajacoutot
Branch: MAIN
Changes since 1.12: +3 -1 lines
Diff to previous 1.12 (colored)

Require root to run (still allow access to usage).

ok naddy@ florian@

Revision 1.12 / (download) - annotate - [select for diffs], Fri May 3 15:18:14 2019 UTC (5 years, 1 month ago) by florian
Branch: MAIN
Changes since 1.11: +15 -8 lines
Diff to previous 1.11 (colored)

Rename -c to -s since the correct term is snapshot, not current. Also
implement -r for symetry reasons to force an upgrade to the next
release.
suggested by & OK deraadt, OK benno, kmos

Revision 1.11 / (download) - annotate - [select for diffs], Fri May 3 14:48:13 2019 UTC (5 years, 1 month ago) by ian
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

typo in previous

Revision 1.10 / (download) - annotate - [select for diffs], Fri May 3 14:44:19 2019 UTC (5 years, 1 month ago) by ian
Branch: MAIN
Changes since 1.9: +10 -4 lines
Diff to previous 1.9 (colored)

sysupgrade gains -n for no-reboot option. Accidentally duplicated benno's diff, who
graciously OK'd mine. Improvement from naddy; polishing and OKs from kn and ingo.

Revision 1.9 / (download) - annotate - [select for diffs], Fri May 3 13:04:40 2019 UTC (5 years, 1 month ago) by florian
Branch: MAIN
Changes since 1.8: +13 -7 lines
Diff to previous 1.8 (colored)

Only fetch and upgrade if a new snapshot is available.
Based on a diff by Marco Bonetti (sid77 AT slackware.it).

discussed with deraadt@, OK kn

Revision 1.8 / (download) - annotate - [select for diffs], Mon Apr 29 22:27:39 2019 UTC (5 years, 1 month ago) by ian
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Install upgrade kernel with ln -f, as per kernel build. ok florian@

Revision 1.7 / (download) - annotate - [select for diffs], Sun Apr 28 07:21:28 2019 UTC (5 years, 1 month ago) by florian
Branch: MAIN
Changes since 1.6: +4 -2 lines
Diff to previous 1.6 (colored)

Quiet down signify, seeing all the OKs scroll by is not helping.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Apr 26 21:52:39 2019 UTC (5 years, 1 month ago) by ajacoutot
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

Fix default MIRROR.

ok florian@

Revision 1.5 / (download) - annotate - [select for diffs], Fri Apr 26 17:28:10 2019 UTC (5 years, 1 month ago) by naddy
Branch: MAIN
Changes since 1.4: +8 -7 lines
Diff to previous 1.4 (colored)

do not re-verify the signature for each file when checking the old files,
sha256 is enough; ok florian@

Revision 1.4 / (download) - annotate - [select for diffs], Fri Apr 26 14:57:35 2019 UTC (5 years, 1 month ago) by naddy
Branch: MAIN
Changes since 1.3: +11 -6 lines
Diff to previous 1.3 (colored)

Use a different approach to determine the appropriate signing key:
Read the first line "untrusted comment ..." from SHA256.sig.  Use the
key named there if it corresponds to the current or next OS version.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Apr 26 06:13:48 2019 UTC (5 years, 1 month ago) by florian
Branch: MAIN
Changes since 1.2: +12 -3 lines
Diff to previous 1.2 (colored)

check owner and permission of download directory

Revision 1.2 / (download) - annotate - [select for diffs], Thu Apr 25 22:12:11 2019 UTC (5 years, 1 month ago) by naddy
Branch: MAIN
Changes since 1.1: +4 -3 lines
Diff to previous 1.1 (colored)

don't be overly specific in set selection and don't use an undefined
variable

Revision 1.1 / (download) - annotate - [select for diffs], Thu Apr 25 20:22:52 2019 UTC (5 years, 1 month ago) by florian
Branch: MAIN

Add sysupgrade(8) a tool to upgrade OpenBSD to the next release or a
new snapshot.
Cargo culted from bits and pieces of a script originally posted
by naddy@ to misc, install.sub and syspatch(8)
with & OK 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.