blob: 93198e3569c2ed7e3887a1c5d4f6094a773f14fd [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 \
9 file://0001-remove-tests-dep-on-gobject-intro.patch \
10 file://0002-fix-makefile-use-copy-rule-for-unmodified-files.patch \
Andrew Geissler87f5cff2022-09-30 13:13:31 -050011 file://0001-Warn-not-error-if-xsltproc-is-not-found.patch \
Andrew Geissler7f40b712020-05-15 14:09:53 -050012 file://cockpit.pam \
13 "
Andrew Geissler87f5cff2022-09-30 13:13:31 -050014SRC_URI[sha256sum] = "dde91a157ee8514112334653fa2775a99d71bd1b604067a48eaf7411114d19de"
Andrew Geissler7f40b712020-05-15 14:09:53 -050015
16inherit gettext pkgconfig autotools systemd features_check
17
18DEPENDS += "glib-2.0-native intltool-native gnutls virtual/gettext json-glib krb5 libpam systemd"
19
Patrick Williams213cb262021-08-07 19:21:33 -050020COMPATIBLE_HOST:libc-musl = "null"
Andrew Geissler7f40b712020-05-15 14:09:53 -050021
Patrick Williams213cb262021-08-07 19:21:33 -050022RDEPENDS:${PN} += "glib-networking"
Andrew Geissler7f40b712020-05-15 14:09:53 -050023
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} \
Andrew Geissler87f5cff2022-09-30 13:13:31 -050033 --with-admin-group=${COCKPIT_USER_GROUP} \
Andrew Geissler7f40b712020-05-15 14:09:53 -050034 --with-cockpit-ws-instance-user=${COCKPIT_WS_USER_GROUP} \
35 --with-cockpit-ws-instance-group=${COCKPIT_WS_USER_GROUP} \
36 --disable-doc \
37 --with-systemdunitdir=${systemd_system_unitdir} \
38"
39
Andrew Geisslereafcbb82020-06-05 17:59:17 -050040PACKAGECONFIG ??= " \
41 ${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)} \
42"
43
Andrew Geissler7f40b712020-05-15 14:09:53 -050044PACKAGECONFIG[pcp] = "--enable-pcp,--disable-pcp,pcp"
45PACKAGECONFIG[dashboard] = "--enable-ssh,--disable-ssh,libssh"
Andrew Geissler2ee498a2020-05-29 15:52:06 -050046PACKAGECONFIG[storaged] = ",,,udisks2"
Andrew Geisslereafcbb82020-06-05 17:59:17 -050047PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit"
Andrew Geissler7f40b712020-05-15 14:09:53 -050048
49PACKAGES =+ " \
50 ${PN}-pcp \
51 ${PN}-realmd \
52 ${PN}-tuned \
53 ${PN}-shell \
54 ${PN}-systemd \
55 ${PN}-users \
56 ${PN}-kdump \
57 ${PN}-sosreport \
58 ${PN}-storaged \
59 ${PN}-networkmanager \
60 ${PN}-machines \
61 ${PN}-selinux \
62 ${PN}-playground \
63 ${PN}-docker \
64 ${PN}-dashboard \
65 ${PN}-bridge \
66 ${PN}-ws \
67 ${PN}-desktop \
68"
69SYSTEMD_PACKAGES = "${PN}-ws"
70
Patrick Williams213cb262021-08-07 19:21:33 -050071FILES:${PN}-pcp = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -050072 ${libexecdir}/cockpit-pcp \
73 ${datadir}/cockpit/pcp \
74 ${localstatedir}/lib/pcp/config/pmlogconf/tools/cockpit \
75"
Patrick Williams213cb262021-08-07 19:21:33 -050076FILES:${PN}-realmd = "${datadir}/cockpit/realmd"
77FILES:${PN}-tuned = "${datadir}/cockpit/tuned"
78FILES:${PN}-shell = "${datadir}/cockpit/shell"
79FILES:${PN}-systemd = "${datadir}/cockpit/systemd"
80FILES:${PN}-users = "${datadir}/cockpit/users"
81FILES:${PN}-kdump = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -050082 ${datadir}/cockpit/kdump \
83 ${datadir}/metainfo/org.cockpit-project.cockpit-kdump.metainfo.xml \
84"
Patrick Williams213cb262021-08-07 19:21:33 -050085FILES:${PN}-sosreport = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -050086 ${datadir}/cockpit/sosreport \
87 ${datadir}/metainfo/org.cockpit-project.cockpit-sosreport.metainfo.xml \
88 ${datadir}/pixmaps/cockpit-sosreport.png \
89"
Patrick Williams213cb262021-08-07 19:21:33 -050090FILES:${PN}-storaged = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -050091 ${datadir}/cockpit/storaged \
92 ${datadir}/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml \
93"
Andrew Geissler7f40b712020-05-15 14:09:53 -050094
Patrick Williams213cb262021-08-07 19:21:33 -050095FILES:${PN}-networkmanager = "${datadir}/cockpit/networkmanager"
96RDEPENDS:${PN}-networkmanager = "networkmanager"
Andrew Geissler7f40b712020-05-15 14:09:53 -050097
Patrick Williams213cb262021-08-07 19:21:33 -050098FILES:${PN}-machines = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -050099 ${datadir}/cockpit/machines \
100 ${datadir}/metainfo/org.cockpit-project.cockpit-machines.metainfo.xml \
101"
Patrick Williams213cb262021-08-07 19:21:33 -0500102FILES:${PN}-selinux = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500103 ${datadir}/cockpit/selinux \
104 ${datadir}/metainfo/org.cockpit-project.cockpit-selinux.metainfo.xml \
105"
Patrick Williams213cb262021-08-07 19:21:33 -0500106FILES:${PN}-playground = "${datadir}/cockpit/playground"
107FILES:${PN}-docker = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500108 ${datadir}/cockpit/docker \
109 ${datadir}/metainfo/org.cockpit-project.cockpit-docker.metainfo.xml \
110"
Patrick Williams213cb262021-08-07 19:21:33 -0500111FILES:${PN}-dashboard = "${datadir}/cockpit/dashboard"
112ALLOW_EMPTY:${PN}-dashboard = "1"
Andrew Geissler7f40b712020-05-15 14:09:53 -0500113
Patrick Williams213cb262021-08-07 19:21:33 -0500114FILES:${PN}-bridge = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500115 ${bindir}/cockpit-bridge \
116 ${libexec}/cockpit-askpass \
117"
Patrick Williams213cb262021-08-07 19:21:33 -0500118RDEPENDS:${PN}-bridge = ""
Andrew Geissler7f40b712020-05-15 14:09:53 -0500119
Patrick Williams213cb262021-08-07 19:21:33 -0500120FILES:${PN}-desktop = "${libexecdir}/cockpit-desktop"
121RDEPENDS:${PN}-desktop += "bash"
Andrew Geissler7f40b712020-05-15 14:09:53 -0500122
Patrick Williams213cb262021-08-07 19:21:33 -0500123FILES:${PN}-ws = " \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500124 ${sysconfdir}/cockpit/ws-certs.d \
125 ${sysconfdir}/pam.d/cockpit \
126 ${sysconfdir}/issue.d/cockpit.issue \
127 ${sysconfdir}/motd.d/cockpit \
128 ${datadir}/cockpit/motd/update-motd \
129 ${datadir}/cockpit/motd/inactive.motd \
130 ${systemd_system_unitdir}/cockpit.service \
131 ${systemd_system_unitdir}/cockpit-motd.service \
132 ${systemd_system_unitdir}/cockpit.socket \
133 ${systemd_system_unitdir}/cockpit-wsinstance-http.socket \
134 ${systemd_system_unitdir}/cockpit-wsinstance-http.service \
135 ${systemd_system_unitdir}/cockpit-wsinstance-http-redirect.socket \
136 ${systemd_system_unitdir}/cockpit-wsinstance-http-redirect.service \
137 ${systemd_system_unitdir}/cockpit-wsinstance-https-factory.socket \
138 ${systemd_system_unitdir}/cockpit-wsinstance-https-factory@.service \
139 ${systemd_system_unitdir}/cockpit-wsinstance-https@.socket \
140 ${systemd_system_unitdir}/cockpit-wsinstance-https@.service \
141 ${systemd_system_unitdir}/system-cockpithttps.slice \
142 ${libdir}/tmpfiles.d/cockpit-tempfiles.conf \
143 ${sbindir}/remotectl \
144 ${libdir}/security/pam_ssh_add.so \
145 ${libdir}/security/pam_cockpit_cert.so \
146 ${libexecdir}/cockpit-ws \
147 ${libexecdir}/cockpit-wsinstance-factory \
148 ${libexecdir}/cockpit-tls \
149 ${libexecdir}/cockpit-session \
150 ${localstatedir}/lib/cockpit \
151 ${datadir}/cockpit/static \
152 ${datadir}/cockpit/branding \
153"
Patrick Williams213cb262021-08-07 19:21:33 -0500154CONFFILES:${PN}-ws += " \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500155 ${sysconfdir}/issue.d/cockpit.issue \
156 ${sysconfdir}/motd.d/cockpit \
157"
Patrick Williams213cb262021-08-07 19:21:33 -0500158RDEPENDS:${PN}-ws += "openssl-bin"
159SYSTEMD_SERVICE:${PN}-ws = "cockpit.socket"
Andrew Geissler7f40b712020-05-15 14:09:53 -0500160
Patrick Williams213cb262021-08-07 19:21:33 -0500161FILES:${PN} += " \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500162 ${datadir}/cockpit/base1 \
163 ${sysconfdir}/cockpit/machines.d \
164 ${datadir}/polkit-1/actions/org.cockpit-project.cockpit-bridge.policy \
165 ${datadir}/cockpit/ssh \
166 ${libexecdir}/cockpit-ssh \
167 ${datadir}/cockpit \
168 ${datadir}/metainfo/cockpit.appdata.xml \
169 ${datadir}/pixmaps/cockpit.png \
Andrew Geissler9aee5002022-03-30 16:27:02 +0000170 ${nonarch_libdir}/tmpfiles.d \
171 ${nonarch_libdir}/firewalld \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500172"
Patrick Williams213cb262021-08-07 19:21:33 -0500173RDEPENDS:${PN} += "${PN}-bridge"
Andrew Geissler87f5cff2022-09-30 13:13:31 -0500174# Needs bash for /usr/libexec/cockpit-certificate-helper
175RDEPENDS:${PN} += "bash"
Andrew Geissler7f40b712020-05-15 14:09:53 -0500176
Patrick Williams213cb262021-08-07 19:21:33 -0500177do_install:append() {
Andrew Geissler7f40b712020-05-15 14:09:53 -0500178 pkgdatadir=${datadir}/cockpit
179
180 chmod 4750 ${D}${libexecdir}/cockpit-session
181
182 install -d "${D}${sysconfdir}/pam.d"
183 install -p -m 0644 ${WORKDIR}/cockpit.pam ${D}${sysconfdir}/pam.d/cockpit
184
185 # provided by firewalld
186 rm -rf ${D}${libdir}/firewalld
Andrew Geissler2ee498a2020-05-29 15:52:06 -0500187
188 if ! ${@bb.utils.contains('PACKAGECONFIG', 'storaged', 'true', 'false', d)}; then
Patrick Williams213cb262021-08-07 19:21:33 -0500189 for filename in ${FILES:${PN}-storaged}
Andrew Geissler2ee498a2020-05-29 15:52:06 -0500190 do
191 rm -rf ${D}$filename
192 done
193 fi
Andrew Geissler7f40b712020-05-15 14:09:53 -0500194}