pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/www
Module Name: pkgsrc
Committed By: otis
Date: Sun Feb 14 11:56:58 UTC 2021
Added Files:
pkgsrc/www/unit: DESCR Makefile Makefile.common PLIST PLIST.module
common.mk distinfo ext.mk options.mk version.mk
pkgsrc/www/unit-perl: DESCR Makefile
pkgsrc/www/unit-php: DESCR Makefile
pkgsrc/www/unit-python: DESCR Makefile
pkgsrc/www/unit-ruby: DESCR Makefile
pkgsrc/www/unit/files: unit.sh
pkgsrc/www/unit/files/smf: manifest.xml
pkgsrc/www/unit/patches: patch-auto_events patch-auto_os_conf
patch-src_nxt__cert.c patch-src_nxt__conf__validation.c
patch-src_nxt__kqueue__engine.c patch-src_nxt__php__sapi.c
patch-src_nxt__router.c patch-src_nxt__unit.c patch-src_nxt__unix.h
patch-src_nxt__websocket__header.h
Log Message:
www/unit: import unit-1.22.0
NGINX Unit is a polyglot app server, a reverse proxy, and a static file server,
available for Unix-like systems. It was built by nginx team members from
scratch to be highly efficient and fully configurable at runtime.
Vast majority of work done by Sergey A. Osokin <osa%FreeBSD.org@localhost>
WWW: http://unit.nginx.org/
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/www/unit/DESCR pkgsrc/www/unit/Makefile \
pkgsrc/www/unit/Makefile.common pkgsrc/www/unit/PLIST \
pkgsrc/www/unit/PLIST.module pkgsrc/www/unit/common.mk \
pkgsrc/www/unit/distinfo pkgsrc/www/unit/ext.mk \
pkgsrc/www/unit/options.mk pkgsrc/www/unit/version.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/www/unit-perl/DESCR \
pkgsrc/www/unit-perl/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/www/unit-php/DESCR pkgsrc/www/unit-php/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/www/unit-python/DESCR \
pkgsrc/www/unit-python/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/www/unit-ruby/DESCR \
pkgsrc/www/unit-ruby/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/www/unit/files/unit.sh
cvs rdiff -u -r0 -r1.1 pkgsrc/www/unit/files/smf/manifest.xml
cvs rdiff -u -r0 -r1.1 pkgsrc/www/unit/patches/patch-auto_events \
pkgsrc/www/unit/patches/patch-auto_os_conf \
pkgsrc/www/unit/patches/patch-src_nxt__cert.c \
pkgsrc/www/unit/patches/patch-src_nxt__conf__validation.c \
pkgsrc/www/unit/patches/patch-src_nxt__kqueue__engine.c \
pkgsrc/www/unit/patches/patch-src_nxt__php__sapi.c \
pkgsrc/www/unit/patches/patch-src_nxt__router.c \
pkgsrc/www/unit/patches/patch-src_nxt__unit.c \
pkgsrc/www/unit/patches/patch-src_nxt__unix.h \
pkgsrc/www/unit/patches/patch-src_nxt__websocket__header.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/www/unit/DESCR
diff -u /dev/null pkgsrc/www/unit/DESCR:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/DESCR Sun Feb 14 11:56:57 2021
@@ -0,0 +1,6 @@
+NGINX Unit is a lightweight dynamic open-source server for diverse
+web applications.
+
+Built from scratch, Unit can run web apps in different language
+versions; fully configurable in runtime with zero interruption, it
+enables on-the-fly granular management for engineering and operations.
Index: pkgsrc/www/unit/Makefile
diff -u /dev/null pkgsrc/www/unit/Makefile:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/Makefile Sun Feb 14 11:56:57 2021
@@ -0,0 +1,14 @@
+# $NetBSD: Makefile,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+.include "../../wip/unit/version.mk"
+
+DISTNAME= unit-${UNIT_VERSION}
+
+COMMENT= Dynamic web application server
+
+MAINTAINER= osa%FreeBSD.org@localhost
+
+RCD_SCRIPTS= unit
+
+.include "../../wip/unit/Makefile.common"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/www/unit/Makefile.common
diff -u /dev/null pkgsrc/www/unit/Makefile.common:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/Makefile.common Sun Feb 14 11:56:57 2021
@@ -0,0 +1,60 @@
+# $NetBSD: Makefile.common,v 1.1 2021/02/14 11:56:57 otis Exp $
+#
+# used by www/libunit/Makefile
+# used by www/unit/Makefile
+# used by www/unit-perl/Makefile
+# used by www/unit-php/Makefile
+# used by www/unit-python/Makefile
+# used by www/unit-ruby/Makefile
+
+# Do *not* add any version-specific data here
+
+CATEGORIES= www
+MASTER_SITES= https://unit.nginx.org/download/
+
+HOMEPAGE= https://unit.nginx.org/
+LICENSE= apache-2.0
+
+.include "../../mk/bsd.prefs.mk"
+
+UNIT_USER?= unit
+UNIT_GROUP?= unit
+UNIT_DATADIR?= ${VARBASE}/db/unit
+UNIT_LOGDIR?= ${VARBASE}/log/unit
+UNIT_RUNDIR?= ${VARBASE}/run/unit
+UNIT_PIDDIR?= ${VARBASE}/run
+UNIT_TMPDIR?= ${VARBASE}/tmp
+
+BUILD_DEFS+= UNIT_DATADIR UNIT_LOGDIR UNIT_PIDDIR VARBASE
+
+PKG_USERS_VARS+= UNIT_USER
+PKG_GROUPS_VARS+= UNIT_GROUP
+PKG_GROUPS= ${UNIT_GROUP}
+PKG_USERS= ${UNIT_USER}:${UNIT_GROUP}
+
+PKG_GECOS.${UNIT_USER}= NGINX Unit server user
+PKG_HOME.${UNIT_USER}= ${UNIT_DATADIR}
+PKG_SHELL.${UNIT_USER}= ${NOLOGIN}
+
+USE_PKGLOCALEDIR= yes
+HAS_CONFIGURE= yes
+CONFIGURE_ENV+= PATH=${PATH}
+CONFIGURE_ARGS+= --prefix=${PREFIX}
+CONFIGURE_ARGS+= --ld-opt="-L${PREFIX}/lib -R${PREFIX}/lib"
+CONFIGURE_ARGS+= --log=${UNIT_LOGDIR}/unit.log
+CONFIGURE_ARGS+= --modules=${UNIT_EXTENSION_DIR}
+CONFIGURE_ARGS+= --pid=${UNIT_PIDDIR}/unit.pid
+CONFIGURE_ARGS+= --state=${UNIT_DATADIR}
+CONFIGURE_ARGS+= --control=unix:${UNIT_RUNDIR}/control.unit.sock
+CONFIGURE_ARGS+= --tmp=${UNIT_TMPDIR}
+CONFIGURE_ARGS+= --user=${UNIT_USER}
+CONFIGURE_ARGS+= --group=${UNIT_GROUP}
+
+.include "../../wip/unit/options.mk"
+
+INSTALLATION_DIRS+= sbin ${UNIT_EXTENSION_DIR}
+MAKE_DIRS+= ${UNIT_PIDDIR} ${UNIT_DATADIR} ${UNIT_RUNDIR}
+OWN_DIRS= ${UNIT_LOGDIR} ${UNIT_RUNDIR}
+OWN_DIRS_PERMS+= ${UNIT_DATADIR} ${UNIT_USER} ${UNIT_GROUP} 0700
+
+USE_LANGUAGES= c
Index: pkgsrc/www/unit/PLIST
diff -u /dev/null pkgsrc/www/unit/PLIST:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/PLIST Sun Feb 14 11:56:57 2021
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2021/02/14 11:56:57 otis Exp $
+sbin/unitd
Index: pkgsrc/www/unit/PLIST.module
diff -u /dev/null pkgsrc/www/unit/PLIST.module:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/PLIST.module Sun Feb 14 11:56:57 2021
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST.module,v 1.1 2021/02/14 11:56:57 otis Exp $
+${UNIT_EXTENSION_DIR}/${PKGMODNAME}.${SHLIB_SUFFIX}
Index: pkgsrc/www/unit/common.mk
diff -u /dev/null pkgsrc/www/unit/common.mk:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/common.mk Sun Feb 14 11:56:57 2021
@@ -0,0 +1,10 @@
+# $NetBSD: common.mk,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+.if !defined(UNITCOMMON_MK)
+UNITCOMMON_MK= defined
+
+DISTNAME?= unit-${UNIT_VERSION}
+
+.endif
+
+.include "../../wip/unit/version.mk"
Index: pkgsrc/www/unit/distinfo
diff -u /dev/null pkgsrc/www/unit/distinfo:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/distinfo Sun Feb 14 11:56:57 2021
@@ -0,0 +1,16 @@
+$NetBSD: distinfo,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+SHA1 (unit-1.22.0.tar.gz) = ab38a89c12d15a56fdc1a51dd6fa8a689e02abae
+RMD160 (unit-1.22.0.tar.gz) = a658f1c8f898e381a017303264b0d7202627cdbb
+SHA512 (unit-1.22.0.tar.gz) = 7418e9dd86c10d64184f5a2f3e26c27bacc53b90ba35658fba6af00a57df89645c16c16b510d3e570eee6f8fdeef4ec7f92971f7231093e3da118e858ed386f5
+Size (unit-1.22.0.tar.gz) = 824763 bytes
+SHA1 (patch-auto_events) = 0347dfefbedaacd206c8c2bfd8ea38b18995dd9f
+SHA1 (patch-auto_os_conf) = 6d1cd7aef662a60d4288014eb6fadbe8c1268e55
+SHA1 (patch-src_nxt__cert.c) = c91e45f148a079b543a0d3cb277388bffb3e2854
+SHA1 (patch-src_nxt__conf__validation.c) = bc00a598fc3e8a6bb9ccee3b773b603e788b426f
+SHA1 (patch-src_nxt__kqueue__engine.c) = c341425f4b21d4cff6e003958f88a04b53dc4ee1
+SHA1 (patch-src_nxt__php__sapi.c) = 2d5e557ff2066bec78f5bfbca6a64688f60da01b
+SHA1 (patch-src_nxt__router.c) = cc679af06fce1589d555c001574cd4cbd1af53b7
+SHA1 (patch-src_nxt__unit.c) = fd9a43fc2cbcd342cd5e82e074c3c5a3d6a090cb
+SHA1 (patch-src_nxt__unix.h) = c0db5bc4d9c45a3ead48627567284d8b3041b0a0
+SHA1 (patch-src_nxt__websocket__header.h) = 1b50405b187cc8a662372a1c20ab7737278135ae
Index: pkgsrc/www/unit/ext.mk
diff -u /dev/null pkgsrc/www/unit/ext.mk:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/ext.mk Sun Feb 14 11:56:57 2021
@@ -0,0 +1,53 @@
+# $NetBSD: ext.mk,v 1.1 2021/02/14 11:56:57 otis Exp $
+#
+# NGINX Unit extension package framework, for bundled extensions.
+#
+# Just include this file, define MODNAME, define PKGREVISION if necessary,
+# add dependencies, and add the appropriate --with-configure-arg, then include
+# bsd.pkg.mk.
+#
+# used by wip/unit-perl/Makefile
+# used by wip/unit-php/Makefile
+# used by wip/unit-python/Makefile
+# used by wip/unit-ruby/Makefile
+
+.if !defined(UNITEXT_MK)
+UNITEXT_MK= defined
+
+.include "../../wip/unit/version.mk"
+
+DISTINFO_FILE= ${.CURDIR}/../../wip/unit/distinfo
+PATCHDIR= ${.CURDIR}/../../wip/unit/patches
+
+.include "../../mk/bsd.prefs.mk"
+
+.if !defined(MODNAME)
+PKG_FAIL_REASON+= "MODNAME should be defined"
+.endif
+
+PKGMODNAME?= ${MODNAME}.unit
+
+PLIST_SUBST+= PKGMODNAME=${MODNAME}.unit
+PLIST_SUBST+= SHLIB_SUFFIX=${SHLIB_SUFFIX}
+PLIST_SUBST+= UNIT_EXTENSION_DIR=${UNIT_EXTENSION_DIR}
+
+PLIST_SRC+= ${.CURDIR}/../../wip/unit/PLIST.module
+
+INSTALLATION_DIRS+= ${UNIT_EXTENSION_DIR}
+
+.if ${OBJECT_FMT} == "SOM"
+SHLIB_SUFFIX= sl
+.else
+SHLIB_SUFFIX= so
+.endif
+
+do-build:
+ cd ${WRKSRC} && ${MAKE} ${MODNAME}
+
+do-install:
+ ${INSTALL_LIB} ${WRKSRC}/build/${PKGMODNAME}.${SHLIB_SUFFIX} \
+ ${DESTDIR}${PREFIX}/${UNIT_EXTENSION_DIR}
+
+.endif # UNITEXT_MK
+
+.include "${.CURDIR}/../../wip/unit/common.mk"
Index: pkgsrc/www/unit/options.mk
diff -u /dev/null pkgsrc/www/unit/options.mk:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/options.mk Sun Feb 14 11:56:57 2021
@@ -0,0 +1,33 @@
+# $NetBSD: options.mk,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.unit
+PKG_SUPPORTED_OPTIONS= debug inet6 pcre pcre2 ssl
+PKG_SUGGESTED_OPTIONS= inet6 pcre2 ssl
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mdebug)
+CONFIGURE_ARGS+= --debug
+.endif
+
+.if empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+= --no-ipv6
+.endif
+
+.if empty(PKG_OPTIONS:Mpcre) && empty(PKG_OPTIONS:Mpcre2)
+CONFIGURE_ARGS+= --no-regex
+.endif
+
+.if !empty(PKG_OPTIONS:Mpcre)
+CONFIGURE_ARGS+= --no-pcre2
+.include "../../devel/pcre/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mpcre2)
+.include "../../devel/pcre2/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mssl)
+.include "../../security/openssl/buildlink3.mk"
+CONFIGURE_ARGS+= --openssl
+.endif
Index: pkgsrc/www/unit/version.mk
diff -u /dev/null pkgsrc/www/unit/version.mk:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/version.mk Sun Feb 14 11:56:57 2021
@@ -0,0 +1,20 @@
+# $NetBSD: version.mk,v 1.1 2021/02/14 11:56:57 otis Exp $
+#
+# UNIT_EXTENSION_DIR
+# Relative path to ${PREFIX} for NGINX Unit's modules.
+#
+# Example: libexec/unit/modules
+#
+# Keywords: unit
+#
+
+.if !defined(UNITVERSION_MK)
+UNITVERSION_MK= defined
+
+# Define NGINX Unit's version.
+UNIT_VERSION= 1.22.0
+
+# Define NGINX Unit's modules directory
+UNIT_EXTENSION_DIR= libexec/unit/modules
+
+.endif # UNITVERSION_MK
Index: pkgsrc/www/unit-perl/DESCR
diff -u /dev/null pkgsrc/www/unit-perl/DESCR:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit-perl/DESCR Sun Feb 14 11:56:57 2021
@@ -0,0 +1 @@
+Perl module for NGINX Unit.
Index: pkgsrc/www/unit-perl/Makefile
diff -u /dev/null pkgsrc/www/unit-perl/Makefile:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit-perl/Makefile Sun Feb 14 11:56:57 2021
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+PKGNAME= unit-${LANG}-${UNIT_VERSION}
+COMMENT= Perl module for NGINX Unit
+
+LANG= perl
+MODNAME= ${LANG}
+
+MAINTAINER= osa%FreeBSD.org@localhost
+
+USE_TOOLS+= perl
+
+post-configure:
+ ${RUN} cd ${WRKSRC} && ${PKGSRC_SETENV} ${_CONFIGURE_SCRIPT_ENV} \
+ ${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS} ${CONFIGURE_SCRIPT} \
+ ${LANG} --module=${MODNAME}
+
+.include "../../lang/perl5/buildlink3.mk"
+.include "../../wip/unit/ext.mk"
+.include "../../wip/unit/Makefile.common"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/www/unit-php/DESCR
diff -u /dev/null pkgsrc/www/unit-php/DESCR:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit-php/DESCR Sun Feb 14 11:56:57 2021
@@ -0,0 +1 @@
+PHP module for NGINX Unit.
Index: pkgsrc/www/unit-php/Makefile
diff -u /dev/null pkgsrc/www/unit-php/Makefile:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit-php/Makefile Sun Feb 14 11:56:57 2021
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+PKGNAME= unit-${LANG}${PHP_VERSION:R:S|.||g}-${UNIT_VERSION}
+COMMENT= PHP module for NGINX Unit
+
+LANG= php
+MODNAME= ${LANG}${PHP_VERSION}
+
+MAINTAINER= osa%FreeBSD.org@localhost
+
+PHP_VERSIONS_ACCEPTED?= 56 72 73 74
+
+.include "../../lang/php/phpversion.mk"
+
+#.if empty(PKG_BUILD_OPTIONS.${PHP_PKG_PREFIX}:Mphp-embed)
+#BROKEN= "Requires the php-embed option enabled in PHP."
+#.endif
+
+post-configure:
+ ${RUN} cd ${WRKSRC} && ${SETENV} ${_CONFIGURE_SCRIPT_ENV} \
+ ${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS} \
+ ${CONFIGURE_SCRIPT} ${LANG} \
+ --lib-path=${PREFIX}/lib \
+ --module=${MODNAME}
+
+.include "${PHPPKGSRCDIR}/buildlink3.mk"
+.include "../../wip/unit/ext.mk"
+.include "../../wip/unit/Makefile.common"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/www/unit-python/DESCR
diff -u /dev/null pkgsrc/www/unit-python/DESCR:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit-python/DESCR Sun Feb 14 11:56:58 2021
@@ -0,0 +1 @@
+Perl module for NGINX Unit.
Index: pkgsrc/www/unit-python/Makefile
diff -u /dev/null pkgsrc/www/unit-python/Makefile:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit-python/Makefile Sun Feb 14 11:56:58 2021
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1 2021/02/14 11:56:58 otis Exp $
+
+PKGNAME= unit-${LANG}-${UNIT_VERSION}
+COMMENT= Python module for NGINX Unit
+
+LANG= python
+MODNAME= ${LANG}
+
+MAINTAINER= osa%FreeBSD.org@localhost
+
+post-configure:
+ ${RUN} cd ${WRKSRC} && ${SETENV} ${_CONFIGURE_SCRIPT_ENV} \
+ ${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS} ${CONFIGURE_SCRIPT} \
+ ${LANG} --module=${MODNAME} \
+ --config=${LANG}${PYVERSSUFFIX}-config
+
+.include "../../lang/${LANG}/application.mk"
+.include "../../wip/unit/ext.mk"
+.include "../../wip/unit/Makefile.common"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/www/unit-ruby/DESCR
diff -u /dev/null pkgsrc/www/unit-ruby/DESCR:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit-ruby/DESCR Sun Feb 14 11:56:58 2021
@@ -0,0 +1 @@
+Ruby module for NGINX Unit.
Index: pkgsrc/www/unit-ruby/Makefile
diff -u /dev/null pkgsrc/www/unit-ruby/Makefile:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit-ruby/Makefile Sun Feb 14 11:56:58 2021
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.1 2021/02/14 11:56:58 otis Exp $
+
+PKGNAME= unit-${LANG}-${UNIT_VERSION}
+COMMENT= Ruby module for NGINX Unit
+
+LANG= ruby
+MODNAME= ${LANG}
+
+MAINTAINER= osa%FreeBSD.org@localhost
+
+post-configure:
+ ${RUN} cd ${WRKSRC} && ${SETENV} ${_CONFIGURE_SCRIPT_ENV} \
+ ${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS} \
+ ${CONFIGURE_SCRIPT} ${LANG} --module=${MODNAME}
+
+.include "../../lang/${LANG}/buildlink3.mk"
+.include "../../wip/unit/ext.mk"
+.include "../../wip/unit/Makefile.common"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/www/unit/files/unit.sh
diff -u /dev/null pkgsrc/www/unit/files/unit.sh:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/files/unit.sh Sun Feb 14 11:56:57 2021
@@ -0,0 +1,17 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: unit.sh,v 1.1 2021/02/14 11:56:57 otis Exp $
+#
+# PROVIDE: unit
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+
+name="unit"
+rcvar=${name}
+command="@PREFIX@/sbin/${name}d"
+pidfile="@VARBASE@/run/${name}.pid"
+start_precmd="ulimit -n 2048"
+
+load_rc_config $name
+run_rc_command "$1"
Index: pkgsrc/www/unit/files/smf/manifest.xml
diff -u /dev/null pkgsrc/www/unit/files/smf/manifest.xml:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/files/smf/manifest.xml Sun Feb 14 11:56:57 2021
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="export">
+ <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+ <create_default_instance enabled="false" />
+ <single_instance />
+ <dependency name='network' grouping='require_all' restart_on='error' type='service'>
+ <service_fmri value='svc:/milestone/network:default' />
+ </dependency>
+ <dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/filesystem/local:default' />
+ </dependency>
+ <method_context>
+ <method_environment>
+ <envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
+ </method_environment>
+ </method_context>
+ <exec_method type="method" name="start" exec="@PREFIX@/sbin/unitd" timeout_seconds="60" />
+ <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+ <exec_method type="method" name="refresh" exec=":kill -HUP" timeout_seconds="60" />
+ <property_group name="startd" type="framework">
+ <propval name="duration" type="astring" value="contract" />
+ <propval name="ignore_error" type="astring" value="core,signal" />
+ </property_group>
+ <template>
+ <common_name>
+ <loctext xml:lang="C">NGINX Unit HTTP daemon</loctext>
+ </common_name>
+ </template>
+ </service>
+</service_bundle>
Index: pkgsrc/www/unit/patches/patch-auto_events
diff -u /dev/null pkgsrc/www/unit/patches/patch-auto_events:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/patches/patch-auto_events Sun Feb 14 11:56:57 2021
@@ -0,0 +1,128 @@
+$NetBSD: patch-auto_events,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+Prefer eventports on SunOS
+
+--- auto/events.orig 2021-02-04 15:22:33.000000000 +0000
++++ auto/events
+@@ -5,69 +5,70 @@
+
+ # Linux epoll.
+
+-nxt_feature="Linux epoll"
+-nxt_feature_name=NXT_HAVE_EPOLL
+-nxt_feature_run=
+-nxt_feature_incs=
+-nxt_feature_libs=
+-nxt_feature_test="#include <sys/epoll.h>
+- #include <unistd.h>
+-
+- int main() {
+- int n;
+-
+- n = epoll_create(1);
+- close(n);
+- return 0;
+- }"
+-. auto/feature
+-
+-if [ $nxt_found = yes ]; then
+- NXT_HAVE_EPOLL=YES
+-
+- nxt_feature="Linux signalfd()"
+- nxt_feature_name=NXT_HAVE_SIGNALFD
++# Do not use epoll on SunOS/illumos/Smartos
++# as eventports are preferred there.
++NXT_HAVE_EPOLL=NO
++if [ $NXT_SYSTEM != "SunOS" ]; then
++ nxt_feature="Linux epoll"
++ nxt_feature_name=NXT_HAVE_EPOLL
+ nxt_feature_run=
+ nxt_feature_incs=
+ nxt_feature_libs=
+- nxt_feature_test="#include <signal.h>
+- #include <sys/signalfd.h>
++ nxt_feature_test="#include <sys/epoll.h>
+ #include <unistd.h>
+-
+- int main() {
+- int n;
+- sigset_t mask;
+-
+- sigemptyset(&mask);
+- n = signalfd(-1, &mask, 0);
+- close(n);
+- return 0;
+- }"
+- . auto/feature
+-
+-
+- nxt_feature="Linux eventfd()"
+- nxt_feature_name=NXT_HAVE_EVENTFD
+- nxt_feature_run=
+- nxt_feature_incs=
+- nxt_feature_libs=
+- nxt_feature_test="#include <sys/eventfd.h>
+- #include <unistd.h>
+-
++
+ int main() {
+ int n;
+-
+- n = eventfd(0, 0);
++
++ n = epoll_create(1);
+ close(n);
+ return 0;
+ }"
+ . auto/feature
+-
+-else
+- NXT_HAVE_EPOLL=NO
++
++ if [ $nxt_found = yes ]; then
++ NXT_HAVE_EPOLL=YES
++
++ nxt_feature="Linux signalfd()"
++ nxt_feature_name=NXT_HAVE_SIGNALFD
++ nxt_feature_run=
++ nxt_feature_incs=
++ nxt_feature_libs=
++ nxt_feature_test="#include <signal.h>
++ #include <sys/signalfd.h>
++ #include <unistd.h>
++
++ int main() {
++ int n;
++ sigset_t mask;
++
++ sigemptyset(&mask);
++ n = signalfd(-1, &mask, 0);
++ close(n);
++ return 0;
++ }"
++ . auto/feature
++
++
++ nxt_feature="Linux eventfd()"
++ nxt_feature_name=NXT_HAVE_EVENTFD
++ nxt_feature_run=
++ nxt_feature_incs=
++ nxt_feature_libs=
++ nxt_feature_test="#include <sys/eventfd.h>
++ #include <unistd.h>
++
++ int main() {
++ int n;
++
++ n = eventfd(0, 0);
++ close(n);
++ return 0;
++ }"
++ . auto/feature
++ fi
+ fi
+
+-
+ # FreeBSD, MacOSX, NetBSD, OpenBSD kqueue.
+
+ nxt_feature="kqueue"
Index: pkgsrc/www/unit/patches/patch-auto_os_conf
diff -u /dev/null pkgsrc/www/unit/patches/patch-auto_os_conf:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/patches/patch-auto_os_conf Sun Feb 14 11:56:57 2021
@@ -0,0 +1,16 @@
+$NetBSD: patch-auto_os_conf,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+Move _XOPEN_SOURCE to CFLAGS
+
+--- auto/os/conf.orig 2020-11-19 18:12:30.000000000 +0000
++++ auto/os/conf
+@@ -98,6 +98,9 @@ case "$NXT_SYSTEM" in
+ NXT_LIBM="-lm"
+ NXT_LIBS="-lsocket $NXT_LIBSENDFILE"
+ NXT_LIBS="$NXT_LIBS $NXT_LIBRT $NXT_LIBDL $NXT_PTHREAD"
++
++ NXT_CFLAGS="$NXT_CFLAGS -D_XOPEN_SOURCE"
++ NXT_CFLAGS="$NXT_CFLAGS -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__"
+ ;;
+
+ Darwin)
Index: pkgsrc/www/unit/patches/patch-src_nxt__cert.c
diff -u /dev/null pkgsrc/www/unit/patches/patch-src_nxt__cert.c:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/patches/patch-src_nxt__cert.c Sun Feb 14 11:56:57 2021
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_nxt__cert.c,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+Use more portable way to find regular files.
+
+--- src/nxt_cert.c.orig 2020-10-08 16:04:40.000000000 +0000
++++ src/nxt_cert.c
+@@ -9,6 +9,9 @@
+ #include <nxt_cert.h>
+
+ #include <dirent.h>
++#include <fcntl.h>
++#include <sys/types.h>
++#include <sys/stat.h>
+
+ #include <openssl/bio.h>
+ #include <openssl/pem.h>
+@@ -809,6 +812,7 @@ nxt_cert_store_load(nxt_task_t *task, nx
+ nxt_runtime_t *rt;
+ struct dirent *de;
+ nxt_cert_item_t *item;
++ struct stat cert_statbuf;
+
+ rt = task->thread->runtime;
+
+@@ -838,7 +842,8 @@ nxt_cert_store_load(nxt_task_t *task, nx
+ break;
+ }
+
+- if (de->d_type != DT_REG) {
++ if (stat(de->d_name, &cert_statbuf) == -1 ||
++ (cert_statbuf.st_mode & S_IFREG) == 0) {
+ continue;
+ }
+
Index: pkgsrc/www/unit/patches/patch-src_nxt__conf__validation.c
diff -u /dev/null pkgsrc/www/unit/patches/patch-src_nxt__conf__validation.c:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/patches/patch-src_nxt__conf__validation.c Sun Feb 14 11:56:57 2021
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_nxt__conf__validation.c,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+NetBSD portability,
+https://mail-index.netbsd.org/tech-userlevel/2014/08/15/msg008729.html
+
+This patch is going to be reviewed by the vendor.
+
+--- src/nxt_conf_validation.c.orig 2020-11-20 11:59:37.258205794 -0500
++++ src/nxt_conf_validation.c 2020-11-20 12:11:43.940557782 -0500
+@@ -1426,10 +1426,10 @@
+
+ size = nxt_conf_get_number(value);
+
+- if (size < PTHREAD_STACK_MIN) {
++ if (size < sysconf(_SC_THREAD_STACK_MIN)) {
+ return nxt_conf_vldt_error(vldt, "The \"thread_stack_size\" number "
+ "must be equal to or greater than %d.",
+- PTHREAD_STACK_MIN);
++ sysconf(_SC_THREAD_STACK_MIN));
+ }
+
+ if ((size % nxt_pagesize) != 0) {
Index: pkgsrc/www/unit/patches/patch-src_nxt__kqueue__engine.c
diff -u /dev/null pkgsrc/www/unit/patches/patch-src_nxt__kqueue__engine.c:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/patches/patch-src_nxt__kqueue__engine.c Sun Feb 14 11:56:57 2021
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_nxt__kqueue__engine.c,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+Use correct types on NetBSD-CURRENT.
+
+This patch is going to be reviewed by the vendor.
+
+--- src/nxt_kqueue_engine.c.orig 2021-02-04 15:22:33.000000000 +0000
++++ src/nxt_kqueue_engine.c
+@@ -39,8 +39,10 @@
+ #endif
+
+
+-#if (NXT_NETBSD)
+-/* NetBSD defines the kevent.udata field as intptr_t. */
++#if (NXT_NETBSD) && (defined(__NetBSD__) && __NetBSD_Version__ < 999001500)
++/* NetBSD up to 9.99.15 defines the kevent.udata field as intptr_t.
++ * NetBSD 9.99.16 onwards defines the kevent.udata field as void*
++ */
+
+ #define nxt_kevent_set_udata(udata) (intptr_t) (udata)
+ #define nxt_kevent_get_udata(udata) (void *) (udata)
Index: pkgsrc/www/unit/patches/patch-src_nxt__php__sapi.c
diff -u /dev/null pkgsrc/www/unit/patches/patch-src_nxt__php__sapi.c:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/patches/patch-src_nxt__php__sapi.c Sun Feb 14 11:56:57 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_nxt__php__sapi.c,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+Use correct type.
+
+--- src/nxt_php_sapi.c.orig 2021-02-04 15:22:33.000000000 +0000
++++ src/nxt_php_sapi.c
+@@ -1191,7 +1191,7 @@ nxt_php_send_headers(sapi_headers_struct
+ }
+
+ value = colon + 1;
+- while(isspace(*value)) {
++ while(isspace((unsigned char)(*value))) {
+ value++;
+ }
+
Index: pkgsrc/www/unit/patches/patch-src_nxt__router.c
diff -u /dev/null pkgsrc/www/unit/patches/patch-src_nxt__router.c:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/patches/patch-src_nxt__router.c Sun Feb 14 11:56:57 2021
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_nxt__router.c,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+Silence warning.
+
+This patch is going to be reviewed by the vendor.
+
+--- src/nxt_router.c.orig 2020-10-08 16:04:40.000000000 +0000
++++ src/nxt_router.c
+@@ -3692,7 +3692,7 @@ nxt_router_thread_exit_handler(nxt_task_
+ nxt_event_engine_t *engine;
+ nxt_thread_handle_t handle;
+
+- handle = (nxt_thread_handle_t) obj;
++ handle = (nxt_thread_handle_t)(uintptr_t) obj;
+ link = data;
+
+ nxt_thread_wait(handle);
Index: pkgsrc/www/unit/patches/patch-src_nxt__unit.c
diff -u /dev/null pkgsrc/www/unit/patches/patch-src_nxt__unit.c:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/patches/patch-src_nxt__unit.c Sun Feb 14 11:56:57 2021
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_nxt__unit.c,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+Use more apropriate format specifier for shm prefix.
+
+This patch is going to be reviewed by the vendor.
+
+--- src/nxt_unit.c.orig 2020-11-19 18:12:30.000000000 +0000
++++ src/nxt_unit.c
+@@ -3762,8 +3762,8 @@ nxt_unit_shm_open(nxt_unit_ctx_t *ctx, s
+ #if (NXT_HAVE_MEMFD_CREATE || NXT_HAVE_SHM_OPEN)
+ char name[64];
+
+- snprintf(name, sizeof(name), NXT_SHM_PREFIX "unit.%d.%p",
+- lib->pid, (void *) pthread_self());
++ snprintf(name, sizeof(name), NXT_SHM_PREFIX "unit.%d.%p",
++ lib->pid, (void *) (uintptr_t)pthread_self());
+ #endif
+
+ #if (NXT_HAVE_MEMFD_CREATE)
Index: pkgsrc/www/unit/patches/patch-src_nxt__unix.h
diff -u /dev/null pkgsrc/www/unit/patches/patch-src_nxt__unix.h:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/patches/patch-src_nxt__unix.h Sun Feb 14 11:56:57 2021
@@ -0,0 +1,30 @@
+$NetBSD: patch-src_nxt__unix.h,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+Move _XOPEN_SOURCE to CFLAGS
+
+--- src/nxt_unix.h.orig 2020-11-19 18:12:30.000000000 +0000
++++ src/nxt_unix.h
+@@ -71,23 +71,6 @@
+ #define _POSIX_PTHREAD_SEMANTICS /* 2 arguments in sigwait(). */
+ #endif
+
+-/*
+- * Solaris provides two sockets API:
+- *
+- * 1) 4.3BSD sockets (int instead of socklen_t in accept(), etc.;
+- * struct msghdr.msg_accrights) in libsocket;
+- * 2) X/Open sockets (socklen_t, struct msghdr.msg_control) with __xnet_
+- * function name prefix in libxnet and libsocket.
+- */
+-
+-/* Enable X/Open sockets API. */
+-#define _XOPEN_SOURCE
+-#define _XOPEN_SOURCE_EXTENDED 1
+-/* Enable Solaris extensions disabled by _XOPEN_SOURCE. */
+-#ifndef __EXTENSIONS__
+-#define __EXTENSIONS__
+-#endif
+-
+ #endif /* NXT_SOLARIS */
+
+
Index: pkgsrc/www/unit/patches/patch-src_nxt__websocket__header.h
diff -u /dev/null pkgsrc/www/unit/patches/patch-src_nxt__websocket__header.h:1.1
--- /dev/null Sun Feb 14 11:56:58 2021
+++ pkgsrc/www/unit/patches/patch-src_nxt__websocket__header.h Sun Feb 14 11:56:57 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_nxt__websocket__header.h,v 1.1 2021/02/14 11:56:57 otis Exp $
+
+Include endian.h for endianness test to work.
+
+--- src/nxt_websocket_header.h.orig 2020-10-08 16:04:40.000000000 +0000
++++ src/nxt_websocket_header.h
+@@ -6,6 +6,7 @@
+ #ifndef _NXT_WEBSOCKET_HEADER_H_INCLUDED_
+ #define _NXT_WEBSOCKET_HEADER_H_INCLUDED_
+
++#include <endian.h>
+ #include <netinet/in.h>
+
+
Home |
Main Index |
Thread Index |
Old Index