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

cockpit: Add recipe version 218 #218

Closed
wants to merge 1 commit into from

Conversation

hoinmic
Copy link
Contributor

@hoinmic hoinmic commented Apr 29, 2020

Cockpit is a server manager that makes it easy to
administer your GNU/Linux servers via a web browser.

Signed-off-by: Michael Haener michael.haener@siemens.com

SUMMARY = "Admin interface for Linux machines"
DESCRIPTION = "Cockpit makes it easy to administer your GNU/Linux servers via a web browser"

LICENSE = "LGPLv2+"
Copy link
Contributor

Choose a reason for hiding this comment

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

is this 2+ or LGPL-2.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. License is "LGPLv2.1". I will correct it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is now corrected

inherit gettext pkgconfig autotools systemd distro_features_check

DEPENDS += "glib-2.0-native intltool-native gnutls"
DEPENDS += "systemd virtual/gettext json-glib krb5 libpam"
Copy link
Contributor

Choose a reason for hiding this comment

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

its already inheriting systemd class so DEPENDS on systemd should not be needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is now corrected

--with-cockpit-ws-instance-user=${COCKPIT_WS_USER_GROUP} \
--with-cockpit-ws-instance-group=${COCKPIT_WS_USER_GROUP} \
--disable-doc \
--with-systemdunitdir=${systemd_system_unitdir} \
Copy link
Contributor

Choose a reason for hiding this comment

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

this should pehaps be checking systemd to be available in DISTRO_FEATURES

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe I don't really understand the question.
Cockpit is closely connected to systemd and the DBus API. What would be the advantage of using ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} ?

Copy link
Contributor

Choose a reason for hiding this comment

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

systemd is not the only init system we support in OE, so if this package absolutely depends on systemd then perhaps it should ask for REQUIRED_DISTRO_FEATURE = "systemd"

see below error when not using systemd e.g.

14:51:00 Building world for qemuarm ...
14:51:27 Parsing recipes...WARNING: /mnt/jenkins/workspace/Yocto-world-arm/sources/meta-openembedded/meta-webserver/recipes-webadmin/cockpit/cockpit_217.bb: distro_features_check.bbclass is deprecated, please use features_check.bbclass instead
14:52:18 done.
14:52:19 WARNING: No bb files matched BBFILE_PATTERN_odroid-extras '^/mnt/jenkins/workspace/Yocto-world-arm/sources/meta-odroid/meta-odroid-extras/'
14:52:19 WARNING: No bb files matched BBFILE_PATTERN_meta-altera '^/mnt/jenkins/workspace/Yocto-world-arm/sources/meta-altera/'
14:52:23 ERROR: Nothing PROVIDES 'systemd' (but /mnt/jenkins/workspace/Yocto-world-arm/sources/meta-openembedded/meta-webserver/recipes-webadmin/cockpit/cockpit_217.bb DEPENDS on or otherwise requires it)
14:52:23 systemd was skipped: missing required distro feature 'systemd' (not in DISTRO_FEATURES)
14:52:27 ERROR: Nothing RPROVIDES 'cockpit' (but /mnt/jenkins/workspace/Yocto-world-arm/sources/meta-openembedded/meta-webserver/recipes-webadmin/cockpit/cockpit_217.bb RDEPENDS on or otherwise requires it)
14:52:27 No eligible RPROVIDERs exist for 'cockpit'
14:52:27 ERROR: Nothing RPROVIDES 'cockpit-dev' (but /mnt/jenkins/workspace/Yocto-world-arm/sources/meta-openembedded/meta-webserver/recipes-webadmin/cockpit/cockpit_217.bb RDEPENDS on or otherwise requires it)
14:52:27 No eligible RPROVIDERs exist for 'cockpit-dev'
14:52:27 ERROR: Nothing RPROVIDES 'cockpit-bridge' (but /mnt/jenkins/workspace/Yocto-world-arm/sources/meta-openembedded/meta-webserver/recipes-webadmin/cockpit/cockpit_217.bb RDEPENDS on or otherwise requires it)
14:52:27 No eligible RPROVIDERs exist for 'cockpit-bridge'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now I get it. I have now extended the "REQUIRED_DISTRO_FEATURES. Thank you.

