diff --git a/srcpkgs/grub-btrfs/patches/no-root-please.patch b/srcpkgs/grub-btrfs/patches/no-root-please.patch new file mode 100644 index 00000000000..4e0a32803fd --- /dev/null +++ b/srcpkgs/grub-btrfs/patches/no-root-please.patch @@ -0,0 +1,15 @@ +Index: grub-btrfs-4.9/Makefile +=================================================================== +--- grub-btrfs-4.9.orig/Makefile ++++ grub-btrfs-4.9/Makefile +@@ -9,10 +9,6 @@ LIB_DIR = $(DESTDIR)$(PREFIX)/lib + .PHONY: install uninstall help + + install: +- @if test "$(shell id -u)" != 0; then \ +- echo "You are not root, run this target as root please."; \ +- exit 1; \ +- fi + @install -Dm755 -t "$(DESTDIR)/etc/grub.d/" 41_snapshots-btrfs + @install -Dm644 -t "$(DESTDIR)/etc/default/grub-btrfs/" config + @install -Dm644 -t "$(LIB_DIR)/systemd/system/" grub-btrfs.service diff --git a/srcpkgs/grub-btrfs/template b/srcpkgs/grub-btrfs/template index 0e646c9c3f8..2527806d699 100644 --- a/srcpkgs/grub-btrfs/template +++ b/srcpkgs/grub-btrfs/template @@ -10,6 +10,7 @@ license="GPL-3.0-or-later" homepage="https://github.com/Antynea/grub-btrfs" distfiles="https://github.com/Antynea/grub-btrfs/archive/v${version}.tar.gz" checksum=62461133c697643e98a608239773f500edee3e4055c5729fef6639d1cd610243 +patch_args=-Np1 post_install() { rm -rf -- "${DESTDIR}"/usr/lib/systemd