Gentoo Archives: gentoo-commits

From: "Sven Vermeulen (swift)" <swift@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/libselinux: ChangeLog libselinux-2.3-r1.ebuild
Date: Wed, 09 Jul 2014 18:16:36
Message-Id: 20140709181631.6B44C2004E@flycatcher.gentoo.org
1 swift 14/07/09 18:16:31
2
3 Modified: ChangeLog
4 Added: libselinux-2.3-r1.ebuild
5 Log:
6 Fix bug #516608 - Keep pcre version at hand with binary compiled expressions (segfault with setfiles)
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x2EDD52403B68AF47)
9
10 Revision Changes Path
11 1.125 sys-libs/libselinux/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/ChangeLog?rev=1.125&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/ChangeLog?rev=1.125&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/ChangeLog?r1=1.124&r2=1.125
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v
20 retrieving revision 1.124
21 retrieving revision 1.125
22 diff -u -r1.124 -r1.125
23 --- ChangeLog 18 Jun 2014 20:50:32 -0000 1.124
24 +++ ChangeLog 9 Jul 2014 18:16:31 -0000 1.125
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sys-libs/libselinux
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.124 2014/06/18 20:50:32 mgorny Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.125 2014/07/09 18:16:31 swift Exp $
30 +
31 +*libselinux-2.3-r1 (09 Jul 2014)
32 +
33 + 09 Jul 2014; Sven Vermeulen <swift@g.o> +libselinux-2.3-r1.ebuild:
34 + Fix bug #516608 (segfault with setfiles)
35
36 18 Jun 2014; Michał Górny <mgorny@g.o> libselinux-2.3.ebuild:
37 Update dependencies to require guaranteed EAPI=5 or multilib ebuilds, bug
38
39
40
41 1.1 sys-libs/libselinux/libselinux-2.3-r1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/libselinux-2.3-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/libselinux-2.3-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: libselinux-2.3-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/libselinux-2.3-r1.ebuild,v 1.1 2014/07/09 18:16:31 swift Exp $
51
52 EAPI="5"
53 PYTHON_COMPAT=( python2_7 python3_2 python3_3 )
54 USE_RUBY="ruby19 ruby20"
55
56 PATCHBUNDLE="4"
57
58 # No, I am not calling ruby-ng
59 inherit multilib python-r1 toolchain-funcs eutils multilib-minimal
60
61 MY_P="${P//_/-}"
62
63 SEPOL_VER="2.3"
64
65 DESCRIPTION="SELinux userland library"
66 HOMEPAGE="http://userspace.selinuxproject.org"
67 SRC_URI="http://userspace.selinuxproject.org/releases/20140506/${MY_P}.tar.gz
68 http://dev.gentoo.org/~swift/patches/${PN}/patchbundle-${PN}-${PATCHBUNDLE}.tar.gz"
69
70 LICENSE="public-domain"
71 SLOT="0"
72 KEYWORDS="~amd64 ~x86"
73
74 IUSE="python ruby static-libs ruby_targets_ruby19 ruby_targets_ruby20"
75
76 RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}[${MULTILIB_USEDEP}]
77 >=dev-libs/libpcre-8.33-r1[static-libs?,${MULTILIB_USEDEP}]
78 python? ( ${PYTHON_DEPS} )
79 ruby? (
80 ruby_targets_ruby19? ( dev-lang/ruby:1.9 )
81 ruby_targets_ruby20? ( dev-lang/ruby:2.0 )
82 )"
83 DEPEND="${RDEPEND}
84 virtual/pkgconfig
85 python? ( >=dev-lang/swig-2.0.9 )"
86
87 S="${WORKDIR}/${MY_P}"
88
89 src_prepare() {
90 EPATCH_MULTI_MSG="Applying libselinux patches ... " \
91 EPATCH_SUFFIX="patch" \
92 EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
93 EPATCH_FORCE="yes" \
94 epatch
95
96 epatch_user
97
98 multilib_copy_sources
99 }
100
101 multilib_src_compile() {
102 tc-export PKG_CONFIG RANLIB
103 local PCRE_CFLAGS=$(${PKG_CONFIG} libpcre --cflags)
104 local PCRE_LIBS=$(${PKG_CONFIG} libpcre --libs)
105 export PCRE_{CFLAGS,LIBS}
106
107 emake \
108 AR="$(tc-getAR)" \
109 CC="$(tc-getCC)" \
110 LIBDIR="\$(PREFIX)/$(get_libdir)" \
111 SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
112 LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
113 all
114
115 if multilib_is_native_abi && use python; then
116 building() {
117 python_export PYTHON_INCLUDEDIR PYTHON_LIBPATH
118 emake \
119 CC="$(tc-getCC)" \
120 PYINC="-I${PYTHON_INCLUDEDIR}" \
121 PYTHONLIBDIR="${PYTHON_LIBPATH}" \
122 PYPREFIX="${EPYTHON##*/}" \
123 LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
124 pywrap
125 }
126 python_foreach_impl building
127 fi
128
129 if multilib_is_native_abi && use ruby; then
130 building() {
131 einfo "Calling rubywrap for ${1}"
132 # Clean up .lo file to force rebuild
133 test -f src/selinuxswig_ruby_wrap.lo && rm src/selinuxswig_ruby_wrap.lo
134 emake \
135 CC="$(tc-getCC)" \
136 RUBY=${1} \
137 RUBYINSTALL=$(${1} -e 'print RbConfig::CONFIG["vendorarchdir"]') \
138 LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
139 rubywrap
140 }
141 for RUBYTARGET in ${USE_RUBY}; do
142 use ruby_targets_${RUBYTARGET} || continue
143
144 building ${RUBYTARGET}
145 done
146 fi
147 }
148
149 multilib_src_install() {
150 LIBDIR="\$(PREFIX)/$(get_libdir)" SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
151 emake DESTDIR="${D}" install
152
153 if multilib_is_native_abi && use python; then
154 installation() {
155 LIBDIR="\$(PREFIX)/$(get_libdir)" emake DESTDIR="${D}" install-pywrap
156 }
157 python_foreach_impl installation
158 fi
159
160 if multilib_is_native_abi && use ruby; then
161 installation() {
162 einfo "Calling install-rubywrap for ${1}"
163 # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions
164 rm src/selinuxswig_ruby_wrap.lo
165 LIBDIR="\$(PREFIX)/$(get_libdir)" emake DESTDIR="${D}" \
166 RUBY=${1} \
167 RUBYINSTALL="${D}/$(${1} -e 'print RbConfig::CONFIG["vendorarchdir"]')" \
168 install-rubywrap
169 }
170 for RUBYTARGET in ${USE_RUBY}; do
171 use ruby_targets_${RUBYTARGET} || continue
172
173 installation ${RUBYTARGET}
174 done
175 fi
176
177 use static-libs || rm "${D}"/usr/lib*/*.a
178 }
179
180 pkg_postinst() {
181 # Fix bug 473502
182 for POLTYPE in ${POLICY_TYPES};
183 do
184 mkdir -p /etc/selinux/${POLTYPE}/contexts/files
185 touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local
186 # Fix bug 516608
187 for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
188 sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE};
189 done
190 done
191 }