diff options
author | Matsuu Takuto <matsuu@gentoo.org> | 2009-07-28 23:48:36 +0000 |
---|---|---|
committer | Matsuu Takuto <matsuu@gentoo.org> | 2009-07-28 23:48:36 +0000 |
commit | 191c74b713b40718d9a0bffa1e9fb51242dfd7e3 (patch) | |
tree | a42f1eb3a6cf6c825df85b827d9a8b57500d4f6e /sys-apps/tomoyo-tools | |
parent | Stable for HPPA (bug #279508). (diff) | |
download | gentoo-2-191c74b713b40718d9a0bffa1e9fb51242dfd7e3.tar.gz gentoo-2-191c74b713b40718d9a0bffa1e9fb51242dfd7e3.tar.bz2 gentoo-2-191c74b713b40718d9a0bffa1e9fb51242dfd7e3.zip |
Initial import, bug #278513.
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/tomoyo-tools')
-rw-r--r-- | sys-apps/tomoyo-tools/ChangeLog | 11 | ||||
-rw-r--r-- | sys-apps/tomoyo-tools/files/tomoyo-tools-2.2.0_p20090727-gentoo.patch | 70 | ||||
-rw-r--r-- | sys-apps/tomoyo-tools/metadata.xml | 9 | ||||
-rw-r--r-- | sys-apps/tomoyo-tools/tomoyo-tools-2.2.0_p20090727.ebuild | 63 |
4 files changed, 153 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/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 +} |