summaryrefslogtreecommitdiff
path: root/usr.sbin/syspatch
AgeCommit message (Collapse)Author
2019-01-21Don't return 1 if we rollback and there's no installed patches.Antoine Jacoutot
2019-01-21Warn user to reboot the machine when a new kernel is installed and let him knowAntoine Jacoutot
where to look on the local machine for errata (/var/syspatch) so one can decide if a reboot is needed. ok Theos (tb@ deraadt@)
2019-01-16Exit for real as soon as we update ourself.Antoine Jacoutot
2018-10-28Properly handle symlinks.Antoine Jacoutot
2018-10-16Stop trying to remove /bsd.syspatch. That's ancient stuff that we don'tAntoine Jacoutot
do anymore.
2018-05-09Remove empty syspatch dir if we fail to extract.Antoine Jacoutot
2018-04-26Don't hide stderr; starting with 6.4 there will always be an SHA256.sig.Antoine Jacoutot
2018-03-10Allow fetching syspatches from ftp.Antoine Jacoutot
from Andrew Marks ok deraadt@
2017-12-29Prevent syspatch from running and throw an error out if reorder_kernel isAntoine Jacoutot
running. This is to prevent syspatch from installing new kernel object files while reordering is in progress (typically after an install/upgrade on slow machines). req. by and OK sthen@
2017-11-09/usr/share/compile -> /usr/share/relink/kernelAntoine Jacoutot
from semarie I meant to do that at p2k17 but totally forgot...
2017-10-13Don't check for mirror availability but directly try to fetch SHA256.sig. ThatAntoine Jacoutot
check was not safe (index needed to be enabled, top URL may not be available etc.). based on a comment from tj@
2017-10-12Simplify and explicitely state when we cannot access our mirror.Antoine Jacoutot
2017-10-12Loosen up installurl(5) check: it's OK to have a trailing slash.Antoine Jacoutot
2017-10-12Better error if installurl points to a local directory.Antoine Jacoutot
2017-10-12Don't return 1 if the syspatch release directory does not exist; it justAntoine Jacoutot
means that no patch is available yet.
2017-08-29While failing to relink the kernel is not fatal to syspatch, we still needAntoine Jacoutot
to warn the user and return a proper error code.
2017-08-29Fix logic to not error out.Antoine Jacoutot
2017-08-28Inform the user when we are relinking the kernel.Antoine Jacoutot
2017-08-22Add support for KARL:Antoine Jacoutot
- only extract the according /usr/share/compile/GENERIC{,.MP} - if a "kernel" patch was properly installed (or rolled back), run /usr/libexec/reorder_kernel _once_ just before exiting - don't backup /bsd anymore, reorder_kernel already does it for us - drop 2 now unused functions: install_kernel() and sp_cleanup() While it appears to work fine after some quick testing, it should still be considered WIP.
2017-08-17Set the automatically generated device variables as local to preventAntoine Jacoutot
accumulating the size of all patches we are applying. from "trondd" on tech@
2017-08-17Fix checkfs() when running an MP kernel.Antoine Jacoutot
2017-08-17Honor TMPDIR if it is set to prevent erroring in some setup.Antoine Jacoutot
reported by Igor Falcomata
2017-08-02Only run mtree if we install a patch.Antoine Jacoutot
2017-08-01For the kernel binpatches, only deal with /bsd. On MP machines we do haveAntoine Jacoutot
/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.
2017-07-30If syspatch is updating itself, exit after installing the new syspatch toAntoine Jacoutot
stop installing further patches and warn the user he needs to run it again (so that it'll run with the new code).
2017-07-30`-R' requires root privileges.Antoine Jacoutot
2017-07-22Cleanup previous release patches and backup kernel _before_ applying newAntoine Jacoutot
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).
2017-07-04Detect upfront whether we have a particular set installed and if not, do *not*Antoine Jacoutot
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@
2017-06-09Drop uneeded return from rollback_patch().Antoine Jacoutot
2017-06-09/etc/mtree/BSD.x11.dist is part of base, not X; so check forAntoine Jacoutot
/var/sysmerge/xetc.tgz to detect whether we have the x sets installed.
2017-05-27When running from cron, the ftp(1) progress bar is not shown; that's all fineAntoine Jacoutot
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).
2017-05-26Don't try to revert the same patch in a loop if it returns an error.Antoine Jacoutot
2017-05-26Fix logic.Antoine Jacoutot
2017-05-24Preserve the modification time when install(1)ing.Antoine Jacoutot
2017-05-24Don't fill up /tmp when installing or reverting multiple patches at once.Antoine Jacoutot
2017-05-24Also trap INT when reverting a patch.Antoine Jacoutot
2017-05-23Hide sh(1) error message when /etc/installurl does not exist; we alreadyAntoine Jacoutot
error out with a message in this case since _MIRROR is empty. reported by tedu@
2017-05-23Only install /bsd.mp on SP machines if it's already there (a defaultAntoine Jacoutot
installation will not have it).
2017-05-23Shorten varname.Antoine Jacoutot
2017-05-18Don't pass `-m' to ftp(1). Instead let isatty() decide whether we display theAntoine Jacoutot
progress bar or not for better cron(1)/logger(1) output. req. by henning@
2017-05-17Tweak remote fs check.Antoine Jacoutot
2017-05-12Make sure we have a valid URL in /etc/installurl to prevent ending up stuck inAntoine Jacoutot
ftp(1) interactive mode. reported by and OK sthen@
2017-05-09Document that patches are cumulative and as such it is not possible to installAntoine Jacoutot
only a subset of them. with input from jmc@
2017-05-08Only test the mirror if it's remote (and not a local directory).Antoine Jacoutot
2017-05-05Add a `-R' switch that reverts all patches.Antoine Jacoutot
prodded by deraadt@ knobs sorting input jmc@ ok sthen@
2017-05-04Expand comment and bump copyright while here.Antoine Jacoutot
2017-05-03Output explicit error messages for:Antoine Jacoutot
- 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.
2017-05-03- Don't make an empty syspatch/ repo an error; having no available patchAntoine Jacoutot
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.
2017-04-30Tweak error message when running on an unsupported release.Antoine Jacoutot
2017-04-08use .Em for emphasis, not .PaIngo Schwarze