unbound updated; added postgresql15

This commit is contained in:
ziggi
2024-03-08 08:21:10 +02:00
parent 23a58573df
commit 340c8f1d58
35 changed files with 2622 additions and 33 deletions

View File

@@ -3,14 +3,14 @@
PORTNAME?= mariadb
PORTVERSION= 10.2.15
CATEGORIES= databases
MASTER_SITES+= http://mirrors.supportex.net/${SITESDIR}/
MASTER_SITES+= http://mirror2.hs-esslingen.de/pub/Mirrors/${SITESDIR}/
MASTER_SITES+= http://gd.tuwien.ac.at/db/${SITESDIR}/
MASTER_SITES+= http://mirrors.fe.up.pt/pub/${SITESDIR}/
MASTER_SITES+= http://mirror.de.gsnw.de:56431/${SITESDIR}/
MASTER_SITES+= http://mirror.layerjet.com/${SITESDIR}/
MASTER_SITES+= http://mirror.switch.ch/mirror/${SITESDIR}/
MASTER_SITES+= http://ftp.osuosl.org/pub/${SITESDIR}/
#MASTER_SITES+= http://mirrors.supportex.net/${SITESDIR}/
#MASTER_SITES+= http://mirror2.hs-esslingen.de/pub/Mirrors/${SITESDIR}/
#MASTER_SITES+= http://gd.tuwien.ac.at/db/${SITESDIR}/
#MASTER_SITES+= http://mirrors.fe.up.pt/pub/${SITESDIR}/
#MASTER_SITES+= http://mirror.de.gsnw.de:56431/${SITESDIR}/
#MASTER_SITES+= http://mirror.layerjet.com/${SITESDIR}/
#MASTER_SITES+= http://mirror.switch.ch/mirror/${SITESDIR}/
#MASTER_SITES+= http://ftp.osuosl.org/pub/${SITESDIR}/
SITESDIR= mariadb/mariadb-${PORTVERSION}/source
MAINTAINER= brnrd@FreeBSD.org
@@ -31,6 +31,10 @@ USES= bison:build cmake compiler:c++11-lib shebangfix
SHEBANG_FILES= scripts/*.sh storage/rocksdb/myrocks_hotbackup
DOCSDIR= ${PREFIX}/share/doc/mysql
CXXFLAGS+= -fcommon
CFLAGS+= -fcommon
# MySQL-Server options
#OPTIONS_DEFAULT+= CONNECT_EXTRA INNOBASE SPHINX SPIDER
#OPTIONS_GROUP= COMPRESSION ENGINES GROONGA

153
data/postgresql15/Makefile Normal file
View File

@@ -0,0 +1,153 @@
#
# $Id: Makefile 1575 2008-07-31 07:53:53Z root $
#
PORTNAME= postgresql
PORTVERSION= 15.4
CATEGORIES= databases
MASTER_SITES+= http://ftp.postgresql.org/pub/%SUBDIR%/
MASTER_SITES+= http://ftp.de.postgresql.org/%SUBDIR%/
MASTER_SITES+= ftp://ftp.digex.net/pub/packages/database/postgresql/%SUBDIR%/
MASTER_SITES+= ftp://ftp.sunet.se/pub/unix/databases/relational/postgresql/%SUBDIR%/
MASTER_SITES+= ftp://ftp.chg.ru/pub/databases/postgresql/%SUBDIR%/
MASTER_SITES+= ${MASTER_SITE_RINGSERVER:S,%SUBDIR%,misc/db/postgresql/&,}
MASTER_SITE_SUBDIR= source/v${PORTVERSION}
DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= onborodin@gmail.com
COMMENT= A robust, next generation, object-relational DBMS
LIB_DEPENDS+= libiconv.so:text/libiconv
LIB_DEPENDS+= libintl.so:devel/gettext
#LIB_DEPENDS+= libicuuc.so:devel/libicu
USES+= tar:bzip2 gmake bison pkgconfig
PG_OWNER= pgsql
PG_OWNER_ID= 90
PG_GROUP= pgsql
PG_GROUP_ID= 90
PG_DOC_SUBDIR= doc
PG_DOC_DIR= ${PREFIX}/${PG_DOC_SUBDIR}
PG_VAR_DIR= /var
PG_DB_DIR= ${PG_VAR_DIR}/db/pgsql
PG_LOGDIR= ${PG_VAR_DIR}/log/pgsql
PG_RUN_DIR= ${PG_VAR_DIR}/run/pgsql
USES+= gmake
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc
CONFIGURE_ARGS+= --with-includes=${LOCALBASE}/include
CONFIGURE_ARGS+= --with-libraries=${LOCALBASE}/lib
CONFIGURE_ARGS+= --libdir=${PREFIX}/lib
CONFIGURE_ARGS+= --includedir=${PREFIX}/include/${PORTNAME}
CONFIGURE_ARGS+= --datarootdir=${PREFIX}/share/postgresql
CONFIGURE_ARGS+= --mandir=${PREFIX}/man
CONFIGURE_ARGS+= --infodir=${PREFIX}/info
CONFIGURE_ARGS+= --htmldir=${PREFIX}/share/doc/postgresql
CONFIGURE_ARGS+= --without-perl
CONFIGURE_ARGS+= --without-tcl
CONFIGURE_ARGS+= --without-python
CONFIGURE_ARGS+= --without-pam
CONFIGURE_ARGS+= --enable-thread-safety
CONFIGURE_ARGS+= --enable-nls
CONFIGURE_ARGS+= --with-system-tzdata=/usr/share/zoneinfo
######CONFIGURE_ARGS+= --disable-integer-datetimes
CONFIGURE_ARGS+= --with-icu
CONFIGURE_ARGS+= --enable-depend
CONFIGURE_ARGS+= --without-ldap
CONFIGURE_ARGS+= --with-openssl
#CONFIGURE_ARGS+= --with-libedit-preferred
#CFLAGS+= -I/usr/include/edit
#CPPFLAGS+= -I/usr/include/edit
CFLAGS+= -pthread
CONFIGURE_ENV+= INCLUDES="${INCLUDES}"
CONFIGURE_ENV+= PTHREAD_LIBS="-lpthread"
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
PKGINSTALL= ${WRKDIR}/pkg-install
PKGMESSAGE= ${WRKDIR}/pkg-message
SUB_FILES= pkg-install pkg-deinstall pkg-message
USE_RC_SUBR+= pgsql
PLIST_SUB+= PG_DOC_SUBDIR=${PG_DOC_SUBDIR}
SUB_LIST+= PG_OWNER=${PG_OWNER}
SUB_LIST+= PG_GROUP=${PG_GROUP}
SUB_LIST+= PG_OWNER_ID=${PG_OWNER_ID}
SUB_LIST+= PG_GROUP_ID=${PG_GROUP_ID}
SUB_LIST+= PG_DB_DIR=${PG_DB_DIR}
SUB_LIST+= PG_RUN_DIR=${PG_RUN_DIR}
SUB_LIST+= PG_LOG_DIR=${PG_LOG_DIR}
BINS+= clusterdb
BINS+= createdb
BINS+= createuser
BINS+= dropdb
BINS+= dropuser
BINS+= initdb
BINS+= reindexdb
BINS+= vacuumdb
BINS+= vacuumlo
BINS+= oid2name
BIN_PREFIX= pg_
SUB_LIST+= BIN_PREFIX=${BIN_PREFIX}
PLIST_SUB= BIN_PREFIX=${BIN_PREFIX}
_LIBS+= libecpg.a
_LIBS+= libecpg.so
_LIBS+= libecpg.so.6
_LIBS+= libecpg_compat.a
_LIBS+= libecpg_compat.so
_LIBS+= libecpg_compat.so.3
_LIBS+= libpgport.a
_LIBS+= libpgtypes.a
_LIBS+= libpgtypes.so
_LIBS+= libpgtypes.so.3
_LIBS+= libpq.a
_LIBS+= libpq.so
_LIBS+= libpq.so.5
post-patch:
${RM} -f ${WRKSRC}/src/backend/parser/gram.c
${RM} -f ${WRKSRC}/src/backend/parser/gram.h
${RM} -f ${WRKSRC}/src/interfaces/ecpg/preproc/preproc.c
${RM} -f ${WRKSRC}/src/interfaces/ecpg/preproc/preproc.h
post-build:
cd ${WRKSRC}/contrib && ${GMAKE} all
post-install:
cd ${WRKSRC}/contrib && ${GMAKE} DESTDIR=${STAGEDIR} install
cd ${WRKSRC} && ${GMAKE} DESTDIR=${STAGEDIR} install-docs
.for file in ${BINS}
cd ${STAGEDIR}/${PREFIX}/bin && ${MV} ${file} ${BIN_PREFIX}${file}
cd ${STAGEDIR}/${PREFIX}/man/man1 && ${MV} ${file}.1 ${BIN_PREFIX}${file}.1
.endfor
.for file in ${MAN1_DEL}
cd ${STAGEDIR}/${PREFIX}/man/man1 && ${RM} -f ${file}
.endfor
#post-patch:
# cd ${WRKSRC} && autoconf
.include <bsd.port.pre.mk>
.if ${OSVERSION} > 1100000
LIB_DEPENDS+= libreadline.so:devel/libreadline
.endif
.include <bsd.port.post.mk>
#EOF

View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1709838501
SHA256 (postgresql-15.4.tar.bz2) = baec5a4bdc4437336653b6cb5d9ed89be5bd5c0c58b94e0becee0a999e63c8f9
SIZE (postgresql-15.4.tar.bz2) = 22850355

View File

@@ -0,0 +1,14 @@
--- ./contrib/Makefile.orig 2022-02-07 23:15:36.000000000 +0200
+++ ./contrib/Makefile 2022-02-23 20:23:06.873598000 +0200
@@ -5,6 +5,11 @@
include $(top_builddir)/src/Makefile.global
SUBDIRS = \
+ oid2name \
+ vacuumlo
+
+
+NOSUBDIRS = \
adminpack \
amcheck \
auth_delay \

View File

@@ -0,0 +1,9 @@
--- ./doc/Makefile.orig 2022-02-07 23:15:36.000000000 +0200
+++ ./doc/Makefile 2022-02-23 20:23:06.819396000 +0200
@@ -12,5 +12,5 @@
top_builddir = ..
include $(top_builddir)/src/Makefile.global
-all distprep html man install installdirs uninstall clean distclean maintainer-clean:
+all distprep man install installdirs uninstall clean distclean maintainer-clean:
$(MAKE) -C src $@

View File

@@ -0,0 +1,41 @@
--- ./doc/src/sgml/Makefile.orig 2022-02-07 23:15:36.000000000 +0200
+++ ./doc/src/sgml/Makefile 2022-02-23 20:23:06.825980000 +0200
@@ -15,7 +15,7 @@
# Make "html" the default target, since that is what most people tend
# to want to use.
-html:
+man:
# We don't need the tree-wide headers or install support here.
NO_GENERATED_HEADERS=yes
@@ -26,7 +26,7 @@
include $(top_builddir)/src/Makefile.global
-all: html man
+all: man
distprep: html distprep-man
@@ -65,7 +65,6 @@
## Man pages
##
-man distprep-man: man-stamp
man-stamp: stylesheet-man.xsl postgres.sgml $(ALLSGML)
$(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^)
@@ -220,10 +219,10 @@
## Install
##
-install: install-html install-man
+install: install-man
installdirs:
- $(MKDIR_P) '$(DESTDIR)$(htmldir)'/html $(addprefix '$(DESTDIR)$(mandir)'/man, 1 3 $(sqlmansectnum))
+ $(MKDIR_P) $(addprefix '$(DESTDIR)$(mandir)'/man, 1 3 $(sqlmansectnum))
# If the install used a man directory shared with other applications, this will remove all files.
uninstall:

View File

@@ -0,0 +1,11 @@
--- ./src/backend/Makefile.orig 2022-02-07 23:15:36.000000000 +0200
+++ ./src/backend/Makefile 2022-02-23 20:23:06.868037000 +0200
@@ -116,6 +116,8 @@
$(top_builddir)/src/port/libpgport_srv.a: | submake-libpgport
+symlinks: $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/storage/lwlocknames.h
+
# The postgres.o target is needed by the rule in Makefile.global that
# creates the exports file when MAKE_EXPORTS = true.

View File

@@ -0,0 +1,19 @@
--- ./src/backend/jit/llvm/llvmjit_inline.cpp.orig 2022-02-07 23:15:36.000000000 +0200
+++ ./src/backend/jit/llvm/llvmjit_inline.cpp 2022-02-23 20:23:06.814278000 +0200
@@ -609,6 +609,16 @@
elog(FATAL, "failed to materialize metadata");
/*
+ * Don't inline functions with thread-local variables until
+ * related crashes are investigated (see BUG #16696)
+ */
+ if (rv->isThreadLocal()) {
+ ilog(DEBUG1, "cannot inline %s due to thread-local variable %s",
+ F.getName().data(), rv->getName().data());
+ return false;
+ }
+
+ /*
* Don't inline functions that access thread local variables. That
* doesn't work on current LLVM releases (but might in future).
*/

