diff options
Diffstat (limited to 'app-misc/mosquitto')
-rw-r--r-- | app-misc/mosquitto/Manifest | 3 | ||||
-rw-r--r-- | app-misc/mosquitto/files/mosquitto.notify.service | 15 | ||||
-rw-r--r-- | app-misc/mosquitto/files/mosquitto.service | 12 | ||||
-rw-r--r-- | app-misc/mosquitto/metadata.xml | 15 | ||||
-rw-r--r-- | app-misc/mosquitto/mosquitto-1.5.6.ebuild | 106 | ||||
-rw-r--r-- | app-misc/mosquitto/mosquitto-1.6.7.ebuild | 110 | ||||
-rw-r--r-- | app-misc/mosquitto/mosquitto-2.0.18.ebuild | 134 |
7 files changed, 157 insertions, 238 deletions
diff --git a/app-misc/mosquitto/Manifest b/app-misc/mosquitto/Manifest index 84e48c74f074..b32d0c372120 100644 --- a/app-misc/mosquitto/Manifest +++ b/app-misc/mosquitto/Manifest @@ -1,2 +1 @@ -DIST mosquitto-1.5.6.tar.gz 439402 BLAKE2B 7d887d7d2e02d9891613d441c76705c40744cd8c7acae330648e5a00560b4ba1fbc28b92ac84bf85d423c84de875c5309f364d04fca72516ab2276fe42512b0c SHA512 99bd935f93ae25f0c7992870780cce4748b35ffd58fd0d39e20ee69f34c28d3eac289cf0c7dec078dbdced3bda12da4569d4b5e84ebdaa5514640f331ca3238b -DIST mosquitto-1.6.7.tar.gz 591062 BLAKE2B a215e311197fd84f1fa1ff0b681c8d1157db1a3e538a5a16afa1f11d17a08a720d44ae16b306cb08d6b585c8c4d4b2e38df972ceebc4634c727f4c8e0994c170 SHA512 0a75cf192483053ce78c6d9e3be158bdf66366d7731a68cf29e24731f6936027af1d86045c2b973f642e42e58efa033dbfd17842e3e95550bac4c1f44ab346e9 +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 ec6718456c6e..d76f40c1bea8 100644 --- a/app-misc/mosquitto/metadata.xml +++ b/app-misc/mosquitto/metadata.xml @@ -1,13 +1,9 @@ -<?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>ramage.lucas@protonmail.com</email> - <name>Lucas Ramage</name> - </maintainer> - <maintainer type="project"> - <email>proxy-maint@gentoo.org</email> - <name>Proxy Maintainers</name> + <email>mattst88@gentoo.org</email> + <name>Matt Turner</name> </maintainer> <use> <flag name="bridge">Enable bridge support in the MQTT broker.</flag> @@ -15,4 +11,7 @@ <flag name="srv">Include SRV lookup support.</flag> <flag name="websockets">Support the WebSocket protocol.</flag> </use> + <upstream> + <remote-id type="github">eclipse/mosquitto</remote-id> + </upstream> </pkgmetadata> diff --git a/app-misc/mosquitto/mosquitto-1.5.6.ebuild b/app-misc/mosquitto/mosquitto-1.5.6.ebuild deleted file mode 100644 index 6f319fe32b3b..000000000000 --- a/app-misc/mosquitto/mosquitto-1.5.6.ebuild +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python2_7 ) - -inherit systemd user toolchain-funcs python-any-r1 - -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" - -REQUIRED_USE=" - test? ( bridge ) -" - -RDEPEND="tcpd? ( sys-apps/tcp-wrappers ) - srv? ( net-dns/c-ares ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - )" -DEPEND="${RDEPEND} - ${PYTHON_DEPS} - websockets? ( net-libs/libwebsockets )" - -_emake() { - LIBDIR=$(get_libdir) - emake \ - CC="$(tc-getCC)" \ - 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)" \ - "$@" -} - -pkg_setup() { - enewgroup mosquitto - enewuser mosquitto -1 -1 -1 mosquitto -} - -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 - - python_setup - rm test/{broker,lib}/ptest.py || die - 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" - docinto "/usr/share/doc/${PF}" - doins -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.7.ebuild b/app-misc/mosquitto/mosquitto-1.6.7.ebuild deleted file mode 100644 index 7a43de2971cf..000000000000 --- a/app-misc/mosquitto/mosquitto-1.6.7.ebuild +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{6,7} ) - -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 +persistence +srv ssl tcpd test websockets" - -REQUIRED_USE="test? ( bridge )" - -RDEPEND=" - acct-user/mosquitto - acct-group/mosquitto - srv? ( net-dns/c-ares:= ) - ssl? ( dev-libs/openssl:0= ) - tcpd? ( sys-apps/tcp-wrappers )" - -DEPEND="${PYTHON_DEPS} - ${RDEPEND} - test? ( dev-util/cunit ) - websockets? ( net-libs/libwebsockets )" - -_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-2.0.18.ebuild b/app-misc/mosquitto/mosquitto-2.0.18.ebuild new file mode 100644 index 000000000000..2e9ac3251f32 --- /dev/null +++ b/app-misc/mosquitto/mosquitto-2.0.18.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..12} ) + +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 ~arm64 x86" +IUSE="+bridge examples +persistence +srv ssl systemd tcpd test websockets" +RESTRICT="!test? ( test )" + +REQUIRED_USE="test? ( bridge )" + +RDEPEND=" + acct-user/mosquitto + acct-group/mosquitto + dev-libs/cJSON + srv? ( net-dns/c-ares:= ) + ssl? ( + dev-libs/openssl:0= + ) + systemd? ( sys-apps/systemd:= ) + tcpd? ( sys-apps/tcp-wrappers ) + websockets? ( net-libs/libwebsockets[lejp] ) +" +DEPEND=" + ${RDEPEND} + test? ( dev-util/cunit ) +" +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)" \ + "$@" +} + +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 failing tests + sed -i \ + -e '/06-bridge-reconnect-local-out.py/d' \ + test/broker/Makefile || die + sed -i \ + -e '/02-subscribe-qos1-async2.test/d' \ + test/lib/Makefile || die + + # 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() { + _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 + 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" + dodoc -r examples + fi +} + +pkg_postinst() { + 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 +} |