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

net-misc/kea: various improvements #22116

Closed
wants to merge 2 commits into from

Conversation

expeditioneer
Copy link
Contributor

@expeditioneer expeditioneer commented Aug 26, 2021

fixed-gtest detection
added Systemd services

Closes: https://bugs.gentoo.org/693332
Closes: https://bugs.gentoo.org/626280
Bug: https://bugs.gentoo.org/751883

Signed-off-by: Dennis Lamm expeditioneer@gentoo.org
Package-Manager: Portage-3.0.20, Repoman-3.0.3

@gentoo-bot
Copy link

Pull Request assignment

Submitter: @expeditioneer
Areas affected: ebuilds
Packages affected: net-misc/kea

net-misc/kea: polynomial-c, chainsaw

At least one of the listed packages is maintained entirely by non-GitHub developers!

Linked bugs

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 request reassignment.

If you do not receive any reply to this pull request, please open or link a bug to attract the attention of maintainers.


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

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added need assignment It was impossible to assign the PR correctly. Please assign it manually. no bug found No Bug/Closes found in the commits. labels Aug 26, 2021
@expeditioneer expeditioneer self-assigned this Aug 26, 2021
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-08-26 17:34 UTC
Newest commit scanned: 0da2bc4
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/e223d34843/output.html

+ AC_MSG_ERROR([Cannot find gtest in: $GTEST_PATHS])
+ fi
+ fi
+ done
Copy link
Member

Choose a reason for hiding this comment

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

...just use pkg-config?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

newinitd "${FILESDIR}"/${PN}-initd-r1 ${PN}

if use samples; then
diropts -m 0750 -o root -g dhcp
Copy link
Member

Choose a reason for hiding this comment

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

Indentation is inconsistent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

systemd_dounit "${FILESDIR}"/kea-dhcp4-server.service
systemd_dounit "${FILESDIR}"/kea-dhcp6-server.service

newtmpfiles "${FILESDIR}"/${PN}.tmpfiles.conf ${PN}.conf
Copy link
Member

Choose a reason for hiding this comment

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

Need a pkg_postinst call to tmpfiles_process (should be a QA warning now, see here)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added missing pkg_postinst

-e 's#test -f "$dir/lib/libgtest.a"#test -f "$dir/lib64/libgtest.a"#g' \
-e 's#test -f "$dir/lib/libgtest.so"#test -f "$dir/lib64/libgtest.so"#g' \
-e 's GTEST_LDFLAGS="-L$dir/lib GTEST_LDFLAGS="-L$dir/lib64 g' \
m4macros/ax_gtest.m4 || die "fixing gtest detection macro failed"
Copy link
Member

Choose a reason for hiding this comment

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

pkg_config? hardcoding lib64 isn't right here anyway for all platforms.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -9,8 +9,18 @@
<email>chainsaw@gentoo.org</email>
<name>Tony Vroon</name>
</maintainer>
<maintainer type="person">
Copy link
Member

Choose a reason for hiding this comment

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

Make sure you wait until one of the existing maintainers reviews.

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-08-26 19:54 UTC
Newest commit scanned: 81f29a9
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/e97b3e27ea/output.html

@Polynomial-C
Copy link
Contributor

Can you please squash your commits into one?

@expeditioneer
Copy link
Contributor Author

@Polynomial-C: I've added the gtest detection via pkg-config and squashed the commits

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-08-29 16:39 UTC
Newest commit scanned: 6346f0a
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/f4d6d3e29b/output.html

Comment on lines 88 to 92
dodir /etc/kea
cp "${FILESDIR}"/kea-ctrl-agent.conf "${ED}"/etc/kea/kea-ctrl-agent.conf || die "Could not create kea-ctrl-agent.conf"
cp "${FILESDIR}"/kea-ddns-server.conf "${ED}"/etc/kea/kea-ddns-server.conf || die "Could not create kea-ddns-server.conf"
cp "${FILESDIR}"/kea-dhcp4.conf "${ED}"/etc/kea/kea-dhcp4.conf || die "Could not create kea kea-dhcp4.conf"
cp "${FILESDIR}"/kea-dhcp6.conf "${ED}"/etc/kea/kea-dhcp6.conf || die "Could not create kea-dhcp6.conf"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please replace these with insinto and doins calls. That way you may even remove the dodir line.

@Polynomial-C
Copy link
Contributor

Oh and please fix these issues as well:

