Page 1 of 2

Upgrade Mosquitto.. how?

Posted: Thu May 21, 2020 10:09 am
by ilgrank2
Hello!
I've seen the version of mosquitto that comes with DietPi is rather old.. is there a way to upgrade it without breaking things?
Thanks :)

Re: Upgrade Mosquitto.. how?

Posted: Thu May 21, 2020 11:02 am
by Joulinar
Hi,

many thanks for your request. Mosquitto is installed from Debian package liste via apt. The currently available version is 1.5.7. And that's the version that is being installed by DietPi.

Code: Select all

[email protected]:~# apt list mosquitto
Listing... Done
mosquitto/stable,now 1.5.7-1+deb10u1 armhf [installed]
[email protected]:~#
https://packages.debian.org/search?keyw ... ection=all

Re: Upgrade Mosquitto.. how?

Posted: Thu May 21, 2020 12:46 pm
by ilgrank2
well.. not in my case at least: (output of dietpi-update follows)

Code: Select all

[  OK  ] DietPi-Update | No update required, your DietPi installation is already up to date:
[ INFO ] DietPi-Update | Current version : v6.30.0
[ INFO ] DietPi-Update | Latest version  : v6.30.0
[email protected]:~# apt list mosquitto
Listing... Done
mosquitto/oldstable,oldstable,now 1.4.10-3+deb9u4 amd64 [installed]
[email protected]:~#
and doind an

Code: Select all

apt update
followed by an

Code: Select all

apt list --upgradable
does list serveral packages, but among them there is not Mosquitto..

Re: Upgrade Mosquitto.. how?

Posted: Thu May 21, 2020 12:50 pm
by Joulinar
You are running debian stretch?

Re: Upgrade Mosquitto.. how?

Posted: Thu May 21, 2020 12:55 pm
by ilgrank2
well, yes

Code: Select all

[email protected]:~# cat /etc/issue
Debian GNU/Linux 9 \n \l
all that I did was installing Dietpi long ago and keeping upgrading it using dietpi-update, so I remained as Stretch since there seems to be no easy way of upgrading without breaking things.

so 1.4.10 seems to be the latest installable version under Stretch? (Apt upgrade mosquitto tells me I'm on latest)

Re: Upgrade Mosquitto.. how?

Posted: Thu May 21, 2020 1:09 pm
by Joulinar
Yes, if you continue running stretch that's the latest version available.

Re: Upgrade Mosquitto.. how?

Posted: Thu May 21, 2020 3:25 pm
by ilgrank2
I'll leave this here for anyone having my same problem:
It is not mandatory to upgrade to Buster in order to use the latest Mosquitto (1.6.9 at the time of writing)

*warning* using the following procedure you will add an unofficial repo. I did it and everything seems to be fine but.. you're warned :)

just follow instructions here: https://mosquitto.org/blog/2013/01/mosq ... epository/
and in the last step do an

Code: Select all

apt upgrade mosquitto
followed by a

Code: Select all

service mosquitto restart
I needed 1.6.x because it has WebSockets compiled in (as opposed to previous releases which needed a recompile).
But if you need Websockets too, there's one last step:
add the following lines

Code: Select all

listener 9001
protocol websockets
to

Code: Select all

/etc/mosquitto/mosquitto.conf
then reastart the mosquitto service one more time.. and you're done! ;)

Re: Upgrade Mosquitto.. how?

Posted: Thu May 21, 2020 3:40 pm
by Joulinar
Maybe you should have posted the disclaimer as well
It's worth repeating that this is experimental - there are package changes that haven't been vetted by a Debian developer so it's possible something will break. I've tested myself and had no problems so far.

Re: Upgrade Mosquitto.. how?

Posted: Thu May 21, 2020 4:17 pm
by ilgrank2
If I resorted to blindly posting just the commands needed to add the repo, then yes, I would agree with you.
But instead, I linked the page, where the warning is on the 4th row, before the actual commands.
That said, I updated my post 'cause.. better to be safe than sorry :)

Thanks :)

Re: Upgrade Mosquitto.. how?

Posted: Thu May 21, 2020 5:58 pm
by Joulinar
ok I marked your comment as solved 8)