svn commit: r363323 - in head/net/userfw: . files

William Grzybowski wg at FreeBSD.org
Tue Jul 29 14:07:43 UTC 2014


Author: wg
Date: Tue Jul 29 14:07:41 2014
New Revision: 363323
URL: http://svnweb.freebsd.org/changeset/ports/363323
QAT: https://qat.redports.org/buildarchive/r363323/

Log:
  net/userfw: support stage [1]
  
  - Fix for FreeBSD >= 10 [1]
  - USES tar:xz [1]
  - USES kmod
  - Remove check for FreeBSD < 8
  - Pass maintainership to submitter
  
  PR:		192235
  Submitted by:	gelraen.ua gmail com [1]

Added:
  head/net/userfw/files/
  head/net/userfw/files/patch-cmake__userfw_module.cmake   (contents, props changed)
  head/net/userfw/files/patch-core__CMakeLists.txt   (contents, props changed)
  head/net/userfw/files/patch-modules__dummynet__dummynet.c   (contents, props changed)
  head/net/userfw/files/patch-modules__ng_userfw_connector__ng_userfw_connector.c   (contents, props changed)
Modified:
  head/net/userfw/Makefile
  head/net/userfw/pkg-plist

Modified: head/net/userfw/Makefile
==============================================================================
--- head/net/userfw/Makefile	Tue Jul 29 14:02:16 2014	(r363322)
+++ head/net/userfw/Makefile	Tue Jul 29 14:07:41 2014	(r363323)
@@ -8,26 +8,17 @@ MASTER_SITES=	http://userfw.net/files/re
 		http://imax.in.ua/files/ \
 		http://projects.ukrweb.net/files/
 
-MAINTAINER=	ports at FreeBSD.org
+MAINTAINER=	gelraen.ua at gmail.com
 COMMENT=	Modular packet filter
 
-LICENSE=	BSD
+LICENSE=	BSD2CLAUSE
 
 SSP_UNSAFE=	kernel module does not support ssp
-USE_XZ=		yes
-USES=		cmake:outsource
+USES=		cmake:outsource kmod tar:xz
 USE_LDCONFIG=	yes
 
-KMODDIR?=	/boot/modules
-PLIST_SUB+=	KMODDIR=${KMODDIR}
-
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} < 800000
-BROKEN=		does not compile on FreeBSD 7.x
-.endif
-
 .if !exists(${SRC_BASE}/sys/sys/module.h)
 IGNORE=		requires kernel source files
 .endif
@@ -38,5 +29,6 @@ BROKEN=		Does not compile on powerpc
 
 CMAKE_ARGS+=	-DDOMAIN_STUB:BOOL=OFF
 CMAKE_ARGS+=	-DOPCODE_VERIFICATION:BOOL=OFF
+CMAKE_ARGS+=	-DKMODDIR="${KMODDIR}"
 
 .include <bsd.port.post.mk>

