added my Recipes
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
From 272f9838f3495f5e419f77e000762c420754c96d Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 2 Sep 2022 15:57:32 -0700
|
||||
Subject: [PATCH] add missing system header string.h
|
||||
|
||||
This is needed for mem* function prototypes used in these sources
|
||||
|
||||
Upstream-Status: Submitted [https://pagure.io/sanlock/issue/8]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/sanlock_sock.c | 1 +
|
||||
wdmd/wdmd_sock.c | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/sanlock_sock.c b/src/sanlock_sock.c
|
||||
index b83f9ae..e206f88 100644
|
||||
--- a/src/sanlock_sock.c
|
||||
+++ b/src/sanlock_sock.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
+#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
diff --git a/wdmd/wdmd_sock.c b/wdmd/wdmd_sock.c
|
||||
index 45d9d9b..110ce9f 100644
|
||||
--- a/wdmd/wdmd_sock.c
|
||||
+++ b/wdmd/wdmd_sock.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
+#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From 78a9cffb1c760466933bbbcbae7ecb9b30a3e6a5 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 21 Nov 2019 13:47:42 -0800
|
||||
Subject: [PATCH] sanlock: Replace "cp -a" with "cp -R --no-dereference
|
||||
--preserve=mode, links"
|
||||
|
||||
Using "cp -a" leaks UID of user running the builds
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/Makefile | 8 ++++----
|
||||
wdmd/Makefile | 4 ++--
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 533dd79..2fc9ba5 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -127,9 +127,9 @@ install: all
|
||||
$(INSTALL) -c -m 755 $(LIBSO_CLIENT_TARGET) $(DESTDIR)/$(LIBDIR)
|
||||
$(INSTALL) -c -m 644 $(LIBPC_ENTIRE_TARGET) $(DESTDIR)/$(LIBDIR)/pkgconfig
|
||||
$(INSTALL) -c -m 644 $(LIBPC_CLIENT_TARGET) $(DESTDIR)/$(LIBDIR)/pkgconfig
|
||||
- cp -a $(LIB_ENTIRE_TARGET).so $(DESTDIR)/$(LIBDIR)
|
||||
- cp -a $(LIB_CLIENT_TARGET).so $(DESTDIR)/$(LIBDIR)
|
||||
- cp -a $(LIB_ENTIRE_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR)
|
||||
- cp -a $(LIB_CLIENT_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR)
|
||||
+ cp -R --no-dereference --preserve=mode,links $(LIB_ENTIRE_TARGET).so $(DESTDIR)/$(LIBDIR)
|
||||
+ cp -R --no-dereference --preserve=mode,links $(LIB_CLIENT_TARGET).so $(DESTDIR)/$(LIBDIR)
|
||||
+ cp -R --no-dereference --preserve=mode,links $(LIB_ENTIRE_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR)
|
||||
+ cp -R --no-dereference --preserve=mode,links $(LIB_CLIENT_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR)
|
||||
$(INSTALL) -c -m 644 $(HEADER_TARGET) $(DESTDIR)/$(HEADIR)
|
||||
$(INSTALL) -m 644 $(MAN_TARGET) $(DESTDIR)/$(MANDIR)/man8/
|
||||
diff --git a/wdmd/Makefile b/wdmd/Makefile
|
||||
index 5849efc..4894517 100644
|
||||
--- a/wdmd/Makefile
|
||||
+++ b/wdmd/Makefile
|
||||
@@ -68,7 +68,7 @@ install: all
|
||||
$(INSTALL) -d $(DESTDIR)/$(MANDIR)/man8
|
||||
$(INSTALL) -c -m 755 $(CMD_TARGET) $(DESTDIR)/$(BINDIR)
|
||||
$(INSTALL) -c -m 755 $(SHLIB_TARGET) $(DESTDIR)/$(LIBDIR)
|
||||
- cp -a $(LIB_TARGET).so $(DESTDIR)/$(LIBDIR)
|
||||
- cp -a $(LIB_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR)
|
||||
+ cp -R --no-dereference --preserve=mode,links $(LIB_TARGET).so $(DESTDIR)/$(LIBDIR)
|
||||
+ cp -R --no-dereference --preserve=mode,links $(LIB_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR)
|
||||
$(INSTALL) -c -m 644 $(HEADER_TARGET) $(DESTDIR)/$(HEADIR)
|
||||
$(INSTALL) -m 644 $(MAN_TARGET) $(DESTDIR)/$(MANDIR)/man8
|
||||
--
|
||||
2.24.0
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
SUMMARY = "A shared storage lock manager"
|
||||
DESCRIPTION = "sanlock is a lock manager built on shared storage. Hosts with access \
|
||||
to the storage can perform locking. An application running on the \
|
||||
hosts is given a small amount of space on the shared block device or \
|
||||
file, and uses sanlock for its own application-specific synchronization. \
|
||||
Internally, the sanlock daemon manages locks using two disk-based \
|
||||
lease algorithms: delta leases and paxos leases."
|
||||
HOMEPAGE = "https://pagure.io/sanlock"
|
||||
SECTION = "utils"
|
||||
|
||||
LICENSE = "LGPL-2.0-or-later & GPL-2.0-only & GPL-2.0-or-later"
|
||||
LIC_FILES_CHKSUM = "file://README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22"
|
||||
|
||||
PV .= "+git${SRCPV}"
|
||||
|
||||
SRC_URI = "git://pagure.io/sanlock.git;protocol=http;branch=master \
|
||||
file://0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch \
|
||||
file://0001-add-missing-system-header-string.h.patch \
|
||||
"
|
||||
SRCREV = "b820c63093c4ae85d7da4f719cf3026d7fca5d09"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
CVE_CHECK_IGNORE += "\
|
||||
CVE-2012-5638 \
|
||||
"
|
||||
|
||||
DEPENDS = "libaio util-linux"
|
||||
|
||||
inherit setuptools3 useradd
|
||||
|
||||
SETUPTOOLS_SETUP_PATH = "${S}/python"
|
||||
|
||||
do_compile:prepend () {
|
||||
oe_runmake -C ${S}/wdmd CMD_LDFLAGS="${LDFLAGS}" LIB_LDFLAGS="${LDFLAGS}"
|
||||
oe_runmake -C ${S}/src CMD_LDFLAGS="${LDFLAGS}" LIB_ENTIRE_LDFLAGS="${LDFLAGS}" LIB_CLIENT_LDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
do_install:prepend () {
|
||||
oe_runmake -C ${S}/wdmd DESTDIR=${D} LIBDIR=${libdir} install
|
||||
oe_runmake -C ${S}/src DESTDIR=${D} LIBDIR=${libdir} install
|
||||
}
|
||||
|
||||
SANLOCKGROUP ?= "sanlock"
|
||||
SANLOCKUSER ?= "sanlock"
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
GROUPADD_PARAM:${PN} = "--system ${SANLOCKGROUP}"
|
||||
USERADD_PARAM:${PN} = "--system -g ${SANLOCKGROUP} -G disk \
|
||||
--home-dir /run/${SANLOCKUSER} --no-create-home \
|
||||
--shell /sbin/nologin ${SANLOCKUSER}"
|
||||
Reference in New Issue
Block a user