Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 320159 - app-misc/mosquitto - a message broker implementing the MQ Telemetry Transport protocol
Summary: app-misc/mosquitto - a message broker implementing the MQ Telemetry Transport...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 4 votes (vote)
Assignee: Neil Bothwick
URL: http://mosquitto.org/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-17 11:48 UTC by Neil Bothwick
Modified: 2016-07-09 17:57 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild for app-misc/mosquitto-0.6.1 (mosquitto-0.6.1.ebuild,1.07 KB, text/plain)
2010-05-17 11:48 UTC, Neil Bothwick
Details
Updated ebuild (mosquitto-0.6.1.ebuild,1.25 KB, text/plain)
2010-05-18 14:22 UTC, Neil Bothwick
Details
Ebuild for mosquitto-0.7_rc1 (mosquitto-0.7_rc1.ebuild,1.28 KB, text/plain)
2010-06-09 11:07 UTC, Neil Bothwick
Details
init script for mosquitto (mosquitto,320 bytes, text/plain)
2010-06-15 22:06 UTC, Neil Bothwick
Details
Ebuild for moisquitto-0.7_rc2 (mosquitto-0.7_rc2.ebuild,1.38 KB, text/plain)
2010-06-15 22:07 UTC, Neil Bothwick
Details
Ebuild for mosquitto-0.7 (mosquitto-0.7.ebuild,1.38 KB, text/plain)
2010-07-01 08:14 UTC, Neil Bothwick
Details
Ebuild for mosquitto-0.9 (mosquitto-0.9.ebuild,1.37 KB, text/plain)
2010-11-29 10:51 UTC, Neil Bothwick
Details
Ebuild for app-misc/mosquitto-0.0 (mosquitto-0.9.ebuild,1.46 KB, text/plain)
2010-12-01 10:49 UTC, Neil Bothwick
Details
Patch file for 0.9 ebuild (mosquitto-0.9-syslog.patch,219 bytes, patch)
2010-12-01 10:50 UTC, Neil Bothwick
Details | Diff
Ebuild for mosquitto-0.9.1 (mosquitto-0.9.1.ebuild,1.55 KB, text/plain)
2010-12-03 23:50 UTC, Neil Bothwick
Details
New init script for 0.9+ (mosquitto,367 bytes, text/plain)
2010-12-03 23:50 UTC, Neil Bothwick
Details
Ebuild for app-misc/mosquitto-0.9.2 (mosquitto-0.9.2.ebuild,1.55 KB, text/plain)
2011-02-16 11:06 UTC, Neil Bothwick
Details
Ebuild for app-misc/mosquitto-0.9.3 (mosquitto-0.9.3.ebuild,1.55 KB, text/plain)
2011-03-20 13:36 UTC, Neil Bothwick
Details
Ebuild for app-misc/mosquitto-0.10 (mosquitto-0.10.ebuild,1.75 KB, text/plain)
2011-05-03 08:48 UTC, Neil Bothwick
Details
Patch file for 0.10 ebuild (mosquitto-0.10-syslog.patch,219 bytes, patch)
2011-05-03 08:49 UTC, Neil Bothwick
Details | Diff
Ebuild for mosquitto-0.10.1 (mosquitto-0.10.1.ebuild,1.69 KB, text/plain)
2011-05-12 16:28 UTC, Neil Bothwick
Details
Ebuild for app-misc/mosquitto-0.13 (mosquitto-0.13.ebuild,1.74 KB, text/plain)
2011-09-27 17:49 UTC, Neil Bothwick
Details
Ebuild for app-misc/mosquitto-0.14 (mosquitto-0.14.ebuild,1.74 KB, text/plain)
2011-11-21 09:14 UTC, Neil Bothwick
Details
Ebuild for app-misc/mosquitto-0.14.3 (mosquitto-0.14.3.ebuild,1.74 KB, text/plain)
2012-01-10 10:27 UTC, Neil Bothwick
Details
Ebuild for app-misc/mosquitto-1.0.2 (mosquitto-1.0.2.ebuild,1.89 KB, text/plain)
2012-09-11 10:35 UTC, Neil Bothwick
Details
Ebuild for app-misc/mosquitto-1.0.3 (mosquitto-1.0.3.ebuild,1.89 KB, text/plain)
2012-09-29 08:41 UTC, Neil Bothwick
Details
Ebuild for app-misc/mosquitto-1.0.4 (mosquitto-1.0.4.ebuild,1.89 KB, text/plain)
2012-10-18 08:28 UTC, Neil Bothwick
Details
mosquitto-1.0.5.ebuild (mosquitto-1.0.5.ebuild,2.77 KB, text/plain)
2012-11-21 19:35 UTC, Chris Mayo
Details
update for mosquitto-1.2 (mosquitto-1.2.ebuild,2.77 KB, text/plain)
2013-08-06 20:26 UTC, Neil Bothwick
Details
update for mosquitto-1.2.2 (mosquitto-1.2.2.ebuild,2.77 KB, text/plain)
2013-11-01 11:17 UTC, Neil Bothwick
Details
update for mosquitto 1.3.1 (mosquitto-1.3.1.ebuild,3.07 KB, text/plain)
2014-05-15 11:17 UTC, Hakan Tandogan
Details
systemd service definition file (mosquitto.service,208 bytes, text/plain)
2014-05-15 11:18 UTC, Hakan Tandogan
Details
systemd tmp file defition (mosquitto.service,208 bytes, text/plain)
2014-05-15 11:20 UTC, Hakan Tandogan
Details
slightly improved init script (mosquitto,558 bytes, text/plain)
2014-05-15 11:21 UTC, Hakan Tandogan
Details
app-misc/mosquitto-1.4.8.ebuild (mosquitto-1.4.8.ebuild,1.99 KB, text/plain)
2016-05-03 13:38 UTC, Neil Bothwick
Details
Updated systemd service file (mosquitto.service,261 bytes, text/plain)
2016-05-03 13:38 UTC, Neil Bothwick
Details
build.log failing multilib-strict (build.log,22.77 KB, text/plain)
2016-05-04 04:53 UTC, Sam Jorna (wraeth)
Details
Update mosquitto-1.4.8 ebuild (mosquitto-1.4.8.ebuild,1.94 KB, text/plain)
2016-05-04 22:40 UTC, Neil Bothwick
Details
metadata.xml (metadata.xml,583 bytes, text/xml)
2016-05-04 22:40 UTC, Neil Bothwick
Details
Updated mosquitto-1.4.8 ebuild (mosquitto-1.4.8.ebuild,1.92 KB, text/plain)
2016-05-04 23:25 UTC, Neil Bothwick
Details
mosquitto-1.4.8-conditional-tests.patch (mosquitto-1.4.8-conditional-tests.patch,877 bytes, patch)
2016-05-05 07:08 UTC, Sam Jorna (wraeth)
Details | Diff
Updated mosquitto-1.4.8 ebuild (mosquitto-1.4.8.ebuild,2.20 KB, text/plain)
2016-05-05 09:11 UTC, Neil Bothwick
Details
mosquitto-1.4.8-conditional-tests.patch (mosquitto-1.4.8-conditional-tests.patch,1.05 KB, patch)
2016-05-05 09:11 UTC, Neil Bothwick
Details | Diff
mosquitto-1.4.8.ebuild (mosquitto-1.4.8.ebuild,2.30 KB, text/plain)
2016-05-05 21:57 UTC, Neil Bothwick
Details
mosquitto-1.4.8.ebuild (mosquitto-1.4.8.ebuild,2.33 KB, text/plain)
2016-05-05 23:55 UTC, Neil Bothwick
Details
build.log failing USE=ssl (mosquitto-1.4.8:20160506150105-build.log,29.15 KB, text/plain)
2016-05-06 07:12 UTC, Sam Jorna (wraeth)
Details
mosquitto-1.4.8.ebuild (mosquitto-1.4.8.ebuild,2.32 KB, text/plain)
2016-05-06 10:36 UTC, Neil Bothwick
Details
OpenRC service file (mosquitto,559 bytes, text/plain)
2016-05-25 17:19 UTC, Neil Bothwick
Details
mosquitto-1.4.9.ebuild (mosquitto-1.4.9.ebuild,2.32 KB, text/plain)
2016-07-08 13:33 UTC, Neil Bothwick
Details
Updated patches for 1.4.9 (mosquitto-1.4.9-conditional-tests.patch,1.12 KB, patch)
2016-07-08 13:34 UTC, Neil Bothwick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Bothwick 2010-05-17 11:48:04 UTC
Mosquitto is an open source MQTT broker
Comment 1 Neil Bothwick 2010-05-17 11:48:39 UTC
Created attachment 231789 [details]
Ebuild for app-misc/mosquitto-0.6.1
Comment 2 Neil Bothwick 2010-05-18 14:22:35 UTC
Created attachment 231985 [details]
Updated ebuild