Added: head/net/userfw/files/patch-cmake__userfw_module.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/userfw/files/patch-cmake__userfw_module.cmake	Tue Jul 29 14:07:41 2014	(r363323)
@@ -0,0 +1,19 @@
+--- ./cmake/userfw_module.cmake.orig	2013-03-29 14:22:50.000000000 +0000
++++ ./cmake/userfw_module.cmake	2014-07-29 09:30:53.000000000 +0100
+@@ -11,7 +11,7 @@
+ 	add_custom_target(userfw_${modname} ALL
+ 		DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/userfw_${modname}.ko")
+ 
+-	install(CODE "execute_process(COMMAND make install \"KMODDIR=${KMODDIR}\" \"PREFIX=${CMAKE_INSTALL_PREFIX}\"
++	install(CODE "execute_process(COMMAND make install \"KMODDIR=${KMODDIR}\" \"PREFIX=\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\"
+ 		WORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\")")
+ endfunction(declare_userfw_module)
+ 
+@@ -28,6 +28,6 @@
+ 	add_custom_target(userfw_${modname} ALL
+ 		DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${filename}.ko")
+ 
+-	install(CODE "execute_process(COMMAND make install \"KMODDIR=${KMODDIR}\" \"PREFIX=${CMAKE_INSTALL_PREFIX}\"
++	install(CODE "execute_process(COMMAND make install \"KMODDIR=${KMODDIR}\" \"PREFIX=\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\"
+ 		WORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\")")
+ endfunction(declare_userfw_module_with_name)

Added: head/net/userfw/files/patch-core__CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/userfw/files/patch-core__CMakeLists.txt	Tue Jul 29 14:07:41 2014	(r363323)
@@ -0,0 +1,14 @@
+--- ./core/CMakeLists.txt.orig	2013-03-29 14:22:50.000000000 +0000
++++ ./core/CMakeLists.txt	2014-07-29 09:31:46.000000000 +0100
+@@ -27,9 +27,9 @@
+ add_custom_target(userfw_core_kmod ALL
+ 	DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/userfw.ko")
+ 
+-install(CODE "execute_process(COMMAND make install \"KMODDIR=${KMODDIR}\" \"PREFIX=${CMAKE_INSTALL_PREFIX}\"
++install(CODE "execute_process(COMMAND make install \"KMODDIR=${KMODDIR}\" \"PREFIX=\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\"
+ 		WORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\")")
+ if (DOMAIN_STUB)
+-	install(CODE "execute_process(COMMAND make install \"KMODDIR=${KMODDIR}\" \"PREFIX=${CMAKE_INSTALL_PREFIX}\"
++	install(CODE "execute_process(COMMAND make install \"KMODDIR=${KMODDIR}\" \"PREFIX=\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\"
+ 			WORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}/domain_stub\")")
+ endif (DOMAIN_STUB)

Added: head/net/userfw/files/patch-modules__dummynet__dummynet.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/userfw/files/patch-modules__dummynet__dummynet.c	Tue Jul 29 14:07:41 2014	(r363323)
@@ -0,0 +1,22 @@
+--- ./modules/dummynet/dummynet.c.orig	2013-03-29 14:22:50.000000000 +0000
++++ ./modules/dummynet/dummynet.c	2014-07-29 09:30:53.000000000 +0100
+@@ -57,15 +57,19 @@
+ 
+ 	if (ip_dn_io_ptr != NULL)
+ 	{
++#if __FreeBSD__ < 10
+ 		SET_NET_IPLEN(mtod(*mb, struct ip *));
++#endif
+ 		if (mtod(*mb, struct ip *)->ip_v == 4)
+ 			ret = ip_dn_io_ptr(mb, dir, &ipfw_args);
+ 		else if (mtod(*mb, struct ip *)->ip_v == 6)
+ 			ret = ip_dn_io_ptr(mb, dir | PROTO_IPV6, &ipfw_args);
++#if __FreeBSD__ < 10
+ 		if ((*mb) != NULL)
+ 		{
+ 			SET_HOST_IPLEN(mtod(*mb, struct ip *));
+ 		}
++#endif
+ 	}
+ 	return ret;
+ }

Added: head/net/userfw/files/patch-modules__ng_userfw_connector__ng_userfw_connector.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/userfw/files/patch-modules__ng_userfw_connector__ng_userfw_connector.c	Tue Jul 29 14:07:41 2014	(r363323)
@@ -0,0 +1,12 @@
+--- ./modules/ng_userfw_connector/ng_userfw_connector.c.orig	2013-03-29 14:22:50.000000000 +0000
++++ ./modules/ng_userfw_connector/ng_userfw_connector.c	2014-07-29 09:30:53.000000000 +0100
+@@ -196,7 +196,9 @@
+ 	if (hookp == NULL)
+ 		return ESRCH;
+ 
++#if __FreeBSD__ < 10
+ 	SET_NET_IPLEN(mtod(mb, struct ip *));
++#endif
+ 	NG_SEND_DATA_ONLY(err, hookp, mb);
+ 
+ 	return err;

Modified: head/net/userfw/pkg-plist
==============================================================================
--- head/net/userfw/pkg-plist	Tue Jul 29 14:02:16 2014	(r363322)
+++ head/net/userfw/pkg-plist	Tue Jul 29 14:07:41 2014	(r363323)
@@ -29,5 +29,3 @@ include/userfw/modules/ng_userfw_connect
 %%KMODDIR%%/userfw_ipfw.ko
 %%KMODDIR%%/userfw_log.ko
 %%KMODDIR%%/userfw_multiruleset.ko
- at exec /usr/sbin/kldxref /%%KMODDIR%%
- at unexec /usr/sbin/kldxref /%%KMODDIR%%


More information about the svn-ports-all mailing list