mosquitto: Rototill config file patch

Rather than trying to not install the example config (which is not
named as an example), let it be, and add a section where upstream
choices inconsistent with traditional UNIX norms are adjusted, and add
a section for users of the package to put their changes.

Default to the openssl cert dir for ca_path, in the hopes that
mosquitto will use the system's configured trust anchor set.
This commit is contained in:
Greg Troxel 2019-07-03 20:08:23 -04:00
parent 3f82f1305c
commit 707296a04c
4 changed files with 21 additions and 24 deletions

View File

@ -1,7 +1,7 @@
# $NetBSD$
VERSION= 1.6.3
PKGREVISION= 3
PKGREVISION= 4
DISTNAME= mosquitto-${VERSION}
CATEGORIES= net
MASTER_SITES= https://mosquitto.org/files/source/
@ -33,10 +33,10 @@ CONF_FILES= ${PREFIX}/share/examples/mosquitto/mosquitto.conf \
${PKG_SYSCONFDIR}/mosquitto.conf
SUBST_CLASSES+= paths
SUBST_STAGE.paths= pre-configure
SUBST_STAGE.paths= post-patch
SUBST_MESSAGE.paths= Substituting paths
SUBST_FILES.paths= mosquitto.conf
SUBST_SED.paths= -e 's,@VAR_RUN@,/var/run,g'
SUBST_SED.paths= -e "s,@SSLCERTS@,${SSLCERTS},g"
RCD_SCRIPTS= mosquitto
FILES_SUBST+= MOSQUITTO_USER=${MOSQUITTO_USER}

View File

@ -4,8 +4,4 @@
* check and perhaps remove -lrt patch
* adjust config file to have unmodified preamble, section to modify
defaults to fit traditional UNIX norms, and then a section for user
config
* run the tests on make test

View File

@ -7,5 +7,5 @@ Size (mosquitto-1.6.3.tar.gz) = 578952 bytes
SHA1 (patch-CMakeLists.txt) = fb04da93970ccca17657021597b8311875473242
SHA1 (patch-lib_CMakeLists.txt) = cddb8803a759820c8059028f924b56c22689ee54
SHA1 (patch-lib_net__mosq.c) = a38294cdfea98f2da0879ea93373c5f04aebdb20
SHA1 (patch-mosquitto.conf) = 0adade307e11e32b84013fbad9a00ae6c3a90e0f
SHA1 (patch-mosquitto.conf) = 0ea671cfe3a332e9f0027b2410b212797fc1db17
SHA1 (patch-src_CMakeLists.txt) = 2346ee3f13ab7f7e2c34492a4271e0b1adcae4fb

View File

@ -2,23 +2,24 @@ $NetBSD$
Log to syslog, instead of (perhaps) not logging.
Set a pid_file for use by rc.d/mosquitto.
\todo Figure out what happens if port is not defined, and why we set it.
\todo Think about pidfile; because this can be run in various modes
that seems like it should perhaps be command-line, not config.
--- mosquitto.conf.orig 2019-06-18 11:45:59.000000000 +0000
+++ mosquitto.conf
@@ -159,6 +159,7 @@
# being run automatically on boot with an init script and
# start-stop-daemon or similar.
#pid_file
+pid_file @VAR_RUN@/mosquitto/mosquitto.pid
# Set to true to queue messages with QoS 0 when a persistent client is
# disconnected. These messages are included in the limit imposed by
@@ -586,6 +587,7 @@
# "log_dest none" and neither stdout nor stderr logging is available.
# Use "log_dest none" if you wish to disable logging.
#log_dest stderr
@@ -986,3 +986,13 @@
# given multiple times, all of the files from the first instance will be
# processed before the next instance. See the man page for examples.
#include_dir
+
+### PKGSRC ADJUSTMENTS FOR TRADITIONAL UNIX NORMS
+
+pid_file /var/run/mosquitto/mosquitto.pid
+
+log_dest syslog
# Types of messages to log. Use multiple log_type lines for logging
# multiple types of messages.
+
+capath @SSLCERTS@
+
+### LOCAL CONFIGURATION