Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/libcap/files: libcap-2.20-ignore-RAISE_SETFCAP-install-failures.patch libcap-2.20-build-system-fixes.patch
Date: Tue, 25 Jan 2011 21:01:13
Message-Id: 20110125210058.80D9120057@flycatcher.gentoo.org
1 vapier 11/01/25 21:00:58
2
3 Added:
4 libcap-2.20-ignore-RAISE_SETFCAP-install-failures.patch
5 libcap-2.20-build-system-fixes.patch
6 Log:
7 Version bump #352680 by Marc Koschewski.
8
9 (Portage version: 2.2.0_alpha19/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.1 sys-libs/libcap/files/libcap-2.20-ignore-RAISE_SETFCAP-install-failures.patch
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcap/files/libcap-2.20-ignore-RAISE_SETFCAP-install-failures.patch?rev=1.1&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcap/files/libcap-2.20-ignore-RAISE_SETFCAP-install-failures.patch?rev=1.1&content-type=text/plain
16
17 Index: libcap-2.20-ignore-RAISE_SETFCAP-install-failures.patch
18 ===================================================================
19 From f2020ee4ee4b2f245637c77e81d62ab6d1db3c6c Mon Sep 17 00:00:00 2001
20 From: Mike Frysinger <vapier@g.o>
21 Date: Tue, 25 Jan 2011 15:52:31 -0500
22 Subject: [PATCH] ignore RAISE_SETFCAP install failures
23
24 While the new RAISE_SETFCAP feature is nifty, its failure to run (often
25 due to the fs not supporting it) shouldn't impair the default install.
26
27 Signed-off-by: Mike Frysinger <vapier@g.o>
28 ---
29 progs/Makefile | 2 +-
30 1 files changed, 1 insertions(+), 1 deletions(-)
31
32 diff --git a/progs/Makefile b/progs/Makefile
33 index c261f57..9e1a84d 100644
34 --- a/progs/Makefile
35 +++ b/progs/Makefile
36 @@ -30,7 +30,7 @@ install: all
37 install -m 0755 $$p $(SBINDIR) ; \
38 done
39 ifeq ($(RAISE_SETFCAP),yes)
40 - $(SBINDIR)/setcap cap_setfcap=i $(SBINDIR)/setcap
41 + -$(SBINDIR)/setcap cap_setfcap=i $(SBINDIR)/setcap
42 endif
43
44 clean:
45 --
46 1.7.4.rc2
47
48
49
50
51 1.1 sys-libs/libcap/files/libcap-2.20-build-system-fixes.patch
52
53 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcap/files/libcap-2.20-build-system-fixes.patch?rev=1.1&view=markup
54 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcap/files/libcap-2.20-build-system-fixes.patch?rev=1.1&content-type=text/plain
55
56 Index: libcap-2.20-build-system-fixes.patch
57 ===================================================================
58 From bb4491059b315433a421e8fd37286f1a0077fd1e Mon Sep 17 00:00:00 2001
59 From: Mike Frysinger <vapier@g.o>
60 Date: Sun, 16 Nov 2008 09:10:31 -0500
61 Subject: [PATCH] build system fixes
62
63 This touches up the homebrewed build system to work much better "out of the
64 box" for people. Specifically:
65 - allow toolchain vars to be set via environment
66 - CC / BUILD_CC / AR / RANLIB
67 - CFLAGS / CPPFLAGS / LDFLAGS
68 - split CPPFLAGS out of CFLAGS
69 - break -fPIC out of global CFLAGS and only use where needed
70 - use LDLIBS for libraries, not LDFLAGS
71
72 Signed-off-by: Mike Frysinger <vapier@g.o>
73 ---
74 Make.Rules | 25 +++++++++++++------------
75 libcap/Makefile | 11 ++++++-----
76 pam_cap/Makefile | 6 +++---
77 progs/Makefile | 2 +-
78 4 files changed, 23 insertions(+), 21 deletions(-)
79
80 diff --git a/Make.Rules b/Make.Rules
81 index 011aa14..6e432a6 100644
82 --- a/Make.Rules
83 +++ b/Make.Rules
84 @@ -44,27 +44,28 @@ MINOR=19
85
86 # Compilation specifics
87
88 -KERNEL_HEADERS := $(topdir)/libcap/include
89 -IPATH += -fPIC -I$(topdir)/libcap/include -I$(KERNEL_HEADERS)
90 -
91 -CC := gcc
92 -CFLAGS := -O2
93 -BUILD_CC := $(CC)
94 -BUILD_CFLAGS := $(CFLAGS) $(IPATH)
95 -AR := ar
96 -RANLIB := ranlib
97 +CC ?= gcc
98 +CFLAGS ?= -O2
99 +BUILD_CC ?= $(CC)
100 +BUILD_CFLAGS ?= $(CFLAGS)
101 +AR ?= ar
102 +RANLIB ?= ranlib
103 DEBUG = -g #-DDEBUG
104 WARNINGS=-Wall -Wwrite-strings \
105 -Wpointer-arith -Wcast-qual -Wcast-align \
106 -Wstrict-prototypes -Wmissing-prototypes \
107 -Wnested-externs -Winline -Wshadow
108 LD=$(CC) -Wl,-x -shared
109 -LDFLAGS := #-g
110 +LDFLAGS ?= #-g
111
112 -SYSTEM_HEADERS = /usr/include
113 +KERNEL_HEADERS = $(topdir)/libcap/include
114 +LIBCAP_CPPFLAGS = -I$(topdir)/libcap/include -I$(KERNEL_HEADERS)
115 +CPPFLAGS += $(LIBCAP_CPPFLAGS)
116 +BUILD_CPPFLAGS += $(LIBCAP_CPPFLAGS)
117 INCS=$(topdir)/libcap/include/sys/capability.h
118 LDFLAGS += -L$(topdir)/libcap
119 -CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
120 +CPPFLAGS += -Dlinux
121 +CFLAGS += $(WARNINGS) $(DEBUG)
122 PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
123 INDENT := $(shell if [ -n "$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
124 DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
125 diff --git a/libcap/Makefile b/libcap/Makefile
126 index 4762c60..cf99523 100644
127 --- a/libcap/Makefile
128 +++ b/libcap/Makefile
129 @@ -16,7 +16,7 @@ FILES=cap_alloc cap_proc cap_extint cap_flag cap_text
130 # no support).
131 ifeq ($(LIBATTR),yes)
132 FILES += cap_file
133 -LDFLAGS += -lattr
134 +LDLIBS += -lattr
135 endif
136
137 INCLS=libcap.h cap_names.h $(INCS)
138 @@ -24,6 +24,7 @@ OBJS=$(addsuffix .o, $(FILES))
139 MAJLIBNAME=$(LIBNAME).$(VERSION)
140 MINLIBNAME=$(MAJLIBNAME).$(MINOR)
141 GPERF_OUTPUT = _caps_output.gperf
142 +CFLAGS += -fPIC
143
144 all: $(MINLIBNAME) $(STALIBNAME)
145
146 @@ -33,7 +34,7 @@ INCLUDE_GPERF_OUTPUT = -include $(GPERF_OUTPUT)
147 endif
148
149 _makenames: _makenames.c cap_names.list.h
150 - $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
151 + $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
152
153 cap_names.h: _makenames
154 ./_makenames > cap_names.h
155 @@ -50,15 +51,15 @@ $(STALIBNAME): $(OBJS)
156 $(RANLIB) $@
157
158 $(MINLIBNAME): $(OBJS)
159 - $(LD) $(CFLAGS) $(LDFLAGS) -Wl,-soname,$(MAJLIBNAME) -o $@ $^
160 + $(LD) $(CFLAGS) $(LDFLAGS) -Wl,-soname,$(MAJLIBNAME) -o $@ $^ $(LDLIBS)
161 ln -sf $(MINLIBNAME) $(MAJLIBNAME)
162 ln -sf $(MAJLIBNAME) $(LIBNAME)
163
164 %.o: %.c $(INCLS)
165 - $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
166 + $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
167
168 cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS)
169 - $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
170 + $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
171
172 install: all
173 mkdir -p -m 0755 $(INCDIR)/sys
174 diff --git a/pam_cap/Makefile b/pam_cap/Makefile
175 index 9ca5bef..be49338 100644
176 --- a/pam_cap/Makefile
177 +++ b/pam_cap/Makefile
178 @@ -17,13 +17,13 @@ install: all
179 install -m 0755 pam_cap.so $(LIBDIR)/security
180
181 pam_cap.so: pam_cap.o
182 - $(LD) $(LDFLAGS) -o pam_cap.so $< $(LDLIBS)
183 + $(LD) $(CFLAGS) $(LDFLAGS) -o pam_cap.so $< $(LDLIBS)
184
185 pam_cap.o: pam_cap.c
186 - $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
187 + $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
188
189 testcompile: test.c pam_cap.o
190 - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ -lpam -ldl $(LDLIBS)
191 + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $+ -lpam -ldl $(LDLIBS)
192
193 clean:
194 rm -f *.o *.so testcompile *~
195 diff --git a/progs/Makefile b/progs/Makefile
196 index ef51dc6..c261f57 100644
197 --- a/progs/Makefile
198 +++ b/progs/Makefile
199 @@ -22,7 +22,7 @@ $(BUILD): %: %.o
200 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
201
202 %.o: %.c $(INCS)
203 - $(CC) $(IPATH) $(CFLAGS) -c $< -o $@
204 + $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
205
206 install: all
207 mkdir -p -m 0755 $(SBINDIR)
208 --
209 1.7.4.rc2