Skip to content

Commit

Permalink
scarthgap
Browse files Browse the repository at this point in the history
  • Loading branch information
h5b committed Oct 11, 2024
1 parent f110a02 commit 3ae9c0c
Show file tree
Hide file tree
Showing 64 changed files with 1,162 additions and 6 deletions.
2 changes: 1 addition & 1 deletion conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ BBFILE_PRIORITY_protos = "10"

LAYERDEPENDS_protos = "core"
LAYERVERSION_protos = "1"
LAYERSERIES_COMPAT_protos = "dunfell kirkstone"
LAYERSERIES_COMPAT_protos = "dunfell kirkstone scarthgap"
File renamed without changes.
16 changes: 16 additions & 0 deletions meta-protos/conf/layer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "meta-protos"
BBFILE_PATTERN_meta-protos = "^${LAYERDIR}/"

# enforce precedence over any other layer
BBFILE_PRIORITY_meta-protos = "8"

LAYERDEPENDS_meta-protos = "core"
LAYERVERSION_meta-protos = "1"
LAYERSERIES_COMPAT_meta-protos = "dunfell kirkstone scarthgap"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ BBFILES ?= ""

BBLAYERS ?= " \
${TOPDIR}/../meta-clang \
${TOPDIR}/../meta-kf5 \
${TOPDIR}/../meta-kf6 \
${TOPDIR}/../meta-mingw \
${TOPDIR}/../meta-oe/meta-filesystems \
Expand All @@ -20,15 +19,15 @@ BBLAYERS ?= " \
${TOPDIR}/../meta-oe/meta-python \
${TOPDIR}/../meta-oe/meta-webserver \
${TOPDIR}/../meta-oe/meta-xfce \
${TOPDIR}/../meta-protos \
${TOPDIR}/../meta-protos/meta \
${TOPDIR}/../meta-protos/meta-oe \
${TOPDIR}/../meta-protos/meta-python \
${TOPDIR}/../meta-qt5 \
${TOPDIR}/../meta-qt6 \
${TOPDIR}/../meta-selinux \
${TOPDIR}/../poky/meta \
${TOPDIR}/../poky/meta-poky \
${TOPDIR}/../poky/meta-yocto-bsp \
${TOPDIR}/../protos \
${TOPDIR}/../protos/meta-protos \
${TOPDIR}/../protos/meta-protos/meta \
${TOPDIR}/../protos/meta-protos/meta-oe \
${TOPDIR}/../protos/meta-protos/meta-python \
"
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions meta-protos/meta-oe/conf/layer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "meta-oe"
BBFILE_PATTERN_meta-oe = "^${LAYERDIR}/"

# enforce layer precedence
BBFILE_PRIORITY_meta-oe = "8"

LAYERDEPENDS_meta-oe = "core"
LAYERSERIES_COMPAT_meta-oe = "dunfell kirkstone scarthgap"
6 changes: 6 additions & 0 deletions meta-protos/meta-oe/recipes-devtools/jemalloc/backport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Backport

Available with *meta-oe mickledore (Yocto Project 4.2)*.

Upstream revision: b3274b4e90fad106e2e76b48afb866d81170bd6f

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 3fe67deb9fcf0ae3c2ff31a9eccb6a0a9af33b9c Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Fri, 14 Jan 2022 09:47:03 -0800
Subject: [PATCH] test: Disable optimization with clang for aligned_alloc.c

Clang crashes when using glibc 2.35, it works ok with older glibc or
musl, so its very specific problem. Its reported here

https://github.com/llvm/llvm-project/issues/52765

Until it is fixed, workaround the build failure

Upstream-Status: Inappropriate [Workaround]
Signed-off-by: Khem Raj <[email protected]>
---
test/integration/aligned_alloc.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/test/integration/aligned_alloc.c b/test/integration/aligned_alloc.c
index 4375b172..6513bdd9 100644
--- a/test/integration/aligned_alloc.c
+++ b/test/integration/aligned_alloc.c
@@ -1,5 +1,7 @@
#include "test/jemalloc_test.h"

+#pragma clang optimize off
+
#define MAXALIGN (((size_t)1) << 23)

