Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | SUMMARY = "A shared storage lock manager" |
| 2 | DESCRIPTION = "sanlock is a lock manager built on shared storage. Hosts with access \ |
| 3 | to the storage can perform locking. An application running on the \ |
| 4 | hosts is given a small amount of space on the shared block device or \ |
| 5 | file, and uses sanlock for its own application-specific synchronization. \ |
| 6 | Internally, the sanlock daemon manages locks using two disk-based \ |
| 7 | lease algorithms: delta leases and paxos leases." |
| 8 | HOMEPAGE = "https://pagure.io/sanlock" |
| 9 | SECTION = "utils" |
| 10 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 11 | LICENSE = "LGPL-2.0-or-later & GPL-2.0-only & GPL-2.0-or-later" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 12 | LIC_FILES_CHKSUM = "file://README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 13 | |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 14 | PV .= "+git" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 15 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 16 | SRC_URI = "git://pagure.io/sanlock.git;protocol=http;branch=master \ |
| 17 | file://0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch \ |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 18 | file://0001-add-missing-system-header-string.h.patch \ |
Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 19 | file://0001-include-libgen.h-for-basename.patch \ |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 20 | " |
Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 21 | SRCREV = "ecf30a1ccf756776dfea440e4cf9b0b54581075f" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 22 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 23 | S = "${WORKDIR}/git" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 24 | |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 25 | CVE_STATUS[CVE-2012-5638] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 26 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | DEPENDS = "libaio util-linux" |
| 28 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 29 | inherit setuptools3 useradd |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 30 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 31 | SETUPTOOLS_SETUP_PATH = "${S}/python" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 32 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 33 | do_compile:prepend () { |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 34 | oe_runmake -C ${S}/wdmd CMD_LDFLAGS="${LDFLAGS}" LIB_LDFLAGS="${LDFLAGS}" |
| 35 | oe_runmake -C ${S}/src CMD_LDFLAGS="${LDFLAGS}" LIB_ENTIRE_LDFLAGS="${LDFLAGS}" LIB_CLIENT_LDFLAGS="${LDFLAGS}" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 36 | } |
| 37 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 38 | do_install:prepend () { |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 39 | oe_runmake -C ${S}/wdmd DESTDIR=${D} LIBDIR=${libdir} install |
| 40 | oe_runmake -C ${S}/src DESTDIR=${D} LIBDIR=${libdir} install |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 41 | } |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 42 | |
| 43 | SANLOCKGROUP ?= "sanlock" |
| 44 | SANLOCKUSER ?= "sanlock" |
| 45 | USERADD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 46 | GROUPADD_PARAM:${PN} = "--system ${SANLOCKGROUP}" |
| 47 | USERADD_PARAM:${PN} = "--system -g ${SANLOCKGROUP} -G disk \ |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 48 | --home-dir /run/${SANLOCKUSER} --no-create-home \ |
| 49 | --shell /sbin/nologin ${SANLOCKUSER}" |