Add a Cwrap suit - set of preloadable wrappers that allow to test different aspects of the application in a transparent manner.
Sponsored by: iXsystems Inc.
This commit is contained in:
parent
4d8b534743
commit
2ef5dc6a41
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=473793
18 changed files with 293 additions and 0 deletions
|
@ -408,6 +408,7 @@
|
|||
SUBDIR += cvsweb3
|
||||
SUBDIR += cvswrap
|
||||
SUBDIR += cweb
|
||||
SUBDIR += cwrap
|
||||
SUBDIR += cx_Freeze
|
||||
SUBDIR += cxmon
|
||||
SUBDIR += cxref
|
||||
|
@ -1827,6 +1828,7 @@
|
|||
SUBDIR += npth
|
||||
SUBDIR += nsgenbind
|
||||
SUBDIR += nspr
|
||||
SUBDIR += nss_wrapper
|
||||
SUBDIR += nuitka
|
||||
SUBDIR += obby
|
||||
SUBDIR += objecthash
|
||||
|
@ -3838,6 +3840,7 @@
|
|||
SUBDIR += p65
|
||||
SUBDIR += p8-platform
|
||||
SUBDIR += paexec
|
||||
SUBDIR += pam_wrapper
|
||||
SUBDIR += papi
|
||||
SUBDIR += papilio-loader
|
||||
SUBDIR += pas2dox
|
||||
|
@ -5359,6 +5362,7 @@
|
|||
SUBDIR += renpy6
|
||||
SUBDIR += replay
|
||||
SUBDIR += replxx
|
||||
SUBDIR += resolv_wrapper
|
||||
SUBDIR += rhtvision
|
||||
SUBDIR += riscv64-binutils
|
||||
SUBDIR += riscv64-gcc
|
||||
|
@ -6092,6 +6096,7 @@
|
|||
SUBDIR += smokeqt-kde4
|
||||
SUBDIR += smv
|
||||
SUBDIR += soapui
|
||||
SUBDIR += socket_wrapper
|
||||
SUBDIR += sonar-ant-task
|
||||
SUBDIR += sonar-scanner-cli
|
||||
SUBDIR += sonarqube
|
||||
|
@ -6206,6 +6211,7 @@
|
|||
SUBDIR += ucommon
|
||||
SUBDIR += ucpp
|
||||
SUBDIR += udis86
|
||||
SUBDIR += uid_wrapper
|
||||
SUBDIR += ultragetopt
|
||||
SUBDIR += umbrello
|
||||
SUBDIR += umbrello-kde4
|
||||
|
|
20
devel/cwrap/Makefile
Normal file
20
devel/cwrap/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= cwrap
|
||||
PORTVERSION= 1.1.0
|
||||
CATEGORIES= devel
|
||||
|
||||
MAINTAINER= timur@FreeBSD.org
|
||||
COMMENT= Testing your full software stack on a single machine
|
||||
|
||||
LICENSE= GPLv3
|
||||
|
||||
RUN_DEPENDS= nss_wrapper>=1.1.3:devel/nss_wrapper \
|
||||
pam_wrapper>=1.0.6:devel/pam_wrapper \
|
||||
resolv_wrapper>=1.1.5:devel/resolv_wrapper \
|
||||
socket_wrapper>=1.1.9:devel/socket_wrapper \
|
||||
uid_wrapper>=1.2.4:devel/uid_wrapper
|
||||
|
||||
USES= metaport
|
||||
|
||||
.include <bsd.port.mk>
|
3
devel/cwrap/pkg-descr
Normal file
3
devel/cwrap/pkg-descr
Normal file
|
@ -0,0 +1,3 @@
|
|||
cwrap - testing your full software stack on a single machine.
|
||||
|
||||
WWW: https://cwrap.org/
|
37
devel/nss_wrapper/Makefile
Normal file
37
devel/nss_wrapper/Makefile
Normal file
|
@ -0,0 +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"
|
||||
|
||||
OPTIONS_DEFINE= TEST
|
||||
OPTIONS_DEFAULT= TEST
|
||||
|
||||
TEST_TARGET= test
|
||||
TEST_CMAKE_BOOL= UNIT_TESTING
|
||||
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 <bsd.port.mk>
|
3
devel/nss_wrapper/distinfo
Normal file
3
devel/nss_wrapper/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1530578807
|
||||
SHA256 (nss_wrapper-1.1.3.tar.gz) = c9b84c14c5bc6948cdad4cbdeefaaf8b471a11ef876535002896779411573aa3
|
||||
SIZE (nss_wrapper-1.1.3.tar.gz) = 53543
|
17
devel/nss_wrapper/pkg-descr
Normal file
17
devel/nss_wrapper/pkg-descr
Normal file
|
@ -0,0 +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/
|
47
devel/pam_wrapper/Makefile
Normal file
47
devel/pam_wrapper/Makefile
Normal file
|
@ -0,0 +1,47 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= pam_wrapper
|
||||
PORTVERSION= 1.0.6
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= SAMBA/cwrap
|
||||
|
||||
MAINTAINER= timur@FreeBSD.org
|
||||
COMMENT= Preloadable wrapper to test PAM applications and PAM Modules
|
||||
|
||||
LICENSE= GPLv3
|
||||
|
||||
USES= cmake:outsource python:2.7+
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
CMAKE_ARGS+= -DMAN_INSTALL_DIR:PATH="${PREFIX}/man"
|
||||
|
||||
OPTIONS_DEFINE= TEST
|
||||
OPTIONS_DEFAULT= 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
|
||||
|
||||
.include <bsd.port.mk>
|
3
devel/pam_wrapper/distinfo
Normal file
3
devel/pam_wrapper/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1530578245
|
||||
SHA256 (pam_wrapper-1.0.6.tar.gz) = 00a0ea065aa20c50eb54103fc8a62504114b07ebfd2bf0c86bb8be10f612581b
|
||||
SIZE (pam_wrapper-1.0.6.tar.gz) = 86221
|
8
devel/pam_wrapper/pkg-descr
Normal file
8
devel/pam_wrapper/pkg-descr
Normal file
|
@ -0,0 +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/
|
33
devel/resolv_wrapper/Makefile
Normal file
33
devel/resolv_wrapper/Makefile
Normal file
|
@ -0,0 +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"
|
||||
|
||||
OPTIONS_DEFINE= TEST
|
||||
OPTIONS_DEFAULT= TEST
|
||||
|
||||
TEST_TARGET= test
|
||||
TEST_CMAKE_BOOL= UNIT_TESTING
|
||||
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 <bsd.port.mk>
|
3
devel/resolv_wrapper/distinfo
Normal file
3
devel/resolv_wrapper/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1530576086
|
||||
SHA256 (resolv_wrapper-1.1.5.tar.gz) = e989fdaa1385bdf3ef7dbcb83b3f7f15c69e78ca6432e254be390b7c63e1b06c
|
||||
SIZE (resolv_wrapper-1.1.5.tar.gz) = 34241
|
10
devel/resolv_wrapper/pkg-descr
Normal file
10
devel/resolv_wrapper/pkg-descr
Normal file
|
@ -0,0 +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/
|
37
devel/socket_wrapper/Makefile
Normal file
37
devel/socket_wrapper/Makefile
Normal file
|
@ -0,0 +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"
|
||||
|
||||
OPTIONS_DEFINE= TEST
|
||||
OPTIONS_DEFAULT= TEST
|
||||
|
||||
TEST_TARGET= test
|
||||
TEST_CMAKE_BOOL= UNIT_TESTING
|
||||
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 <bsd.port.mk>
|
3
devel/socket_wrapper/distinfo
Normal file
3
devel/socket_wrapper/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1530567034
|
||||
SHA256 (socket_wrapper-1.1.9.tar.gz) = 2c1d790f578c36b521c0e113fcbcf41d633336b3c60d6c6a1378f920495eebb4
|
||||
SIZE (socket_wrapper-1.1.9.tar.gz) = 772252
|
10
devel/socket_wrapper/pkg-descr
Normal file
10
devel/socket_wrapper/pkg-descr
Normal file
|
@ -0,0 +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/
|
33
devel/uid_wrapper/Makefile
Normal file
33
devel/uid_wrapper/Makefile
Normal file
|
@ -0,0 +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"
|
||||
|
||||
OPTIONS_DEFINE= TEST
|
||||
OPTIONS_DEFAULT= TEST
|
||||
|
||||
TEST_TARGET= test
|
||||
TEST_CMAKE_BOOL= UNIT_TESTING
|
||||
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 <bsd.port.mk>
|
3
devel/uid_wrapper/distinfo
Normal file
3
devel/uid_wrapper/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1530550405
|
||||
SHA256 (uid_wrapper-1.2.4.tar.gz) = 3c60f65371420074ef437796a36beef2d713c28bd5c5fbf29c3e7a9647cd50fa
|
||||
SIZE (uid_wrapper-1.2.4.tar.gz) = 311811
|
17
devel/uid_wrapper/pkg-descr
Normal file
17
devel/uid_wrapper/pkg-descr
Normal file
|
@ -0,0 +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/
|
Loading…
Reference in a new issue