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-apps/policycoreutils: policycoreutils-2.3-r1.ebuild ChangeLog
Date: Mon, 26 May 2014 09:00:51
Message-Id: 20140526090047.06A942004E@flycatcher.gentoo.org
1 swift 14/05/26 09:00:46
2
3 Modified: ChangeLog
4 Added: policycoreutils-2.3-r1.ebuild
5 Log:
6 Fix selocal to support dontaudit as well. Also verify types, attributes and roles before adding them.
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.138 sys-apps/policycoreutils/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/ChangeLog?rev=1.138&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/ChangeLog?rev=1.138&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/ChangeLog?r1=1.137&r2=1.138
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v
20 retrieving revision 1.137
21 retrieving revision 1.138
22 diff -u -r1.137 -r1.138
23 --- ChangeLog 10 May 2014 14:04:59 -0000 1.137
24 +++ ChangeLog 26 May 2014 09:00:46 -0000 1.138
25 @@ -1,6 +1,12 @@
26 # ChangeLog for sys-apps/policycoreutils
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.137 2014/05/10 14:04:59 swift Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.138 2014/05/26 09:00:46 swift Exp $
30 +
31 +*policycoreutils-2.3-r1 (26 May 2014)
32 +
33 + 26 May 2014; Sven Vermeulen <swift@g.o> +policycoreutils-2.3-r1.ebuild:
34 + Fix selocal to support dontaudit as well. Also verify types, attributes and
35 + roles before adding them.
36
37 10 May 2014; Sven Vermeulen <swift@g.o>
38 -policycoreutils-2.1.14-r1.ebuild, -policycoreutils-2.1.14-r2.ebuild,
39
40
41
42 1.1 sys-apps/policycoreutils/policycoreutils-2.3-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/policycoreutils-2.3-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/policycoreutils-2.3-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: policycoreutils-2.3-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2014 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-2.3-r1.ebuild,v 1.1 2014/05/26 09:00:46 swift Exp $
52
53 EAPI="5"
54 PYTHON_COMPAT=( python2_7 )
55 PYTHON_REQ_USE="xml"
56
57 inherit multilib python-r1 toolchain-funcs eutils
58
59 MY_P="${P//_/-}"
60
61 EXTRAS_VER="1.32"
62 SEMNG_VER="2.3"
63 SELNX_VER="2.3"
64 SEPOL_VER="2.3"
65 PATCHBUNDLE="3"
66
67 IUSE="audit pam dbus"
68
69 DESCRIPTION="SELinux core utilities"
70 HOMEPAGE="http://userspace.selinuxproject.org"
71 SRC_URI="http://userspace.selinuxproject.org/releases/20140506/${MY_P}.tar.gz
72 http://dev.gentoo.org/~swift/patches/policycoreutils/patchbundle-${PN}-${PATCHBUNDLE}.tar.gz
73 mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
74
75 LICENSE="GPL-2"
76 SLOT="0"
77 KEYWORDS="~amd64 ~x86"
78
79 COMMON_DEPS=">=sys-libs/libselinux-${SELNX_VER}[python]
80 >=sys-libs/glibc-2.4
81 >=sys-libs/libcap-1.10-r10
82 >=sys-libs/libsemanage-${SEMNG_VER}[python]
83 sys-libs/libcap-ng
84 >=sys-libs/libsepol-${SEPOL_VER}
85 sys-devel/gettext
86 dev-python/ipy
87 dbus? (
88 sys-apps/dbus
89 dev-libs/dbus-glib
90 )
91 audit? ( >=sys-process/audit-1.5.1 )
92 pam? ( sys-libs/pam )
93 ${PYTHON_DEPS}"
94
95 ### libcgroup -> seunshare
96 ### dbus -> restorecond
97
98 # pax-utils for scanelf used by rlpkg
99 RDEPEND="${COMMON_DEPS}
100 dev-python/sepolgen
101 app-misc/pax-utils"
102
103 DEPEND="${COMMON_DEPS}"
104
105 S="${WORKDIR}/${MY_P}"
106 S1="${WORKDIR}/${MY_P}"
107 S2="${WORKDIR}/policycoreutils-extra"
108
109 src_prepare() {
110 # rlpkg is more useful than fixfiles
111 sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
112 || die "fixfiles sed 1 failed"
113 sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
114 || die "fixfiles sed 2 failed"
115
116 EPATCH_MULTI_MSG="Applying policycoreutils patches ... " \
117 EPATCH_SUFFIX="patch" \
118 EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
119 EPATCH_FORCE="yes" \
120 epatch
121
122 epatch_user
123
124 python_copy_sources
125 # Our extra code is outside the regular directory, so set it to the extra
126 # directory. We really should optimize this as it is ugly, but the extra
127 # code is needed for Gentoo at the same time that policycoreutils is present
128 # (so we cannot use an additional package for now).
129 S="${S2}"
130 python_copy_sources
131 }
132
133 src_compile() {
134 local use_audit="n";
135 local use_pam="n";
136 local use_dbus="n";
137 local use_sesandbox="n";
138
139 use audit && use_audit="y";
140 use pam && use_pam="y";
141 use dbus && use_dbus="y";
142
143 building() {
144 emake -C "${BUILD_DIR}" AUDIT_LOG_PRIVS="y" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" CC="$(tc-getCC)" PYLIBVER="${EPYTHON}" || die
145 }
146 S="${S1}" # Regular policycoreutils
147 python_foreach_impl building
148 S="${S2}" # Extra set
149 python_foreach_impl building
150 }
151
152 src_install() {
153 local use_audit="n";
154 local use_pam="n";
155 local use_dbus="n";
156 local use_sesandbox="n";
157
158 use audit && use_audit="y";
159 use pam && use_pam="y";
160 use dbus && use_dbus="y";
161
162 # Python scripts are present in many places. There are no extension modules.
163 installation-policycoreutils() {
164 einfo "Installing policycoreutils"
165 emake -C "${BUILD_DIR}" DESTDIR="${D}" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" AUDIT_LOG_PRIV="y" PYLIBVER="${EPYTHON}" install || return 1
166 }
167
168 installation-extras() {
169 einfo "Installing policycoreutils-extra"
170 emake -C "${BUILD_DIR}" DESTDIR="${D}" INOTIFYH="${use_dbus}" SHLIBDIR="${D}$(get_libdir)/rc" install || return 1
171 }
172
173 S="${S1}" # policycoreutils
174 python_foreach_impl installation-policycoreutils
175 S="${S2}" # extras
176 python_foreach_impl installation-extras
177 S="${S1}" # back for later
178
179 # remove redhat-style init script
180 rm -fR "${D}/etc/rc.d"
181
182 # compatibility symlinks
183 dosym /sbin/setfiles /usr/sbin/setfiles
184 dosym /$(get_libdir)/rc/runscript_selinux.so /$(get_libdir)/rcscripts/runscript_selinux.so
185
186 # location for permissive definitions
187 dodir /var/lib/selinux
188 keepdir /var/lib/selinux
189
190 # Set version-specific scripts
191 for pyscript in audit2allow sepolgen-ifgen sepolicy chcat; do
192 python_replicate_script "${ED}/usr/bin/${pyscript}"
193 done
194 for pyscript in semanage rlpkg; do
195 python_replicate_script "${ED}/usr/sbin/${pyscript}"
196 done
197
198 dodir /usr/share/doc/${PF}/mcstrans/examples
199 cp -dR "${S1}"/mcstrans/share/examples/* "${D}/usr/share/doc/${PF}/mcstrans/examples"
200 }