From 742fc8bcefc3f4fe852312d9445a795fc4c30c45 Mon Sep 17 00:00:00 2001 From: Jakub Moc Date: Fri, 23 Nov 2007 15:44:54 +0000 Subject: net-firewall/tuxguardian: Fix compile w/ 2.6.19+ kernels svn path=/sunrise/; revision=5108 --- net-firewall/tuxguardian/ChangeLog | 5 + net-firewall/tuxguardian/Manifest | 7 +- .../tuxguardian/files/Makefile-gentoo-0.5.patch | 155 --------------------- .../files/tuxguardian-0.5-config.h.patch | 12 ++ .../files/tuxguardian-0.5-makefile.patch | 155 +++++++++++++++++++++ net-firewall/tuxguardian/tuxguardian-0.5.ebuild | 16 +-- 6 files changed, 182 insertions(+), 168 deletions(-) delete mode 100644 net-firewall/tuxguardian/files/Makefile-gentoo-0.5.patch create mode 100644 net-firewall/tuxguardian/files/tuxguardian-0.5-config.h.patch create mode 100644 net-firewall/tuxguardian/files/tuxguardian-0.5-makefile.patch (limited to 'net-firewall') diff --git a/net-firewall/tuxguardian/ChangeLog b/net-firewall/tuxguardian/ChangeLog index 076c13bab..5bc047645 100644 --- a/net-firewall/tuxguardian/ChangeLog +++ b/net-firewall/tuxguardian/ChangeLog @@ -2,6 +2,11 @@ # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 23 Nov 2007; Jakub Moc + +files/tuxguardian-0.5-config.h.patch, -files/Makefile-gentoo-0.5.patch, + ++, tuxguardian-0.5.ebuild: + Fix compile w/ 2.6.19+ kernels + 24 Jun 2007; Jakub Moc tuxguardian-0.5.ebuild: Fix English in pkg_postinst; cosmetics diff --git a/net-firewall/tuxguardian/Manifest b/net-firewall/tuxguardian/Manifest index 081d1952b..60945254d 100644 --- a/net-firewall/tuxguardian/Manifest +++ b/net-firewall/tuxguardian/Manifest @@ -1,6 +1,7 @@ -AUX Makefile-gentoo-0.5.patch 5132 RMD160 8c393e8e7bbad6326afcca21ef949c2628dbc71c SHA1 5a787ff190a7628e306a0f300229bd059e0cbad7 SHA256 cbf99738039025d199d3b43c7eeee0bb243a9afdc62a0f137e3e34ebe779e512 +AUX tuxguardian-0.5-config.h.patch 340 RMD160 49216e654def4192ae92aff7ff791d203efa9106 SHA1 289e66bbd3b63960473c9772cad44fe317e7eba0 SHA256 b12880a91cc6441d1c052ebe880889f9b3feb6026151d4c8a44c4b5f7dcfaaec +AUX tuxguardian-0.5-makefile.patch 5132 RMD160 8c393e8e7bbad6326afcca21ef949c2628dbc71c SHA1 5a787ff190a7628e306a0f300229bd059e0cbad7 SHA256 cbf99738039025d199d3b43c7eeee0bb243a9afdc62a0f137e3e34ebe779e512 AUX tuxguardian.init 489 RMD160 3d375b570e9d02b8431fe4e0e1c3c43522695982 SHA1 f334783f921ca8947e12c9a6898819c594a4e3b1 SHA256 0dec459c199753cff4979a15860ffb1347445baaccb49619b0bffed8809b2ef9 DIST tuxguardian-0.5.tar.gz 65987 RMD160 cc521df3dc05dbf776e8b61687c45bede37a6d25 SHA1 5713f6e7d237cb8ee4a38e51d16912e29f2b9ff9 SHA256 3e711cad85af8ddbf6492ee08e8d63dce8028cd075d4aac9924884c0325b7e4d -EBUILD tuxguardian-0.5.ebuild 1807 RMD160 7ec08ccd6c8dca5692496ebfb69c309c8a43a50c SHA1 f775d065de7e2f3e520a072483326721cfa85549 SHA256 ad191774e5436e460c78a449a94d6885a6d1d61eb60cf7f7787fd8077cc87c7a -MISC ChangeLog 786 RMD160 8ce721ef9c9e87b95e42df4202b6d4c08f4d9aec SHA1 5e5f911afb00b0bbd929f2943dd4699606158266 SHA256 89d0f6a4f2e645779b7f83f1ca9b7bf0c14f49a743a27d74734a39fb2bf79289 +EBUILD tuxguardian-0.5.ebuild 1499 RMD160 a2267ad790093ea4f7d9d15928e4c5c1fdefd33f SHA1 4b304c2a1d9b0e5f2123fd37208d476eb207bb75 SHA256 a96b6a5670470b21092feff0d2df09e1eba2ad01245d6711c48a14b5a7fa4f14 +MISC ChangeLog 969 RMD160 b07f311d735d189fdef0c4d1e9ded00e7f653d78 SHA1 943604d0bdb77e6accb44b1deb9c4d12176974c7 SHA256 126e70c60c1472f3071c7b3bae0949b23054007ba3eae1d843722fbfba160c06 MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42 diff --git a/net-firewall/tuxguardian/files/Makefile-gentoo-0.5.patch b/net-firewall/tuxguardian/files/Makefile-gentoo-0.5.patch deleted file mode 100644 index 799fe7367..000000000 --- a/net-firewall/tuxguardian/files/Makefile-gentoo-0.5.patch +++ /dev/null @@ -1,155 +0,0 @@ -diff -udNr tuxguardian-0.5/daemon/Makefile tuxguardian-0.5-gentoo/daemon/Makefile ---- tuxguardian-0.5/daemon/Makefile 2006-04-09 01:28:18.000000000 +0200 -+++ tuxguardian-0.5-gentoo/daemon/Makefile 2007-04-26 20:33:32.000000000 +0200 -@@ -1,4 +1,4 @@ --bindir=/usr/local/bin -+bindir=/usr/sbin - - - all: daemon -@@ -7,8 +7,10 @@ - gcc -pthread daemon.c pblhash.c pbl.c md5.c -o tg-daemon - - install: -- @install -m 0700 -o root -g root tg-daemon $(bindir) && \ -- touch /etc/daemon.conf && \ -+ /bin/mkdir -p ${DESTDIR}$(bindir) -+ @install -m 0700 -o root -g root tg-daemon ${DESTDIR}$(bindir) && \ -+ /bin/mkdir ${DESTDIR}/etc -+ touch ${DESTDIR}/etc/daemon.conf && \ - echo Done.; - - uninstall: -diff -udNr tuxguardian-0.5/frontend/tg-frontend.pro tuxguardian-0.5-gentoo/frontend/tg-frontend.pro ---- tuxguardian-0.5/frontend/tg-frontend.pro 2006-04-09 00:14:12.000000000 +0200 -+++ tuxguardian-0.5-gentoo/frontend/tg-frontend.pro 2007-04-26 20:40:41.000000000 +0200 -@@ -13,5 +13,5 @@ - TEMPLATE =app - CONFIG += qt warn_on release - LANGUAGE = C++ --DESTDIR = /usr/local/bin -+DESTDIR =./ - QMAKE_CXXFLAGS_WARN_ON = -Wno-non-virtual-dtor -diff -udNr tuxguardian-0.5/Makefile tuxguardian-0.5-gentoo/Makefile ---- tuxguardian-0.5/Makefile 2006-04-09 01:37:31.000000000 +0200 -+++ tuxguardian-0.5-gentoo/Makefile 2007-04-26 20:47:16.000000000 +0200 -@@ -5,31 +5,15 @@ - ifeq ($(IS_ROOT), yes) - all: - @echo -e "\n\nCompiling and installing the frontend\n------------------------------------------------"; \ -- cd frontend; qmake tg-frontend.pro; make; cd ..; -+ cd frontend; /usr/qt/3/bin/qmake tg-frontend.pro; make;cd ..; - - @echo -e "\n\nCompiling the daemon\n------------------------------------------------"; \ - cd daemon; make; -- @echo -e "\n\nInstalling the daemon\n------------------------------------------------"; \ -- cd daemon; make install; -- -- @echo -e "\n\nCompiling the module\n------------------------------------------------"; \ -- cd module; make; -- @echo -e "\n\nInstalling the module\n------------------------------------------------"; \ -- cd module; make install; -- -- @echo -e "\n\n\n\nSuccess! To start TuxGuardian:" -- @echo -e "---------------------------------" -- @echo -e " (for more information, please visit tuxguardian.sf.net)\n" -- @echo -e "\t$$ su" -- @echo -e "\t " -- @echo -e "\t$$ tg-daemon &" -- @echo -e "\t$$ modprobe tuxg" -- @echo -e "\t$$ tg-frontend &\n" -- -+# @echo -e "\n\nCompiling the module\n------------------------------------------------"; \ -+# cd module; make; - clean: -- @for i in $(PARTS); do \ - echo -e "\n\nCleaning the "$$i"\n------------------------------------------------"; \ -- cd $$i; make clean; cd ..; \ -+ cd daemon; make clean; cd ..; \ - done - uninstall: - @echo -e "\n\nUninstalling the frontend\n------------------------------------------------"; \ -@@ -39,9 +23,12 @@ - cd daemon; make uninstall; cd ..; - - @echo -e "\n\nUninstalling the module\n------------------------------------------------"; \ -- cd module; make uninstall; -+# cd module; make uninstall; - install: -- @echo -e "No need to 'make install'. Just type 'make'" -+# cd module; make install DESTDIR="${DESTDIR}"; cd ..; -+ cd daemon; make install DESTDIR="${DESTDIR}"; cd ..; -+ cd frontend; cp tg-frontend ${DESTDIR}usr/sbin/; cd ..; -+ - else - all: - @echo "You must be root to compile and install!" -@@ -49,8 +36,6 @@ - clean: - @echo "You must be root to clear!" - @exit 1 --install: -- @echo -e "No need to 'make install'. Just type 'make'" - uninstall: - @echo "You must be root to uninstall!" - @exit 1 -diff -udNr tuxguardian-0.5/module/Makefile tuxguardian-0.5-gentoo/module/Makefile ---- tuxguardian-0.5/module/Makefile 2006-04-09 00:12:59.000000000 +0200 -+++ tuxguardian-0.5-gentoo/module/Makefile 2007-04-26 20:33:32.000000000 +0200 -@@ -1,40 +1,31 @@ --KERNELDIR := /lib/modules/$(shell uname -r)/build --KERNEL_SOURCES := $(KERNDIR) -+MODULES_DIR := /lib/modules/$(shell uname -r) -+KERNEL_DIR := ${MODULES_DIR}/build -+KERNEL_SOURCES := $(KERNEL_DIR) -+ - KERNEL_HEADERS := -I$(KERNEL_SOURCES)/include - --obj-m := tuxg.o -+ -+obj-m += tuxg.o - tuxg-objs := tg-defs.o tg.o - EXTRA_CFLAGS += -Os -+.PHONY: all modules modules_install install clean - - MODULE_NAME := tuxg - - --# checks if the user is running kernel 2.6.12 or above --MINOR=$(shell uname -r | cut -c3) --VERSION=$(shell uname -r | sed -n 's/[[:digit:]]\.[[:digit:]]\.\([[:digit:]]*\).*/\1/p') --CORRECT_VERSION=$(shell if [ $(VERSION) -ge 12 -a $(MINOR) -ge 6 ]; then echo yes; else echo no; fi) --ifeq ($(CORRECT_VERSION),yes) --all: -- make -C /lib/modules/$(shell uname -r)/build/ SUBDIRS=$(shell pwd) modules --else --all: -- @echo "You need kernel 2.6.12 or above!" -- @exit 1 --endif -- -- - -+all: module -+ - --install: -- @install -m 0700 -o root -g root tuxg.ko /lib/modules/$(shell uname -r) -- @/sbin/depmod -ae -- @echo "Done." -+module: -+ make ${KERNEL_HEADERS} -C ${KERNEL_DIR} M=$$PWD modules; - --uninstall: -- @rm -f /lib/modules/$(shell uname -r)/tuxg.ko -- @depmod -ae -- @echo "Done." -+install: module_install -+ -+modules_install: -+ make -C ${KERNEL_DIR} M=$$PWD modules_install; - - clean: - @rm -rf *.o *.ko *.mod.? .t* *~ - @echo "Done." -+ diff --git a/net-firewall/tuxguardian/files/tuxguardian-0.5-config.h.patch b/net-firewall/tuxguardian/files/tuxguardian-0.5-config.h.patch new file mode 100644 index 000000000..b76780e9e --- /dev/null +++ b/net-firewall/tuxguardian/files/tuxguardian-0.5-config.h.patch @@ -0,0 +1,12 @@ +--- tuxguardian-05-orginal/module/tg.h 2006-04-03 04:56:25.000000000 +0200 ++++ tuxguardian-0.5/module/tg.h 2007-11-23 13:47:30.000000000 +0100 +@@ -24,8 +24,7 @@ + #ifndef __HAS_TG_H + #define __HAS_TG_H + +- +-#include ++#include + #include + #include + #include diff --git a/net-firewall/tuxguardian/files/tuxguardian-0.5-makefile.patch b/net-firewall/tuxguardian/files/tuxguardian-0.5-makefile.patch new file mode 100644 index 000000000..799fe7367 --- /dev/null +++ b/net-firewall/tuxguardian/files/tuxguardian-0.5-makefile.patch @@ -0,0 +1,155 @@ +diff -udNr tuxguardian-0.5/daemon/Makefile tuxguardian-0.5-gentoo/daemon/Makefile +--- tuxguardian-0.5/daemon/Makefile 2006-04-09 01:28:18.000000000 +0200 ++++ tuxguardian-0.5-gentoo/daemon/Makefile 2007-04-26 20:33:32.000000000 +0200 +@@ -1,4 +1,4 @@ +-bindir=/usr/local/bin ++bindir=/usr/sbin + + + all: daemon +@@ -7,8 +7,10 @@ + gcc -pthread daemon.c pblhash.c pbl.c md5.c -o tg-daemon + + install: +- @install -m 0700 -o root -g root tg-daemon $(bindir) && \ +- touch /etc/daemon.conf && \ ++ /bin/mkdir -p ${DESTDIR}$(bindir) ++ @install -m 0700 -o root -g root tg-daemon ${DESTDIR}$(bindir) && \ ++ /bin/mkdir ${DESTDIR}/etc ++ touch ${DESTDIR}/etc/daemon.conf && \ + echo Done.; + + uninstall: +diff -udNr tuxguardian-0.5/frontend/tg-frontend.pro tuxguardian-0.5-gentoo/frontend/tg-frontend.pro +--- tuxguardian-0.5/frontend/tg-frontend.pro 2006-04-09 00:14:12.000000000 +0200 ++++ tuxguardian-0.5-gentoo/frontend/tg-frontend.pro 2007-04-26 20:40:41.000000000 +0200 +@@ -13,5 +13,5 @@ + TEMPLATE =app + CONFIG += qt warn_on release + LANGUAGE = C++ +-DESTDIR = /usr/local/bin ++DESTDIR =./ + QMAKE_CXXFLAGS_WARN_ON = -Wno-non-virtual-dtor +diff -udNr tuxguardian-0.5/Makefile tuxguardian-0.5-gentoo/Makefile +--- tuxguardian-0.5/Makefile 2006-04-09 01:37:31.000000000 +0200 ++++ tuxguardian-0.5-gentoo/Makefile 2007-04-26 20:47:16.000000000 +0200 +@@ -5,31 +5,15 @@ + ifeq ($(IS_ROOT), yes) + all: + @echo -e "\n\nCompiling and installing the frontend\n------------------------------------------------"; \ +- cd frontend; qmake tg-frontend.pro; make; cd ..; ++ cd frontend; /usr/qt/3/bin/qmake tg-frontend.pro; make;cd ..; + + @echo -e "\n\nCompiling the daemon\n------------------------------------------------"; \ + cd daemon; make; +- @echo -e "\n\nInstalling the daemon\n------------------------------------------------"; \ +- cd daemon; make install; +- +- @echo -e "\n\nCompiling the module\n------------------------------------------------"; \ +- cd module; make; +- @echo -e "\n\nInstalling the module\n------------------------------------------------"; \ +- cd module; make install; +- +- @echo -e "\n\n\n\nSuccess! To start TuxGuardian:" +- @echo -e "---------------------------------" +- @echo -e " (for more information, please visit tuxguardian.sf.net)\n" +- @echo -e "\t$$ su" +- @echo -e "\t " +- @echo -e "\t$$ tg-daemon &" +- @echo -e "\t$$ modprobe tuxg" +- @echo -e "\t$$ tg-frontend &\n" +- ++# @echo -e "\n\nCompiling the module\n------------------------------------------------"; \ ++# cd module; make; + clean: +- @for i in $(PARTS); do \ + echo -e "\n\nCleaning the "$$i"\n------------------------------------------------"; \ +- cd $$i; make clean; cd ..; \ ++ cd daemon; make clean; cd ..; \ + done + uninstall: + @echo -e "\n\nUninstalling the frontend\n------------------------------------------------"; \ +@@ -39,9 +23,12 @@ + cd daemon; make uninstall; cd ..; + + @echo -e "\n\nUninstalling the module\n------------------------------------------------"; \ +- cd module; make uninstall; ++# cd module; make uninstall; + install: +- @echo -e "No need to 'make install'. Just type 'make'" ++# cd module; make install DESTDIR="${DESTDIR}"; cd ..; ++ cd daemon; make install DESTDIR="${DESTDIR}"; cd ..; ++ cd frontend; cp tg-frontend ${DESTDIR}usr/sbin/; cd ..; ++ + else + all: + @echo "You must be root to compile and install!" +@@ -49,8 +36,6 @@ + clean: + @echo "You must be root to clear!" + @exit 1 +-install: +- @echo -e "No need to 'make install'. Just type 'make'" + uninstall: + @echo "You must be root to uninstall!" + @exit 1 +diff -udNr tuxguardian-0.5/module/Makefile tuxguardian-0.5-gentoo/module/Makefile +--- tuxguardian-0.5/module/Makefile 2006-04-09 00:12:59.000000000 +0200 ++++ tuxguardian-0.5-gentoo/module/Makefile 2007-04-26 20:33:32.000000000 +0200 +@@ -1,40 +1,31 @@ +-KERNELDIR := /lib/modules/$(shell uname -r)/build +-KERNEL_SOURCES := $(KERNDIR) ++MODULES_DIR := /lib/modules/$(shell uname -r) ++KERNEL_DIR := ${MODULES_DIR}/build ++KERNEL_SOURCES := $(KERNEL_DIR) ++ + KERNEL_HEADERS := -I$(KERNEL_SOURCES)/include + +-obj-m := tuxg.o ++ ++obj-m += tuxg.o + tuxg-objs := tg-defs.o tg.o + EXTRA_CFLAGS += -Os ++.PHONY: all modules modules_install install clean + + MODULE_NAME := tuxg + + +-# checks if the user is running kernel 2.6.12 or above +-MINOR=$(shell uname -r | cut -c3) +-VERSION=$(shell uname -r | sed -n 's/[[:digit:]]\.[[:digit:]]\.\([[:digit:]]*\).*/\1/p') +-CORRECT_VERSION=$(shell if [ $(VERSION) -ge 12 -a $(MINOR) -ge 6 ]; then echo yes; else echo no; fi) +-ifeq ($(CORRECT_VERSION),yes) +-all: +- make -C /lib/modules/$(shell uname -r)/build/ SUBDIRS=$(shell pwd) modules +-else +-all: +- @echo "You need kernel 2.6.12 or above!" +- @exit 1 +-endif +- +- + ++all: module ++ + +-install: +- @install -m 0700 -o root -g root tuxg.ko /lib/modules/$(shell uname -r) +- @/sbin/depmod -ae +- @echo "Done." ++module: ++ make ${KERNEL_HEADERS} -C ${KERNEL_DIR} M=$$PWD modules; + +-uninstall: +- @rm -f /lib/modules/$(shell uname -r)/tuxg.ko +- @depmod -ae +- @echo "Done." ++install: module_install ++ ++modules_install: ++ make -C ${KERNEL_DIR} M=$$PWD modules_install; + + clean: + @rm -rf *.o *.ko *.mod.? .t* *~ + @echo "Done." ++ diff --git a/net-firewall/tuxguardian/tuxguardian-0.5.ebuild b/net-firewall/tuxguardian/tuxguardian-0.5.ebuild index c8ee1cd18..fa1d18ef7 100644 --- a/net-firewall/tuxguardian/tuxguardian-0.5.ebuild +++ b/net-firewall/tuxguardian/tuxguardian-0.5.ebuild @@ -16,28 +16,24 @@ IUSE="" DEPEND="$(qt_min_version 3.1)" RDEPEND="${DEPEND}" +CONFIG_CHECK="SECURITY SECURITY_CAPABILITIES" + pkg_setup() { linux-mod_pkg_setup if kernel_is lt 2 6 12; then die "${P} needs a kernel >=2.6.12!" fi - if ! linux_chkconfig_present SECURITY; then - eerror "${P} needs \"different security models\" in kernel enabled (SECURITY=Y)" - eerror "AND Default Linux Capabilities build as module (SECURITY_CAPABILITIES=M)" - die "Kernel config not suitable" - fi - if ! linux_chkconfig_module SECURITY_CAPABILITIES; then - eerror "${P} needs \"Default Linux Capabilities\" build as module" - die "Kernel config not suitable" - fi MODULE_NAMES="tuxg(extra:${S}/module)" BUILD_PARAMS="KERNEL_SRC=${KERNEL_DIR}" } + src_unpack() { unpack ${A} cd "${S}" - epatch "${FILESDIR}"/Makefile-gentoo-0.5.patch + epatch "${FILESDIR}"/${P}-makefile.patch + kernel_is gt 2 6 18 && epatch "${FILESDIR}"/${P}-config.h.patch } + src_compile() { linux-mod_src_compile emake DESTDIR="${D}" || die "emake failed" -- cgit v1.2.3-65-gdbad