blob: 2f920b417f7b95c7700e30ec9d2aa26f7a6149f2 [file] [log] [blame]
Andrew Geissler7f40b712020-05-15 14:09:53 -05001SUMMARY = "Admin interface for Linux machines"
2DESCRIPTION = "Cockpit makes it easy to administer your GNU/Linux servers via a web browser"
3
Andrew Geissler9aee5002022-03-30 16:27:02 +00004LICENSE = "LGPL-2.1-only"
Andrew Geissler7f40b712020-05-15 14:09:53 -05005LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
6
7SRC_URI += " \
8 https://github.com/cockpit-project/cockpit/releases/download/${PV}/cockpit-${PV}.tar.xz \
Andrew Geissler87f5cff2022-09-30 13:13:31 -05009 file://0001-Warn-not-error-if-xsltproc-is-not-found.patch \
Andrew Geissler7f40b712020-05-15 14:09:53 -050010 file://cockpit.pam \
11 "
Patrick Williams8e7b46e2023-05-01 14:19:06 -050012SRC_URI[sha256sum] = "3f8e369b21dbe9f5e05ac6ffd8c7a58ad5759065bea29b3b14c937a17f030eb5"
Andrew Geissler7f40b712020-05-15 14:09:53 -050013
14inherit gettext pkgconfig autotools systemd features_check
15
16DEPENDS += "glib-2.0-native intltool-native gnutls virtual/gettext json-glib krb5 libpam systemd"
17
Patrick Williams213cb262021-08-07 19:21:33 -050018COMPATIBLE_HOST:libc-musl = "null"
Andrew Geissler7f40b712020-05-15 14:09:53 -050019
Patrick Williams213cb262021-08-07 19:21:33 -050020RDEPENDS:${PN} += "glib-networking"
Andrew Geissler7f40b712020-05-15 14:09:53 -050021
22REQUIRED_DISTRO_FEATURES = "systemd pam"
23
24COCKPIT_USER_GROUP ?= "root"
25COCKPIT_WS_USER_GROUP ?= "${COCKPIT_USER_GROUP}"
26
27EXTRA_AUTORECONF = "-I tools"
28EXTRA_OECONF = " \
29 --with-cockpit-user=${COCKPIT_USER_GROUP} \
30 --with-cockpit-group=${COCKPIT_USER_GROUP} \
Andrew Geissler87f5cff2022-09-30 13:13:31 -050031 --with-admin-group=${COCKPIT_USER_GROUP} \
Andrew Geissler7f40b712020-05-15 14:09:53 -050032 --with-cockpit-ws-instance-user=${COCKPIT_WS_USER_GROUP} \
33 --with-cockpit-ws-instance-group=${COCKPIT_WS_USER_GROUP} \
34 --disable-doc \
35 --with-systemdunitdir=${systemd_system_unitdir} \
36"
37
Andrew Geisslereafcbb82020-06-05 17:59:17 -050038PACKAGECONFIG ??= " \
39 ${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)} \
40"
41
Andrew Geissler7f40b712020-05-15 14:09:53 -050042PACKAGECONFIG[pcp] = "--enable-pcp,--disable-pcp,pcp"
43PACKAGECONFIG[dashboard] = "--enable-ssh,--disable-ssh,libssh"
Andrew Geissler2ee498a2020-05-29 15:52:06 -050044PACKAGECONFIG[storaged] = ",,,udisks2"
Andrew Geisslereafcbb82020-06-05 17:59:17 -050045PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit"
Andrew Geissler7f40b712020-05-15 14:09:53 -050046
47PACKAGES =+ " \
48 ${PN}-pcp \
49 ${PN}-realmd \
50 ${PN}-tuned \
51 ${PN}-shell \
52 ${PN}-systemd \
53 ${PN}-users \
54 ${PN}-kdump \
55 ${PN}-sosreport \
56 ${PN}-storaged \
57 ${PN}-networkmanager \
58 ${PN}-machines \
59 ${PN}-selinux \
60 ${PN}-playground \
61 ${PN}-docker \
62 ${PN}-dashboard \
63 ${PN}-bridge \
64 ${PN}-ws \
65 ${PN}-desktop \
66"
67SYSTEMD_PACKAGES = "${PN}-ws"
68
Patrick Williams213cb262021-08-07 19:21:33 -050069FILES:${PN}-pcp = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -050070 ${libexecdir}/cockpit-pcp \
71 ${datadir}/cockpit/pcp \
72 ${localstatedir}/lib/pcp/config/pmlogconf/tools/cockpit \
73"
Patrick Williams213cb262021-08-07 19:21:33 -050074FILES:${PN}-realmd = "${datadir}/cockpit/realmd"
75FILES:${PN}-tuned = "${datadir}/cockpit/tuned"
76FILES:${PN}-shell = "${datadir}/cockpit/shell"
77FILES:${PN}-systemd = "${datadir}/cockpit/systemd"
78FILES:${PN}-users = "${datadir}/cockpit/users"
79FILES:${PN}-kdump = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -050080 ${datadir}/cockpit/kdump \
81 ${datadir}/metainfo/org.cockpit-project.cockpit-kdump.metainfo.xml \
82"
Patrick Williams213cb262021-08-07 19:21:33 -050083FILES:${PN}-sosreport = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -050084 ${datadir}/cockpit/sosreport \
85 ${datadir}/metainfo/org.cockpit-project.cockpit-sosreport.metainfo.xml \
86 ${datadir}/pixmaps/cockpit-sosreport.png \
87"
Patrick Williams213cb262021-08-07 19:21:33 -050088FILES:${PN}-storaged = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -050089 ${datadir}/cockpit/storaged \
90 ${datadir}/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml \
91"
Andrew Geissler7f40b712020-05-15 14:09:53 -050092
Patrick Williams8e7b46e2023-05-01 14:19:06 -050093FILES:${PN}-networkmanager = " \
94 ${datadir}/cockpit/networkmanager \
95 ${datadir}/metainfo/org.cockpit-project.cockpit-networkmanager.metainfo.xml \
96"
Patrick Williams213cb262021-08-07 19:21:33 -050097RDEPENDS:${PN}-networkmanager = "networkmanager"
Andrew Geissler7f40b712020-05-15 14:09:53 -050098
Patrick Williams213cb262021-08-07 19:21:33 -050099FILES:${PN}-machines = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500100 ${datadir}/cockpit/machines \
101 ${datadir}/metainfo/org.cockpit-project.cockpit-machines.metainfo.xml \
102"
Patrick Williams213cb262021-08-07 19:21:33 -0500103FILES:${PN}-selinux = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500104 ${datadir}/cockpit/selinux \
105 ${datadir}/metainfo/org.cockpit-project.cockpit-selinux.metainfo.xml \
106"
Patrick Williams213cb262021-08-07 19:21:33 -0500107FILES:${PN}-playground = "${datadir}/cockpit/playground"
108FILES:${PN}-docker = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500109 ${datadir}/cockpit/docker \
110 ${datadir}/metainfo/org.cockpit-project.cockpit-docker.metainfo.xml \
111"
Patrick Williams213cb262021-08-07 19:21:33 -0500112FILES:${PN}-dashboard = "${datadir}/cockpit/dashboard"
113ALLOW_EMPTY:${PN}-dashboard = "1"
Andrew Geissler7f40b712020-05-15 14:09:53 -0500114
Patrick Williams213cb262021-08-07 19:21:33 -0500115FILES:${PN}-bridge = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500116 ${bindir}/cockpit-bridge \
117 ${libexec}/cockpit-askpass \
118"
Patrick Williams213cb262021-08-07 19:21:33 -0500119RDEPENDS:${PN}-bridge = ""
Andrew Geissler7f40b712020-05-15 14:09:53 -0500120
Patrick Williams213cb262021-08-07 19:21:33 -0500121FILES:${PN}-desktop = "${libexecdir}/cockpit-desktop"
122RDEPENDS:${PN}-desktop += "bash"
Andrew Geissler7f40b712020-05-15 14:09:53 -0500123
Patrick Williams213cb262021-08-07 19:21:33 -0500124FILES:${PN}-ws = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500125 ${sysconfdir}/cockpit/ws-certs.d \
126 ${sysconfdir}/pam.d/cockpit \
127 ${sysconfdir}/issue.d/cockpit.issue \
128 ${sysconfdir}/motd.d/cockpit \
129 ${datadir}/cockpit/motd/update-motd \
130 ${datadir}/cockpit/motd/inactive.motd \
131 ${systemd_system_unitdir}/cockpit.service \
132 ${systemd_system_unitdir}/cockpit-motd.service \
133 ${systemd_system_unitdir}/cockpit.socket \
Patrick Williams8e7b46e2023-05-01 14:19:06 -0500134 ${systemd_system_unitdir}/cockpit-session.socket \
135 ${systemd_system_unitdir}/cockpit-session@.service \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500136 ${systemd_system_unitdir}/cockpit-wsinstance-http.socket \
137 ${systemd_system_unitdir}/cockpit-wsinstance-http.service \
138 ${systemd_system_unitdir}/cockpit-wsinstance-http-redirect.socket \
139 ${systemd_system_unitdir}/cockpit-wsinstance-http-redirect.service \
140 ${systemd_system_unitdir}/cockpit-wsinstance-https-factory.socket \
141 ${systemd_system_unitdir}/cockpit-wsinstance-https-factory@.service \
142 ${systemd_system_unitdir}/cockpit-wsinstance-https@.socket \
143 ${systemd_system_unitdir}/cockpit-wsinstance-https@.service \
144 ${systemd_system_unitdir}/system-cockpithttps.slice \
145 ${libdir}/tmpfiles.d/cockpit-tempfiles.conf \
146 ${sbindir}/remotectl \
147 ${libdir}/security/pam_ssh_add.so \
148 ${libdir}/security/pam_cockpit_cert.so \
149 ${libexecdir}/cockpit-ws \
150 ${libexecdir}/cockpit-wsinstance-factory \
151 ${libexecdir}/cockpit-tls \
152 ${libexecdir}/cockpit-session \
153 ${localstatedir}/lib/cockpit \
154 ${datadir}/cockpit/static \
155 ${datadir}/cockpit/branding \
156"
Patrick Williams213cb262021-08-07 19:21:33 -0500157CONFFILES:${PN}-ws += " \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500158 ${sysconfdir}/issue.d/cockpit.issue \
159 ${sysconfdir}/motd.d/cockpit \
160"
Patrick Williams213cb262021-08-07 19:21:33 -0500161RDEPENDS:${PN}-ws += "openssl-bin"
162SYSTEMD_SERVICE:${PN}-ws = "cockpit.socket"
Andrew Geissler7f40b712020-05-15 14:09:53 -0500163
Patrick Williams213cb262021-08-07 19:21:33 -0500164FILES:${PN} += " \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500165 ${datadir}/cockpit/base1 \
166 ${sysconfdir}/cockpit/machines.d \
167 ${datadir}/polkit-1/actions/org.cockpit-project.cockpit-bridge.policy \
168 ${datadir}/cockpit/ssh \
169 ${libexecdir}/cockpit-ssh \
170 ${datadir}/cockpit \
171 ${datadir}/metainfo/cockpit.appdata.xml \
172 ${datadir}/pixmaps/cockpit.png \
Andrew Geissler9aee5002022-03-30 16:27:02 +0000173 ${nonarch_libdir}/tmpfiles.d \
174 ${nonarch_libdir}/firewalld \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500175"
Patrick Williams213cb262021-08-07 19:21:33 -0500176RDEPENDS:${PN} += "${PN}-bridge"
Andrew Geissler87f5cff2022-09-30 13:13:31 -0500177# Needs bash for /usr/libexec/cockpit-certificate-helper
178RDEPENDS:${PN} += "bash"
Andrew Geissler7f40b712020-05-15 14:09:53 -0500179
Patrick Williams213cb262021-08-07 19:21:33 -0500180do_install:append() {
Andrew Geissler7f40b712020-05-15 14:09:53 -0500181 pkgdatadir=${datadir}/cockpit
182
183 chmod 4750 ${D}${libexecdir}/cockpit-session
184
185 install -d "${D}${sysconfdir}/pam.d"
186 install -p -m 0644 ${WORKDIR}/cockpit.pam ${D}${sysconfdir}/pam.d/cockpit
187
188 # provided by firewalld
189 rm -rf ${D}${libdir}/firewalld
Andrew Geissler2ee498a2020-05-29 15:52:06 -0500190
191 if ! ${@bb.utils.contains('PACKAGECONFIG', 'storaged', 'true', 'false', d)}; then
Patrick Williams213cb262021-08-07 19:21:33 -0500192 for filename in ${FILES:${PN}-storaged}
Andrew Geissler2ee498a2020-05-29 15:52:06 -0500193 do
194 rm -rf ${D}$filename
195 done
196 fi
Andrew Geissler7f40b712020-05-15 14:09:53 -0500197}