summaryrefslogtreecommitdiff
path: root/user/mosquitto
diff options
context:
space:
mode:
Diffstat (limited to 'user/mosquitto')
-rw-r--r--user/mosquitto/APKBUILD12
-rw-r--r--user/mosquitto/endian.patch34
-rw-r--r--user/mosquitto/no-persist_read_test.patch2
-rw-r--r--user/mosquitto/openrc-conf.patch4
4 files changed, 27 insertions, 25 deletions
diff --git a/user/mosquitto/APKBUILD b/user/mosquitto/APKBUILD
index 4b7f6f06b..7df72e307 100644
--- a/user/mosquitto/APKBUILD
+++ b/user/mosquitto/APKBUILD
@@ -2,14 +2,14 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=mosquitto
-pkgver=2.0.15
+pkgver=2.0.22
pkgrel=0
pkgdesc="An Open Source MQTT Broker"
url="https://mosquitto.org/"
arch="all"
license="EPL-1.0 AND EDL-1.0 AND MIT AND BSD-3-Clause"
depends=""
-checkdepends="python3 ca-certificates cunit-dev"
+checkdepends="python3 ca-certificates cunit-dev py3-psutil"
makedepends="c-ares-dev openssl-dev util-linux-dev cjson-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-openrc
$pkgname-clients"
@@ -91,8 +91,8 @@ clients() {
mv "$pkgdir"/usr/bin/mosquitto_[ps]ub "$subpkgdir"/usr/bin/
}
-sha512sums="8a0c58222ea0b9304e7f096f6d13965478072baf1d1c9bc931b32a33f5ea8196c2dd54bde8d83fec7ed9cd413cb5fb115ce0a6701ca20664df52fdd7ca63ddaf mosquitto-2.0.15.tar.gz
+sha512sums="5aae399b308d8262a758a72064c613bfd6930e1a54f34939e30454d988c65c9d7c4c139ed70a016baa1264a0100a0c842c00e843ffe3ef83f90be440403e7482 mosquitto-2.0.22.tar.gz
681fddc737b3ef3e6c052f0c854a730df290352640a18a63e23ef83d14c425558aff87805d1eb95e44de101b5df48872173af9f5414464ffa8cf727ea2c0491e mosquitto.initd
-b07f9bec2751ab32c43f53e74d8fca18dbf2d7ce7f8fab562dbcf75de19609ba6219d735ac504697404e0ed36613a14074e3a19e735297195877798f778d337a openrc-conf.patch
-89f738f77732500bc2aff3086b891c1e537510e756baf0ac92c1462c2ef7e47cdc62536d90174e6b6c80637199e463609723f9915999c0b95ce878ebbed739a1 endian.patch
-b173f11e898bf2d882b7d833f99c863dc1fd14ee6f55484c29dafd067fa1af27ab85864df674c0a042547c5c132b80123d159f10e7bdab316a0292461b91fafd no-persist_read_test.patch"
+d564b5887a242257de56df1f6d1cad03f3627ee79a56e892dd35cb305262c83b9518a1998f8787a2459f81a97cdf8606c1a1a0f184513158f6378d3950d266cb openrc-conf.patch
+1e4687d5739af04ca1f952cb83febf7a7fbc9bbe6d0dcff8822e268c423ae17be4a917e3e88cd7730bd8a2e4c04ddf15b95f65f89352ee8dd1ab5a8db41b9eb9 endian.patch
+5c920f478a4bce31d442428349d69cda35939050332801264a911a31066489472c63959241395599b5a91ae7da70655c175cc2fe5a75d436da63074a7bb38ecd no-persist_read_test.patch"
diff --git a/user/mosquitto/endian.patch b/user/mosquitto/endian.patch
index 2efd1111d..9a19748ad 100644
--- a/user/mosquitto/endian.patch
+++ b/user/mosquitto/endian.patch
@@ -40,12 +40,12 @@ index 7460c309..701d88d9 100644
@@ -24,6 +24,7 @@ Contributors:
#include <arpa/inet.h>
#endif
- #include <assert.h>
+#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
-@@ -108,6 +109,7 @@ int persist__chunk_client_msg_read_v234(FILE *db_fptr, struct P_client_msg *chun
+ #include <string.h>
+@@ -107,6 +108,7 @@ int persist__chunk_client_msg_read_v234(FILE *db_fptr, struct P_client_msg *chun
}
read_e(db_fptr, &chunk->F.store_id, sizeof(dbid_t));
@@ -53,7 +53,7 @@ index 7460c309..701d88d9 100644
read_e(db_fptr, &i16temp, sizeof(uint16_t));
chunk->F.mid = ntohs(i16temp);
-@@ -137,6 +139,7 @@ int persist__chunk_msg_store_read_v234(FILE *db_fptr, struct P_msg_store *chunk,
+@@ -136,6 +138,7 @@ int persist__chunk_msg_store_read_v234(FILE *db_fptr, struct P_msg_store *chunk,
char *err;
read_e(db_fptr, &chunk->F.store_id, sizeof(dbid_t));
@@ -61,7 +61,7 @@ index 7460c309..701d88d9 100644
rc = persist__read_string(db_fptr, &chunk->source.id);
if(rc){
-@@ -205,7 +208,7 @@ int persist__chunk_retain_read_v234(FILE *db_fptr, struct P_retain *chunk)
+@@ -204,7 +207,7 @@ int persist__chunk_retain_read_v234(FILE *db_fptr, struct P_retain *chunk)
log__printf(NULL, MOSQ_LOG_ERR, "Error: %s.", err);
return 1;
}
@@ -77,12 +77,12 @@ index abc9a580..12d3e801 100644
@@ -24,6 +24,7 @@ Contributors:
#include <arpa/inet.h>
#endif
- #include <assert.h>
+#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
-@@ -116,6 +117,7 @@ int persist__chunk_client_msg_read_v56(FILE *db_fptr, struct P_client_msg *chunk
+ #include <string.h>
+@@ -115,6 +116,7 @@ int persist__chunk_client_msg_read_v56(FILE *db_fptr, struct P_client_msg *chunk
read_e(db_fptr, &chunk->F, sizeof(struct PF_client_msg));
chunk->F.mid = ntohs(chunk->F.mid);
chunk->F.id_len = ntohs(chunk->F.id_len);
@@ -90,7 +90,7 @@ index abc9a580..12d3e801 100644
length -= (uint32_t)(sizeof(struct PF_client_msg) + chunk->F.id_len);
-@@ -165,6 +167,7 @@ int persist__chunk_msg_store_read_v56(FILE *db_fptr, struct P_msg_store *chunk,
+@@ -164,6 +166,7 @@ int persist__chunk_msg_store_read_v56(FILE *db_fptr, struct P_msg_store *chunk,
chunk->F.source_username_len = ntohs(chunk->F.source_username_len);
chunk->F.topic_len = ntohs(chunk->F.topic_len);
chunk->F.source_port = ntohs(chunk->F.source_port);
@@ -98,7 +98,7 @@ index abc9a580..12d3e801 100644
length -= (uint32_t)(sizeof(struct PF_msg_store) + chunk->F.payloadlen + chunk->F.source_id_len + chunk->F.source_username_len + chunk->F.topic_len);
-@@ -246,6 +249,7 @@ int persist__chunk_retain_read_v56(FILE *db_fptr, struct P_retain *chunk)
+@@ -245,6 +248,7 @@ int persist__chunk_retain_read_v56(FILE *db_fptr, struct P_retain *chunk)
log__printf(NULL, MOSQ_LOG_ERR, "Error: %s.", strerror(errno));
return 1;
}
@@ -110,16 +110,16 @@ diff --git a/src/persist_write.c b/src/persist_write.c
index ccfbc29c..93a32639 100644
--- a/src/persist_write.c
+++ b/src/persist_write.c
-@@ -273,7 +273,7 @@ static int persist__retain_save(FILE *db_fptr, struct mosquitto__retainhier *nod
-
- if(node->retained && strncmp(node->retained->topic, "$SYS", 4)){
+@@ -291,7 +291,7 @@ static int persist__retain_save(FILE *db_fptr, struct mosquitto__retainhier *nod
/* Don't save $SYS messages. */
+ memset(&retain_chunk, 0, sizeof(struct P_retain));
+
- retain_chunk.F.store_id = node->retained->db_id;
+ retain_chunk.F.store_id = htole64(node->retained->db_id);
rc = persist__chunk_retain_write_v6(db_fptr, &retain_chunk);
if(rc){
return rc;
-@@ -367,7 +367,7 @@ int persist__backup(bool shutdown)
+@@ -385,7 +385,7 @@ int persist__backup(bool shutdown)
write_e(db_fptr, &db_version_w, sizeof(uint32_t));
memset(&cfg_chunk, 0, sizeof(struct PF_cfg));
@@ -135,12 +135,12 @@ index 8c9f6c34..b9fb5a8e 100644
@@ -24,6 +24,7 @@ Contributors:
#include <arpa/inet.h>
#endif
- #include <assert.h>
+#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
-@@ -100,6 +101,7 @@ int persist__chunk_client_msg_write_v6(FILE *db_fptr, struct P_client_msg *chunk
+ #include <string.h>
+@@ -99,6 +100,7 @@ int persist__chunk_client_msg_write_v6(FILE *db_fptr, struct P_client_msg *chunk
chunk->F.mid = htons(chunk->F.mid);
chunk->F.id_len = htons(chunk->F.id_len);
@@ -148,7 +148,7 @@ index 8c9f6c34..b9fb5a8e 100644
header.chunk = htonl(DB_CHUNK_CLIENT_MSG);
header.length = htonl((uint32_t)sizeof(struct PF_client_msg) + id_len + proplen);
-@@ -149,6 +151,7 @@ int persist__chunk_message_store_write_v6(FILE *db_fptr, struct P_msg_store *chu
+@@ -148,6 +150,7 @@ int persist__chunk_message_store_write_v6(FILE *db_fptr, struct P_msg_store *chu
proplen += property__get_remaining_length(chunk->properties);
}
@@ -156,7 +156,7 @@ index 8c9f6c34..b9fb5a8e 100644
chunk->F.payloadlen = htonl(chunk->F.payloadlen);
chunk->F.source_mid = htons(chunk->F.source_mid);
chunk->F.source_id_len = htons(chunk->F.source_id_len);
-@@ -206,6 +209,7 @@ int persist__chunk_retain_write_v6(FILE *db_fptr, struct P_retain *chunk)
+@@ -205,6 +208,7 @@ int persist__chunk_retain_write_v6(FILE *db_fptr, struct P_retain *chunk)
header.chunk = htonl(DB_CHUNK_RETAIN);
header.length = htonl((uint32_t)sizeof(struct PF_retain));
@@ -167,3 +167,5 @@ index 8c9f6c34..b9fb5a8e 100644
--
2.35.1
+--- mosquitto-2.0.22/src/persist_write.c.old 2025-08-12 10:10:49.824308365 +0000
++++ mosquitto-2.0.22/src/persist_write.c 2025-08-12 10:11:42.938672118 +0000
diff --git a/user/mosquitto/no-persist_read_test.patch b/user/mosquitto/no-persist_read_test.patch
index 6227e0487..3596ed855 100644
--- a/user/mosquitto/no-persist_read_test.patch
+++ b/user/mosquitto/no-persist_read_test.patch
@@ -5,7 +5,7 @@ We disable these tests for now.
--- mosquitto-2.0.14/test/unit/Makefile.old 2021-11-16 18:28:35.000000000 -0600
+++ mosquitto-2.0.14/test/unit/Makefile 2022-11-22 00:37:32.237485238 -0600
-@@ -174,7 +174,5 @@
+@@ -184,7 +184,5 @@
test-broker : build
./bridge_topic_test
diff --git a/user/mosquitto/openrc-conf.patch b/user/mosquitto/openrc-conf.patch
index d1c5ee04b..095aa1c70 100644
--- a/user/mosquitto/openrc-conf.patch
+++ b/user/mosquitto/openrc-conf.patch
@@ -1,6 +1,6 @@
--- mosquitto-1.6.4/mosquitto.conf 2019-08-01 14:50:01.000000000 -0500
+++ mosquitto-1.6.4/mosquitto.conf 2019-08-27 18:16:52.290542736 -0500
-@@ -158,7 +158,7 @@
+@@ -167,7 +167,7 @@
# This should be set to /var/run/mosquitto.pid if mosquitto is
# being run automatically on boot with an init script and
# start-stop-daemon or similar.
@@ -9,7 +9,7 @@
# Set to true to queue messages with QoS 0 when a persistent client is
# disconnected. These messages are included in the limit imposed by
-@@ -585,7 +585,7 @@
+@@ -469,7 +469,7 @@
# Note that if the broker is running as a Windows service it will default to
# "log_dest none" and neither stdout nor stderr logging is available.
# Use "log_dest none" if you wish to disable logging.