From b8d2a0230e460112c4747b9e3533621364b686a4 Mon Sep 17 00:00:00 2001 From: geos_one Date: Tue, 6 Mar 2007 23:23:03 +0000 Subject: [PATCH] Initial import of Matthew Snelham latest ebuilds into the devel tree and the skel.* files --- .../app-doc/apparmor-docs/ChangeLog | 9 + .../app-doc/apparmor-docs/Manifest | 12 + .../apparmor-docs-2.0_p6269.ebuild | 42 ++ .../files/digest-apparmor-docs-2.0_p6269 | 3 + .../app-vim/apparmor-syntax/ChangeLog | 9 + .../app-vim/apparmor-syntax/Manifest | 12 + .../apparmor-syntax-200609.ebuild | 14 + .../files/digest-apparmor-syntax-200609 | 3 + branches/experimental/scripts/echangelog | 403 ++++++++++++++++ .../sec-policy/apparmor-profiles/ChangeLog | 9 + .../sec-policy/apparmor-profiles/Manifest | 16 + .../apparmor-profiles-2.0_p119.ebuild | 60 +++ .../files/digest-apparmor-profiles-2.0_p119 | 3 + .../sec-policy/apparmor-profiles/metadata.xml | 11 + branches/experimental/skel.ChangeLog | 67 +++ branches/experimental/skel.metadata.xml | 5 + .../sys-apps/apparmor-modules/ChangeLog | 10 + .../sys-apps/apparmor-modules/Manifest | 20 + .../apparmor-modules-2.0_p20061013.ebuild | 85 ++++ ...r-modules-2.0_2.6.17.9_symbol_export.patch | 83 ++++ .../digest-apparmor-modules-2.0_p20061013 | 3 + .../sys-apps/apparmor-modules/metadata.xml | 11 + .../sys-apps/apparmor-parser/ChangeLog | 10 + .../sys-apps/apparmor-parser/Manifest | 32 ++ .../apparmor-parser-2.0_p150.ebuild | 62 +++ .../sys-apps/apparmor-parser/files/aaeventd | 40 ++ .../sys-apps/apparmor-parser/files/apparmor | 55 +++ .../files/digest-apparmor-parser-2.0_p150 | 3 + .../files/rc.apparmor.functions | 443 ++++++++++++++++++ .../apparmor-parser/files/rc.helper.functions | 47 ++ .../sys-apps/apparmor-parser/metadata.xml | 11 + .../sys-apps/apparmor-utils/ChangeLog | 9 + .../sys-apps/apparmor-utils/Manifest | 16 + .../apparmor-utils-2.0_p142.ebuild | 55 +++ .../files/digest-apparmor-utils-2.0_p142 | 3 + .../sys-apps/apparmor-utils/metadata.xml | 11 + .../sys-kernel/apparmor-sources/ChangeLog | 10 + .../sys-kernel/apparmor-sources/Manifest | 30 ++ .../apparmor-sources-2.6.17.ebuild | 45 ++ .../apparmor-sources-2.6.18.ebuild | 45 ++ .../files/digest-apparmor-sources-2.6.17 | 12 + .../files/digest-apparmor-sources-2.6.18 | 12 + .../sys-kernel/apparmor-sources/metadata.xml | 11 + .../sys-libs/libapparmor/ChangeLog | 9 + .../sys-libs/libapparmor/Manifest | 16 + .../files/digest-libapparmor-2.0_p132 | 3 + .../libapparmor/libapparmor-2.0_p132.ebuild | 39 ++ .../sys-libs/libapparmor/metadata.xml | 11 + 48 files changed, 1930 insertions(+) create mode 100644 branches/experimental/app-doc/apparmor-docs/ChangeLog create mode 100644 branches/experimental/app-doc/apparmor-docs/Manifest create mode 100644 branches/experimental/app-doc/apparmor-docs/apparmor-docs-2.0_p6269.ebuild create mode 100644 branches/experimental/app-doc/apparmor-docs/files/digest-apparmor-docs-2.0_p6269 create mode 100644 branches/experimental/app-vim/apparmor-syntax/ChangeLog create mode 100644 branches/experimental/app-vim/apparmor-syntax/Manifest create mode 100644 branches/experimental/app-vim/apparmor-syntax/apparmor-syntax-200609.ebuild create mode 100644 branches/experimental/app-vim/apparmor-syntax/files/digest-apparmor-syntax-200609 create mode 100755 branches/experimental/scripts/echangelog create mode 100644 branches/experimental/sec-policy/apparmor-profiles/ChangeLog create mode 100644 branches/experimental/sec-policy/apparmor-profiles/Manifest create mode 100644 branches/experimental/sec-policy/apparmor-profiles/apparmor-profiles-2.0_p119.ebuild create mode 100644 branches/experimental/sec-policy/apparmor-profiles/files/digest-apparmor-profiles-2.0_p119 create mode 100644 branches/experimental/sec-policy/apparmor-profiles/metadata.xml create mode 100644 branches/experimental/skel.ChangeLog create mode 100644 branches/experimental/skel.metadata.xml create mode 100644 branches/experimental/sys-apps/apparmor-modules/ChangeLog create mode 100644 branches/experimental/sys-apps/apparmor-modules/Manifest create mode 100644 branches/experimental/sys-apps/apparmor-modules/apparmor-modules-2.0_p20061013.ebuild create mode 100644 branches/experimental/sys-apps/apparmor-modules/files/apparmor-modules-2.0_2.6.17.9_symbol_export.patch create mode 100644 branches/experimental/sys-apps/apparmor-modules/files/digest-apparmor-modules-2.0_p20061013 create mode 100644 branches/experimental/sys-apps/apparmor-modules/metadata.xml create mode 100644 branches/experimental/sys-apps/apparmor-parser/ChangeLog create mode 100644 branches/experimental/sys-apps/apparmor-parser/Manifest create mode 100644 branches/experimental/sys-apps/apparmor-parser/apparmor-parser-2.0_p150.ebuild create mode 100755 branches/experimental/sys-apps/apparmor-parser/files/aaeventd create mode 100755 branches/experimental/sys-apps/apparmor-parser/files/apparmor create mode 100644 branches/experimental/sys-apps/apparmor-parser/files/digest-apparmor-parser-2.0_p150 create mode 100755 branches/experimental/sys-apps/apparmor-parser/files/rc.apparmor.functions create mode 100644 branches/experimental/sys-apps/apparmor-parser/files/rc.helper.functions create mode 100644 branches/experimental/sys-apps/apparmor-parser/metadata.xml create mode 100644 branches/experimental/sys-apps/apparmor-utils/ChangeLog create mode 100644 branches/experimental/sys-apps/apparmor-utils/Manifest create mode 100644 branches/experimental/sys-apps/apparmor-utils/apparmor-utils-2.0_p142.ebuild create mode 100644 branches/experimental/sys-apps/apparmor-utils/files/digest-apparmor-utils-2.0_p142 create mode 100644 branches/experimental/sys-apps/apparmor-utils/metadata.xml create mode 100644 branches/experimental/sys-kernel/apparmor-sources/ChangeLog create mode 100644 branches/experimental/sys-kernel/apparmor-sources/Manifest create mode 100644 branches/experimental/sys-kernel/apparmor-sources/apparmor-sources-2.6.17.ebuild create mode 100644 branches/experimental/sys-kernel/apparmor-sources/apparmor-sources-2.6.18.ebuild create mode 100644 branches/experimental/sys-kernel/apparmor-sources/files/digest-apparmor-sources-2.6.17 create mode 100644 branches/experimental/sys-kernel/apparmor-sources/files/digest-apparmor-sources-2.6.18 create mode 100644 branches/experimental/sys-kernel/apparmor-sources/metadata.xml create mode 100644 branches/experimental/sys-libs/libapparmor/ChangeLog create mode 100644 branches/experimental/sys-libs/libapparmor/Manifest create mode 100644 branches/experimental/sys-libs/libapparmor/files/digest-libapparmor-2.0_p132 create mode 100644 branches/experimental/sys-libs/libapparmor/libapparmor-2.0_p132.ebuild create mode 100644 branches/experimental/sys-libs/libapparmor/metadata.xml diff --git a/branches/experimental/app-doc/apparmor-docs/ChangeLog b/branches/experimental/app-doc/apparmor-docs/ChangeLog new file mode 100644 index 00000000..5fa49203 --- /dev/null +++ b/branches/experimental/app-doc/apparmor-docs/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for app-doc/apparmor-docs +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 06 Mar 2007; Mario Fetka + +apparmor-docs-2.0_p6269.ebuild: + Initial import of Matthew Snelham latest ebuilds + into the devel tree + diff --git a/branches/experimental/app-doc/apparmor-docs/Manifest b/branches/experimental/app-doc/apparmor-docs/Manifest new file mode 100644 index 00000000..0546e442 --- /dev/null +++ b/branches/experimental/app-doc/apparmor-docs/Manifest @@ -0,0 +1,12 @@ +DIST apparmor-docs-2.0-6269.tar.gz 2697657 RMD160 474048d988d72cbf9bf21d50e8aef37d06d9b000 SHA1 792f4339d86d02d179b786de87a47394abfdadae SHA256 9c2d63bfe42cc4582e24d1248a7560dd19cee718db513c7dedb12d45fe168221 +EBUILD apparmor-docs-2.0_p6269.ebuild 955 RMD160 d8e2b568269b58dfdf67704439a2eea71d32cb89 SHA1 5ec73e880448e1fa0321726cec801fcee12105c7 SHA256 515819c8105682776170578184cf030888810f5936d088bc2f0abc36a43db498 +MD5 435da534a2815cd8822a98f7084ed7c8 apparmor-docs-2.0_p6269.ebuild 955 +RMD160 d8e2b568269b58dfdf67704439a2eea71d32cb89 apparmor-docs-2.0_p6269.ebuild 955 +SHA256 515819c8105682776170578184cf030888810f5936d088bc2f0abc36a43db498 apparmor-docs-2.0_p6269.ebuild 955 +MISC ChangeLog 301 RMD160 4ebfc50ffdf97c72224b84b34965849248d8de2f SHA1 c063f5d4769bbbfaf6070f50a4bdd37588ba028f SHA256 df342ac5092a0f420708564794064a0f40173138dc8b7819e330affe623da765 +MD5 edf42213edf36e454eceaaafef17f044 ChangeLog 301 +RMD160 4ebfc50ffdf97c72224b84b34965849248d8de2f ChangeLog 301 +SHA256 df342ac5092a0f420708564794064a0f40173138dc8b7819e330affe623da765 ChangeLog 301 +MD5 2729ec9e31f63d936db2d7745ef9be57 files/digest-apparmor-docs-2.0_p6269 271 +RMD160 1c537c1e781a06a7bac39b2cfb7170ba281bb875 files/digest-apparmor-docs-2.0_p6269 271 +SHA256 1a62f3ad2e11540f9e65c1c623357a588f44ecd1244c2559c6436f426aa210ba files/digest-apparmor-docs-2.0_p6269 271 diff --git a/branches/experimental/app-doc/apparmor-docs/apparmor-docs-2.0_p6269.ebuild b/branches/experimental/app-doc/apparmor-docs/apparmor-docs-2.0_p6269.ebuild new file mode 100644 index 00000000..bbdaf3b2 --- /dev/null +++ b/branches/experimental/app-doc/apparmor-docs/apparmor-docs-2.0_p6269.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils perl-module toolchain-funcs + +MY_PV="${PV/_p/-}" +MY_P="${PN}-${MY_PV}" +MY_S="${WORKDIR}/${PN}-${PV/_p*/}" +MONTH="April" + +DESCRIPTION="Documentation for AppArmor." +HOMEPAGE="http://forge.novell.com/modules/xfmod/project/?apparmor" +SRC_URI="http://forgeftp.novell.com/apparmor/Development%20-%20${MONTH}%20Snapshot/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="doc" + +DEPEND="" +RDEPEND="${DEPEND}" + +src_unpack() { + unpack ${A} + + cd ${MY_S} + sed -i "s:NOVELL/SUSE:Gentoo:g" Makefile +} + +src_compile() { + cd ${MY_S} + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die +} + +src_install() { + cd ${MY_S} + make DESTDIR=${D} install_manpages || die + # Some files are missing from the doc distribution, so no '|| die' + # bug submitted upstream + make DESTDIR=${D} DOCDIR=/usr/share/doc/${P} install_documents +} diff --git a/branches/experimental/app-doc/apparmor-docs/files/digest-apparmor-docs-2.0_p6269 b/branches/experimental/app-doc/apparmor-docs/files/digest-apparmor-docs-2.0_p6269 new file mode 100644 index 00000000..9c4eee3e --- /dev/null +++ b/branches/experimental/app-doc/apparmor-docs/files/digest-apparmor-docs-2.0_p6269 @@ -0,0 +1,3 @@ +MD5 a5130a30a6a9e7cac316fe7658af031a apparmor-docs-2.0-6269.tar.gz 2697657 +RMD160 474048d988d72cbf9bf21d50e8aef37d06d9b000 apparmor-docs-2.0-6269.tar.gz 2697657 +SHA256 9c2d63bfe42cc4582e24d1248a7560dd19cee718db513c7dedb12d45fe168221 apparmor-docs-2.0-6269.tar.gz 2697657 diff --git a/branches/experimental/app-vim/apparmor-syntax/ChangeLog b/branches/experimental/app-vim/apparmor-syntax/ChangeLog new file mode 100644 index 00000000..0f7a2885 --- /dev/null +++ b/branches/experimental/app-vim/apparmor-syntax/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for app-vim/apparmor-syntax +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 06 Mar 2007; Mario Fetka + +apparmor-syntax-200609.ebuild: + Initial import of Matthew Snelham latest ebuilds into + the devel tree + diff --git a/branches/experimental/app-vim/apparmor-syntax/Manifest b/branches/experimental/app-vim/apparmor-syntax/Manifest new file mode 100644 index 00000000..96db03ef --- /dev/null +++ b/branches/experimental/app-vim/apparmor-syntax/Manifest @@ -0,0 +1,12 @@ +DIST apparmor-syntax-200609.tar.bz2 1944 RMD160 ffffda77d691edfdbdc2044f6b7aa6f33f7bb223 SHA1 602a63663b4c82183cdee568fffee6eea53b3ee1 SHA256 db5aa288aa500f6b7d3bbe3a51949d3a427ee015b385c5353ada8d78846dfe0a +EBUILD apparmor-syntax-200609.ebuild 424 RMD160 3c72c1d094725991090caf225fbdef03656023f0 SHA1 de490b6ce278fb9332e930eda9db4f9d425bc539 SHA256 88da38a77d00673381fe30c2ee81161d3d5bf155e0783d2d008625ffe3b18581 +MD5 6889c3398c74f912f1f9db4c536d4e4b apparmor-syntax-200609.ebuild 424 +RMD160 3c72c1d094725991090caf225fbdef03656023f0 apparmor-syntax-200609.ebuild 424 +SHA256 88da38a77d00673381fe30c2ee81161d3d5bf155e0783d2d008625ffe3b18581 apparmor-syntax-200609.ebuild 424 +MISC ChangeLog 302 RMD160 34359b2bd16f16a239b5f40a12cbca47ba9591a1 SHA1 dc0018125402877b2ebd206469e8432dd88b2ec7 SHA256 1a06e2075b1da661b8f20677a24c9c0580cd91ec19bb82a2f46b2d751e3dd853 +MD5 0800c352545e66e97e47431ccfa38848 ChangeLog 302 +RMD160 34359b2bd16f16a239b5f40a12cbca47ba9591a1 ChangeLog 302 +SHA256 1a06e2075b1da661b8f20677a24c9c0580cd91ec19bb82a2f46b2d751e3dd853 ChangeLog 302 +MD5 c72538221b6d11278c4aa3364e2818bb files/digest-apparmor-syntax-200609 265 +RMD160 feff8dcf95a810e9ee6eba1e03a135379d2434ef files/digest-apparmor-syntax-200609 265 +SHA256 e7cfd2f74c1811198bee4763f1f5f8400d8780bd9d3c49eeed2a977540d2e6f5 files/digest-apparmor-syntax-200609 265 diff --git a/branches/experimental/app-vim/apparmor-syntax/apparmor-syntax-200609.ebuild b/branches/experimental/app-vim/apparmor-syntax/apparmor-syntax-200609.ebuild new file mode 100644 index 00000000..3e46b7d0 --- /dev/null +++ b/branches/experimental/app-vim/apparmor-syntax/apparmor-syntax-200609.ebuild @@ -0,0 +1,14 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit vim-plugin + +DESCRIPTION="vim plugin: AppArmor policy syntax" +HOMEPAGE="http://forge.novell.com/modules/xfmod/project/?apparmor" +LICENSE="vim" +KEYWORDS="alpha amd64 ia64 mips ~ppc ppc64 sparc x86" +IUSE="" + +VIM_PLUGIN_HELPTEXT="This plugin provides syntax highlighting for Apparmor +policy files." diff --git a/branches/experimental/app-vim/apparmor-syntax/files/digest-apparmor-syntax-200609 b/branches/experimental/app-vim/apparmor-syntax/files/digest-apparmor-syntax-200609 new file mode 100644 index 00000000..f424879e --- /dev/null +++ b/branches/experimental/app-vim/apparmor-syntax/files/digest-apparmor-syntax-200609 @@ -0,0 +1,3 @@ +MD5 c44d7356708377424d641aa0c66a72a8 apparmor-syntax-200609.tar.bz2 1944 +RMD160 ffffda77d691edfdbdc2044f6b7aa6f33f7bb223 apparmor-syntax-200609.tar.bz2 1944 +SHA256 db5aa288aa500f6b7d3bbe3a51949d3a427ee015b385c5353ada8d78846dfe0a apparmor-syntax-200609.tar.bz2 1944 diff --git a/branches/experimental/scripts/echangelog b/branches/experimental/scripts/echangelog new file mode 100755 index 00000000..9e4cff8e --- /dev/null +++ b/branches/experimental/scripts/echangelog @@ -0,0 +1,403 @@ +#!/usr/bin/perl -w +# +# echangelog: Update the ChangeLog for an ebuild. For example: +# +# $ echangelog 'Add ~alpha to KEYWORDS' +# 4a5,7 +# > 10 Feb 2003; Aron Griffis oaf-0.6.8-r1.ebuild : +# > Add ~alpha to KEYWORDS +# > + +use strict; +use POSIX qw(strftime getcwd setlocale); + +# Fix bug 21022 by restricting to C locale +setlocale(&POSIX::LC_ALL, "C"); + +use Text::Wrap; +$Text::Wrap::columns = 77; +$Text::Wrap::unexpand = 0; + +# Global variables +my (@files, @ebuilds, @conflicts, @trivial, @unknown, @new_versions, %actions); +my ($input, $editor, $entry, $user, $date, $text, $version, $year, $vcs); + +my %vcs = ( cvs => { diff => "cvs -f -U0 diff", + status => "cvs -fn up", + add => "cvs -f add", + skip => 6, + entries => "CVS/Entries" }, + svn => { diff => "svn diff -N", + status => "svn status", + add => "svn add", + skip => 4, + entries => ".svn/entries" }, + git => { diff => "git diff", + status => "git up", + add => "git add", + skip => 0, + entries => "wtf" }, + nov => { diff => "", + status => "", + add => "", + skip => 0, + entries => "wtf" } +); + +# Figure out what kind of repo we are in. + +if ( -d "CVS" ) { + $vcs = "cvs"; +} elsif ( -d '.svn' ) { + $vcs = "svn"; +} elsif ( -d '.git' ) { + $vcs = "git"; +} else { + print STDERR "** NOTE: No CVS, .git, .svn directories found, cannot know modifications\n"; + $vcs = "nov"; +} + +# Read the current ChangeLog +if (-f 'ChangeLog') { + open I, '; } + close I; +} else { + # No ChangeLog here, maybe we should make one... + if (<*.ebuild>) { + open I, '<../../skel.ChangeLog' + or die "Can't open ../../skel.ChangeLog for input: $!\n"; + { local $/ = undef; $text = ; } + close I; + my ($cwd) = getcwd(); + $cwd =~ m|.*/(\w+-\w+)/([^/]+)| + or die "Can't figure out category/package.. sorry!\n"; + my ($category, $package_name) = ($1, $2); + $text =~ s/^\*.*//ms; # don't need the fake entry + $text =~ s//$category/; + $text =~ s//$package_name/; + } else { + die "This should be run in a directory with ebuilds...\n"; + } +} + +# Figure out what has changed around here +open C, $vcs{$vcs}{status}.' 2>&1 |' or die "Can't run ".$vcs{$vcs}{status}.": $!\n"; +while () { + if (/^C\s+\+?\s+(\S+)/) { + push @conflicts, $1; + next; + } elsif (/^\?\s+\+?\s+(\S+)/) { + push @unknown, $1; + $actions{$1} = '+'; + next; + } elsif (/^([ARMD])\s+\+?\s+(\S+)/) { + push @files, $2; + ($actions{$2} = $1) =~ tr/ARDM/+--/d; + } +} + +# Separate out the trivial files for now +@files = grep { + !/files.digest|Manifest|ChangeLog|^files$|^\.$/ or do { push @trivial, $_; 0; } +} @files; + +@unknown = grep { + !/files.digest|Manifest|ChangeLog|^files$|^\.$/ or do { push @trivial, $_; 0; } +} @unknown; + +# Don't allow any conflicts +if (@conflicts) { + print STDERR < $nb[$i]); + return $retval if $retval; + next; + } + + # char vs. char + if ($na[$i] =~ /^\D/ and $nb[$i] =~ /^\D/) { + $retval = ($na[$i] cmp $nb[$i]); + return $retval if $retval; + next; + } + + # num vs. char + $retval = ($na[$i] =~ /\d/ and -1 or +1); + return $retval; + } + + # + # compare suffix second + # + if (defined $sa and !defined $sb) { + return +2 if $sa eq "p"; + return -2; + } + if (defined $sb and !defined $sa) { + return -3 if $sb eq "p"; + return +3; + } + + if (defined $sa) { # and defined $sb + $retval = ($sa cmp $sb); + if ($retval) { + return +4 if $sa eq "p"; + return -4 if $sb eq "p"; + return $retval; # suffixes happen to be alphabetical order, mostly + } + + # compare suffix number + return +5 if defined $sna and !defined $snb; + return -5 if defined $snb and !defined $sna; + if (defined $sna) { # and defined $snb + $retval = ($sna <=> $snb); + return $retval if $retval; + } + } + + # + # compare rev third + # + return +6 if defined $ra and !defined $rb; + return -6 if defined $rb and !defined $ra; + if (defined $ra) { # and defined $rb + return ($ra <=> $rb); + } + + # + # nothing left to compare + # + return 0; +} +@files = sort sortfunc @files; + +# Forget ebuilds that only have changed copyrights, unless that's all +# the changed files we have +# does not work with svn TODO +#@ebuilds = grep /\.ebuild$/, @files; +#@files = grep !/\.ebuild$/, @files; + +if (@ebuilds) { + open C, $vcs{$vcs}{diff}.@ebuilds." 2>&1 |" or die "Can't run: ".$vcs{$vcs}{diff}."$!\n"; + $_ = ; + while (defined $_) { + if (/^$vcs diff: (([^\/]*?)\.ebuild) was removed/) { + push @files, $1; + } + elsif (/^Index: (([^\/]*?)\.ebuild)\s*$/) { + my ($f, $v) = ($1, $2); + # check if more than just copyright date changed. + # skip some lines + foreach(1..$vcs{$vcs}{skip}){ + $_ = ; + } + while () { + last if /^[A-Za-z]/; + if (/^[-+](?!# Copyright)/) { + push @files, $f; + last; + } + } + # at this point we've either added $f to @files or not, + # and we have the next line in $_ for processing + next; + } + elsif (/^$vcs.*?: (([^\/]*?)\.ebuild) is a new entry/) { + push @files, $1; + push @new_versions, $2; # new ebuild, will create a new entry + } + # other cvs output is ignored + $_ = ; + } +} +close C; + +# When a package move occurs, the versions appear to be new even though they are +# not. Trim them from @new_versions in that case. +@new_versions = grep { $text !~ /^\*\Q$_\E\s/m } @new_versions; + +# Check if we have any files left, otherwise re-insert ebuild list +# (of course, both might be empty anyway) +@files = @ebuilds unless (@files); + +# Allow ChangeLog entries with no changed files, but give a fat warning +unless (@files) { + print STDERR "**\n"; + print STDERR "** NOTE: No non-trivial changed files found. Normally echangelog\n"; + print STDERR "** should be run after all affected files have been added and/or\n"; + print STDERR "** modified. Did you forget to cvs add?\n"; + print STDERR "**\n"; + @files = sort sortfunc @trivial; + @files = qw/ChangeLog/ unless @files; # last resort to put something in the list +} + +# Get the input from the cmdline, editor or stdin +if ($ARGV[0]) { + $input = "@ARGV"; +} else { + # Testing for defined() allows ECHANGELOG_EDITOR='' to cancel EDITOR + $editor = defined($ENV{'ECHANGELOG_EDITOR'}) ? $ENV{'ECHANGELOG_EDITOR'} : + $ENV{'EDITOR'} || undef; + if ($editor) { + system("$editor ChangeLog.new"); + if ($? != 0) { + # This usually happens when the editor got forcefully killed; and + # the terminal is probably messed up: so we reset things. + system('/usr/bin/stty sane'); + print STDERR "Editor died! Reverting to stdin method.\n"; + undef $editor; + } else { + if (open I, "; + close I; + } else { + print STDERR "Error opening ChangeLog.new: $!\n"; + print STDERR "Reverting to stdin method.\n"; + undef $editor; + } + unlink 'ChangeLog.new'; + } + } + unless ($editor) { + print "Please type the log entry: use Ctrl-d to finish, Ctrl-c to abort...\n"; + local $/ = undef; + $input = <>; + } +} +die "Empty entry; aborting\n" unless $input =~ /\S/; + +# If there are any long lines, then wrap the input at $columns chars +# (leaving 2 chars on left, one char on right, after adding indentation below). +$input =~ s/^\s*(.*?)\s*\z/$1/s; # trim whitespace +$input = Text::Wrap::fill('', '', $input) if ($input =~ /^.{80}/m); +$input =~ s/^/ /gm; # add indentation + +# Prepend the user info to the input +unless ($user = $ENV{'ECHANGELOG_USER'}) { + my ($fullname, $username) = (getpwuid($<))[6,0]; + $fullname =~ s/,.*//; # remove GECOS, bug 80011 + $user = sprintf "%s <%s\@gentoo.org>", $fullname, $username; +} +# Make sure that we didn't get "root" +die "Please set ECHANGELOG_USER or run as non-root\n" if $user =~ /ChangeLog.new' or die "Can't open ChangeLog.new for output: $!\n"; +print O $text or die "Can't write ChangeLog.new: $!\n"; +close O or die "Can't close ChangeLog.new: $!\n"; + +# Update affected ebuild copyright dates. There is no reason to update the +# copyright lines on ebuilds that haven't changed. I verified this with an IP +# lawyer. +for my $e (grep /\.ebuild$/, @files) { + my ($etext, $netext); + open E, "<$e" or warn("Can't read $e to update copyright year\n"), next; + { local $/ = undef; $etext = ; } + close E; + + # Attempt the substitution and compare + $netext = update_copyright($etext); + next if $netext eq $etext; # skip this file if no change. + + # Write the new ebuild + open E, ">$e.new" or warn("Can't open $e.new\n"), next; + print E $netext and + close E or warn("Can't write $e.new\n"), next; + + # Move things around and show the diff + system "diff -U 0 $e $e.new"; + rename "$e.new", $e or warn("Can't rename $e.new: $!\n"); +} + +# Move things around and show the ChangeLog diff +system 'diff -Nu ChangeLog ChangeLog.new'; +rename 'ChangeLog.new', 'ChangeLog' or die "Can't rename ChangeLog.new: $!\n"; + +# Okay, now we have a starter ChangeLog to work with. +# The text will be added just like with any other ChangeLog below. +# Add the new ChangeLog to cvs before continuing. +if (open F, $vcs{$vcs}{entries} ) { + system("$vcs{$vcs}{add} ChangeLog") unless (scalar grep /\/?ChangeLog\/?/, ); +} + +# vim:sw=4 ts=8 expandtab diff --git a/branches/experimental/sec-policy/apparmor-profiles/ChangeLog b/branches/experimental/sec-policy/apparmor-profiles/ChangeLog new file mode 100644 index 00000000..9cc8cbf3 --- /dev/null +++ b/branches/experimental/sec-policy/apparmor-profiles/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for sec-policy/apparmor-profiles +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 06 Mar 2007; Mario Fetka + +apparmor-profiles-2.0_p119.ebuild, +metadata.xml: + Initial import of Matthew Snelham latest ebuilds into + the devel tree + diff --git a/branches/experimental/sec-policy/apparmor-profiles/Manifest b/branches/experimental/sec-policy/apparmor-profiles/Manifest new file mode 100644 index 00000000..7e70c9e4 --- /dev/null +++ b/branches/experimental/sec-policy/apparmor-profiles/Manifest @@ -0,0 +1,16 @@ +DIST apparmor-profiles-2.0-119.tar.gz 38442 RMD160 41960baad897408ef9fed48829975b7d7ad5381a SHA1 ced8c4e1a8837b9c243fba9146454cf284e357f6 SHA256 747be3c170cd9bb599e6c5a6b1c19a1ec8e8f614b469ef52d7e6640830698efd +EBUILD apparmor-profiles-2.0_p119.ebuild 1777 RMD160 5869fd67640159bc18741021dfb614609e3378a6 SHA1 feb89cd5b1c81937a8727bbd8331ef0abc5d1358 SHA256 24038895a7f0cb45d96a9e278a0c3df13c4a9e6ea1cfaceb24b20cb3425e638e +MD5 ed29755f485e366971a0de5d29b285e5 apparmor-profiles-2.0_p119.ebuild 1777 +RMD160 5869fd67640159bc18741021dfb614609e3378a6 apparmor-profiles-2.0_p119.ebuild 1777 +SHA256 24038895a7f0cb45d96a9e278a0c3df13c4a9e6ea1cfaceb24b20cb3425e638e apparmor-profiles-2.0_p119.ebuild 1777 +MISC ChangeLog 326 RMD160 f797e16b19d41442bb4bf53ebf7751b66f7b872c SHA1 bc5409bf1a38c3fa0ba9e0e0880223db8e058864 SHA256 17a384c00a96e6cc430fd17799d5a47311f18d2be3e1839b36651f42fa5644f0 +MD5 351345248cfc57c3b5f90633f64c319b ChangeLog 326 +RMD160 f797e16b19d41442bb4bf53ebf7751b66f7b872c ChangeLog 326 +SHA256 17a384c00a96e6cc430fd17799d5a47311f18d2be3e1839b36651f42fa5644f0 ChangeLog 326 +MISC metadata.xml 409 RMD160 968882ff27e0b0a3f97af92b6f537b8b00a646ff SHA1 3fcb95fd59a93e7aa310e0a41474df97187da15a SHA256 3043f699fbff382064ac346e6be45c4bdfa03ab4e0a92f8cdaea0737f9edce0f +MD5 042c5aa592b5d0dbb5fce79de0cd78d8 metadata.xml 409 +RMD160 968882ff27e0b0a3f97af92b6f537b8b00a646ff metadata.xml 409 +SHA256 3043f699fbff382064ac346e6be45c4bdfa03ab4e0a92f8cdaea0737f9edce0f metadata.xml 409 +MD5 009b398f5b231e38fc3422558483629e files/digest-apparmor-profiles-2.0_p119 274 +RMD160 d85cd1212273237347788ba31a1b757e9aec6635 files/digest-apparmor-profiles-2.0_p119 274 +SHA256 a51796af9a3ecb31ff8752d4f3d3d19a6c3f613e8da9e32d02b7a79101996232 files/digest-apparmor-profiles-2.0_p119 274 diff --git a/branches/experimental/sec-policy/apparmor-profiles/apparmor-profiles-2.0_p119.ebuild b/branches/experimental/sec-policy/apparmor-profiles/apparmor-profiles-2.0_p119.ebuild new file mode 100644 index 00000000..5d4802a3 --- /dev/null +++ b/branches/experimental/sec-policy/apparmor-profiles/apparmor-profiles-2.0_p119.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils toolchain-funcs + +MY_P="${P/_p/-}" +MY_S="${WORKDIR}/${P/_p*/}" +MONTH="October" + +DESCRIPTION="AppArmor pre-built application encapsulation profiles." +HOMEPAGE="http://forge.novell.com/modules/xfmod/project/?apparmor" +SRC_URI="http://forgeftp.novell.com/apparmor/Development%20-%20${MONTH}%20Snapshot/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND="" +RDEPEND="sys-apps/apparmor-parser" + +pkg_postinst() { + ewarn + ewarn "DO NOT EXPECT THESE PROFILES TO WORK ON YOUR SYSTEM!!!" + ewarn " Expect that ENABLING THEM WILL BREAK things" + ewarn " " + ewarn "These profiles were built to work with a SuSE base install, and " + ewarn "make many assumptions about file placement and system facilities " + ewarn "that are quite possibly untrue on any Gentoo system ever emerged." + ewarn " " + ewarn "They are provided for reference purposes only, until profiles can " + ewarn "be created and verified for Gentoo. If you are interested in using " + ewarn "AppArmor, and modifiying these base profiles for a Gentoo package, " + ewarn "please feel free to do so, and contact the AppArmor package " + ewarn "maintainer with your working profiles!" + ewarn + epause +} + +src_unpack() { + unpack ${A} + + cd ${MY_S} + # Move profiles to a different dir so that none of + # them are sourced by default on startup. + sed -i 's:apparmor.d$:apparmor.d/suse-defaults:g' Makefile +} + +src_compile() { + cd ${MY_S} + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die +} + +src_install() { + cd ${MY_S} + # Place profiles in /usr/share, instead of /usr/src/Immunix + MY_SHAREDIR="/usr/share/${PN}" + make DESTDIR=${D} EXTRASDIR=${D}/${MY_SHAREDIR} install || die +} diff --git a/branches/experimental/sec-policy/apparmor-profiles/files/digest-apparmor-profiles-2.0_p119 b/branches/experimental/sec-policy/apparmor-profiles/files/digest-apparmor-profiles-2.0_p119 new file mode 100644 index 00000000..d55b1229 --- /dev/null +++ b/branches/experimental/sec-policy/apparmor-profiles/files/digest-apparmor-profiles-2.0_p119 @@ -0,0 +1,3 @@ +MD5 93e3dbee491b4dc5c12ea6b4ccf7309a apparmor-profiles-2.0-119.tar.gz 38442 +RMD160 41960baad897408ef9fed48829975b7d7ad5381a apparmor-profiles-2.0-119.tar.gz 38442 +SHA256 747be3c170cd9bb599e6c5a6b1c19a1ec8e8f614b469ef52d7e6640830698efd apparmor-profiles-2.0-119.tar.gz 38442 diff --git a/branches/experimental/sec-policy/apparmor-profiles/metadata.xml b/branches/experimental/sec-policy/apparmor-profiles/metadata.xml new file mode 100644 index 00000000..966145c4 --- /dev/null +++ b/branches/experimental/sec-policy/apparmor-profiles/metadata.xml @@ -0,0 +1,11 @@ + + + +apparmor + + zepher@sigalrm.com + Matthew Snelham + Primary Maintainer + +Default Apparmor profiles from the official Novell releases. + diff --git a/branches/experimental/skel.ChangeLog b/branches/experimental/skel.ChangeLog new file mode 100644 index 00000000..1f22d127 --- /dev/null +++ b/branches/experimental/skel.ChangeLog @@ -0,0 +1,67 @@ +# ChangeLog for / +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*-- (DD MMM YYYY) + + DD MMM YYYY; YOUR_NAME changed_file1, changed_file2 : + Initial import. Ebuild submitted by submitter_name . + Note that the "changed_file" listing is optional if you are simply bumping + the rev of the ebuild and are only making changes to the .ebuild file + itself. Also note that we now have a single unified paragraph rather than + having the first line separated from the rest by a newline. Everything + should be in one block like this. (note by drobbins, 16 Jul 2002) + + DD MMM YYYY; YOUR_NAME changed_file1, changed_file2: this is + an earlier ChangeLog entry. + +-- Explanation of ChangeLog format: + + *************************************************************************** + THIS IS IMPORTANT: The ChangeLog format is a *chronological* account of all + changes made to a set of ebuilds. That means that the most recent ChangeLog + entry *always* goes at the top of the file. More explanation below. + *************************************************************************** + + *************************************************************************** + ANOTHER IMPORTANT NOTE: There are some ChangeLogs that don't follow this + format and organize all changes under the "correct" "*" entry. This is not + correct. However, rather than making a concerted effort to fix these + ChangeLogs, we should spend our energy defining a comprehensive and strict + XML-based ChangeLog format which we then migrate to. But for any entries to + any ChangeLog that *you* make, please make sure to always add entries to the + top of the file like a good boy/girl. Even do this if it's clear that you're + adding an entry to a b0rked ChangeLog. + *************************************************************************** + + This changelog is targeted to users. This means that the comments should be + well explained and written in clean English. + + Every new version or revision of the package should be marked by a '*' + separator line as above to indicate where in the chronology it was first + added to our CVS tree. Any changes since the last revision, really _any + changes at all_ have to be added to the top of the file, underneath the + initial copyright and cvs header comments, in exactly the same format as this + comment. If you are modifying older ebuilds, simply note them as changed + files and add your entry to the top of the ChangeLog. Resist the temptation + to "organize" your ChangeLog entries by placing them under the "correct" "*" + entries -- this isn't the purpose of the "*" entries. + + This means that you start with header line that has the following format, + indented two spaces: + + DD MMM YYYY; your_name changed_file1, changed_file2: Your + explanation should follow. It should be indented and wrapped at a line width + of 80 characters. The changed_files can be omitted if they are obvious; for + example, if you are only modifying the .ebuild file and committing a new rev + of a package. Any details about what exactly changed in the code should be + added as a message when the changes are committed to cvs, not in this file. + +-- A word regarding credit: + + Please add credit information ("ebuild submitted by ...", "patch submitted + by ...") to the ChangeLog. Do not add this information to the ebuilds + themselves. + + And remember: Give credit where credit is due. We're all doing this for + free, so the best we can hope (and expect!) to receive is credit. diff --git a/branches/experimental/skel.metadata.xml b/branches/experimental/skel.metadata.xml new file mode 100644 index 00000000..7e328698 --- /dev/null +++ b/branches/experimental/skel.metadata.xml @@ -0,0 +1,5 @@ + + + +maintainer-wanted + diff --git a/branches/experimental/sys-apps/apparmor-modules/ChangeLog b/branches/experimental/sys-apps/apparmor-modules/ChangeLog new file mode 100644 index 00000000..f2cc1b86 --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-modules/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for sys-apps/apparmor-modules +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 06 Mar 2007; Mario Fetka + +apparmor-modules-2.0_p20061013.ebuild, + +files/apparmor-modules-2.0_2.6.17.9_symbol_export.patch, +metadata.xml: + Initial import of Matthew Snelham latest ebuilds into + the devel tree + diff --git a/branches/experimental/sys-apps/apparmor-modules/Manifest b/branches/experimental/sys-apps/apparmor-modules/Manifest new file mode 100644 index 00000000..8dc9500b --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-modules/Manifest @@ -0,0 +1,20 @@ +AUX apparmor-modules-2.0_2.6.17.9_symbol_export.patch 2976 RMD160 b9232cb4b78bfccd7154f27af554aedc0a01b53f SHA1 19ac2f051379f6733f7760eee2c37dde670bb746 SHA256 f364111249e598379886880d427435474609898dd77df8770112b3594305bd80 +MD5 fb0f6966a5fafacc3ca5cd453973e3f9 files/apparmor-modules-2.0_2.6.17.9_symbol_export.patch 2976 +RMD160 b9232cb4b78bfccd7154f27af554aedc0a01b53f files/apparmor-modules-2.0_2.6.17.9_symbol_export.patch 2976 +SHA256 f364111249e598379886880d427435474609898dd77df8770112b3594305bd80 files/apparmor-modules-2.0_2.6.17.9_symbol_export.patch 2976 +DIST apparmor-external-module.tar.gz 112408 RMD160 b333459588b0ccaaf36c6247555ff560daa3f95c SHA1 fbef407f3611c8c38ca66ce977fc5271e4140eec SHA256 70d66089a46f87f7fbaf504a3e40e4511e21c4a03345f0142315743bb9278d2f +EBUILD apparmor-modules-2.0_p20061013.ebuild 2247 RMD160 435c42cf683a81f4b2286b352ea15808f706e65a SHA1 0b48e5794f14cc9f379d7e1d27cf339115dc9138 SHA256 d472fd57a2055d116899f913ea8f4e1403e3641c3f61befa23c7d0fe3ca7d1e2 +MD5 0bd17071d33eebeca251d187f47f46c9 apparmor-modules-2.0_p20061013.ebuild 2247 +RMD160 435c42cf683a81f4b2286b352ea15808f706e65a apparmor-modules-2.0_p20061013.ebuild 2247 +SHA256 d472fd57a2055d116899f913ea8f4e1403e3641c3f61befa23c7d0fe3ca7d1e2 apparmor-modules-2.0_p20061013.ebuild 2247 +MISC ChangeLog 387 RMD160 6ea0e939c7cb81860c6df8d730f506dd32789b10 SHA1 7c519ccfc195bb12443c3fe83f08b6a1bce36f2b SHA256 2c71a0a1fa7ce89f6a803d1751e90ec10558f412383e1c4d7c54c071caae3f6b +MD5 3842c37e18b50835e8cadd6b4d5006a1 ChangeLog 387 +RMD160 6ea0e939c7cb81860c6df8d730f506dd32789b10 ChangeLog 387 +SHA256 2c71a0a1fa7ce89f6a803d1751e90ec10558f412383e1c4d7c54c071caae3f6b ChangeLog 387 +MISC metadata.xml 380 RMD160 95812084d1fe1893b607bec7b448d2bd7920600a SHA1 766cf3cabd61149d9041b84aee4953f4f4e89b86 SHA256 5decb87b114447cecedd46af9b0ee264093dd4b0b1550aa6414c2fdf44ef26ee +MD5 cf1a96cd124b5fc5b8646794bbc6b3cc metadata.xml 380 +RMD160 95812084d1fe1893b607bec7b448d2bd7920600a metadata.xml 380 +SHA256 5decb87b114447cecedd46af9b0ee264093dd4b0b1550aa6414c2fdf44ef26ee metadata.xml 380 +MD5 ada15501d8ce59813443b9fb8b7359ef files/digest-apparmor-modules-2.0_p20061013 274 +RMD160 76b75c7fd71ca82c198ecb095af6723f6314188e files/digest-apparmor-modules-2.0_p20061013 274 +SHA256 f382eb61c05a9f0e47d7b5e336bb296846875f76e2fe59261eaab4cf9d42d93c files/digest-apparmor-modules-2.0_p20061013 274 diff --git a/branches/experimental/sys-apps/apparmor-modules/apparmor-modules-2.0_p20061013.ebuild b/branches/experimental/sys-apps/apparmor-modules/apparmor-modules-2.0_p20061013.ebuild new file mode 100644 index 00000000..bb8a122b --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-modules/apparmor-modules-2.0_p20061013.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit linux-mod + +MY_S="${WORKDIR}/apparmor_modules/module" +MONTH="October" + +DESCRIPTION="Kernel modules for AppArmor" +HOMEPAGE="ihttp://forge.novell.com/modules/xfmod/project/?apparmor" +SRC_URI="http://forgeftp.novell.com/apparmor/Development%20-%20${MONTH}%20Snapshot/apparmor-external-module.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND="virtual/libc" +RDEPEND="${DEPEND} + sys-apps/apparmor-parser" + +pkg_setup() { + linux-info_pkg_setup + + if kernel_is lt 2 6 16 ; then + eerror "You must have at least a 2.6.16 kernel to use this package." + die "Insufficent kernel version" + fi + + #if kernel_is eq 2 6 18 ; then + # eerror "Support for 2.6.18 and forward kernels is not yet availible" + # die "Unsupported kernel version" + #fi + + if linux_chkconfig_present CONFIG_SECURITY ; then + eerror "CONFIG_SECURITY must be enabled in your kernel to build ${PN}" + die "Bad kernel config" + fi + + if (grep 'namespace_sem' ${KV_DIR}/include/linux/namespace.h >/dev/null 2>&1 && grep 'AUDIT_SD' ${KV_DIR}/include/linux/audit.h >/dev/null 2>&1 ) + then + einfo "Required Symbol patch seems to have been applied; continuing." + else + eerror "Required symbols do not appear to be exported." + ewarn + ewarn "AppArmor modules requires a patch be applied against the" + ewarn "kernel source to export several symbols." + ewarn + ewarn "Current patches can currently be found in: " + ewarn " ${FILESDIR}" + ewarn "where the clostest matching KERNEL_VER patch:" + ewarn " ${P/_p*/}_[KERNEL_VER]_symbol_export.patch" + ewarn "should apply cleanly." + ewarn + ewarn "After applying this patch and re-compiling," + ewarn "re-emerge this package" + ewarn + die "Missing apparmor symbol export patch" + fi + +} + +src_unpack() { + unpack ${A} + cd "${MY_S}" + + sed -i 's/^all:/modules:/g' Makefile + sed -i 's/mv/#mv/g' Makefile +} + +src_compile() { + cd "${MY_S}" + unset ARCH + CONFIG_SECURITY_APPARMOR=m make +} + +src_install() { + cd "${MY_S}" + + insinto /lib/modules/${KV_FULL}/kernel/security/apparmor + doins apparmor.ko + insinto /lib/modules/${KV_FULL}/kernel/security/apparmor/aamatch + doins aamatch/aamatch_pcre.ko +} diff --git a/branches/experimental/sys-apps/apparmor-modules/files/apparmor-modules-2.0_2.6.17.9_symbol_export.patch b/branches/experimental/sys-apps/apparmor-modules/files/apparmor-modules-2.0_2.6.17.9_symbol_export.patch new file mode 100644 index 00000000..c0e97bb9 --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-modules/files/apparmor-modules-2.0_2.6.17.9_symbol_export.patch @@ -0,0 +1,83 @@ +From: tonyj@suse.de +Subject: Export namespace semaphore +Patch-mainline: no + +Export global namespace_sem (this used to be a per namespace semaphore). +Alas, this isn't going to win _any_ points for style. +Patch is not in mainline -- pending AppArmor code submission to lkml + +--- +--- linux-2.6.17.9.orig/fs/namespace.c ++++ linux-2.6.17.9/fs/namespace.c +@@ -46,7 +46,8 @@ static int event; + static struct list_head *mount_hashtable __read_mostly; + static int hash_mask __read_mostly, hash_bits __read_mostly; + static kmem_cache_t *mnt_cache __read_mostly; +-static struct rw_semaphore namespace_sem; ++struct rw_semaphore namespace_sem; ++EXPORT_SYMBOL_GPL(namespace_sem); + + /* /sys/fs */ + decl_subsys(fs, NULL, NULL); +--- linux-2.6.17.9.orig/include/linux/namespace.h ++++ linux-2.6.17.9/include/linux/namespace.h +@@ -5,6 +5,9 @@ + #include + #include + ++/* exported for AppArmor (SubDomain) */ ++extern struct rw_semaphore namespace_sem; ++ + struct namespace { + atomic_t count; + struct vfsmount * root; + + +From: tonyj@suse.de +Subject: Export audit subsystem for use by modules +Patch-mainline: no + +Adds necessary export symbols for audit subsystem routines. +Changes audit_log_vformat to be externally visible (analagous to vprintf) +Patch is not in mainline -- pending AppArmor code submission to lkml + +--- linux-2.6.17.9.orig/include/linux/audit.h ++++ linux-2.6.17.9/include/linux/audit.h +@@ -96,6 +96,8 @@ + #define AUDIT_LAST_KERN_ANOM_MSG 1799 + #define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */ + ++#define AUDIT_SD 1500 /* AppArmor (SubDomain) audit */ ++ + #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ + + /* Rule flags */ +@@ -357,6 +359,9 @@ extern void audit_log(struct audit_ + __attribute__((format(printf,4,5))); + + extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type); ++extern void audit_log_vformat(struct audit_buffer *ab, ++ const char *fmt, va_list args) ++ __attribute__((format(printf,2,0))); + extern void audit_log_format(struct audit_buffer *ab, + const char *fmt, ...) + __attribute__((format(printf,2,3))); +--- linux-2.6.17.9.orig/kernel/audit.c ++++ linux-2.6.17.9/kernel/audit.c +@@ -893,8 +893,7 @@ static inline int audit_expand(struct au + * will be called a second time. Currently, we assume that a printk + * can't format message larger than 1024 bytes, so we don't either. + */ +-static void audit_log_vformat(struct audit_buffer *ab, const char *fmt, +- va_list args) ++void audit_log_vformat(struct audit_buffer *ab, const char *fmt, va_list args) + { + int len, avail; + struct sk_buff *skb; +@@ -1096,3 +1095,6 @@ EXPORT_SYMBOL(audit_log_start); + EXPORT_SYMBOL(audit_log_end); + EXPORT_SYMBOL(audit_log_format); + EXPORT_SYMBOL(audit_log); ++EXPORT_SYMBOL_GPL(audit_log_vformat); ++EXPORT_SYMBOL_GPL(audit_log_untrustedstring); ++EXPORT_SYMBOL_GPL(audit_log_d_path); diff --git a/branches/experimental/sys-apps/apparmor-modules/files/digest-apparmor-modules-2.0_p20061013 b/branches/experimental/sys-apps/apparmor-modules/files/digest-apparmor-modules-2.0_p20061013 new file mode 100644 index 00000000..9f05f658 --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-modules/files/digest-apparmor-modules-2.0_p20061013 @@ -0,0 +1,3 @@ +MD5 919d64ba6c357a24a3c8e78ea0f94058 apparmor-external-module.tar.gz 112408 +RMD160 b333459588b0ccaaf36c6247555ff560daa3f95c apparmor-external-module.tar.gz 112408 +SHA256 70d66089a46f87f7fbaf504a3e40e4511e21c4a03345f0142315743bb9278d2f apparmor-external-module.tar.gz 112408 diff --git a/branches/experimental/sys-apps/apparmor-modules/metadata.xml b/branches/experimental/sys-apps/apparmor-modules/metadata.xml new file mode 100644 index 00000000..4f3db4fa --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-modules/metadata.xml @@ -0,0 +1,11 @@ + + + +apparmor-modules + + zepher@sigalrm.com + Matthew Snelham + Primary Maintainer + +Apparmor kernel modules + diff --git a/branches/experimental/sys-apps/apparmor-parser/ChangeLog b/branches/experimental/sys-apps/apparmor-parser/ChangeLog new file mode 100644 index 00000000..bd0807fb --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-parser/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for sys-apps/apparmor-parser +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 06 Mar 2007; Mario Fetka + +apparmor-parser-2.0_p150.ebuild, +files/aaeventd, +files/apparmor, + +files/rc.apparmor.functions, +files/rc.helper.functions, +metadata.xml: + Initial import of Matthew Snelham latest ebuilds into + the devel tree + diff --git a/branches/experimental/sys-apps/apparmor-parser/Manifest b/branches/experimental/sys-apps/apparmor-parser/Manifest new file mode 100644 index 00000000..3a064773 --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-parser/Manifest @@ -0,0 +1,32 @@ +AUX aaeventd 824 RMD160 032cce20f81b7b0e1f6f38cb6e1c392d70407ad5 SHA1 8adaa5e21867cab21c5fa907c974fb94cb280f70 SHA256 dbaa7fd1197388146c7a1a9b59553815fdcd0498510f7b7bf752af88f8eb1780 +MD5 379ee71ea946bd90c98e94e362bf9f2c files/aaeventd 824 +RMD160 032cce20f81b7b0e1f6f38cb6e1c392d70407ad5 files/aaeventd 824 +SHA256 dbaa7fd1197388146c7a1a9b59553815fdcd0498510f7b7bf752af88f8eb1780 files/aaeventd 824 +AUX apparmor 1090 RMD160 8d9781974318232731ef26881d7d57fc5991044c SHA1 2acee7585d1329bcb92cb8902ec36e1d0b94f5d6 SHA256 5c7b251473e7bf6a876e0d59d89cff3707bf5a6fcda0d9e95d50a463c8eddc8f +MD5 7771cab70810b82185f0ed211f131018 files/apparmor 1090 +RMD160 8d9781974318232731ef26881d7d57fc5991044c files/apparmor 1090 +SHA256 5c7b251473e7bf6a876e0d59d89cff3707bf5a6fcda0d9e95d50a463c8eddc8f files/apparmor 1090 +AUX rc.apparmor.functions 11898 RMD160 12453790ffd14deed48b062f27d12bf2b2910ee4 SHA1 ec936b69474750dfd0205f451472e7d81b66f41a SHA256 d9cdb82c10bb5aa40c39d0f93c418a11020abc2d6df7154a831a71c816345618 +MD5 2adf748409596598872530ec06ef8717 files/rc.apparmor.functions 11898 +RMD160 12453790ffd14deed48b062f27d12bf2b2910ee4 files/rc.apparmor.functions 11898 +SHA256 d9cdb82c10bb5aa40c39d0f93c418a11020abc2d6df7154a831a71c816345618 files/rc.apparmor.functions 11898 +AUX rc.helper.functions 690 RMD160 d0b3b06a45645be5bc9d30b8ef19d518ac59940a SHA1 a58ba3ca5d59e099a3570ee21a62f5b4a6eb25fa SHA256 d065ac76a66d856716d77dd06b64478ed90c3b487d414cf8e33fc46ea77a723d +MD5 5d9c000b99bd66788b988cb6d14b9b3d files/rc.helper.functions 690 +RMD160 d0b3b06a45645be5bc9d30b8ef19d518ac59940a files/rc.helper.functions 690 +SHA256 d065ac76a66d856716d77dd06b64478ed90c3b487d414cf8e33fc46ea77a723d files/rc.helper.functions 690 +DIST apparmor-parser-2.0-150.tar.gz 189171 RMD160 cf3299716fdf042cf326cf884d93fdcb5089dba6 SHA1 099ae08655ee2fc1d206166a7a4f8622637c02fc SHA256 678027c88cf69b42f8c7a36adfbe917489eb80800bc9eefe3b3f043bf01e6ee6 +EBUILD apparmor-parser-2.0_p150.ebuild 1533 RMD160 3fd845a2de512cbd470c967e0aab29e0228ca6e0 SHA1 92bb05478a932b01baa3a3ddf44e7ac88be87fd0 SHA256 47f6c14a53f970893f8a418e4be5d8a3f792b2cc7e4d6e8bacb26013f68bb4ef +MD5 76c7b80fec3e2c011aa5d956a9426bf7 apparmor-parser-2.0_p150.ebuild 1533 +RMD160 3fd845a2de512cbd470c967e0aab29e0228ca6e0 apparmor-parser-2.0_p150.ebuild 1533 +SHA256 47f6c14a53f970893f8a418e4be5d8a3f792b2cc7e4d6e8bacb26013f68bb4ef apparmor-parser-2.0_p150.ebuild 1533 +MISC ChangeLog 414 RMD160 32500f8dbdd693af9f10ac7e6ccad09141c72787 SHA1 e1159c95576b90023613d9eae1605ed297dfe231 SHA256 702e74f1e4b3041b5502e684e015176ddd71257005a1acf28d9ab09413bbca9e +MD5 d2f5dd9c4089985f64cf7f675ecb3df2 ChangeLog 414 +RMD160 32500f8dbdd693af9f10ac7e6ccad09141c72787 ChangeLog 414 +SHA256 702e74f1e4b3041b5502e684e015176ddd71257005a1acf28d9ab09413bbca9e ChangeLog 414 +MISC metadata.xml 436 RMD160 e15033b9b3e6c069ebf4fc0e0470c5792e33030a SHA1 a441df5f7fca5964bd09ff8f81af063aada1d157 SHA256 5781a6c617edd46a5bb4976d24b07d8df048a7e03b2cf36ea9edcee4fc9e3cfc +MD5 832848da3df614d8f1bcb956856bb75e metadata.xml 436 +RMD160 e15033b9b3e6c069ebf4fc0e0470c5792e33030a metadata.xml 436 +SHA256 5781a6c617edd46a5bb4976d24b07d8df048a7e03b2cf36ea9edcee4fc9e3cfc metadata.xml 436 +MD5 f8b11c14f5b9a1945c17a5f94b338d2b files/digest-apparmor-parser-2.0_p150 271 +RMD160 a70e60c1977d77b9b90bca4617758a60e1449115 files/digest-apparmor-parser-2.0_p150 271 +SHA256 0d5798506f6e78b3f6f8bff3f1d8d98d43d040576e2edbe3c893ac8fa164847a files/digest-apparmor-parser-2.0_p150 271 diff --git a/branches/experimental/sys-apps/apparmor-parser/apparmor-parser-2.0_p150.ebuild b/branches/experimental/sys-apps/apparmor-parser/apparmor-parser-2.0_p150.ebuild new file mode 100644 index 00000000..1fcb3c9d --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-parser/apparmor-parser-2.0_p150.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils perl-module toolchain-funcs + +MY_PV="${PV/_p/-}" +MY_P="${PN}-${MY_PV}" +MY_S="${WORKDIR}/${PN}-${PV/_p*/}" +MONTH="October" + +DESCRIPTION="The userspace tools and init scripts to load security profiles into the apparmor kernel security module." +HOMEPAGE="http://forge.novell.com/modules/xfmod/project/?apparmor" +SRC_URI="http://forgeftp.novell.com/apparmor/Development%20-%20${MONTH}%20Snapshot/${MY_P}.tar.gz" + + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND="sys-libs/libapparmor + sys-libs/libcap + dev-libs/libpcre + sys-devel/bison + sys-devel/flex" + +RDEPEND="|| (sys-kernel/apparmor-sources ys-apps/apparmor-modules)" + +src_unpack() { + unpack ${A} + + ## apparmor-parser + cd ${MY_S} + # the Make.rules isn't needed for Gentoo + sed -i "s/^include Make.rules//g" Makefile + # Un-needed historical artifact, AND ugly non-LSB path + # This is mounted at /sys/kernel/security/subdomain, not /subdomain + sed -i 's/^.*\/subdomain//g' Makefile +} + +src_compile() { + cd ${MY_S} + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die +} + +src_install() { + + ## apparmor-parser + cd ${MY_S} + make DESTDIR=${D} install || die + + ## Init script and addtional files + doinitd ${FILESDIR}/apparmor + doinitd ${FILESDIR}/aaeventd + insopts -m0644 + insinto /lib/apparmor + doins ${FILESDIR}/rc.helper.functions + doins ${FILESDIR}/rc.apparmor.functions + + dodir /etc/apparmor.d/abstractions +} diff --git a/branches/experimental/sys-apps/apparmor-parser/files/aaeventd b/branches/experimental/sys-apps/apparmor-parser/files/aaeventd new file mode 100755 index 00000000..efe9cc39 --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-parser/files/aaeventd @@ -0,0 +1,40 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +APPARMOR_FUNCTIONS=/lib/apparmor/rc.apparmor.functions +APPARMOR_HELPERS=/lib/apparmor/rc.helper.functions +if [ -f "${APPARMOR_HELPERS}" -a -f "${APPARMOR_FUNCTIONS}" ]; then + source ${APPARMOR_HELPERS} + source ${APPARMOR_FUNCTIONS} +else + eend 1 "Unable to find AppArmor initscript functions" +fi + +depend() { + need apparmor + use logger dns +} + +start() { + ebegin "Starting aaeventd (AppArmor Event Daemon)" + + if [ "${APPARMOR_ENABLE_AAEVENTD}" = "no" ]; then + eend 1 " aaeventd disabled in ${APPARMOR_CONF}." + fi + + start_sd_event + eend $waserror +} + +stop() { + ebegin "Stopping aaeventd (AppArmor Event Daemon)" + stop_sd_event + eend $waserror +} + +restart() { + srv_stop + srv_start +} diff --git a/branches/experimental/sys-apps/apparmor-parser/files/apparmor b/branches/experimental/sys-apps/apparmor-parser/files/apparmor new file mode 100755 index 00000000..26daeca0 --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-parser/files/apparmor @@ -0,0 +1,55 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ +# +# rc.apparmor.gentoo: contribuited by Matthew Snelham +# /etc/init.d/apparmor + +APPARMOR_FUNCTIONS=/lib/apparmor/rc.apparmor.functions +APPARMOR_HELPERS=/lib/apparmor/rc.helper.functions +if [ -f "${APPARMOR_HELPERS}" -a -f "${APPARMOR_FUNCTIONS}" ]; then + source ${APPARMOR_HELPERS} + source ${APPARMOR_FUNCTIONS} +else + eend 1 "Unable to find AppArmor initscript functions" +fi + +opts="${opts} reload status" + +depend() { + need localmount + ## AppArmor needs to be loaded before any other + ## (potentially protected) user-space services come up. + #before * +} + +start() { + ebegin "Starting AppArmor" + subdomain_start + einfo "...AppArmor Start" + eend $waserror +} + +stop() { + ebegin "Stopping AppArmor" + subdomain_stop + einfo "...AppArmor Stop" + eend $waserror +} + +restart() { + svc_stop; svc_start +} + +reload() { + ebegin "Restarting AppArmor" + subdomain_restart + eend $? +} + +status() { + ebegin "Checking AppArmor Status" + subdomain_status + eend $? +} diff --git a/branches/experimental/sys-apps/apparmor-parser/files/digest-apparmor-parser-2.0_p150 b/branches/experimental/sys-apps/apparmor-parser/files/digest-apparmor-parser-2.0_p150 new file mode 100644 index 00000000..1b254d32 --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-parser/files/digest-apparmor-parser-2.0_p150 @@ -0,0 +1,3 @@ +MD5 cbb25435e4353b10b5fdd96f80c854b9 apparmor-parser-2.0-150.tar.gz 189171 +RMD160 cf3299716fdf042cf326cf884d93fdcb5089dba6 apparmor-parser-2.0-150.tar.gz 189171 +SHA256 678027c88cf69b42f8c7a36adfbe917489eb80800bc9eefe3b3f043bf01e6ee6 apparmor-parser-2.0-150.tar.gz 189171 diff --git a/branches/experimental/sys-apps/apparmor-parser/files/rc.apparmor.functions b/branches/experimental/sys-apps/apparmor-parser/files/rc.apparmor.functions new file mode 100755 index 00000000..890f3fbb --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-parser/files/rc.apparmor.functions @@ -0,0 +1,443 @@ +#!/bin/sh +# +# ---------------------------------------------------------------------- +# Copyright (c) 1999, 2000, 20001, 2004, 2005, NOVELL (All rights reserved) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public +# License published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, contact Novell, Inc. +# ---------------------------------------------------------------------- +# rc.subdomain.functions by Steve Beattie +# Modified for Gentoo Linux, by Matthew Snelham +# +# Modifications Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + + +# NOTE: rc.subdomain initscripts that source this file need to implement +# the following set of functions: +# sd_action +# sd_log_info_msg +# sd_log_success_msg +# sd_log_warning_msg +# sd_log_failure_msg + + +CONFIG_DIR=/etc/apparmor +MODULE=apparmor +OLD_MODULE=subdomain +if [ -f "${CONFIG_DIR}/${MODULE}.conf" ] ; then + APPARMOR_CONF="${CONFIG_DIR}/${MODULE}.conf" +elif [ -f "${CONFIG_DIR}/${OLD_MODULE}.conf" ] ; then + APPARMOR_CONF="${CONFIG_DIR}/${OLD_MODULE}.conf" +else + sd_log_warning_msg "Unable to find config file in ${CONFIG_DIR}, installation problem?" +fi + +# Read configuration options from ${APPARMOR_CONF}, default is to +# warn if subdomain won't load. +APPARMOR_MODULE_PANIC="warn" +SUBDOMAIN_ENABLE_OWLSM="no" +APPARMOR_ENABLE_AAEVENTD="no" + +if [ -f "${APPARMOR_CONF}" ] ; then + source "${APPARMOR_CONF}" +fi + +if [ -f /sbin/apparmor_parser ] ; then + PARSER=/sbin/apparmor_parser +else + sd_log_failure_msg "Unable to find apparmor_parser, installation problem?" + exit 1 +fi + +# APPARMOR_DIR might be redefined in ${APPARMOR_CONF} +if [ -d "${APPAMROR_DIR}" ] ; then + PROFILE_DIR=${APPARMOR_DIR} +elif [ -d /etc/apparmor.d ] ; then + PROFILE_DIR=/etc/apparmor.d +fi +ABSTRACTIONS="-I${PROFILE_DIR}" +AA_EV_BIN=/usr/sbin/aa-eventd +AA_EV_PIDFILE=/var/run/aa-eventd.pid +AA_STATUS=/usr/sbin/apparmor_status +SD_EV_BIN=/usr/sbin/sd-event-dispatch.pl +SD_EV_PIDFILE=/var/run/sd-event-dispatch.init.pid +SD_STATUS=/usr/sbin/subdomain_status +if grep -q securityfs /proc/filesystems ; then + SECURITYFS=/sys/kernel/security +fi + +SUBDOMAINFS_MOUNTPOINT=$(grep subdomainfs /etc/fstab | \ + sed -e 's|^[[:space:]]*[^[:space:]]\+[[:space:]]\+\(/[^[:space:]]*\)[[:space:]]\+subdomainfs.*$|\1|' 2> /dev/null) + +if [ -d "/var/lib/${MODULE}" ] ; then + APPARMOR_TMPDIR="/var/lib/${MODULE}" +else + APPARMOR_TMPDIR="/tmp" +fi + + +function parse_profiles() { + # get parser arg + case "$1" in + load) + PARSER_ARGS="--add" + PARSER_MSG="Loading AppArmor profiles " + ;; + reload) + PARSER_ARGS="--replace" + PARSER_MSG="Reloading AppArmor profiles " + ;; + *) + exit 1 + ;; + esac + sd_log_info_msg "$PARSER_MSG" + + # run the parser on all of the apparmor profiles + if [ ! -f "$PARSER" ]; then + sd_log_failure_msg "$PARSER_MSG - AppArmor parser not found" + exit 1 + fi + + if [ ! -d "$PROFILE_DIR" ]; then + sd_log_failure_msg "$PARSER_MSG - Profile directory not found" + exit 1 + fi + + if [ "X" == "X$(ls $PROFILE_DIR/)" ]; then + sd_log_warning_msg "$PARSER_MSG - No profiles found" + exit 1 + fi + + for profile in $PROFILE_DIR/*; do + if [ "${profile%.rpmnew}" != "${profile}" -o \ + "${profile%.rpmsave}" != "${profile}" -o \ + "${profile%\~}" != "${profile}" ] + then + sd_log_warning_msg "Skipping profile $profile" + elif [ -f "${profile}" ] ; then + sd_action " Adding profile: `basename ${profile}`" $PARSER $ABSTRACTIONS $PARSER_ARGS ${profile} + if [ $? -ne 0 ]; then + waserror=1 + fi + fi + done +} + +function profiles_names_list() { + # run the parser on all of the apparmor profiles + TMPFILE=$1 + if [ ! -f "$PARSER" ]; then + sd_log_failure_msg "AppArmor parser ($PARSER) not found" + exit 1 + fi + + if [ ! -d "$PROFILE_DIR" ]; then + sd_log_failure_msg "Profile directory ($PROFILE_DIR) not found" + exit 1 + fi + + for profile in $PROFILE_DIR/*; do + if [ "${profile%.rpmnew}" != "${profile}" -o \ + "${profile%.rpmsave}" != "${profile}" -o \ + "${profile%\~}" != "${profile}" ] + then + echo "nop" >/dev/null + elif [ -f "${profile}" ] ; then + LIST_ADD=$($PARSER $ABSTRACTIONS -N "$profile" | grep -v '\^') + if [ $? -eq 0 ]; then + echo "$LIST_ADD" >>$TMPFILE + fi + fi + done +} + +function is_securityfs_mounted() { + if grep -q securityfs /proc/filesystems && grep -q securityfs /proc/mounts ; then + if [ -f "${SECURITYFS}/${MODULE}/profiles" ]; then + SFS_MOUNTPOINT="${SECURITYFS}/${MODULE}" + return 0 + fi + fi + return 1 +} + +function mount_securityfs() { + if [ "X" != "X${SECURITYFS}" ]; then + if ! grep -q securityfs /proc/mounts ; then + sd_action "Mounting securityfs on ${SECURITYFS}" \ + mount -t securityfs securityfs "${SECURITYFS}" + rc=$? + if [ -f "${SECURITYFS}/${MODULE}/profiles" ]; then + SFS_MOUNTPOINT="${SECURITYFS}/${MODULE}" + else + SFS_MOUNTPOINT="${SECURITYFS}/${MODULE}" + fi + return $rc + fi + fi + return 0 +} + +function unmount_securityfs() { + SUBDOMAINFS=$(grep subdomainfs /proc/mounts | cut -d" " -f2 2> /dev/null) + if [ "X" != "X${SUBDOMAINFS}" ]; then + sd_action "Unmounting securityfs" umount ${SUBDOMAINFS} + fi +} + +function failstop_system() { + level=$(runlevel | cut -d" " -f2) + if [ $level -ne "1" ] ; then + sd_log_failure_msg "Could not start AppArmor. Changing to runlevel 1" + telinit 1; + return -1; + fi + sd_log_failure_msg "Could not start AppArmor." + return -1 +} + +function module_panic() { + # the module failed to load, determine what action should be taken + + case "$APPARMOR_MODULE_PANIC" in + "warn"|"WARN") sd_log_failure_msg "Could not start AppArmor" + return -1 ;; + "panic"|"PANIC") failstop_system + rc=$? + return $rc ;; + *) sd_log_failure_msg "Invalid AppArmor module fail option" + return -1 ;; + esac +} + +function load_module() { + if modinfo -F filename apparmor > /dev/null 2>&1 ; then + MODULE=apparmor + elif modinfo -F filename subdomain > /dev/null 2>&1 ; then + MODULE=subdomain + fi + if ! grep -qE "^(subdomain|apparmor)[[:space:]]" /proc/modules ; then + sd_action "Loading AppArmor module" /sbin/modprobe $MODULE $1 + rc=$? + if [ $rc -ne 0 ] ; then + # we couldn't find the module + module_panic + rc=$? + if [ $rc -ne 0 ] ; then + exit $rc + fi + fi + fi +} + +function start_sd_event() { + if [ -x "$AA_EV_BIN" -a "${APPARMOR_ENABLE_AAEVENTD}" = "yes" ] ; then + sd_action "Starting AppArmor Event daemon" startproc -f -p $AA_EV_PIDFILE $AA_EV_BIN -p $AA_EV_PIDFILE + elif [ -x "$SD_EV_BIN" -a "${APPARMOR_ENABLE_AAEVENTD}" = "yes" ] ; then + sd_action "Starting AppArmor Event daemon" startproc -f -p $SD_EV_PIDFILE $SD_EV_BIN -p $SD_EV_PIDFILE + fi +} + +function stop_sd_event() { + if [ -x "$AA_EV_BIN" -a -f "$AA_EV_PIDFILE" ] ; then + sd_action "Shutting down AppArmor Event daemon" killproc -G -p $AA_EV_PIDFILE -INT $AA_EV_BIN + fi + if [ -f "$SD_EV_PIDFILE" ] ; then + sd_action "Shutting down AppArmor Event daemon" killproc -G -p $SD_EV_PIDFILE -INT $SD_EV_BIN + fi +} + +function subdomain_start() { + if ! grep -qE "^(subdomain|apparmor)[[:space:]]" /proc/modules ; then + load_module + rc=$? + if [ $rc -ne 0 ] ; then + return $rc + fi + fi + + if ! is_securityfs_mounted ; then + mount_securityfs + rc=$? + if [ $rc -ne 0 ] ; then + return $rc + fi + fi + + if [ ! -w "$SFS_MOUNTPOINT/.load" ] ; then + sd_log_failure_msg "Loading AppArmor profiles - failed, Do you have the correct privileges?" + return 1 + fi + + configure_owlsm + + if [ $(wc -l "$SFS_MOUNTPOINT/profiles" | awk '{print $1}') -eq 0 ] ; then + parse_profiles load + else + sd_log_warning_msg "Loading AppArmor profiles - AppArmor already loaded with profiles." + fi +} + +function remove_profiles() { + # removing profiles as we directly read from subdomainfs + # doesn't work, since we are removing entries which screws up + # our position. Lets hope there are never enough profiles to + # overflow the variable + if ! is_securityfs_mounted ; then + sd_log_failure_msg "failed: is securityfs loaded?" + return 1 + fi + + if [ ! -w "$SFS_MOUNTPOINT/.remove" ] ; then + sd_log_failure_msg "failed: Do you have the correct privileges?" + return 1 + fi + + if [ ! -x "${PARSER}" ] ; then + sd_log_failure_msg "failed: unable to execute subdomain parser" + return 1 + fi + + retval=0 + IFS=$'\n' + enforced_profiles=$(sed -e "s/ (\(enforce\|complain\))$//" "$SFS_MOUNTPOINT/profiles") + for profile in $enforced_profiles ; do + sd_action " Removing profile: ${profile}" sh -c "echo \"$profile { }\" | $PARSER -R" + rc=$? + if [ ${rc} -ne 0 ] ; then + retval=${rc} + fi + done + if [ ${retval} -ne 0 ] ; then + waserror=1 + fi +} + +function subdomain_stop() { + stop_sd_event + sd_log_info_msg "Unloading AppArmor profiles" + remove_profiles +} + +function subdomain_kill() { + stop_sd_event + unmount_securityfs + if grep -qE "^apparmor[[:space:]]" /proc/modules ; then + MODULE=apparmor + elif grep -qE "^subdomain[[:space:]]" /proc/modules ; then + MODULE=subdomain + else + MODULE=apparmor + fi + sd_action "Unloading AppArmor modules" /sbin/modprobe -r $MODULE +} + +function __subdomain_restart() { + if [ ! -w "$SFS_MOUNTPOINT/.load" ] ; then + sd_log_failure_msg "Loading AppArmor profiles - failed, Do you have the correct privileges?" + return 4 + fi + + configure_owlsm + parse_profiles reload + PNAMES_LIST=$(mktemp ${APPARMOR_TMPDIR}/tmp.XXXXXXXX) + profiles_names_list ${PNAMES_LIST} + MODULE_PLIST=$(mktemp ${APPARMOR_TMPDIR}/tmp.XXXXXXXX) + sed -e "s/ (\(enforce\|complain\))$//" "$SFS_MOUNTPOINT/profiles" | sort >"$MODULE_PLIST" + #profiles=$(cat $PNAMES_LIST | sort | comm -2 -3 "$MODULE_PLIST" -) + #for profile in $profiles ; do + IFS=$'\n' && for profile in $(cat $PNAMES_LIST | sort | comm -2 -3 "$MODULE_PLIST" -) ; do + echo "\"$profile\" {}" | $PARSER -R >/dev/null + done + rm "$MODULE_PLIST" + rm "$PNAMES_LIST" + return 0 +} + +function subdomain_restart() { + if ! grep -qE "^(subdomain|apparmor)[[:space:]]" /proc/modules ; then + subdomain_start + rc=$? + return $rc + fi + + if ! is_securityfs_mounted ; then + mount_securityfs + rc=$? + if [ $rc -ne 0 ] ; then + return $rc + fi + fi + + __subdomain_restart + rc=$? + return $rc +} + +function subdomain_try_restart() { + if ! grep -qE "^(subdomain|apparmor)[[:space:]]" /proc/modules ; then + return 1 + fi + + if ! is_securityfs_mounted ; then + return 1 + fi + + __subdomain_restart + rc=$? + return $rc +} + +function subdomain_debug() { + subdomain_kill + load_module "subdomain_debug=1" + mount_securityfs + configure_owlsm + parse_profiles load +} + +function configure_owlsm () { + if [ "${SUBDOMAIN_ENABLE_OWLSM}" = "yes" -a -f ${SFS_MOUNTPOINT}/control/owlsm ] ; then + # Sigh, the "sh -c" is necessary for the SuSE sd_action + # and it can't be abstracted out as a seperate function, as + # that breaks under RedHat's action, which needs a + # binary to invoke. + sd_action "Enabling OWLSM extension" sh -c "echo -n \"1\" > \"${SFS_MOUNTPOINT}/control/owlsm\"" + elif [ -f "${SFS_MOUNTPOINT}/control/owlsm" ] ; then + sd_action "Disabling OWLSM extension" sh -c "echo -n \"0\" > \"${SFS_MOUNTPOINT}/control/owlsm\"" + fi +} + +function subdomain_status () { + if test -x ${AA_STATUS} ; then + ${AA_STATUS} --verbose + return $? + fi + if test -x ${SD_STATUS} ; then + ${SD_STATUS} --verbose + return $? + fi + if ! grep -qE "^(subdomain|apparmor)[[:space:]]" /proc/modules ; then + sd_log_failure_msg "AppArmor not loaded." + rc=1 + else + sd_log_success_msg "AppArmor module enabled." + rc=0 + fi + sd_log_warning_msg "Install the apparmor-utils package to receive more detailed" + sd_log_warning_msg "status information here (or examine ${SFS_MOUNTPOINT} directly)." + + return $rc +} diff --git a/branches/experimental/sys-apps/apparmor-parser/files/rc.helper.functions b/branches/experimental/sys-apps/apparmor-parser/files/rc.helper.functions new file mode 100644 index 00000000..692414e3 --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-parser/files/rc.helper.functions @@ -0,0 +1,47 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +waserror=0 + +function sd_action() { + MSG=$1 + shift + #echo "ACTION: $*" + $* > /dev/null + rc=$? + if [ $rc -ne 0 ] ; then + sd_log_failure_msg $"$MSG" + else + sd_log_success_msg $"$MSG" + fi + return $rc +} + +function sd_log_info_msg() { + einfo " $*" +} + +function sd_log_warning_msg() { + ewarn " $*" +} + +function sd_log_success_msg() { + einfo " $*" + eend 0 +} + +function sd_log_failure_msg() { + waserror=1 + einfo " $*" + eend 1 +} + +function startproc() { + /sbin/start-stop-daemon --start -p $3 --exec $4 -- -p $3 +} + +function killproc() { + /sbin/start-stop-daemon --stop -p $3 +} + diff --git a/branches/experimental/sys-apps/apparmor-parser/metadata.xml b/branches/experimental/sys-apps/apparmor-parser/metadata.xml new file mode 100644 index 00000000..9f03219f --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-parser/metadata.xml @@ -0,0 +1,11 @@ + + + +apparmor + + zepher@sigalrm.com + Matthew Snelham + Primary Maintainer + +Core Apparmor package containing userspace policy parser, utilities, and documentation. + diff --git a/branches/experimental/sys-apps/apparmor-utils/ChangeLog b/branches/experimental/sys-apps/apparmor-utils/ChangeLog new file mode 100644 index 00000000..7559fdee --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-utils/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for sys-apps/apparmor-utils +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 06 Mar 2007; Mario Fetka + +apparmor-utils-2.0_p142.ebuild, +metadata.xml: + Initial import of Matthew Snelham latest ebuilds into + the devel tree + diff --git a/branches/experimental/sys-apps/apparmor-utils/Manifest b/branches/experimental/sys-apps/apparmor-utils/Manifest new file mode 100644 index 00000000..275c3778 --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-utils/Manifest @@ -0,0 +1,16 @@ +DIST apparmor-utils-2.0-142.tar.gz 87393 RMD160 306371feded05fd6fc0daeb418aa85ed0a07f95b SHA1 7686dbc1e5a1df0f7fba9fff95d6d692372e3360 SHA256 27e1d9716bcfa82ebb12163e59734b1ce3a8598b9af3031b04498142e872c6b8 +EBUILD apparmor-utils-2.0_p142.ebuild 1220 RMD160 9b228a3c913522c2a0e9c11eba2cf3706a7fb5e3 SHA1 af9a875cf5fa722bf2cf998a1effc561086b5581 SHA256 f6b2668210650bab877dc764c891a77daa3e44fe5a4372e1f8f113d28dd30147 +MD5 4921189275e1255328bd2ea59aa06a4a apparmor-utils-2.0_p142.ebuild 1220 +RMD160 9b228a3c913522c2a0e9c11eba2cf3706a7fb5e3 apparmor-utils-2.0_p142.ebuild 1220 +SHA256 f6b2668210650bab877dc764c891a77daa3e44fe5a4372e1f8f113d28dd30147 apparmor-utils-2.0_p142.ebuild 1220 +MISC ChangeLog 318 RMD160 f66c0f90b244fac5d03473e5214021acec88a5d1 SHA1 0b8c7ad2d36a28475392458d7b46041c4d0f03e5 SHA256 0c6d790db4d4437a095b15e7bcbd7ef3979b212d8ddb530b056e95409729f5ff +MD5 f9599bdec8c40d72ff1816e2f48e4b4c ChangeLog 318 +RMD160 f66c0f90b244fac5d03473e5214021acec88a5d1 ChangeLog 318 +SHA256 0c6d790db4d4437a095b15e7bcbd7ef3979b212d8ddb530b056e95409729f5ff ChangeLog 318 +MISC metadata.xml 412 RMD160 7e37f8a3e1009597bbd430fd280b15009e3b01d8 SHA1 681094f0550454d2931d0e08f50ab9829b61c625 SHA256 658f844f1a47f69962d42d4fd00961327f7a42bdfee2737bfe22605c4a23d8ec +MD5 f3a4b4e95726969c96d8930966395051 metadata.xml 412 +RMD160 7e37f8a3e1009597bbd430fd280b15009e3b01d8 metadata.xml 412 +SHA256 658f844f1a47f69962d42d4fd00961327f7a42bdfee2737bfe22605c4a23d8ec metadata.xml 412 +MD5 fa93f53f0da00233ecf5f96ca3205461 files/digest-apparmor-utils-2.0_p142 265 +RMD160 fb95c24dd19ede19556c35a65085736241a5a868 files/digest-apparmor-utils-2.0_p142 265 +SHA256 9e4f3666c0beaa61748c798a3937b529cc8110901f5405bdc498f4668c8d6eb9 files/digest-apparmor-utils-2.0_p142 265 diff --git a/branches/experimental/sys-apps/apparmor-utils/apparmor-utils-2.0_p142.ebuild b/branches/experimental/sys-apps/apparmor-utils/apparmor-utils-2.0_p142.ebuild new file mode 100644 index 00000000..f7d6593a --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-utils/apparmor-utils-2.0_p142.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils perl-module toolchain-funcs + +#MY_PN="apparmor-utils" +MY_PV="${PV/_p/-}" +MY_P="${PN}-${MY_PV}" +MY_S="${WORKDIR}/${PN}-${PV/_p*/}" +MONTH="October" + +DESCRIPTION="AppArmor utilities for profile creation and management." +HOMEPAGE="http://forge.novell.com/modules/xfmod/project/?apparmor" +SRC_URI="http://forgeftp.novell.com/apparmor/Development%20-%20${MONTH}%20Snapshot/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="doc" + +DEPEND="sys-libs/libapparmor + sys-apps/apparmor-parser + sys-libs/libcap + dev-libs/libpcre + dev-lang/perl + perl-core/Test-Harness + perl-core/Getopt-Long + dev-perl/DBI + dev-perl/DBD-SQLite + dev-perl/TimeDate + dev-perl/File-Tail + dev-perl/Locale-gettext" +RDEPEND="${DEPEND} + doc? (app-doc/apparmor-docs)" + + +src_unpack() { + unpack ${A} + cd ${MY_S} + + # Correct path for logger + sed -i "s/\/bin\/logger/\/usr\/bin\/logger/g" genprof +} + +src_compile() { + cd ${MY_S} + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die +} + +src_install() { + cd ${MY_S} + perlinfo + make DESTDIR=${D} PERLDIR="${D}/${VENDOR_LIB}/Immunix" install || die +} diff --git a/branches/experimental/sys-apps/apparmor-utils/files/digest-apparmor-utils-2.0_p142 b/branches/experimental/sys-apps/apparmor-utils/files/digest-apparmor-utils-2.0_p142 new file mode 100644 index 00000000..3829459b --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-utils/files/digest-apparmor-utils-2.0_p142 @@ -0,0 +1,3 @@ +MD5 b2447c84edc2df843b7bc4baa8a1eb2c apparmor-utils-2.0-142.tar.gz 87393 +RMD160 306371feded05fd6fc0daeb418aa85ed0a07f95b apparmor-utils-2.0-142.tar.gz 87393 +SHA256 27e1d9716bcfa82ebb12163e59734b1ce3a8598b9af3031b04498142e872c6b8 apparmor-utils-2.0-142.tar.gz 87393 diff --git a/branches/experimental/sys-apps/apparmor-utils/metadata.xml b/branches/experimental/sys-apps/apparmor-utils/metadata.xml new file mode 100644 index 00000000..38f73850 --- /dev/null +++ b/branches/experimental/sys-apps/apparmor-utils/metadata.xml @@ -0,0 +1,11 @@ + + + +apparmor + + zepher@sigalrm.com + Matthew Snelham + Primary Maintainer + +Apparmor utilities allowing for profile creation and mangement. + diff --git a/branches/experimental/sys-kernel/apparmor-sources/ChangeLog b/branches/experimental/sys-kernel/apparmor-sources/ChangeLog new file mode 100644 index 00000000..3708f5ae --- /dev/null +++ b/branches/experimental/sys-kernel/apparmor-sources/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for sys-kernel/apparmor-sources +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 06 Mar 2007; Mario Fetka + +apparmor-sources-2.6.17.ebuild, +apparmor-sources-2.6.18.ebuild, + +metadata.xml: + Initial import of Matthew Snelham latest ebuilds into + the devel tree + diff --git a/branches/experimental/sys-kernel/apparmor-sources/Manifest b/branches/experimental/sys-kernel/apparmor-sources/Manifest new file mode 100644 index 00000000..00502e42 --- /dev/null +++ b/branches/experimental/sys-kernel/apparmor-sources/Manifest @@ -0,0 +1,30 @@ +DIST apparmor-kernel-patches-2.6.17.9.tar.gz 231231 RMD160 762d4b59aa508cfd82ebbeba4822ffb0551f5888 SHA1 bb754f57340ce90e25bb18be7030776ee4b9e823 SHA256 0884cd7bfdff4505fd5271ca68b72f74b352d209321ef60dc81620b0539f0ec7 +DIST apparmor-kernel-patches-2.6.18.tar.gz 231072 RMD160 f734125d986dcb3aec371f0e24126a5473d5637f SHA1 e6136d224d58ad90fd174d3c03290942644e5c45 SHA256 91224ff1f45de306c0720a5680a8f883888b52f296b0de24c63ec02668782b63 +DIST genpatches-2.6.17-1.base.tar.bz2 3337 RMD160 f9b5621fed8fcfee7da697d89097842287b41b24 SHA1 308e3daec11899f03103b5dcd2bfcff7e116c52c SHA256 2208b72729dce6daef7dc5700192aec0ae17327c794681621d2123f0c483ae21 +DIST genpatches-2.6.17-1.extras.tar.bz2 138704 RMD160 14b17e02b7893e6b023bee9e1b40f4bc85a30f05 SHA1 e671dbc29239116e627aea3d87ff7aefd8b5ca00 SHA256 fa10ec7d3d74c8bf57fb3bd01c33f83dcca3c1e4cd4601937cc2ef904cce1dfe +DIST genpatches-2.6.18-1.base.tar.bz2 2397 RMD160 1b02d9e5adba7a9a17f85691f312ee2c870c9a48 SHA1 790186d9d44c358d05489cdff417beab03124708 SHA256 e87db440591d48f74b8d50f47bde55a1652c969626befa94aba48cee57aa5da8 +DIST genpatches-2.6.18-1.extras.tar.bz2 147040 RMD160 f62b371d522fa8978cee4e809baea364ed8e804a SHA1 e98309b0203bf2f41e8efe1cd396dcfd5aec483a SHA256 080b19f98ffa8f5edbccabfa9dd4ac845ecc1b21c7fba761ad3d011893117b01 +DIST linux-2.6.17.tar.bz2 41272919 RMD160 26aad30c9a6610665c6c7d62401d79bf56a6a699 SHA1 0605c975b9dead2af31a3decf09dd4138fadaf2b SHA256 ab0f647d52f124958439517df9e1ae0efda90cdb851f59f522fa1749f1d87d58 +DIST linux-2.6.18.tar.bz2 41863580 RMD160 f92283f956880676bfb1f1d5288325461e4e02e7 SHA1 178f7d5bb3af0978d42b37651b8753323c7129c2 SHA256 c95280ff6c5d2a17788f7cc582d23ae8a9a7ba3f202ec6e4238eaadfce7c163d +EBUILD apparmor-sources-2.6.17.ebuild 1233 RMD160 401458e5877b07daa5da332e50de9228bb9ebe72 SHA1 f4fe4ec660682363025699657fc33695b06b692c SHA256 8b5782cdfc60faf6f5fd220903ff1370f86ad258433eda0ee01bab070076ba4d +MD5 d37c21cfca828801916b6d02b008ce93 apparmor-sources-2.6.17.ebuild 1233 +RMD160 401458e5877b07daa5da332e50de9228bb9ebe72 apparmor-sources-2.6.17.ebuild 1233 +SHA256 8b5782cdfc60faf6f5fd220903ff1370f86ad258433eda0ee01bab070076ba4d apparmor-sources-2.6.17.ebuild 1233 +EBUILD apparmor-sources-2.6.18.ebuild 1229 RMD160 3c75fe35805649fdf599d69d46181a971db6df15 SHA1 fa0108bfd9a04f0e9c237af719691f429e9cc306 SHA256 b4537e2743211df3ef06a361a3b9acfcd3ce40d819e2bd40e195f179ed163ce2 +MD5 a18e5730cf0b95fe439d4e67f3ddbf40 apparmor-sources-2.6.18.ebuild 1229 +RMD160 3c75fe35805649fdf599d69d46181a971db6df15 apparmor-sources-2.6.18.ebuild 1229 +SHA256 b4537e2743211df3ef06a361a3b9acfcd3ce40d819e2bd40e195f179ed163ce2 apparmor-sources-2.6.18.ebuild 1229 +MISC ChangeLog 357 RMD160 8ec4446db84f5be148d628d6fb01742fe165729c SHA1 30aa35052c87a42d8a5d9816e5cbebc526057596 SHA256 19046d8edacbfc958dfac60a4c8236ee95be84a32195d8765d40d9dde9933e66 +MD5 2ae6fe63d8de84580af563bf3db2a43c ChangeLog 357 +RMD160 8ec4446db84f5be148d628d6fb01742fe165729c ChangeLog 357 +SHA256 19046d8edacbfc958dfac60a4c8236ee95be84a32195d8765d40d9dde9933e66 ChangeLog 357 +MISC metadata.xml 478 RMD160 207b43ac7f50efbd5d3c8fdad96559adf422b0d2 SHA1 3adc61e526559bc5ac91aace569a588c4171e8cd SHA256 183e2d218aa6c62702bb9b81ee598eea27e51b6703b33fbf1a34d4b9674fd67a +MD5 c2ac84763e2d8238dea3eb3ba93b59aa metadata.xml 478 +RMD160 207b43ac7f50efbd5d3c8fdad96559adf422b0d2 metadata.xml 478 +SHA256 183e2d218aa6c62702bb9b81ee598eea27e51b6703b33fbf1a34d4b9674fd67a metadata.xml 478 +MD5 fb69ab075d009cf49c155c082fe75937 files/digest-apparmor-sources-2.6.17 1099 +RMD160 4c24baa45ae97f17ed503bfc4f0ed6ae8db520b4 files/digest-apparmor-sources-2.6.17 1099 +SHA256 a2efb919c008a7777773d5faed808c1b64b7e5dd97408131904897c5154520ce files/digest-apparmor-sources-2.6.17 1099 +MD5 e08285915ab6ffc164d7178cd2d01c59 files/digest-apparmor-sources-2.6.18 1093 +RMD160 2b50e09bbfb91bbb0b46974e7b22de322d3b8520 files/digest-apparmor-sources-2.6.18 1093 +SHA256 71f364dffa2f917a0ce28c423627808f06dd547bc7d3d0599ea13e6a28d94693 files/digest-apparmor-sources-2.6.18 1093 diff --git a/branches/experimental/sys-kernel/apparmor-sources/apparmor-sources-2.6.17.ebuild b/branches/experimental/sys-kernel/apparmor-sources/apparmor-sources-2.6.17.ebuild new file mode 100644 index 00000000..a8730efa --- /dev/null +++ b/branches/experimental/sys-kernel/apparmor-sources/apparmor-sources-2.6.17.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +ETYPE="sources" +K_WANT_GENPATCHES="base extras" +K_GENPATCHES_VER="1" +inherit eutils kernel-2 +detect_version +detect_arch + +KEYWORDS="~x86 ~amd64" +HOMEPAGE="http://forge.novell.com/modules/xfmod/project/?apparmor" +DESCRIPTION="Full sources to provide the required AppArmor modules and kernel hooks. Based on the gentoo-sources tree." + +MONTH="October" +UP_KPVER="2.6.17.9" + +AA_SRC="http://forgeftp.novell.com/apparmor/Development%20-%20${MONTH}%20Snapshot/apparmor-kernel-patches-${UP_KPVER}.tar.gz" + +SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI} ${AA_SRC}" + +src_unpack() { + unpack "apparmor-kernel-patches-${UP_KPVER}.tar.gz" + + kernel-2_src_unpack + + EPATCH_FORCE="yes" + EPATCH_OPTS="" + epatch ${WORKDIR}/${UP_KPVER}/current/apparmor-2.6.17.9-v154-fullseries.patch +} + +pkg_postinst() { + postinst_sources + + einfo + einfo "For more info on this patchset, and how to report problems, see:" + einfo "${HOMEPAGE}" + einfo + einfo "Make sure that your kernel configuration file is set with:" + einfo " CONFIG_SECURITY=y" + einfo " CONFIG_SECURITY_APPARMOR=m" + einfo "Without these, apparmor will not function." + einfo +} diff --git a/branches/experimental/sys-kernel/apparmor-sources/apparmor-sources-2.6.18.ebuild b/branches/experimental/sys-kernel/apparmor-sources/apparmor-sources-2.6.18.ebuild new file mode 100644 index 00000000..817ca729 --- /dev/null +++ b/branches/experimental/sys-kernel/apparmor-sources/apparmor-sources-2.6.18.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +ETYPE="sources" +K_WANT_GENPATCHES="base extras" +K_GENPATCHES_VER="1" +inherit eutils kernel-2 +detect_version +detect_arch + +KEYWORDS="~x86 ~amd64" +HOMEPAGE="http://forge.novell.com/modules/xfmod/project/?apparmor" +DESCRIPTION="Full sources to provide the required AppArmor modules and kernel hooks. Based on the gentoo-sources tree." + +MONTH="October" +UP_KPVER="2.6.18" + +AA_SRC="http://forgeftp.novell.com/apparmor/Development%20-%20${MONTH}%20Snapshot/apparmor-kernel-patches-${UP_KPVER}.tar.gz" + +SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI} ${AA_SRC}" + +src_unpack() { + unpack "apparmor-kernel-patches-${UP_KPVER}.tar.gz" + + kernel-2_src_unpack + + EPATCH_FORCE="yes" + EPATCH_OPTS="" + epatch ${WORKDIR}/${UP_KPVER}/current/apparmor-2.6.18-v154-fullseries.patch +} + +pkg_postinst() { + postinst_sources + + einfo + einfo "For more info on this patchset, and how to report problems, see:" + einfo "${HOMEPAGE}" + einfo + einfo "Make sure that your kernel configuration file is set with:" + einfo " CONFIG_SECURITY=y" + einfo " CONFIG_SECURITY_APPARMOR=m" + einfo "Without these, apparmor will not function." + einfo +} diff --git a/branches/experimental/sys-kernel/apparmor-sources/files/digest-apparmor-sources-2.6.17 b/branches/experimental/sys-kernel/apparmor-sources/files/digest-apparmor-sources-2.6.17 new file mode 100644 index 00000000..5fb45997 --- /dev/null +++ b/branches/experimental/sys-kernel/apparmor-sources/files/digest-apparmor-sources-2.6.17 @@ -0,0 +1,12 @@ +MD5 a6a5ccde0c291921c155a74da36463a2 apparmor-kernel-patches-2.6.17.9.tar.gz 231231 +RMD160 762d4b59aa508cfd82ebbeba4822ffb0551f5888 apparmor-kernel-patches-2.6.17.9.tar.gz 231231 +SHA256 0884cd7bfdff4505fd5271ca68b72f74b352d209321ef60dc81620b0539f0ec7 apparmor-kernel-patches-2.6.17.9.tar.gz 231231 +MD5 cd5d67dc1d3514ec240497efff0f8726 genpatches-2.6.17-1.base.tar.bz2 3337 +RMD160 f9b5621fed8fcfee7da697d89097842287b41b24 genpatches-2.6.17-1.base.tar.bz2 3337 +SHA256 2208b72729dce6daef7dc5700192aec0ae17327c794681621d2123f0c483ae21 genpatches-2.6.17-1.base.tar.bz2 3337 +MD5 0b6385904bccbd9d6c5508565e5c76ff genpatches-2.6.17-1.extras.tar.bz2 138704 +RMD160 14b17e02b7893e6b023bee9e1b40f4bc85a30f05 genpatches-2.6.17-1.extras.tar.bz2 138704 +SHA256 fa10ec7d3d74c8bf57fb3bd01c33f83dcca3c1e4cd4601937cc2ef904cce1dfe genpatches-2.6.17-1.extras.tar.bz2 138704 +MD5 37ddefe96625502161f075b9d907f21e linux-2.6.17.tar.bz2 41272919 +RMD160 26aad30c9a6610665c6c7d62401d79bf56a6a699 linux-2.6.17.tar.bz2 41272919 +SHA256 ab0f647d52f124958439517df9e1ae0efda90cdb851f59f522fa1749f1d87d58 linux-2.6.17.tar.bz2 41272919 diff --git a/branches/experimental/sys-kernel/apparmor-sources/files/digest-apparmor-sources-2.6.18 b/branches/experimental/sys-kernel/apparmor-sources/files/digest-apparmor-sources-2.6.18 new file mode 100644 index 00000000..fed15c63 --- /dev/null +++ b/branches/experimental/sys-kernel/apparmor-sources/files/digest-apparmor-sources-2.6.18 @@ -0,0 +1,12 @@ +MD5 523e91619920dea824a35bf813db1b67 apparmor-kernel-patches-2.6.18.tar.gz 231072 +RMD160 f734125d986dcb3aec371f0e24126a5473d5637f apparmor-kernel-patches-2.6.18.tar.gz 231072 +SHA256 91224ff1f45de306c0720a5680a8f883888b52f296b0de24c63ec02668782b63 apparmor-kernel-patches-2.6.18.tar.gz 231072 +MD5 0c1cd82748c5d2207fa034e32686bca7 genpatches-2.6.18-1.base.tar.bz2 2397 +RMD160 1b02d9e5adba7a9a17f85691f312ee2c870c9a48 genpatches-2.6.18-1.base.tar.bz2 2397 +SHA256 e87db440591d48f74b8d50f47bde55a1652c969626befa94aba48cee57aa5da8 genpatches-2.6.18-1.base.tar.bz2 2397 +MD5 f565ec95a1f2ac1b675f9a126c27c3c1 genpatches-2.6.18-1.extras.tar.bz2 147040 +RMD160 f62b371d522fa8978cee4e809baea364ed8e804a genpatches-2.6.18-1.extras.tar.bz2 147040 +SHA256 080b19f98ffa8f5edbccabfa9dd4ac845ecc1b21c7fba761ad3d011893117b01 genpatches-2.6.18-1.extras.tar.bz2 147040 +MD5 296a6d150d260144639c3664d127d174 linux-2.6.18.tar.bz2 41863580 +RMD160 f92283f956880676bfb1f1d5288325461e4e02e7 linux-2.6.18.tar.bz2 41863580 +SHA256 c95280ff6c5d2a17788f7cc582d23ae8a9a7ba3f202ec6e4238eaadfce7c163d linux-2.6.18.tar.bz2 41863580 diff --git a/branches/experimental/sys-kernel/apparmor-sources/metadata.xml b/branches/experimental/sys-kernel/apparmor-sources/metadata.xml new file mode 100644 index 00000000..e43ec030 --- /dev/null +++ b/branches/experimental/sys-kernel/apparmor-sources/metadata.xml @@ -0,0 +1,11 @@ + + + +apparmor + + zepher@sigalrm.com + Matthew Snelham + Primary Maintainer + +Patched kernel sources containing the proper symbol exports, and the full apparmor module suite. Based on gentoo-sources kernel. + diff --git a/branches/experimental/sys-libs/libapparmor/ChangeLog b/branches/experimental/sys-libs/libapparmor/ChangeLog new file mode 100644 index 00000000..a3d029ff --- /dev/null +++ b/branches/experimental/sys-libs/libapparmor/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for sys-libs/libapparmor +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 06 Mar 2007; Mario Fetka + +libapparmor-2.0_p132.ebuild, +metadata.xml: + Initial import of Matthew Snelham latest ebuilds into + the devel tree + diff --git a/branches/experimental/sys-libs/libapparmor/Manifest b/branches/experimental/sys-libs/libapparmor/Manifest new file mode 100644 index 00000000..0c3d647d --- /dev/null +++ b/branches/experimental/sys-libs/libapparmor/Manifest @@ -0,0 +1,16 @@ +DIST libapparmor-2.0-132.tar.gz 16744 RMD160 c174a530fadb8c33f2858160f2cdcf5b76289940 SHA1 953851b4079ff864bd9679c2f62b18c424662cb8 SHA256 b4ac4f208b1db08339effaf3362da0e3b240e1b6126b8a367d54006b23ae1b17 +EBUILD libapparmor-2.0_p132.ebuild 832 RMD160 cfa5f155e25c9c07fb12fc298ee07f9321e003d7 SHA1 48cf61585fd2c76a8d120cc2464e072d8665d3c8 SHA256 8594d0511bebaf04493d40dea971f8eefdc758328e2edc413aeb49b933a8cad9 +MD5 cd7427a4918636f52684669ce9f58187 libapparmor-2.0_p132.ebuild 832 +RMD160 cfa5f155e25c9c07fb12fc298ee07f9321e003d7 libapparmor-2.0_p132.ebuild 832 +SHA256 8594d0511bebaf04493d40dea971f8eefdc758328e2edc413aeb49b933a8cad9 libapparmor-2.0_p132.ebuild 832 +MISC ChangeLog 312 RMD160 dfd355760a7083b2705516c5e55982fbbef96794 SHA1 170e5ebbe0716e5a9028d98e820c109c208179c8 SHA256 c8590f21c39ff36733d6322cbe151a765c091eca2772e6c6496c118bca6ec5ec +MD5 265ca53db05a174cdd4950183addcf22 ChangeLog 312 +RMD160 dfd355760a7083b2705516c5e55982fbbef96794 ChangeLog 312 +SHA256 c8590f21c39ff36733d6322cbe151a765c091eca2772e6c6496c118bca6ec5ec ChangeLog 312 +MISC metadata.xml 450 RMD160 d535fe106e302ca44b57bb84c908879597d95391 SHA1 d1ab915420fa81974724847d4e1dbbcb4b6a2cd6 SHA256 ee835dc483681371f197a3a46241f0fc7ce54869b2578132c268a4dc171cf015 +MD5 61f0a7a9d59cc054a3542313d1515744 metadata.xml 450 +RMD160 d535fe106e302ca44b57bb84c908879597d95391 metadata.xml 450 +SHA256 ee835dc483681371f197a3a46241f0fc7ce54869b2578132c268a4dc171cf015 metadata.xml 450 +MD5 9913e4e3a663787501f86fe85c989cc6 files/digest-libapparmor-2.0_p132 256 +RMD160 efca71ce6079f9be02ca6bec4d0a3edea523f00a files/digest-libapparmor-2.0_p132 256 +SHA256 4d5fbabd865d64ab586b53e90f1fb7ad0ca8ac03dcb69e93fa6a105b7bdf8a9a files/digest-libapparmor-2.0_p132 256 diff --git a/branches/experimental/sys-libs/libapparmor/files/digest-libapparmor-2.0_p132 b/branches/experimental/sys-libs/libapparmor/files/digest-libapparmor-2.0_p132 new file mode 100644 index 00000000..20a2b08a --- /dev/null +++ b/branches/experimental/sys-libs/libapparmor/files/digest-libapparmor-2.0_p132 @@ -0,0 +1,3 @@ +MD5 6f62215d4e8d54ac1f79fd8d39c3bbd3 libapparmor-2.0-132.tar.gz 16744 +RMD160 c174a530fadb8c33f2858160f2cdcf5b76289940 libapparmor-2.0-132.tar.gz 16744 +SHA256 b4ac4f208b1db08339effaf3362da0e3b240e1b6126b8a367d54006b23ae1b17 libapparmor-2.0-132.tar.gz 16744 diff --git a/branches/experimental/sys-libs/libapparmor/libapparmor-2.0_p132.ebuild b/branches/experimental/sys-libs/libapparmor/libapparmor-2.0_p132.ebuild new file mode 100644 index 00000000..652ede60 --- /dev/null +++ b/branches/experimental/sys-libs/libapparmor/libapparmor-2.0_p132.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils toolchain-funcs + +MY_P="${P/_p/-}" +MONTH="October" +DESCRIPTION="Primary support library and headers for AppArmor userspace" +HOMEPAGE="http://forge.novell.com/modules/xfmod/project/?apparmor" +SRC_URI="http://forgeftp.novell.com/apparmor/Development%20-%20${MONTH}%20Snapshot/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND="virtual/libc" +RDEPEND="${DEPEND}" + +MY_S=${WORKDIR}/${P/_*/} + +src_unpack() { + unpack ${A} + + cd ${MY_S} + # the Make.rules isn't needed for Gentoo + sed -i "s/^include Make.rules//g" Makefile +} + +src_compile() { + cd ${MY_S} + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die +} + +src_install() { + cd ${MY_S} + make DESTDIR="${D}" install || die +} diff --git a/branches/experimental/sys-libs/libapparmor/metadata.xml b/branches/experimental/sys-libs/libapparmor/metadata.xml new file mode 100644 index 00000000..35e8e28a --- /dev/null +++ b/branches/experimental/sys-libs/libapparmor/metadata.xml @@ -0,0 +1,11 @@ + + + +apparmor + + zepher@sigalrm.com + Matthew Snelham + Primary Maintainer + +Apparmor shared libraries. Packaged separately due to license difference from primary apparmor code. +