/[gentoo-x86]/sys-apps/policycoreutils/policycoreutils-2.4_rc4.ebuild
Gentoo

Contents of /sys-apps/policycoreutils/policycoreutils-2.4_rc4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Oct 29 17:33:11 2014 UTC (3 years, 8 months ago) by swift
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Bump to 2.4_rc5

(Portage version: 2.2.8-r2/cvs/Linux x86_64, signed Manifest commit with key 0x2EDD52403B68AF47)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-2.4_rc4.ebuild,v 1.1 2014/10/07 19:04:20 swift Exp $
4
5 EAPI="5"
6 PYTHON_COMPAT=( python2_7 )
7 PYTHON_REQ_USE="xml"
8
9 inherit multilib python-r1 toolchain-funcs eutils
10
11 MY_P="${P//_/-}"
12
13 EXTRAS_VER="1.33"
14 SEMNG_VER="2.4_rc4"
15 SELNX_VER="2.4_rc4"
16 SEPOL_VER="2.4_rc4"
17 PATCHBUNDLE="4"
18
19 IUSE="audit pam dbus"
20
21 DESCRIPTION="SELinux core utilities"
22 HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
23 SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20140826/${MY_P}.tar.gz
24 mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
25
26 LICENSE="GPL-2"
27 SLOT="0"
28 KEYWORDS="~amd64 ~x86"
29
30 COMMON_DEPS=">=sys-libs/libselinux-${SELNX_VER}[python]
31 >=sys-libs/glibc-2.4
32 >=sys-libs/libcap-1.10-r10
33 >=sys-libs/libsemanage-${SEMNG_VER}[python]
34 sys-libs/libcap-ng
35 >=sys-libs/libsepol-${SEPOL_VER}
36 sys-devel/gettext
37 dev-python/ipy
38 dbus? (
39 sys-apps/dbus
40 dev-libs/dbus-glib
41 )
42 audit? ( >=sys-process/audit-1.5.1 )
43 pam? ( sys-libs/pam )
44 ${PYTHON_DEPS}"
45
46 ### libcgroup -> seunshare
47 ### dbus -> restorecond
48
49 # pax-utils for scanelf used by rlpkg
50 RDEPEND="${COMMON_DEPS}
51 dev-python/sepolgen
52 app-misc/pax-utils"
53
54 DEPEND="${COMMON_DEPS}"
55
56 S="${WORKDIR}/${MY_P}"
57 S1="${WORKDIR}/${MY_P}"
58 S2="${WORKDIR}/policycoreutils-extra"
59
60 src_prepare() {
61 epatch "${FILESDIR}/0010-remove-sesandbox-support.patch"
62 epatch "${FILESDIR}/0020-disable-autodetection-of-pam-and-audit.patch"
63 epatch "${FILESDIR}/0030-make-inotify-check-use-flag-triggered.patch"
64 epatch "${FILESDIR}/0040-reverse-access-check-in-run_init.patch"
65 epatch "${FILESDIR}/0070-remove-symlink-attempt-fails-with-gentoo-sandbox-approach.patch"
66 epatch "${FILESDIR}/0110-build-mcstrans-bug-472912.patch"
67 epatch "${FILESDIR}/0120-build-failure-for-mcscolor-for-CONTEXT__CONTAINS.patch"
68
69 # rlpkg is more useful than fixfiles
70 sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
71 || die "fixfiles sed 1 failed"
72 sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
73 || die "fixfiles sed 2 failed"
74
75 epatch_user
76
77 python_copy_sources
78 # Our extra code is outside the regular directory, so set it to the extra
79 # directory. We really should optimize this as it is ugly, but the extra
80 # code is needed for Gentoo at the same time that policycoreutils is present
81 # (so we cannot use an additional package for now).
82 S="${S2}"
83 python_copy_sources
84 }
85
86 src_compile() {
87 local use_audit="n";
88 local use_pam="n";
89 local use_dbus="n";
90 local use_sesandbox="n";
91
92 use audit && use_audit="y";
93 use pam && use_pam="y";
94 use dbus && use_dbus="y";
95
96 building() {
97 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
98 }
99 S="${S1}" # Regular policycoreutils
100 python_foreach_impl building
101 S="${S2}" # Extra set
102 python_foreach_impl building
103 }
104
105 src_install() {
106 local use_audit="n";
107 local use_pam="n";
108 local use_dbus="n";
109 local use_sesandbox="n";
110
111 use audit && use_audit="y";
112 use pam && use_pam="y";
113 use dbus && use_dbus="y";
114
115 # Python scripts are present in many places. There are no extension modules.
116 installation-policycoreutils() {
117 einfo "Installing policycoreutils"
118 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
119 }
120
121 installation-extras() {
122 einfo "Installing policycoreutils-extra"
123 emake -C "${BUILD_DIR}" DESTDIR="${D}" INOTIFYH="${use_dbus}" SHLIBDIR="${D}$(get_libdir)/rc" install || return 1
124 }
125
126 S="${S1}" # policycoreutils
127 python_foreach_impl installation-policycoreutils
128 S="${S2}" # extras
129 python_foreach_impl installation-extras
130 S="${S1}" # back for later
131
132 # remove redhat-style init script
133 rm -fR "${D}/etc/rc.d"
134
135 # compatibility symlinks
136 dosym /sbin/setfiles /usr/sbin/setfiles
137 dosym /$(get_libdir)/rc/runscript_selinux.so /$(get_libdir)/rcscripts/runscript_selinux.so
138
139 # location for permissive definitions
140 dodir /var/lib/selinux
141 keepdir /var/lib/selinux
142
143 # Set version-specific scripts
144 for pyscript in audit2allow sepolgen-ifgen sepolicy chcat; do
145 python_replicate_script "${ED}/usr/bin/${pyscript}"
146 done
147 for pyscript in semanage rlpkg; do
148 python_replicate_script "${ED}/usr/sbin/${pyscript}"
149 done
150
151 dodir /usr/share/doc/${PF}/mcstrans/examples
152 cp -dR "${S1}"/mcstrans/share/examples/* "${D}/usr/share/doc/${PF}/mcstrans/examples"
153 }

  ViewVC Help
Powered by ViewVC 1.1.20