Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/pam_u2f/files/
Date: Mon, 07 Jun 2021 08:00:51
Message-Id: 1623052827.3450c682f3907dc37bff7b08e2cc771747b8508f.soap@gentoo
1 commit: 3450c682f3907dc37bff7b08e2cc771747b8508f
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 7 08:00:27 2021 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 7 08:00:27 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3450c682
7
8 sys-auth/pam_u2f: upstream patch for DESTDIR fixes
9
10 Closes: https://bugs.gentoo.org/793797
11 Package-Manager: Portage-3.0.19, Repoman-3.0.3
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 .../pam_u2f/files/pam_u2f-1.1.1-fix-Makefile.patch | 31 +++++++++++++++++++---
15 1 file changed, 28 insertions(+), 3 deletions(-)
16
17 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
18 index 5ce95aa3b91..68a9ae74100 100644
19 --- a/sys-auth/pam_u2f/files/pam_u2f-1.1.1-fix-Makefile.patch
20 +++ b/sys-auth/pam_u2f/files/pam_u2f-1.1.1-fix-Makefile.patch
21 @@ -1,13 +1,38 @@
22 +From 1475ea762deee61f4be8c33a0915039ff1fc9b5c Mon Sep 17 00:00:00 2001
23 +From: David Seifert <soap@g.o>
24 +Date: Fri, 4 Jun 2021 12:09:30 +0200
25 +Subject: [PATCH] respect `DESTDIR`
26 +
27 +* Without `DESTDIR`, `make install` will try to delete files from the live filesystem.
28 +* Also, do not change `libdir`, create a separate prefix for the pam plugin instead.
29 +---
30 + Makefile.am | 9 ++++-----
31 + 1 file changed, 4 insertions(+), 5 deletions(-)
32 +
33 +diff --git a/Makefile.am b/Makefile.am
34 +index 896c3ff..560145a 100644
35 --- a/Makefile.am
36 +++ b/Makefile.am
37 -@@ -43,8 +43,8 @@
38 +@@ -11,9 +11,8 @@ ACLOCAL_AMFLAGS = -I m4
39 + AM_CFLAGS = $(CWFLAGS) $(CSFLAGS)
40 + AM_CPPFLAGS = $(LIBFIDO2_CFLAGS) $(LIBCRYPTO_CFLAGS)
41 +
42 +-libdir = $(PAMDIR)
43 +-
44 +-lib_LTLIBRARIES = pam_u2f.la
45 ++pampluginexecdir = $(PAMDIR)
46 ++pampluginexec_LTLIBRARIES = pam_u2f.la
47 +
48 + pam_u2f_la_SOURCES = pam-u2f.c
49 + pam_u2f_la_SOURCES += util.c util.h
50 +@@ -43,8 +42,8 @@ endif
51 # Release
52
53 install-exec-hook:
54 - rm -f $(PAMDIR)/pam_u2f.la
55 - chmod -f 644 $(PAMDIR)/pam_u2f.so || true
56 -+ rm -f $(DESTDIR)/$(PAMDIR)/pam_u2f.la
57 -+ chmod -f 644 $(DESTDIR)/$(PAMDIR)/pam_u2f.so || true
58 ++ rm -f $(DESTDIR)$(pampluginexecdir)/pam_u2f.la
59 ++ chmod -f 644 $(DESTDIR)$(pampluginexecdir)/pam_u2f.so || true
60
61 indent:
62 clang-format -i *.c *.h pamu2fcfg/*.c pamu2fcfg/*.h