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 | |
| 4 | LICENSE = "LGPLv2.1" |
| 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 | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 11 | file://cockpit.pam \ |
| 12 | " |
Andrew Geissler | eafcbb8 | 2020-06-05 17:59:17 -0500 | [diff] [blame] | 13 | SRC_URI[md5sum] = "beb88d8e70ee1da6ebd917c956217803" |
| 14 | SRC_URI[sha256sum] = "afc82acc8ef9d51e0f34265a07a2f059f5b71a1df721b299e657a40a098cbb7f" |
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 | |
| 20 | COMPATIBLE_HOST_libc-musl = "null" |
| 21 | |
| 22 | RDEPENDS_${PN} += "glib-networking" |
| 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} \ |
| 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 Geissler | eafcbb8 | 2020-06-05 17:59:17 -0500 | [diff] [blame] | 39 | PACKAGECONFIG ??= " \ |
| 40 | ${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)} \ |
| 41 | " |
| 42 | |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 43 | PACKAGECONFIG[pcp] = "--enable-pcp,--disable-pcp,pcp" |
| 44 | PACKAGECONFIG[dashboard] = "--enable-ssh,--disable-ssh,libssh" |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 45 | PACKAGECONFIG[storaged] = ",,,udisks2" |
Andrew Geissler | eafcbb8 | 2020-06-05 17:59:17 -0500 | [diff] [blame] | 46 | PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit" |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 47 | |
| 48 | PACKAGES =+ " \ |
| 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 | " |
| 68 | SYSTEMD_PACKAGES = "${PN}-ws" |
| 69 | |
| 70 | FILES_${PN}-pcp = " \ |
| 71 | ${libexecdir}/cockpit-pcp \ |
| 72 | ${datadir}/cockpit/pcp \ |
| 73 | ${localstatedir}/lib/pcp/config/pmlogconf/tools/cockpit \ |
| 74 | " |
| 75 | FILES_${PN}-realmd = "${datadir}/cockpit/realmd" |
| 76 | FILES_${PN}-tuned = "${datadir}/cockpit/tuned" |
| 77 | FILES_${PN}-shell = "${datadir}/cockpit/shell" |
| 78 | FILES_${PN}-systemd = "${datadir}/cockpit/systemd" |
| 79 | FILES_${PN}-users = "${datadir}/cockpit/users" |
| 80 | FILES_${PN}-kdump = " \ |
| 81 | ${datadir}/cockpit/kdump \ |
| 82 | ${datadir}/metainfo/org.cockpit-project.cockpit-kdump.metainfo.xml \ |
| 83 | " |
| 84 | FILES_${PN}-sosreport = " \ |
| 85 | ${datadir}/cockpit/sosreport \ |
| 86 | ${datadir}/metainfo/org.cockpit-project.cockpit-sosreport.metainfo.xml \ |
| 87 | ${datadir}/pixmaps/cockpit-sosreport.png \ |
| 88 | " |
| 89 | FILES_${PN}-storaged = " \ |
| 90 | ${datadir}/cockpit/storaged \ |
| 91 | ${datadir}/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml \ |
| 92 | " |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 93 | |
| 94 | FILES_${PN}-networkmanager = "${datadir}/cockpit/networkmanager" |
| 95 | RDEPENDS_${PN}-networkmanager = "networkmanager" |
| 96 | |
| 97 | FILES_${PN}-machines = " \ |
| 98 | ${datadir}/cockpit/machines \ |
| 99 | ${datadir}/metainfo/org.cockpit-project.cockpit-machines.metainfo.xml \ |
| 100 | " |
| 101 | FILES_${PN}-selinux = " \ |
| 102 | ${datadir}/cockpit/selinux \ |
| 103 | ${datadir}/metainfo/org.cockpit-project.cockpit-selinux.metainfo.xml \ |
| 104 | " |
| 105 | FILES_${PN}-playground = "${datadir}/cockpit/playground" |
| 106 | FILES_${PN}-docker = " \ |
| 107 | ${datadir}/cockpit/docker \ |
| 108 | ${datadir}/metainfo/org.cockpit-project.cockpit-docker.metainfo.xml \ |
| 109 | " |
| 110 | FILES_${PN}-dashboard = "${datadir}/cockpit/dashboard" |
| 111 | ALLOW_EMPTY_${PN}-dashboard = "1" |
| 112 | |
| 113 | FILES_${PN}-bridge = " \ |
| 114 | ${bindir}/cockpit-bridge \ |
| 115 | ${libexec}/cockpit-askpass \ |
| 116 | " |
| 117 | RDEPENDS_${PN}-bridge = "" |
| 118 | |
| 119 | FILES_${PN}-desktop = "${libexecdir}/cockpit-desktop" |
| 120 | RDEPENDS_${PN}-desktop += "bash" |
| 121 | |
| 122 | FILES_${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 | " |
| 153 | CONFFILES_${PN}-ws += " \ |
| 154 | ${sysconfdir}/issue.d/cockpit.issue \ |
| 155 | ${sysconfdir}/motd.d/cockpit \ |
| 156 | " |
| 157 | RDEPENDS_${PN}-ws += "openssl-bin" |
| 158 | SYSTEMD_SERVICE_${PN}-ws = "cockpit.socket" |
| 159 | |
| 160 | FILES_${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 | " |
| 170 | RDEPENDS_${PN} += "${PN}-bridge" |
| 171 | |
| 172 | do_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 Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 182 | |
| 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 Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 189 | } |