pkgdatadir=${datadir}/cockpit

# avoid host contamination
find ${D}${datadir}/cockpit -name manifest.json -exec chown root:root {} \;
Copy link
Contributor

Choose a reason for hiding this comment

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

root seems to be iffy perhaps look into install target of the package and see if they are not using cp -a or some such

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately I have not yet found the cause of this.

Copy link
Contributor

Choose a reason for hiding this comment

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

In the install target, the files are copied using tar which leads to host contamination.
I have a patch for that I could add to a subsequent PR.

Copy link
Contributor Author

@hoinmic hoinmic May 2, 2020

Choose a reason for hiding this comment

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

That's great!
If desired you can make a pull request on https://github.com/hoinmic/meta-openembedded (branch feat/cockpit ). Then we could bring everything upstream at once in this pull request.

Copy link
Contributor

Choose a reason for hiding this comment

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

@eroullit its fine, please prepare a patch on top of master-next which already has this patch. and send a new pull.

@hoinmic hoinmic force-pushed the feat/cockpit branch 2 times, most recently from d6c258b to 0f175d3 Compare April 30, 2020 08:21
@hoinmic hoinmic changed the title cockpit: Add recipe version 217 cockpit: Add recipe version 218 Apr 30, 2020
@hoinmic
Copy link
Contributor Author

hoinmic commented Apr 30, 2020

I have updated to the latest Cockpit version released yesterday.
(Differences between cockpit recipe 217 and 218: In cockpit version 218 a patch from me is included, so PATCH 0003 could be removed.)

@hoinmic hoinmic requested a review from kraj April 30, 2020 11:52
Copy link
Contributor

@kraj kraj left a comment

Choose a reason for hiding this comment

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

LGTM

SRC_URI[md5sum] = "e69b0b8a75a5d55ddfd9817d857c71af"
SRC_URI[sha256sum] = "5f242cefccd7f1120c9e0310581aa51dbe941d9c4a6d8375c45057dcbb6f2fbb"

inherit gettext pkgconfig autotools systemd distro_features_check
Copy link
Contributor

Choose a reason for hiding this comment

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

distro_features_check is deprecated please use features_check

Copy link
Contributor

Choose a reason for hiding this comment

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

build fails on musl. I think it needs to depend on see http://errors.yoctoproject.org/Errors/Details/410052/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • My yocto version doesn't know features_check yet, so I didn't make any changes there.
  • Added fts in a fix
  • I wanted to do a squashed force-push with the corrections. But now I added a second commit, since the first commit was picked on the master-next branch. If this is not ok, let me know.

@hoinmic hoinmic requested a review from kraj May 3, 2020 19:42
@kraj
Copy link
Contributor

kraj commented May 3, 2020

I added this patch on top

diff --git a/meta-webserver/recipes-webadmin/cockpit/cockpit_218.bb b/meta-webserver/recipes-webadmin/cockpit/cockpit_218.bb
index 733a5ea921..8374d57257 100644
--- a/meta-webserver/recipes-webadmin/cockpit/cockpit_218.bb
+++ b/meta-webserver/recipes-webadmin/cockpit/cockpit_218.bb
@@ -13,10 +13,12 @@ SRC_URI += " \
SRC_URI[md5sum] = "e69b0b8a75a5d55ddfd9817d857c71af"
SRC_URI[sha256sum] = "5f242cefccd7f1120c9e0310581aa51dbe941d9c4a6d8375c45057dcbb6f2fbb"

-inherit gettext pkgconfig autotools systemd distro_features_check
+inherit gettext pkgconfig autotools systemd features_check

