summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2021-06-07 10:00:27 +0200
committerDavid Seifert <soap@gentoo.org>2021-06-07 10:00:27 +0200
commit3450c682f3907dc37bff7b08e2cc771747b8508f (patch)
treed562c2943e8d72711c815d77c5975812055b939f /sys-auth
parentmedia-plugins/x42-avldrums: updated deps (diff)
downloadgentoo-3450c682f3907dc37bff7b08e2cc771747b8508f.tar.gz
gentoo-3450c682f3907dc37bff7b08e2cc771747b8508f.tar.bz2
gentoo-3450c682f3907dc37bff7b08e2cc771747b8508f.zip
sys-auth/pam_u2f: upstream patch for DESTDIR fixes
Closes: https://bugs.gentoo.org/793797 Package-Manager: Portage-3.0.19, Repoman-3.0.3 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sys-auth')
-rw-r--r--sys-auth/pam_u2f/files/pam_u2f-1.1.1-fix-Makefile.patch31
1 files changed, 28 insertions, 3 deletions
diff --git a/sys-auth/pam_u2f/files/pam_u2f-1.1.1-fix-Makefile.patch b/sys-auth/pam_u2f/files/pam_u2f-1.1.1-fix-Makefile.patch
index 5ce95aa3b91b..68a9ae741004 100644
--- a/sys-auth/pam_u2f/files/pam_u2f-1.1.1-fix-Makefile.patch
+++ b/sys-auth/pam_u2f/files/pam_u2f-1.1.1-fix-Makefile.patch
@@ -1,13 +1,38 @@
+From 1475ea762deee61f4be8c33a0915039ff1fc9b5c Mon Sep 17 00:00:00 2001
+From: David Seifert <soap@gentoo.org>
+Date: Fri, 4 Jun 2021 12:09:30 +0200
+Subject: [PATCH] respect `DESTDIR`
+
+* Without `DESTDIR`, `make install` will try to delete files from the live filesystem.
+* Also, do not change `libdir`, create a separate prefix for the pam plugin instead.
+---
+ Makefile.am | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 896c3ff..560145a 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -43,8 +43,8 @@
+@@ -11,9 +11,8 @@ ACLOCAL_AMFLAGS = -I m4
+ AM_CFLAGS = $(CWFLAGS) $(CSFLAGS)
+ AM_CPPFLAGS = $(LIBFIDO2_CFLAGS) $(LIBCRYPTO_CFLAGS)
+
+-libdir = $(PAMDIR)
+-
+-lib_LTLIBRARIES = pam_u2f.la
++pampluginexecdir = $(PAMDIR)
++pampluginexec_LTLIBRARIES = pam_u2f.la
+
+ pam_u2f_la_SOURCES = pam-u2f.c
+ pam_u2f_la_SOURCES += util.c util.h
+@@ -43,8 +42,8 @@ endif
# Release
install-exec-hook:
- rm -f $(PAMDIR)/pam_u2f.la
- chmod -f 644 $(PAMDIR)/pam_u2f.so || true
-+ rm -f $(DESTDIR)/$(PAMDIR)/pam_u2f.la
-+ chmod -f 644 $(DESTDIR)/$(PAMDIR)/pam_u2f.so || true
++ rm -f $(DESTDIR)$(pampluginexecdir)/pam_u2f.la
++ chmod -f 644 $(DESTDIR)$(pampluginexecdir)/pam_u2f.so || true
indent:
clang-format -i *.c *.h pamu2fcfg/*.c pamu2fcfg/*.h