summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatsuu Takuto <matsuu@gentoo.org>2009-07-28 23:48:36 +0000
committerMatsuu Takuto <matsuu@gentoo.org>2009-07-28 23:48:36 +0000
commitfb66eacbf24e2ea8d90b4315049e395c44917397 (patch)
tree2761d110a307aa93bafa64c0773cbb8e43f13fc4 /sys-apps/tomoyo-tools
parentStable for HPPA (bug #279508). (diff)
downloadhistorical-fb66eacbf24e2ea8d90b4315049e395c44917397.tar.gz
historical-fb66eacbf24e2ea8d90b4315049e395c44917397.tar.bz2
historical-fb66eacbf24e2ea8d90b4315049e395c44917397.zip
Initial import, bug #278513.
Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/tomoyo-tools')
-rw-r--r--sys-apps/tomoyo-tools/ChangeLog11
-rw-r--r--sys-apps/tomoyo-tools/Manifest5
-rw-r--r--sys-apps/tomoyo-tools/files/tomoyo-tools-2.2.0_p20090727-gentoo.patch70
-rw-r--r--sys-apps/tomoyo-tools/metadata.xml9
-rw-r--r--sys-apps/tomoyo-tools/tomoyo-tools-2.2.0_p20090727.ebuild63
5 files changed, 158 insertions, 0 deletions
diff --git a/sys-apps/tomoyo-tools/ChangeLog b/sys-apps/tomoyo-tools/ChangeLog
new file mode 100644
index 000000000000..efcf343ff8ad
--- /dev/null
+++ b/sys-apps/tomoyo-tools/ChangeLog
@@ -0,0 +1,11 @@
+# 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 $
+
+*tomoyo-tools-2.2.0_p20090727 (28 Jul 2009)
+
+ 28 Jul 2009; MATSUU Takuto <matsuu@gentoo.org>
+ +tomoyo-tools-2.2.0_p20090727.ebuild,
+ +files/tomoyo-tools-2.2.0_p20090727-gentoo.patch, +metadata.xml:
+ Initial import, bug #278513.
+
diff --git a/sys-apps/tomoyo-tools/Manifest b/sys-apps/tomoyo-tools/Manifest
new file mode 100644
index 000000000000..26c07cfb4435
--- /dev/null
+++ b/sys-apps/tomoyo-tools/Manifest
@@ -0,0 +1,5 @@
+AUX tomoyo-tools-2.2.0_p20090727-gentoo.patch 2403 RMD160 5f0555e62a4e0f6bfe144788c0be1c1c3685b5b1 SHA1 eabeb2fb551db3e81e482dc83ef24269091308e8 SHA256 3bc752c81127fb385aa1c55e1af900b59c9a7cbe9299d70222772f13bcc8c129
+DIST tomoyo-tools-2.2.0-20090727.tar.gz 75829 RMD160 df7e4e72267aaa0ec2fa546465e1112a858d96e4 SHA1 38e8c1f26f2fbe121a8837515623831a1f348a1c SHA256 7fe5b453b91dd95e7b9c318acf9643737228edc4888addd1891117646fc68527
+EBUILD tomoyo-tools-2.2.0_p20090727.ebuild 1558 RMD160 d694dc41c133c4bb41e2806bc7381253f9af493f SHA1 5282f0217b5862263c8ab98041b31464a74bfcda SHA256 2b33c94b74c8c63874ceae0b5353dd2b256aa007564a43e26edd6c52ed4aee31
+MISC ChangeLog 448 RMD160 7a0368cced5368755443f98d43ac1987ad16fe90 SHA1 6cfa49561ae99a01e64ac3e0c02f48f94ddd73b0 SHA256 c0877c107aa4867824098b5124894fc90e0179837c98450157b5a0deee9ee33a
+MISC metadata.xml 221 RMD160 ca5e46f2e947fcae430e49859acaa4b25ab9d4b4 SHA1 b7f58eb04a9aceeb67104c0b81719e6e97da97f4 SHA256 138123f5d6199cbcc391346419b7b81d3ae9153c17670b18c540ff75a2287371
diff --git a/sys-apps/tomoyo-tools/files/tomoyo-tools-2.2.0_p20090727-gentoo.patch b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.2.0_p20090727-gentoo.patch
new file mode 100644
index 000000000000..8b0187c2d2c0
--- /dev/null
+++ b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.2.0_p20090727-gentoo.patch
@@ -0,0 +1,70 @@
+diff -Naur tomoyo-tools.orig/tomoyo_init_policy.c tomoyo-tools/tomoyo_init_policy.c
+--- tomoyo-tools.orig/tomoyo_init_policy.c 2009-07-27 15:00:00.000000000 +0900
++++ tomoyo-tools/tomoyo_init_policy.c 2009-07-29 01:56:32.000000000 +0900
+@@ -728,6 +728,15 @@
+ echo("file_pattern "
+ "/tmp/crontab.\\?\\?\\?\\?\\?\\?/crontab");
+ }
++ const char *exe = which("crontab");
++ if (!exe)
++ return;
++ if (fgrep("crontab.XXXXXXXXXX", exe))
++ echo("file_pattern /tmp/crontab.XXXX\\?\\?\\?\\?\\?\\?");
++ if (fgrep("crontab.XXXXXX", exe))
++ echo("file_pattern /tmp/crontab.\\?\\?\\?\\?\\?\\?");
++ if (fgrep("fcr-XXXXXX", exe))
++ echo("file_pattern /tmp/fcr-\\?\\?\\?\\?\\?\\?");
+ }
+
+ static void make_globally_readable_files(void)
+@@ -737,6 +746,8 @@
+ "/etc/ld.so.cache", "/proc/meminfo",
+ "/proc/sys/kernel/version", "/etc/localtime",
+ "/usr/lib/gconv/gconv-modules.cache",
++ "/usr/lib32/gconv/gconv-modules.cache",
++ "/usr/lib64/gconv/gconv-modules.cache",
+ "/usr/share/locale/locale.alias"
+ };
+ int i;
+@@ -813,6 +824,7 @@
+ "/sbin/syslogd",
+ "/sbin/udevd",
+ "/usr/X11R6/bin/xfs",
++ "/usr/bin/dbus-daemon",
+ "/usr/bin/dbus-daemon-1",
+ "/usr/bin/jserver",
+ "/usr/bin/mDNSResponder",
+@@ -906,6 +918,11 @@
+ echo("file_pattern /var/spool/squid/\\*/\\*/");
+ echo("file_pattern /var/spool/squid/\\*/\\*/\\*");
+ }
++ if (!lstat("/var/cache/squid", &buf) && S_ISDIR(buf.st_mode)) {
++ echo("file_pattern /var/cache/squid/\\*/");
++ echo("file_pattern /var/cache/squid/\\*/\\*/");
++ echo("file_pattern /var/cache/squid/\\*/\\*/\\*");
++ }
+ }
+
+ static void make_patterns_for_spamd(void)
+@@ -1059,6 +1076,10 @@
+ }
+ if (fgrep("/tmp/whatis.XXXXXX", exe))
+ echo("file_pattern /tmp/whatis.\\?\\?\\?\\?\\?\\?");
++ if (fgrep("/tmp/whatis.tmp.dir.$$", exe)) {
++ echo("file_pattern /tmp/whatis.tmp.dir\\$/");
++ echo("file_pattern /tmp/whatis.tmp.dir\\$/w");
++ }
+ }
+
+ static void make_patterns_for_automount(void)
+@@ -1238,6 +1259,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/metadata.xml b/sys-apps/tomoyo-tools/metadata.xml
new file mode 100644
index 000000000000..5b14597b8ad0
--- /dev/null
+++ b/sys-apps/tomoyo-tools/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+<email>matsuu@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
+
diff --git a/sys-apps/tomoyo-tools/tomoyo-tools-2.2.0_p20090727.ebuild b/sys-apps/tomoyo-tools/tomoyo-tools-2.2.0_p20090727.ebuild
new file mode 100644
index 000000000000..f141c0be301a
--- /dev/null
+++ b/sys-apps/tomoyo-tools/tomoyo-tools-2.2.0_p20090727.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2009 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.2.0_p20090727.ebuild,v 1.1 2009/07/28 23:48:36 matsuu Exp $
+
+inherit eutils multilib toolchain-funcs
+
+MY_P="${P/_p/-}"
+DESCRIPTION="TOMOYO Linux tools"
+HOMEPAGE="http://tomoyo.sourceforge.jp/"
+SRC_URI="mirror://sourceforge.jp/tomoyo/41908/${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_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+
+ sed -i \
+ -e "/^CC=/s:gcc:$(tc-getCC):" \
+ -e "/^CFLAGS=/s:-O2:${CFLAGS}:" \
+ -e "s:/usr/lib/:/usr/$(get_libdir)/:g" \
+ Makefile || die
+
+ echo "CONFIG_PROTECT=\"/usr/$(get_libdir)/tomoyo/conf\"" > "${T}/50${PN}"
+}
+
+src_install() {
+ emake INSTALLDIR="${D}" install || die
+
+ rm "${D}"/usr/$(get_libdir)/tomoyo/{COPYING.tomoyo,README.tomoyo,tomoyotools.conf} || die
+ insinto /usr/$(get_libdir)/tomoyo/conf
+ doins tomoyotools.conf || die
+ dosym conf/tomoyotools.conf /usr/$(get_libdir)/tomoyo/tomoyotools.conf || die
+
+ doenvd "${T}/50${PN}" || die
+
+ dodoc README.tomoyo
+}
+
+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/tomoyo_init_policy
+}