From f01490cac7cc6ccaeb0d67f5a2f688e6ec98c678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Wed, 14 Apr 2021 19:26:58 +0700 Subject: [PATCH] grub-btrfs: remove root requirement --- srcpkgs/grub-btrfs/patches/no-root-please.patch | 15 +++++++++++++++ srcpkgs/grub-btrfs/template | 1 + 2 files changed, 16 insertions(+) create mode 100644 srcpkgs/grub-btrfs/patches/no-root-please.patch 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