summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-05-08 02:34:52 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2012-05-08 02:34:52 +0200
commit80e4c67387f84bb69c348c30aca36ba92b4c9cd9 (patch)
tree9c1d08f2fcbeed553c469e8e2e2570fb36390142
parentAdd the grsecurity and pax utilities. (diff)
downloadexheres-80e4c67387f84bb69c348c30aca36ba92b4c9cd9.tar.xz
exheres-80e4c67387f84bb69c348c30aca36ba92b4c9cd9.zip
Pair down with woutershep's suggestions.
-rw-r--r--metadata/about.conf4
-rw-r--r--packages/sys-apps/gradm/files/gradm-2.9.201202232055.patch32
-rw-r--r--packages/sys-apps/gradm/gradm-2.9.201202232055.exheres-022
-rw-r--r--packages/sys-apps/pax-utils/pax-utils-0.4.exheres-028
-rw-r--r--packages/sys-apps/paxctl/paxctl-0.7.exheres-07
5 files changed, 15 insertions, 78 deletions
diff --git a/metadata/about.conf b/metadata/about.conf
index 30a3080..93cbb7a 100644
--- a/metadata/about.conf
+++ b/metadata/about.conf
@@ -1,4 +1,4 @@
homepage = http://www.zx2c4.com/
-status = dev
-summary = Jason A. Donenfeld's dev repo
+status = third-party
+summary = Jason A. Donenfeld's development repo
owner = Jason A. Donenfeld <Jason@zx2c4.com>
diff --git a/packages/sys-apps/gradm/files/gradm-2.9.201202232055.patch b/packages/sys-apps/gradm/files/gradm-2.9.201202232055.patch
deleted file mode 100644
index cd878ee..0000000
--- a/packages/sys-apps/gradm/files/gradm-2.9.201202232055.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -Naur gradm2.orig/Makefile gradm2/Makefile
---- gradm2.orig/Makefile 2011-03-26 14:46:14.000000000 -0400
-+++ gradm2/Makefile 2011-03-27 11:11:36.000000000 -0400
-@@ -18,16 +18,16 @@
- BISON=/usr/bin/bison
- #YACC := $(shell if [ -x $(BYACC) ]; then echo $(BYACC); else echo $(BISON); fi)
- YACC=$(BISON)
--MKNOD=/bin/mknod
-+MKNOD=true
- #for dietlibc
- #CC=/usr/bin/diet /usr/bin/gcc
- CC=/usr/bin/gcc
- FIND=/usr/bin/find
--STRIP=/usr/bin/strip
-+STRIP=true
- LIBS := $(shell if [ "`uname -m`" != "sparc64" -a "`uname -m`" != "x86_64" ]; then echo "-lfl" ; else echo "" ; fi)
- OPT_FLAGS := $(shell if [ "`uname -m`" != "sparc64" ] && [ "`uname -m`" != "x86_64" ]; then echo "-O2" ; else echo "-O2 -m64" ; fi)
--CFLAGS := $(OPT_FLAGS) -Wcast-qual -DGRSEC_DIR=\"$(GRSEC_DIR)\" -D_LARGEFILE64_SOURCE
--LDFLAGS=
-+CFLAGS := $(OPT_FLAGS) -Wcast-qual -DGRSEC_DIR=\"$(GRSEC_DIR)\" -D_LARGEFILE64_SOURCE $(CFLAGS)
-+LDFLAGS+=
- INSTALL = /usr/bin/install -c
-
- # FHS
-@@ -134,6 +134,7 @@
- $(MKNOD) -m 0622 $(DESTDIR)/dev/grsec c 1 13 ; \
- fi \
- fi
-+ @mkdir -p $(DESTDIR)/etc/udev/rules.d
- @if [ -d $(DESTDIR)/etc/udev/rules.d ] ; then \
- echo "ACTION!=\"add|change\", GOTO=\"permissions_end\"" > $(DESTDIR)/etc/udev/rules.d/80-grsec.rules ; \
- echo "KERNEL==\"grsec\", MODE=\"0622\"" >> $(DESTDIR)/etc/udev/rules.d/80-grsec.rules ; \
diff --git a/packages/sys-apps/gradm/gradm-2.9.201202232055.exheres-0 b/packages/sys-apps/gradm/gradm-2.9.201202232055.exheres-0
index c173865..f9f26e5 100644
--- a/packages/sys-apps/gradm/gradm-2.9.201202232055.exheres-0
+++ b/packages/sys-apps/gradm/gradm-2.9.201202232055.exheres-0
@@ -1,14 +1,16 @@
# Copyright 2012 Jason A. Donenfeld <Jason@zx2c4.com>
# Distributed under the terms of the GNU General Public License v2
+# Based in part upon 'gradm-2.9.201202232055.ebuild' from Gentoo, which is:
+# Copyright 1999-2012 Gentoo Foundation
SUMMARY="Administrative interface for the grsecurity Role Based Access Control system."
HOMEPAGE="http://www.grsecurity.net/"
-MY_PV="$(ever replace 2 - ${PV})"
+MY_PV="$(ever replace 2 -)"
DOWNLOADS="http://grsecurity.net/test/${PN}-${MY_PV}.tar.gz"
LICENCES="GPL-2"
SLOT="0"
-PLATFORMS="~amd64 ~x86"
+PLATFORMS="~amd64"
MYOPTIONS="pam"
DEPENDENCIES="
@@ -22,22 +24,22 @@ DEPENDENCIES="
sys-apps/paxctl
"
-WORK="${WORKBASE}/${PN}2"
-
-DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}/${PNV}.patch" )
+WORK="${WORKBASE}/${PN}$(ever major)"
src_compile() {
- emake $(option pam || echo nopam) CC="${CC}" OPT_FLAGS="${CFLAGS}"
+ emake CC="${CC}" OPT_FLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" $(option pam || echo nopam)
}
src_install() {
- default
+ emake DESTDIR="${IMAGE}" MKNOD=true STRIP=true install
edo chmod 711 "${IMAGE}/sbin/gradm"
edo rmdir "${IMAGE}/dev"
}
pkg_postinst() {
- esandbox allow_net --connect "unix:/run/udev/control"
- edo udevadm control --reload-rules && edo udevadm trigger --action=add --sysname-match=grsec
- ewarn "Be sure to set a password with 'gradm -P' before enabling learning mode."
+ ewarn "Be sure to set a password with 'gradm -P' before enabling learning mode."
+
+ [[ "${ROOT}" == "/" ]] || return
+ esandbox allow_net --connect "unix:/run/udev/control"
+ edo udevadm control --reload-rules && edo udevadm trigger --action=add --sysname-match=grsec
}
diff --git a/packages/sys-apps/pax-utils/pax-utils-0.4.exheres-0 b/packages/sys-apps/pax-utils/pax-utils-0.4.exheres-0
deleted file mode 100644
index aab1e01..0000000
--- a/packages/sys-apps/pax-utils/pax-utils-0.4.exheres-0
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 2008-2012 Wulf C. Krueger
-# Distributed under the terms of the GNU General Public License v2
-
-SUMMARY="Utilities for ELF binaries (e. g. scanelf)"
-HOMEPAGE="http://hardened.gentoo.org/${PN}.xml"
-DOWNLOADS="mirror://gentoo/${PNV}.tar.xz"
-
-LICENCES="GPL-2"
-SLOT="0"
-PLATFORMS="~amd64 ~x86"
-MYOPTIONS="caps"
-
-DEPENDENCIES="
- build:
- app-arch/xz
- build+run:
- caps? ( sys-libs/libcap )
-"
-
-src_compile() {
- emake CC="${CC}" USE_CAP=$(option caps && echo yes || echo no)
-}
-
-src_install() {
- default
-
- edo rm -r "${IMAGE}"/usr/share/doc/${PN}
-}
diff --git a/packages/sys-apps/paxctl/paxctl-0.7.exheres-0 b/packages/sys-apps/paxctl/paxctl-0.7.exheres-0
index 1f222ac..90ae408 100644
--- a/packages/sys-apps/paxctl/paxctl-0.7.exheres-0
+++ b/packages/sys-apps/paxctl/paxctl-0.7.exheres-0
@@ -7,10 +7,5 @@ DOWNLOADS="http://pax.grsecurity.net/${PNV}.tar.bz2"
LICENCES="GPL-2"
SLOT="0"
-PLATFORMS="~amd64 ~x86"
+PLATFORMS="~amd64"
MYOPTIONS=""
-
-DEPENDENCIES="
- build:
- sys-devel/binutils
-"