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