summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/mosquitto')
-rw-r--r--app-misc/mosquitto/Manifest4
-rw-r--r--app-misc/mosquitto/files/mosquitto.notify.service15
-rw-r--r--app-misc/mosquitto/files/mosquitto.service12
-rw-r--r--app-misc/mosquitto/metadata.xml4
-rw-r--r--app-misc/mosquitto/mosquitto-1.6.8.ebuild114
-rw-r--r--app-misc/mosquitto/mosquitto-1.6.9.ebuild114
-rw-r--r--app-misc/mosquitto/mosquitto-2.0.18.ebuild (renamed from app-misc/mosquitto/mosquitto-1.6.10.ebuild)90
7 files changed, 73 insertions, 280 deletions
diff --git a/app-misc/mosquitto/Manifest b/app-misc/mosquitto/Manifest
index 03eb2b2d7e9f..b32d0c372120 100644
--- a/app-misc/mosquitto/Manifest
+++ b/app-misc/mosquitto/Manifest
@@ -1,3 +1 @@
-DIST mosquitto-1.6.10.tar.gz 613060 BLAKE2B 8c148479f79a1aa8a9abdb2bd386dbf9466f1afa41f4e0ed4d29a52adf7571ebca47231f32ec8cbf2760eb7a27bd6633985851fe4c8cb413572c32588a12097b SHA512 2050a7a7af864057a177728f1cab9f6db70d6d1ea609d90c637723c2c9cfc9716429739302abd6742bde932716fae340854fff35956693dfee4ef31ce7b04a25
-DIST mosquitto-1.6.8.tar.gz 589873 BLAKE2B aa2e13397f7d4b6305af3180cd042cd143054e154cf8e6d93b05bc5a10d48419174711a1893fe60c1303a2f83cfbc5341cf03ec595e3640f503a2407e869491b SHA512 c15897df4e0979ee29a1e67cc671f56db600a078e9eb0bea376248b3f53b13ceed36616ad3678e2c9e07d6834a6d75e4efca2c40086069c1546e0223be04c071
-DIST mosquitto-1.6.9.tar.gz 610934 BLAKE2B 59d126a2b26be895f078be0c0dcf3513e56fc135dc956d9361ee191bd7ad6972b4692cd1824ad7a4e86a982df70c1e198e937f9ab23bf778069690098f87c815 SHA512 f78228a1e8305e4d89b34250981ed2c5fe5317636003636dc90f6fa2b1e3ca3c8fadb705ee7301f5252456cb093a6547bd46a255ca3d9fb5cdced697738d6eb7
+DIST mosquitto-2.0.18.tar.gz 796351 BLAKE2B 6e1d8078ee2813870d79489f312857a12614dc8f1fa3c72269ab29555897ec61d7ba54fcb5e5383f8e852cdb6fffa1d7cb2003ce15da12b986989a6187a186a0 SHA512 63f7e2811964bab5856848e6918627c47afc6534ff60aad5ece3d2fa330b407c9df14027610826e343ee68ff7d8d5d93f2459713061251ded478c42766946767
diff --git a/app-misc/mosquitto/files/mosquitto.notify.service b/app-misc/mosquitto/files/mosquitto.notify.service
new file mode 100644
index 000000000000..5cbce2151e9d
--- /dev/null
+++ b/app-misc/mosquitto/files/mosquitto.notify.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Mosquitto MQTT Broker
+Documentation=man:mosquitto.conf(5) man:mosquitto(8)
+After=network.target
+Wants=network.target
+
+[Service]
+Type=notify
+NotifyAccess=main
+ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-misc/mosquitto/files/mosquitto.service b/app-misc/mosquitto/files/mosquitto.service
deleted file mode 100644
index ebdc28e3448a..000000000000
--- a/app-misc/mosquitto/files/mosquitto.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Mosquitto MQTT Broker daemon
-ConditionPathExists=/etc/mosquitto/mosquitto.conf
-Requires=network.target
-
-[Service]
-Type=simple
-ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
diff --git a/app-misc/mosquitto/metadata.xml b/app-misc/mosquitto/metadata.xml
index 029cf18b51fd..d76f40c1bea8 100644
--- a/app-misc/mosquitto/metadata.xml
+++ b/app-misc/mosquitto/metadata.xml
@@ -1,5 +1,5 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>mattst88@gentoo.org</email>
diff --git a/app-misc/mosquitto/mosquitto-1.6.8.ebuild b/app-misc/mosquitto/mosquitto-1.6.8.ebuild
deleted file mode 100644
index 491f0ca1ecce..000000000000
--- a/app-misc/mosquitto/mosquitto-1.6.8.ebuild
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-inherit python-any-r1 systemd toolchain-funcs
-
-DESCRIPTION="An Open Source MQTT v3 Broker"
-HOMEPAGE="https://mosquitto.org/"
-SRC_URI="https://mosquitto.org/files/source/${P}.tar.gz"
-
-LICENSE="EPL-1.0"
-SLOT="0"
-KEYWORDS="amd64 arm x86"
-IUSE="bridge examples libressl +persistence +srv ssl tcpd test websockets"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="test? ( bridge )"
-
-RDEPEND="
- acct-user/mosquitto
- acct-group/mosquitto
- srv? ( net-dns/c-ares:= )
- ssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- tcpd? ( sys-apps/tcp-wrappers )"
-
-DEPEND="${PYTHON_DEPS}
- ${RDEPEND}
- test? ( dev-util/cunit )
- websockets? ( net-libs/libwebsockets[lejp] )"
-
-_emake() {
- local LIBDIR=$(get_libdir)
- emake \
- CC="$(tc-getCC)" \
- CLIENT_LDFLAGS="${LDFLAGS}" \
- LIB_SUFFIX="${LIBDIR:3}" \
- WITH_BRIDGE="$(usex bridge)" \
- WITH_PERSISTENCE="$(usex persistence)" \
- WITH_SRV="$(usex srv)" \
- WITH_TLS="$(usex ssl)" \
- WITH_WEBSOCKETS="$(usex websockets)" \
- WITH_WRAP="$(usex tcpd)" \
- "$@"
-}
-
-src_prepare() {
- default
- if use persistence; then
- sed -i -e "/^#autosave_interval/s|^#||" \
- -e "s|^#persistence false$|persistence true|" \
- -e "/^#persistence_file/s|^#||" \
- -e "s|#persistence_location|persistence_location /var/lib/mosquitto/|" \
- mosquitto.conf || die
- fi
-
- # Remove prestripping
- sed -i -e 's/-s --strip-program=${CROSS_COMPILE}${STRIP}//'\
- client/Makefile lib/cpp/Makefile src/Makefile lib/Makefile || die
-
- # Remove failing tests
- sed -i -e '/02-subpub-qos1-bad-pubcomp.py/d' \
- -e '/02-subpub-qos1-bad-pubrec.py/d' \
- -e '/02-subpub-qos2-bad-puback-1.py/d' \
- -e '/02-subpub-qos2-bad-puback-2.py/d' \
- -e '/02-subpub-qos2-bad-pubcomp.py/d' \
- test/broker/Makefile || die
- sed -i -e '/02-subscribe-qos1-async2.test/d' \
- test/lib/Makefile || die
-
- python_setup
- python_fix_shebang test
-}
-
-src_compile() {
- _emake
-}
-
-src_test() {
- _emake test
-}
-
-src_install() {
- _emake DESTDIR="${D}" prefix=/usr install
- keepdir /var/lib/mosquitto
- fowners mosquitto:mosquitto /var/lib/mosquitto
- dodoc readme.md CONTRIBUTING.md ChangeLog.txt
- doinitd "${FILESDIR}"/mosquitto
- insinto /etc/mosquitto
- doins mosquitto.conf
- systemd_dounit "${FILESDIR}/mosquitto.service"
-
- if use examples; then
- docompress -x "/usr/share/doc/${PF}/examples"
- dodoc -r examples
- fi
-}
-
-pkg_postinst() {
- if [[ -z "${REPLACING_VERSIONS}" ]]; then
- elog "The Python module has been moved out of mosquitto."
- elog "See https://mosquitto.org/documentation/python/"
- else
- elog "To start the mosquitto daemon at boot, add it to the default runlevel with:"
- elog ""
- elog " rc-update add mosquitto default"
- elog "or"
- elog " systemctl enable mosquitto"
- fi
-}
diff --git a/app-misc/mosquitto/mosquitto-1.6.9.ebuild b/app-misc/mosquitto/mosquitto-1.6.9.ebuild
deleted file mode 100644
index 4b5abada49c6..000000000000
--- a/app-misc/mosquitto/mosquitto-1.6.9.ebuild
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-inherit python-any-r1 systemd toolchain-funcs
-
-DESCRIPTION="An Open Source MQTT v3 Broker"
-HOMEPAGE="https://mosquitto.org/ https://github.com/eclipse/mosquitto"
-SRC_URI="https://mosquitto.org/files/source/${P}.tar.gz"
-
-LICENSE="EPL-1.0"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86"
-IUSE="bridge examples libressl +persistence +srv ssl tcpd test websockets"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="test? ( bridge )"
-
-RDEPEND="
- acct-user/mosquitto
- acct-group/mosquitto
- srv? ( net-dns/c-ares:= )
- ssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- tcpd? ( sys-apps/tcp-wrappers )"
-
-DEPEND="${PYTHON_DEPS}
- ${RDEPEND}
- test? ( dev-util/cunit )
- websockets? ( net-libs/libwebsockets[lejp] )"
-
-_emake() {
- local LIBDIR=$(get_libdir)
- emake \
- CC="$(tc-getCC)" \
- CLIENT_LDFLAGS="${LDFLAGS}" \
- LIB_SUFFIX="${LIBDIR:3}" \
- WITH_BRIDGE="$(usex bridge)" \
- WITH_PERSISTENCE="$(usex persistence)" \
- WITH_SRV="$(usex srv)" \
- WITH_TLS="$(usex ssl)" \
- WITH_WEBSOCKETS="$(usex websockets)" \
- WITH_WRAP="$(usex tcpd)" \
- "$@"
-}
-
-src_prepare() {
- default
- if use persistence; then
- sed -i -e "/^#autosave_interval/s|^#||" \
- -e "s|^#persistence false$|persistence true|" \
- -e "/^#persistence_file/s|^#||" \
- -e "s|#persistence_location|persistence_location /var/lib/mosquitto/|" \
- mosquitto.conf || die
- fi
-
- # Remove prestripping
- sed -i -e 's/-s --strip-program=${CROSS_COMPILE}${STRIP}//'\
- client/Makefile lib/cpp/Makefile src/Makefile lib/Makefile || die
-
- # Remove failing tests
- sed -i -e '/02-subpub-qos1-bad-pubcomp.py/d' \
- -e '/02-subpub-qos1-bad-pubrec.py/d' \
- -e '/02-subpub-qos2-bad-puback-1.py/d' \
- -e '/02-subpub-qos2-bad-puback-2.py/d' \
- -e '/02-subpub-qos2-bad-pubcomp.py/d' \
- test/broker/Makefile || die
- sed -i -e '/02-subscribe-qos1-async2.test/d' \
- test/lib/Makefile || die
-
- python_setup
- python_fix_shebang test
-}
-
-src_compile() {
- _emake
-}
-
-src_test() {
- _emake test
-}
-
-src_install() {
- _emake DESTDIR="${D}" prefix=/usr install
- keepdir /var/lib/mosquitto
- fowners mosquitto:mosquitto /var/lib/mosquitto
- dodoc readme.md CONTRIBUTING.md ChangeLog.txt
- doinitd "${FILESDIR}"/mosquitto
- insinto /etc/mosquitto
- doins mosquitto.conf
- systemd_dounit "${FILESDIR}/mosquitto.service"
-
- if use examples; then
- docompress -x "/usr/share/doc/${PF}/examples"
- dodoc -r examples
- fi
-}
-
-pkg_postinst() {
- if [[ -z "${REPLACING_VERSIONS}" ]]; then
- elog "The Python module has been moved out of mosquitto."
- elog "See https://mosquitto.org/documentation/python/"
- else
- elog "To start the mosquitto daemon at boot, add it to the default runlevel with:"
- elog ""
- elog " rc-update add mosquitto default"
- elog "or"
- elog " systemctl enable mosquitto"
- fi
-}
diff --git a/app-misc/mosquitto/mosquitto-1.6.10.ebuild b/app-misc/mosquitto/mosquitto-2.0.18.ebuild
index 63ca564833ad..2e9ac3251f32 100644
--- a/app-misc/mosquitto/mosquitto-1.6.10.ebuild
+++ b/app-misc/mosquitto/mosquitto-2.0.18.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
+EAPI=8
+PYTHON_COMPAT=( python3_{10..12} )
inherit python-any-r1 systemd toolchain-funcs
@@ -12,8 +12,8 @@ SRC_URI="https://mosquitto.org/files/source/${P}.tar.gz"
LICENSE="EPL-1.0"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-IUSE="bridge examples libressl +persistence +srv ssl tcpd test websockets"
+KEYWORDS="amd64 arm ~arm64 x86"
+IUSE="+bridge examples +persistence +srv ssl systemd tcpd test websockets"
RESTRICT="!test? ( test )"
REQUIRED_USE="test? ( bridge )"
@@ -21,27 +21,45 @@ REQUIRED_USE="test? ( bridge )"
RDEPEND="
acct-user/mosquitto
acct-group/mosquitto
+ dev-libs/cJSON
srv? ( net-dns/c-ares:= )
ssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
+ dev-libs/openssl:0=
)
- tcpd? ( sys-apps/tcp-wrappers )"
-
-DEPEND="${PYTHON_DEPS}
+ systemd? ( sys-apps/systemd:= )
+ tcpd? ( sys-apps/tcp-wrappers )
+ websockets? ( net-libs/libwebsockets[lejp] )
+"
+DEPEND="
${RDEPEND}
test? ( dev-util/cunit )
- websockets? ( net-libs/libwebsockets[lejp] )"
+"
+BDEPEND="
+ test? (
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep 'dev-python/psutil[${PYTHON_USEDEP}]')
+ )
+"
+
+python_check_deps() {
+ python_has_version -b "dev-python/psutil[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ use test && python_setup
+}
_emake() {
local LIBDIR=$(get_libdir)
emake \
CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
CLIENT_LDFLAGS="${LDFLAGS}" \
LIB_SUFFIX="${LIBDIR:3}" \
WITH_BRIDGE="$(usex bridge)" \
WITH_PERSISTENCE="$(usex persistence)" \
WITH_SRV="$(usex srv)" \
+ WITH_SYSTEMD="$(usex systemd)" \
WITH_TLS="$(usex ssl)" \
WITH_WEBSOCKETS="$(usex websockets)" \
WITH_WRAP="$(usex tcpd)" \
@@ -58,22 +76,19 @@ src_prepare() {
mosquitto.conf || die
fi
- # Remove prestripping
- sed -i -e 's/-s --strip-program=${CROSS_COMPILE}${STRIP}//'\
- client/Makefile lib/cpp/Makefile src/Makefile lib/Makefile || die
-
# Remove failing tests
- sed -i -e '/02-subpub-qos1-bad-pubcomp.py/d' \
- -e '/02-subpub-qos1-bad-pubrec.py/d' \
- -e '/02-subpub-qos2-bad-puback-1.py/d' \
- -e '/02-subpub-qos2-bad-puback-2.py/d' \
- -e '/02-subpub-qos2-bad-pubcomp.py/d' \
+ sed -i \
+ -e '/06-bridge-reconnect-local-out.py/d' \
test/broker/Makefile || die
- sed -i -e '/02-subscribe-qos1-async2.test/d' \
+ sed -i \
+ -e '/02-subscribe-qos1-async2.test/d' \
test/lib/Makefile || die
- python_setup
- python_fix_shebang test
+ # Extend test timeout to prevent spurious failures
+ sed -i -e 's/SUB_TIMEOUT=1/SUB_TIMEOUT=3/' \
+ test/client/test.sh || die
+
+ use test && python_fix_shebang test
}
src_compile() {
@@ -88,11 +103,13 @@ src_install() {
_emake DESTDIR="${D}" prefix=/usr install
keepdir /var/lib/mosquitto
fowners mosquitto:mosquitto /var/lib/mosquitto
- dodoc readme.md CONTRIBUTING.md ChangeLog.txt
+ dodoc README.md CONTRIBUTING.md ChangeLog.txt
doinitd "${FILESDIR}"/mosquitto
insinto /etc/mosquitto
doins mosquitto.conf
- systemd_dounit "${FILESDIR}/mosquitto.service"
+ insinto /usr/share/mosquitto
+ doins misc/letsencrypt/mosquitto-copy.sh
+ systemd_newunit "${FILESDIR}/mosquitto.notify.service" mosquitto.service
if use examples; then
docompress -x "/usr/share/doc/${PF}/examples"
@@ -101,14 +118,17 @@ src_install() {
}
pkg_postinst() {
- if [[ -z "${REPLACING_VERSIONS}" ]]; then
- elog "The Python module has been moved out of mosquitto."
- elog "See https://mosquitto.org/documentation/python/"
- else
- elog "To start the mosquitto daemon at boot, add it to the default runlevel with:"
- elog ""
- elog " rc-update add mosquitto default"
- elog "or"
- elog " systemctl enable mosquitto"
- fi
+ for v in ${REPLACING_VERSIONS}; do
+ if [[ $(ver_cut 1 "$v") -lt 2 ]]; then
+ elog
+ elog "Please read the migration guide at:"
+ elog "https://mosquitto.org/documentation/migrating-to-2-0/"
+ elog
+ elog "If you use Lets Encrypt TLS certificates, take note of"
+ elog "the changes required to run the daemon as the unprivileged"
+ elog "mosquitto user. The mosquitto-copy.sh script has been"
+ elog "installed to /usr/share/mosquitto/ for your convenience."
+ elog
+ fi
+ done
}