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 | |
| 14 | PV .= "+git${SRCPV}" |
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 \ |
| 18 | file://setuptools.patch \ |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 19 | " |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 20 | SRCREV = "a181e951376d49a82eef17920c8ebedec80b4823" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 21 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 22 | S = "${WORKDIR}/git" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 23 | |
| 24 | DEPENDS = "libaio util-linux" |
| 25 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 26 | inherit setuptools3 useradd |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 28 | SETUPTOOLS_SETUP_PATH = "${S}/python" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 29 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 30 | do_compile:prepend () { |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 31 | oe_runmake -C ${S}/wdmd CMD_LDFLAGS="${LDFLAGS}" LIB_LDFLAGS="${LDFLAGS}" |
| 32 | 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] | 33 | } |
| 34 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 35 | do_install:prepend () { |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 36 | oe_runmake -C ${S}/wdmd DESTDIR=${D} LIBDIR=${libdir} install |
| 37 | oe_runmake -C ${S}/src DESTDIR=${D} LIBDIR=${libdir} install |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 38 | } |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 39 | |
| 40 | SANLOCKGROUP ?= "sanlock" |
| 41 | SANLOCKUSER ?= "sanlock" |
| 42 | USERADD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 43 | GROUPADD_PARAM:${PN} = "--system ${SANLOCKGROUP}" |
| 44 | USERADD_PARAM:${PN} = "--system -g ${SANLOCKGROUP} -G disk \ |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 45 | --home-dir /run/${SANLOCKUSER} --no-create-home \ |
| 46 | --shell /sbin/nologin ${SANLOCKUSER}" |