summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syspatch/syspatch.sh (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix kernel matching installation:ajacoutot2016-12-011-7/+5
| | | | | | | bsd -> /bsd (sp) | /bsd.sp (mp) bsd.mp -> /bsd (mp) | /bsd.mp (sp) issue reported by Ossi Salmi, thanks!
* Simplify:ajacoutot2016-11-301-27/+21
| | | | | | - consistency in integer checks - drop apply_patches(), better call ther actual apply_patch() function from within the script itself
* During early testing, hardcode the syspatch repo to 'syspatch.openbsd.org'ajacoutot2016-11-301-10/+7
| | | | | | which points to ftp.fr. This will change once 6.1 is out. discussed with deraadt@
* Change the hierarchy under /var/syspatch/ so that the output of installed orajacoutot2016-11-301-77/+86
| | | | | | | | | | | | | missing patches matches the official names. e.g. $ doas syspatch -c 015_libssl Add a bit more output on what we are doing. Tighten a few checks and rename some vars. People playing with syspatch on 6.0 should update syspatch.sh asap from current as I will soon remove the temporary quirks glue.
* Remove the backup kernel in rollback_patch() instead of the cleanupajacoutot2016-11-271-8/+7
| | | | | function. Consistent use of install(1).
* Explicitely set umask.ajacoutot2016-11-271-1/+2
|
* Check args.ajacoutot2016-11-251-3/+3
|
* Make sure /var/syspatch/$OSREV is not on a read-only mount-point when doingajacoutot2016-11-221-2/+2
| | | | a rollback.
* Allow passing an explicit return code to sp_err() in case we don't want to exitajacoutot2016-11-221-21/+24
| | | | | | right away. Factorise some common stuff. Be consistent in variables subtitution.
* Use the same basename for the rollback tarball as the original patch.sig.ajacoutot2016-11-211-15/+21
|
* Tweak comment. Reverse cmp logic while here.ajacoutot2016-11-211-3/+3
|
* Re-add the root user checks in the quirks; that part is to be removed soon.ajacoutot2016-11-171-1/+5
|
* Drop priv. to the _pkgfetch (for now) user when running ftp(1) and signify(1).ajacoutot2016-11-171-24/+29
| | | | | | | | | Similar to what the installer does. Listing installed patches and displaying the usage are now the only actions allowed to a non-privileged user. discussed with deraadt@
* Merge comments altogether, it's easier to understand this way.ajacoutot2016-11-161-11/+9
| | | | And drop some duplicate while here.
* If we install a new kernel, add /bsd twice (for size checking) when:ajacoutot2016-11-161-1/+9
| | | | | - we are on an MP system (/bsd.mp does not exist there) - /bsd.syspatchXX is not present (create_rollback will add it)
* /bsd.rollbackXX -> bsd.syspatchXX to make it more obvious where it comes fromajacoutot2016-11-161-11/+14
| | | | | and less prone to conflict. Simplify ls_installed while here.
* checkfs: ignore nonexistent files and extend comment. There's actually no needajacoutot2016-11-151-6/+14
| | | | | | | | | to double the size since files are replaced one by one. create_rollback: create release directory with explicit permissions. ls_installed: create release directory if it does not exist (temporary XXX) for early testers without a 6.1 hier(7); issue reported by Marc Benslahdine
* Double the required size to make sure we have enough space for install(1) safeajacoutot2016-11-151-4/+4
| | | | copy, the rollback tarball and in case we add new files.
* Check for available space before installing a patch.ajacoutot2016-11-141-5/+14
|
* uniq -> sort -uajacoutot2016-11-141-2/+4
|
* Improve the cleanup error handling to make sure the exit code ishalex2016-11-121-3/+3
| | | | | | really preserved. Noticed by, discussed with, and fix approved tb@
* Simplify checkfs() and fix read-only/remote fs detection.ajacoutot2016-11-101-6/+6
|
* Extend mtree(8) comment.ajacoutot2016-11-101-2/+3
|
* Remove redundant check.ajacoutot2016-11-101-2/+2
|
* Create the bsd rollback kernel in create_rollback() (it is contained inajacoutot2016-11-101-5/+5
| | | | | | the rollback tarball anyway but that's impractical if the new bsd does not boot ;-)). While here, make sure /bsd actually exists before saving it.
* syspatch-60-001_foobar -> syspatch60-001_foobar to match base system sets name.ajacoutot2016-11-081-12/+23
| | | | | Should be transparent to the early testers as long as you have the most recent syspatch.sh checkout from cvs(1).
* Few fixes and consistency.ajacoutot2016-11-081-16/+13
|
* Rework the cleanup trap handling using the EXIT trap;halex2016-11-061-7/+7
| | | | | | | | | | | | trap 'cleanup; goes; here' EXIT trap exit HUP INT TERM ERR FOO BAR BAZ This makes sure the cleanup is always done (unless we exec), and preserves the exit code, such as SIGINT => 130. Also trap less signals. Special signals are special. tested and OK ajacoutot@
* Be verbose when PATCH_PATH is not set (that is temporary until we agree onajacoutot2016-11-041-4/+3
| | | | a way to point to a syspatch mirror).
* One more XXX.ajacoutot2016-11-041-1/+2
|
* Zap extra space.ajacoutot2016-11-041-2/+2
|
* Make sure our filesystems are local and not read-only.ajacoutot2016-11-041-4/+18
|
* Use 'rm -f' to remove the rollback tarball if we have an errir; it mayajacoutot2016-11-041-2/+4
| | | | be because we have a read-only /var.
* Missing local.ajacoutot2016-11-031-2/+2
|
* rollback -> revert where it makes sense.ajacoutot2016-11-031-3/+3
|
* XXX match with installed sets (comp, x...)?ajacoutot2016-11-031-1/+2
|
* Hardlinks are properly handled; for the rest, we'll see if we need to careajacoutot2016-11-031-3/+2
| | | | or not (XXX).
* Make sure PATCH_PATH is an URL that ftp(1) can cope with.ajacoutot2016-11-031-5/+2
|
* Merge ls_avail() into ls_missing(), it's only used once.ajacoutot2016-11-031-12/+8
| | | | While here, cope with a missing index.txt or other ftp(1) error.
* Use hw.ncpufound.ajacoutot2016-11-031-3/+2
|
* Simplify for loops; prompted by a comment from rpe@ajacoutot2016-11-031-10/+7
|
* Be verbose when reverting a patch.ajacoutot2016-11-021-1/+2
| | | | committing now to please espie@
* Simplify.ajacoutot2016-11-011-8/+4
|
* Tap SIGINT while install(1)ing so that we can properly rollback and notajacoutot2016-11-011-31/+38
| | | | be left in an inconsistent state.
* Add an XXX.ajacoutot2016-11-011-1/+2
|
* Only run sp_cleanup() when applying or reverting a patch (needs root).ajacoutot2016-11-011-6/+8
|
* Also remove non matching release rollback kernel.ajacoutot2016-11-011-3/+9
| | | | Temporary unhook the cleanup function during tests.
* Add a cleanup function to remove non matching release content fromajacoutot2016-11-011-3/+19
| | | | | | | /var/syspatch and the rollback kernel if all kernel syspatches have been reverted. While here, make sure _RELINT and _REL are declared properly.
* Simplify fetch_and_verify(), no need for a loop here.ajacoutot2016-11-011-11/+11
|
* Add a few error messages so we know where we fail.ajacoutot2016-11-011-10/+15
| | | | | | | | Regular operation is mostly quiet, i.e: Applying syspatch-60-001_cp.tgz 100% |***********************| 65247 00:03 Move trap after we create the temporary directory so that we can remove it on failure and fix a typo in readonly vars.