Traceback (most recent call last):
  File "/usr/lib/portage/python3.9/doins.py", line 594, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/lib/portage/python3.9/doins.py", line 582, in main
    if _doins(
  File "/usr/lib/portage/python3.9/doins.py", line 434, in _doins
    return install_runner.install_file(source, os.path.dirname(dest))
  File "/usr/lib/portage/python3.9/doins.py", line 370, in install_file
    return self._ins_runner.run(source, dest_dir)
  File "/usr/lib/portage/python3.9/doins.py", line 179, in run
    sstat = os.stat(source)
FileNotFoundError: [Errno 2] No such file or directory: b'/var/tmp/portage/net-misc/kea-1.9.10-r1/files/kea-dhcp-ddns-server.service'
 * ERROR: net-misc/kea-1.9.10-r1::gentoo failed (install phase):
 *   doins failed
 *
 * If you need support, post the output of `emerge --info '=net-misc/kea-1.9.10-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-misc/kea-1.9.10-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-misc/kea-1.9.10-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-misc/kea-1.9.10-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/net-misc/kea-1.9.10-r1/work/kea-1.9.10'
 * S: '/var/tmp/portage/net-misc/kea-1.9.10-r1/work/kea-1.9.10'
 * QA Notice: Unrecognized configure options:
 *
 *      --with-gtest
 *      --with-gtest

@expeditioneer
Copy link
Contributor Author

@Polynomial-C this should be fixed now

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-08-31 19:25 UTC
Newest commit scanned: 4eda473
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/cb6ef0beda/output.html

@expeditioneer
Copy link
Contributor Author

Added bugs to commit message

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-09-01 14:45 UTC
Newest commit scanned: 6e68252
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/3315edbbfc/output.html

Comment on lines 90 to 93
doins "${FILESDIR}"/${PN}-ctrl-agent.conf || die "Could not create kea-ctrl-agent.conf"
doins "${FILESDIR}"/${PN}-ddns-server.conf || die "Could not create kea-ddns-server.conf"
doins "${FILESDIR}"/${PN}-dhcp4.conf || die "Could not create kea kea-dhcp4.conf"
doins "${FILESDIR}"/${PN}-dhcp6.conf || die "Could not create kea-dhcp6.conf"
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

newinitd "${FILESDIR}"/${PN}-initd-r1 ${PN}

if use samples; then
diropts -m 0750 -o root -g dhcp
Copy link
Contributor

Choose a reason for hiding this comment

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

Alright, removing the dodir call also made this line useless. But I suppose you want the etc/kea dir to have these permissions so I suggest to re-introduce the dodir /etc/kea call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've fixed it

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-09-02 20:31 UTC
Newest commit scanned: 64dc842
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/02bdacfdff/output.html

@expeditioneer
Copy link
Contributor Author

@Polynomial-C could we merge this?

- fi
+ DISTCHECK_GTEST_CONFIGURE_FLAG="--with-gtest"
+ PKG_CHECK_MODULES([GTEST], [gtest], [], [AC_MSG_ERROR([gtest requested but not found])])
+ GTEST_INCLUDES=`pkg-config --keep-system-cflags --cflags-only-I gtest`
Copy link
Member

Choose a reason for hiding this comment

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

You shouldn't need to then call pkg-config directly (PKG_CHECK_MODULES should populate everything you need), but if you absolutely must, respect ${PKG_CONFIG} instead (not calling just pkg-config bare).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@thesamesam thank you for the hint with ${PKG_CONFIG} i replaced the plain pkg-configcalls. Sadly PKG_CHECK_MODULES does not provide everything which is required by kea. I also wanted to keep the changes minimal on their codebase.

Copy link
Member

Choose a reason for hiding this comment

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

np, I understand -- thanks! I defer to @Polynomial-C now.

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-09-06 19:31 UTC
Newest commit scanned: d5e43fc
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/c642c51107/output.html

@expeditioneer
Copy link
Contributor Author

I've found an issue with the conditional activation of gtest. Please wait with further reviews until i have fixed that.

@expeditioneer
Copy link
Contributor Author

The conditional activation of gtest should now work as expected and intended.

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-09-07 06:11 UTC
Newest commit scanned: 2771192
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/e598e4517a/output.html

Copy link
Contributor

@Polynomial-C Polynomial-C left a comment

Choose a reason for hiding this comment

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

Please fix the two remaining minor issues.
Optionally you may also bump kea to version 1.9.11 (but in a separate commit please).

Once you've done this, you can commit your PR. Thanks for your patience.

if use samples; then
diropts -m 0750 -o root -g dhcp
dodir /etc/kea
insopts -m 0640 -o root -g dhcp
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix the indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

if use samples; then
diropts -m 0750 -o root -g dhcp
dodir /etc/kea
insopts -m 0640 -o root -g dhcp
Copy link
Contributor

Choose a reason for hiding this comment

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

Likewise

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-09-07 18:26 UTC
Newest commit scanned: e66147d
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/c1a4eb8fe4/output.html

fixed-gtest detection
added Systemd services

Closes: https://bugs.gentoo.org/693332
Closes: https://bugs.gentoo.org/626280
Bug: https://bugs.gentoo.org/751883

Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org>
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org>
Package-Manager: Portage-3.0.20, Repoman-3.0.3
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-09-07 19:41 UTC
Newest commit scanned: 0f81099
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/e42826e264/output.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need assignment It was impossible to assign the PR correctly. Please assign it manually. no bug found No Bug/Closes found in the commits.
Projects
None yet
6 participants