Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcap/files/
Date: Wed, 31 Oct 2018 08:06:22
Message-Id: 1540973171.6bbcce8beb3962af0fa4d7c96f8e218d50bf7e75.polynomial-c@gentoo
1 commit: 6bbcce8beb3962af0fa4d7c96f8e218d50bf7e75
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Sun Sep 30 12:58:00 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 31 08:06:11 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6bbcce8b
7
8 sys-libs/libcap: remove unused patches
9
10 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 ....20-ignore-RAISE_SETFCAP-install-failures.patch | 29 ----
14 .../files/libcap-2.24-build-system-fixes.patch | 163 ---------------------
15 .../libcap/files/libcap-2.24-setcap-errno.patch | 45 ------
16 3 files changed, 237 deletions(-)
17
18 diff --git a/sys-libs/libcap/files/libcap-2.20-ignore-RAISE_SETFCAP-install-failures.patch b/sys-libs/libcap/files/libcap-2.20-ignore-RAISE_SETFCAP-install-failures.patch
19 deleted file mode 100644
20 index 1bc4d63ebb1..00000000000
21 --- a/sys-libs/libcap/files/libcap-2.20-ignore-RAISE_SETFCAP-install-failures.patch
22 +++ /dev/null
23 @@ -1,29 +0,0 @@
24 -From f2020ee4ee4b2f245637c77e81d62ab6d1db3c6c Mon Sep 17 00:00:00 2001
25 -From: Mike Frysinger <vapier@g.o>
26 -Date: Tue, 25 Jan 2011 15:52:31 -0500
27 -Subject: [PATCH] ignore RAISE_SETFCAP install failures
28 -
29 -While the new RAISE_SETFCAP feature is nifty, its failure to run (often
30 -due to the fs not supporting it) shouldn't impair the default install.
31 -
32 -Signed-off-by: Mike Frysinger <vapier@g.o>
33 ----
34 - progs/Makefile | 2 +-
35 - 1 files changed, 1 insertions(+), 1 deletions(-)
36 -
37 -diff --git a/progs/Makefile b/progs/Makefile
38 -index c261f57..9e1a84d 100644
39 ---- a/progs/Makefile
40 -+++ b/progs/Makefile
41 -@@ -30,7 +30,7 @@ install: all
42 - install -m 0755 $$p $(SBINDIR) ; \
43 - done
44 - ifeq ($(RAISE_SETFCAP),yes)
45 -- $(SBINDIR)/setcap cap_setfcap=i $(SBINDIR)/setcap
46 -+ -$(SBINDIR)/setcap cap_setfcap=i $(SBINDIR)/setcap
47 - endif
48 -
49 - clean:
50 ---
51 -1.7.4.rc2
52 -
53
54 diff --git a/sys-libs/libcap/files/libcap-2.24-build-system-fixes.patch b/sys-libs/libcap/files/libcap-2.24-build-system-fixes.patch
55 deleted file mode 100644
56 index 64393275bb8..00000000000
57 --- a/sys-libs/libcap/files/libcap-2.24-build-system-fixes.patch
58 +++ /dev/null
59 @@ -1,163 +0,0 @@
60 -From 0485ff3e7f62a331aa4f1e8ec4c2fdcee400e324 Mon Sep 17 00:00:00 2001
61 -From: Mike Frysinger <vapier@g.o>
62 -Date: Sun, 16 Nov 2008 09:10:31 -0500
63 -Subject: [PATCH] build system fixes
64 -
65 -This touches up the homebrewed build system to work much better "out of the
66 -box" for people. Specifically:
67 - - allow toolchain vars to be set via environment
68 - - CC / BUILD_CC / AR / RANLIB
69 - - CFLAGS / CPPFLAGS / LDFLAGS
70 - - split CPPFLAGS out of CFLAGS
71 - - break -fPIC out of global CFLAGS and only use where needed
72 - - use LDLIBS for libraries, not LDFLAGS
73 -
74 -Signed-off-by: Mike Frysinger <vapier@g.o>
75 ----
76 - Make.Rules | 26 ++++++++++++++------------
77 - libcap/Makefile | 11 ++++++-----
78 - pam_cap/Makefile | 8 +++++---
79 - progs/Makefile | 2 +-
80 - 4 files changed, 26 insertions(+), 21 deletions(-)
81 -
82 -diff --git a/Make.Rules b/Make.Rules
83 -index 18b7cf7..5364c46 100644
84 ---- a/Make.Rules
85 -+++ b/Make.Rules
86 -@@ -45,27 +45,29 @@ MINOR=24
87 -
88 - # Compilation specifics
89 -
90 --KERNEL_HEADERS := $(topdir)/libcap/include/uapi
91 --IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
92 --
93 --CC := gcc
94 --CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
95 --BUILD_CC := $(CC)
96 --BUILD_CFLAGS := $(CFLAGS) $(IPATH)
97 --AR := ar
98 --RANLIB := ranlib
99 -+CC ?= gcc
100 -+CFLAGS ?= -O2
101 -+BUILD_CC ?= $(CC)
102 -+BUILD_CFLAGS ?= $(CFLAGS)
103 -+AR ?= ar
104 -+RANLIB ?= ranlib
105 - DEBUG = -g #-DDEBUG
106 - WARNINGS=-Wall -Wwrite-strings \
107 - -Wpointer-arith -Wcast-qual -Wcast-align \
108 - -Wstrict-prototypes -Wmissing-prototypes \
109 - -Wnested-externs -Winline -Wshadow
110 - LD=$(CC) -Wl,-x -shared
111 --LDFLAGS := #-g
112 -+LDFLAGS ?= #-g
113 -
114 --SYSTEM_HEADERS = /usr/include
115 -+KERNEL_HEADERS = $(topdir)/libcap/include/uapi
116 -+LIBCAP_CPPFLAGS = -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
117 -+LIBCAP_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
118 -+CPPFLAGS += $(LIBCAP_CPPFLAGS)
119 -+BUILD_CPPFLAGS += $(LIBCAP_CPPFLAGS)
120 - INCS=$(topdir)/libcap/include/sys/capability.h
121 - LDFLAGS += -L$(topdir)/libcap
122 --CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
123 -+CPPFLAGS += -Dlinux
124 -+CFLAGS += $(WARNINGS) $(DEBUG)
125 - PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
126 - INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
127 - DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
128 -diff --git a/libcap/Makefile b/libcap/Makefile
129 -index 0ccd2e7..6b446ea 100644
130 ---- a/libcap/Makefile
131 -+++ b/libcap/Makefile
132 -@@ -16,7 +16,7 @@ FILES=cap_alloc cap_proc cap_extint cap_flag cap_text
133 - # no support).
134 - ifeq ($(LIBATTR),yes)
135 - FILES += cap_file
136 --LDFLAGS += -lattr
137 -+LDLIBS += -lattr
138 - DEPS = -lattr
139 - endif
140 -
141 -@@ -25,6 +25,7 @@ OBJS=$(addsuffix .o, $(FILES))
142 - MAJLIBNAME=$(LIBNAME).$(VERSION)
143 - MINLIBNAME=$(MAJLIBNAME).$(MINOR)
144 - GPERF_OUTPUT = _caps_output.gperf
145 -+CFLAGS += -fPIC
146 -
147 - all: $(MINLIBNAME) $(STALIBNAME) libcap.pc
148 -
149 -@@ -43,7 +44,7 @@ libcap.pc: libcap.pc.in
150 - $< >$@
151 -
152 - _makenames: _makenames.c cap_names.list.h
153 -- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
154 -+ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
155 -
156 - cap_names.h: _makenames
157 - ./_makenames > cap_names.h
158 -@@ -60,15 +61,15 @@ $(STALIBNAME): $(OBJS)
159 - $(RANLIB) $@
160 -
161 - $(MINLIBNAME): $(OBJS)
162 -- $(LD) $(CFLAGS) $(LDFLAGS) -Wl,-soname,$(MAJLIBNAME) -o $@ $^
163 -+ $(LD) $(CFLAGS) $(LDFLAGS) -Wl,-soname,$(MAJLIBNAME) -o $@ $^ $(LDLIBS)
164 - ln -sf $(MINLIBNAME) $(MAJLIBNAME)
165 - ln -sf $(MAJLIBNAME) $(LIBNAME)
166 -
167 - %.o: %.c $(INCLS)
168 -- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
169 -+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
170 -
171 - cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS)
172 -- $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
173 -+ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
174 -
175 - install: all
176 - mkdir -p -m 0755 $(FAKEROOT)$(INCDIR)/sys
177 -diff --git a/pam_cap/Makefile b/pam_cap/Makefile
178 -index cc32fb6..6f07b6b 100644
179 ---- a/pam_cap/Makefile
180 -+++ b/pam_cap/Makefile
181 -@@ -9,6 +9,8 @@ include ../Make.Rules
182 - # written (and you know why it fails), email me and explain why. Thanks!
183 - LDLIBS += -L../libcap -lcap
184 -
185 -+CFLAGS += -fPIC
186 -+
187 - all: pam_cap.so
188 - $(MAKE) testcompile
189 -
190 -@@ -17,13 +19,13 @@ install: all
191 - install -m 0755 pam_cap.so $(FAKEROOT)$(LIBDIR)/security
192 -
193 - pam_cap.so: pam_cap.o
194 -- $(LD) $(LDFLAGS) -o pam_cap.so $< $(LDLIBS)
195 -+ $(LD) $(CFLAGS) $(LDFLAGS) -o pam_cap.so $< $(LDLIBS)
196 -
197 - pam_cap.o: pam_cap.c
198 -- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
199 -+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
200 -
201 - testcompile: test.c pam_cap.o
202 -- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ -lpam -ldl $(LDLIBS)
203 -+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $+ -lpam -ldl $(LDLIBS)
204 -
205 - clean:
206 - rm -f *.o *.so testcompile *~
207 -diff --git a/progs/Makefile b/progs/Makefile
208 -index 778149e..8f4e2e6 100644
209 ---- a/progs/Makefile
210 -+++ b/progs/Makefile
211 -@@ -22,7 +22,7 @@ $(BUILD): %: %.o
212 - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
213 -
214 - %.o: %.c $(INCS)
215 -- $(CC) $(IPATH) $(CFLAGS) -c $< -o $@
216 -+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
217 -
218 - install: all
219 - mkdir -p -m 0755 $(FAKEROOT)$(SBINDIR)
220 ---
221 -2.4.1
222 -
223
224 diff --git a/sys-libs/libcap/files/libcap-2.24-setcap-errno.patch b/sys-libs/libcap/files/libcap-2.24-setcap-errno.patch
225 deleted file mode 100644
226 index 08513f643e6..00000000000
227 --- a/sys-libs/libcap/files/libcap-2.24-setcap-errno.patch
228 +++ /dev/null
229 @@ -1,45 +0,0 @@
230 -From 62b190c09d5652c58679dffd7f09e4aceb4c7daa Mon Sep 17 00:00:00 2001
231 -From: Mike Frysinger <vapier@g.o>
232 -Date: Mon, 13 Jul 2015 01:59:14 -0400
233 -Subject: [PATCH] setcap: fix errno display
234 -
235 -The commit 056ffb0bd25d91ffbcb83c521fc4d3d9904ec4d4 broke the display of
236 -the final error message because it would do more operations that would
237 -clobber errno. Example:
238 -(libcap-2.22) sudo setcap cap_ipc_lock=ep /proc/filesystems | head -1
239 -Failed to set capabilities on file `/proc/filesystems' (Operation not supported)
240 -(libcap-2.23) sudo setcap cap_ipc_lock=ep /proc/filesystems | head -1
241 -Failed to set capabilities on file `/proc/filesystems' (Invalid argument)
242 -
243 -Save the original errno value and use that for the final display instead.
244 -
245 -URL: https://bugs.gentoo.org/551672
246 -Signed-off-by: Mike Frysinger <vapier@g.o>
247 ----
248 - progs/setcap.c | 3 ++-
249 - 1 file changed, 2 insertions(+), 1 deletion(-)
250 -
251 -diff --git a/progs/setcap.c b/progs/setcap.c
252 -index 83090ae..7304343 100644
253 ---- a/progs/setcap.c
254 -+++ b/progs/setcap.c
255 -@@ -171,6 +171,7 @@ int main(int argc, char **argv)
256 - retval = cap_set_file(*++argv, cap_d);
257 - if (retval != 0) {
258 - int explained = 0;
259 -+ int oerrno = errno;
260 - #ifdef linux
261 - cap_value_t cap;
262 - cap_flag_value_t per_state;
263 -@@ -193,7 +194,7 @@ int main(int argc, char **argv)
264 -
265 - fprintf(stderr,
266 - "Failed to set capabilities on file `%s' (%s)\n",
267 -- argv[0], strerror(errno));
268 -+ argv[0], strerror(oerrno));
269 - if (!explained) {
270 - usage();
271 - }
272 ---
273 -2.4.4
274 -