-DEPENDS += "glib-2.0-native intltool-native gnutls"
-DEPENDS += "virtual/gettext json-glib krb5 libpam"
+DEPENDS += "glib-2.0-native intltool-native gnutls virtual/gettext json-glib krb5 libpam systemd"
+
+DEPENDS_append_libc-musl = " fts libexecinfo"
+LDFLAGS_append_libc-musl = " -lfts"

RDEPENDS_${PN} += "glib-networking"

to see if it can compile with TCLIBC = "musl"

It ends up with more errors like

../cockpit-218/src/bridge/cockpitdbussetup.c:95:13: error: implicit declaration of function 'fgetpwent_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
ret = fgetpwent_r (fp, &pwb, buffer, buflen, &pw);
^
../cockpit-218/src/bridge/cockpitdbussetup.c:95:13: note: did you mean 'fgetpwent'?
/mnt/b/yoe/master/build/tmp/work/core2-32-yoe-linux-musl/cockpit/218-r0/recipe-sysroot/usr/include/pwd.h:42:16: note: 'fgetpwent' declared here
struct passwd *fgetpwent(FILE *);
^
../cockpit-218/src/bridge/cockpitdbussetup.c:132:13: error: implicit declaration of function 'fgetspent_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
ret = fgetspent_r (fp, &spb, buffer, buflen, &sp);
^
../cockpit-218/src/bridge/cockpitdbussetup.c:132:13: note: did you mean 'fgetspent'?
/mnt/b/yoe/master/build/tmp/work/core2-32-yoe-linux-musl/cockpit/218-r0/recipe-sysroot/usr/include/shadow.h:30:14: note: 'fgetspent' declared here
struct spwd *fgetspent(FILE *);
^
../cockpit-218/src/bridge/cockpitdbussetup.c:169:13: error: implicit declaration of function 'fgetgrent_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
ret = fgetgrent_r (fp, &grb, buffer, buflen, &gr);
^
../cockpit-218/src/bridge/cockpitdbussetup.c:169:13: note: did you mean 'fgetgrent'?
/mnt/b/yoe/master/build/tmp/work/core2-32-yoe-linux-musl/cockpit/218-r0/recipe-sysroot/usr/include/grp.h:39:16: note: 'fgetgrent' declared here
struct group  *fgetgrent(FILE *);

@hoinmic
Copy link
Contributor Author

hoinmic commented May 3, 2020

@kraj Sorry for this failure. Where can I find the setup of the CI, so that I can set this up locally identical to track down the errors?

@kraj
Copy link
Contributor

kraj commented May 3, 2020

@kraj Sorry for this failure. Where can I find the setup of the CI, so that I can set this up locally identical to track down the errors?

http://jenkins.nas-admin.org/view/OE/

musl task is http://jenkins.nas-admin.org/view/OE/job/oe_world_qemux86/

if you want to take a look at jenkins script
https://github.com/kraj/jenkins-jobs

@hoinmic
Copy link
Contributor Author

hoinmic commented May 3, 2020

@kraj thx

@hoinmic
Copy link
Contributor Author

hoinmic commented May 4, 2020

@Kray replaced second commit. New fix: No musl support. Runs only with glibc.

# only works on glibc systems
if d.getVar('TCLIBC') != "glibc":
raise bb.parse.SkipRecipe("incompatible with %s C library" % d.getVar('TCLIBC'))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Just add

COMPATIBLE_HOST_libc-musl = "null"

Copy link
Contributor Author

@hoinmic hoinmic May 4, 2020

Choose a reason for hiding this comment

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

@kraj Great!
Now I have combined all inputs to one commit. Hope everything fits :-)

Cockpit is a server manager that makes it easy to
administer your GNU/Linux servers via a web browser.

Signed-off-by: Michael Haener <michael.haener@siemens.com>
@kraj
Copy link
Contributor

kraj commented May 8, 2020

merged with 410e938

@kraj kraj closed this May 8, 2020
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Jan 19, 2021
5.2.0 (2020-11-05)

==================

