summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2011-01-17 22:44:30 +0000
committerSebastian Pipping <sping@gentoo.org>2011-01-17 22:44:30 +0000
commite22186c7c6af1e982c11db69892ecc124b28ee4d (patch)
tree9424941d99e142c813c7484b86195344f936ef04 /sys-apps/tomoyo-tools
parentStable on amd64 wrt bug #351781. Remove old ebuild (diff)
downloadgentoo-2-e22186c7c6af1e982c11db69892ecc124b28ee4d.tar.gz
gentoo-2-e22186c7c6af1e982c11db69892ecc124b28ee4d.tar.bz2
gentoo-2-e22186c7c6af1e982c11db69892ecc124b28ee4d.zip
sys-apps/tomoyo-tools: Bump to 2.3.0_p20100820 (bug #342169)
(Portage version: 2.1.9.31/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/tomoyo-tools')
-rw-r--r--sys-apps/tomoyo-tools/ChangeLog16
-rw-r--r--sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20100820-flags-parallel.patch102
-rw-r--r--sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20100820-gentoo.patch16
-rw-r--r--sys-apps/tomoyo-tools/tomoyo-tools-2.3.0_p20100820.ebuild70
4 files changed, 202 insertions, 2 deletions
diff --git a/sys-apps/tomoyo-tools/ChangeLog b/sys-apps/tomoyo-tools/ChangeLog
index efcf343ff8ad..a3f3b975930e 100644
--- a/sys-apps/tomoyo-tools/ChangeLog
+++ b/sys-apps/tomoyo-tools/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for sys-apps/tomoyo-tools
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/tomoyo-tools/ChangeLog,v 1.1 2009/07/28 23:48:36 matsuu Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/tomoyo-tools/ChangeLog,v 1.2 2011/01/17 22:44:30 sping Exp $
+
+*tomoyo-tools-2.3.0_p20100820 (17 Jan 2011)
+
+ 17 Jan 2011; Sebastian Pipping <sping@gentoo.org>
+ +tomoyo-tools-2.3.0_p20100820.ebuild,
+ +files/tomoyo-tools-2.3.0_p20100820-flags-parallel.patch,
+ +files/tomoyo-tools-2.3.0_p20100820-gentoo.patch:
+ Bump to 2.3.0_p20100820 (bug #342169)
+ - Move to EAPI 2
+ - Start respecting LDFLAGS
+ - Port patch from 2.2.0_p20090727
+ - Fix parallel make issue
*tomoyo-tools-2.2.0_p20090727 (28 Jul 2009)
diff --git a/sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20100820-flags-parallel.patch b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20100820-flags-parallel.patch
new file mode 100644
index 000000000000..8b5167702a92
--- /dev/null
+++ b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20100820-flags-parallel.patch
@@ -0,0 +1,102 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,12 +1,4 @@
+-INSTALLDIR = /
+-
+-CC=gcc
+-
+-CFLAGS=-Wall -O2 ${shell $(CC) -Wno-pointer-sign -S -o /dev/null -x c - < /dev/null > /dev/null 2>&1 && echo "-Wno-pointer-sign"}
+-
+-export CC
+-export CFLAGS
+-export INSTALLDIR
++CFLAGS += -Wall ${shell $(CC) -Wno-pointer-sign -S -o /dev/null -x c - < /dev/null > /dev/null 2>&1 && echo "-Wno-pointer-sign"}
+
+ all:
+ $(MAKE) -C sbin/ all
+--- a/kernel_test/Makefile
++++ b/kernel_test/Makefile
+@@ -3,20 +3,18 @@ ALL_FILES = tomoyo_filesystem_test tomoyo_file_test tomoyo_rewrite_test newns to
+ all: $(ALL_FILES)
+ chmod 755 testall.sh
+
+-CC=gcc
+-
+-CFLAGS=-Wall -O2 ${shell $(CC) -Wno-pointer-sign -S -o /dev/null -x c - < /dev/null > /dev/null 2>&1 && echo "-Wno-pointer-sign"}
++CFLAGS += -Wall ${shell $(CC) -Wno-pointer-sign -S -o /dev/null -x c - < /dev/null > /dev/null 2>&1 && echo "-Wno-pointer-sign"}
+
+ #
+ # Tools for kernel testing.
+ #
+
+ tomoyo_new_test: tomoyo_new_test.c include.h
+- $(CC) $(CFLAGS) -o tomoyo_new_test tomoyo_new_test.c -lutil
++ $(CC) $(CFLAGS) $(LDFLAGS) -o tomoyo_new_test tomoyo_new_test.c -lutil
+ chmod 700 tomoyo_new_test
+
+ .c: include.h
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+ chmod 700 $@
+
+ #
+--- a/sbin/Makefile
++++ b/sbin/Makefile
+@@ -9,7 +9,7 @@ install: all
+ cp -af --remove-destination $(BUILD_FILES) $(INSTALLDIR)/sbin/
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ clean:
+ rm -f -- $(BUILD_FILES)
+--- a/usr_lib_tomoyo/Makefile
++++ b/usr_lib_tomoyo/Makefile
+@@ -9,7 +9,7 @@ install: all
+ cp -af --remove-destination $(BUILD_FILES) tomoyotools.conf ../README.tomoyo ../COPYING.tomoyo $(INSTALLDIR)/usr/lib/tomoyo/
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ clean:
+ rm -f -- $(BUILD_FILES)
+--- a/usr_sbin/Makefile 2011-01-17 22:55:46.784698002 +0100
++++ b/usr_sbin/Makefile 2011-01-17 23:01:59.420137754 +0100
+@@ -1,25 +1,29 @@
+ BUILD_FILES = tomoyo-domainmatch tomoyo-queryd tomoyo-pstree tomoyo-checkpolicy tomoyo-editpolicy tomoyo-findtemp tomoyo-ld-watch tomoyo-loadpolicy tomoyo-patternize tomoyo-savepolicy tomoyo-setlevel tomoyo-setprofile tomoyo-sortpolicy tomoyo-diffpolicy tomoyo-selectpolicy
++SIMPLE = tomoyo-domainmatch tomoyo-pstree tomoyo-checkpolicy tomoyo-findtemp tomoyo-ld-watch tomoyo-loadpolicy tomoyo-patternize tomoyo-savepolicy tomoyo-setlevel tomoyo-setprofile tomoyo-sortpolicy tomoyo-diffpolicy tomoyo-selectpolicy
+
+ all: libtomoyotools.so $(BUILD_FILES)
+
++$(SIMPLE): % : %.c libtomoyotools.so
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -ltomoyotools -L.
++
+ /usr/include/curses.h:
+ @echo "/usr/include/curses.h is missing."
+ @echo "Run 'yum install ncurses-devel' or 'apt-get install libncurses5-dev'"
+ sleep 10
+
+-tomoyo-editpolicy: tomoyotools.h editpolicy*.c readline.h /usr/include/curses.h
+- $(CC) $(CFLAGS) -o tomoyo-editpolicy editpolicy*.c -lncurses -ltomoyotools -L. -DCOLOR_ON || ln -f dummy tomoyo-editpolicy
++tomoyo-editpolicy: tomoyotools.h editpolicy*.c readline.h /usr/include/curses.h libtomoyotools.so
++ $(CC) $(CFLAGS) $(LDFLAGS) -o tomoyo-editpolicy editpolicy*.c -lncurses -ltomoyotools -L. -DCOLOR_ON
+
+-tomoyo-queryd: tomoyotools.h tomoyo-queryd.c readline.h /usr/include/curses.h
+- $(CC) $(CFLAGS) -o tomoyo-queryd tomoyo-queryd.c -lncurses -ltomoyotools -L. || ln -f dummy tomoyo-queryd
++tomoyo-queryd: tomoyotools.h tomoyo-queryd.c readline.h /usr/include/curses.h libtomoyotools.so
++ $(CC) $(CFLAGS) $(LDFLAGS) -o tomoyo-queryd tomoyo-queryd.c -lncurses -ltomoyotools -L.
+
+ libtomoyotools.so: tomoyotools.c tomoyotools.h
+- $(CC) $(CFLAGS) -fPIC tomoyotools.c -shared -Wl,-soname,libtomoyotools.so.1 -o libtomoyotools.so.1.0.0
++ $(CC) $(CFLAGS) -fPIC $(LDFLAGS) tomoyotools.c -shared -Wl,-soname,libtomoyotools.so.1 -o libtomoyotools.so.1.0.0
+ ln -sf libtomoyotools.so.1.0.0 libtomoyotools.so
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ -ltomoyotools -L. $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -ltomoyotools -L. $<
+
+ install: all
+ mkdir -p $(INSTALLDIR)/usr/sbin $(INSTALLDIR)/usr/lib
+ cp -af --remove-destination $(BUILD_FILES) $(INSTALLDIR)/usr/sbin/
diff --git a/sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20100820-gentoo.patch b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20100820-gentoo.patch
new file mode 100644
index 000000000000..7e005702e6a0
--- /dev/null
+++ b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20100820-gentoo.patch
@@ -0,0 +1,16 @@
+This is tomoyo-tools-2.2.0_p20090727-gentoo.patch blindly ported to 2.3.0.
+Every other change is included by now.
+
+--- usr_lib_tomoyo/init_policy.c 2011-01-17 22:50:05.241899861 +0100
++++ usr_lib_tomoyo/init_policy.c 2011-01-17 22:51:00.172806713 +0100
+@@ -1106,6 +1106,10 @@
+ echo("file_pattern /etc/gshadow.\\$");
+ echo("file_pattern /etc/passwd.\\$");
+ echo("file_pattern /etc/shadow.\\$");
++ echo("file_pattern /etc/group.edit");
++ echo("file_pattern /etc/gshadow.edit");
++ echo("file_pattern /etc/passwd.edit");
++ echo("file_pattern /etc/shadow.edit");
+ echo("file_pattern /var/cache/logwatch/logwatch.\\*/");
+ echo("file_pattern /var/cache/logwatch/logwatch.\\*/\\*");
+ echo("file_pattern /var/tmp/sqlite_\\*");
diff --git a/sys-apps/tomoyo-tools/tomoyo-tools-2.3.0_p20100820.ebuild b/sys-apps/tomoyo-tools/tomoyo-tools-2.3.0_p20100820.ebuild
new file mode 100644
index 000000000000..811f157d2382
--- /dev/null
+++ b/sys-apps/tomoyo-tools/tomoyo-tools-2.3.0_p20100820.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/tomoyo-tools/tomoyo-tools-2.3.0_p20100820.ebuild,v 1.1 2011/01/17 22:44:30 sping Exp $
+
+EAPI="2"
+
+inherit eutils multilib toolchain-funcs
+
+MY_P="${P/_p/-}"
+DESCRIPTION="TOMOYO Linux tools"
+HOMEPAGE="http://tomoyo.sourceforge.jp/"
+SRC_URI="mirror://sourceforge.jp/tomoyo/48663/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="sys-libs/ncurses"
+RDEPEND="${DEPEND}
+ !sys-apps/ccs-tools"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-flags-parallel.patch \
+ "${FILESDIR}"/${P}-gentoo.patch
+
+ # Fix libdir
+ for makefile in {,*/}Makefile
+ do
+ sed -i \
+ -e "s:/usr/lib/:/usr/$(get_libdir)/:g" \
+ "${makefile}" || die
+ done
+
+ echo "CONFIG_PROTECT=\"/usr/$(get_libdir)/tomoyo/conf\"" > "${T}/50${PN}"
+}
+
+src_install() {
+ dodir /usr/"$(get_libdir)" || die
+
+ emake INSTALLDIR="${D}" install || die
+
+ # Move-link tomoyotools.conf to subdir "conf"
+ rm "${D}"/usr/$(get_libdir)/tomoyo/tomoyotools.conf || die
+ insinto /usr/$(get_libdir)/tomoyo/conf
+ doins usr_lib_tomoyo/tomoyotools.conf || die
+ dosym conf/tomoyotools.conf /usr/$(get_libdir)/tomoyo/tomoyotools.conf || die
+
+ doenvd "${T}/50${PN}" || die
+
+ # Fix out-of-place readme and license
+ rm "${D}"/usr/$(get_libdir)/tomoyo/{COPYING.tomoyo,README.tomoyo} || die
+ dodoc README.tomoyo || die
+}
+
+pkg_postinst() {
+ elog "Execute the following command to setup the initial policy configuration:"
+ elog
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog
+ elog "For more information, please visit the following."
+ elog
+ elog "http://tomoyo.sourceforge.jp/"
+}
+
+pkg_config() {
+ /usr/$(get_libdir)/tomoyo/init_policy
+}