Updated ebuild incorporating changes suggested by upstream. Persistence is now turned on by default and a directory in /var/lib created for it. TCP wrappers support now works correctly.
Comment 3 Neil Bothwick 2010-06-09 11:07:22 UTC
Created attachment 234691 [details]
Ebuild for mosquitto-0.7_rc1
Comment 4 Matthias Vill 2010-06-14 18:23:24 UTC
As dev-db/sqlite3-pcre didn't build on my system (see comment on #320153) I build this package with use -pcre.
On this ebuild I too think you missed a file. Namely the init-script. Emerge says:
 * QA Notice: file does not exist:
 *
 *      doexe: /usr/local/portage/app-misc/mosquitto/files/mosquitto does not exist

All else seems to work just fine on my x86 box.
Comment 5 Neil Bothwick 2010-06-15 22:06:12 UTC
Created attachment 235491 [details]
init script for mosquitto

This is the init script for mosquitto, put it in $PORTDIR_OVERLAY/app-misc/mosquitto/files
Comment 6 Neil Bothwick 2010-06-15 22:07:52 UTC
Created attachment 235493 [details]
Ebuild for moisquitto-0.7_rc2

An ebuild for the second 0.7 release candidate. Updated the home page and made the same ebuild work for RC and standard releases.
Comment 7 Neil Bothwick 2010-07-01 08:14:09 UTC
Created attachment 237111 [details]
Ebuild for mosquitto-0.7
Comment 8 Neil Bothwick 2010-11-29 10:51:57 UTC
Created attachment 255813 [details]
Ebuild for mosquitto-0.9