/*
--
2.34.1

48 changes: 48 additions & 0 deletions meta-protos/meta-oe/recipes-devtools/jemalloc/files/run-ptest
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/sh

export MALLOC_CONF_ALL=${MALLOC_CONF}
# Concatenate the individual test's MALLOC_CONF and MALLOC_CONF_ALL.
export_malloc_conf() {
if [ "x${MALLOC_CONF}" != "x" -a "x${MALLOC_CONF_ALL}" != "x" ] ; then
export MALLOC_CONF="${MALLOC_CONF},${MALLOC_CONF_ALL}"
else
export MALLOC_CONF="${MALLOC_CONF}${MALLOC_CONF_ALL}"
fi
}



saved_dir=$PWD
for dir in tests/* ; do
cd $dir
for atest in * ; do
if [[ "${atest##*.}" == "sh" ]]; then
continue
fi
if [ -e "${atest}.sh" ] ; then
# Source the shell script corresponding to the test in a subshell and
# execute the test. This allows the shell script to set MALLOC_CONF, which
# is then used to set MALLOC_CONF (thus allowing the
# per test shell script to ignore the detail).
enable_fill=1 \
enable_prof=1 \
. $(pwd)/${atest}.sh && \
export_malloc_conf
else
export MALLOC_CONF= && \
export_malloc_conf
fi
if [ \( -x $atest \) -a \( -f $atest \) ] ; then
rm -rf tests.log
./$atest > tests.log 2>&1
sed -e '/: pass/ s/^/PASS: /g' \
-e '/: skip/ s/^/SKIP: /g' \
-e '/: fail/ s/^/FAIL: /g' \
-e 's/: pass//g' \
-e 's/: skip//g' \
-e 's/: fail//g' \
-e '/^--- pass:/d' tests.log
fi
done
cd $saved_dir
done
54 changes: 54 additions & 0 deletions meta-protos/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copyright (C) 2021 Mingli Yu <[email protected]>
# Released under the MIT license (see COPYING.MIT for the terms)

SUMMARY = "General-purpose scalable concurrent malloc implementation"

DESCRIPTION = "jemalloc is a general purpose malloc(3) implementation that emphasizes \
fragmentation avoidance and scalable concurrency support."

HOMEPAGE = "https://github.com/jemalloc/jemalloc"
LICENSE = "BSD-2-Clause"

SECTION = "libs"

LIC_FILES_CHKSUM = "file://COPYING;md5=ea061f8731d5e6a5761dfad951ef5f5f"

SRC_URI = "git://github.com/jemalloc/jemalloc.git;branch=master;protocol=https \
file://run-ptest \
"

# Workaround for https://github.com/llvm/llvm-project/issues/52765
SRC_URI:append:libc-glibc:toolchain-clang = " file://0001-test-Disable-optimization-with-clang-for-aligned_all.patch "

SRCREV = "54eaed1d8b56b1aa528be3bdd1877e59c56fa90c"

S = "${WORKDIR}/git"

inherit autotools ptest

EXTRA_AUTORECONF += "--exclude=autoheader"

EXTRA_OECONF:append:libc-musl = " --with-jemalloc-prefix=je_"

do_install:append() {
sed -i -e 's@${STAGING_DIR_HOST}@@g' \
-e 's@${STAGING_DIR_NATIVE}@@g' \
-e 's@${WORKDIR}@@g' ${D}${bindir}/jemalloc-config
}

do_compile_ptest() {
oe_runmake tests
}

do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
subdirs="unit integration stress "
for tooltest in ${subdirs}
do
cp -r ${B}/test/${tooltest} ${D}${PTEST_PATH}/tests
if find ${S}/test/${tooltest}/ -name '*.sh' -print -quit | grep -q .; then
cp ${S}/test/${tooltest}/*.sh ${D}${PTEST_PATH}/tests/${tooltest}
fi
done
find ${D}${PTEST_PATH}/tests \( -name "*.d" -o -name "*.o" \) -exec rm -f {} \;
}
22 changes: 22 additions & 0 deletions meta-protos/meta-oe/recipes-support/fmt/fmt_8.1.0.1.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
SUMMARY = "open-source formatting library for C++"
DESCRIPTION = "{fmt} is an open-source formatting library for C++. It can be used as a safe and fast alternative to (s)printf and iostreams."
AUTHOR = "Victor Zverovich"
HOMEPAGE = "https://fmt.dev"
BUGTRACKER = "https://github.com/fmtlib/fmt/issues"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=af88d758f75f3c5c48a967501f24384b"

BRANCH = "8.1.0-jh"

SRC_URI = "git://github.com/jhnc-oss/fmt;protocol=https;branch=${BRANCH}"
SRCREV = "1dcbdf896a8e1672cd9f189ffe3e2e0290ad0aa0"

S = "${WORKDIR}/git"

inherit cmake
inherit ptest

EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON"

BBCLASSEXTEND = "native"

18 changes: 18 additions & 0 deletions meta-protos/meta-python/conf/layer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*/*.bb \
${LAYERDIR}/recipes-*/*/*/*.bbappend \
${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend \
"

BBFILE_COLLECTIONS += "python-layer"
BBFILE_PATTERN_python-layer = "^${LAYERDIR}/"

# enforce layer precedence
BBFILE_PRIORITY_python-layer = "8"

LAYERDEPENDS_python-layer = "core"
LAYERSERIES_COMPAT_python-layer = "dunfell kirkstone scarthgap"
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
SUMMARY = "An utility for manipulating ini files"
DESCRIPTION = "CLI utility for ini file manipulation"
AUTHOR = "pixelb"
HOMEPAGE = "https://github.com/pixelb/crudini"
BUGTRACKER = "https://github.com/pixelb/crudini/issues"
SECTION = "development"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"

CVE_PRODUCT = ""

DEPENDS += "\
python3-pip-native \
python3-setuptools-scm-native \
"

SRC_URI[sha256sum] = "6fd0eb341b6cbd91e1883030ea9f2102c1c95619eb563af7ddabc2161e019f6b"

inherit pypi setuptools3

RDEPENDS:${PN} += "python3-iniparse"

BBCLASSEXTEND = "native nativesdk"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Backport

Available with *meta-python > langdale (Yocto Project 4.1)*.

Upstream revision: `3f2aee1b080e2f9ab2d0a7326581dad2f07ca6ef`
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From 69adf9e32f5b11e15c0cbe17f9331c77fed65bf8 Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Sat, 28 May 2022 15:50:50 -0700
Subject: [PATCH] Deal with 64bit time_t default on 32bit architectures

Deal with Y2K38 concerns related to Linux input events on more recent
kernels and libcs on 32-bit systems

Upstream-Status: Pending
Signed-off-by: Khem Raj <[email protected]>
---
libsuinput/src/suinput.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/libsuinput/src/suinput.c b/libsuinput/src/suinput.c
index 8d5fb71..13ff16a 100644
--- a/libsuinput/src/suinput.c
+++ b/libsuinput/src/suinput.c
@@ -45,11 +45,20 @@ int suinput_emit(int uinput_fd, uint16_t ev_type, uint16_t ev_code,
struct input_event event;

memset(&event, 0, sizeof(event));
- gettimeofday(&event.time, 0);
event.type = ev_type;
event.code = ev_code;
event.value = ev_value;

+/* attempt to deal with 64-bit time keeping on recent 32-bit systems */
+#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64))
+ gettimeofday(&event.time, 0);
+#else
+ struct timeval now;
+ memset(&now, 0, sizeof(now));
+ gettimeofday(&now, 0);
+ event.input_event_sec = now.tv_sec;
+ event.input_event_usec = now.tv_usec;
+#endif
return suinput_write_event(uinput_fd, &event);
}

--
2.36.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 7a4dde83a9584adb42c7f810d882b1fbf5767e2c Mon Sep 17 00:00:00 2001
From: Bartosz Golaszewski <[email protected]>
Date: Tue, 24 May 2022 21:43:35 +0200
Subject: [PATCH] setup: use setuptools instead of distutils

The latter is deprecated, use setuptools instead.

Signed-off-by: Bartosz Golaszewski <[email protected]>
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 3fa3343..4900b8b 100644
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
import errno
import subprocess

-from distutils.core import setup, Extension
+from setuptools import setup, Extension

libudev_so = "libudev.so.1"

--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SUMMARY = "Python interface to Linux uinput kernel module."
HOMEPAGE = "https://pypi.org/project/python-uinput/"
LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"

SRC_URI += "file://0001-setup-use-setuptools-instead-of-distutils.patch \
file://0001-Deal-with-64bit-time_t-default-on-32bit-architecture.patch \
"
SRC_URI[sha256sum] = "99392b676c77b5795b86b7d75274db33fe754fd1e06fb3d58b167c797dc47f0c"

PYPI_PACKAGE = "python-uinput"

inherit pypi setuptools3

DEPENDS += "udev"
RDEPENDS:${PN} += " \
python3-ctypes \
python3-distutils \
"
RRECOMMENDS:${PN} += "kernel-module-uinput"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
SUMMARY = "Backport of PEP 654 (exception groups)"
DESCRIPTION = "This is a backport of the BaseExceptionGroup and ExceptionGroup classes from Python 3.11."
AUTHOR = "Alex Grönholm <[email protected]>"
HOMEPAGE = "https://github.com/agronholm/exceptiongroup"
BUGTRACKER = "https://github.com/agronholm/exceptiongroup/issues"
SECTION = "development"
LICENSE = "MIT"

CVE_PRODUCT = ""

Loading

0 comments on commit 3ae9c0c

Please sign in to comment.