blob: f06588a75a201efe1998ee611c343de03cedef71 [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
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 \
Andrew Geissler7f40b712020-05-15 14:09:53 -050011 file://cockpit.pam \
12 "
Andrew Geisslereafcbb82020-06-05 17:59:17 -050013SRC_URI[md5sum] = "beb88d8e70ee1da6ebd917c956217803"
14SRC_URI[sha256sum] = "afc82acc8ef9d51e0f34265a07a2f059f5b71a1df721b299e657a40a098cbb7f"
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
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
Andrew Geisslereafcbb82020-06-05 17:59:17 -050039PACKAGECONFIG ??= " \
40 ${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)} \
41"
42
Andrew Geissler7f40b712020-05-15 14:09:53 -050043PACKAGECONFIG[pcp] = "--enable-pcp,--disable-pcp,pcp"
44PACKAGECONFIG[dashboard] = "--enable-ssh,--disable-ssh,libssh"
Andrew Geissler2ee498a2020-05-29 15:52:06 -050045PACKAGECONFIG[storaged] = ",,,udisks2"
Andrew Geisslereafcbb82020-06-05 17:59:17 -050046PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit"
Andrew Geissler7f40b712020-05-15 14:09:53 -050047
48PACKAGES =+ " \
49 ${PN}-pcp \
50 ${PN}-realmd \
51 ${PN}-tuned \
52 ${PN}-shell \
53 ${PN}-systemd \
54 ${PN}-users \
55 ${PN}-kdump \
56 ${PN}-sosreport \
57 ${PN}-storaged \
58 ${PN}-networkmanager \
59 ${PN}-machines \
60 ${PN}-selinux \
61 ${PN}-playground \
62 ${PN}-docker \
63 ${PN}-dashboard \
64 ${PN}-bridge \
65 ${PN}-ws \
66 ${PN}-desktop \
67"
68SYSTEMD_PACKAGES = "${PN}-ws"
69
70FILES_${PN}-pcp = " \
71 ${libexecdir}/cockpit-pcp \
72 ${datadir}/cockpit/pcp \
73 ${localstatedir}/lib/pcp/config/pmlogconf/tools/cockpit \
74"
75FILES_${PN}-realmd = "${datadir}/cockpit/realmd"
76FILES_${PN}-tuned = "${datadir}/cockpit/tuned"
77FILES_${PN}-shell = "${datadir}/cockpit/shell"
78FILES_${PN}-systemd = "${datadir}/cockpit/systemd"
79FILES_${PN}-users = "${datadir}/cockpit/users"
80FILES_${PN}-kdump = " \
81 ${datadir}/cockpit/kdump \
82 ${datadir}/metainfo/org.cockpit-project.cockpit-kdump.metainfo.xml \
83"
84FILES_${PN}-sosreport = " \
85 ${datadir}/cockpit/sosreport \
86 ${datadir}/metainfo/org.cockpit-project.cockpit-sosreport.metainfo.xml \
87 ${datadir}/pixmaps/cockpit-sosreport.png \
88"
89FILES_${PN}-storaged = " \
90 ${datadir}/cockpit/storaged \
91 ${datadir}/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml \
92"
Andrew Geissler7f40b712020-05-15 14:09:53 -050093
94FILES_${PN}-networkmanager = "${datadir}/cockpit/networkmanager"
95RDEPENDS_${PN}-networkmanager = "networkmanager"
96
97FILES_${PN}-machines = " \
98 ${datadir}/cockpit/machines \
99 ${datadir}/metainfo/org.cockpit-project.cockpit-machines.metainfo.xml \
100"
101FILES_${PN}-selinux = " \
102 ${datadir}/cockpit/selinux \
103 ${datadir}/metainfo/org.cockpit-project.cockpit-selinux.metainfo.xml \
104"
105FILES_${PN}-playground = "${datadir}/cockpit/playground"
106FILES_${PN}-docker = " \
107 ${datadir}/cockpit/docker \
108 ${datadir}/metainfo/org.cockpit-project.cockpit-docker.metainfo.xml \
109"
110FILES_${PN}-dashboard = "${datadir}/cockpit/dashboard"
111ALLOW_EMPTY_${PN}-dashboard = "1"
112
113FILES_${PN}-bridge = " \
114 ${bindir}/cockpit-bridge \
115 ${libexec}/cockpit-askpass \
116"
117RDEPENDS_${PN}-bridge = ""
118
119FILES_${PN}-desktop = "${libexecdir}/cockpit-desktop"
120RDEPENDS_${PN}-desktop += "bash"
121
122FILES_${PN}-ws = " \
123 ${sysconfdir}/cockpit/ws-certs.d \
124 ${sysconfdir}/pam.d/cockpit \
125 ${sysconfdir}/issue.d/cockpit.issue \
126 ${sysconfdir}/motd.d/cockpit \
127 ${datadir}/cockpit/motd/update-motd \
128 ${datadir}/cockpit/motd/inactive.motd \
129 ${systemd_system_unitdir}/cockpit.service \
130 ${systemd_system_unitdir}/cockpit-motd.service \
131 ${systemd_system_unitdir}/cockpit.socket \
132 ${systemd_system_unitdir}/cockpit-wsinstance-http.socket \
133 ${systemd_system_unitdir}/cockpit-wsinstance-http.service \
134 ${systemd_system_unitdir}/cockpit-wsinstance-http-redirect.socket \
135 ${systemd_system_unitdir}/cockpit-wsinstance-http-redirect.service \
136 ${systemd_system_unitdir}/cockpit-wsinstance-https-factory.socket \
137 ${systemd_system_unitdir}/cockpit-wsinstance-https-factory@.service \
138 ${systemd_system_unitdir}/cockpit-wsinstance-https@.socket \
139 ${systemd_system_unitdir}/cockpit-wsinstance-https@.service \
140 ${systemd_system_unitdir}/system-cockpithttps.slice \
141 ${libdir}/tmpfiles.d/cockpit-tempfiles.conf \
142 ${sbindir}/remotectl \
143 ${libdir}/security/pam_ssh_add.so \
144 ${libdir}/security/pam_cockpit_cert.so \
145 ${libexecdir}/cockpit-ws \
146 ${libexecdir}/cockpit-wsinstance-factory \
147 ${libexecdir}/cockpit-tls \
148 ${libexecdir}/cockpit-session \
149 ${localstatedir}/lib/cockpit \
150 ${datadir}/cockpit/static \
151 ${datadir}/cockpit/branding \
152"
153CONFFILES_${PN}-ws += " \
154 ${sysconfdir}/issue.d/cockpit.issue \
155 ${sysconfdir}/motd.d/cockpit \
156"
157RDEPENDS_${PN}-ws += "openssl-bin"
158SYSTEMD_SERVICE_${PN}-ws = "cockpit.socket"
159
160FILES_${PN} += " \
161 ${datadir}/cockpit/base1 \
162 ${sysconfdir}/cockpit/machines.d \
163 ${datadir}/polkit-1/actions/org.cockpit-project.cockpit-bridge.policy \
164 ${datadir}/cockpit/ssh \
165 ${libexecdir}/cockpit-ssh \
166 ${datadir}/cockpit \
167 ${datadir}/metainfo/cockpit.appdata.xml \
168 ${datadir}/pixmaps/cockpit.png \
169"
170RDEPENDS_${PN} += "${PN}-bridge"
171
172do_install_append() {
173 pkgdatadir=${datadir}/cockpit
174
175 chmod 4750 ${D}${libexecdir}/cockpit-session
176
177 install -d "${D}${sysconfdir}/pam.d"
178 install -p -m 0644 ${WORKDIR}/cockpit.pam ${D}${sysconfdir}/pam.d/cockpit
179
180 # provided by firewalld
181 rm -rf ${D}${libdir}/firewalld
Andrew Geissler2ee498a2020-05-29 15:52:06 -0500182
183 if ! ${@bb.utils.contains('PACKAGECONFIG', 'storaged', 'true', 'false', d)}; then
184 for filename in ${FILES_${PN}-storaged}
185 do
186 rm -rf ${D}$filename
187 done
188 fi
Andrew Geissler7f40b712020-05-15 14:09:53 -0500189}