Mosquitto 0.9 no longer uses sqlite and sqlite-pcre, so the pcre USE flag is gone. This and the next version have support for importing old sqlite databases, controlled by the sqlite USE flag.
Comment 9 Neil Bothwick 2010-12-01 10:49:26 UTC
Created attachment 256027 [details]
Ebuild for app-misc/mosquitto-0.0

The previous ebuild failed to build the server, this patch fixes it.
Comment 10 Neil Bothwick 2010-12-01 10:50:20 UTC
Created attachment 256029 [details, diff]
Patch file for 0.9 ebuild
Comment 11 Neil Bothwick 2010-12-03 23:50:17 UTC
Created attachment 256282 [details]
Ebuild for mosquitto-0.9.1
Comment 12 Neil Bothwick 2010-12-03 23:50:57 UTC
Created attachment 256283 [details]
New init script for 0.9+
Comment 13 Neil Bothwick 2011-02-16 11:06:43 UTC
Created attachment 262713 [details]
Ebuild for app-misc/mosquitto-0.9.2
Comment 14 Neil Bothwick 2011-03-20 13:36:25 UTC
Created attachment 266611 [details]
Ebuild for app-misc/mosquitto-0.9.3

Mosquitto 0.9.3 is out now. Minor changes and just a rename for the ebuild.
Comment 15 Neil Bothwick 2011-05-03 08:48:54 UTC
Created attachment 271957 [details]
Ebuild for app-misc/mosquitto-0.10

