diff --git a/net/openradius/Makefile b/net/openradius/Makefile index 1e9d05916d74..7c4f624e9e86 100644 --- a/net/openradius/Makefile +++ b/net/openradius/Makefile @@ -1,91 +1,74 @@ PORTNAME= openradius -PORTVERSION= 0.9.12c -PORTREVISION= 4 +DISTVERSION= 0.9.14 CATEGORIES= net -MASTER_SITES= http://sites.e-advies.nl/openradius/download/ \ - https://BSDforge.COM/projects/source/net/openradius/ +MASTER_SITES= https://codeberg.org/BSDforge/${PORTNAME}/archive/${DISTVERSIONFULL}${EXTRACT_SUFX}?dummy=/ MAINTAINER= portmaster@bsdforge.com COMMENT= RADIUS server with some actual documentation -WWW= https://BSDforge.COM/projects/net/openradius/ +WWW= https://codeberg.org/BSDforge/${PORTNAME}/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING -LOGFILE?= /var/log/openradius.log +USES= cpe gmake shebangfix +USE_RC_SUBR= openradius +SHEBANG_FILES= modules/ascfile/ascfile modules/debug/debug \ + modules/memory/memory modules/radsql/radsql \ + modules/unixpasswd/unixpasswd +LOGFILE?= /var/log/openradius/openradius.log -CONFLICTS= freeradius gnu-radius radiusd-cistron \ - freeradius-mysql +MAKE_ENV= INST_PREFIX=${STAGEDIR} +CONFLICTS= freeradius freeradius-mysql gnu-radius radiusd-cistron CC?= gcc CXX?= g++ -MAKE_ENV= INST_PREFIX=${STAGEDIR} -USES= cpe gmake shebangfix -SHEBANG_FILES= modules/ascfile/ascfile \ - modules/radsql/radsql \ - modules/unixpasswd/unixpasswd -USE_RC_SUBR= openradius SUB_LIST= LOGFILE="${LOGFILE}" -OPTIONS_DEFINE= LDAP DOCS EXAMPLES +OPTIONS_DEFINE= DOCS EXAMPLES LDAP +OPTIONS_DEFAULT= DOCS EXAMPLES -.include +DOCS_DESC= Install documentstion +EXAMPLES_DESC= Include examples +LDAP_DESC= Install LDAP support -.if ${PORT_OPTIONS:MLDAP} -USES+= ldap -PLIST_SUB+= LDAP="" -SCRIPTS_ENV+= USE_LDAP=yes -.else -PLIST_SUB+= LDAP="@comment " -.endif +LDAP_USES+= ldap +LDAP_PLIST_SUB+= LDAP="" +LDAP_PLIST_SUB_OFF+= LDAP="@comment" +LDAP_SCRIPTS_ENV+= USE_LDAP=yes -post-install: +post-extract: + ${MV} ${WRKDIR}/${PORTNAME} ${WRKDIR}/${PORTNAME}-${DISTVERSION} + +post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/doc/async-iface-notes ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/doc/language.html ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/doc/module-interface.html ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/doc/note-behaviourfile ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/doc/note-struct-ownership ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/doc/using-openradius.html ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}) + +post-install-EXAMPLES-on: ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/accounts - ${INSTALL_DATA} ${WRKSRC}/examples/behaviour.sample-ldap ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/behaviour.sample-ldap-authbind ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/behaviour.sample-mysql ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/behaviour.sample-postgres ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/behaviour.sample-unixpass ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/behaviour.sample-usersfile ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/configuration.sample-ldap ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/configuration.sample-ldap-authbind ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/configuration.sample-mysql ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/configuration.sample-postgres ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/configuration.sample-unixpass ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/configuration.sample-usersfile ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/accounts/README ${STAGEDIR}${EXAMPLESDIR}/accounts - ${INSTALL_DATA} ${WRKSRC}/examples/accounts/accounts.mysql ${STAGEDIR}${EXAMPLESDIR}/accounts - ${INSTALL_DATA} ${WRKSRC}/examples/accounts/behaviour ${STAGEDIR}${EXAMPLESDIR}/accounts - ${INSTALL_DATA} ${WRKSRC}/examples/accounts/configuration ${STAGEDIR}${EXAMPLESDIR}/accounts + (cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . \ + ${STAGEDIR}${EXAMPLESDIR} "! -name redhat-sysv-init-script") # Configuration, copy over to sample files ${MKDIR} ${STAGEDIR}${ETCDIR} .for FILE in dictionary ${INSTALL_DATA} ${WRKSRC}/etc/${FILE} \ ${STAGEDIR}${ETCDIR}/${FILE}.sample .endfor # Copy over legacy config files to sample ${MKDIR} ${STAGEDIR}${ETCDIR}/legacy .for FILE in clients nases realms users ${INSTALL} -m 0600 ${WRKSRC}/etc/legacy/${FILE} \ ${STAGEDIR}${ETCDIR}/legacy/${FILE}.sample .endfor ${MKDIR} ${STAGEDIR}${ETCDIR}/modules .for FILE in radldap.attrmap ${INSTALL} -m 0600 ${WRKSRC}/etc/modules/${FILE} \ ${STAGEDIR}${ETCDIR}/modules/${FILE}.sample .endfor ${MKDIR} ${STAGEDIR}${ETCDIR}/subdicts .for FILE in dict.* ${INSTALL} -m 0600 ${WRKSRC}/etc/subdicts/${FILE} \ ${STAGEDIR}${ETCDIR}/subdicts/ .endfor .include diff --git a/net/openradius/distinfo b/net/openradius/distinfo index 64acb4f1b6c4..38697f9a095b 100644 --- a/net/openradius/distinfo +++ b/net/openradius/distinfo @@ -1,2 +1,3 @@ -SHA256 (openradius-0.9.12c.tar.gz) = faf55f3ede8d842a73014656c2d9e6d2516baca453709a7d5c5d13bbeaf79cc6 -SIZE (openradius-0.9.12c.tar.gz) = 254179 +TIMESTAMP = 1716509201 +SHA256 (openradius-0.9.14.tar.gz) = 544a1bc25bf214d3713320d81d8ad29951da2dfbe1474ab5824c398398834810 +SIZE (openradius-0.9.14.tar.gz) = 252374 diff --git a/net/openradius/files/openradius.in b/net/openradius/files/openradius.in index 380dadedd0ee..938480ef0dc9 100644 --- a/net/openradius/files/openradius.in +++ b/net/openradius/files/openradius.in @@ -1,27 +1,27 @@ #!/bin/sh # PROVIDE: openradius # REQUIRE: DAEMON # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable openradius: # # openradius_enable (bool): Set to "YES" to enable openradius. # Default is "NO". # openradius_flags (flags); Set extra flags to openradius. # Default is "-o %%LOGFILE%%". # . /etc/rc.subr name=openradius rcvar=openradius_enable -load_rc_config ${name} +load_rc_config $name -: ${openradius_enable:=no} +: ${openradius_enable:=NO} : ${openradius_flags=-o %%LOGFILE%%} command=%%PREFIX%%/sbin/radiusd run_rc_command "$1" diff --git a/net/openradius/files/patch-Rules.mk b/net/openradius/files/patch-Rules.mk index 8960625292c1..4acba7b5161e 100644 --- a/net/openradius/files/patch-Rules.mk +++ b/net/openradius/files/patch-Rules.mk @@ -1,22 +1,22 @@ ---- Rules.mk.orig Thu Mar 23 17:19:04 2006 -+++ Rules.mk Sun Oct 29 15:49:17 2006 +--- Rules.mk.orig 2024-05-23 14:07:34 UTC ++++ Rules.mk @@ -74,19 +74,6 @@ $(CMD_INSTSBIN) $(INST) $(TGT_LIB) -m 755 -d $(INST_PREFIX)$(DIR_LIB) $(CMD_INSTLIB) -ifeq ($(wildcard $(INST_PREFIX)$(DIR_ETC)/*),) - $(INST) $(TGT_ETC) -m 644 -d $(INST_PREFIX)$(DIR_ETC) - $(CMD_INSTETC) -else - @echo - @echo Configuration directory $(DIR_ETC) already present -- skipping. - @echo - @echo When upgrading, is recommended to rename your existing configuration - @echo directory $(DIR_ETC) to eg. $(DIR_ETC).orig, - @echo to redo the installation, and to copy only the configuration- and behaviour - @echo files and the files in the legacy and modules subdirectories that have - @echo local changes back from the .orig directory. -endif @echo @echo If no error messages appeared, OpenRADIUS has been installed successfully. @echo diff --git a/net/openradius/files/patch-common-misc.c b/net/openradius/files/patch-common-misc.c deleted file mode 100644 index 828dd80a515d..000000000000 --- a/net/openradius/files/patch-common-misc.c +++ /dev/null @@ -1,11 +0,0 @@ ---- common/misc.c.orig 2009-07-07 18:15:41.000000000 +0100 -+++ common/misc.c 2009-07-07 18:17:20.000000000 +0100 -@@ -43,7 +43,7 @@ - */ - - --char *memrchr(char *s, int c, ssize_t len) -+char *memrchr9(char *s, int c, ssize_t len) - { - char *ret; - diff --git a/net/openradius/files/patch-common-misc.h b/net/openradius/files/patch-common-misc.h deleted file mode 100644 index 121bf103513d..000000000000 --- a/net/openradius/files/patch-common-misc.h +++ /dev/null @@ -1,11 +0,0 @@ ---- common/misc.h.orig 2009-07-07 18:15:47.000000000 +0100 -+++ common/misc.h 2009-07-07 18:17:01.000000000 +0100 -@@ -90,7 +90,7 @@ - * PROTOTYPES - */ - --char *memrchr(char *s, int c, ssize_t len); -+char *memrchr9(char *s, int c, ssize_t len); - void hex(char *buf, const char *src, ssize_t len); - void hmac_md5(char *out, char *in, META_ORD inl, char *key, META_ORD keyl); - void get_random_data(char *p, ssize_t len); diff --git a/net/openradius/files/patch-common-Rules.mk b/net/openradius/files/patch-common_Rules.mk similarity index 66% rename from net/openradius/files/patch-common-Rules.mk rename to net/openradius/files/patch-common_Rules.mk index 56e32013bf16..8199f43b614a 100644 --- a/net/openradius/files/patch-common-Rules.mk +++ b/net/openradius/files/patch-common_Rules.mk @@ -1,11 +1,11 @@ ---- common/Rules.mk.orig Sun Oct 29 15:53:42 2006 -+++ common/Rules.mk Sun Oct 29 15:53:45 2006 +--- common/Rules.mk.orig 2024-05-23 14:07:34 UTC ++++ common/Rules.mk @@ -29,7 +29,7 @@ $(OBJS_$(d)): $(d)/platform.h $(d)/common.a: $(OBJS_$(d)) - $(ARCHIVE) + $(AR) $(d)/platform.h: $(d)/Rules.mk $(DEFHDR) $@ $(S_CF_U_INT32_T) $(S_CF_VSNPRINTF) \ diff --git a/net/openradius/files/patch-constants.h b/net/openradius/files/patch-constants.h deleted file mode 100644 index ee412cb27805..000000000000 --- a/net/openradius/files/patch-constants.h +++ /dev/null @@ -1,12 +0,0 @@ ---- common/constants.h.orig Thu Mar 23 18:15:07 2006 -+++ common/constants.h Thu Jan 18 14:57:54 2007 -@@ -16,6 +16,8 @@ - * 2003/06/23 - EvB - Added constants needed for accept/reject/acctresp ops. - */ - -+/* Required for LONG_MAX */ -+#include - - /* - * DEFINES - diff --git a/net/openradius/files/patch-ETCRules.mk b/net/openradius/files/patch-etc_Rules.mk similarity index 83% rename from net/openradius/files/patch-ETCRules.mk rename to net/openradius/files/patch-etc_Rules.mk index c1672dfde65e..cd8ccc3eab09 100644 --- a/net/openradius/files/patch-ETCRules.mk +++ b/net/openradius/files/patch-etc_Rules.mk @@ -1,10 +1,10 @@ ---- etc/Rules.mk.orig Fri Mar 17 13:39:14 2006 -+++ etc/Rules.mk Sun Oct 29 15:46:17 2006 +--- etc/Rules.mk.orig 2024-05-23 14:07:34 UTC ++++ etc/Rules.mk @@ -13,7 +13,6 @@ CMD_INSTETC := $(CMD_INSTETC) \ $(INST) $(d)/dictionary -m 644 -d $(INST_PREFIX)$(DIR_ETC) \ $(d)/subdicts/* -m 644 -d $(INST_PREFIX)$(DIR_ETC)/subdicts \ - $(d)/legacy/* -m 640 -d $(INST_PREFIX)$(DIR_ETC)/legacy \ $(d)/modules/radldap.attrmap \ -m 644 -d $(INST_PREFIX)$(DIR_ETC)/modules ; \ cp examples/configuration.sample-usersfile $(INST_PREFIX)$(DIR_ETC)/configuration ; \ diff --git a/net/openradius/files/patch-language-Rules.mk b/net/openradius/files/patch-language_Rules.mk similarity index 64% rename from net/openradius/files/patch-language-Rules.mk rename to net/openradius/files/patch-language_Rules.mk index faffdf82327f..a42ab3e4f959 100644 --- a/net/openradius/files/patch-language-Rules.mk +++ b/net/openradius/files/patch-language_Rules.mk @@ -1,11 +1,11 @@ ---- language/Rules.mk.orig Sun Oct 29 15:55:04 2006 -+++ language/Rules.mk Sun Oct 29 15:55:08 2006 +--- language/Rules.mk.orig 2024-05-23 14:07:34 UTC ++++ language/Rules.mk @@ -31,7 +31,7 @@ $(COMP) $(d)/language.a: $(LIBOBJS_$(d)) - $(ARCHIVE) + $(AR) $(d)/langtest: LL_TGT := $(S_LL_CRYPT) $(d)/langtest: $(TSTOBJS_$(d)) common/common.a diff --git a/net/openradius/pkg-plist b/net/openradius/pkg-plist index c659d5bdb265..942562818155 100644 --- a/net/openradius/pkg-plist +++ b/net/openradius/pkg-plist @@ -1,59 +1,60 @@ bin/ascenddatafilter bin/genmd5hexpasswd bin/radaccttest bin/radclient bin/radtest %%ETCDIR%%/dictionary.sample %%ETCDIR%%/legacy/clients.sample %%ETCDIR%%/legacy/nases.sample %%ETCDIR%%/legacy/realms.sample %%ETCDIR%%/legacy/users.sample %%ETCDIR%%/modules/radldap.attrmap.sample %%ETCDIR%%/subdicts/dict.ascend %%ETCDIR%%/subdicts/dict.cisco %%ETCDIR%%/subdicts/dict.erx %%ETCDIR%%/subdicts/dict.garderos %%ETCDIR%%/subdicts/dict.internal %%ETCDIR%%/subdicts/dict.memory %%ETCDIR%%/subdicts/dict.microsoft %%ETCDIR%%/subdicts/dict.nomadix %%ETCDIR%%/subdicts/dict.rfc2869 %%ETCDIR%%/subdicts/dict.rfc3580 %%ETCDIR%%/subdicts/dict.stdacct %%ETCDIR%%/subdicts/dict.stdauth %%ETCDIR%%/subdicts/dict.str-ldap %%ETCDIR%%/subdicts/dict.tnova %%ETCDIR%%/subdicts/dict.tunnel %%ETCDIR%%/subdicts/dict.usr %%ETCDIR%%/subdicts/dict.vendors %%ETCDIR%%/subdicts/dict.wispr lib/openradius/ascfile +lib/openradius/debug lib/openradius/delay +lib/openradius/memory lib/openradius/radclient lib/openradius/radlogger lib/openradius/radsql lib/openradius/unixpasswd -%%LDAP%%lib/openradius/radldap sbin/radiusd %%PORTDOCS%%%%DOCSDIR%%/async-iface-notes %%PORTDOCS%%%%DOCSDIR%%/language.html %%PORTDOCS%%%%DOCSDIR%%/module-interface.html %%PORTDOCS%%%%DOCSDIR%%/note-behaviourfile %%PORTDOCS%%%%DOCSDIR%%/note-struct-ownership %%PORTDOCS%%%%DOCSDIR%%/using-openradius.html %%PORTEXAMPLES%%%%EXAMPLESDIR%%/accounts/README %%PORTEXAMPLES%%%%EXAMPLESDIR%%/accounts/accounts.mysql %%PORTEXAMPLES%%%%EXAMPLESDIR%%/accounts/behaviour %%PORTEXAMPLES%%%%EXAMPLESDIR%%/accounts/configuration %%PORTEXAMPLES%%%%EXAMPLESDIR%%/behaviour.sample-ldap %%PORTEXAMPLES%%%%EXAMPLESDIR%%/behaviour.sample-ldap-authbind %%PORTEXAMPLES%%%%EXAMPLESDIR%%/behaviour.sample-mysql %%PORTEXAMPLES%%%%EXAMPLESDIR%%/behaviour.sample-postgres %%PORTEXAMPLES%%%%EXAMPLESDIR%%/behaviour.sample-unixpass %%PORTEXAMPLES%%%%EXAMPLESDIR%%/behaviour.sample-usersfile %%PORTEXAMPLES%%%%EXAMPLESDIR%%/configuration.sample-ldap %%PORTEXAMPLES%%%%EXAMPLESDIR%%/configuration.sample-ldap-authbind %%PORTEXAMPLES%%%%EXAMPLESDIR%%/configuration.sample-mysql %%PORTEXAMPLES%%%%EXAMPLESDIR%%/configuration.sample-postgres %%PORTEXAMPLES%%%%EXAMPLESDIR%%/configuration.sample-unixpass %%PORTEXAMPLES%%%%EXAMPLESDIR%%/configuration.sample-usersfile diff --git a/net/openradius/scripts/configure b/net/openradius/scripts/configure index 637cb8ee7b6e..9533aeb45c42 100644 --- a/net/openradius/scripts/configure +++ b/net/openradius/scripts/configure @@ -1,84 +1,86 @@ #!/bin/sh cd $WRKSRC || exit 1; cat > Makefile << END ### Installation paths and compiled-in defaults # DIR_BIN = $PREFIX/bin DIR_SBIN = $PREFIX/sbin DIR_ETC = $PREFIX/etc/openradius DIR_LIB = $PREFIX/lib/openradius END if [ x$LOGFILE != x ]; then cat >> Makefile << END FILE_LOG = $LOGFILE END else cat >> Makefile << END -FILE_LOG = /var/log/openradius.log +FILE_LOG = /var/log/openradius/openradius.log END fi cat >> Makefile << END ### Modules that will be built and installed # TGT_LIB += modules/ascfile/ascfile TGT_LIB += modules/unixpasswd/unixpasswd TGT_LIB += modules/radlogger/radlogger TGT_LIB += modules/delay/delay TGT_LIB += modules/radsql/radsql +TGT_LIB += modules/memory/memory +TGT_LIB += modules/debug/debug END if [ x$USE_LDAP != x ]; then cat >> Makefile << END TGT_LIB += modules/radldap/radldap CF_RADLDAP = -I$LDAPINCLUDE${LOCALBASE}/include END fi cat >> Makefile << END ### System compatibility flags, used in some targets' CF_TGT, LF_TGT or LL_TGT # S_CF_U_INT32_T = -DU_INT32_T=u_int32_t S_CF_SYSLOG = -DHAVE_SYSLOG S_CF_VSNPRINTF = -DHAVE_VSNPRINTF S_CF_SIGACTION = -DHAVE_SIGACTION S_LL_INET = ### Build flags for all targets # -CF_ALL = -g -Wall -LF_ALL = +CF_ALL = -g -w +LF_ALL = -s -L$LDAPLIB${LOCALBASE}/lib LL_ALL = ### Module-specific build flags # LF_RADLDAP = -L$LDAPLIB${LOCALBASE}/lib LL_RADLDAP = -lldap -llber ### Build tools # # It may be necessary to create a script similar to ccd-gcc for your compiler. # CMPLR = ./build/ccd-gcc DEFHDR = ./build/hdr INST = ./build/install AR = ar rc \$@ \$^ # COMP = \$(CMPLR) \$(CF_ALL) \$(CF_TGT) -o \$@ -c \$< LINK = \$(CMPLR) \$(LF_ALL) \$(LF_TGT) -o \$@ \$^ \$(LL_TGT) \$(LL_ALL) COMPLINK = \$(CMPLR) \$(CF_ALL) \$(CF_TGT) \$(LF_ALL) \$(LF_TGT) -o \$@ \$< \$(LL_TGT) \$(LL_ALL) ### Standard parts # include Rules.mk END exit 0;