diff options
author | Markus Schanz | 2017-12-31 00:54:55 +0100 |
---|---|---|
committer | Markus Schanz | 2017-12-31 01:28:11 +0100 |
commit | e50ce5ebdecae990efb103fc1d8836eba455d7a9 (patch) | |
tree | 7b3595028c1dcbdcf1b0bc76d6ab8c4323027a8f | |
download | aur-e50ce5ebdecae990efb103fc1d8836eba455d7a9.tar.gz |
Initial release
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | 50_bootbackup.hook | 14 | ||||
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | LICENSE | 21 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rw-r--r-- | systemd-boot.hook | 9 |
6 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..92a555a1c3fa --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = pacman-boot-backup-hook + pkgdesc = Pacman hook that uses rsync to backup the /boot directory prior to upgrades of the linux or systemd package. + pkgver = 1.0 + pkgrel = 1 + changelog = CHANGELOG + arch = any + license = custom:MIT + depends = rsync + source = LICENSE + source = 50_bootbackup.hook + md5sums = ac9ac34b11dd5a53d096a734ab677479 + md5sums = e2a3034dbae1e27ed782c8b44cbd7f72 + +pkgname = pacman-boot-backup-hook + diff --git a/50_bootbackup.hook b/50_bootbackup.hook new file mode 100644 index 000000000000..bb0fe452b2a9 --- /dev/null +++ b/50_bootbackup.hook @@ -0,0 +1,14 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Operation = Remove +Type = Package +Target = linux +Target = systemd + +[Action] +Description = Backing up /boot... +When = PreTransaction +Depends = rsync +Exec = /usr/bin/rsync -azq --delete /boot/ /.bootbackup +AbortOnFail diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 000000000000..19a988a1e95c --- /dev/null +++ b/CHANGELOG @@ -0,0 +1 @@ +v1.0: Initial release diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..34bcf6490dd8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Markus Schanz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3268a9102f2e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: Markus Schanz <coksnuss@googlemail.com> +pkgname=pacman-boot-backup-hook +pkgver=1.0 +pkgrel=1 +pkgdesc="Pacman hook that uses rsync to backup the /boot directory prior to upgrades of the linux or systemd package." +arch=('any') +license=('custom:MIT') +changelog=CHANGELOG +depends=('rsync') + +source=('LICENSE' + '50_bootbackup.hook') +md5sums=('ac9ac34b11dd5a53d096a734ab677479' + 'e2a3034dbae1e27ed782c8b44cbd7f72') + +package() { + install -m 0755 -d $pkgdir/usr/share/licenses/$pkgname + install -m 0755 -d $pkgdir/usr/share/libalpm/hooks + + install -m 0644 $srcdir/LICENSE $pkgdir/usr/share/licenses/$pkgname + install -m 0644 $srcdir/50_bootbackup.hook $pkgdir/usr/share/libalpm/hooks +} diff --git a/systemd-boot.hook b/systemd-boot.hook new file mode 100644 index 000000000000..4c3dbab6de17 --- /dev/null +++ b/systemd-boot.hook @@ -0,0 +1,9 @@ +[Trigger] +Type = Package +Operation = Upgrade +Target = systemd + +[Action] +Description = Upgrading systemd-boot... +When = PostTransaction +Exec = /usr/bin/bootctl update |