summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syspatch (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* For the kernel binpatches, only deal with /bsd. On MP machines we do haveajacoutot2017-08-011-27/+17
| | | | | | | | | | /bsd.sp by default for now but it maybe de-selected during the installation and the opposite is true for SP machines (MP is *not* installed but may end up being selected for installation). Having to deal with this is too error prone. This makes things much simpler and less confusing. If you have a machine that goes from MP to SP or vice-versa, just `syspatch -R && syspatch' so the proper kernel is updated.
* If syspatch is updating itself, exit after installing the new syspatch toajacoutot2017-07-301-2/+6
| | | | | stop installing further patches and warn the user he needs to run it again (so that it'll run with the new code).
* `-R' requires root privileges.ajacoutot2017-07-301-2/+2
|
* Cleanup previous release patches and backup kernel _before_ applying newajacoutot2017-07-221-7/+7
| | | | | | | patches. This will mitigate possible /var overflow (previous behavior was to clean up _after_ applying all patches which means we would have rollback patches from the previous and current release before the previous ones got cleaned).
* Detect upfront whether we have a particular set installed and if not, do *not*ajacoutot2017-07-041-8/+10
| | | | | | | | | | list a matching syspatch as available. This will allow to skip the syspatches for the X sets for example if we don't have them installed. If we do install these sets a posteriori, then syspatch *will* list the X syspatches if there are any. req. by many ok robert@
* Drop uneeded return from rollback_patch().ajacoutot2017-06-091-2/+2
|
* /etc/mtree/BSD.x11.dist is part of base, not X; so check forajacoutot2017-06-091-6/+5
| | | | /var/sysmerge/xetc.tgz to detect whether we have the x sets installed.
* When running from cron, the ftp(1) progress bar is not shown; that's all fineajacoutot2017-05-271-4/+5
| | | | | | and dandy except that if there's fetch/verify error, we may not know which syspatch caused this. So if we're not associated with a terminal, just echo what ftp -VD would (without the progress bar).
* Don't try to revert the same patch in a loop if it returns an error.ajacoutot2017-05-261-2/+2
|
* Fix logic.ajacoutot2017-05-261-2/+3
|
* Preserve the modification time when install(1)ing.ajacoutot2017-05-241-3/+3
|
* Don't fill up /tmp when installing or reverting multiple patches at once.ajacoutot2017-05-241-2/+5
|
* Also trap INT when reverting a patch.ajacoutot2017-05-241-1/+3
|
* Hide sh(1) error message when /etc/installurl does not exist; we alreadyajacoutot2017-05-231-2/+2
| | | | | | error out with a message in this case since _MIRROR is empty. reported by tedu@
* Only install /bsd.mp on SP machines if it's already there (a defaultajacoutot2017-05-231-4/+5
| | | | installation will not have it).
* Shorten varname.ajacoutot2017-05-231-13/+13
|
* Don't pass `-m' to ftp(1). Instead let isatty() decide whether we display theajacoutot2017-05-181-2/+2
| | | | | | progress bar or not for better cron(1)/logger(1) output. req. by henning@
* Tweak remote fs check.ajacoutot2017-05-171-4/+5
|
* Make sure we have a valid URL in /etc/installurl to prevent ending up stuck inajacoutot2017-05-121-2/+4
| | | | | | ftp(1) interactive mode. reported by and OK sthen@
* Document that patches are cumulative and as such it is not possible to installajacoutot2017-05-091-2/+4
| | | | | | only a subset of them. with input from jmc@
* Only test the mirror if it's remote (and not a local directory).ajacoutot2017-05-081-2/+3
|
* Add a `-R' switch that reverts all patches.ajacoutot2017-05-052-11/+14
| | | | | | prodded by deraadt@ knobs sorting input jmc@ ok sthen@
* Expand comment and bump copyright while here.ajacoutot2017-05-041-3/+3
|
* Output explicit error messages for:ajacoutot2017-05-031-5/+10
| | | | | | | | | - trying to install files mounted on a remote FS (diskless clients etc.) - read-only FS - not enough space on FS These were all properly catched before (syspatch would refuse to do anything) but the error message was a bit cryptic.
* - Don't make an empty syspatch/ repo an error; having no available patchajacoutot2017-05-031-4/+9
| | | | | | | | is perfectly legit. - Abort immediately if we cannot reach our mirror server listed in installurl. - Return a proper error code when running without arguments and we cannot list the available patches.
* Tweak error message when running on an unsupported release.ajacoutot2017-04-301-2/+2
|
* use .Em for emphasis, not .Paschwarze2017-04-081-3/+3
|
* Also remove non syspatch hidden files/dirs.ajacoutot2017-04-041-2/+2
|
* Be quiet in case /var/syspatch/ is empty and that there's no remote sigajacoutot2017-03-311-2/+3
| | | | | | file yet (i.e. when we are in release mode but not released yet). ok deraadt@
* Reverse output when installing a patch; it's more logical (first get, thenajacoutot2017-02-131-2/+2
| | | | | | | | | | install). While here, match the installer output a bit more: Get/Verify ... Installing ... prodded by a mail exchange with "bytevolcano" discussed with robert@ sthen@ ok robert@
* Ox on its own line;jmc2017-02-071-2/+3
|
* Add installurl to FILES and SEE ALSO.ajacoutot2017-02-071-2/+5
|
* Drop empty line.ajacoutot2017-01-301-2/+1
|
* Remove unused _REL variablerpe2017-01-261-2/+2
| | | | OK aja@
* Move setting _OSrev to immediately after verifying _KERNV and exitrpe2017-01-261-3/+4
| | | | | | early if _OSrev is empty. OK aja@
* No need to escape '.' in shell patterns - it has no special meaning.rpe2017-01-261-2/+2
| | | | OK aja@
* Spacing and use arithmetic testrpe2017-01-261-3/+3
| | | | OK aja@
* Simplify: bundle stripcom().ajacoutot2017-01-191-18/+10
|
* /etc/mirror.conf -> /etc/installurlajacoutot2017-01-191-4/+4
| | | | discussed with deraadt@ beck@ rpe@
* ls_missing(): as a precaution, don't output anything on stdout when runningajacoutot2017-01-191-7/+20
| | | | | | | | ftp(1) to prevent corrupting the patch list; we are already running in silent mode but better safe than sorry. Read the syspatch mirror base URL using stripcom() /etc/mirror.conf for the time being; discussed with deraadt@ and rpe@ -- naming is not set in stone yet.
* Use the _syspatch user.ajacoutot2017-01-191-3/+2
|
* Drop the _FETCH variable. It's useless, we are using ftp(1) specific optionsajacoutot2017-01-191-4/+3
| | | | | that are different on the two invocations; it's not like we'll support using wget|curl to fetch syspatches anyway.
* Match what the installer does:ajacoutot2017-01-111-11/+8
| | | | | | - verify SHA256.sig and create SHA256 out of it - get the list of syspatches from the verified SHA256 - use sha256 against the verified SHA256 to checksum the syspatches
* Drop FTP_KEEPALIVE, it's unused.ajacoutot2017-01-111-2/+2
|
* The syspatch test repo can now be accessed over https.ajacoutot2016-12-311-2/+2
|
* Make it possible to install patches even if we don't have all sets installedajacoutot2016-12-082-12/+17
| | | | | | (e.g. no x sets); in this case, syspatch will skip the patch *but* it will still be listed as available. This will allow applying the patch in case sets are installed later on.
* Cleanup syspatch directories that do not contain a tarball; it means itajacoutot2016-12-071-2/+2
| | | | was not applied properly.
* Missed in previous.ajacoutot2016-12-061-2/+2
|
* Better matching and remove a useless use of sort(1).ajacoutot2016-12-061-17/+12
|
* Catch mtree(8) error; it's only run when applying patches and we alreadyajacoutot2016-12-061-4/+3
| | | | check for read-only... in this case.