Index: head/devel/nss_wrapper/Makefile =================================================================== --- head/devel/nss_wrapper/Makefile (revision 473828) +++ head/devel/nss_wrapper/Makefile (revision 473829) @@ -1,37 +1,37 @@ # $FreeBSD$ PORTNAME= nss_wrapper PORTVERSION= 1.1.3 CATEGORIES= devel MASTER_SITES= SAMBA/cwrap MAINTAINER= timur@FreeBSD.org COMMENT= Wrapper for the user, group and hosts NSS API LICENSE= GPLv3 USES= cmake:outsource perl5 shebangfix USE_PERL5= run USE_LDCONFIG= yes -CMAKE_ARGS+= -DMAN_INSTALL_DIR:PATH="${PREFIX}/man" +CMAKE_ARGS= -DMAN_INSTALL_DIR:PATH="${PREFIX}/man" OPTIONS_DEFINE= TEST OPTIONS_DEFAULT= TEST -TEST_TARGET= test +TEST_TEST_TARGET= test TEST_CMAKE_BOOL= UNIT_TESTING -TEST_BUILD_DEPENDS+= cmocka>=1.1.1:sysutils/cmocka +TEST_BUILD_DEPENDS= cmocka>=1.1.1:sysutils/cmocka SHEBANG_FILES= nss_wrapper.pl PLIST_FILES= bin/nss_wrapper.pl \ libdata/pkgconfig/nss_wrapper.pc \ lib/cmake/nss_wrapper/nss_wrapper-config-version.cmake \ lib/cmake/nss_wrapper/nss_wrapper-config.cmake \ lib/libnss_wrapper.so.0.2.3 \ lib/libnss_wrapper.so.0 \ lib/libnss_wrapper.so \ man/man1/nss_wrapper.1.gz .include Index: head/devel/nss_wrapper/pkg-descr =================================================================== --- head/devel/nss_wrapper/pkg-descr (revision 473828) +++ head/devel/nss_wrapper/pkg-descr (revision 473829) @@ -1,17 +1,17 @@ There are projects which provide daemons needing to be able to create, modify and delete Unix users. Or just switch user ids to interact with the system e.g. a user space file server. To be able to test that you need the privilege to modify the passwd and groups file. With nss_wrapper it is possible to define your own passwd and groups file which will be used by software to act correctly while under test. If you have a client and server under test they normally use functions to resolve network names to addresses (dns) or vice versa. The nss_wrappers allow you to create a hosts file to setup name resolution for the addresses you use with socket_wrapper. - Provides information for user and group accounts. - Network name resolution using a hosts file. - Loading and testing of NSS modules. -WWW: https://cwrap.org/ +WWW: https://cwrap.org/nss_wrapper.html Index: head/devel/pam_wrapper/Makefile =================================================================== --- head/devel/pam_wrapper/Makefile (revision 473828) +++ head/devel/pam_wrapper/Makefile (revision 473829) @@ -1,47 +1,28 @@ # $FreeBSD$ PORTNAME= pam_wrapper PORTVERSION= 1.0.6 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= SAMBA/cwrap MAINTAINER= timur@FreeBSD.org COMMENT= Preloadable wrapper to test PAM applications and PAM Modules LICENSE= GPLv3 +EXTRA_PATCHES= ${PATCHDIR}/python-detection.patch:-p1 + USES= cmake:outsource python:2.7+ USE_LDCONFIG= yes -CMAKE_ARGS+= -DMAN_INSTALL_DIR:PATH="${PREFIX}/man" +CMAKE_ARGS= -DMAN_INSTALL_DIR:PATH="${PREFIX}/man" OPTIONS_DEFINE= TEST OPTIONS_DEFAULT= TEST -TEST_TARGET= test +TEST_TEST_TARGET= test TEST_CMAKE_BOOL= UNIT_TESTING -TEST_BUILD_DEPENDS+= cmocka>=1.1.1:sysutils/cmocka - -PLIST_FILES= libdata/pkgconfig/pam_wrapper.pc \ - libdata/pkgconfig/libpamtest.pc \ - lib/cmake/pam_wrapper/pam_wrapper-config-version.cmake \ - lib/cmake/pam_wrapper/pam_wrapper-config.cmake \ - lib/cmake/libpamtest/libpamtest-config.cmake \ - lib/cmake/libpamtest/libpamtest-config-version.cmake \ - lib/libpam_wrapper.so.0.0.3 \ - lib/libpam_wrapper.so.0 \ - lib/libpam_wrapper.so \ - lib/libpamtest.so.0.0.3 \ - lib/libpamtest.so.0 \ - lib/libpamtest.so \ - lib/pam_wrapper/pam_matrix.so \ - lib/pam_wrapper/pam_get_items.so \ - lib/pam_wrapper/pam_set_items.so \ - ${PYTHON_SITELIBDIR}/pypamtest.so \ - include/libpamtest.h \ - man/man1/pam_wrapper.1.gz \ - man/man8/pam_matrix.8.gz \ - man/man8/pam_get_items.8.gz \ - man/man8/pam_set_items.8.gz +TEST_BUILD_DEPENDS= cmocka>=1.1.1:sysutils/cmocka .include Index: head/devel/pam_wrapper/files/python-detection.patch =================================================================== --- head/devel/pam_wrapper/files/python-detection.patch (nonexistent) +++ head/devel/pam_wrapper/files/python-detection.patch (revision 473829) @@ -0,0 +1,120 @@ +From 6d25aa0f94a8fb7f263b88eb3b0c0d15c1d88ed6 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Tue, 3 Jul 2018 11:33:04 +0200 +Subject: cmake: Fix python2 and python3 detection + +Signed-off-by: Andreas Schneider +--- + src/python/python2/CMakeLists.txt | 40 ++++++++++++++++++++++++--------------- + src/python/python3/CMakeLists.txt | 40 ++++++++++++++++++++++++--------------- + 2 files changed, 50 insertions(+), 30 deletions(-) + +diff --git a/src/python/python2/CMakeLists.txt b/src/python/python2/CMakeLists.txt +index faceec3..02b4063 100644 +--- a/src/python/python2/CMakeLists.txt ++++ b/src/python/python2/CMakeLists.txt +@@ -1,23 +1,33 @@ + project(python2-pamtest C) + +-unset(PYTHON_EXECUTABLE CACHE) +-unset(PYTHON_INCLUDE_DIR CACHE) +-unset(PYTHON_LIBRARY CACHE) +-unset(PYTHON_SITELIB CACHE) +-unset(PYTHONLIBS_FOUND CACHE) +-unset(PYTHONLIBS_VERSION_STRING CACHE) ++if (NOT PYTHON2_LIBRARY) ++ unset(PYTHON_EXECUTABLE CACHE) ++ unset(PYTHON_INCLUDE_DIR CACHE) ++ unset(PYTHON_LIBRARY CACHE) ++ unset(PYTHON_SITELIB CACHE) ++ unset(PYTHONLIBS_FOUND CACHE) ++ unset(PYTHONLIBS_VERSION_STRING CACHE) + +-set(Python_ADDITIONAL_VERSIONS 2.7 2.6) +-find_package(PythonLibs) +-find_package(PythonInterp) +-find_package(PythonSiteLibs) ++ find_package(PythonLibs 2) ++ find_package(PythonInterp 2) ++ find_package(PythonSiteLibs 2) + +-if (PYTHONLIBS_FOUND) +- set(PYTHON2_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "PYTHON2_EXECUTABLE") +- set(PYTHON2_INCLUDE_DIR ${PYTHON_INCLUDE_DIR}) +- set(PYTHON2_LIBRARY ${PYTHON_LIBRARY}) +- set(PYTHON2_SITELIB ${PYTHON_SITELIB}) ++ if (PYTHONLIBS_FOUND) ++ set(PYTHON2_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "PYTHON2_EXECUTABLE") ++ set(PYTHON2_INCLUDE_DIR ${PYTHON_INCLUDE_DIR}) ++ set(PYTHON2_LIBRARY ${PYTHON_LIBRARY}) ++ set(PYTHON2_SITELIB ${PYTHON_SITELIB}) ++ endif() + ++ unset(PYTHON_EXECUTABLE CACHE) ++ unset(PYTHON_INCLUDE_DIR CACHE) ++ unset(PYTHON_LIBRARY CACHE) ++ unset(PYTHON_SITELIB CACHE) ++ unset(PYTHONLIBS_FOUND CACHE) ++ unset(PYTHONLIBS_VERSION_STRING CACHE) ++endif() ++ ++if (PYTHON2_INCLUDE_DIR AND PYTHON2_LIBRARY AND PYTHON2_SITELIB) + include_directories(${CMAKE_BINARY_DIR}) + include_directories(${pam_wrapper-headers_DIR}) + include_directories(${PYTHON2_INCLUDE_DIR}) +diff --git a/src/python/python3/CMakeLists.txt b/src/python/python3/CMakeLists.txt +index 1e1599b..1a61303 100644 +--- a/src/python/python3/CMakeLists.txt ++++ b/src/python/python3/CMakeLists.txt +@@ -1,23 +1,33 @@ + project(python3-pamtest C) + +-unset(PYTHON_EXECUTABLE CACHE) +-unset(PYTHON_INCLUDE_DIR CACHE) +-unset(PYTHON_LIBRARY CACHE) +-unset(PYTHON_SITELIB CACHE) +-unset(PYTHONLIBS_FOUND CACHE) +-unset(PYTHONLIBS_VERSION_STRING CACHE) ++if (NOT PYTHON3_LIBRARY) ++ unset(PYTHON_EXECUTABLE CACHE) ++ unset(PYTHON_INCLUDE_DIR CACHE) ++ unset(PYTHON_LIBRARY CACHE) ++ unset(PYTHON_SITELIB CACHE) ++ unset(PYTHONLIBS_FOUND CACHE) ++ unset(PYTHONLIBS_VERSION_STRING CACHE) + +-set(Python_ADDITIONAL_VERSIONS 3.8 3.7 3.6) +-find_package(PythonLibs) +-find_package(PythonInterp) +-find_package(PythonSiteLibs) ++ find_package(PythonLibs 3) ++ find_package(PythonInterp 3) ++ find_package(PythonSiteLibs 3) + +-if (PYTHONLIBS_FOUND) +- set(PYTHON3_LIBRARY ${PYTHON_LIBRARY}) +- set(PYTHON3_INCLUDE_DIR ${PYTHON_INCLUDE_DIR}) +- set(PYTHON3_SITELIB ${PYTHON_SITELIB}) +- set(PYTHON3_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "PYTHON3_EXECUTABLE") ++ if (PYTHONLIBS_FOUND) ++ set(PYTHON3_LIBRARY ${PYTHON_LIBRARY}) ++ set(PYTHON3_INCLUDE_DIR ${PYTHON_INCLUDE_DIR}) ++ set(PYTHON3_SITELIB ${PYTHON_SITELIB}) ++ set(PYTHON3_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "PYTHON3_EXECUTABLE") ++ endif() + ++ unset(PYTHON_EXECUTABLE CACHE) ++ unset(PYTHON_INCLUDE_DIR CACHE) ++ unset(PYTHON_LIBRARY CACHE) ++ unset(PYTHON_SITELIB CACHE) ++ unset(PYTHONLIBS_FOUND CACHE) ++ unset(PYTHONLIBS_VERSION_STRING CACHE) ++endif() ++ ++if (PYTHON3_INCLUDE_DIR AND PYTHON3_LIBRARY AND PYTHON3_SITELIB) + include_directories(${CMAKE_BINARY_DIR}) + include_directories(${pam_wrapper-headers_DIR}) + include_directories(${PYTHON3_INCLUDE_DIR}) +-- +cgit v1.1 + Property changes on: head/devel/pam_wrapper/files/python-detection.patch ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/pam_wrapper/pkg-descr =================================================================== --- head/devel/pam_wrapper/pkg-descr (revision 473828) +++ head/devel/pam_wrapper/pkg-descr (revision 473829) @@ -1,8 +1,8 @@ This tool allows you to either test your PAM application or module. For testing PAM applications we have written a simple PAM module called pam_matrix (see below). If you plan to test a PAM module you can use the pamtest library we have implemented. It simplifies testing of modules. You can be combine it with the cmocka unit testing framework or you can use the provided Python bindings to write tests for your module in Python. -WWW: https://cwrap.org/ +WWW: https://cwrap.org/pam_wrapper.html Index: head/devel/pam_wrapper/pkg-plist =================================================================== --- head/devel/pam_wrapper/pkg-plist (nonexistent) +++ head/devel/pam_wrapper/pkg-plist (revision 473829) @@ -0,0 +1,21 @@ +libdata/pkgconfig/pam_wrapper.pc +libdata/pkgconfig/libpamtest.pc +lib/cmake/pam_wrapper/pam_wrapper-config-version.cmake +lib/cmake/pam_wrapper/pam_wrapper-config.cmake +lib/cmake/libpamtest/libpamtest-config.cmake +lib/cmake/libpamtest/libpamtest-config-version.cmake +lib/libpam_wrapper.so.0.0.3 +lib/libpam_wrapper.so.0 +lib/libpam_wrapper.so +lib/libpamtest.so.0.0.3 +lib/libpamtest.so.0 +lib/libpamtest.so +lib/pam_wrapper/pam_matrix.so +lib/pam_wrapper/pam_get_items.so +lib/pam_wrapper/pam_set_items.so +%%PYTHON_SITELIBDIR%%/pypamtest.so +include/libpamtest.h +man/man1/pam_wrapper.1.gz +man/man8/pam_matrix.8.gz +man/man8/pam_get_items.8.gz +man/man8/pam_set_items.8.gz Property changes on: head/devel/pam_wrapper/pkg-plist ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/resolv_wrapper/Makefile =================================================================== --- head/devel/resolv_wrapper/Makefile (revision 473828) +++ head/devel/resolv_wrapper/Makefile (revision 473829) @@ -1,33 +1,33 @@ # $FreeBSD$ PORTNAME= resolv_wrapper PORTVERSION= 1.1.5 CATEGORIES= devel MASTER_SITES= SAMBA/cwrap MAINTAINER= timur@FreeBSD.org COMMENT= Wrapper for dns name resolving or dns faking LICENSE= GPLv3 USES= cmake:outsource USE_LDCONFIG= yes -CMAKE_ARGS+= -DMAN_INSTALL_DIR:PATH="${PREFIX}/man" +CMAKE_ARGS= -DMAN_INSTALL_DIR:PATH="${PREFIX}/man" OPTIONS_DEFINE= TEST OPTIONS_DEFAULT= TEST -TEST_TARGET= test +TEST_TEST_TARGET= test TEST_CMAKE_BOOL= UNIT_TESTING -TEST_BUILD_DEPENDS+= cmocka>=1.1.1:sysutils/cmocka +TEST_BUILD_DEPENDS= cmocka>=1.1.1:sysutils/cmocka PLIST_FILES= libdata/pkgconfig/resolv_wrapper.pc \ lib/cmake/resolv_wrapper/resolv_wrapper-config-version.cmake \ lib/cmake/resolv_wrapper/resolv_wrapper-config.cmake \ lib/libresolv_wrapper.so.0.0.5 \ lib/libresolv_wrapper.so.0 \ lib/libresolv_wrapper.so \ man/man1/resolv_wrapper.1.gz .include Index: head/devel/resolv_wrapper/pkg-descr =================================================================== --- head/devel/resolv_wrapper/pkg-descr (revision 473828) +++ head/devel/resolv_wrapper/pkg-descr (revision 473829) @@ -1,10 +1,10 @@ resolv_wrapper makes it possible on most UNIX platforms to contact your own DNS implementation in your test environment. It requires socket_wrapper to be able to contact it. If it doesn't work on a special platform the wrapper is able to fake DNS queries and return valid responses to your application. - Redirects name queries to the nameservers specified in your resolv.conf - Can fake DNS queries using a simple formatted DNS hosts file. -WWW: https://cwrap.org/ +WWW: https://cwrap.org/resolv_wrapper.html Index: head/devel/socket_wrapper/Makefile =================================================================== --- head/devel/socket_wrapper/Makefile (revision 473828) +++ head/devel/socket_wrapper/Makefile (revision 473829) @@ -1,37 +1,37 @@ # $FreeBSD$ PORTNAME= socket_wrapper PORTVERSION= 1.1.9 CATEGORIES= devel MASTER_SITES= SAMBA/cwrap MAINTAINER= timur@FreeBSD.org COMMENT= Library passing all socket communications through unix sockets LICENSE= GPLv3 USES= cmake:outsource USE_LDCONFIG= yes -CMAKE_ARGS+= -DMAN_INSTALL_DIR:PATH="${PREFIX}/man" +CMAKE_ARGS= -DMAN_INSTALL_DIR:PATH="${PREFIX}/man" OPTIONS_DEFINE= TEST OPTIONS_DEFAULT= TEST -TEST_TARGET= test +TEST_TEST_TARGET= test TEST_CMAKE_BOOL= UNIT_TESTING -TEST_BUILD_DEPENDS+= cmocka>=1.1.1:sysutils/cmocka +TEST_BUILD_DEPENDS= cmocka>=1.1.1:sysutils/cmocka PLIST_FILES= libdata/pkgconfig/socket_wrapper.pc \ lib/cmake/socket_wrapper/socket_wrapper-config-version.cmake \ lib/cmake/socket_wrapper/socket_wrapper-config.cmake \ lib/libsocket_wrapper.so.0.1.9 \ lib/libsocket_wrapper.so.0 \ lib/libsocket_wrapper.so \ man/man1/socket_wrapper.1.gz post-configure: ${REINPLACE_CMD} -Ee '/HAVE_FALLTHROUGH_ATTRIBUTE/d' \ ${CONFIGURE_WRKSRC}/config.h .include Index: head/devel/socket_wrapper/pkg-descr =================================================================== --- head/devel/socket_wrapper/pkg-descr (revision 473828) +++ head/devel/socket_wrapper/pkg-descr (revision 473829) @@ -1,10 +1,10 @@ socket_wrapper aims to help client/server software development teams willing to gain full functional test coverage. It makes possible to run several instances of the full software stack on the same machine and perform locally functional testing of complex network configurations. - Redirects all network communication to happen over unix sockets. - Support for IPv4 and IPv6 socket and addressing emulation. - Ablility to capture network traffic in pcap format. -WWW: https://cwrap.org/ +WWW: https://cwrap.org/socket_wrapper.html Index: head/devel/uid_wrapper/Makefile =================================================================== --- head/devel/uid_wrapper/Makefile (revision 473828) +++ head/devel/uid_wrapper/Makefile (revision 473829) @@ -1,33 +1,33 @@ # $FreeBSD$ PORTNAME= uid_wrapper PORTVERSION= 1.2.4 CATEGORIES= devel MASTER_SITES= SAMBA/cwrap MAINTAINER= timur@FreeBSD.org COMMENT= Wrapper to fake privilege separation LICENSE= GPLv3 USES= cmake:outsource USE_LDCONFIG= yes -CMAKE_ARGS+= -DMAN_INSTALL_DIR:PATH="${PREFIX}/man" +CMAKE_ARGS= -DMAN_INSTALL_DIR:PATH="${PREFIX}/man" OPTIONS_DEFINE= TEST OPTIONS_DEFAULT= TEST -TEST_TARGET= test +TEST_TEST_TARGET= test TEST_CMAKE_BOOL= UNIT_TESTING -TEST_BUILD_DEPENDS+= cmocka>=1.1.1:sysutils/cmocka +TEST_BUILD_DEPENDS= cmocka>=1.1.1:sysutils/cmocka PLIST_FILES= libdata/pkgconfig/uid_wrapper.pc \ lib/cmake/uid_wrapper/uid_wrapper-config-version.cmake \ lib/cmake/uid_wrapper/uid_wrapper-config.cmake \ lib/libuid_wrapper.so.0.0.6 \ lib/libuid_wrapper.so.0 \ lib/libuid_wrapper.so \ man/man1/uid_wrapper.1.gz .include Index: head/devel/uid_wrapper/pkg-descr =================================================================== --- head/devel/uid_wrapper/pkg-descr (revision 473828) +++ head/devel/uid_wrapper/pkg-descr (revision 473829) @@ -1,17 +1,17 @@ - Allows uid switching as a normal user. - Start any application making it believe it is running as root. - Support for user/group changing in the local thread using the syscalls (like glibc). - More precisely this library intercepts seteuid and related calls, and simulates them in a manner similar to the nss_wrapper and socket_wrapper libraries. Some projects like a file server need privilege separation to be able to switch to the connection user and do file operations. uid_wrapper convincingly lies to the application letting it believe it is operating as root and even switching between UIDs and GIDs as needed. -WWW: https://cwrap.org/ +WWW: https://cwrap.org/uid_wrapper.html