1 |
commit: 41d543931db6cf933a22d61a4427922e1a436357 |
2 |
Author: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 22 10:19:12 2017 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 22 10:45:56 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41d54393 |
7 |
|
8 |
sys-libs/libsemanage: bump to 2.7_rc5 |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
11 |
|
12 |
sys-libs/libsemanage/Manifest | 1 + |
13 |
sys-libs/libsemanage/libsemanage-2.7_rc5.ebuild | 137 ++++++++++++++++++++++++ |
14 |
2 files changed, 138 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/libsemanage/Manifest b/sys-libs/libsemanage/Manifest |
17 |
index 38e3a9ed30d..1cda5557654 100644 |
18 |
--- a/sys-libs/libsemanage/Manifest |
19 |
+++ b/sys-libs/libsemanage/Manifest |
20 |
@@ -2,3 +2,4 @@ DIST libsemanage-2.5.tar.gz 152884 SHA256 46e2f36254369b6e91d1eea0460c262b139361 |
21 |
DIST libsemanage-2.6.tar.gz 155897 SHA256 4f81541047290b751f2ffb926fcd381c186f22db18d9fe671b0b4a6a54e8cfce SHA512 38741d6e6f7a2669bfeee362e42d6bfd720cceeaf61331e329b2210fdc070444e529656ce86dd82e94aa248eafcfaea4c5d013d9cce76c1039be6fc6a6b2c790 WHIRLPOOL 9fb781c637c4725dd48fa07898fd5db4b2f1e47264e80468e3c9b48fd8afc6bcb6494a44ccbfb0e48dec10dc5db461ab8e1941251d625854ebbebdbfdacb971c |
22 |
DIST libsemanage-2.7-rc1.tar.gz 153597 SHA256 50df2092bce88af87350916bd7f93b8095de500d9911452a025c3f24ea140455 SHA512 92371e0f710a9fb5179db4c05af52455e3ec0771173a693c954abf032afc70e76d3eb626ae87445a59b04d6037a83fce15bc196275ef3497a8321423ccfb4aac WHIRLPOOL b871a59d0565cc194e7e2b0f60fd059aef17eb433a743bff113085473013a155905aa5778439aa37cb0dbbd4951873c20dc4458469b400a9e64dc4e8bb7e1e87 |
23 |
DIST libsemanage-2.7-rc4.tar.gz 153500 SHA256 92c052fcc385471965ac22a6031573947cce8a685146aa6c7b404ba688277280 SHA512 efd84cdcff3a326e55180063d5877f711f2af001e89f83181bb4e7b93cee226fa94d0bce8285974ca1aaf14e75378f2022fd4c2c788a2325cd4665fce4100535 WHIRLPOOL 32a949f72f5fc4ba677dff83ed35487a0cb3661c9f696acaaaee0087d7d6d23e1740fe5f51f032e4aeaa2a6d64484d7522e2572113f218018ad9f76f3078c222 |
24 |
+DIST libsemanage-2.7-rc5.tar.gz 153499 SHA256 1157538b67b77bdff14592c7b23d43181fad747307452009b4cfa53b07a94e6a SHA512 62803ef4eee50f8a706aef7034e604891ca3f15e3f735793c63785e7e7e072f1cd3ff0c4ad1e9a591925b91c53ac4e89453b7fcb479cb2396c7e914a704bd685 WHIRLPOOL 4b6eff5b2cfbf0d4915cbad10bbcb8bec549be7e5cabd74e7ed58b92f9a7a7e453b8f126624a38f469b6e9758123500cb266fc5c49e6b75901a69d874f9cc683 |
25 |
|
26 |
diff --git a/sys-libs/libsemanage/libsemanage-2.7_rc5.ebuild b/sys-libs/libsemanage/libsemanage-2.7_rc5.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..6de2b5f214a |
29 |
--- /dev/null |
30 |
+++ b/sys-libs/libsemanage/libsemanage-2.7_rc5.ebuild |
31 |
@@ -0,0 +1,137 @@ |
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=( python{2_7,3_4,3_5} ) |
37 |
+ |
38 |
+inherit multilib python-r1 toolchain-funcs multilib-minimal |
39 |
+ |
40 |
+MY_P="${P//_/-}" |
41 |
+MY_RELEASEDATE="20170718" |
42 |
+ |
43 |
+SEPOL_VER="${PV}" |
44 |
+SELNX_VER="${PV}" |
45 |
+ |
46 |
+DESCRIPTION="SELinux kernel and policy management 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="GPL-2" |
60 |
+SLOT="0" |
61 |
+IUSE="python" |
62 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
63 |
+ |
64 |
+RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}[${MULTILIB_USEDEP}] |
65 |
+ >=sys-libs/libselinux-${SELNX_VER}[${MULTILIB_USEDEP}] |
66 |
+ >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}] |
67 |
+ >=dev-libs/ustr-1.0.4-r2[${MULTILIB_USEDEP}] |
68 |
+ python? ( ${PYTHON_DEPS} )" |
69 |
+DEPEND="${RDEPEND} |
70 |
+ sys-devel/bison |
71 |
+ sys-devel/flex |
72 |
+ python? ( |
73 |
+ >=dev-lang/swig-2.0.4-r1 |
74 |
+ virtual/pkgconfig |
75 |
+ )" |
76 |
+ |
77 |
+# tests are not meant to be run outside of the |
78 |
+# full SELinux userland repo |
79 |
+RESTRICT="test" |
80 |
+ |
81 |
+src_prepare() { |
82 |
+ echo "# Set this to true to save the linked policy." >> "${S}/src/semanage.conf" |
83 |
+ echo "# This is normally only useful for analysis" >> "${S}/src/semanage.conf" |
84 |
+ echo "# or debugging of policy." >> "${S}/src/semanage.conf" |
85 |
+ echo "save-linked=false" >> "${S}/src/semanage.conf" |
86 |
+ echo >> "${S}/src/semanage.conf" |
87 |
+ echo "# Set this to 0 to disable assertion checking." >> "${S}/src/semanage.conf" |
88 |
+ echo "# This should speed up building the kernel policy" >> "${S}/src/semanage.conf" |
89 |
+ echo "# from policy modules, but may leave you open to" >> "${S}/src/semanage.conf" |
90 |
+ echo "# dangerous rules which assertion checking" >> "${S}/src/semanage.conf" |
91 |
+ echo "# would catch." >> "${S}/src/semanage.conf" |
92 |
+ echo "expand-check=1" >> "${S}/src/semanage.conf" |
93 |
+ echo >> "${S}/src/semanage.conf" |
94 |
+ echo "# Modules in the module store can be compressed" >> "${S}/src/semanage.conf" |
95 |
+ echo "# with bzip2. Set this to the bzip2 blocksize" >> "${S}/src/semanage.conf" |
96 |
+ echo "# 1-9 when compressing. The higher the number," >> "${S}/src/semanage.conf" |
97 |
+ echo "# the more memory is traded off for disk space." >> "${S}/src/semanage.conf" |
98 |
+ echo "# Set to 0 to disable bzip2 compression." >> "${S}/src/semanage.conf" |
99 |
+ echo "bzip-blocksize=0" >> "${S}/src/semanage.conf" |
100 |
+ echo >> "${S}/src/semanage.conf" |
101 |
+ echo "# Reduce memory usage for bzip2 compression and" >> "${S}/src/semanage.conf" |
102 |
+ echo "# decompression of modules in the module store." >> "${S}/src/semanage.conf" |
103 |
+ echo "bzip-small=true" >> "${S}/src/semanage.conf" |
104 |
+ |
105 |
+ eapply_user |
106 |
+ |
107 |
+ multilib_copy_sources |
108 |
+} |
109 |
+ |
110 |
+multilib_src_compile() { |
111 |
+ emake \ |
112 |
+ AR="$(tc-getAR)" \ |
113 |
+ CC="$(tc-getCC)" \ |
114 |
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ |
115 |
+ all |
116 |
+ |
117 |
+ if multilib_is_native_abi && use python; then |
118 |
+ building_py() { |
119 |
+ emake \ |
120 |
+ AR="$(tc-getAR)" \ |
121 |
+ CC="$(tc-getCC)" \ |
122 |
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ |
123 |
+ "$@" |
124 |
+ } |
125 |
+ python_foreach_impl building_py swigify |
126 |
+ python_foreach_impl building_py pywrap |
127 |
+ fi |
128 |
+} |
129 |
+ |
130 |
+multilib_src_install() { |
131 |
+ emake \ |
132 |
+ LIBDIR="${ED}/usr/$(get_libdir)" \ |
133 |
+ SHLIBDIR="${ED}/usr/$(get_libdir)" \ |
134 |
+ DESTDIR="${ED}" install |
135 |
+ |
136 |
+ if multilib_is_native_abi && use python; then |
137 |
+ installation_py() { |
138 |
+ emake DESTDIR="${ED}" \ |
139 |
+ LIBDIR="${ED}/usr/$(get_libdir)" \ |
140 |
+ SHLIBDIR="${ED}/usr/$(get_libdir)" \ |
141 |
+ LIBSEPOLA="${EPREFIX%/}/usr/$(get_libdir)/libsepol.a" \ |
142 |
+ install-pywrap |
143 |
+ python_optimize # bug 531638 |
144 |
+ } |
145 |
+ python_foreach_impl installation_py |
146 |
+ fi |
147 |
+} |
148 |
+ |
149 |
+pkg_postinst() { |
150 |
+ # Migrate the SELinux semanage configuration store if not done already |
151 |
+ local selinuxtype=$(awk -F'=' '/SELINUXTYPE=/ {print $2}' "${EROOT}"/etc/selinux/config 2>/dev/null) |
152 |
+ if [ -n "${selinuxtype}" ] && [ ! -d "${EROOT}"/var/lib/selinux/${mcs}/active ] ; then |
153 |
+ ewarn "Since the 2.4 SELinux userspace, the policy module store is moved" |
154 |
+ ewarn "from /etc/selinux to /var/lib/selinux. The migration will be run now." |
155 |
+ ewarn "If there are any issues, it can be done manually by running:" |
156 |
+ ewarn "/usr/libexec/selinux/semanage_migrate_store" |
157 |
+ ewarn "For more information, please see" |
158 |
+ ewarn "- https://github.com/SELinuxProject/selinux/wiki/Policy-Store-Migration" |
159 |
+ fi |
160 |
+ |
161 |
+ # Run the store migration without rebuilds |
162 |
+ for POLICY_TYPE in ${POLICY_TYPES} ; do |
163 |
+ if [ ! -d "${EROOT}/var/lib/selinux/${POLICY_TYPE}/active" ] ; then |
164 |
+ einfo "Migrating store ${POLICY_TYPE} (without policy rebuild)." |
165 |
+ /usr/libexec/selinux/semanage_migrate_store -n -s "${POLICY_TYPE}" || die "Failed to migrate store ${POLICY_TYPE}" |
166 |
+ fi |
167 |
+ done |
168 |
+} |