- Add documentation section ``Persistency and Equality``
  (`openembedded#218 <https://github.com/zopefoundation/zope.interface/issues/218>`_).

- Create arm64 wheels.

- Add support for Python 3.9.

Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Jan 19, 2021
5.2.0 (2020-11-05)

==================

- Add documentation section ``Persistency and Equality``
  (`openembedded#218 <https://github.com/zopefoundation/zope.interface/issues/218>`_).

- Create arm64 wheels.

- Add support for Python 3.9.

Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Jan 19, 2021
5.2.0 (2020-11-05)

==================

- Add documentation section ``Persistency and Equality``
  (`openembedded#218 <https://github.com/zopefoundation/zope.interface/issues/218>`_).

- Create arm64 wheels.

- Add support for Python 3.9.

Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Jan 20, 2021
5.2.0 (2020-11-05)

==================

- Add documentation section ``Persistency and Equality``
  (`openembedded#218 <https://github.com/zopefoundation/zope.interface/issues/218>`_).

- Create arm64 wheels.

- Add support for Python 3.9.

Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
halstead pushed a commit that referenced this pull request Jan 20, 2021
5.2.0 (2020-11-05)

==================

- Add documentation section ``Persistency and Equality``
  (`#218 <https://github.com/zopefoundation/zope.interface/issues/218>`_).

- Create arm64 wheels.

