1 |
commit: 10fc678631a6a54f8183d54c1494aaeb9b08a1da |
2 |
Author: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 7 04:16:19 2021 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 7 04:16:19 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10fc6786 |
7 |
|
8 |
sys-apps/policycoreutils: drop old |
9 |
|
10 |
Package-Manager: Portage-3.0.13, Repoman-3.0.2 |
11 |
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org> |
12 |
|
13 |
...policycoreutils-2.7-0001-newrole-not-suid.patch | 13 -- |
14 |
.../policycoreutils/policycoreutils-3.1-r1.ebuild | 179 --------------------- |
15 |
2 files changed, 192 deletions(-) |
16 |
|
17 |
diff --git a/sys-apps/policycoreutils/files/policycoreutils-2.7-0001-newrole-not-suid.patch b/sys-apps/policycoreutils/files/policycoreutils-2.7-0001-newrole-not-suid.patch |
18 |
deleted file mode 100644 |
19 |
index 6049bbe282a..00000000000 |
20 |
--- a/sys-apps/policycoreutils/files/policycoreutils-2.7-0001-newrole-not-suid.patch |
21 |
+++ /dev/null |
22 |
@@ -1,13 +0,0 @@ |
23 |
-diff --git a/policycoreutils/newrole/Makefile b/policycoreutils/newrole/Makefile |
24 |
-index bdefbb8..9cff135 100644 |
25 |
---- policycoreutils/newrole/Makefile |
26 |
-+++ policycoreutils/newrole/Makefile |
27 |
-@@ -49,7 +49,7 @@ ifeq ($(NAMESPACE_PRIV),y) |
28 |
- IS_SUID=y |
29 |
- endif |
30 |
- ifeq ($(IS_SUID),y) |
31 |
-- MODE := 4555 |
32 |
-+ MODE := 0555 |
33 |
- override LDLIBS += -lcap-ng |
34 |
- else |
35 |
- MODE := 0555 |
36 |
|
37 |
diff --git a/sys-apps/policycoreutils/policycoreutils-3.1-r1.ebuild b/sys-apps/policycoreutils/policycoreutils-3.1-r1.ebuild |
38 |
deleted file mode 100644 |
39 |
index 9381dac4c14..00000000000 |
40 |
--- a/sys-apps/policycoreutils/policycoreutils-3.1-r1.ebuild |
41 |
+++ /dev/null |
42 |
@@ -1,179 +0,0 @@ |
43 |
-# Copyright 1999-2020 Gentoo Authors |
44 |
-# Distributed under the terms of the GNU General Public License v2 |
45 |
- |
46 |
-EAPI="7" |
47 |
-PYTHON_COMPAT=( python{3_7,3_8} ) |
48 |
-PYTHON_REQ_USE="xml" |
49 |
- |
50 |
-inherit multilib python-r1 toolchain-funcs bash-completion-r1 |
51 |
- |
52 |
-MY_P="${P//_/-}" |
53 |
- |
54 |
-MY_RELEASEDATE="20200710" |
55 |
-EXTRAS_VER="1.37" |
56 |
-SEMNG_VER="${PV}" |
57 |
-SELNX_VER="${PV}" |
58 |
-SEPOL_VER="${PV}" |
59 |
- |
60 |
-IUSE="audit dbus pam split-usr" |
61 |
-REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
62 |
- |
63 |
-DESCRIPTION="SELinux core utilities" |
64 |
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki" |
65 |
- |
66 |
-if [[ ${PV} == 9999 ]]; then |
67 |
- inherit git-r3 |
68 |
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git" |
69 |
- SRC_URI="https://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2" |
70 |
- S1="${WORKDIR}/${MY_P}/${PN}" |
71 |
- S2="${WORKDIR}/policycoreutils-extra" |
72 |
- S="${S1}" |
73 |
-else |
74 |
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_RELEASEDATE}/${MY_P}.tar.gz |
75 |
- https://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2" |
76 |
- KEYWORDS="amd64 ~arm64 ~mips x86" |
77 |
- S1="${WORKDIR}/${MY_P}" |
78 |
- S2="${WORKDIR}/policycoreutils-extra" |
79 |
- S="${S1}" |
80 |
-fi |
81 |
- |
82 |
-LICENSE="GPL-2" |
83 |
-SLOT="0" |
84 |
- |
85 |
-DEPEND=">=sys-libs/libselinux-${SELNX_VER}:=[python,${PYTHON_USEDEP}] |
86 |
- >=sys-libs/libcap-1.10-r10:= |
87 |
- >=sys-libs/libsemanage-${SEMNG_VER}:=[python(+),${PYTHON_USEDEP}] |
88 |
- sys-libs/libcap-ng:= |
89 |
- >=sys-libs/libsepol-${SEPOL_VER}:= |
90 |
- >=app-admin/setools-4.2.0[${PYTHON_USEDEP}] |
91 |
- dev-python/ipy[${PYTHON_USEDEP}] |
92 |
- dbus? ( |
93 |
- sys-apps/dbus |
94 |
- dev-libs/dbus-glib:= |
95 |
- ) |
96 |
- audit? ( >=sys-process/audit-1.5.1[python,${PYTHON_USEDEP}] ) |
97 |
- pam? ( sys-libs/pam:= ) |
98 |
- ${PYTHON_DEPS}" |
99 |
- |
100 |
-# Avoid dependency loop in the cross-compile case, bug #755173 |
101 |
-# (Still exists in native) |
102 |
-BDEPEND="sys-devel/gettext" |
103 |
- |
104 |
-### libcgroup -> seunshare |
105 |
-### dbus -> restorecond |
106 |
- |
107 |
-# pax-utils for scanelf used by rlpkg |
108 |
-RDEPEND="${DEPEND} |
109 |
- app-misc/pax-utils" |
110 |
- |
111 |
-PDEPEND="sys-apps/semodule-utils |
112 |
- sys-apps/selinux-python" |
113 |
- |
114 |
-src_unpack() { |
115 |
- # Override default one because we need the SRC_URI ones even in case of 9999 ebuilds |
116 |
- default |
117 |
- if [[ ${PV} == 9999 ]] ; then |
118 |
- git-r3_src_unpack |
119 |
- fi |
120 |
-} |
121 |
- |
122 |
-src_prepare() { |
123 |
- S="${S1}" |
124 |
- cd "${S}" || die "Failed to switch to ${S}" |
125 |
- if [[ ${PV} != 9999 ]] ; then |
126 |
- # If needed for live ebuilds please use /etc/portage/patches |
127 |
- eapply "${FILESDIR}/policycoreutils-3.1-0001-newrole-not-suid.patch" |
128 |
- fi |
129 |
- |
130 |
- # rlpkg is more useful than fixfiles |
131 |
- sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \ |
132 |
- || die "fixfiles sed 1 failed" |
133 |
- sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \ |
134 |
- || die "fixfiles sed 2 failed" |
135 |
- |
136 |
- eapply_user |
137 |
- |
138 |
- sed -i 's/-Werror//g' "${S1}"/*/Makefile || die "Failed to remove Werror" |
139 |
- |
140 |
- python_copy_sources |
141 |
- # Our extra code is outside the regular directory, so set it to the extra |
142 |
- # directory. We really should optimize this as it is ugly, but the extra |
143 |
- # code is needed for Gentoo at the same time that policycoreutils is present |
144 |
- # (so we cannot use an additional package for now). |
145 |
- S="${S2}" |
146 |
- python_copy_sources |
147 |
-} |
148 |
- |
149 |
-src_compile() { |
150 |
- building() { |
151 |
- emake -C "${BUILD_DIR}" \ |
152 |
- AUDIT_LOG_PRIVS="y" \ |
153 |
- AUDITH="$(usex audit y n)" \ |
154 |
- PAMH="$(usex pam y n)" \ |
155 |
- INOTIFYH="$(usex dbus y n)" \ |
156 |
- SESANDBOX="n" \ |
157 |
- CC="$(tc-getCC)" \ |
158 |
- LIBDIR="\$(PREFIX)/$(get_libdir)" |
159 |
- } |
160 |
- S="${S1}" # Regular policycoreutils |
161 |
- python_foreach_impl building |
162 |
- S="${S2}" # Extra set |
163 |
- python_foreach_impl building |
164 |
-} |
165 |
- |
166 |
-src_install() { |
167 |
- # Python scripts are present in many places. There are no extension modules. |
168 |
- installation-policycoreutils() { |
169 |
- einfo "Installing policycoreutils" |
170 |
- emake -C "${BUILD_DIR}" DESTDIR="${D}" \ |
171 |
- AUDIT_LOG_PRIVS="y" \ |
172 |
- AUDITH="$(usex audit y n)" \ |
173 |
- PAMH="$(usex pam y n)" \ |
174 |
- INOTIFYH="$(usex dbus y n)" \ |
175 |
- SESANDBOX="n" \ |
176 |
- CC="$(tc-getCC)" \ |
177 |
- LIBDIR="\$(PREFIX)/$(get_libdir)" \ |
178 |
- install |
179 |
- python_optimize |
180 |
- } |
181 |
- |
182 |
- installation-extras() { |
183 |
- einfo "Installing policycoreutils-extra" |
184 |
- emake -C "${BUILD_DIR}" \ |
185 |
- DESTDIR="${D}" \ |
186 |
- install |
187 |
- python_optimize |
188 |
- } |
189 |
- |
190 |
- S="${S1}" # policycoreutils |
191 |
- python_foreach_impl installation-policycoreutils |
192 |
- S="${S2}" # extras |
193 |
- python_foreach_impl installation-extras |
194 |
- S="${S1}" # back for later |
195 |
- |
196 |
- # remove redhat-style init script |
197 |
- rm -fR "${D}/etc/rc.d" || die |
198 |
- |
199 |
- # compatibility symlinks |
200 |
- use split-usr && dosym ../../sbin/setfiles /usr/sbin/setfiles |
201 |
- |
202 |
- bashcomp_alias setsebool getsebool |
203 |
- |
204 |
- # location for policy definitions |
205 |
- dodir /var/lib/selinux |
206 |
- keepdir /var/lib/selinux |
207 |
- |
208 |
- # Set version-specific scripts |
209 |
- for pyscript in rlpkg; do |
210 |
- python_replicate_script "${ED}/usr/sbin/${pyscript}" |
211 |
- done |
212 |
-} |
213 |
- |
214 |
-pkg_postinst() { |
215 |
- for POLICY_TYPE in ${POLICY_TYPES} ; do |
216 |
- # There have been some changes to the policy store, rebuilding now. |
217 |
- # https://marc.info/?l=selinux&m=143757277819717&w=2 |
218 |
- einfo "Rebuilding store ${POLICY_TYPE} (without re-loading)." |
219 |
- semodule -s "${POLICY_TYPE}" -n -B || die "Failed to rebuild policy store ${POLICY_TYPE}" |
220 |
- done |
221 |
-} |