mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
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]
This commit is contained in:
parent
ba06c2d6a3
commit
9fb3cddb69
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=363323
@ -8,26 +8,17 @@ MASTER_SITES= http://userfw.net/files/release/ \
|
||||
http://imax.in.ua/files/ \
|
||||
http://projects.ukrweb.net/files/
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= gelraen.ua@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>
|
||||
|
19
net/userfw/files/patch-cmake__userfw_module.cmake
Normal file
19
net/userfw/files/patch-cmake__userfw_module.cmake
Normal file
@ -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)
|
14
net/userfw/files/patch-core__CMakeLists.txt
Normal file
14
net/userfw/files/patch-core__CMakeLists.txt
Normal file
@ -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)
|
22
net/userfw/files/patch-modules__dummynet__dummynet.c
Normal file
22
net/userfw/files/patch-modules__dummynet__dummynet.c
Normal file
@ -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;
|
||||
}
|
@ -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;
|
@ -29,5 +29,3 @@ include/userfw/modules/ng_userfw_connector.h
|
||||
%%KMODDIR%%/userfw_ipfw.ko
|
||||
%%KMODDIR%%/userfw_log.ko
|
||||
%%KMODDIR%%/userfw_multiruleset.ko
|
||||
@exec /usr/sbin/kldxref /%%KMODDIR%%
|
||||
@unexec /usr/sbin/kldxref /%%KMODDIR%%
|
||||
|
Loading…
Reference in New Issue
Block a user