View File

@@ -0,0 +1,21 @@
--- ./src/backend/utils/misc/postgresql.conf.sample.orig 2022-02-07 23:15:36.000000000 +0200
+++ ./src/backend/utils/misc/postgresql.conf.sample 2022-02-23 20:23:06.850278000 +0200
@@ -430,6 +430,7 @@
# - Where to Log -
+log_destination = 'syslog'
#log_destination = 'stderr' # Valid values are combinations of
# stderr, csvlog, syslog, and eventlog,
# depending on platform. csvlog
@@ -586,7 +587,9 @@
#cluster_name = '' # added to process titles if nonempty
# (change requires restart)
-#update_process_title = on
+
+# On FreeBSD, this is a performance hog, so keep it off if you need speed
+update_process_title = off
#------------------------------------------------------------------------------

View File

@@ -0,0 +1,20 @@
--- ./src/include/storage/s_lock.h.orig 2022-02-07 23:15:36.000000000 +0200
+++ ./src/include/storage/s_lock.h 2022-02-23 20:23:06.858809000 +0200
@@ -321,7 +321,7 @@
* We use the int-width variant of the builtin because it works on more chips
* than other widths.
*/
-#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64)
+#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) || defined(__riscv)
#ifdef HAVE_GCC__SYNC_INT32_TAS
#define HAS_TEST_AND_SET
@@ -338,7 +338,7 @@
#define S_UNLOCK(lock) __sync_lock_release(lock)
#endif /* HAVE_GCC__SYNC_INT32_TAS */
-#endif /* __arm__ || __arm || __aarch64__ || __aarch64 */
+#endif /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */
/*

View File

@@ -0,0 +1,67 @@
#!/bin/sh
# PROVIDE: pgsql
# REQUIRE: LOGIN
prefix="%%PREFIX%%";
pgsql_data="%%PG_DB_DIR%%";
. /etc/rc.subr
# -i - enable internet sockets
# -l - enable ssl
pgsql_flags=" -i ";
pgsql_owner="%%PG_OWNER%%";
name="pgsql";
rcvar="pgsql_enable";
procname="${prefix}/bin/postgres";
pidfile="${pgsql_data}/postmaster.pid";
pgctl="${prefix}/bin/pg_ctl";
pgctl_args="-s -w -m fast -D ${pgsql_data} -o \"${pgsql_flags}\"";
extra_commands="initdb reload";
start_cmd="pgsql_command_start";
stop_cmd="pgsql_command_stop";
restart_cmd="pgsql_command_restart";
reload_cmd="pgsql_command_reload";
initdb_cmd="pgsql_initdb";
pgsql_command_start() {
if [ "$(check_process $procname)x" != "x" ]; then
echo "$name already running? ($(check_process $procname))";
exit 0;
fi
su ${pgsql_owner} -c "exec ${pgctl} ${pgctl_args} start" && echo "Starting pgsql.";
}
pgsql_command_stop() {
su ${pgsql_owner} -c "exec ${pgctl} ${pgctl_args} stop" && echo "Stoping pgsql.";
wait_for_pids $(check_process "$procname")
}
pgsql_command_restart() {
pgsql_command_stop;
# wait_for_pids $(check_process "$procname")
pgsql_command_start;
}
pgsql_command_reload() {
su ${pgsql_owner} -c "exec ${pgctl} ${pgctl_args} reload" && echo "Reload pgsql.";
}
pgsql_initdb() {
su ${pgsql_owner} -c "exec ${prefix}/bin//%%BIN_PREFIX%%initdb -D ${pgsql_data} -E UTF8 --locale en_GB.UTF-8 -U pgsql -W -A md5" && echo "Init pgsql database in ${pgsql_data}";
}
load_rc_config $name
: ${pgsql_enable=NO}
run_rc_command "$1"
#EOF

View File

@@ -0,0 +1,15 @@
#!/bin/sh -x
PG_OWNER="%%PG_OWNER%%"
PG_GROUP="%%PG_GROUP%%"
PG_DB_DIR="%%PG_DB_DIR%%"
case $2 in
DEINSTALL)
;;
POST-DEINSTALL)
rmdir ${PG_DB_DIR} || (ls -l ${PG_DB_DIR} ; du -sch ${PG_DB_DIR})
;;
esac
#EOF

View File

@@ -0,0 +1,30 @@
#!/bin/sh -x
PG_OWNER="%%PG_OWNER%%"
PG_GROUP="%%PG_GROUP%%"
PG_OWNER_ID="%%PG_OWNER_ID%%"
PG_GROUP_ID="%%PG_GROUP_ID%%"
PG_DB_DIR="%%PG_DB_DIR%%"
PKG__PPREFIX="/notexist"
case $2 in
PRE-INSTALL)
pw group add ${PG_GROUP} -g ${PG_GROUP_ID}
pw user add ${PG_OWNER} -u ${PG_OWNER_ID} -g ${PG_GROUP} \
-d ${PKG_PREFIX} -m -s "/bin/sh" \
-c "postgresql"
pw group mod ${PG_GROUP} -M ${PG_OWNER}
pw user show ${PG_OWNER}
pw group show ${PG_GROUP}
mkdir -p ${PG_DB_DIR}
chown ${PG_OWNER}:${PG_GROUP} ${PG_DB_DIR}
chmod 0700 ${PG_DB_DIR}
;;
POST-INSTALL)
;;
esac
#EOF

View File

@@ -0,0 +1,17 @@
***************************************************************************
1 For initialize databases area with admin %%PG_OWNER%% and base
encoding UTF8:
su %%PG_OWNER%% -c '%%PREFIX%%/bin/pg_initdb -D %%PG_DB_DIR%% \
-E UTF8 --locale en_GB.UTF-8 -U %%PG_OWNER%% -W -A md5'
2 Add user:
su %%PG_OWNER%% -c '%%PREFIX%%/bin/pg_createuser --createrole \
--superuser --createdb --pwprompt --echo username'
3 Create database:
su %%PG_OWNER%% -c '%%PREFIX%%/bin/pg_createdb db_name'
***************************************************************************

View File

@@ -0,0 +1,24 @@
PostgreSQL is a robust, next-generation, Object-Relational DBMS (ORDBMS),
derived from the Berkeley Postgres database management system. While
PostgreSQL retains the powerful object-relational data model, rich data types
and easy extensibility of Postgres, it replaces the PostQuel query language
with an extended subset of SQL.
The original Postgres code was the effort of many graduate students,
undergraduate students, and staff programmers working under the direction of
Professor Michael Stonebraker at the University of California, Berkeley. In
1995, Andrew Yu and Jolly Chen took on the task of converting the DBMS query
language to SQL and created a new database system which came to known as
Postgres95. Many others contributed to the porting, testing, debugging and
enhancement of the Postgres95 code. As the code improved, and 1995 faded into
memory, PostgreSQL was born.
PostgreSQL development is presently being performed by a team of Internet
developers who are now responsible for all current and future development. The
development team coordinator is Marc G. Fournier (scrappy@PostgreSQL.ORG).
Support is available from the PostgreSQL developer/user community through the
support mailing list (questions@PostgreSQL.ORG).
PostgreSQL is free and the complete source is available.
WWW: http://www.postgresql.org

1720
data/postgresql15/pkg-plist Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -62,8 +62,8 @@ post-patch:
PLIST= pkg-plist.${ARCH}
#GOROOT_BOOTSTRAP=${WRKDIR}/go-${OPSYS:tl}-${GOARCH}${GOARM}-bootstrap
GOROOT_BOOTSTRAP=${LOCALBASE}/lib/go
GOROOT_BOOTSTRAP=${WRKDIR}/go-${OPSYS:tl}-${GOARCH}${GOARM}-bootstrap
#GOROOT_BOOTSTRAP=${LOCALBASE}/lib/go
do-build:
# cd ${WRKSRC}/src ; ${SETENV} \

View File

@@ -47,6 +47,7 @@ lib/go/misc/cgo/errors/ptr_test.go
lib/go/misc/cgo/errors/testdata/err1.go
lib/go/misc/cgo/errors/testdata/err2.go
lib/go/misc/cgo/errors/testdata/err4.go
lib/go/misc/cgo/errors/testdata/err5.go
lib/go/misc/cgo/errors/testdata/issue11097a.go
lib/go/misc/cgo/errors/testdata/issue11097b.go
lib/go/misc/cgo/errors/testdata/issue14669.go
@@ -603,8 +604,8 @@ lib/go/src/clean.rc
lib/go/src/cmd/addr2line/addr2line_test.go
lib/go/src/cmd/addr2line/main.go
lib/go/src/cmd/api/api_test.go
lib/go/src/cmd/api/api.go
lib/go/src/cmd/api/boring_test.go
lib/go/src/cmd/api/main_test.go
lib/go/src/cmd/api/testdata/src/issue21181/dep/p_amd64.go
lib/go/src/cmd/api/testdata/src/issue21181/dep/p.go
lib/go/src/cmd/api/testdata/src/issue21181/indirect/p.go
@@ -1892,6 +1893,7 @@ lib/go/src/cmd/go/testdata/script/build_dash_x.txt
lib/go/src/cmd/go/testdata/script/build_exe.txt
lib/go/src/cmd/go/testdata/script/build_gcflags_order.txt
lib/go/src/cmd/go/testdata/script/build_gcflags.txt
lib/go/src/cmd/go/testdata/script/build_go122.txt
lib/go/src/cmd/go/testdata/script/build_gopath_order.txt
lib/go/src/cmd/go/testdata/script/build_GOTMPDIR.txt
lib/go/src/cmd/go/testdata/script/build_ignore_leading_bom.txt
@@ -6967,6 +6969,7 @@ lib/go/src/path/filepath/export_test.go
lib/go/src/path/filepath/export_windows_test.go
lib/go/src/path/filepath/match_test.go
lib/go/src/path/filepath/match.go
lib/go/src/path/filepath/path_nonwindows.go
lib/go/src/path/filepath/path_plan9.go
lib/go/src/path/filepath/path_test.go
lib/go/src/path/filepath/path_unix.go
@@ -11044,6 +11047,7 @@ lib/go/test/fixedbugs/issue6055.go
lib/go/test/fixedbugs/issue60601.go
lib/go/test/fixedbugs/issue6131.go
lib/go/test/fixedbugs/issue6140.go
lib/go/test/fixedbugs/issue61992.go
lib/go/test/fixedbugs/issue6247.go
lib/go/test/fixedbugs/issue6269.go
lib/go/test/fixedbugs/issue6295.dir/p0.go

View File

@@ -0,0 +1,67 @@
#
# $Id$
#
PORTNAME= openvpn
#PORTVERSION= 2.6.8
CATEGORIES= security net
#MASTER_SITES= http://openvpn.net/release/
MASTER_SITES+= http://swupdate.openvpn.net/community/releases/
MASTER_SITES+= http://build.openvpn.net/downloads/releases/
MAINTAINER= homeunix7@gmail.com
COMMENT= Secure IP/Ethernet tunnel daemon
LIB_DEPENDS+= liblzo2.so:arch/liblzo2
DISTVERSION= g20231109
USE_GITLAB= yes
GL_COMMIT= efad93d049c318a3bd9ea5956c6ac8237b8d6d70
WRKSRC= ${WRKDIR}/${PORTNAME}-${GL_COMMIT}
GNU_CONFIGURE= yes
USES+= gmake autoreconf
CONFIGURE_ARGS+= --enable-password-save
#CONFIGURE_ARGS+= --with-crypto-library=openssl
CONFIGURE_ARGS+= --mandir=${PREFIX}/man
CONFIGURE_ARGS+= --program-transform-name=''
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
SHEBANG_FILES= sample/sample-scripts/verify-cn
SHEBANG_FILES+= sample/sample-scripts/auth-pam.pl
SHEBANG_FILES+= sample/sample-scripts/ucn.pl
CONFIGURE_ARGS+= --enable-strict
CONFIGURE_ENV+= ac_cv_prog_CMAKE= CMAKE=
OPENVPN_RUNDIR= /var/run/openvpn
OPENVPN_LOGDIR= /var/log/openvpn
OPENVPN_CONFDIR= ${PREFIX}/etc/openvpn
SUB_LIST+= OPENVPN_RUNDIR=${OPENVPN_RUNDIR}
SUB_LIST+= OPENVPN_LOGDIR=${OPENVPN_LOGDIR}
SUB_LIST+= OPENVPN_CONFDIR=${OPENVPN_CONFDIR}
USE_RC_SUBR= openvpn.sh
USE_LDCONFIG= ${PREFIX}/lib
SUB_FILES= pkg-message pkg-install
post-build:
# cd ${WRKSRC}/plugin/down-root && ${MAKE}
# cd ${WRKSRC}/plugin/auth-pam && ${CC} ${CPPFLAGS} -I../.. -DDLOPEN_PAM=0 ${CFLAGS} -fPIC -shared -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so auth-pam.c pamdl.c -lc -lpam
## @# self-tests here
## cd ${WRKSRC} && ${MAKE} check
post-stage:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/sample/sample-config-files/*.conf ${STAGEDIR}${EXAMPLESDIR}
# ${MKDIR} ${PREFIX}/lib
# ${INSTALL_PROGRAM} ${WRKSRC}/plugin/down-root/openvpn-down-root.so ${PREFIX}/lib
# ${INSTALL_PROGRAM} ${WRKSRC}/plugin/auth-pam/openvpn-auth-pam.so ${PREFIX}/lib
.include <bsd.port.mk>
#EOF

View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1707047858
SHA256 (openvpn-openvpn-efad93d049c318a3bd9ea5956c6ac8237b8d6d70_GL0.tar.gz) = db885c742d8753942fdff960bc3a997cbad235790b29a2751cbf691f88cd20e7
SIZE (openvpn-openvpn-efad93d049c318a3bd9ea5956c6ac8237b8d6d70_GL0.tar.gz) = 1194056

View File

@@ -0,0 +1,71 @@
#!/bin/sh
#
# $Id$
#
# PROVIDE: openvpn
# REQUIRE: DAEMON
# KEYWORD: shutdown
. /etc/rc.subr
name="openvpn"
rcvar="openvpn_enable"
command="%%PREFIX%%/sbin/${name}"
command_args=""
load_rc_config ${name}
extra_commands="list"
start_cmd="openvpn_start"
stop_cmd="openvpn_stop"
restart_cmd="openvpn_restart"
reload_cmd="openvpn_reload"
list_cmd="openvpn_list"
openvpn_list() {
echo -n "$1 "
}
openvpn_start() {
serv="$1"
conffile="%%PREFIX%%/etc/openvpn/${serv}.conf"
pidfile="/var/run/openvpn/${serv}.pid"
echo "Start openvpn $serv."
$command --config $conf --writepid $pidfile --daemon
}
openvpn_stop() {
serv="$1"
pidfile="/var/run/openvpn/${serv}.pid"
pid=$(check_pidfile $pidfile $command)
test ! -z "$pid" && ( kill "$pid"; echo "Stopping openvpn $serv.")
wait_for_pids $pid && rm -f "$pidfile"
}
openvpn_restart() {
serv="$1"
openvpn_stop $serv
openvpn_start $serv
}
openvpn_reload() {
serv="$1"
pid=$(check_pidfile $pidfile $command)
test ! -z "$pid" && ( kill -HUP "$pid")
}
load_rc_config $name
: ${openvpn_enable=NO}
test -z "$2" && conflist=$(find %%PREFIX%%/etc/openvpn -maxdepth 1 -name '*.conf')
test ! -z "$2" && test -r "%%PREFIX%%/etc/openvpn/${2}.conf" && conflist="%%PREFIX%%/etc/openvpn/${2}.conf"
for conf in $conflist; do
serv="$(basename $conf .conf)"
pidfile="/var/run/openvpn/${serv}.pid"
run_rc_command "$1" "$serv"
done
#EOF

View File

@@ -0,0 +1,91 @@
#!/bin/sh
#
# PROVIDE: openvpn
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# This script supports running multiple instances of openvpn.
# To run additional instance link this script to something like
# % ln -s openvpn openvpn_foo
# and define additional openvpn_foo_* variables in one of
# /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/openvpn_foo
#
# Below NAME should be substituted with the name of this script. By default
# it is openvpn, so read as openvpn_enable. If you linked the script to
# openvpn_foo, then read as openvpn_foo_enable etc.
#
# The following variables are supported (defaults are shown).
# You can place them in any of
# /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/NAME
#
# NAME_enable="NO" # set to YES to enable openvpn
# NAME_if="" # driver(s) to load, set to "tun", "tap" or "tun tap"
#
# # optional:
# NAME_flags="" # additional command line arguments
# NAME_configfile="%%PREFIX%%/etc/openvpn/NAME.conf" # --config file
# NAME_dir="%%PREFIX%%/etc/openvpn" # --cd directory
#
# You also need to set NAME_configfile and NAME_dir, if the configuration
# file and directory where keys and certificates reside differ from the above
# settings.
#
# Note that we deliberately refrain from unloading drivers.
#
# For further documentation, please see openvpn(8).
#
. /etc/rc.subr
name="openvpn"
extra_commands="reload"
pidfile="/var/run/${name}.pid"
command="%%PREFIX%%/sbin/openvpn"
start_precmd="openvpn_start_precmd"
stop_postcmd="openvpn_stop_postcmd"
rcvar="${name}_enable"
openvpn_start_precmd()
{
for i in $interfaces ; do
# FreeBSD <= 5.4 does not know kldstat's -m option
# FreeBSD >= 6.0 does not add debug.* sysctl information
# in the default build - we check both to keep things simple
if ! sysctl debug.if_${i}_debug >/dev/null 2>&1 \
&& ! kldstat -m if_${i} >/dev/null 2>&1 ; then
if ! kldload if_${i} ; then
warn "Could not load $i module."
return 1
fi
fi
done
return 0
}
openvpn_stop_postcmd()
{
rm -f "$pidfile" || warn "Could not remove $pidfile."
}
load_rc_config aaaaa
: ${openvpn_enable="NO"}
: ${openvpn_flags=""}
: ${openvpn_if=""}
: ${openvpn_configfile="%%PREFIX%%/etc/openvpn/openvpn.conf"}
: ${openvpn_dir="%%PREFIX%%/etc/openvpn"}
configfile="${openvpn_configfile}"
dir="${openvpn_dir}"
interfaces="${openvpn_if}"
required_files=${configfile}
command_args="--cd ${dir} --daemon ${name} --config ${configfile} --writepid ${pidfile}"
run_rc_command "$1"
#EOF

View File

@@ -0,0 +1,13 @@
--- sample/sample-config-files/loopback-client.orig 2016-08-23 14:16:22 UTC
+++ sample/sample-config-files/loopback-client
@@ -9,8 +9,8 @@
# ./openvpn --config sample-config-files/loopback-client (In one window)
# ./openvpn --config sample-config-files/loopback-server (Simultaneously in another window)
-rport 16000
-lport 16001
+rport 16100
+lport 16101
remote localhost
local localhost
dev null

View File

@@ -0,0 +1,13 @@
--- sample/sample-config-files/loopback-server.orig 2016-08-23 14:16:22 UTC
+++ sample/sample-config-files/loopback-server
@@ -9,8 +9,8 @@
# ./openvpn --config sample-config-files/loopback-client (In one window)
# ./openvpn --config sample-config-files/loopback-server (Simultaneously in another window)
-rport 16001
-lport 16000
+rport 16101
+lport 16100
remote localhost
local localhost
dev null

View File

@@ -0,0 +1,65 @@
--- tests/t_cltsrv.sh.orig 2016-08-23 13:10:22 UTC
+++ tests/t_cltsrv.sh
@@ -1,7 +1,7 @@
#! /bin/sh
#
# t_cltsrv.sh - script to test OpenVPN's crypto loopback
-# Copyright (C) 2005, 2006, 2008 Matthias Andree
+# Copyright (C) 2005 - 2014 Matthias Andree
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -22,8 +22,9 @@ set -e
top_srcdir="${top_srcdir:-..}"
top_builddir="${top_builddir:-..}"
openvpn="${openvpn:-${top_builddir}/src/openvpn/openvpn}"
-trap "rm -f log.$$ log.$$.signal ; trap 0 ; exit 77" 1 2 15
-trap "rm -f log.$$ log.$$.signal ; exit 1" 0 3
+root="${top_srcdir}/sample"
+trap "rm -f ${root}/sample-config-files/loopback-*.test log.$$ log.$$.signal ; trap 0 ; exit 77" 1 2 15
+trap "a=\$? ; rm -f ${root}/sample-config-files/loopback-*.test log.$$ log.$$.signal ; test \$a = 0 && exit 1 || exit \$a" 0 3
addopts=
case `uname -s` in
FreeBSD)
@@ -45,18 +46,38 @@ esac
# make sure that the --down script is executable -- fail (rather than
# skip) test if it isn't.
downscript="../tests/t_cltsrv-down.sh"
-root="${top_srcdir}/sample"
test -x "${root}/${downscript}" || chmod +x "${root}/${downscript}" || { echo >&2 "${root}/${downscript} is not executable, failing." ; exit 1 ; }
echo "The following test will take about two minutes." >&2
echo "If the addresses are in use, this test will retry up to two times." >&2
+set -- $(ifconfig lo0 | grep -E '\<inet' | head -n1)
+add=
+if [ "x$1$2" = "x" ] ; then
+ echo >&2 "### NO ADDRESSES ON LOOPBACK INTERFACE lo0, SKIPPING TEST ###"
+ exit 77
+fi
+if [ "inet6" = "$1" ] ; then
+ add='proto udp6 '
+fi
+for i in server client ; do
+ sed -e "s/localhost/$2/" -e "/^remote /a\\
+$add" ${root}/sample-config-files/loopback-$i \
+ >${root}/sample-config-files/loopback-$i.test
+done
+
# go
success=0
for i in 1 2 3 ; do
set +e
(
- "${openvpn}" --script-security 2 --cd "${root}" ${addopts} --setenv role srv --down "${downscript}" --tls-exit --ping-exit 180 --config "sample-config-files/loopback-server" &
- "${openvpn}" --script-security 2 --cd "${top_srcdir}/sample" ${addopts} --setenv role clt --down "${downscript}" --tls-exit --ping-exit 180 --config "sample-config-files/loopback-client"
+ "${openvpn}" --script-security 2 \
+ --cd "${root}" ${addopts} --setenv role srv \
+ --down "${downscript}" --tls-exit --ping-exit 180 \
+ --config "sample-config-files/loopback-server.test" &
+ "${openvpn}" --script-security 2 \
+ --cd "${top_srcdir}/sample" ${addopts} --setenv role clt \
+ --down "${downscript}" --tls-exit --ping-exit 180 \
+ --config "sample-config-files/loopback-client.test"
) 3>log.$$.signal >log.$$ 2>&1
e1=$?
wait $!

View File

@@ -0,0 +1,19 @@
#!/bin/sh
set -x
OPENVPN_RUNDIR="%%OPENVPN_RUNDIR%%"
OPENVPN_LOGDIR="%%OPENVPN_LOGDIR%%"
OPENVPN_CONFDIR="%%OPENVPN_CONFDIR%%"
case $2 in
PRE-INSTALL)
install -d -o root -g wheel -m 0750 ${OPENVPN_RUNDIR}
install -d -o root -g wheel -m 0750 ${OPENVPN_LOGDIR}
install -d -o root -g wheel -m 0750 ${OPENVPN_CONFDIR}
;;
POST-INSTALL)
;;
esac
exit 0
#EOF

View File

@@ -0,0 +1,20 @@
### ------------------------------------------------------------------------
### The OpenVPN FreeBSD port, since v2.0.1, uses rcNG to start OpenVPN.
### Edit /etc/rc.conf to start OpenVPN automatically at system startup.
### See %%PREFIX%%/etc/rc.d/openvpn%%RCSFX%% for details.
### ------------------------------------------------------------------------
### To get OpenVPN 1.X to talk with the new 2.0 version, you may need to
### edit the 1.X configuration file by adding these lines:
### tun-mtu 1500
### tun-mtu-extra 32
### mssfix 1450
### key-method 2 <- this key-method line only for TLS setups
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### WARNING: THE DEFAULT PORT HAS CHANGED AND IS NOW 1194!
### OpenVPN 1.6 and older used 5000 rather than 1194 as their default
### port, so add the proper port options to your configuration file!
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### For further compatibility, see <http://openvpn.net/relnotes.html>
### ------------------------------------------------------------------------
### If you want to donate to OpenVPN: <http://openvpn.net/donate.html>
### ------------------------------------------------------------------------

View File

@@ -0,0 +1,29 @@
set -e
rcvers() {
# determine if we have "old" or "new" (rcorder integration) scheme
# for %%PREFIX%%/etc/rc.d/* files
if test $1 -ge 700007 || test $1 -lt 700000 -a $1 -ge 600101 ; then
echo 2
else
echo 1
fi
}
if [ "$2" = INSTALL ] ; then
# check if the base system is new enough for us,
# which should only matter for package installs.
buildrc=$(rcvers %%OSVERSION%%)
execrc=$(rcvers $(sysctl -n kern.osreldate) )
if test $buildrc -gt $execrc ; then
cat <<EOF
Error: this package, $1, was compiled for a newer FreeBSD
====== version that uses different boot scripts.
Therefore, the rc.d script WILL NOT WORK.
Please update your ports tree and install security/openvpn from there.
EOF
exit 1
fi
fi

View File

@@ -0,0 +1,27 @@
#!/bin/sh
# OpenVPN simple up/down script for openresolvconf integration.
# (C) Copyright 2016 Baptiste Daroussin
# BSD 2-clause license.
set -e +u
: ${script_type:=down}
case "${script_type}" in
up)
i=1
while :; do
eval option=\"\$foreign_option_${i}\" || break
[ "${option}" ] || break
set -- ${option}
i=$((i + 1))
[ "$1" = "dhcp-option" ] || continue
case "$2" in
DNS) echo "nameserver ${3}" ;;
DOMAIN) echo "domain ${3}" ;;
DOMAIN-SEARCH) echo "search ${3}" ;;
esac
done | /sbin/resolvconf -a "${dev}"
;;
down)
/sbin/resolvconf -d "${dev}" -f
;;
esac

View File

@@ -0,0 +1,10 @@
OpenVPN is a robust, scalable and highly configurable VPN (Virtual Private
Network) daemon which can be used to securely link two or more private networks
using an encrypted tunnel over the internet. It can operate over UDP or TCP,
can use SSL or a pre-shared secret to authenticate peers, and in SSL mode, one
server can handle many clients.
WWW: http://openvpn.net/
- Matthias Andree
matthias.andree@gmx.de

View File

@@ -1,4 +1,3 @@
etc/rc.d/openvpn
include/openvpn-msg.h
include/openvpn-plugin.h
lib/openvpn/plugins/openvpn-plugin-auth-pam.la
@@ -13,6 +12,8 @@ share/doc/openvpn/COPYING
share/doc/openvpn/COPYRIGHT.GPL
share/doc/openvpn/gui-notes.txt
share/doc/openvpn/management-notes.txt
share/doc/openvpn/openvpn-examples.5.html
share/doc/openvpn/openvpn.8.html
share/doc/openvpn/README
share/doc/openvpn/README.auth-pam
share/doc/openvpn/README.down-root
@@ -21,19 +22,7 @@ share/examples/openvpn/client.conf
share/examples/openvpn/server.conf
share/examples/openvpn/tls-home.conf
share/examples/openvpn/tls-office.conf
@dir etc/rc.d
@dir etc
@dir include
@dir lib/openvpn/plugins
@dir lib/openvpn
@dir lib
@dir man/man5
@dir man/man8
@dir man
@dir sbin
@dir share/doc/openvpn
@dir share/doc
@dir share/examples/openvpn
@dir share/examples
@dir share
@dir .

View File

@@ -2,7 +2,7 @@
# $Id$
#
PORTNAME= openvpn
PORTVERSION= 2.6.6
PORTVERSION= 2.6.8
CATEGORIES= security net
#MASTER_SITES= http://openvpn.net/release/
MASTER_SITES+= http://swupdate.openvpn.net/community/releases/

View File

@@ -1,3 +1,3 @@
TIMESTAMP = 1694376351
SHA256 (openvpn-2.6.6.tar.gz) = 3b074f392818b31aa529b84f76e8b5e4ad03fca764924f46d906bceaaf421034
SIZE (openvpn-2.6.6.tar.gz) = 1901689
TIMESTAMP = 1705433849
SHA256 (openvpn-2.6.8.tar.gz) = 5ede1565c8a6d880100f7f235317a7ee9eea83d5052db5547f13a9e76af7805d
SIZE (openvpn-2.6.8.tar.gz) = 1896563

View File

@@ -2,7 +2,7 @@
# $Id$
#
PORTNAME= unbound
PORTVERSION= 1.16.2
PORTVERSION= 1.19.1
CATEGORIES= dns
MASTER_SITES= http://unbound.net/downloads/

View File

@@ -1,3 +1,3 @@
TIMESTAMP = 1663883009
SHA256 (unbound-1.16.2.tar.gz) = 2e32f283820c24c51ca1dd8afecfdb747c7385a137abe865c99db4b257403581
SIZE (unbound-1.16.2.tar.gz) = 6204297
TIMESTAMP = 1709843907
SHA256 (unbound-1.19.1.tar.gz) = bc1d576f3dd846a0739adc41ffaa702404c6767d2b6082deb9f2f97cbb24a3a9
SIZE (unbound-1.19.1.tar.gz) = 6340435