Ebuild for mosquitto-0.10. This adds a USE flag to control building the now optional bridge mode. The sqlite flag is no longer needed and the dbupgrade flag is only needed if you have an old style sqlite database to upgrade. All sqlite support will be removed in the next version.
Comment 16 Neil Bothwick 2011-05-03 08:49:53 UTC
Created attachment 271959 [details, diff]
Patch file for 0.10 ebuild
Comment 17 Neil Bothwick 2011-05-12 16:28:59 UTC
Created attachment 272947 [details]
Ebuild for mosquitto-0.10.1

Ebuild for mosquitto-0.10.1 - the syslog.h patch is no longer needed.
Comment 18 Neil Bothwick 2011-09-27 17:49:32 UTC
Created attachment 287957 [details]
Ebuild for app-misc/mosquitto-0.13
Comment 19 Neil Bothwick 2011-11-21 09:14:08 UTC
Created attachment 293283 [details]
Ebuild for app-misc/mosquitto-0.14
Comment 20 Neil Bothwick 2012-01-10 10:27:59 UTC
Created attachment 298483 [details]
Ebuild for app-misc/mosquitto-0.14.3
Comment 21 Neil Bothwick 2012-09-11 10:35:00 UTC
Created attachment 323496 [details]
Ebuild for app-misc/mosquitto-1.0.2

Updated ebuild for mosquitto 1.0.2 - sorry for the delay.
Comment 22 Neil Bothwick 2012-09-29 08:41:35 UTC
Created attachment 325284 [details]
Ebuild for app-misc/mosquitto-1.0.3
Comment 23 Neil Bothwick 2012-10-18 08:28:57 UTC
Created attachment 326814 [details]
Ebuild for app-misc/mosquitto-1.0.4

Bugfix update from 1.0.3
See http://mosquitto.org/2012/10/version-1-0-4-released/
Comment 24 Chris Mayo 2012-11-21 19:35:22 UTC
Created attachment 330148 [details]
mosquitto-1.0.5.ebuild

- Add USE flags for:

python - make installing Python optional, byte-compile and install for both Python 2 and 3 (guess minimum version is Python 2.6)

examples

- Install libraries into lib64 on amd64
Comment 25 Neil Bothwick 2013-08-06 20:26:16 UTC
Created attachment 355266 [details]
update for mosquitto-1.2
Comment 26 Neil Bothwick 2013-11-01 11:17:49 UTC
Created attachment 362384 [details]
update for mosquitto-1.2.2

This is a bugfix release - see http://mosquitto.org/category/releases/
Comment 27 Hakan Tandogan 2014-05-15 11:17:54 UTC
Created attachment 376978 [details]
update for mosquitto 1.3.1

update for mosquitto-1.3.1

This is a feature (1.3) and bugfix (1.3.1) release - see http://mosquitto.org/category/releases/
Comment 28 Hakan Tandogan 2014-05-15 11:18:53 UTC
Created attachment 376980 [details]
systemd service definition file
Comment 29 Hakan Tandogan 2014-05-15 11:20:08 UTC
Created attachment 376982 [details]
systemd tmp file defition
Comment 30 Hakan Tandogan 2014-05-15 11:21:17 UTC
Created attachment 376984 [details]
slightly improved init script
Comment 31 Neil Bothwick 2014-07-18 20:47:18 UTC
This fails with

install: cannot stat ‘/mnt/portage/local/app-misc/mosquitto/files/mosquitto.conf’: No such file or directory
!!! doins: /mnt/portage/local/app-misc/mosquitto/files/mosquitto.conf does not exist
 * ERROR: app-misc/mosquitto-1.3.1::digimed failed (install phase):
 *   doins failed

You didn't upload mosquitto.conf but a second copy of mosquitto.service.
Comment 32 Neil Bothwick 2014-07-18 23:53:07 UTC
I've also noticed that mosquitto.service doesn't have an Exec line and the Desc line is missing the Desc=.
Comment 33 Markus Rathgeb 2014-11-05 16:18:15 UTC
I changed your ebuild, using cmake, created another systemd service file, bump version, ... and added it to my overlay.
Perhaps you would like to have a look at.

