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 | |
| 11 | LICENSE = "LGPLv2+ & GPLv2 & GPLv2+" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 12 | LIC_FILES_CHKSUM = "file://../README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22" |
| 13 | |
| 14 | PV .= "+git${SRCPV}" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 15 | |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 16 | SRC_URI = "git://pagure.io/sanlock.git;protocol=http \ |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 17 | file://0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch;patchdir=../ \ |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 18 | " |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 19 | SRCREV = "3a750fed849405c745dcb7b4ceb85f662c53d8d0" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 20 | |
| 21 | S = "${WORKDIR}/git/python" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 22 | |
| 23 | DEPENDS = "libaio util-linux" |
| 24 | |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 25 | inherit distutils3 useradd |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 26 | |
| 27 | do_configure[noexec] = "1" |
| 28 | |
| 29 | do_compile_prepend () { |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 30 | oe_runmake -C ${S}/../wdmd CMD_LDFLAGS="${LDFLAGS}" LIB_LDFLAGS="${LDFLAGS}" |
| 31 | 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] | 32 | } |
| 33 | |
| 34 | do_install_prepend () { |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 35 | oe_runmake -C ${S}/../wdmd DESTDIR=${D} LIBDIR=${libdir} install |
| 36 | oe_runmake -C ${S}/../src DESTDIR=${D} LIBDIR=${libdir} install |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 37 | } |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 38 | |
| 39 | SANLOCKGROUP ?= "sanlock" |
| 40 | SANLOCKUSER ?= "sanlock" |
| 41 | USERADD_PACKAGES = "${PN}" |
| 42 | GROUPADD_PARAM_${PN} = "--system ${SANLOCKGROUP}" |
| 43 | USERADD_PARAM_${PN} = "--system -g ${SANLOCKGROUP} -G disk \ |
| 44 | --home-dir /run/${SANLOCKUSER} --no-create-home \ |
| 45 | --shell /sbin/nologin ${SANLOCKUSER}" |