1 |
commit: 083301cd9ff1db1a61b078efbe6381384d8660ae |
2 |
Author: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 22 10:18:51 2017 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 22 10:45:52 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=083301cd |
7 |
|
8 |
sys-libs/libselinux: bump to 2.7_rc5 |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
11 |
|
12 |
sys-libs/libselinux/Manifest | 1 + |
13 |
sys-libs/libselinux/libselinux-2.7_rc5.ebuild | 151 ++++++++++++++++++++++++++ |
14 |
2 files changed, 152 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/libselinux/Manifest b/sys-libs/libselinux/Manifest |
17 |
index 074210f662d..b6fd8d5802d 100644 |
18 |
--- a/sys-libs/libselinux/Manifest |
19 |
+++ b/sys-libs/libselinux/Manifest |
20 |
@@ -2,3 +2,4 @@ DIST libselinux-2.5.tar.gz 189019 SHA256 94c9e97706280bedcc288f784f67f2b9d3d6136 |
21 |
DIST libselinux-2.6.tar.gz 203119 SHA256 4ea2dde50665c202253ba5caac7738370ea0337c47b251ba981c60d24e1a118a SHA512 906e1bf98c669862ab4f4e883d511db8d739a5763dc857c9405ad3cc6c70766a482853d07134698a1a98257a8632cc756d0549a7640c2915d051714f502ff14b WHIRLPOOL bf60ce907b7057ada5d19e3a0cd1f092a7dfc2de774e504762424c325c657a4f144fbe252e7d908f7c6d902d80388517e15134a289f4358e564c8720ea6534d9 |
22 |
DIST libselinux-2.7-rc1.tar.gz 186897 SHA256 213e1ca473855a61e8147e027b6ee5edf4162c9fbfc00749643f0ecc0a08371c SHA512 fe7fe67f14e5483fbb237eeb33f6eca48f1d3f6a3ab7fa1cfa99e5143ce4d6a03c9033a03a82bb3954d07c4d1a2c211cf5dea80030c727f9adcb3cc6bd72e641 WHIRLPOOL dfee20eaf3ea9e3cb7caa21ac10e710799ed324eee833650fc0bdf17c3fbcd3426bea7d915f6d6b79ca4440b99c57805a018bbd6a6103d97cb590f52d58f0e40 |
23 |
DIST libselinux-2.7-rc4.tar.gz 186904 SHA256 27c1780d6c623ab70ccf6923b8c8f386f8984ec99b7b4734f7b23d3d25809970 SHA512 788beb44ca2d2b6d84b57193538ed6f9c25f536c129903d58a852a64fc2c46a4e4249c4acd6234a6242a6ac0ea828a553f42a0e80fd9405ff5225c8a722c395f WHIRLPOOL 709ba4c3021d8b9e260ec8dbb0ff0ecd2a06a32cb44ce2c6fc486004e4c7f8cc28728150df40967472d00b97a26194dc36702dc990f5dd7055b2571714ccd37a |
24 |
+DIST libselinux-2.7-rc5.tar.gz 186909 SHA256 b002ec2fc5ab74041a5138ebc680e5bc2045c7a5089699f39c494ac1f0b482b2 SHA512 01a600d03ff2a04f91efee8ab6ef9dccc3e39c64e2857be57b84ab0a38e01a55710d7c1b4e3d33b69f0ed0f04e1af14b9569d65ce419294d40177baff283a8b7 WHIRLPOOL 05fa39c10669eeaf7e91609ff77967c0b3187c27d9edeee0614110e9dbe54068df317df73ce421e9a0a5511705a374f02abcf8f5dc3f8006ef73d88cb597534a |
25 |
|
26 |
diff --git a/sys-libs/libselinux/libselinux-2.7_rc5.ebuild b/sys-libs/libselinux/libselinux-2.7_rc5.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..19446c951bf |
29 |
--- /dev/null |
30 |
+++ b/sys-libs/libselinux/libselinux-2.7_rc5.ebuild |
31 |
@@ -0,0 +1,151 @@ |
32 |
+# Copyright 1999-2017 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI="6" |
36 |
+PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 ) |
37 |
+USE_RUBY="ruby21 ruby22 ruby23" |
38 |
+ |
39 |
+# No, I am not calling ruby-ng |
40 |
+inherit multilib python-r1 toolchain-funcs multilib-minimal |
41 |
+ |
42 |
+MY_P="${P//_/-}" |
43 |
+SEPOL_VER="${PV}" |
44 |
+MY_RELEASEDATE="20170718" |
45 |
+ |
46 |
+DESCRIPTION="SELinux userland library" |
47 |
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki" |
48 |
+ |
49 |
+if [[ ${PV} == 9999 ]] ; then |
50 |
+ inherit git-r3 |
51 |
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git" |
52 |
+ S="${WORKDIR}/${MY_P}/${PN}" |
53 |
+else |
54 |
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz" |
55 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86" |
56 |
+ S="${WORKDIR}/${MY_P}" |
57 |
+fi |
58 |
+ |
59 |
+LICENSE="public-domain" |
60 |
+SLOT="0" |
61 |
+IUSE="pcre2 python ruby static-libs ruby_targets_ruby21 ruby_targets_ruby22 ruby_targets_ruby23" |
62 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
63 |
+ |
64 |
+RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}:=[${MULTILIB_USEDEP}] |
65 |
+ !pcre2? ( >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}] ) |
66 |
+ pcre2? ( dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}] ) |
67 |
+ python? ( ${PYTHON_DEPS} ) |
68 |
+ ruby? ( |
69 |
+ ruby_targets_ruby21? ( dev-lang/ruby:2.1 ) |
70 |
+ ruby_targets_ruby22? ( dev-lang/ruby:2.2 ) |
71 |
+ ruby_targets_ruby23? ( dev-lang/ruby:2.3 ) |
72 |
+ )" |
73 |
+DEPEND="${RDEPEND} |
74 |
+ virtual/pkgconfig |
75 |
+ python? ( >=dev-lang/swig-2.0.9 )" |
76 |
+ |
77 |
+src_prepare() { |
78 |
+ eapply_user |
79 |
+ |
80 |
+ multilib_copy_sources |
81 |
+} |
82 |
+ |
83 |
+multilib_src_compile() { |
84 |
+ tc-export AR CC PKG_CONFIG RANLIB |
85 |
+ |
86 |
+ emake \ |
87 |
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \ |
88 |
+ SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \ |
89 |
+ LDFLAGS="-fPIC ${LDFLAGS} -pthread" \ |
90 |
+ USE_PCRE2="$(usex pcre2 y n)" \ |
91 |
+ all |
92 |
+ |
93 |
+ if multilib_is_native_abi && use python; then |
94 |
+ building() { |
95 |
+ emake \ |
96 |
+ LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \ |
97 |
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \ |
98 |
+ SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \ |
99 |
+ USE_PCRE2="$(usex pcre2 y n)" \ |
100 |
+ pywrap |
101 |
+ } |
102 |
+ python_foreach_impl building |
103 |
+ fi |
104 |
+ |
105 |
+ if multilib_is_native_abi && use ruby; then |
106 |
+ building() { |
107 |
+ einfo "Calling rubywrap for ${1}" |
108 |
+ # Clean up .lo file to force rebuild |
109 |
+ rm -f src/selinuxswig_ruby_wrap.lo || die |
110 |
+ emake \ |
111 |
+ RUBY=${1} \ |
112 |
+ LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \ |
113 |
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \ |
114 |
+ SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \ |
115 |
+ USE_PCRE2="$(usex pcre2 y n)" \ |
116 |
+ rubywrap |
117 |
+ } |
118 |
+ for RUBYTARGET in ${USE_RUBY}; do |
119 |
+ use ruby_targets_${RUBYTARGET} || continue |
120 |
+ |
121 |
+ building ${RUBYTARGET} |
122 |
+ done |
123 |
+ fi |
124 |
+} |
125 |
+ |
126 |
+multilib_src_install() { |
127 |
+ emake DESTDIR="${D}" \ |
128 |
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \ |
129 |
+ SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \ |
130 |
+ LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \ |
131 |
+ USE_PCRE2="$(usex pcre2 y n)" \ |
132 |
+ install |
133 |
+ |
134 |
+ if multilib_is_native_abi && use python; then |
135 |
+ installation() { |
136 |
+ emake DESTDIR="${D}" \ |
137 |
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \ |
138 |
+ LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \ |
139 |
+ USE_PCRE2="$(usex pcre2 y n)" \ |
140 |
+ install-pywrap |
141 |
+ python_optimize # bug 531638 |
142 |
+ } |
143 |
+ python_foreach_impl installation |
144 |
+ fi |
145 |
+ |
146 |
+ if multilib_is_native_abi && use ruby; then |
147 |
+ installation() { |
148 |
+ einfo "Calling install-rubywrap for ${1}" |
149 |
+ # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions |
150 |
+ rm src/selinuxswig_ruby_wrap.lo |
151 |
+ emake DESTDIR="${D}" \ |
152 |
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \ |
153 |
+ LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \ |
154 |
+ RUBY=${1} \ |
155 |
+ USE_PCRE2="$(usex pcre2 y n)" \ |
156 |
+ install-rubywrap |
157 |
+ } |
158 |
+ for RUBYTARGET in ${USE_RUBY}; do |
159 |
+ use ruby_targets_${RUBYTARGET} || continue |
160 |
+ |
161 |
+ installation ${RUBYTARGET} |
162 |
+ done |
163 |
+ fi |
164 |
+ |
165 |
+ use static-libs || rm "${D}"/usr/lib*/*.a || die |
166 |
+} |
167 |
+ |
168 |
+pkg_postinst() { |
169 |
+ # Fix bug 473502 |
170 |
+ for POLTYPE in ${POLICY_TYPES}; |
171 |
+ do |
172 |
+ mkdir -p /etc/selinux/${POLTYPE}/contexts/files || die |
173 |
+ touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local || die |
174 |
+ # Fix bug 516608 |
175 |
+ for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do |
176 |
+ if [[ -f "/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then |
177 |
+ sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} \ |
178 |
+ || die "Failed to recompile contexts" |
179 |
+ fi |
180 |
+ done |
181 |
+ done |
182 |
+} |