https://github.com/maggu2810/maggu2810-overlay/tree/master/app-misc/mosquitto
Comment 34 Manuel Rüger (RETIRED) gentoo-dev 2016-05-01 21:34:58 UTC
This ebuild might be interesting for the proxy-maintainers project. Anyone would be willing to be a proxied maintainer for this?
Comment 35 Neil Bothwick 2016-05-01 22:42:49 UTC
I created the original ebuild and I'm still using mosquitto. I'd like to update to a newer EAPI and start keeping it up to date again.
Comment 36 Sam Jorna (wraeth) gentoo-dev 2016-05-02 10:43:14 UTC
(In reply to Neil Bothwick from comment #35)
> I created the original ebuild and I'm still using mosquitto. I'd like to
> update to a newer EAPI and start keeping it up to date again.

Hi Neil!

Thanks for the offer. Can you please attach an updated ebuild and we'll work on getting it into the tree and you set as the maintainer.

I also notice that this bug depends on bug 320153, however it doesn't have this package listed in {R,}DEPEND of attachment 376978 [details] - can you clarify what the dependency is here? If this is required to be added for mosquitto, would you be interested in maintaining that as well?

If you have any questions, you can ask here, mail the Proxy Maintainers [0] project, or ask in the #gentoo-proxy-maint or #gentoo-dev-help channels on the Freenode IRC network.

[0] https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers

Cheers!
Comment 37 Neil Bothwick 2016-05-03 13:38:03 UTC
Created attachment 433088 [details]
app-misc/mosquitto-1.4.8.ebuild

Here's an updated ebuild for mosquitto-1.4.8. The python client library has been removed, it is now part of the Eclipse Paho project so will need a separate ebuild, I'll look into that tomorrow.

The dependency on sqlite-pcre is no longer required, that was for pre-1.0 versions of mosquitto.
Comment 38 Neil Bothwick 2016-05-03 13:38:40 UTC
Created attachment 433090 [details]
Updated systemd service file
Comment 39 Sam Jorna (wraeth) gentoo-dev 2016-05-04 04:48:31 UTC
Thanks Neil.

I've had a look at the ebuild and this is a good start, but there are a few improvements that I can suggest for this. Apologies if it seems like a lot, but I'm trying to cover everything at once to avoid going back and forth.

Note that the bump to EAPI and below are optional though recommended.

 - Install violates FEATURES=multilib-strict
Currently, if you build this with FEATURES=multilib-strict, it will fail. This is because it installs libraries to `/usr/lib` rather than `/usr/lib32` or `/usr/lib64`. The helper function `get_libdir` can be used to find the appropriate lib directory basename.

 - `doins` instead of `newins` [0]
The install of mosquitto.conf on line 54 should be done with `doins` as the file name is not changing.

 - Use `fowners` instead of `chown` [0]
pkg_postinst() should replace `chown` with `fowners`, the portage wrapper to chown`.

 - KEYWORDS testing [1]
Has this been tested on both x86 and amd64 architecture? There is generally some leniency when KEYWORDING amd64+x86, however at least buildtesting on both arches would be preferable.

 - Further bump to EAPI
EAPI could be bumped to EAPI6[2]. Note that there would be some additional changes for this, such as either calling `default` or `eapply_user` in src_prepare().

 - Combine sed statements
The sed statements in src_prepare() could be combined to a single one with `sed -i mosquitto.conf -e 's:....:' -e 's:....:' ... || die`. Note that you can use line continuation as with bash scripts.

 - Convert "${makeopts}" scalar to array
The "${makeopts}" variable could be converted to an array, making assignment cleaner and improving ebuild readability. Also note that the variable should be quoted on line 45.

This would then look like:

> makeopts=(
>     "WITH_BRIDGE=$(usex bridge)"
>     ...
> )
> einfo "${makeopts[@]}"

Otherwise this is good - no other problems were encountered during testing. Can you attach a new ebuild to address the above?

Lastly, this ebuild has some local USE flags. Can you attach a metadata.xml that includes local USE flag definitions as well as listing yourself and proxy-maint as maintainers? [3,4]

[0] https://devmanual.gentoo.org/function-reference/install-functions/
[1] https://devmanual.gentoo.org/keywording/#keywording-new-packages
[2] https://projects.gentoo.org/pms/6/pms.html#x1-175000E
[3] https://devmanual.gentoo.org/ebuild-writing/misc-files/metadata/
[4] https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers/User_Guide#How_proxy_maintainership_works
Comment 40 Sam Jorna (wraeth) gentoo-dev 2016-05-04 04:53:18 UTC
Created attachment 433146 [details]
build.log failing multilib-strict
Comment 41 Neil Bothwick 2016-05-04 22:37:27 UTC
(In reply to Sam Jorna (wraeth) from comment #39)
> 
> I've had a look at the ebuild and this is a good start, but there are a few
> improvements that I can suggest for this. Apologies if it seems like a lot,
> but I'm trying to cover everything at once to avoid going back and forth.

That makes sense.

> Note that the bump to EAPI and below are optional though recommended.
> 
>  - Install violates FEATURES=multilib-strict
> Currently, if you build this with FEATURES=multilib-strict, it will fail.
> This is because it installs libraries to `/usr/lib` rather than `/usr/lib32`
> or `/usr/lib64`. The helper function `get_libdir` can be used to find the
> appropriate lib directory basename.

Fixed.

>  - `doins` instead of `newins` [0]
> The install of mosquitto.conf on line 54 should be done with `doins` as the
> file name is not changing.

Fixed, no idea why I did that.
 
>  - Use `fowners` instead of `chown` [0]

Done.
 
>  - KEYWORDS testing [1]
> Has this been tested on both x86 and amd64 architecture? There is generally
> some leniency when KEYWORDING amd64+x86, however at least buildtesting on
> both arches would be preferable.

I haven't used x86 for some years, but I set up a basic x86 VM and it built and ran correctly.
 
>  - Further bump to EAPI
> EAPI could be bumped to EAPI6[2]. Note that there would be some additional
> changes for this, such as either calling `default` or `eapply_user` in
> src_prepare().

I've passed on this for now because it then complain about my having a  register_die_hook() call in /etc/portage/bashrc - I'll have to fix that.

>  - Combine sed statements

Done.
 
>  - Convert "${makeopts}" scalar to array

Done.

> The "${makeopts}" variable could be converted to an array, making assignment
> cleaner and improving ebuild readability. Also note that the variable should
> be quoted on line 45.

Done.

> Otherwise this is good - no other problems were encountered during testing.
> Can you attach a new ebuild to address the above?

OK

> Lastly, this ebuild has some local USE flags. Can you attach a metadata.xml
> that includes local USE flag definitions as well as listing yourself and
> proxy-maint as maintainers? [3,4]

Done.
Comment 42 Neil Bothwick 2016-05-04 22:40:01 UTC
Created attachment 433242 [details]
Update mosquitto-1.4.8 ebuild
Comment 43 Neil Bothwick 2016-05-04 22:40:29 UTC
Created attachment 433244 [details]
metadata.xml
Comment 44 Manuel Rüger (RETIRED) gentoo-dev 2016-05-04 23:04:31 UTC
* Does mosquitto operate only with a user without having an accordingly named group?
* If you chain multiple sed calls on a single file, just put the file at the end.
Comment 45 Neil Bothwick 2016-05-04 23:25:00 UTC
Created attachment 433246 [details]
Updated mosquitto-1.4.8 ebuild

I'm not sure about the group, the daemon seems to work witohut it, but I've added one anyway, to be safe.

The sed thing was a cockup, I didn't remove enough when editing the multiple calls to a single one.
Comment 46 Sam Jorna (wraeth) gentoo-dev 2016-05-05 07:08:00 UTC
Created attachment 433258 [details, diff]
mosquitto-1.4.8-conditional-tests.patch

There were a couple of further issues that I have come across:

There are some instances of "${makeopts}" remaining which should be changed to "${makeopts[@]}" (otherwise only the first element of the array will be returned). There is also one or two that is not quoted when it should be.

There is also a QA warning about pre-stripped binaries - the build system strips the binaries itself. This could be solved by either adding "STRIP=/bin/true" to the ${makeopts} array (preventing the build system from stripping) or by listing the files in a QA_PRESTRIPPED="" variable in global scope.

There were also a couple of issues when building with FEATURES=test:

Because the build configuration is set with environment variables instead of a ./configure script, tests need to be called with the ${makeopts[@]} array as well instead of relying on the default `emake test`. This could be done in a src_test() such as:

> src_test() {
>     emake "${makeopts[@]}" test
> }

In addition to this, some tests (specifically for bridge operations) were conducted unconditionally, regardless of whether built "WITH_BRIDGE=yes". To resolve this I created the attached patch.

If you want to fix these and attach a new ebuild, please do; otherwise just let me know and I can fix these as I commit them.

Thanks.
Comment 47 Michael 'veremitz' Everitt 2016-05-05 08:45:15 UTC
Looking forward to package reaching tree, as may well start to use MQTT in some of my embedded projects. Cc'ing @embedded for a heads-up.
Comment 48 Neil Bothwick 2016-05-05 09:10:23 UTC
(In reply to Sam Jorna (wraeth) from comment #46)
> There is also a QA warning about pre-stripped binaries - the build system
> strips the binaries itself. This could be solved by either adding
> "STRIP=/bin/true" to the ${makeopts} array (preventing the build system from
> stripping) or by listing the files in a QA_PRESTRIPPED="" variable in global
> scope.

I've taken the latter option, is there a preferred choice here?

> In addition to this, some tests (specifically for bridge operations) were
> conducted unconditionally, regardless of whether built "WITH_BRIDGE=yes". To
> resolve this I created the attached patch.

Some bridge tests were still made with USE="-bridge +ssl", I've added a new patch.
Comment 49 Neil Bothwick 2016-05-05 09:11:05 UTC
Created attachment 433278 [details]
Updated mosquitto-1.4.8 ebuild
Comment 50 Neil Bothwick 2016-05-05 09:11:53 UTC
Created attachment 433280 [details, diff]
mosquitto-1.4.8-conditional-tests.patch
Comment 51 Neil Bothwick 2016-05-05 09:53:03 UTC
test fails if the default Python is version 3? Can I force the default to 2 for the duration of the ebuild process or is it necessary to patch the test scripts?
Comment 52 Sam Jorna (wraeth) gentoo-dev 2016-05-05 13:18:23 UTC
(In reply to Neil Bothwick from comment #51)
> test fails if the default Python is version 3? Can I force the default to 2
> for the duration of the ebuild process or is it necessary to patch the test
> scripts?

Hm, this is a good point raised (and that I didn't consider until you brought it up) - this needs a DEPEND entry for python given that the tests are python scripts. You can do this with the python-any-r1.eclass[0], setting PYTHON_COMPAT, and adding the dependencies accordingly.

As for the tests, ideally they would work with both python3 and python2, however you can limit PYTHON_COMPAT accordingly. You may also need to `python_fix_shebang`[1] as well. Given that it's only the tests that require python, limiting to a given python implementation shouldn't cause any problems.

[0] https://devmanual.gentoo.org/eclass-reference/python-any-r1.eclass/
[1] https://devmanual.gentoo.org/eclass-reference/python-utils-r1.eclass/
Comment 53 Neil Bothwick 2016-05-05 21:57:35 UTC
Created attachment 433340 [details]
mosquitto-1.4.8.ebuild

Added PYTHON_COMPAT and PYTHON_DEPS and run python_fix_shebang. Tests now complete when python 3.4 is the default interpreter.
Comment 54 Manuel Rüger (RETIRED) gentoo-dev 2016-05-05 22:42:08 UTC
I'm not sure if the hardcoded lib64 will work in PRESTRIPPED or if you need to add lib32 or use $(get_libdir) there.

fowners could use mosquitto:mosquitto as there's a group now.

If the installed library has a SONAME then you could add that as a subslot.
Comment 55 Manuel Rüger (RETIRED) gentoo-dev 2016-05-05 22:43:53 UTC
Also I'm not sure if 
	dodir /var/lib/mosquitto
should be
	keepdir /var/lib/mosquitto
Comment 56 Neil Bothwick 2016-05-05 23:55:17 UTC
Created attachment 433346 [details]
mosquitto-1.4.8.ebuild

Changes made per Manuel's comments. The mosquitto user now has mosquitto as its primary group, so fowners mosquitto: should work, but I specified the group explicitly anyway.
Comment 57 Sam Jorna (wraeth) gentoo-dev 2016-05-06 07:12:51 UTC
Created attachment 433354 [details]
build.log failing USE=ssl

I think this is almost ready, however it is failing tests when built with USE=ssl (build.log attached). This doesn't seem to be dependent on other USE flags.

Lastly, the dependency on openssl should specify SLOT and, if it links against openssl, the rebuild-on-change SLOT operator[0]. The version specification could also be removed (>=openssl-1.0.0 will be satisfied with anything from SLOT0).

[0] https://devmanual.gentoo.org/general-concepts/dependencies/#slot-dependencies
Comment 58 Neil Bothwick 2016-05-06 10:35:33 UTC
I can't reproduce that error, but it ooks like the one I got before I modified your patch, which happened with USE="-bridge ssl". Are you using the updated patch?

I've added the SLOT stuff.
Comment 59 Neil Bothwick 2016-05-06 10:36:29 UTC
Created attachment 433402 [details]
mosquitto-1.4.8.ebuild
Comment 60 Sam Jorna (wraeth) gentoo-dev 2016-05-06 11:59:12 UTC
(In reply to Neil Bothwick from comment #58)
> I can't reproduce that error, but it ooks like the one I got before I
> modified your patch, which happened with USE="-bridge ssl". Are you using
> the updated patch?
> 
> I've added the SLOT stuff.

I've cleaned out the package directory and re-downloaded all the fresh files to be sure, so I'll be able to confirm shortly.

Everything else looks good, so provided the tests come back okay I'll commit.
Comment 61 Sam Jorna (wraeth) gentoo-dev 2016-05-06 13:29:49 UTC
I think the issue may have been caused by my testing setup (using isolated containers) as it still happened after ensuring I had the latest files, however it built and tested successfully on two other bare-metal hosts, which satisfies my testing.

That being said, good work, and welcome to the Proxy Maintainers project!


commit a5b732589937dfc6da6faff69670900a110acdb8
Author: Sam Jorna <wraeth@gentoo.org>
Date:   Fri May 6 23:23:21 2016 +1000

    app-misc/mosquitto: new ebuild
    
    Mosquitto is an open source MQTT broker. Ebuild added with proxied
    maintainer Neil Bothwick under the Proxy Maintainers project.
    
    Gentoo-bug: 320159
    Package-Manager: portage-2.2.28
Comment 62 Markus Rathgeb 2016-05-06 13:41:02 UTC
Hi Neil Bothwick and Sam Jorna,
I would like to say thanks for your work.
Thank you ;)
Comment 63 Neil Bothwick 2016-05-11 08:21:42 UTC
(In reply to Neil Bothwick from comment #37)
> The python client library has
> been removed, it is now part of the Eclipse Paho project so will need a
> separate ebuild,

I've posted an ebuild for this at https://bugs.gentoo.org/show_bug.cgi?id=582722
Comment 64 Neil Bothwick 2016-05-25 17:19:02 UTC
Created attachment 435358 [details]
OpenRC service file

Updated init script to use openrc-run
Comment 65 Neil Bothwick 2016-07-08 13:33:09 UTC
Created attachment 440076 [details]
mosquitto-1.4.9.ebuild

New ebuild for version 1.4.9. No changes to the ebuild but there is a different patch file.
Comment 66 Neil Bothwick 2016-07-08 13:34:18 UTC
Created attachment 440078 [details, diff]
Updated patches for 1.4.9
Comment 67 Manuel Rüger (RETIRED) gentoo-dev 2016-07-09 17:57:28 UTC
This bug has been marked as resolved, please create a new one for further improvements or version bumps.