diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support')
8 files changed, 149 insertions, 94 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb b/meta-openembedded/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb index 07e2e29417..5b1d021e36 100644 --- a/meta-openembedded/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb +++ b/meta-openembedded/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb @@ -16,7 +16,10 @@ SRC_URI[sha256sum] = "f21accdadb1bb328ea3f8a13fc34d715baac6e2db66065898346322c72 DEPENDS += "bison-native flex-native wget-native gawk-native" -inherit autotools-brokensep +inherit autotools-brokensep update-alternatives +ALTERNATIVE_PRIORITY = "50" +ALTERNATIVE:${PN}-yang = "ietf-interfaces " +ALTERNATIVE_LINK_NAME[ietf-interfaces] = "${datadir}/yang/ietf-interfaces.yang" EXTRA_OECONF = "ac_cv_path_SH=/bin/sh" diff --git a/meta-openembedded/meta-oe/recipes-support/raptor2/raptor2_2.0.16.bb b/meta-openembedded/meta-oe/recipes-support/raptor2/raptor2_2.0.16.bb index 30df8e0648..85012bcfb3 100644 --- a/meta-openembedded/meta-oe/recipes-support/raptor2/raptor2_2.0.16.bb +++ b/meta-openembedded/meta-oe/recipes-support/raptor2/raptor2_2.0.16.bb @@ -15,7 +15,7 @@ SRC_URI = " \ " SRC_URI[sha256sum] = "089db78d7ac982354bdbf39d973baf09581e6904ac4c92a98c5caadb3de44680" -inherit autotools pkgconfig +inherit autotools pkgconfig gtk-doc EXTRA_OECONF = " \ --without-xml2-config \ diff --git a/meta-openembedded/meta-oe/recipes-support/rng-tools/rng-tools/default b/meta-openembedded/meta-oe/recipes-support/rng-tools/rng-tools/default new file mode 100644 index 0000000000..b9f8e03635 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/rng-tools/rng-tools/default @@ -0,0 +1 @@ +EXTRA_ARGS="-r /dev/hwrng" diff --git a/meta-openembedded/meta-oe/recipes-support/rng-tools/rng-tools/init b/meta-openembedded/meta-oe/recipes-support/rng-tools/rng-tools/init new file mode 100644 index 0000000000..13f0ecd37c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/rng-tools/rng-tools/init @@ -0,0 +1,42 @@ +#!/bin/sh +# +# This is an init script for openembedded +# Copy it to @SYSCONFDIR@/init.d/rng-tools and type +# > update-rc.d rng-tools defaults 60 +# + +rngd=@SBINDIR@/rngd +test -x "$rngd" || exit 1 + +[ -r @SYSCONFDIR@/default/rng-tools ] && . "@SYSCONFDIR@/default/rng-tools" + +case "$1" in + start) + echo -n "Starting random number generator daemon" + start-stop-daemon -S -q -x $rngd -- $EXTRA_ARGS + echo "." + ;; + stop) + echo -n "Stopping random number generator daemon" + start-stop-daemon -K -q -n rngd + echo "." + ;; + reload|force-reload) + echo -n "Signalling rng daemon restart" + start-stop-daemon -K -q -s 1 -x $rngd + start-stop-daemon -K -q -s 1 -x $rngd + ;; + restart) + echo -n "Stopping random number generator daemon" + start-stop-daemon -K -q -n rngd + echo "." + echo -n "Starting random number generator daemon" + start-stop-daemon -S -q -x $rngd -- $EXTRA_ARGS + echo "." + ;; + *) + echo "Usage: @SYSCONFDIR@/init.d/rng-tools {start|stop|reload|restart|force-reload}" + exit 1 +esac + +exit 0 diff --git a/meta-openembedded/meta-oe/recipes-support/rng-tools/rng-tools/rng-tools.service b/meta-openembedded/meta-oe/recipes-support/rng-tools/rng-tools/rng-tools.service new file mode 100644 index 0000000000..5ae2fba215 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/rng-tools/rng-tools/rng-tools.service @@ -0,0 +1,32 @@ +[Unit] +Description=Hardware RNG Entropy Gatherer Daemon +DefaultDependencies=no +Conflicts=shutdown.target +Before=sysinit.target shutdown.target +ConditionVirtualization=!container + +[Service] +EnvironmentFile=-@SYSCONFDIR@/default/rng-tools +ExecStart=@SBINDIR@/rngd -f $EXTRA_ARGS +CapabilityBoundingSet=CAP_SYS_ADMIN +IPAddressDeny=any +LockPersonality=yes +MemoryDenyWriteExecute=yes +NoNewPrivileges=yes +PrivateTmp=yes +ProtectControlGroups=yes +ProtectHome=yes +ProtectHostname=yes +ProtectKernelModules=yes +ProtectKernelLogs=yes +ProtectSystem=strict +RestrictAddressFamilies=AF_UNIX +RestrictNamespaces=yes +RestrictRealtime=yes +RestrictSUIDSGID=yes +SystemCallArchitectures=native +SystemCallErrorNumber=EPERM +SystemCallFilter=@system-service + +[Install] +WantedBy=sysinit.target diff --git a/meta-openembedded/meta-oe/recipes-support/rng-tools/rng-tools_6.16.bb b/meta-openembedded/meta-oe/recipes-support/rng-tools/rng-tools_6.16.bb new file mode 100644 index 0000000000..f0aa3ff93f --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/rng-tools/rng-tools_6.16.bb @@ -0,0 +1,69 @@ +SUMMARY = "Random number generator daemon" +DESCRIPTION = "Check and feed random data from hardware device to kernel" +HOMEPAGE = "https://github.com/nhorman/rng-tools" +BUGTRACKER = "https://github.com/nhorman/rng-tools/issues" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" +DEPENDS = "openssl libcap" + +SRC_URI = "git://github.com/nhorman/rng-tools.git;branch=master;protocol=https \ + file://init \ + file://default \ + file://rng-tools.service \ + " +SRCREV = "e061c313b95890eb5fa0ada0cd6eec619dafdfe2" + +S = "${WORKDIR}/git" + +inherit autotools update-rc.d systemd pkgconfig + +EXTRA_OECONF = "--without-rtlsdr" + +PACKAGECONFIG ??= "libjitterentropy" +PACKAGECONFIG:libc-musl = "libargp libjitterentropy" + +PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone," +PACKAGECONFIG[libjitterentropy] = "--enable-jitterentropy,--disable-jitterentropy,libjitterentropy" +PACKAGECONFIG[libp11] = "--with-pkcs11,--without-pkcs11,libp11 openssl" +PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2" +PACKAGECONFIG[qrypt] = "--with-qrypt,--without-qrypt,curl" + +INITSCRIPT_PACKAGES = "${PN}-service" +INITSCRIPT_NAME:${PN}-service = "rng-tools" +INITSCRIPT_PARAMS:${PN}-service = "start 03 2 3 4 5 . stop 30 0 6 1 ." + +SYSTEMD_PACKAGES = "${PN}-service" +SYSTEMD_SERVICE:${PN}-service = "rng-tools.service" + +CFLAGS += " -DJENT_CONF_ENABLE_INTERNAL_TIMER " + +PACKAGES =+ "${PN}-service" + +FILES:${PN}-service += " \ + ${sysconfdir}/init.d/rng-tools \ + ${sysconfdir}/default/rng-tools \ +" + +# Refer autogen.sh in rng-tools +do_configure:prepend() { + cp ${S}/README.md ${S}/README +} + +do_install:append() { + install -Dm 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools + install -Dm 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools + install -Dm 0644 ${WORKDIR}/rng-tools.service \ + ${D}${systemd_system_unitdir}/rng-tools.service + sed -i \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + -e 's,@SBINDIR@,${sbindir},g' \ + ${D}${sysconfdir}/init.d/rng-tools \ + ${D}${systemd_system_unitdir}/rng-tools.service + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'nistbeacon', 'yes', 'no', d)}" = "yes" ]; then + sed -i \ + -e '/^IPAddressDeny=any/d' \ + -e '/^RestrictAddressFamilies=/ s/$/ AF_INET AF_INET6/' \ + ${D}${systemd_system_unitdir}/rng-tools.service + fi +} diff --git a/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools/0001-Replace-LFS-functions.patch b/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools/0001-Replace-LFS-functions.patch deleted file mode 100644 index a9f1c8601d..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools/0001-Replace-LFS-functions.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 289105253fbf342fd22cbcde2ccc1127f732ab09 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 7 Jul 2023 14:21:17 -0700 -Subject: [PATCH] Replace LFS functions - -The original functions are able to consume 64bit off_t now a days -therefore *64 equivalents can be replaced, as a side it fixes build with -musl. - -Upstream-Status: Submitted [https://github.com/jthornber/thin-provisioning-tools/pull/267] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/file_utils.rs | 10 +++++----- - src/io_engine/base.rs | 4 ++-- - src/thin/trim.rs | 2 +- - 3 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/src/file_utils.rs b/src/file_utils.rs -index 0ca3c0f..d2b3ee9 100644 ---- a/src/file_utils.rs -+++ b/src/file_utils.rs -@@ -11,18 +11,18 @@ fn test_bit(mode: u32, flag: u32) -> bool { - (mode & libc::S_IFMT) == flag - } - --fn is_file_or_blk_(info: &libc::stat64) -> bool { -+fn is_file_or_blk_(info: &libc::stat) -> bool { - test_bit(info.st_mode, libc::S_IFBLK) || test_bit(info.st_mode, libc::S_IFREG) - } - - // wrapper of libc::stat64 --fn libc_stat64(path: &Path) -> io::Result<libc::stat64> { -+fn libc_stat64(path: &Path) -> io::Result<libc::stat> { - let c_path = std::ffi::CString::new(path.as_os_str().as_bytes()) - .map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e.to_string()))?; - - unsafe { -- let mut st: libc::stat64 = std::mem::zeroed(); -- let r = libc::stat64(c_path.as_ptr(), &mut st); -+ let mut st: libc::stat = std::mem::zeroed(); -+ let r = libc::stat(c_path.as_ptr(), &mut st); - if r == 0 { - Ok(st) - } else { -@@ -56,7 +56,7 @@ fn get_device_size<P: AsRef<Path>>(path: P) -> io::Result<u64> { - let fd = file.as_raw_fd(); - let mut cap = 0u64; - unsafe { -- if libc::ioctl(fd, BLKGETSIZE64 as libc::c_ulong, &mut cap) == 0 { -+ if libc::ioctl(fd, BLKGETSIZE64 as libc::c_int, &mut cap) == 0 { - Ok(cap) - } else { - Err(io::Error::last_os_error()) -diff --git a/src/io_engine/base.rs b/src/io_engine/base.rs -index 725ebf7..db6209f 100644 ---- a/src/io_engine/base.rs -+++ b/src/io_engine/base.rs -@@ -115,7 +115,7 @@ pub trait VectoredIo { - - fn read_vectored_at(file: &File, bufs: &mut [libc::iovec], pos: u64) -> io::Result<usize> { - let ptr = bufs.as_ptr(); -- let ret = match unsafe { libc::preadv64(file.as_raw_fd(), ptr, bufs.len() as i32, pos as i64) } -+ let ret = match unsafe { libc::preadv(file.as_raw_fd(), ptr, bufs.len() as i32, pos as i64) } - { - -1 => return Err(io::Error::last_os_error()), - n => n, -@@ -125,7 +125,7 @@ fn read_vectored_at(file: &File, bufs: &mut [libc::iovec], pos: u64) -> io::Resu - - fn write_vectored_at(file: &File, bufs: &[libc::iovec], pos: u64) -> io::Result<usize> { - let ptr = bufs.as_ptr(); -- let ret = match unsafe { libc::pwritev64(file.as_raw_fd(), ptr, bufs.len() as i32, pos as i64) } -+ let ret = match unsafe { libc::pwritev(file.as_raw_fd(), ptr, bufs.len() as i32, pos as i64) } - { - -1 => return Err(io::Error::last_os_error()), - n => n, -diff --git a/src/thin/trim.rs b/src/thin/trim.rs -index 3d938ca..91a53dd 100644 ---- a/src/thin/trim.rs -+++ b/src/thin/trim.rs -@@ -135,7 +135,7 @@ impl<'a> Iterator for RangeIterator<'a> { - const BLKDISCARD: u32 = 0x1277; - fn ioctl_blkdiscard(fd: i32, range: &[u64; 2]) -> std::io::Result<()> { - unsafe { -- if libc::ioctl(fd, BLKDISCARD as libc::c_ulong, range) == 0 { -+ if libc::ioctl(fd, BLKDISCARD as libc::c_int, range) == 0 { - Ok(()) - } else { - Err(std::io::Error::last_os_error()) --- -2.41.0 - diff --git a/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.9.bb b/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.9.bb index b643ad6dc8..b79fdb1a0b 100644 --- a/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.9.bb +++ b/meta-openembedded/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.9.bb @@ -10,7 +10,6 @@ S = "${WORKDIR}/git" SRC_URI = " \ git://github.com/jthornber/thin-provisioning-tools;branch=main;protocol=https \ " -SRC_URI:append:libc-musl = " file://0001-Replace-LFS-functions.patch" SRCREV = "1d60839b0a920df6476712b80f933854fb32e160" UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" |