blob: 1d0f8b0103629cef8820852c613b28e56ea227cb [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "A shared storage lock manager"
2DESCRIPTION = "sanlock is a lock manager built on shared storage. Hosts with access \
3to the storage can perform locking. An application running on the \
4hosts is given a small amount of space on the shared block device or \
5file, and uses sanlock for its own application-specific synchronization. \
6Internally, the sanlock daemon manages locks using two disk-based \
7lease algorithms: delta leases and paxos leases."
8HOMEPAGE = "https://pagure.io/sanlock"
9SECTION = "utils"
10
Andrew Geissler9aee5002022-03-30 16:27:02 +000011LICENSE = "LGPL-2.0-or-later & GPL-2.0-only & GPL-2.0-or-later"
Andrew Geissler595f6302022-01-24 19:11:47 +000012LIC_FILES_CHKSUM = "file://README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22"
Brad Bishope42b3e32020-01-15 22:08:42 -050013
Patrick Williams73bd93f2024-02-20 08:07:48 -060014PV .= "+git"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015
Andrew Geissler595f6302022-01-24 19:11:47 +000016SRC_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 Geissler87f5cff2022-09-30 13:13:31 -050018 file://0001-add-missing-system-header-string.h.patch \
Patrick Williams03514f12024-04-05 07:04:11 -050019 file://0001-include-libgen.h-for-basename.patch \
Brad Bishop8410d612019-11-25 09:40:59 -050020 "
Patrick Williams03514f12024-04-05 07:04:11 -050021SRCREV = "ecf30a1ccf756776dfea440e4cf9b0b54581075f"
Brad Bishope42b3e32020-01-15 22:08:42 -050022
Andrew Geissler595f6302022-01-24 19:11:47 +000023S = "${WORKDIR}/git"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080024
Patrick Williams2a254922023-08-11 09:48:11 -050025CVE_STATUS[CVE-2012-5638] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions."
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050026
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080027DEPENDS = "libaio util-linux"
28
Andrew Geissler595f6302022-01-24 19:11:47 +000029inherit setuptools3 useradd
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080030
Andrew Geissler595f6302022-01-24 19:11:47 +000031SETUPTOOLS_SETUP_PATH = "${S}/python"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080032
Patrick Williams213cb262021-08-07 19:21:33 -050033do_compile:prepend () {
Andrew Geissler595f6302022-01-24 19:11:47 +000034 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 Bishop1a4b7ee2018-12-16 17:11:34 -080036}
37
Patrick Williams213cb262021-08-07 19:21:33 -050038do_install:prepend () {
Andrew Geissler595f6302022-01-24 19:11:47 +000039 oe_runmake -C ${S}/wdmd DESTDIR=${D} LIBDIR=${libdir} install
40 oe_runmake -C ${S}/src DESTDIR=${D} LIBDIR=${libdir} install
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080041}
Brad Bishop8410d612019-11-25 09:40:59 -050042
43SANLOCKGROUP ?= "sanlock"
44SANLOCKUSER ?= "sanlock"
45USERADD_PACKAGES = "${PN}"
Patrick Williams213cb262021-08-07 19:21:33 -050046GROUPADD_PARAM:${PN} = "--system ${SANLOCKGROUP}"
47USERADD_PARAM:${PN} = "--system -g ${SANLOCKGROUP} -G disk \
Brad Bishop8410d612019-11-25 09:40:59 -050048 --home-dir /run/${SANLOCKUSER} --no-create-home \
49 --shell /sbin/nologin ${SANLOCKUSER}"