diff --git a/Changelog.md b/Changelog.md index c41ad4c..88b264b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,7 @@ +Version [0.7.4] - 20240823 + - add urlwatch examples + - improve kernel rebuild list / add archive option -a + Version [0.7.3] - 20240426 - fix post_install() detection of lkrg kernel module - update linux-hardened.patch for kernel 6.8 diff --git a/scripts/abk b/scripts/abk index b445c26..903697d 100755 --- a/scripts/abk +++ b/scripts/abk @@ -54,6 +54,7 @@ Usage: $script [OPTIONS] [ -b ] : build [ kernel-name ] [ -i ] : install [ kernel-name / AUR pkgname ] [ -r ] : rebuild [ kernel-name ] + [ -a ] : archive [ kernel-name ] [ -y ] : yes ( assume YES answers during build stage ) [ -c ] : clean [ /path/to/directory ] ( quickly with rsync ) [ -s ] : clean makepkg source dir selectively ( $(parse_makepkg SRCDEST) ) @@ -82,6 +83,10 @@ To rebuild a previous kernel PKGBUILD that abk archived in \$BUILD_DIR/kernel-ve ---------------------------------------------------------------------------------------- $script -r linux-hardened +To archive & version (but not build) your current \$BUILD_DIR/kernel-name: +------------------------------------------------------------------------- + $script -a linux-hardened + Utilities: -------------------------- $script -c /path/to/somewhere @@ -420,7 +425,7 @@ update_kernel() { # backup old config if [ "$archive" != "nobackup" ]; then - archive_config "$KERNEL" + archive_config fi # clean old config @@ -501,8 +506,9 @@ rebuild_kernel() { tmp=$(mktemp) + # find output in date order kern_list=$(find "$BUILD_DIR" -maxdepth 1 -type f -regextype posix-extended \ - -regex ".*$KERNEL\-[0-9\.]+.*.tar.xz" | sort) + -regex ".*$KERNEL\-[0-9\.]+.*.tar.xz" -printf "%T+ %p\n" | sort | awk '{print $2}') # print kernel archive menu if [ -n "$kern_list" ]; then @@ -535,7 +541,6 @@ rebuild_kernel() { echo # unpack archived PKGBUILD & run a build - archive_config tar -xJf "$kernel_rebuild" time build_kernel } @@ -684,6 +689,10 @@ patch_pkgbuild() { if patch -s -p0 --dry-run < "$patch_file"; then msg "$(patch -p0 < "$patch_file")" + + # backup new patched config + archive_config + msg2 "Ready to run: $0 -b $KERNEL "; read -r ans case "$ans" in @@ -800,7 +809,7 @@ get_options() { # check build dir & editors check_config - while getopts ":u:b:i:r:c:w:hsloy" opt + while getopts ":u:b:i:r:a:c:w:hsloy" opt do if [ -n "${OPTARG}" ]; then @@ -814,6 +823,7 @@ get_options() { b) KERNEL=${OPTARG}; check_kernel build; time build_kernel ;; i) KERNEL=${OPTARG}; check_kernel install; install_kernel ;; r) KERNEL=${OPTARG}; check_kernel rebuild; rebuild_kernel ;; + a) KERNEL=${OPTARG}; check_kernel rebuild; archive_config ;; y) AUTOMATED='Y' ;; c) check_args "$opt" dir "$arg" ; clean_dir "$arg" sources ;; s) clean_sources ;; diff --git a/urlwatch/README.md b/urlwatch/README.md new file mode 100644 index 0000000..9c7a678 --- /dev/null +++ b/urlwatch/README.md @@ -0,0 +1,4 @@ +# urlwatch kernel alerts # + +* example files to go in ~/.config/urlwatch for urlwatch to give alerts on kernel changes with a cron example +* [https://urlwatch.readthedocs.io](https://urlwatch.readthedocs.io) diff --git a/urlwatch/urls.yaml b/urlwatch/urls.yaml new file mode 100644 index 0000000..a2ea8f3 --- /dev/null +++ b/urlwatch/urls.yaml @@ -0,0 +1,26 @@ +# ~/.config/urlwatch/urlwatch.yaml # +#################################### +--- +name: "linux-lts" +url: "https://archlinux.org/packages/core/x86_64/linux-lts/" +filter: + - element-by-tag: title +--- + +name: "linux-hardened" +url: "https://www.archlinux.org/packages/extra/x86_64/linux-hardened/" +filter: + - element-by-tag: title +--- + +name: "linux-zen" +url: "https://www.archlinux.org/packages/extra/x86_64/linux-zen/" +filter: + - element-by-tag: title +--- + +name: "linux" +url: "https://archlinux.org/packages/core/x86_64/linux/" +filter: + - element-by-tag: title +--- diff --git a/urlwatch/urlwatch.yaml b/urlwatch/urlwatch.yaml new file mode 100644 index 0000000..c3c07a3 --- /dev/null +++ b/urlwatch/urlwatch.yaml @@ -0,0 +1,23 @@ +# ~/.config/urlwatch/urlwatch.yaml # +#################################### + +display: + empty-diff: true + error: false + new: true + unchanged: false +job_defaults: + all: {} + browser: {} + shell: {} + url: + ignore_connection_errors: true +report: + + ... + +# various alert options email / xmpp / others +# https://urlwatch.readthedocs.io/en/latest/reporters.html +# +# crontab -e (check kernels every 2 hours) +# 0 0-23/2 * * * /usr/bin/urlwatch