Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [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 = "LGPL-2.1-only" |
| 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-Warn-not-error-if-xsltproc-is-not-found.patch \ |
| 10 | file://cockpit.pam \ |
| 11 | " |
| 12 | SRC_URI[sha256sum] = "a87d090c930e2058bb3e970ca7f2bafe678687966b5c0b8b42a802977e391ce9" |
| 13 | |
| 14 | inherit gettext pkgconfig autotools systemd features_check |
| 15 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'old-bridge', '', 'python3targetconfig', d)} |
| 16 | |
Patrick Williams | 705982a | 2024-01-12 09:51:57 -0600 | [diff] [blame] | 17 | DEPENDS += "glib-2.0-native intltool-native gnutls virtual/gettext json-glib krb5 libpam systemd python3-setuptools-native" |
Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 18 | DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'old-bridge', '', 'python3-pip-native', d)}" |
| 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-admin-group=${COCKPIT_USER_GROUP} \ |
| 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 | |
| 40 | PACKAGECONFIG ??= " \ |
| 41 | ${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)} \ |
| 42 | old-bridge \ |
| 43 | " |
| 44 | |
| 45 | PACKAGECONFIG[pcp] = "--enable-pcp,--disable-pcp,pcp" |
| 46 | PACKAGECONFIG[dashboard] = "--enable-ssh,--disable-ssh,libssh" |
| 47 | PACKAGECONFIG[storaged] = ",,,udisks2" |
| 48 | PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit" |
| 49 | PACKAGECONFIG[old-bridge] = "--enable-old-bridge" |
| 50 | |
| 51 | PACKAGES =+ " \ |
| 52 | ${PN}-pcp \ |
| 53 | ${PN}-realmd \ |
| 54 | ${PN}-tuned \ |
| 55 | ${PN}-shell \ |
| 56 | ${PN}-systemd \ |
| 57 | ${PN}-users \ |
| 58 | ${PN}-kdump \ |
| 59 | ${PN}-sosreport \ |
| 60 | ${PN}-storaged \ |
| 61 | ${PN}-networkmanager \ |
| 62 | ${PN}-machines \ |
| 63 | ${PN}-selinux \ |
| 64 | ${PN}-playground \ |
| 65 | ${PN}-docker \ |
| 66 | ${PN}-dashboard \ |
| 67 | ${PN}-packagekit \ |
| 68 | ${PN}-apps \ |
| 69 | ${PN}-bridge \ |
| 70 | ${PN}-ws \ |
| 71 | ${PN}-desktop \ |
| 72 | " |
| 73 | SYSTEMD_PACKAGES = "${PN}-ws" |
| 74 | |
| 75 | FILES:${PN}-pcp = " \ |
| 76 | ${libexecdir}/cockpit-pcp \ |
| 77 | ${datadir}/cockpit/pcp \ |
| 78 | ${localstatedir}/lib/pcp/config/pmlogconf/tools/cockpit \ |
| 79 | " |
| 80 | FILES:${PN}-realmd = "${datadir}/cockpit/realmd" |
| 81 | FILES:${PN}-tuned = "${datadir}/cockpit/tuned" |
| 82 | FILES:${PN}-shell = "${datadir}/cockpit/shell" |
| 83 | FILES:${PN}-systemd = "${datadir}/cockpit/systemd" |
| 84 | FILES:${PN}-users = "${datadir}/cockpit/users" |
| 85 | FILES:${PN}-kdump = " \ |
| 86 | ${datadir}/cockpit/kdump \ |
| 87 | ${datadir}/metainfo/org.cockpit-project.cockpit-kdump.metainfo.xml \ |
| 88 | " |
| 89 | FILES:${PN}-sosreport = " \ |
| 90 | ${datadir}/cockpit/sosreport \ |
| 91 | ${datadir}/metainfo/org.cockpit-project.cockpit-sosreport.metainfo.xml \ |
| 92 | ${datadir}/pixmaps/cockpit-sosreport.png \ |
| 93 | " |
| 94 | FILES:${PN}-storaged = " \ |
| 95 | ${datadir}/cockpit/storaged \ |
| 96 | ${datadir}/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml \ |
| 97 | " |
| 98 | |
| 99 | FILES:${PN}-networkmanager = " \ |
| 100 | ${datadir}/cockpit/networkmanager \ |
| 101 | ${datadir}/metainfo/org.cockpit-project.cockpit-networkmanager.metainfo.xml \ |
| 102 | " |
| 103 | RDEPENDS:${PN}-networkmanager = "networkmanager" |
| 104 | |
| 105 | FILES:${PN}-machines = " \ |
| 106 | ${datadir}/cockpit/machines \ |
| 107 | ${datadir}/metainfo/org.cockpit-project.cockpit-machines.metainfo.xml \ |
| 108 | " |
| 109 | FILES:${PN}-selinux = " \ |
| 110 | ${datadir}/cockpit/selinux \ |
| 111 | ${datadir}/metainfo/org.cockpit-project.cockpit-selinux.metainfo.xml \ |
| 112 | " |
| 113 | FILES:${PN}-playground = "${datadir}/cockpit/playground" |
| 114 | FILES:${PN}-docker = " \ |
| 115 | ${datadir}/cockpit/docker \ |
| 116 | ${datadir}/metainfo/org.cockpit-project.cockpit-docker.metainfo.xml \ |
| 117 | " |
| 118 | FILES:${PN}-dashboard = "${datadir}/cockpit/dashboard" |
| 119 | ALLOW_EMPTY:${PN}-dashboard = "1" |
| 120 | |
| 121 | FILES:${PN}-packagekit = "${datadir}/cockpit/packagekit" |
| 122 | FILES:${PN}-apps = "${datadir}/cockpit/apps" |
| 123 | |
| 124 | FILES:${PN}-bridge = " \ |
| 125 | ${bindir}/cockpit-bridge \ |
| 126 | ${libexecdir}/cockpit-askpass \ |
| 127 | ${PYTHON_SITEPACKAGES_DIR} \ |
| 128 | " |
| 129 | RDEPENDS:${PN}-bridge = "${@bb.utils.contains('PACKAGECONFIG', 'old-bridge', '', 'python3', d)}" |
| 130 | |
| 131 | FILES:${PN}-desktop = "${libexecdir}/cockpit-desktop" |
| 132 | RDEPENDS:${PN}-desktop += "bash" |
| 133 | |
| 134 | FILES:${PN}-ws = " \ |
| 135 | ${sysconfdir}/cockpit/ws-certs.d \ |
| 136 | ${sysconfdir}/pam.d/cockpit \ |
| 137 | ${sysconfdir}/issue.d/cockpit.issue \ |
| 138 | ${sysconfdir}/motd.d/cockpit \ |
| 139 | ${datadir}/cockpit/motd/update-motd \ |
| 140 | ${datadir}/cockpit/motd/inactive.motd \ |
| 141 | ${systemd_system_unitdir}/cockpit.service \ |
| 142 | ${systemd_system_unitdir}/cockpit-motd.service \ |
| 143 | ${systemd_system_unitdir}/cockpit.socket \ |
| 144 | ${systemd_system_unitdir}/cockpit-session.socket \ |
| 145 | ${systemd_system_unitdir}/cockpit-session@.service \ |
| 146 | ${systemd_system_unitdir}/cockpit-wsinstance-http.socket \ |
| 147 | ${systemd_system_unitdir}/cockpit-wsinstance-http.service \ |
| 148 | ${systemd_system_unitdir}/cockpit-wsinstance-http-redirect.socket \ |
| 149 | ${systemd_system_unitdir}/cockpit-wsinstance-http-redirect.service \ |
| 150 | ${systemd_system_unitdir}/cockpit-wsinstance-https-factory.socket \ |
| 151 | ${systemd_system_unitdir}/cockpit-wsinstance-https-factory@.service \ |
| 152 | ${systemd_system_unitdir}/cockpit-wsinstance-https@.socket \ |
| 153 | ${systemd_system_unitdir}/cockpit-wsinstance-https@.service \ |
| 154 | ${systemd_system_unitdir}/system-cockpithttps.slice \ |
| 155 | ${libdir}/tmpfiles.d/cockpit-tempfiles.conf \ |
| 156 | ${sbindir}/remotectl \ |
| 157 | ${libdir}/security/pam_ssh_add.so \ |
| 158 | ${libdir}/security/pam_cockpit_cert.so \ |
| 159 | ${libexecdir}/cockpit-ws \ |
| 160 | ${libexecdir}/cockpit-wsinstance-factory \ |
| 161 | ${libexecdir}/cockpit-tls \ |
| 162 | ${libexecdir}/cockpit-session \ |
| 163 | ${localstatedir}/lib/cockpit \ |
| 164 | ${datadir}/cockpit/static \ |
| 165 | ${datadir}/cockpit/branding \ |
| 166 | " |
| 167 | CONFFILES:${PN}-ws += " \ |
| 168 | ${sysconfdir}/issue.d/cockpit.issue \ |
| 169 | ${sysconfdir}/motd.d/cockpit \ |
| 170 | " |
| 171 | RDEPENDS:${PN}-ws += "openssl-bin" |
| 172 | SYSTEMD_SERVICE:${PN}-ws = "cockpit.socket" |
| 173 | |
| 174 | FILES:${PN} += " \ |
| 175 | ${datadir}/cockpit/base1 \ |
| 176 | ${sysconfdir}/cockpit/machines.d \ |
| 177 | ${datadir}/polkit-1/actions/org.cockpit-project.cockpit-bridge.policy \ |
| 178 | ${datadir}/cockpit/ssh \ |
| 179 | ${libexecdir}/cockpit-ssh \ |
| 180 | ${datadir}/cockpit \ |
| 181 | ${datadir}/metainfo/cockpit.appdata.xml \ |
| 182 | ${datadir}/pixmaps/cockpit.png \ |
| 183 | ${nonarch_libdir}/tmpfiles.d \ |
| 184 | ${nonarch_libdir}/firewalld \ |
| 185 | " |
| 186 | RDEPENDS:${PN} += "${PN}-bridge" |
| 187 | # Needs bash for /usr/libexec/cockpit-certificate-helper |
| 188 | RDEPENDS:${PN} += "bash" |
| 189 | |
| 190 | do_install:append() { |
| 191 | pkgdatadir=${datadir}/cockpit |
| 192 | |
| 193 | chmod 4750 ${D}${libexecdir}/cockpit-session |
| 194 | |
| 195 | install -d "${D}${sysconfdir}/pam.d" |
| 196 | install -p -m 0644 ${WORKDIR}/cockpit.pam ${D}${sysconfdir}/pam.d/cockpit |
| 197 | |
| 198 | # provided by firewalld |
| 199 | rm -rf ${D}${libdir}/firewalld |
| 200 | |
| 201 | if ! ${@bb.utils.contains('PACKAGECONFIG', 'storaged', 'true', 'false', d)}; then |
| 202 | for filename in ${FILES:${PN}-storaged} |
| 203 | do |
| 204 | rm -rf ${D}$filename |
| 205 | done |
| 206 | fi |
| 207 | } |