summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-webadmin/cockpit
diff options
context:
space:
mode:
authorMichael Haener <michael.haener@siemens.com>2020-04-29 15:11:51 +0200
committerKhem Raj <raj.khem@gmail.com>2020-05-04 12:15:50 -0700
commit410e938f67d6d997863d716cd54120a4396dc6ec (patch)
tree487bcc861d1822c3fb8865b011370b08d87c5a28 /meta-webserver/recipes-webadmin/cockpit
parent14894a4c44a176761dd27e96df3dc389a1d12f34 (diff)
downloadmeta-openembedded-410e938f67d6d997863d716cd54120a4396dc6ec.tar.gz
cockpit: Add recipe version 218
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> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-webserver/recipes-webadmin/cockpit')
-rw-r--r--meta-webserver/recipes-webadmin/cockpit/cockpit_218.bb178
-rw-r--r--meta-webserver/recipes-webadmin/cockpit/files/0001-remove-tests-dep-on-gobject-intro.patch77
-rw-r--r--meta-webserver/recipes-webadmin/cockpit/files/0002-fix-makefile-use-copy-rule-for-unmodified-files.patch47
-rw-r--r--meta-webserver/recipes-webadmin/cockpit/files/cockpit.pam8
4 files changed, 310 insertions, 0 deletions
diff --git a/meta-webserver/recipes-webadmin/cockpit/cockpit_218.bb b/meta-webserver/recipes-webadmin/cockpit/cockpit_218.bb
new file mode 100644
index 000000000..863793a21
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/cockpit/cockpit_218.bb
@@ -0,0 +1,178 @@
1SUMMARY = "Admin interface for Linux machines"
2DESCRIPTION = "Cockpit makes it easy to administer your GNU/Linux servers via a web browser"
3
4LICENSE = "LGPLv2.1"
5LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
6
7SRC_URI += " \
8 https://github.com/cockpit-project/cockpit/releases/download/${PV}/cockpit-${PV}.tar.xz \
9 file://0001-remove-tests-dep-on-gobject-intro.patch \
10 file://0002-fix-makefile-use-copy-rule-for-unmodified-files.patch \
11 file://cockpit.pam \
12 "
13SRC_URI[md5sum] = "e69b0b8a75a5d55ddfd9817d857c71af"
14SRC_URI[sha256sum] = "5f242cefccd7f1120c9e0310581aa51dbe941d9c4a6d8375c45057dcbb6f2fbb"
15
16inherit gettext pkgconfig autotools systemd features_check
17
18DEPENDS += "glib-2.0-native intltool-native gnutls virtual/gettext json-glib krb5 libpam systemd"
19
20COMPATIBLE_HOST_libc-musl = "null"
21
22RDEPENDS_${PN} += "glib-networking"
23
24REQUIRED_DISTRO_FEATURES = "systemd pam"
25
26COCKPIT_USER_GROUP ?= "root"
27COCKPIT_WS_USER_GROUP ?= "${COCKPIT_USER_GROUP}"
28
29EXTRA_AUTORECONF = "-I tools"
30EXTRA_OECONF = " \
31 --with-cockpit-user=${COCKPIT_USER_GROUP} \
32 --with-cockpit-group=${COCKPIT_USER_GROUP} \
33 --with-cockpit-ws-instance-user=${COCKPIT_WS_USER_GROUP} \
34 --with-cockpit-ws-instance-group=${COCKPIT_WS_USER_GROUP} \
35 --disable-doc \
36 --with-systemdunitdir=${systemd_system_unitdir} \
37"
38
39PACKAGECONFIG[pcp] = "--enable-pcp,--disable-pcp,pcp"
40PACKAGECONFIG[dashboard] = "--enable-ssh,--disable-ssh,libssh"
41
42PACKAGES =+ " \
43 ${PN}-pcp \
44 ${PN}-realmd \
45 ${PN}-tuned \
46 ${PN}-shell \
47 ${PN}-systemd \
48 ${PN}-users \
49 ${PN}-kdump \
50 ${PN}-sosreport \
51 ${PN}-storaged \
52 ${PN}-networkmanager \
53 ${PN}-machines \
54 ${PN}-selinux \
55 ${PN}-playground \
56 ${PN}-docker \
57 ${PN}-dashboard \
58 ${PN}-bridge \
59 ${PN}-ws \
60 ${PN}-desktop \
61"
62SYSTEMD_PACKAGES = "${PN}-ws"
63
64FILES_${PN}-pcp = " \
65 ${libexecdir}/cockpit-pcp \
66 ${datadir}/cockpit/pcp \
67 ${localstatedir}/lib/pcp/config/pmlogconf/tools/cockpit \
68"
69FILES_${PN}-realmd = "${datadir}/cockpit/realmd"
70FILES_${PN}-tuned = "${datadir}/cockpit/tuned"
71FILES_${PN}-shell = "${datadir}/cockpit/shell"
72FILES_${PN}-systemd = "${datadir}/cockpit/systemd"
73FILES_${PN}-users = "${datadir}/cockpit/users"
74FILES_${PN}-kdump = " \
75 ${datadir}/cockpit/kdump \
76 ${datadir}/metainfo/org.cockpit-project.cockpit-kdump.metainfo.xml \
77"
78FILES_${PN}-sosreport = " \
79 ${datadir}/cockpit/sosreport \
80 ${datadir}/metainfo/org.cockpit-project.cockpit-sosreport.metainfo.xml \
81 ${datadir}/pixmaps/cockpit-sosreport.png \
82"
83FILES_${PN}-storaged = " \
84 ${datadir}/cockpit/storaged \
85 ${datadir}/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml \
86"
87FILES_${PN}-networkmanager = "${datadir}/cockpit/networkmanager"
88RDEPENDS_${PN}-networkmanager = "networkmanager"
89
90FILES_${PN}-machines = " \
91 ${datadir}/cockpit/machines \
92 ${datadir}/metainfo/org.cockpit-project.cockpit-machines.metainfo.xml \
93"
94FILES_${PN}-selinux = " \
95 ${datadir}/cockpit/selinux \
96 ${datadir}/metainfo/org.cockpit-project.cockpit-selinux.metainfo.xml \
97"
98FILES_${PN}-playground = "${datadir}/cockpit/playground"
99FILES_${PN}-docker = " \
100 ${datadir}/cockpit/docker \
101 ${datadir}/metainfo/org.cockpit-project.cockpit-docker.metainfo.xml \
102"
103FILES_${PN}-dashboard = "${datadir}/cockpit/dashboard"
104ALLOW_EMPTY_${PN}-dashboard = "1"
105
106FILES_${PN}-bridge = " \
107 ${bindir}/cockpit-bridge \
108 ${libexec}/cockpit-askpass \
109"
110RDEPENDS_${PN}-bridge = ""
111
112FILES_${PN}-desktop = "${libexecdir}/cockpit-desktop"
113RDEPENDS_${PN}-desktop += "bash"
114
115FILES_${PN}-ws = " \
116 ${sysconfdir}/cockpit/ws-certs.d \
117 ${sysconfdir}/pam.d/cockpit \
118 ${sysconfdir}/issue.d/cockpit.issue \
119 ${sysconfdir}/motd.d/cockpit \
120 ${datadir}/cockpit/motd/update-motd \
121 ${datadir}/cockpit/motd/inactive.motd \
122 ${systemd_system_unitdir}/cockpit.service \
123 ${systemd_system_unitdir}/cockpit-motd.service \
124 ${systemd_system_unitdir}/cockpit.socket \
125 ${systemd_system_unitdir}/cockpit-wsinstance-http.socket \
126 ${systemd_system_unitdir}/cockpit-wsinstance-http.service \
127 ${systemd_system_unitdir}/cockpit-wsinstance-http-redirect.socket \
128 ${systemd_system_unitdir}/cockpit-wsinstance-http-redirect.service \
129 ${systemd_system_unitdir}/cockpit-wsinstance-https-factory.socket \
130 ${systemd_system_unitdir}/cockpit-wsinstance-https-factory@.service \
131 ${systemd_system_unitdir}/cockpit-wsinstance-https@.socket \
132 ${systemd_system_unitdir}/cockpit-wsinstance-https@.service \
133 ${systemd_system_unitdir}/system-cockpithttps.slice \
134 ${libdir}/tmpfiles.d/cockpit-tempfiles.conf \
135 ${sbindir}/remotectl \
136 ${libdir}/security/pam_ssh_add.so \
137 ${libdir}/security/pam_cockpit_cert.so \
138 ${libexecdir}/cockpit-ws \
139 ${libexecdir}/cockpit-wsinstance-factory \
140 ${libexecdir}/cockpit-tls \
141 ${libexecdir}/cockpit-session \
142 ${localstatedir}/lib/cockpit \
143 ${datadir}/cockpit/static \
144 ${datadir}/cockpit/branding \
145"
146CONFFILES_${PN}-ws += " \
147 ${sysconfdir}/issue.d/cockpit.issue \
148 ${sysconfdir}/motd.d/cockpit \
149"
150RDEPENDS_${PN}-ws += "openssl-bin"
151SYSTEMD_SERVICE_${PN}-ws = "cockpit.socket"
152
153FILES_${PN} += " \
154 ${datadir}/cockpit/base1 \
155 ${sysconfdir}/cockpit/machines.d \
156 ${datadir}/polkit-1/actions/org.cockpit-project.cockpit-bridge.policy \
157 ${datadir}/cockpit/ssh \
158 ${libexecdir}/cockpit-ssh \
159 ${datadir}/cockpit \
160 ${datadir}/metainfo/cockpit.appdata.xml \
161 ${datadir}/pixmaps/cockpit.png \
162"
163RDEPENDS_${PN} += "${PN}-bridge"
164
165do_install_append() {
166 pkgdatadir=${datadir}/cockpit
167
168 # avoid host contamination
169 find ${D}${datadir}/cockpit -name manifest.json -exec chown root:root {} \;
170
171 chmod 4750 ${D}${libexecdir}/cockpit-session
172
173 install -d "${D}${sysconfdir}/pam.d"
174 install -p -m 0644 ${WORKDIR}/cockpit.pam ${D}${sysconfdir}/pam.d/cockpit
175
176 # provided by firewalld
177 rm -rf ${D}${libdir}/firewalld
178}
diff --git a/meta-webserver/recipes-webadmin/cockpit/files/0001-remove-tests-dep-on-gobject-intro.patch b/meta-webserver/recipes-webadmin/cockpit/files/0001-remove-tests-dep-on-gobject-intro.patch
new file mode 100644
index 000000000..2242190a3
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/cockpit/files/0001-remove-tests-dep-on-gobject-intro.patch
@@ -0,0 +1,77 @@
1From 788aace494f79e8201b18ebcdf1592b5030c5295 Mon Sep 17 00:00:00 2001
2From: Adrian Freihofer <adrian.freihofer@siemens.com>
3Date: Wed, 4 Dec 2019 17:23:46 +0100
4Subject: [PATCH] remove tests dep on gobject-intro
5
6---
7 src/ws/Makefile-ws.am | 54 ---------------------------------------------------
8 1 file changed, 54 deletions(-)
9
10diff --git a/src/ws/Makefile-ws.am b/src/ws/Makefile-ws.am
11index 009130941..34e13d7fe 100644
12--- a/src/ws/Makefile-ws.am
13+++ b/src/ws/Makefile-ws.am
14@@ -246,60 +246,6 @@ EXTRA_DIST += \
15
16 # ----------------------------------------------------------------------------------------------------
17
18-noinst_PROGRAMS += test-server
19-check_PROGRAMS += test-server
20-
21-GDBUS_CODEGEN_XML = $(srcdir)/src/ws/com.redhat.Cockpit.DBusTests.xml
22-
23-GDBUS_CODEGEN_GENERATED = \
24- src/ws/mock-dbus-tests.h \
25- src/ws/mock-dbus-tests.c \
26- $(NULL)
27-
28-# FIXME: --header/--body and --output are only available from GLib 2.56.
29-# just use --generate-c-code and a bit of dependency ugliness for now
30-GDBUS_CODEGEN_INVOCATION = \
31- $(AM_V_GEN) gdbus-codegen \
32- --interface-prefix com.redhat.Cockpit.DBusTests \
33- --c-namespace Test \
34- --c-generate-object-manager \
35- --generate-c-code src/ws/mock-dbus-tests \
36- $(GDBUS_CODEGEN_XML)
37-
38-BUILT_SOURCES += $(GDBUS_CODEGEN_GENERATED)
39-CLEANFILES += $(GDBUS_CODEGEN_GENERATED)
40-EXTRA_DIST += $(GDBUS_CODEGEN_XML)
41-
42-src/ws/mock-dbus-tests.h: $(GDBUS_CODEGEN_XML)
43- $(GDBUS_CODEGEN_INVOCATION)
44-
45-src/ws/mock-dbus-tests.c: $(GDBUS_CODEGEN_XML) src/ws/mock-dbus-tests.h
46- $(GDBUS_CODEGEN_INVOCATION)
47-
48-test_server_SOURCES = \
49- src/ws/mock-service.c \
50- src/ws/mock-service.h \
51- src/ws/test-server.c \
52- $(NULL)
53-
54-nodist_test_server_SOURCES = \
55- $(GDBUS_CODEGEN_GENERATED) \
56- $(NULL)
57-
58-test_server_CFLAGS = \
59- -I$(builddir)/src/ws \
60- -I$(top_srcdir)/src/ws \
61- -DG_LOG_DOMAIN=\"test-server\" \
62- $(GIO_CFLAGS) \
63- $(COCKPIT_WS_CFLAGS) \
64- $(NULL)
65-
66-test_server_LDADD = \
67- $(libcockpit_ws_LIBS) \
68- $(GIO_LIBS) \
69- -lpam \
70- $(NULL)
71-
72 WS_CHECKS = \
73 test-base64 \
74 test-creds \
75--
762.11.0
77
diff --git a/meta-webserver/recipes-webadmin/cockpit/files/0002-fix-makefile-use-copy-rule-for-unmodified-files.patch b/meta-webserver/recipes-webadmin/cockpit/files/0002-fix-makefile-use-copy-rule-for-unmodified-files.patch
new file mode 100644
index 000000000..a1ea9bcfd
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/cockpit/files/0002-fix-makefile-use-copy-rule-for-unmodified-files.patch
@@ -0,0 +1,47 @@
1From 1edf0756bf4fd002f5b60cf2b86d4b97a00aff20 Mon Sep 17 00:00:00 2001
2From: Michael Haener <michael.haener@siemens.com>
3Date: Wed, 25 Mar 2020 08:32:07 +0100
4Subject: [PATCH] fix(makefile): use copy rule for unmodified files
5
6---
7 pkg/Makefile.am | 27 +++++++++++++++++++++++++++
8 1 file changed, 27 insertions(+)
9
10diff --git a/pkg/Makefile.am b/pkg/Makefile.am
11index 192b785..03b9787 100644
12--- a/pkg/Makefile.am
13+++ b/pkg/Makefile.am
14@@ -13,6 +13,33 @@ playground_DATA = \
15 dist/playground/extra.de.po: pkg/playground/extra.de.po
16 $(COPY_RULE)
17
18+dist/playground/hammer.gif: pkg/playground/hammer.gif
19+ $(COPY_RULE)
20+
21+dist/sosreport/sosreport.png: pkg/sosreport/sosreport.png
22+ $(COPY_RULE)
23+
24+dist/apps/default.png: pkg/apps/default.png
25+ $(COPY_RULE)
26+
27+dist/storaged/images/storage-array.png: pkg/storaged/images/storage-array.png
28+ $(COPY_RULE)
29+
30+dist/storaged/images/storage-disk.png: pkg/storaged/images/storage-disk.png
31+ $(COPY_RULE)
32+
33+dist/shell/images/server-error.png: pkg/shell/images/server-error.png
34+ $(COPY_RULE)
35+
36+dist/shell/images/server-large.png: pkg/shell/images/server-large.png
37+ $(COPY_RULE)
38+
39+dist/shell/images/server-small.png: pkg/shell/images/server-small.png
40+ $(COPY_RULE)
41+
42+dist/shell/index.html: pkg/shell/index.html
43+ $(COPY_RULE)
44+
45 metainfodir = ${datarootdir}/metainfo
46 metainfo_DATA = pkg/sosreport/org.cockpit-project.cockpit-sosreport.metainfo.xml \
47 pkg/kdump/org.cockpit-project.cockpit-kdump.metainfo.xml \
diff --git a/meta-webserver/recipes-webadmin/cockpit/files/cockpit.pam b/meta-webserver/recipes-webadmin/cockpit/files/cockpit.pam
new file mode 100644
index 000000000..dd09e29ee
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/cockpit/files/cockpit.pam
@@ -0,0 +1,8 @@
1#%PAM-1.0
2auth required pam_unix.so nullok
3
4account required pam_unix.so
5
6-session optional pam_systemd.so
7session required pam_unix.so
8session optional pam_keyinit.so force revoke