Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,32 @@
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=667d4ad55f5fbf4c3e853e8acd0f74de"
PV = "0.1+git${SRCPV}"
SRC_URI = "git://github.com/yrutschle/conf2struct;branch=master;protocol=https"
SRCREV = "6bc9eed1eb50175e5fda791f27d85e72f5a6ac78"
S = "${WORKDIR}/git"
SRC_URI += " \
file://0001-makefile-Add-missing-LDFLAGS.patch \
file://0001-conf2struct-Use-the-right-perl.patch \
"
inherit native
DEPENDS += " \
libconfig-native \
libconfig-perl-native \
"
EXTRA_OEMAKE += " \
DESTDIR=${D} \
prefix=${prefix} \
"
do_compile() {
oe_runmake checker
}
do_install() {
oe_runmake install
}
@@ -0,0 +1,23 @@
From b44f0d3dbcadb20396dc83a2aa307d54490388ea Mon Sep 17 00:00:00 2001
From: "William A. Kennington III" <wak@google.com>
Date: Thu, 28 May 2020 23:07:58 -0700
Subject: [PATCH] conf2struct: Use the right perl
---
conf2struct | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/conf2struct b/conf2struct
index 8d68741..b88a9b7 100755
--- a/conf2struct
+++ b/conf2struct
@@ -1,4 +1,5 @@
-#! /usr/bin/perl -w
+#!/usr/bin/env perl
+use warnings;
my $license = <<EOF;
# conf2struct: generate libconf parsers that read to structs
--
2.27.0.rc0.183.gde8f92d652-goog
@@ -0,0 +1,34 @@
From 8fc429f59df50e1f468c8e9616a6e7ef42cc6ebf Mon Sep 17 00:00:00 2001
From: "William A. Kennington III" <wak@google.com>
Date: Thu, 28 May 2020 22:51:47 -0700
Subject: [PATCH] makefile: Add missing LDFLAGS
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index a4d5f10..4976726 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ all: example checker
CFLAGS=-g
checker: confcheck.o
- $(CC) $(CFLAGS) -o confcheck confcheck.o -lconfig
+ $(CC) $(CFLAGS) -o confcheck confcheck.o $(LDFLAGS) -lconfig
install:
@@ -19,7 +19,7 @@ uninstall:
EG_OBJ=example.o parser.o argtable3.o
example: $(EG_OBJ)
- $(CC) $(CFLAGS) -o example $(EG_OBJ) -lconfig
+ $(CC) $(CFLAGS) -o example $(EG_OBJ) $(LDFLAGS) -lconfig
example.c: eg_conf.cfg
./conf2struct eg_conf.cfg
--
2.27.0.rc0.183.gde8f92d652-goog
@@ -0,0 +1,16 @@
HOMEPAGE = "https://metacpan.org/pod/Conf::Libconfig"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
SRC_URI = "https://cpan.metacpan.org/authors/id/C/CN/CNANGEL/Conf-Libconfig-${PV}.tar.gz"
SRC_URI[sha256sum] = "2f13d926a6e51fd549da9ea4ed01277a99748d75236c2a1b5f26f57a1abebe61"
S = "${WORKDIR}/Conf-Libconfig-${PV}"
DEPENDS += "libconfig"
EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}"
inherit cpan
BBCLASSEXTEND += "native"
@@ -0,0 +1 @@
BBCLASSEXTEND += "native"
@@ -0,0 +1,18 @@
#!/bin/sh
if [ "$#" -lt 2 ]; then
echo "Missing args: bridge-stp <bridge> <start|stop>" >&2
exit 1
fi
case "$2" in
start)
/usr/sbin/mstpctl addbridge "$1"
exit
;;
stop)
/usr/sbin/mstpctl delbridge "$1"
exit
;;
*)
echo "Invalid operation: $2" >&2
exit 1
esac
@@ -0,0 +1,12 @@
[Unit]
Description=Multiple Spanning Tree Protocol Daemon
Before=network-pre.target
Wants=network-pre.target
[Service]
Restart=always
Type=simple
ExecStart=/usr/sbin/mstpd -d -v 2
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,30 @@
PR = "r1"
PV = "0.1+git${SRCPV}"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4325afd396febcb659c36b49533135d4"
SRC_URI = "git://github.com/mstpd/mstpd;branch=master;protocol=https"
SRCREV = "181c453fc1a00573e19f14960dcc54ad84beea7c"
S = "${WORKDIR}/git"
SRC_URI += "file://bridge-stp"
SRC_URI += "file://mstpd.service"
inherit autotools pkgconfig systemd
PACKAGES =+ "${PN}-mstpd"
FILES:${PN}-mstpd = "${sbindir}/mstpd ${sbindir}/mstpctl ${sbindir}/bridge-stp"
SYSTEMD_PACKAGES = "${PN}-mstpd"
SYSTEMD_SERVICE:${PN}-mstpd = "mstpd.service"
do_install:append() {
rm -rf ${D}${libexecdir} ${D}${libdir}/NetworkManager
rmdir ${D}${libdir} || true
install -d -m 0755 ${D}/${sbindir}
install -m 0755 ${WORKDIR}/bridge-stp ${D}/${sbindir}
install -d -m 0755 ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/mstpd.service ${D}${systemd_system_unitdir}/
}
@@ -0,0 +1,42 @@
PR = "r2"
PV = "0.1+git${SRCPV}"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "git://github.com/yrutschle/sslh;branch=master;protocol=https"
SRCREV = "7e3f723699764a9d000902af55e15e0eb151281f"
S = "${WORKDIR}/git"
inherit perlnative
DEPENDS += "conf2struct-native"
DEPENDS += "libbsd"
DEPENDS += "libcap"
DEPENDS += "libconfig"
DEPENDS += "libev"
DEPENDS += "systemd"
DEPENDS += "pcre2"
EXTRA_OEMAKE += "DESTDIR=${D}"
EXTRA_OEMAKE += "PREFIX=${prefix}"
EXTRA_OEMAKE += "USELIBCAP=1"
EXTRA_OEMAKE += "USELIBBSD=1"
EXTRA_OEMAKE += "USESYSTEMD=1"
do_configure() {
oe_runmake distclean
}
do_compile() {
# Workaround for a non-installed and broken echosrv
sed -i 's,^\(all:.*\) echosrv,\1,' ${S}/Makefile
# Workaround for the broken dependencies in the Makefile
oe_runmake sslh-conf.h
oe_runmake
}
do_install() {
oe_runmake install
}
@@ -0,0 +1,22 @@
# Remove pwquality from PAM, to avoid breaking PAM and further dependencies
# This allows pwquality to be neatly severed from the system.
RDEPENDS:${PN}-runtime:remove:gbmc = "libpwquality"
do_install:append:gbmc() {
# Remove reference to pwquality library from PAM config file
sed -i '/pam_pwquality.so/d' ${D}${sysconfdir}/pam.d/common-password
# Remove the first occurrence of "use_authtok" in the first line starting
# with "password". This makes sure that if pam_pwquality.so was the first
# entry, we didn't invalidate the next entry in the stack. If the first
# entry has the "use_authtok" set, this "forces the module to not prompt
# the user for a new password but use the one provided by the previously
# stacked password module". Since there is no "previous" entry, it never
# asks for a password which causes the process to fail.
awk '/^password/ && !f{sub(/ use_authtok/, ""); f=1} 1' \
${D}${sysconfdir}/pam.d/common-password \
> ${D}${sysconfdir}/pam.d/common-password.new
mv ${D}${sysconfdir}/pam.d/common-password.new \
${D}${sysconfdir}/pam.d/common-password
}
@@ -0,0 +1,12 @@
module(load="imuxsock" SysSock.Use="off")
module(
load="imjournal"
StateFile="/var/log/state"
RateLimit.Interval="60"
RateLimit.Burst="4000"
)
#
# Include all config files in /etc/rsyslog.d/
#
include(file="/etc/rsyslog.d/*.conf")
@@ -0,0 +1,7 @@
FILESEXTRAPATHS:prepend:gbmc := "${THISDIR}/${PN}:"
SRC_URI:append:gbmc = " \
file://rsyslog.conf \
"
PACKAGECONFIG:append:gbmc = " imjournal"
@@ -0,0 +1 @@
DEFAULT_TIMEZONE:gbmc = "PST8PDT"