added my Recipes
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
From ff5e1a662ba93ba79e2aeaaaec48a2a8ec4b4701 Mon Sep 17 00:00:00 2001
|
||||
From: Yi Zhao <yi.zhao@windriver.com>
|
||||
Date: Thu, 31 Mar 2022 22:22:44 +0800
|
||||
Subject: [PATCH] Guard against __GLIBC_PREREQ for musl libc
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
|
||||
---
|
||||
src/install/util.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/install/util.c b/src/install/util.c
|
||||
index 5721de89..784aec48 100644
|
||||
--- a/src/install/util.c
|
||||
+++ b/src/install/util.c
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "util.h"
|
||||
|
||||
+#if defined(__GLIBC__)
|
||||
#if __GLIBC_PREREQ(2, 30) == 0
|
||||
#include <sys/syscall.h>
|
||||
#ifndef SYS_gettid
|
||||
@@ -35,6 +36,7 @@
|
||||
|
||||
#define gettid() ((pid_t) syscall(SYS_gettid))
|
||||
#endif /*__GLIBC_PREREQ */
|
||||
+#endif /*__GLIBC__*/
|
||||
|
||||
size_t page_size(void)
|
||||
{
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 7f8ef553b7c433af153d48c6a16b2943780abf67 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 31 Dec 2022 14:41:52 -0800
|
||||
Subject: [PATCH] install: Do not undef _FILE_OFFSET_BITS
|
||||
|
||||
_FILE_OFFSET_BITS is a feature test macro to determine largefile
|
||||
support. Usually its set to 64 on systems supporting LFS. Its also
|
||||
needed to be set to 64 for supporting 64bit time_t on glibc on 32bit
|
||||
systems. If its undefined explicitly, then 64bit time_t can not be
|
||||
enabled.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/dracutdevs/dracut/pull/2157]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/install/dracut-install.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c
|
||||
index dda0caca..05a67a03 100644
|
||||
--- a/src/install/dracut-install.c
|
||||
+++ b/src/install/dracut-install.c
|
||||
@@ -22,7 +22,6 @@
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
-#undef _FILE_OFFSET_BITS
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 9f7740c4c2fda64029c23674e9858ce8bd4367df Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 13 Jul 2017 17:14:05 -0700
|
||||
Subject: [PATCH] util.h: include <sys/reg.h> when libc != glibc
|
||||
|
||||
For musl libc it is required to include <sys/reg.h> to
|
||||
have __WORDSIZE defined to e.g. 32 for arm*-musl.
|
||||
|
||||
Taken from void-linux
|
||||
https://github.com/voidlinux/void-packages/blob/master/srcpkgs/dracut/patches/musl-__wordsize.patch
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/install/util.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/install/util.h b/src/install/util.h
|
||||
index a6f9a184..82732913 100644
|
||||
--- a/src/install/util.h
|
||||
+++ b/src/install/util.h
|
||||
@@ -36,6 +36,9 @@
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/resource.h>
|
||||
+#if !defined(__GLIBC__)
|
||||
+#include <sys/reg.h>
|
||||
+#endif
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
SUMMARY = "Initramfs generator using udev"
|
||||
HOMEPAGE = "https://dracut.wiki.kernel.org/index.php/Main_Page"
|
||||
DESCRIPTION = "Dracut is an event driven initramfs infrastructure. dracut (the tool) is used to create an initramfs image by copying tools and files from an installed system and combining it with the dracut framework, usually found in /usr/lib/dracut/modules.d."
|
||||
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
|
||||
PE = "1"
|
||||
|
||||
SRCREV = "631d5f72a223288aa1f48bb8e8d0313e75947400"
|
||||
SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http;branch=master \
|
||||
file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
|
||||
file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \
|
||||
file://0001-install-Do-not-undef-_FILE_OFFSET_BITS.patch \
|
||||
"
|
||||
|
||||
DEPENDS += "kmod"
|
||||
DEPENDS:append:libc-musl = " fts"
|
||||
|
||||
inherit bash-completion pkgconfig
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
EXTRA_OECONF = "--prefix=${prefix} \
|
||||
--libdir=${prefix}/lib \
|
||||
--datadir=${datadir} \
|
||||
--sysconfdir=${sysconfdir} \
|
||||
--sbindir=${sbindir} \
|
||||
--disable-documentation \
|
||||
--bindir=${bindir} \
|
||||
--includedir=${includedir} \
|
||||
--localstatedir=${localstatedir} \
|
||||
"
|
||||
|
||||
# RDEPEND on systemd optionally
|
||||
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
|
||||
PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
|
||||
|
||||
EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"'
|
||||
|
||||
CFLAGS:append = " -fPIC"
|
||||
LDLIBS:append:libc-musl = " -lfts"
|
||||
|
||||
do_configure() {
|
||||
./configure ${EXTRA_OECONF}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
oe_runmake install DESTDIR=${D}
|
||||
# Its Makefile uses cp -arx to install modules.d, so fix the owner
|
||||
# to root:root
|
||||
chown -R root:root ${D}/${prefix}/lib/dracut/modules.d
|
||||
}
|
||||
|
||||
FILES:${PN} += "${prefix}/lib/kernel \
|
||||
${prefix}/lib/dracut \
|
||||
${systemd_unitdir} \
|
||||
"
|
||||
FILES:${PN}-dbg += "${prefix}/lib/dracut/.debug"
|
||||
|
||||
CONFFILES:${PN} += "${sysconfdir}/dracut.conf"
|
||||
|
||||
RDEPENDS:${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd"
|
||||
|
||||
# This could be optimized a bit, but let's avoid non-booting systems :)
|
||||
RRECOMMENDS:${PN} = " \
|
||||
kernel-modules \
|
||||
busybox \
|
||||
coreutils \
|
||||
"
|
||||
|
||||
# CVE-2010-4176 affects only Fedora
|
||||
CVE_CHECK_IGNORE += "CVE-2010-4176"
|
||||
Reference in New Issue
Block a user