Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 1 | SUMMARY = "Admin interface for Linux machines" |
| 2 | DESCRIPTION = "Cockpit makes it easy to administer your GNU/Linux servers via a web browser" |
| 3 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4 | LICENSE = "LGPL-2.1-only" |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" |
| 6 | |
| 7 | SRC_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 Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame^] | 11 | file://0001-Warn-not-error-if-xsltproc-is-not-found.patch \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 12 | file://cockpit.pam \ |
| 13 | " |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame^] | 14 | SRC_URI[sha256sum] = "dde91a157ee8514112334653fa2775a99d71bd1b604067a48eaf7411114d19de" |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 15 | |
| 16 | inherit gettext pkgconfig autotools systemd features_check |
| 17 | |
| 18 | DEPENDS += "glib-2.0-native intltool-native gnutls virtual/gettext json-glib krb5 libpam systemd" |
| 19 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 20 | COMPATIBLE_HOST:libc-musl = "null" |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 21 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 22 | RDEPENDS:${PN} += "glib-networking" |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 23 | |
| 24 | REQUIRED_DISTRO_FEATURES = "systemd pam" |
| 25 | |
| 26 | COCKPIT_USER_GROUP ?= "root" |
| 27 | COCKPIT_WS_USER_GROUP ?= "${COCKPIT_USER_GROUP}" |
| 28 | |
| 29 | EXTRA_AUTORECONF = "-I tools" |
| 30 | EXTRA_OECONF = " \ |
| 31 | --with-cockpit-user=${COCKPIT_USER_GROUP} \ |
| 32 | --with-cockpit-group=${COCKPIT_USER_GROUP} \ |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame^] | 33 | --with-admin-group=${COCKPIT_USER_GROUP} \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 34 | --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 Geissler | eafcbb8 | 2020-06-05 17:59:17 -0500 | [diff] [blame] | 40 | PACKAGECONFIG ??= " \ |
| 41 | ${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)} \ |
| 42 | " |
| 43 | |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 44 | PACKAGECONFIG[pcp] = "--enable-pcp,--disable-pcp,pcp" |
| 45 | PACKAGECONFIG[dashboard] = "--enable-ssh,--disable-ssh,libssh" |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 46 | PACKAGECONFIG[storaged] = ",,,udisks2" |
Andrew Geissler | eafcbb8 | 2020-06-05 17:59:17 -0500 | [diff] [blame] | 47 | PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit" |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 48 | |
| 49 | PACKAGES =+ " \ |
| 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 | " |
| 69 | SYSTEMD_PACKAGES = "${PN}-ws" |
| 70 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 71 | FILES:${PN}-pcp = " \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 72 | ${libexecdir}/cockpit-pcp \ |
| 73 | ${datadir}/cockpit/pcp \ |
| 74 | ${localstatedir}/lib/pcp/config/pmlogconf/tools/cockpit \ |
| 75 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 76 | FILES:${PN}-realmd = "${datadir}/cockpit/realmd" |
| 77 | FILES:${PN}-tuned = "${datadir}/cockpit/tuned" |
| 78 | FILES:${PN}-shell = "${datadir}/cockpit/shell" |
| 79 | FILES:${PN}-systemd = "${datadir}/cockpit/systemd" |
| 80 | FILES:${PN}-users = "${datadir}/cockpit/users" |
| 81 | FILES:${PN}-kdump = " \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 82 | ${datadir}/cockpit/kdump \ |
| 83 | ${datadir}/metainfo/org.cockpit-project.cockpit-kdump.metainfo.xml \ |
| 84 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 85 | FILES:${PN}-sosreport = " \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 86 | ${datadir}/cockpit/sosreport \ |
| 87 | ${datadir}/metainfo/org.cockpit-project.cockpit-sosreport.metainfo.xml \ |
| 88 | ${datadir}/pixmaps/cockpit-sosreport.png \ |
| 89 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 90 | FILES:${PN}-storaged = " \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 91 | ${datadir}/cockpit/storaged \ |
| 92 | ${datadir}/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml \ |
| 93 | " |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 94 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 95 | FILES:${PN}-networkmanager = "${datadir}/cockpit/networkmanager" |
| 96 | RDEPENDS:${PN}-networkmanager = "networkmanager" |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 97 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 98 | FILES:${PN}-machines = " \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 99 | ${datadir}/cockpit/machines \ |
| 100 | ${datadir}/metainfo/org.cockpit-project.cockpit-machines.metainfo.xml \ |
| 101 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 102 | FILES:${PN}-selinux = " \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 103 | ${datadir}/cockpit/selinux \ |
| 104 | ${datadir}/metainfo/org.cockpit-project.cockpit-selinux.metainfo.xml \ |
| 105 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 106 | FILES:${PN}-playground = "${datadir}/cockpit/playground" |
| 107 | FILES:${PN}-docker = " \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 108 | ${datadir}/cockpit/docker \ |
| 109 | ${datadir}/metainfo/org.cockpit-project.cockpit-docker.metainfo.xml \ |
| 110 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 111 | FILES:${PN}-dashboard = "${datadir}/cockpit/dashboard" |
| 112 | ALLOW_EMPTY:${PN}-dashboard = "1" |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 113 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 114 | FILES:${PN}-bridge = " \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 115 | ${bindir}/cockpit-bridge \ |
| 116 | ${libexec}/cockpit-askpass \ |
| 117 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 118 | RDEPENDS:${PN}-bridge = "" |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 119 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 120 | FILES:${PN}-desktop = "${libexecdir}/cockpit-desktop" |
| 121 | RDEPENDS:${PN}-desktop += "bash" |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 122 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 123 | FILES:${PN}-ws = " \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 124 | ${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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 154 | CONFFILES:${PN}-ws += " \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 155 | ${sysconfdir}/issue.d/cockpit.issue \ |
| 156 | ${sysconfdir}/motd.d/cockpit \ |
| 157 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 158 | RDEPENDS:${PN}-ws += "openssl-bin" |
| 159 | SYSTEMD_SERVICE:${PN}-ws = "cockpit.socket" |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 160 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 161 | FILES:${PN} += " \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 162 | ${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 Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 170 | ${nonarch_libdir}/tmpfiles.d \ |
| 171 | ${nonarch_libdir}/firewalld \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 172 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 173 | RDEPENDS:${PN} += "${PN}-bridge" |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame^] | 174 | # Needs bash for /usr/libexec/cockpit-certificate-helper |
| 175 | RDEPENDS:${PN} += "bash" |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 176 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 177 | do_install:append() { |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 178 | 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 Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 187 | |
| 188 | if ! ${@bb.utils.contains('PACKAGECONFIG', 'storaged', 'true', 'false', d)}; then |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 189 | for filename in ${FILES:${PN}-storaged} |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 190 | do |
| 191 | rm -rf ${D}$filename |
| 192 | done |
| 193 | fi |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 194 | } |