tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
Apparmor: update to 2.8.1
Evgeny Egorochkin
12 years ago
0ef509b1
5c95ebf3
+37
-5
2 changed files
expand all
collapse all
unified
split
pkgs
os-specific
linux
apparmor
capability.patch
default.nix
+16
pkgs/os-specific/linux/apparmor/capability.patch
···
1
1
+
Description: allow parser to build even when not on Linux.
2
2
+
Author: Kees Cook <kees@debian.org>
3
3
+
4
4
+
Index: apparmor-debian/common/Make.rules
5
5
+
===================================================================
6
6
+
--- apparmor-debian.orig/common/Make.rules 2012-05-05 14:41:25.967259523 -0700
7
7
+
+++ apparmor-debian/common/Make.rules 2012-05-05 14:41:28.451291053 -0700
8
8
+
@@ -160,7 +160,7 @@
9
9
+
CAPABILITIES=$(shell echo "\#include <linux/capability.h>" | cpp -dM | LC_ALL=C sed -n -e '/CAP_EMPTY_SET/d' -e 's/^\#define[ \t]\+CAP_\([A-Z0-9_]\+\)[ \t]\+\([0-9xa-f]\+\)\(.*\)$$/CAP_\1/p' | sort)
10
10
+
11
11
+
.PHONY: list_capabilities
12
12
+
-list_capabilities: /usr/include/linux/capability.h
13
13
+
+list_capabilities:
14
14
+
@echo "$(CAPABILITIES)"
15
15
+
16
16
+
# =====================
+21
-5
pkgs/os-specific/linux/apparmor/default.nix
···
1
1
{ stdenv, fetchurl
2
2
, autoconf, automake, libtool, makeWrapper
3
3
-
, perl, bison, flex, glibc, gettext, which, rpm, tetex, LocaleGettext, bash, pam, TermReadKey, RpcXML, swig}:
3
3
+
, perl, bison, flex, glibc, gettext, which, rpm, tetex, LocaleGettext
4
4
+
, bash, pam, TermReadKey, RpcXML, swig, python }:
4
5
stdenv.mkDerivation rec {
5
6
6
7
name = "apparmor-${version}";
7
7
-
version = "2.6.1";
8
8
+
version = "2.8.1";
8
9
9
10
src = fetchurl {
10
10
-
url = "http://launchpad.net/apparmor/2.6/2.6.1/+download/${name}.tar.gz";
11
11
-
sha256 = "1x7225xgzyc5agbn41xsip236anr1kmaw70xc94pag82q7c1bc4w";
11
11
+
url = "http://launchpad.net/apparmor/2.8/${version}/+download/${name}.tar.gz";
12
12
+
sha256 = "1r0a5k14jbiik28m5gql0f3dbxl252jya7i120rrsbzqqnvw6nw7";
12
13
};
13
14
14
14
-
buildInputs = [ autoconf automake libtool perl bison flex gettext which rpm tetex LocaleGettext pam TermReadKey RpcXML swig makeWrapper ];
15
15
+
buildInputs = [
16
16
+
autoconf automake libtool perl bison flex gettext which rpm tetex
17
17
+
LocaleGettext pam TermReadKey RpcXML swig makeWrapper python ];
15
18
16
19
prePatch = ''
17
20
substituteInPlace libraries/libapparmor/src/Makefile.in --replace "/usr/include" "${glibc}/include"
···
24
27
substituteInPlace parser/Makefile --replace "/usr/include/bits/socket.h" "${glibc}/include/bits/socket.h"
25
28
substituteInPlace parser/Makefile --replace "/usr/include/linux/capability.h" "${glibc}/include/linux/capability.h"
26
29
30
30
+
# for some reason pdf documentation doesn't build
31
31
+
substituteInPlace parser/Makefile --replace "manpages htmlmanpages pdf" "manpages htmlmanpages"
32
32
+
27
33
substituteInPlace parser/tst/gen-xtrans.pl --replace "/usr/bin/perl" "${perl}/bin/perl"
28
34
substituteInPlace parser/tst/Makefile --replace "/usr/bin/prove" "${perl}/bin/prove"
29
35
substituteInPlace parser/tst/Makefile --replace "./caching.sh" "${bash}/bin/bash ./caching.sh"
30
36
'';
37
37
+
38
38
+
patches = ./capability.patch;
31
39
32
40
buildPhase =''
33
41
PERL5LIB=$PERL5LIB:$out/lib/perl5/site_perl:$out/lib
···
78
86
"${src}/kernel-patches/2.6.37/0001-AppArmor-compatibility-patch-for-v5-network-controll.patch"
79
87
"${src}/kernel-patches/2.6.37/0002-AppArmor-compatibility-patch-for-v5-interface.patch"
80
88
"${src}/kernel-patches/2.6.37/0003-AppArmor-Allow-dfa-backward-compatibility-with-broke.patch"
89
89
+
];
90
90
+
};
91
91
+
linux_3_2_patch = {
92
92
+
features.apparmor = true;
93
93
+
patch = [
94
94
+
"${src}/kernel-patches/3.2/0001-AppArmor-compatibility-patch-for-v5-network-controll.patch"
95
95
+
"${src}/kernel-patches/3.2/0002-AppArmor-compatibility-patch-for-v5-interface.patch"
96
96
+
"${src}/kernel-patches/3.2/0003-AppArmor-Allow-dfa-backward-compatibility-with-broke.patch"
81
97
];
82
98
};
83
99
};