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