Mosquitto is an open source MQTT broker
Created attachment 231789 [details] Ebuild for app-misc/mosquitto-0.6.1
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.
Created attachment 234691 [details] Ebuild for mosquitto-0.7_rc1
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.
Created attachment 235491 [details] init script for mosquitto This is the init script for mosquitto, put it in $PORTDIR_OVERLAY/app-misc/mosquitto/files
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.
Created attachment 237111 [details] Ebuild for mosquitto-0.7
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.
Created attachment 256027 [details] Ebuild for app-misc/mosquitto-0.0 The previous ebuild failed to build the server, this patch fixes it.
Created attachment 256029 [details, diff] Patch file for 0.9 ebuild
Created attachment 256282 [details] Ebuild for mosquitto-0.9.1
Created attachment 256283 [details] New init script for 0.9+
Created attachment 262713 [details] Ebuild for app-misc/mosquitto-0.9.2
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.
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.
Created attachment 271959 [details, diff] Patch file for 0.10 ebuild
Created attachment 272947 [details] Ebuild for mosquitto-0.10.1 Ebuild for mosquitto-0.10.1 - the syslog.h patch is no longer needed.
Created attachment 287957 [details] Ebuild for app-misc/mosquitto-0.13
Created attachment 293283 [details] Ebuild for app-misc/mosquitto-0.14
Created attachment 298483 [details] Ebuild for app-misc/mosquitto-0.14.3
Created attachment 323496 [details] Ebuild for app-misc/mosquitto-1.0.2 Updated ebuild for mosquitto 1.0.2 - sorry for the delay.
Created attachment 325284 [details] Ebuild for app-misc/mosquitto-1.0.3
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/
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
Created attachment 355266 [details] update for mosquitto-1.2
Created attachment 362384 [details] update for mosquitto-1.2.2 This is a bugfix release - see http://mosquitto.org/category/releases/
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/
Created attachment 376980 [details] systemd service definition file
Created attachment 376982 [details] systemd tmp file defition
Created attachment 376984 [details] slightly improved init script
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.
I've also noticed that mosquitto.service doesn't have an Exec line and the Desc line is missing the Desc=.
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
This ebuild might be interesting for the proxy-maintainers project. Anyone would be willing to be a proxied maintainer for this?
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.
(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!
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.
Created attachment 433090 [details] Updated systemd service file
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
Created attachment 433146 [details] build.log failing multilib-strict
(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.
Created attachment 433242 [details] Update mosquitto-1.4.8 ebuild
Created attachment 433244 [details] metadata.xml
* 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.
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.
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.
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.
(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.
Created attachment 433278 [details] Updated mosquitto-1.4.8 ebuild
Created attachment 433280 [details, diff] mosquitto-1.4.8-conditional-tests.patch
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?
(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/
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.
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.
Also I'm not sure if dodir /var/lib/mosquitto should be keepdir /var/lib/mosquitto
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.
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
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.
Created attachment 433402 [details] mosquitto-1.4.8.ebuild
(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.
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
Hi Neil Bothwick and Sam Jorna, I would like to say thanks for your work. Thank you ;)
(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
Created attachment 435358 [details] OpenRC service file Updated init script to use openrc-run
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.
Created attachment 440078 [details, diff] Updated patches for 1.4.9
This bug has been marked as resolved, please create a new one for further improvements or version bumps.