- Add support for Python 3.9.

Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Acked-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Oct 23, 2023
Changelog:
===========
Feature
--------
Update for final cpython release (openembedded#263) (460a072)
Speed up unpacking arrays (openembedded#257) (5c8bfe5)
Speed up constructing Variant objects (openembedded#256) (0d7a665)
Speed up unmarshalling message body (openembedded#255) (5aed075)
Speed up unmarshalling Variants (openembedded#254) (dd74a84)
Speed up readers in the unmarshall path (openembedded#253) (f9b61b8)
Speed up first connection when using asyncio (openembedded#251) (0b6ba93)
Speed up unmarshaller (openembedded#250) (e4cae13)
Add cython typing for ServiceInterface.name (openembedded#248) (98c7e75)
Speed up connect and disconnect (openembedded#247) (8f39ba3)
Speed up unmarshalling by skipping unused unix_fds header (openembedded#246) (5f5a150)
Reduce overhead to reset between messages (openembedded#245) (da30b04)
Don't import backends by default (openembedded#243) (091d421)
Breaking
don't import backends by default (openembedded#243) (091d421)
Small speed up to the unmarshaller (openembedded#238) (b8d0e9b)
Build cpython 3.12 wheels (openembedded#234) (b38aa58)
Improve performance of processing incoming messages (openembedded#228) (ce61aea)
Reduce overhead to dispatch method handlers (openembedded#227) (b222552)
Speed up to processing bluez passive data (openembedded#221) (8e7432d)
Remove async_timeout dependency (openembedded#218) (7826897)
Speed up Message creation and callbacks (openembedded#217) (04d6451)
Optimize passive bluez message unmarshaller (openembedded#216) (e0e87ec)
Initial cpython 3.12 support (openembedded#207) (c755193)
Improve performance of reading from the socket during unmarshall (openembedded#200) (e5d355f)

Fix
-------------
Handling of None messages from notify callback (openembedded#236) (14f52f2)
Clean up address parsing and tests (openembedded#244) (370791d)
Handle multiple flag bits when unmarshalling (openembedded#241) (6f6f5f8)
Rebuild wheels with cython 3.0.2 (openembedded#235) (e8901a8)
Avoid cythonizing SendReply (openembedded#232) (d12266d)
Subpath bad matching (openembedded#202) (5d6f90b)
Messages could be sent out of order if they had to queue (openembedded#225) (4051cf2)
Avoid checking if a message expects a reply twice (openembedded#223) (823e85f)
Revert changes to _expects_reply from speed up to processing bluez passive data (openembedded#222) (dfa9053)
Spelling of dbus_fast.auth.AuthAnnonymous to dbus_fast.auth.AuthAnonymous (openembedded#220) (6c2412f)
More cython3 optional fixes (openembedded#219) (5b6cbc5)
Exception handler failure when exception is not DBusError (openembedded#215) (d771bcf)
Result typing in ServiceInterface._handle_signal (openembedded#214) (5bda04b)
Avoid double buffering when using asyncio reader without negotiate_unix_fd (openembedded#213) (c933be7)
Relax typing on _fn_result_to_body to allow Any (openembedded#212) (2f5fc38)
Typing on _fn_result_to_body was incorrect which was caused an exception with cython3 (openembedded#210) (c40c7bc)
Cython3 compat (openembedded#208) (43b3d48)
Reduce size of wheels by excluding generated .c files (openembedded#262) (dca4599)
Marshall multi-byte strings correctly (openembedded#261) (4de31a3)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
halstead pushed a commit that referenced this pull request Nov 3, 2023
Changelog:
===========
Feature
--------
Update for final cpython release (#263) (460a072)
Speed up unpacking arrays (#257) (5c8bfe5)
Speed up constructing Variant objects (#256) (0d7a665)
Speed up unmarshalling message body (#255) (5aed075)
Speed up unmarshalling Variants (#254) (dd74a84)
Speed up readers in the unmarshall path (#253) (f9b61b8)
Speed up first connection when using asyncio (#251) (0b6ba93)
Speed up unmarshaller (#250) (e4cae13)
Add cython typing for ServiceInterface.name (#248) (98c7e75)
Speed up connect and disconnect (#247) (8f39ba3)
Speed up unmarshalling by skipping unused unix_fds header (#246) (5f5a150)
Reduce overhead to reset between messages (#245) (da30b04)
Don't import backends by default (#243) (091d421)
Breaking
don't import backends by default (#243) (091d421)
Small speed up to the unmarshaller (#238) (b8d0e9b)
Build cpython 3.12 wheels (#234) (b38aa58)
Improve performance of processing incoming messages (#228) (ce61aea)
Reduce overhead to dispatch method handlers (#227) (b222552)
Speed up to processing bluez passive data (#221) (8e7432d)
Remove async_timeout dependency (#218) (7826897)
Speed up Message creation and callbacks (#217) (04d6451)
Optimize passive bluez message unmarshaller (#216) (e0e87ec)
Initial cpython 3.12 support (#207) (c755193)
Improve performance of reading from the socket during unmarshall (#200) (e5d355f)

Fix
-------------
Handling of None messages from notify callback (#236) (14f52f2)
Clean up address parsing and tests (#244) (370791d)
Handle multiple flag bits when unmarshalling (#241) (6f6f5f8)
Rebuild wheels with cython 3.0.2 (#235) (e8901a8)
Avoid cythonizing SendReply (#232) (d12266d)
Subpath bad matching (#202) (5d6f90b)
Messages could be sent out of order if they had to queue (#225) (4051cf2)
Avoid checking if a message expects a reply twice (#223) (823e85f)
Revert changes to _expects_reply from speed up to processing bluez passive data (#222) (dfa9053)
Spelling of dbus_fast.auth.AuthAnnonymous to dbus_fast.auth.AuthAnonymous (#220) (6c2412f)
More cython3 optional fixes (#219) (5b6cbc5)
Exception handler failure when exception is not DBusError (#215) (d771bcf)
Result typing in ServiceInterface._handle_signal (#214) (5bda04b)
Avoid double buffering when using asyncio reader without negotiate_unix_fd (#213) (c933be7)
Relax typing on _fn_result_to_body to allow Any (#212) (2f5fc38)
Typing on _fn_result_to_body was incorrect which was caused an exception with cython3 (#210) (c40c7bc)
Cython3 compat (#208) (43b3d48)
Reduce size of wheels by excluding generated .c files (#262) (dca4599)
Marshall multi-byte strings correctly (#261) (4de31a3)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit f10cf13)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants