Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app-misc/mosquitto: bump version to 1.4.15 #7362

Closed
wants to merge 1 commit into from
Closed

app-misc/mosquitto: bump version to 1.4.15 #7362

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 4, 2018

Package-Manager: Portage-2.3.19, Repoman-2.3.6

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull Request assignment

Areas affected: ebuilds
Packages affected: app-misc/mosquitto

app-misc/mosquitto: @lramage94, @gentoo/proxy-maint

No bugs to link found. If your pull request references any of the Gentoo bug reports, please add appropriate GLEP 66 tags to the commit message and ping us to reset the assignment.

In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

@gentoo-repo-qa-bot gentoo-repo-qa-bot added self-maintained The PR changes only packages that are maintained by the submitter (i.e. no need to ask anybody else) assigned PR successfully assigned to the package maintainer(s). labels Mar 4, 2018
DESCRIPTION="An Open Source MQTT v3 Broker"
HOMEPAGE="http://mosquitto.org/"
SRC_URI="http://mosquitto.org/files/source/${P}.tar.gz"
LICENSE="EPL-1.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty line above it. What is the source of this bad template a lot of people seem to be using?

Copy link
Author

@ghost ghost Mar 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copied the old ebuild and renamed it via mv. Where should I put the new line?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Between SRC_URI and LICENSE.

}

src_configure() {
LIBDIR=$(get_libdir)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you declaring it as a global variable?


src_configure() {
LIBDIR=$(get_libdir)
makeopts=(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's up to you but I'd say it's generally cleaner to add a wrapper function that adds all the args than to keep them in global variable.

}

src_install() {
emake "${makeopts[@]}" DESTDIR="${D}" prefix=/usr install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

${EPREFIX}/usr maybe?

if use examples; then
docompress -x "/usr/share/doc/${PF}/examples"
insinto "/usr/share/doc/${PF}/examples"
doins -r examples/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dodoc/docinto, also examples/. to avoid unnecessary glob.

Copy link
Member

@mgorny mgorny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are supposed to test your ebuilds before pushing the changes.

srv? ( net-dns/c-ares )
websockets? ( net-libs/libwebsockets )"

makeopts() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this just doesn't do anything?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the proper method?

Copy link
Member

@mgorny mgorny Mar 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the function do emake ... "${@}", and call it instead of emake.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you show me an example of this? I am looking in the tree and I see other packages that do it the other way. For example, net-misc/dropbear-2018.76 has a set_options function that has a makeopts=(...) in it.

src_prepare() {
eapply "${FILESDIR}/${PN}-1.4.10-conditional-tests.patch"
if use persistence; then
sed -i -e "s:^#autosave_interval:autosave_interval:" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/autosave_interval/s:^#:: and like that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean to simplify the sed expression. man sed

Copy link
Author

@ghost ghost Mar 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# If persistence is enabled, save the in-memory database to disk 
# every autosave_interval seconds. If set to 0, the persistence 
# database will only be written when mosquitto exits. See also
# autosave_on_changes.
# Note that writing of the persistence database can be forced by 
# sending mosquitto a SIGUSR1 signal.
#autosave_interval 1800

# If true, mosquitto will count the number of subscription changes, retained
# messages received and queued messages and if the total exceeds
# autosave_interval then the in-memory database will be saved to disk.
# If false, mosquitto will save the in-memory database to disk by treating
# autosave_interval as a time in seconds.
#autosave_on_changes false

# Save persistent message data to disk (true/false).
# This saves information about all messages, including 
# subscriptions, currently in-flight messages and retained 
# messages.
# retained_persistence is a synonym for this option.
persistence true

# The filename to use for the persistent database, not including 
# the path.
#persistence_file mosquitto.db

# Location for persistent database. Must include trailing /
# Default is an empty string (current directory).
# Set to e.g. /var/lib/mosquitto/ if running as a proper service on Linux or
# similar.
#persistence_location

insinto /etc/mosquitto
doins mosquitto.conf

if use systemd; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is invalid use of USE=systemd.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How so? That is how examples is being used. Where are the rules against this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ quse -D systemd
 global:systemd: Enable use of systemd-specific libraries and features like socket activation or session tracking

https://wiki.gentoo.org/wiki/Project:Systemd/Ebuild_policy#General_guidelines

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Please note that unit files are still installed unconditionally to the USE flag."

I see this now, thank you.


if use examples; then
docompress -x "/usr/share/doc/${PF}/examples"
docinto "/usr/share/doc/${PF}/examples"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the correct solution?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read what docinto does and you'll know. You're expected to show some initiative, not wait for developers to give you complete copy'n'paste solutions.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have fixed all of the previous issues. But if the qa tools are not giving me any errors, and if the package builds and runs sucessfully then I fail to see the reason behind some of these changes. It was working fine when it was globbing.

@mgorny
Copy link
Member

mgorny commented Mar 9, 2018

Well, I wanted to show you the problem but the ebuild doesn't even get there:

>>> Preparing source in /tmp/portage/app-misc/mosquitto-1.4.15/work/mosquitto-1.4.15 ...
 * Applying mosquitto-1.4.10-conditional-tests.patch ...
2 out of 3 hunks FAILED -- saving rejects to file test/broker/Makefile.rej                                                                  [ !! ]
 * ERROR: app-misc/mosquitto-1.4.15::gentoo failed (prepare phase):
 *   patch -p1  failed with /tmp/portage/app-misc/mosquitto-1.4.15/files/mosquitto-1.4.10-conditional-tests.patch
 * 
 * Call stack:
 *               ebuild.sh, line  124:  Called src_prepare
 *             environment, line 2395:  Called eapply '/tmp/portage/app-misc/mosquitto-1.4.15/files/mosquitto-1.4.10-conditional-tests.patch'
 *             environment, line  636:  Called _eapply_patch '/tmp/portage/app-misc/mosquitto-1.4.15/files/mosquitto-1.4.10-conditional-tests.patch'
 *             environment, line  574:  Called __helpers_die 'patch -p1  failed with /tmp/portage/app-misc/mosquitto-1.4.15/files/mosquitto-1.4.10-conditional-tests.patch'
 *   isolated-functions.sh, line  117:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=app-misc/mosquitto-1.4.15::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-misc/mosquitto-1.4.15::gentoo'`.
 * The complete build log is located at '/var/log/portage/app-misc:mosquitto-1.4.15:20180309-222728.log'.
 * For convenience, a symlink to the build log is located at '/tmp/portage/app-misc/mosquitto-1.4.15/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/app-misc/mosquitto-1.4.15/temp/environment'.
 * Working directory: '/tmp/portage/app-misc/mosquitto-1.4.15/work/mosquitto-1.4.15'
 * S: '/tmp/portage/app-misc/mosquitto-1.4.15/work/mosquitto-1.4.15'

}

src_test() {
_emake test
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IUSE="$IUSE test"    # append test to IUSE
REQUIRED_USE="test? ( bridge )"    # this is needed for the tests to pass

Is this appropriate?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presuming this is an explanation of what you're going to do and not literal snippet, yes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks.

Package-Manager: Portage-2.3.19, Repoman-2.3.6
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2018-03-23 14:03 UTC
Newest commit scanned: a3a9763
Status: ✅ good

Issues already there before the PR (double-check them):
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#app-arch/rpm
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#app-benchmarks/os-autoinst
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/hxtools
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/icemon
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-cpanspec
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-download_files
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-download_src_package
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-download_url
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-extract_file
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-format_spec_file
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-generator_driver_update_disk
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-git_tarballs
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-github_tarballs
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-meta
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-rearchive
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-recompress
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-set_version
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-source_validator
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-tar_scm
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-update_source
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/obs-service-verify_file
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/osc
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/quilt
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/spec-cleaner
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#dev-util/suse-build
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#media-fonts/fifth-leg
https://qa-reports.gentoo.org/output/gentoo-ci/650e11ebc/output.html#sys-devel/icecream

@mgorny
Copy link
Member

mgorny commented Mar 23, 2018

Looks good, thanks. I'm going to merge it.

@ghost ghost deleted the mosquitto-revbump branch March 24, 2018 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). self-maintained The PR changes only packages that are maintained by the submitter (i.e. no need to ask anybody else)
Projects
None yet
2 participants