Date: Saturday, August 21, 2021 @ 10:42:18 Author: shibumi Revision: 1004136
archrelease: copy trunk to community-any Added: kernel-modules-hook/repos/community-any/ kernel-modules-hook/repos/community-any/10-linux-modules-post.hook (from rev 1004135, kernel-modules-hook/trunk/10-linux-modules-post.hook) kernel-modules-hook/repos/community-any/10-linux-modules-pre.hook (from rev 1004135, kernel-modules-hook/trunk/10-linux-modules-pre.hook) kernel-modules-hook/repos/community-any/PKGBUILD (from rev 1004135, kernel-modules-hook/trunk/PKGBUILD) kernel-modules-hook/repos/community-any/UNLICENSE (from rev 1004135, kernel-modules-hook/trunk/UNLICENSE) kernel-modules-hook/repos/community-any/linux-modules-cleanup.conf (from rev 1004135, kernel-modules-hook/trunk/linux-modules-cleanup.conf) kernel-modules-hook/repos/community-any/linux-modules-cleanup.service (from rev 1004135, kernel-modules-hook/trunk/linux-modules-cleanup.service) -------------------------------+ 10-linux-modules-post.hook | 12 ++++++++++++ 10-linux-modules-pre.hook | 11 +++++++++++ PKGBUILD | 28 ++++++++++++++++++++++++++++ UNLICENSE | 24 ++++++++++++++++++++++++ linux-modules-cleanup.conf | 1 + linux-modules-cleanup.service | 9 +++++++++ 6 files changed, 85 insertions(+) Copied: kernel-modules-hook/repos/community-any/10-linux-modules-post.hook (from rev 1004135, kernel-modules-hook/trunk/10-linux-modules-post.hook) =================================================================== --- community-any/10-linux-modules-post.hook (rev 0) +++ community-any/10-linux-modules-post.hook 2021-08-21 10:42:18 UTC (rev 1004136) @@ -0,0 +1,12 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Type = Path +Target = usr/lib/modules/*/vmlinuz + +[Action] +Description = Restoring Linux kernel modules... +When = PostTransaction +Depends = coreutils +Depends = rsync +Exec = /bin/sh -xc 'KVER="${KVER:-$(uname -r)}"; if test -e "/usr/lib/modules/backup/${KVER}"; then rsync -AHXal --ignore-existing "/usr/lib/modules/backup/${KVER}" /usr/lib/modules/; fi; rm -rf /usr/lib/modules/backup' Copied: kernel-modules-hook/repos/community-any/10-linux-modules-pre.hook (from rev 1004135, kernel-modules-hook/trunk/10-linux-modules-pre.hook) =================================================================== --- community-any/10-linux-modules-pre.hook (rev 0) +++ community-any/10-linux-modules-pre.hook 2021-08-21 10:42:18 UTC (rev 1004136) @@ -0,0 +1,11 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Type = Path +Target = usr/lib/modules/*/vmlinuz + +[Action] +Description = Saving Linux kernel modules... +When = PreTransaction +Depends = rsync +Exec = /bin/sh -c 'KVER="${KVER:-$(uname -r)}"; if test -e "/usr/lib/modules/${KVER}"; then rsync -AHXal --delete-after "/usr/lib/modules/${KVER}" /usr/lib/modules/backup/; fi' Copied: kernel-modules-hook/repos/community-any/PKGBUILD (from rev 1004135, kernel-modules-hook/trunk/PKGBUILD) =================================================================== --- community-any/PKGBUILD (rev 0) +++ community-any/PKGBUILD 2021-08-21 10:42:18 UTC (rev 1004136) @@ -0,0 +1,28 @@ +# Maintainer: Christian Rebischke <chris.rebisc...@archlinux.org> +# Contributor: Artoria Pendragon <saber-n...@ya.ru> +pkgname=kernel-modules-hook +pkgver=0.1.7 +pkgrel=2 +pkgdesc="Keeps your system fully functional after a kernel upgrade" +arch=('any') +url="https://github.com/saber-nyan/kernel-modules-hook" +license=('UNLICENSE') +depends=('rsync') +source=("linux-modules-cleanup.conf" + "linux-modules-cleanup.service" + "10-linux-modules-post.hook" + "10-linux-modules-pre.hook" + "UNLICENSE") +sha256sums=('4169b44c297ddb7aad2220c6eba7c7942e3396f92528c59617955ab5560cb4cf' + '5d947290ef8c94b33c79c531e5615f4c9bea38e7649092d34af3bf0af5b1ca24' + '900502d030e925fca6188b9448fbaf6562d6e23cd5c50938cdf00522825f76c2' + 'f7ea2947c3fbe1510b3ea5cc5793b8197f0718dcb12daea3da9b27b3cf1c4116' + '7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c') + +package() { + install -Dm644 'linux-modules-cleanup.conf' "${pkgdir}/usr/lib/tmpfiles.d/linux-modules-cleanup.conf" + install -Dm644 'linux-modules-cleanup.service' "${pkgdir}/usr/lib/systemd/system/linux-modules-cleanup.service" + install -Dm644 '10-linux-modules-post.hook' "${pkgdir}/usr/share/libalpm/hooks/10-linux-modules-post.hook" + install -Dm644 '10-linux-modules-pre.hook' "${pkgdir}/usr/share/libalpm/hooks/10-linux-modules-pre.hook" + install -Dm644 'UNLICENSE' "${pkgdir}/usr/share/licenses/${pkgname}/UNLICENSE" +} Copied: kernel-modules-hook/repos/community-any/UNLICENSE (from rev 1004135, kernel-modules-hook/trunk/UNLICENSE) =================================================================== --- community-any/UNLICENSE (rev 0) +++ community-any/UNLICENSE 2021-08-21 10:42:18 UTC (rev 1004136) @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +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 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. + +For more information, please refer to <http://unlicense.org/> Copied: kernel-modules-hook/repos/community-any/linux-modules-cleanup.conf (from rev 1004135, kernel-modules-hook/trunk/linux-modules-cleanup.conf) =================================================================== --- community-any/linux-modules-cleanup.conf (rev 0) +++ community-any/linux-modules-cleanup.conf 2021-08-21 10:42:18 UTC (rev 1004136) @@ -0,0 +1 @@ +R! /usr/lib/modules/.old/* - - - 4w Copied: kernel-modules-hook/repos/community-any/linux-modules-cleanup.service (from rev 1004135, kernel-modules-hook/trunk/linux-modules-cleanup.service) =================================================================== --- community-any/linux-modules-cleanup.service (rev 0) +++ community-any/linux-modules-cleanup.service 2021-08-21 10:42:18 UTC (rev 1004136) @@ -0,0 +1,9 @@ +[Unit] +Description=Clean up modules from old kernels + +[Service] +Type=oneshot +ExecStart=/bin/bash -exc 'for i in /usr/lib/modules/[0-9]*; do if [[ $${i##*/} = \'%v\' ]] || pacman -Qo "$${i}"; then continue; fi; rsync -AHXal "$${i}" /usr/lib/modules/.old/; rm -rf "$${i}"; done' + +[Install] +WantedBy=basic.target