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 | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame^] | 13 | SRC_URI[md5sum] = "285383b8744dab93ac8814e5a23e2c3e" |
| 14 | SRC_URI[sha256sum] = "111d477e54737f15467c365fa670f9ac1919be30ad0c93661692467ecd7f12fb" |
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 | |
| 39 | PACKAGECONFIG[pcp] = "--enable-pcp,--disable-pcp,pcp" |
| 40 | PACKAGECONFIG[dashboard] = "--enable-ssh,--disable-ssh,libssh" |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame^] | 41 | PACKAGECONFIG[storaged] = ",,,udisks2" |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 42 | |
| 43 | PACKAGES =+ " \ |
| 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 | " |
| 63 | SYSTEMD_PACKAGES = "${PN}-ws" |
| 64 | |
| 65 | FILES_${PN}-pcp = " \ |
| 66 | ${libexecdir}/cockpit-pcp \ |
| 67 | ${datadir}/cockpit/pcp \ |
| 68 | ${localstatedir}/lib/pcp/config/pmlogconf/tools/cockpit \ |
| 69 | " |
| 70 | FILES_${PN}-realmd = "${datadir}/cockpit/realmd" |
| 71 | FILES_${PN}-tuned = "${datadir}/cockpit/tuned" |
| 72 | FILES_${PN}-shell = "${datadir}/cockpit/shell" |
| 73 | FILES_${PN}-systemd = "${datadir}/cockpit/systemd" |
| 74 | FILES_${PN}-users = "${datadir}/cockpit/users" |
| 75 | FILES_${PN}-kdump = " \ |
| 76 | ${datadir}/cockpit/kdump \ |
| 77 | ${datadir}/metainfo/org.cockpit-project.cockpit-kdump.metainfo.xml \ |
| 78 | " |
| 79 | FILES_${PN}-sosreport = " \ |
| 80 | ${datadir}/cockpit/sosreport \ |
| 81 | ${datadir}/metainfo/org.cockpit-project.cockpit-sosreport.metainfo.xml \ |
| 82 | ${datadir}/pixmaps/cockpit-sosreport.png \ |
| 83 | " |
| 84 | FILES_${PN}-storaged = " \ |
| 85 | ${datadir}/cockpit/storaged \ |
| 86 | ${datadir}/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml \ |
| 87 | " |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 88 | |
| 89 | FILES_${PN}-networkmanager = "${datadir}/cockpit/networkmanager" |
| 90 | RDEPENDS_${PN}-networkmanager = "networkmanager" |
| 91 | |
| 92 | FILES_${PN}-machines = " \ |
| 93 | ${datadir}/cockpit/machines \ |
| 94 | ${datadir}/metainfo/org.cockpit-project.cockpit-machines.metainfo.xml \ |
| 95 | " |
| 96 | FILES_${PN}-selinux = " \ |
| 97 | ${datadir}/cockpit/selinux \ |
| 98 | ${datadir}/metainfo/org.cockpit-project.cockpit-selinux.metainfo.xml \ |
| 99 | " |
| 100 | FILES_${PN}-playground = "${datadir}/cockpit/playground" |
| 101 | FILES_${PN}-docker = " \ |
| 102 | ${datadir}/cockpit/docker \ |
| 103 | ${datadir}/metainfo/org.cockpit-project.cockpit-docker.metainfo.xml \ |
| 104 | " |
| 105 | FILES_${PN}-dashboard = "${datadir}/cockpit/dashboard" |
| 106 | ALLOW_EMPTY_${PN}-dashboard = "1" |
| 107 | |
| 108 | FILES_${PN}-bridge = " \ |
| 109 | ${bindir}/cockpit-bridge \ |
| 110 | ${libexec}/cockpit-askpass \ |
| 111 | " |
| 112 | RDEPENDS_${PN}-bridge = "" |
| 113 | |
| 114 | FILES_${PN}-desktop = "${libexecdir}/cockpit-desktop" |
| 115 | RDEPENDS_${PN}-desktop += "bash" |
| 116 | |
| 117 | FILES_${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 | " |
| 148 | CONFFILES_${PN}-ws += " \ |
| 149 | ${sysconfdir}/issue.d/cockpit.issue \ |
| 150 | ${sysconfdir}/motd.d/cockpit \ |
| 151 | " |
| 152 | RDEPENDS_${PN}-ws += "openssl-bin" |
| 153 | SYSTEMD_SERVICE_${PN}-ws = "cockpit.socket" |
| 154 | |
| 155 | FILES_${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 | " |
| 165 | RDEPENDS_${PN} += "${PN}-bridge" |
| 166 | |
| 167 | do_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 Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame^] | 177 | |
| 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 Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 184 | } |