From 0f783a1e6982c7f6b10389a6d4ed494901949bed Mon Sep 17 00:00:00 2001 From: "Claude (noether)" Date: Fri, 8 May 2026 15:08:16 +0200 Subject: [PATCH] danctnix-besser PKGBUILD polish: drop-in replacement metadata + DTB strip fix (1) Add `provides=("linux-pinetab2=$pkgver-$pkgrel")` and `conflicts=(linux-pinetab2)` so pacman -U cleanly replaces the upstream linux-pinetab2 package without needing --overwrite for the shared rk3566-pinetab2-*.dtb files. Verified end-to-end on ohm 2026-05-08: with these declarations pacman would refuse coexistence (matching the actual filesystem reality - both packages own the same DTB paths) and accept upgrade when removing the old package. Keeping `replaces=(wireguard-arch)` from upstream linux-pinetab2. Not adding linux-pinetab2 to replaces= since the soft-upstream intent is opt-in sidegrade, not auto-install on -Syu. (2) Replace the bash for-loop DTB strip with find -delete. The original loop silently no-op'd during the makepkg-fakeroot package() phase: build verification of the published .pkg.tar.zst showed 236 DTBs, 234 of them unrelated boards (px30-*, rk3308-*, rk3328-*, rk3399-*, etc). Root cause not pinned down (suspected nullglob or cwd interaction), but find -mindepth 1 -maxdepth 1 ! -name 'rk3566-pinetab2-*' -delete is robust to that environment and correctly identifies 2 to keep / 234 to remove on the existing pkgdir. Net pkg size impact: ~5 MB reduction (most non-pinetab2 DTBs are 20-40 KB). No kernel rebuild required - PKGBUILD-only metadata + package() logic change. Will take effect on the next makepkg run. Co-Authored-By: Claude Opus 4.7 (1M context) --- danctnix-besser-pkgbuild/kernel/PKGBUILD | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/danctnix-besser-pkgbuild/kernel/PKGBUILD b/danctnix-besser-pkgbuild/kernel/PKGBUILD index 76e2492b3..64eb1c01a 100644 --- a/danctnix-besser-pkgbuild/kernel/PKGBUILD +++ b/danctnix-besser-pkgbuild/kernel/PKGBUILD @@ -103,7 +103,9 @@ _package() { provides=( KSMBD-MODULE WIREGUARD-MODULE + "linux-pinetab2=$pkgver-$pkgrel" ) + conflicts=(linux-pinetab2) replaces=( wireguard-arch ) @@ -126,12 +128,12 @@ _package() { echo "Installing device trees..." make INSTALL_DTBS_PATH="$pkgdir/boot/dtbs" dtbs_install - # Removing unnecessary device tree - for dtb in "$pkgdir"/boot/dtbs/rockchip/*; do - [[ $dtb = *-pinetab2-* ]] && continue - echo "Removing $(basename "$dtb")" - rm "$dtb" - done + # Removing unnecessary device trees (keep only pinetab2 variants). + # Use find -delete instead of a bash for-loop: the previous for-loop + # silently no-op'd in the makepkg environment, leaving 234 unrelated + # board DTBs in the package. find is robust to nullglob/cwd quirks. + find "$pkgdir"/boot/dtbs/rockchip/ -mindepth 1 -maxdepth 1 -type f \ + ! -name 'rk3566-pinetab2-*' -delete # remove build link rm "$modulesdir"/build