added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
SUMMARY = "Active Directory enrollment"
DESCRIPTION = "A helper library and tools for Active Directory client operations."
HOMEPAGE = "http://cgit.freedesktop.org/realmd/adcli"
SECTION = "net"
SRCREV = "8e88e3590a19006362ea8b8dfdc18bb88b3cb3b5"
SRC_URI = "git://gitlab.freedesktop.org/realmd/adcli;branch=master"
S = "${WORKDIR}/git"
LICENSE = "LGPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6"
inherit autotools xmlcatalog
DEPENDS += "virtual/crypt krb5 openldap gettext libxslt xmlto libxml2-native \
cyrus-sasl libxslt-native xmlto-native coreutils-native\
"
EXTRA_OECONF += "--disable-static \
--disable-silent-rules \
--disable-doc \
"

View File

@@ -0,0 +1,31 @@
DESCRIPTION = "autossh is a program to start a copy of ssh and monitor it, restarting it as necessary should it die or stop passing traffic"
HOMEPAGE = "https://www.harding.motd.ca/autossh/"
LICENSE = "BSD-1-Clause & BSD-4-Clause"
LIC_FILES_CHKSUM = "file://autossh.c;beginline=7;endline=22;md5=9ae0c9b04856148d77984ef58536732b \
file://daemon.h;beginline=7;endline=36;md5=839bb7bf781ff48da4a3fec2a62a1a47"
SRC_URI = "https://www.harding.motd.ca/autossh/${BP}.tgz"
SRC_URI[md5sum] = "2b804bc1bf6d2f2afaa526d02df7c0a2"
SRC_URI[sha256sum] = "5fc3cee3361ca1615af862364c480593171d0c54ec156de79fc421e31ae21277"
RDEPENDS:${PN} = "ssh"
CFLAGS:prepend = "-I${WORKDIR}/build "
inherit autotools
EXTRA_OECONF="--with-ssh=/usr/bin/ssh"
do_compile:append() {
cp ${WORKDIR}/autossh-${PV}/CHANGES ${WORKDIR}/build
cp ${WORKDIR}/autossh-${PV}/README ${WORKDIR}/build
cp ${WORKDIR}/autossh-${PV}/autossh.host ${WORKDIR}/build
cp ${WORKDIR}/autossh-${PV}/rscreen ${WORKDIR}/build
cp ${WORKDIR}/autossh-${PV}/autossh.1 ${WORKDIR}/build
cp ${WORKDIR}/autossh-${PV}/autossh.spec ${WORKDIR}/build
}
do_install:append() {
rm -rf ${D}${datadir}/examples
}

View File

@@ -0,0 +1,57 @@
From 4ba61c59d3488c263d106d486b656854a57ad79f Mon Sep 17 00:00:00 2001
From: Jens Rehsack <sno@netbsd.org>
Date: Thu, 13 Aug 2020 15:26:30 +0200
Subject: [PATCH 1/2] conf/Unix.mk: remove fixed command definitions
For cross compiling in Yocto or with appropriate SDKs, commands like
`$CC` are reasonably predefined.
Upstream-Status: Inappropriate
Signed-off-by: Jens Rehsack <sno@netbsd.org>
---
conf/Unix.mk | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/conf/Unix.mk b/conf/Unix.mk
index 02f2b2b..05979fc 100644
--- a/conf/Unix.mk
+++ b/conf/Unix.mk
@@ -37,23 +37,19 @@ RM = rm -f
MKDIR = mkdir -p
# C compiler and flags.
-CC = cc
-CFLAGS = -W -Wall -Os -fPIC
CCOUT = -c -o
# Static library building tool.
-AR = ar
ARFLAGS = -rcs
AROUT =
# DLL building tool.
-LDDLL = cc
+LDDLL = $(CCLD)
LDDLLFLAGS = -shared
LDDLLOUT = -o
# Static linker.
-LD = cc
-LDFLAGS =
+LD = $(CCLD)
LDOUT = -o
# C# compiler; we assume usage of Mono.
@@ -63,7 +59,7 @@ RUNT0COMP = mono T0Comp.exe
# Set the values to 'no' to disable building of the corresponding element
# by default. Building can still be invoked with an explicit target call
# (e.g. 'make dll' to force build the DLL).
-#STATICLIB = no
+STATICLIB = no
#DLL = no
#TOOLS = no
#TESTS = no
--
2.17.1

View File

@@ -0,0 +1,32 @@
From 9515448761739d6186e7d07da5b47e368753528c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 1 Sep 2020 11:34:33 -0700
Subject: [PATCH] make: Pass LDFLAGS when building shared objects
OE passes flags like hash-style via LDFLAGS which alters the linker
defaults, its important to have LDFLAGS in link step even if compiler
driver is used to do linking
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
mk/Rules.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mk/Rules.mk b/mk/Rules.mk
index b480bd6..db65125 100644
--- a/mk/Rules.mk
+++ b/mk/Rules.mk
@@ -344,7 +344,7 @@ $(BEARSSLLIB): $(OBJDIR) $(OBJ)
$(AR) $(ARFLAGS) $(AROUT)$(BEARSSLLIB) $(OBJ)
$(BEARSSLDLL): $(OBJDIR) $(OBJ)
- $(LDDLL) $(LDDLLFLAGS) $(LDDLLOUT)$(BEARSSLDLL) $(OBJ)
+ $(LDDLL) $(LDDLLFLAGS) $(LDFLAGS) $(LDDLLOUT)$(BEARSSLDLL) $(OBJ)
$(BRSSL): $(BEARSSLLIB) $(OBJBRSSL)
$(LD) $(LDFLAGS) $(LDOUT)$(BRSSL) $(OBJBRSSL) $(BEARSSLLIB)
--
2.28.0

View File

@@ -0,0 +1,41 @@
From 542380a13f178d97851751b57054a6b5be555d1c Mon Sep 17 00:00:00 2001
From: Jens Rehsack <sno@netbsd.org>
Date: Thu, 13 Aug 2020 16:16:44 +0200
Subject: [PATCH 2/2] test/test_x509.c: fix potential overflow issue
Instead of doing a memcpy() which does static overflow checking, use
snprintf() for string copying which does the check dynamically.
Fixes:
| In file included from .../recipe-sysroot/usr/include/string.h:519,
| from test/test_x509.c:27:
| In function 'memcpy',
| inlined from 'parse_keyvalue' at test/test_x509.c:845:2,
| inlined from 'process_conf_file' at test/test_x509.c:1360:7,
| inlined from 'main' at test/test_x509.c:2038:2:
| .../recipe-sysroot/usr/include/bits/string_fortified.h:34:10: warning: '__builtin_memcpy' specified bound 4294967295 exceeds maximum object size 2147483647 [-Wstringop-overflow=]
| 34 | return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Jens Rehsack <sno@netbsd.org>
---
test/test_x509.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/test/test_x509.c b/test/test_x509.c
index 2c61cf5..76f6ab9 100644
--- a/test/test_x509.c
+++ b/test/test_x509.c
@@ -842,8 +842,7 @@ parse_keyvalue(HT *d)
return -1;
}
name = xmalloc(u + 1);
- memcpy(name, buf, u);
- name[u] = 0;
+ snprintf(name, u, "%s", buf);
if (HT_get(d, name) != NULL) {
xfree(name);
return -1;
--
2.17.1

View File

@@ -0,0 +1,47 @@
SUMMARY = "BearSSL is an implementation of the SSL/TLS protocol (RFC 5246) written in C"
DESCRIPTION = "BearSSL is an implementation of the SSL/TLS protocol (RFC \
5246) written in C. It aims at offering the following features: \
* Be correct and secure. In particular, insecure protocol versions and \
choices of algorithms are not supported, by design; cryptographic \
algorithm implementations are constant-time by default. \
* Be small, both in RAM and code footprint. For instance, a minimal \
server implementation may fit in about 20 kilobytes of compiled code \
and 25 kilobytes of RAM. \
* Be highly portable. BearSSL targets not only “big” operating systems \
like Linux and Windows, but also small embedded systems and even special \
contexts like bootstrap code. \
* Be feature-rich and extensible. SSL/TLS has many defined cipher suites \
and extensions; BearSSL should implement most of them, and allow extra \
algorithm implementations to be added afterwards, possibly from third \
parties."
HOMEPAGE = "https://bearssl.org"
SECTION = "libs"
inherit lib_package
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1fc37e1037ae673975fbcb96a98f7191"
PV .= "+git${SRCPV}"
SRCREV = "79b1a9996c094ff593ae50bc4edc1f349f39dd6d"
SRC_URI = "git://www.bearssl.org/git/BearSSL;protocol=https;branch=master \
file://0001-conf-Unix.mk-remove-fixed-command-definitions.patch \
file://0002-test-test_x509.c-fix-potential-overflow-issue.patch \
file://0001-make-Pass-LDFLAGS-when-building-shared-objects.patch \
"
# without compile errors like
# <..>/ld: build/obj/ghash_pclmul.o: warning: relocation against `br_ghash_pclmul' in read-only section `.text'
CFLAGS += "-fPIC"
S = "${WORKDIR}/git"
B = "${S}"
do_install() {
mkdir -p ${D}/${bindir} ${D}/${libdir}
install -m 0644 ${B}/build/brssl ${D}/${bindir}
install -m 0644 ${B}/build/libbearssl.so ${D}/${libdir}/libbearssl.so.6.0.0
ln -s libbearssl.so.6.0.0 ${D}/${libdir}/libbearssl.so.6
ln -s libbearssl.so.6.0.0 ${D}/${libdir}/libbearssl.so
}

View File

@@ -0,0 +1,24 @@
Subject: [PATCH] Search for cython3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Inappropriate
Signed-off-by: Markus Volk <f_l_k@gmx.net>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/module/meson.build 2022-02-10 08:49:35.000000000 +0100
+++ b/module/meson.build 2022-03-29 12:58:03.456193737 +0200
@@ -1,4 +1,4 @@
-cython = find_program('cython', required: true)
+cython = find_program('cython3', required: true)
blueman_c = custom_target(
'blueman_c',
--
2.14.3

View File

@@ -0,0 +1,50 @@
From 37f24a9bd62f0a8f3e37eaddd33f2f0c9d3aaa0a Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Fri, 1 Apr 2022 23:12:17 -0700
Subject: [PATCH] meson: add pythoninstalldir option
In case of cross build, using host python to determine the python
site-packages directory for target is not feasible, add a new option
pythoninstalldir to fix the issue.
Upstream-Status: Submitted [https://github.com/blueman-project/blueman/pull/1699]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meson.build | 7 ++++++-
meson_options.txt | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index e12d0ce6..e84457a5 100644
--- a/meson.build
+++ b/meson.build
@@ -26,7 +26,12 @@ pkgdatadir = join_paths([prefix, get_option('datadir'), package_name])
bindir = join_paths([prefix, get_option('bindir')])
libexecdir = join_paths([prefix, get_option('libexecdir')])
schemadir = join_paths(['share', 'glib-2.0', 'schemas'])
-pythondir = pyinstall.get_install_dir()
+pythoninstalldir = get_option('pythoninstalldir')
+if pythoninstalldir != ''
+ pythondir = join_paths([prefix, pythoninstalldir])
+else
+ pythondir = join_paths([prefix, python.sysconfig_path('purelib')])
+endif
if get_option('policykit')
have_polkit = 'True'
diff --git a/meson_options.txt b/meson_options.txt
index 177d9ab8..3e397d8e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,6 +2,7 @@ option('runtime_deps_check', type: 'boolean', value: true, description: 'Disable
option('dhcp-config-path', type: 'string', value: '/etc/dhcp3/dhcpd.conf', description: 'Set dhcp3 server configuration path')
option('policykit', type: 'boolean', value: true, description: 'Enable policykit support')
option('pulseaudio', type: 'boolean', value: true, description: 'Enable PulseAudio support')
+option('pythoninstalldir', type: 'string', description: 'Path to python site-packages dir relative to ${prefix}')
option('systemdsystemunitdir', type: 'string', description: 'Path to systemd system unit dir relative to ${prefix}')
option('systemduserunitdir', type: 'string', description: 'Path to systemd user unit dir relative to ${prefix}')
option('sendto-plugins', type: 'array', choices: ['Caja', 'Nemo', 'Nautilus'], value: ['Caja', 'Nemo', 'Nautilus'], description: 'Install sendto plugins for various filemanagers')
--
2.34.1

View File

@@ -0,0 +1,72 @@
Fix fail to enable bluetooth issue
When launch blueman-manager while bluetooth is disable, it may fails
with error:
Failed to enable bluetooth
Because when get bluetooth status right after change its status, the
status may not be updated that plugin applet/KillSwitch.py sets the
bluetooth status via method of another dbus service which doesn't return
immediately.
Provides a new dbus method for PowerManager which checks whether dbus
method SetBluetoothStatus() has finished. Then it makes sure to get
right bluetooth status.
Upstream-Status: Inappropriate
Send to upstream but not accepted:
https://github.com/blueman-project/blueman/pull/1121
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
blueman/Functions.py | 10 ++++++++++
blueman/plugins/applet/PowerManager.py | 4 ++++
2 files changed, 14 insertions(+)
diff --git a/blueman/Functions.py b/blueman/Functions.py
index 3917f42..b4d5eae 100644
--- a/blueman/Functions.py
+++ b/blueman/Functions.py
@@ -80,6 +80,16 @@ def check_bluetooth_status(message: str, exitfunc: Callable[[], Any]) -> None:
return
applet.SetBluetoothStatus('(b)', True)
+
+ timeout = time.time() + 10
+ while applet.GetRequestStatus():
+ time.sleep(0.1)
+ if time.time() > timeout:
+ # timeout 5s has been set in applet/PowerManager.py
+ # so it should NOT reach timeout here
+ logging.warning('Should NOT reach timeout.')
+ break
+
if not applet.GetBluetoothStatus():
print('Failed to enable bluetooth')
exitfunc()
diff --git a/blueman/plugins/applet/PowerManager.py b/blueman/plugins/applet/PowerManager.py
index c2f7bc3..bf6c99f 100644
--- a/blueman/plugins/applet/PowerManager.py
+++ b/blueman/plugins/applet/PowerManager.py
@@ -63,6 +63,7 @@ class PowerManager(AppletPlugin, StatusIconProvider):
self._add_dbus_signal("BluetoothStatusChanged", "b")
self._add_dbus_method("SetBluetoothStatus", ("b",), "", self.request_power_state)
self._add_dbus_method("GetBluetoothStatus", (), "b", self.get_bluetooth_status)
+ self._add_dbus_method("GetRequestStatus", (), "b", self.get_request_status)
def on_unload(self) -> None:
self.parent.Plugins.Menu.unregister(self)
@@ -196,6 +197,9 @@ class PowerManager(AppletPlugin, StatusIconProvider):
def get_bluetooth_status(self) -> bool:
return self.current_state
+ def get_request_status(self):
+ return self.request_in_progress
+
def on_adapter_property_changed(self, _path: str, key: str, value: Any) -> None:
if key == "Powered":
if value and not self.current_state:
--
2.31.1

View File

@@ -0,0 +1,86 @@
DESCRIPTION = "Blueman is a GTK+ Bluetooth Manager"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
DEPENDS = "gtk+3 glib-2.0 bluez5 python3-pygobject python3-cython-native"
inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache useradd
SRC_URI = " \
git://github.com/blueman-project/blueman.git;protocol=https;branch=2-3-stable \
file://0001-Search-for-cython3.patch \
file://0002-fix-fail-to-enable-bluetooth.patch \
file://0001-meson-add-pythoninstalldir-option.patch \
"
S = "${WORKDIR}/git"
SRCREV = "c85e7afb8d6547d4c35b7b639124de8e999c3650"
EXTRA_OEMESON = "-Druntime_deps_check=false -Dpythoninstalldir=${@noprefix('PYTHON_SITEPACKAGES_DIR', d)}"
SYSTEMD_SERVICE:${PN} = "${BPN}-mechanism.service"
SYSTEMD_AUTO_ENABLE:${PN} = "disable"
RRECOMMENDS:${PN} += "adwaita-icon-theme"
RDEPENDS:${PN} += " \
python3-core \
python3-ctypes \
python3-dbus \
python3-pygobject \
python3-terminal \
python3-fcntl \
packagegroup-tools-bluetooth \
"
PACKAGECONFIG ??= " \
${@bb.utils.filter('DISTRO_FEATURES', 'polkit pulseaudio ', d)} \
thunar \
"
PACKAGECONFIG[thunar] = "-Dthunar-sendto=true,-Dthunar-sendto=false"
PACKAGECONFIG[pulseaudio] = "-Dpulseaudio=true,-Dpulseaudio=false"
PACKAGECONFIG[polkit] = "-Dpolicykit=true,-Dpolicykit=false"
FILES:${PN} += " \
${datadir} \
${systemd_user_unitdir} \
${PYTHON_SITEPACKAGES_DIR} \
"
# In code, path to python is a variable that is replaced with path to native version of it
# during the configure stage, e.g ../recipe-sysroot-native/usr/bin/python3-native/python3.
# Replace it with #!/usr/bin/env python3
do_install:append() {
sed -i "1s/.*/#!\/usr\/bin\/env python3/" ${D}${prefix}/libexec/blueman-rfcomm-watcher \
${D}${prefix}/libexec/blueman-mechanism \
${D}${bindir}/blueman-adapters \
${D}${bindir}/blueman-applet \
${D}${bindir}/blueman-manager \
${D}${bindir}/blueman-sendto \
${D}${bindir}/blueman-services \
${D}${bindir}/blueman-tray
}
do_install:append() {
install -d ${D}${datadir}/polkit-1/rules.d
cat >${D}${datadir}/polkit-1/rules.d/51-blueman.rules <<EOF
/* Allow users in wheel group to use blueman feature requiring root without authentication */
polkit.addRule(function(action, subject) {
if ((action.id == "org.blueman.network.setup" ||
action.id == "org.blueman.dhcp.client" ||
action.id == "org.blueman.rfkill.setstate" ||
action.id == "org.blueman.pppd.pppconnect") &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
EOF
}
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 --shell /bin/nologin polkitd"
do_install:append() {
# Fix up permissions on polkit rules.d to work with rpm4 constraints
chmod 700 ${D}/${datadir}/polkit-1/rules.d
chown polkitd:root ${D}/${datadir}/polkit-1/rules.d
}

View File

@@ -0,0 +1,32 @@
From 318a0e7dfaa0f5f233a20c0b347948c8004cf6af Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 20 Oct 2021 14:02:09 -0700
Subject: [PATCH] bluepy: Fix username issue with tarballs
Fixes
Cannot change ownership to uid 1000, gid 1000: Operation not permitted
Upstream-Status: Submitted [https://github.com/IanHarvey/bluepy/pull/462]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
bluepy/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/bluepy/Makefile
+++ b/bluepy/Makefile
@@ -30,13 +30,13 @@ bluepy-helper: $(LOCAL_SRCS) $(IMPORT_SR
$(CC) -L. $(CFLAGS) $(CPPFLAGS) -o $@ $(LOCAL_SRCS) $(IMPORT_SRCS) $(LDLIBS)
$(IMPORT_SRCS): bluez-src.tgz
- tar xzf $<
+ tar xzf $< --no-same-owner
touch $(IMPORT_SRCS)
.PHONY: bluez-tarfile
bluez-tarfile:
- (cd ..; tar czf bluepy/bluez-src.tgz $(BLUEZ_PATH))
+ (cd ..; tar czf bluepy/bluez-src.tgz $(BLUEZ_PATH) --no-same-owner)
GET_SERVICES=get_services.py

View File

@@ -0,0 +1,20 @@
DESCRIPTION = "Python interface to Bluetooth LE on Linux"
HOMEPAGE = "https://github.com/IanHarvey/bluepy"
SECTION = "devel/python"
LICENSE = "GPL-2.0-only & PD"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=59e0d45ea684dda215889aa1b5acd001"
DEPENDS = "glib-2.0"
SRCREV = "7ad565231a97c304c0eff45f2649cd005e69db09"
PV = "1.3.0+git${SRCPV}"
SRC_URI = "git://github.com/IanHarvey/bluepy.git;protocol=https;branch=master \
file://0001-bluepy-Fix-username-issue-with-tarballs.patch \
"
S = "${WORKDIR}/git"
inherit setuptools3 pkgconfig
RDEPENDS:${PN} = "bluez5"
TARGET_CC_ARCH += "${LDFLAGS}"

View File

@@ -0,0 +1,15 @@
SUMMARY = "a SocketCAN over Ethernet tunnel"
HOMEPAGE = "https://github.com/mguentner/cannelloni"
LICENSE = "GPL-2.0-only"
SRC_URI = "git://github.com/mguentner/cannelloni.git;protocol=https;branch=master"
SRCREV = "0bd7e27db35bdef361226882ae04205504f7b2f4"
LIC_FILES_CHKSUM = "file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
inherit cmake
S = "${WORKDIR}/git"
PACKAGECONFIG ??= "lksctp-tools"
PACKAGECONFIG[lksctp-tools] = "-DSCTP_SUPPORT=true, -DSCTP_SUPPORT=false, lksctp-tools"

View File

@@ -0,0 +1,40 @@
From 21e9a4bb214648ffd43c66b535fbf096bfcc9f4f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 24 Jun 2018 00:04:37 -0700
Subject: [PATCH] Unittest: Link librt and libm using -l option
cmake'ry forces full path to .so files when found using
find_package and since we have proper sysrooted toolchain
-lm and -lrt is all we need
Upstream-Status: Inappropriate [Cross compile specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
unittest/CMakeLists.txt | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt
index c4cdf229..e1b63caf 100644
--- a/unittest/CMakeLists.txt
+++ b/unittest/CMakeLists.txt
@@ -57,14 +57,8 @@ elseif (WIN32)
else()
set(CHECK_LIBRARIES "${CHECK_INSTALL_DIR}/lib/libcheck.a")
endif()
-find_package(LibM)
-if (LIBM_FOUND)
- set(CHECK_LIBRARIES "${CHECK_LIBRARIES};LIBM::LIBM")
-endif()
-find_package(LibRt)
-if (LIBRT_FOUND)
- set(CHECK_LIBRARIES "${CHECK_LIBRARIES};LIBRT::LIBRT")
-endif()
+set(CHECK_LIBRARIES "${CHECK_LIBRARIES};-lm")
+set(CHECK_LIBRARIES "${CHECK_LIBRARIES};-lrt")
# Build the C unit tests
add_library(shared-c-unit-tests STATIC shared.c)
--
2.18.0

View File

@@ -0,0 +1,42 @@
SUMMARY = "Civetweb embedded web server"
HOMEPAGE = "https://github.com/civetweb/civetweb"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=50bd1d7f135b50d7e218996ba28d0d88"
SRCREV = "4b440a339979852d5a51fb11a822952712231c23"
PV = "1.12+git${SRCPV}"
SRC_URI = "git://github.com/civetweb/civetweb.git;branch=master;protocol=https \
file://0001-Unittest-Link-librt-and-libm-using-l-option.patch \
"
S = "${WORKDIR}/git"
# civetweb supports building with make or cmake (although cmake lacks few features)
inherit cmake
# Disable Lua and Duktape because they do not compile from CMake (as of v1.8, v1.9 and v1.10).
# Disable ASAN as it is included only in Debug build.
EXTRA_OECMAKE = " \
-DBUILD_SHARED_LIBS=ON \
-DCIVETWEB_ENABLE_DUKTAPE=OFF \
-DCIVETWEB_ENABLE_LUA=OFF \
-DCIVETWEB_ENABLE_ASAN=OFF \
-DCIVETWEB_BUILD_TESTING=OFF \
"
# Building with ninja fails on missing third_party/lib/libcheck.a (which
# should come from external CMake project)
OECMAKE_GENERATOR = "Unix Makefiles"
PACKAGECONFIG ??= "caching ipv6 server ssl websockets"
PACKAGECONFIG[caching] = "-DCIVETWEB_DISABLE_CACHING=OFF,-DCIVETWEB_DISABLE_CACHING=ON,"
PACKAGECONFIG[cgi] = "-DCIVETWEB_DISABLE_CGI=OFF,-DCIVETWEB_DISABLE_CGI=ON,"
PACKAGECONFIG[cpp] = "-DCIVETWEB_ENABLE_CXX=ON,-DCIVETWEB_ENABLE_CXX=OFF,"
PACKAGECONFIG[debug] = "-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=ON,-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=OFF,"
PACKAGECONFIG[ipv6] = "-DCIVETWEB_ENABLE_IPV6=ON,-DCIVETWEB_ENABLE_IPV6=OFF,"
PACKAGECONFIG[server] = "-DCIVETWEB_ENABLE_SERVER_EXECUTABLE=ON -DCIVETWEB_INSTALL_EXECUTABLE=ON,-DCIVETWEB_ENABLE_SERVER_EXECUTABLE=OFF -DCIVETWEB_INSTALL_EXECUTABLE=OFF,"
PACKAGECONFIG[ssl] = "-DCIVETWEB_ENABLE_SSL=ON -DCIVETWEB_SSL_OPENSSL_API_1_1=OFF -DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=OFF,-DCIVETWEB_ENABLE_SSL=OFF,openssl (=1.0.2%),"
PACKAGECONFIG[websockets] = "-DCIVETWEB_ENABLE_WEBSOCKETS=ON,-DCIVETWEB_ENABLE_WEBSOCKETS=OFF,"
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,32 @@
SUMMARY = "The dump DAQ test the various inline mode features "
HOMEPAGE = "http://www.snort.org"
SECTION = "libs"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=f9ce51a65dd738dc1ae631d8b21c40e0"
PARALLEL_MAKE = ""
DEPENDS = "libpcap libpcre libdnet bison-native"
SRC_URI = "http://fossies.org/linux/misc/daq-${PV}.tar.gz \
file://disable-run-test-program-while-cross-compiling.patch \
file://0001-correct-the-location-of-unistd.h.patch \
"
SRC_URI[sha256sum] = "bdc4e5a24d1ea492c39ee213a63c55466a2e8114b6a9abed609927ae13a7705e"
# these 2 create undeclared dependency on libdnet and libnetfilter-queue from meta-networking
# this error from test-dependencies script:
# daq/daq/latest lost dependency on libdnet libmnl libnetfilter-queue libnfnetlink
#
# never look to /usr/local lib while cross compiling
EXTRA_OECONF = "--disable-nfq-module --disable-ipq-module --includedir=${includedir} \
--with-libpcap-includes=${STAGING_INCDIR} --with-dnet-includes=${STAGING_LIBDIR}"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
inherit autotools
DISABLE_STATIC = ""
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,29 @@
From 10e7d4e4bfcb70344d18f0d4ce36068475747f25 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 29 Mar 2017 15:59:43 -0700
Subject: [PATCH] correct the location of unistd.h
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
os-daq-modules/daq_ipfw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/os-daq-modules/daq_ipfw.c b/os-daq-modules/daq_ipfw.c
index 016beb0..c2a4175 100644
--- a/os-daq-modules/daq_ipfw.c
+++ b/os-daq-modules/daq_ipfw.c
@@ -23,10 +23,10 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include <unistd.h>
#include <sys/types.h>
#include <sys/time.h>
-#include <sys/unistd.h>
#include <netinet/in.h>
#include <sys/socket.h>
--
2.12.1

View File

@@ -0,0 +1,31 @@
Upstream-Status: Inappropriate [embedded specific]
fix the below error:
configure: error: cannot run test program while cross compiling
Signed-off-by: Chunrong Guo <B40290@freescale.com>
--- a/m4/sf.m4old 2015-10-28 10:21:20.270557986 +0800
+++ a/m4/sf.m4 2015-10-28 10:23:22.726551974 +0800
@@ -135,20 +135,7 @@
echo
exit 1
fi
- AC_CACHE_CHECK([for libpcap version >= $1], [daq_cv_libpcap_version_1x], [
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <pcap.h>
- #include <string.h>
- extern char pcap_version[];
- ]],
- [[
- if (strcmp(pcap_version, $1) < 0)
- return 1;
- ]])],
- [daq_cv_libpcap_version_1x="yes"],
- [daq_cv_libpcap_version_1x="no"])])
+ AC_CACHE_CHECK([for libpcap version >= $1], [daq_cv_libpcap_version_1x])
if test "x$daq_cv_libpcap_version_1x" = "xno"; then
echo
echo " ERROR! Libpcap library version >= $1 not found."

View File

@@ -0,0 +1,62 @@
SECTION = "console/network"
SUMMARY = "Internet Software Consortium DHCP Relay Agent"
DESCRIPTION = "A DHCP relay agent passes DHCP requests from one \
LAN to another, so that a DHCP server is not needed on every LAN."
HOMEPAGE = "http://www.isc.org/"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c463f4afde26d9eb60f14f50aeb85f8f"
DEPENDS = "openssl libcap zlib"
SRC_URI = "https://downloads.isc.org/isc/dhcp/4.4.3-P1/dhcp-4.4.3-P1.tar.gz \
file://default-relay \
file://init-relay \
file://dhcrelay.service \
file://0001-Makefile.am-only-build-dhcrelay.patch \
file://0002-bind-Makefile.in-disable-backtrace.patch \
file://0003-bind-Makefile.in-regenerate-configure.patch \
"
SRC_URI[sha256sum] = "0ac416bb55997ca8632174fd10737fd61cdb8dba2752160a335775bc21dc73c7"
UPSTREAM_CHECK_URI = "http://ftp.isc.org/isc/dhcp/"
UPSTREAM_CHECK_REGEX = "(?P<pver>\d+\.\d+\.(\d+?))/"
S = "${WORKDIR}/dhcp-4.4.3-P1"
inherit autotools-brokensep systemd pkgconfig
SYSTEMD_SERVICE:${PN} = "dhcrelay.service"
SYSTEMD_AUTO_ENABLE:${PN} = "disable"
CFLAGS += "-D_GNU_SOURCE -fcommon"
LDFLAGS:append = " -pthread"
EXTRA_OECONF = "--enable-paranoia \
--disable-static \
--enable-libtool \
--with-randomdev=/dev/random \
"
# Enable shared libs per dhcp README
do_configure:prepend () {
cp configure.ac+lt configure.ac
}
do_install:append () {
install -Dm 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/dhcrelay.service ${D}${systemd_unitdir}/system
sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcrelay.service
sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcrelay.service
else
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay
fi
}
PARALLEL_MAKE = ""

View File

@@ -0,0 +1,30 @@
From 4fd67b6adb7c1d8524ba17d1a0b3894f901555a9 Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Thu, 13 May 2021 15:23:16 +0800
Subject: [PATCH] Makefile.am: only build dhcrelay
Drop client and server build as we don't need them.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index ed692a5..34f9772 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,7 +38,7 @@ endif
# Use an autoconf substitution vs an automake conditional here
# to fool automake when the bind directory does not exist.
-SUBDIRS = @BINDSUBDIR@ includes tests common omapip client dhcpctl relay server
+SUBDIRS = @BINDSUBDIR@ includes common omapip relay
DIST_SUBDIRS = $(SUBDIRS) keama
--
2.25.1

View File

@@ -0,0 +1,31 @@
From 6c6bbfe6b33e5c7e46a4260d656593dbe610fd8a Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Tue, 8 Jun 2021 10:13:57 +0800
Subject: [PATCH] bind/Makefile.in: disable backtrace
Fixes build error for qemuarm on musl:
libisc.so: undefined reference to `_Unwind_GetIP'
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
bind/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bind/Makefile.in b/bind/Makefile.in
index 2e60091..533d55c 100644
--- a/bind/Makefile.in
+++ b/bind/Makefile.in
@@ -22,7 +22,7 @@ prefix = @prefix@
exec_prefix = @exec_prefix@
bindconfig = --without-openssl --without-libxml2 --without-libjson \
- --without-gssapi --disable-threads --without-lmdb \
+ --without-gssapi --disable-threads --without-lmdb --disable-backtrace \
--includedir=@includedir@ --libdir=@libdir@ --without-python\
@BINDLT@ @BINDIOMUX@ @BINDCONFIG@ --enable-full-report
--
2.25.1

View File

@@ -0,0 +1,30 @@
From 6ca1b224032355521b35471d222d0b09c08369a0 Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Thu, 27 May 2021 11:38:36 +0800
Subject: [PATCH] bind/Makefile.in: regenerate configure
Run autogen.sh to regenerate configure.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
bind/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bind/Makefile.in b/bind/Makefile.in
index 533d55c..fdffe15 100644
--- a/bind/Makefile.in
+++ b/bind/Makefile.in
@@ -55,7 +55,7 @@ bind1:
else \
echo Configuring BIND libraries for DHCP. ; \
rm -rf ${cleandirs} ${cleanfiles} ; \
- (cd ${bindsrcdir} && \
+ (cd ${bindsrcdir} && ./autogen.sh && \
./configure ${bindconfig} > ${binddir}/configure.log); \
fi
--
2.25.1

View File

@@ -0,0 +1,12 @@
# Defaults for dhcp-relay initscript
# sourced by /etc/init.d/dhcp-relay
# What servers should the DHCP relay forward requests to?
# e.g: SERVERS="192.168.0.1"
SERVERS=""
# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests?
INTERFACES=""
# Additional options that are passed to the DHCP relay daemon?
OPTIONS=""

View File

@@ -0,0 +1,10 @@
[Unit]
Description=DHCP Relay Agent Daemon
After=network.target
[Service]
EnvironmentFile=@SYSCONFDIR@/default/dhcp-relay
ExecStart=@SBINDIR@/dhcrelay -d --no-pid -q $SERVERS
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,44 @@
#!/bin/sh
#
# $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $
#
# It is not safe to start if we don't have a default configuration...
if [ ! -f /etc/default/dhcp-relay ]; then
echo "/etc/default/dhcp-relay does not exist! - Aborting..."
echo "create this file to fix the problem."
exit 1
fi
# Read init script configuration (interfaces the daemon should listen on
# and the DHCP server we should forward requests to.)
. /etc/default/dhcp-relay
# Build command line for interfaces (will be passed to dhrelay below.)
IFCMD=""
if test "$INTERFACES" != ""; then
for I in $INTERFACES; do
IFCMD=${IFCMD}"-i "${I}" "
done
fi
DHCRELAYPID=/var/run/dhcrelay.pid
case "$1" in
start)
start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS
;;
stop)
start-stop-daemon -K -x /usr/sbin/dhcrelay
;;
restart | force-reload)
$0 stop
sleep 2
$0 start
;;
*)
echo "Usage: /etc/init.d/dhcp-relay {start|stop|restart|force-reload}"
exit 1
esac
exit 0

View File

@@ -0,0 +1,125 @@
From 9e9d94566d39eef3e4606f806aa418bf5534fab9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 15 Jan 2023 22:04:31 -0800
Subject: [PATCH 1/2] Define alignof using _Alignof when using C11 or newer
WG14 N2350 made very clear that it is an UB having type definitions
within "offsetof" [1]. This patch enhances the implementation of macro
alignof to use builtin "_Alignof" to avoid undefined behavior on
when using std=c11 or newer
clang 16+ has started to flag this [2]
Fixes build when using -std >= gnu11 and using clang16+
Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it
may support C11, exclude those compilers too
[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm
[2] https://reviews.llvm.org/D133574
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Misc/md5-coreutils.c | 12 +++++++++++-
Misc/sha1.c | 12 +++++++++++-
Misc/sha256.c | 12 +++++++++++-
Misc/sha512.c | 12 +++++++++++-
4 files changed, 44 insertions(+), 4 deletions(-)
diff --git a/Misc/md5-coreutils.c b/Misc/md5-coreutils.c
index d6503e02..2ffb6050 100644
--- a/Misc/md5-coreutils.c
+++ b/Misc/md5-coreutils.c
@@ -154,7 +154,17 @@ md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
if (len >= 64)
{
#if !_STRING_ARCH_unaligned
-# define alignof(type) offsetof (struct { char c; type x; }, x)
+/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
+ clang versions < 8.0.0 have the same bug. */
+# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
+ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
+ && !defined __clang__) \
+ || (defined __clang__ && __clang_major__ < 8))
+# define alignof(type) offsetof (struct { char c; type x; }, x)
+# else
+# define alignof(type) _Alignof(type)
+# endif
# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0)
if (UNALIGNED_P (buffer))
while (len > 64)
diff --git a/Misc/sha1.c b/Misc/sha1.c
index 18ceb845..a170efe3 100644
--- a/Misc/sha1.c
+++ b/Misc/sha1.c
@@ -149,7 +149,17 @@ sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx)
if (len >= 64)
{
#if !_STRING_ARCH_unaligned
-# define alignof(type) offsetof (struct { char c; type x; }, x)
+/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
+ clang versions < 8.0.0 have the same bug. */
+# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
+ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
+ && !defined __clang__) \
+ || (defined __clang__ && __clang_major__ < 8))
+# define alignof(type) offsetof (struct { char c; type x; }, x)
+# else
+# define alignof(type) _Alignof(type)
+# endif
# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0)
if (UNALIGNED_P (buffer))
while (len > 64)
diff --git a/Misc/sha256.c b/Misc/sha256.c
index 68292326..da59e81d 100644
--- a/Misc/sha256.c
+++ b/Misc/sha256.c
@@ -372,7 +372,17 @@ sha256_process_bytes (const void *buffer, size_t len, struct sha256_ctx *ctx)
if (len >= 64)
{
#if !_STRING_ARCH_unaligned
-# define alignof(type) offsetof (struct { char c; type x; }, x)
+/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
+ clang versions < 8.0.0 have the same bug. */
+# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
+ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
+ && !defined __clang__) \
+ || (defined __clang__ && __clang_major__ < 8))
+# define alignof(type) offsetof (struct { char c; type x; }, x)
+# else
+# define alignof(type) _Alignof(type)
+# endif
# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0)
if (UNALIGNED_P (buffer))
while (len > 64)
diff --git a/Misc/sha512.c b/Misc/sha512.c
index db86c659..38e162fc 100644
--- a/Misc/sha512.c
+++ b/Misc/sha512.c
@@ -190,7 +190,17 @@ sha512_process_bytes (const void *buffer, size_t len, struct sha512_ctx *ctx)
if (len >= 128)
{
#if !_STRING_ARCH_unaligned
-# define alignof(type) offsetof (struct { char c; type x; }, x)
+/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
+ clang versions < 8.0.0 have the same bug. */
+# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
+ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
+ && !defined __clang__) \
+ || (defined __clang__ && __clang_major__ < 8))
+# define alignof(type) offsetof (struct { char c; type x; }, x)
+# else
+# define alignof(type) _Alignof(type)
+# endif
# define UNALIGNED_P(p) (((size_t) p) % alignof (uint64_t) != 0)
if (UNALIGNED_P (buffer))
while (len > 128)
--
2.39.0

View File

@@ -0,0 +1,33 @@
From cbb33e1548fe526c3e7dead294617bde1f087ae3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 24 Aug 2022 16:40:38 -0700
Subject: [PATCH] port-linux: Re-order header includes
linux/if.h when included before net/if.h casues duplicate definitions
Upstream-Status: Inappropriate [Upstream is Dead]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Port-linux/interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Port-linux/interface.c b/Port-linux/interface.c
index 18777e91..19aefb2b 100644
--- a/Port-linux/interface.c
+++ b/Port-linux/interface.c
@@ -25,7 +25,6 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
-#include <linux/if.h>
#include <syslog.h>
#include <string.h>
#include <errno.h>
@@ -42,6 +41,7 @@
#include <stdarg.h>
#include <linux/sockios.h>
#include <linux/if_ether.h>
+#include <linux/if.h>
int interface_auto_up = 0;
int interface_do_message = 0;

View File

@@ -0,0 +1,50 @@
From e826206c58bbaa1c256f55b103d5eb7b0182f152 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 15 Jan 2023 22:05:53 -0800
Subject: [PATCH 2/2] make: Do not enforce c99
Latest gcc/clang from OE defaults to c11 or newer and stickly to c99
means we can not use _AlignOf
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Misc/Makefile.am | 4 +---
Port-linux/Makefile.am | 1 -
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/Misc/Makefile.am b/Misc/Makefile.am
index d881525a..8d71d2d4 100644
--- a/Misc/Makefile.am
+++ b/Misc/Makefile.am
@@ -6,8 +6,6 @@ endif
noinst_LIBRARIES = libMisc.a
-libMisc_a_CFLAGS = -std=c99
-
libMisc_a_CPPFLAGS = -I$(top_srcdir)
libMisc_a_SOURCES = addrpack.c
@@ -27,4 +25,4 @@ libMisc_a_SOURCES += lowlevel-posix.c
libMisc_a_SOURCES += hmac-sha-md5.h hmac-sha-md5.c
libMisc_a_SOURCES += md5-coreutils.c md5.h
-libMisc_a_SOURCES += sha1.c sha1.h sha256.c sha256.h sha512.c sha512.h
\ No newline at end of file
+libMisc_a_SOURCES += sha1.c sha1.h sha256.c sha256.h sha512.c sha512.h
diff --git a/Port-linux/Makefile.am b/Port-linux/Makefile.am
index 72b0a5e3..635998ea 100644
--- a/Port-linux/Makefile.am
+++ b/Port-linux/Makefile.am
@@ -1,6 +1,5 @@
noinst_LIBRARIES = libLowLevel.a
-libLowLevel_a_CFLAGS = -std=c99
libLowLevel_a_CPPFLAGS = -I$(top_srcdir)/Misc
libLowLevel_a_SOURCES = daemon.cpp daemon.h ethtool-kernel.h ethtool-local.h interface.c interface.h ip_common.h iproute.c libnetlink.c libnetlink.h ll_map.c ll_map.h ll_types.c lowlevel-linux.c lowlevel-linux-link-state.c lowlevel-options-linux.c rtm_map.h rt_names.h utils.c utils.h
--
2.39.0

View File

@@ -0,0 +1,48 @@
Index: git/ClntMessages/ClntMsgRequest.cpp
===================================================================
--- git.orig/ClntMessages/ClntMsgRequest.cpp
+++ git/ClntMessages/ClntMsgRequest.cpp
@@ -142,7 +142,10 @@ TClntMsgRequest::TClntMsgRequest(List(TA
IsDone=false;
SPtr<TOpt> ptr;
ptr = new TOptDUID(OPTION_CLIENTID, ClntCfgMgr().getDUID(), this );
- Options.push_back( ptr );
+
+ if ( ptr ) {
+ Options.push_back( ptr );
+ }
if (!srvDUID) {
Log(Error) << "Unable to send REQUEST: ServerId not specified.\n" << LogEnd;
@@ -153,7 +156,9 @@ TClntMsgRequest::TClntMsgRequest(List(TA
ptr = new TOptDUID(OPTION_SERVERID, srvDUID,this);
// all IAs provided by checkSolicit
SPtr<TAddrIA> ClntAddrIA;
- Options.push_back( ptr );
+ if ( ptr ) {
+ Options.push_back( ptr );
+ }
IAs.first();
while (ClntAddrIA = IAs.get())
Index: git/Messages/Msg.cpp
===================================================================
--- git.orig/Messages/Msg.cpp
+++ git/Messages/Msg.cpp
@@ -69,10 +69,15 @@ int TMsg::getSize()
{
int pktsize=0;
TOptList::iterator opt;
+ int optionCount = 0;
for (opt = Options.begin(); opt!=Options.end(); ++opt)
{
- pktsize += (*opt)->getSize();
+ Log(Info) << "### CPE Debug - Option with index " << optionCount++ << LogEnd ;
+ Log(Info) << "### CPE Debug - Option with type " << (*opt)->getOptType() << LogEnd ;
+ pktsize += (*opt)->getSize();
}
+ Log(Info) << "### CPE Debug - Packet size of option (Add 4) " << pktsize << LogEnd ;
+
return pktsize + 4;
}

View File

@@ -0,0 +1,43 @@
SUMMARY = "Dibbler DHCPv6 client"
DESCRIPTION = "Dibbler is a portable DHCPv6 implementation. It supports stateful as well as stateless autoconfiguration for IPv6."
HOMEPAGE = "http://klub.com.pl/dhcpv6"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7236695bb6d4461c105d685a8b61c4e3"
SRCREV = "a7c6cf58a88a510cb00841351e75030ce78d36bf"
SRC_URI = "git://github.com/tomaszmrugalski/dibbler;branch=master;protocol=https \
file://dibbler_fix_getSize_crash.patch \
file://0001-port-linux-Re-order-header-includes.patch \
file://0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \
file://0002-make-Do-not-enforce-c99.patch \
"
PV = "1.0.1+1.0.2RC1+git${SRCREV}"
S = "${WORKDIR}/git"
PACKAGECONFIG ??= "debug bind-reuse resolvconf dns-update"
PACKAGECONFIG[debug] = "--enable-debug,,,"
PACKAGECONFIG[efence] = "--enable-efence,,,"
PACKAGECONFIG[bind-reuse] = "--enable-bind-reuse,,,"
PACKAGECONFIG[dst-addr-filter] = "--enable-dst-addr-check,,,"
PACKAGECONFIG[resolvconf] = "--enable-resolvconf,,,"
PACKAGECONFIG[dns-update] = "--enable-dns-update,,,"
PACKAGECONFIG[auth] = "--enable-auth,,,"
PACKAGECONFIG[gtest] = "--enable-gtest-static,,,"
inherit autotools
DEPENDS += "flex-native"
CPPFLAGS += "-D_GNU_SOURCE -Dregister=''"
LDFLAGS += "-pthread"
PACKAGES =+ "${PN}-requestor ${PN}-client ${PN}-relay ${PN}-server"
FILES:${PN}-client = "${sbindir}/${PN}-client"
FILES:${PN}-relay = "${sbindir}/${PN}-relay"
FILES:${PN}-requestor = "${sbindir}/${PN}-requestor"
FILES:${PN}-server = "${sbindir}/${PN}-server"

View File

@@ -0,0 +1,17 @@
SUMMARY = "daemon that sends updates when your IP changes"
HOMEPAGE = "http://sourceforge.net/projects/ez-ipupdate/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=7783169b4be06b54e86730eb01bc3a31"
SRC_URI = "http://sourceforge.net/projects/ez-ipupdate/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \
file://Makefile.am.patch \
file://cache_file.c.patch \
file://conf_file.c.patch \
file://wformat.patch \
file://0001-ez-ipupdate-Include-time.h-for-time-API-prototype.patch \
"
SRC_URI[md5sum] = "525be4550b4461fdf105aed8e753b020"
SRC_URI[sha256sum] = "a15ec0dc0b78ec7578360987c68e43a67bc8d3591cbf528a323588830ae22c20"
inherit autotools pkgconfig

View File

@@ -0,0 +1,44 @@
From 6c8fe883df993b9e7987c8f1c849962f8007a373 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 29 Aug 2022 12:50:37 -0700
Subject: [PATCH] ez-ipupdate: Include time.h for time() API prototype
Fix printf format specifiers for snprintf
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
ez-ipupdate.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ez-ipupdate.c b/ez-ipupdate.c
index 15a4c13..5cbe7f3 100644
--- a/ez-ipupdate.c
+++ b/ez-ipupdate.c
@@ -38,6 +38,8 @@
# include <config.h>
#endif
+#include <time.h>
+
// you man very well need to edit this, don't worry though, email is only sent
// if bad things happend and it has to exit when in daemon mode.
#define SEND_EMAIL_CMD "mail"
@@ -2483,7 +2485,7 @@ int DHS_update_entry(void)
p += strlen(p);
limit = BUFFER_SIZE - 1 - strlen(buf);
- snprintf(buf, BUFFER_SIZE, "Content-length: %d\015\012", strlen(putbuf));
+ snprintf(buf, BUFFER_SIZE, "Content-length: %lu\015\012", strlen(putbuf));
output(buf);
snprintf(buf, BUFFER_SIZE, "\015\012");
output(buf);
@@ -2620,7 +2622,7 @@ int DHS_update_entry(void)
p += strlen(p);
limit = BUFFER_SIZE - 1 - strlen(buf);
- snprintf(buf, BUFFER_SIZE, "Content-length: %d\015\012", strlen(putbuf));
+ snprintf(buf, BUFFER_SIZE, "Content-length: %lu\015\012", strlen(putbuf));
output(buf);
snprintf(buf, BUFFER_SIZE, "\015\012");
output(buf);

View File

@@ -0,0 +1,14 @@
Remove EXTRASRC and EXTRAOBJ from obj list
--- ez-ipupdate-3.0.11b7/Makefile.am.orig 2014-07-02 13:47:50.758034983 -0600
+++ ez-ipupdate-3.0.11b7/Makefile.am 2014-07-02 13:48:38.406034650 -0600
@@ -1,7 +1,7 @@
bin_PROGRAMS = ez-ipupdate
-ez_ipupdate_SOURCES = ez-ipupdate.c conf_file.c conf_file.h md5.c md5.h cache_file.c cache_file.h error.h pid_file.c pid_file.h dprintf.h @EXTRASRC@
-ez_ipupdate_LDADD = @EXTRAOBJ@
+ez_ipupdate_SOURCES = ez-ipupdate.c conf_file.c conf_file.h md5.c md5.h cache_file.c cache_file.h error.h pid_file.c pid_file.h dprintf.h
+ez_ipupdate_LDADD =
EXTRA_DIST = getpass.c ez-ipupdate.lsm example.conf example-pgpow.conf example-dhs.conf example-dyndns.conf example-ods.conf example-tzo.conf example-gnudip.conf example-easydns.conf example-justlinux.conf example-dyns.conf CHANGELOG mkbinary example-heipv6tb.conf

View File

@@ -0,0 +1,32 @@
Dont assume errno type
--- ez-ipupdate-3.0.11b7/cache_file.c.orig 2014-07-02 14:01:07.126029412 -0600
+++ ez-ipupdate-3.0.11b7/cache_file.c 2014-07-02 14:08:27.422026332 -0600
@@ -43,11 +43,11 @@
#include <cache_file.h>
#if HAVE_STRERROR
-extern int errno;
+# include <errno.h>
# define error_string strerror(errno)
#elif HAVE_SYS_ERRLIST
extern const char *const sys_errlist[];
-extern int errno;
+# include <errno.h>
# define error_string (sys_errlist[errno])
#else
# define error_string "error message not found"
@@ -63,11 +63,11 @@
# define dprintf(x)
#endif
#if HAVE_STRERROR
-extern int errno;
+# include <errno.h>
# define error_string strerror(errno)
#elif HAVE_SYS_ERRLIST
extern const char *const sys_errlist[];
-extern int errno;
+# include <errno.h>
# define error_string (sys_errlist[errno])
#else
# define error_string "error message not found"

View File

@@ -0,0 +1,18 @@
Dont assume errno type
--- ez-ipupdate-3.0.11b7/conf_file.c.orig 2014-07-02 14:01:19.174029328 -0600
+++ ez-ipupdate-3.0.11b7/conf_file.c 2014-07-02 14:08:42.982026223 -0600
@@ -38,11 +38,11 @@
#include <conf_file.h>
#if HAVE_STRERROR
-extern int errno;
+# include <errno.h>
# define error_string strerror(errno)
#elif HAVE_SYS_ERRLIST
extern const char *const sys_errlist[];
-extern int errno;
+# include <errno.h>
# define error_string (sys_errlist[errno])
#else
# define error_string "error message not found"

View File

@@ -0,0 +1,13 @@
Index: ez-ipupdate-3.0.11b7/ez-ipupdate.c
===================================================================
--- ez-ipupdate-3.0.11b7.orig/ez-ipupdate.c
+++ ez-ipupdate-3.0.11b7/ez-ipupdate.c
@@ -798,7 +798,7 @@ void show_message(char *fmt, ...)
sprintf(buf, "message incomplete because your OS sucks: %s\n", fmt);
#endif
- syslog(LOG_NOTICE, buf);
+ syslog(LOG_NOTICE, "%s", buf);
}
else
{

View File

@@ -0,0 +1,46 @@
From 3be3b9a1345942d1578ec73efa9b2e3c41bd67c5 Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Fri, 21 Jan 2022 13:22:24 +0800
Subject: [PATCH] Add autogen.sh
The autogen.sh has been removed since 3.0.22[1]. But we still need it in
do_configure. Add it back.
[1] https://github.com/FreeRADIUS/freeradius-server/commit/2e9b6227efd19e2b0926541aa26874908e7b7314
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
autogen.sh | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100755 autogen.sh
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000000..959182b39e
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+parentdir=`dirname $0`
+
+cd $parentdir
+parentdir=`pwd`
+m4include="-I$parentdir -I$parentdir/m4 -Im4"
+
+autoreconf -Wcross --verbose --install --force
+
+mysubdirs="$mysubdirs `find src/modules/ -name configure -print | sed 's%/configure%%'`"
+mysubdirs=`echo $mysubdirs`
+
+for F in $mysubdirs
+do
+ echo "Configuring in $F..."
+ (cd $F && grep "^AC_CONFIG_HEADER" configure.ac > /dev/null || exit 0; autoheader $m4include)
+ (cd $F && autoconf $m4include)
+done
--
2.25.1

View File

@@ -0,0 +1,32 @@
From 2a74c10836c0d2d19248ca40d113936f4a56b039 Mon Sep 17 00:00:00 2001
From: "Roy.Li" <rongqing.li@windriver.com>
Date: Sun, 8 Jan 2023 22:47:11 +0800
Subject: [PATCH] Enable and change user and group of freeradius server to
radiusd
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
raddb/radiusd.conf.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/raddb/radiusd.conf.in b/raddb/radiusd.conf.in
index 154b50d610..4594d6d2d2 100644
--- a/raddb/radiusd.conf.in
+++ b/raddb/radiusd.conf.in
@@ -557,8 +557,8 @@ security {
# member. This can allow for some finer-grained access
# controls.
#
-# user = radius
-# group = radius
+ user = radiusd
+ group = radiusd
# Core dumps are a bad thing. This should only be set to
# 'yes' if you're debugging a problem with the server.
--
2.25.1

View File

@@ -0,0 +1,37 @@
From ba1390a80662ff2ab7bfda978cde7df9a871f6ae Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Tue, 24 Jul 2018 15:03:39 +0800
Subject: [PATCH] configure.ac: allow cross-compilation
The checking OpenSSL library and header version consistency will
always fail in cross compiling, skip the check and give a warning
instead for cross compiling.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
update to new version 3.0.17 to fix patch warning
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
src/modules/rlm_krb5/configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/modules/rlm_krb5/configure.ac b/src/modules/rlm_krb5/configure.ac
index a0f510cfb3..d2f3eca03e 100644
--- a/src/modules/rlm_krb5/configure.ac
+++ b/src/modules/rlm_krb5/configure.ac
@@ -140,7 +140,8 @@ if test x$with_[]modname != xno; then
FR_SMART_CHECK_LIB(krb5, krb5_is_thread_safe)
if test "x$ac_cv_lib_krb5_krb5_is_thread_safe" = xyes; then
AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <krb5.h>]], [[return krb5_is_thread_safe() ? 0 : 1]])],
- [krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])])
+ [krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])],
+ [AC_MSG_WARN(cross compiling: not checking)])
fi
else
krb5threadsafe=""
--
2.25.1

View File

@@ -0,0 +1,71 @@
From 5ba3d140842268cbbdd983266efecb1fba5bdd59 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 22 Aug 2019 10:45:46 +0800
Subject: [PATCH] Fix libtool detection
Use LT_INIT instead of the deprecated AC_PROG_LIBTOOL to detect libtool, so it
can work with our libtoolize and libtool.
Simplify the detection of ltdl. It will find the ltdl from the sysroot; the
switch --with-system-libltdl is no longer needed. The code is copied from
pulseaudio configure.ac, together with the comment paragraph.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
configure.ac | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/configure.ac b/configure.ac
index ad8bc8cdda..ef8fced680 100644
--- a/configure.ac
+++ b/configure.ac
@@ -321,6 +321,42 @@ dnl # See if we have Git.
dnl #
AC_CHECK_PROG(GIT, git, yes, no)
+#### libtool stuff ####
+
+dnl set this shit so it doesn't force CFLAGS...
+LTCFLAGS=" "
+
+LT_PREREQ(2.2)
+LT_INIT([dlopen disable-static])
+
+dnl Unfortunately, even up to libtool 2.2.6a there is no way to know
+dnl exactly which version of libltdl is present in the system, so we
+dnl just assume that it's a working version as long as we have the
+dnl library and the header files.
+dnl
+dnl As an extra safety device, check for lt_dladvise_init() which is
+dnl only implemented in libtool 2.x, and refine as we go if we have
+dnl refined requirements.
+dnl
+dnl Check the header files first since the system may have a
+dnl libltdl.so for runtime, but no headers, and we want to bail out as
+dnl soon as possible.
+dnl
+dnl We don't need any special variable for this though, since the user
+dnl can give the proper place to find libltdl through the standard
+dnl variables like LDFLAGS and CPPFLAGS.
+
+AC_CHECK_HEADER([ltdl.h],
+ [AC_CHECK_LIB([ltdl], [lt_dladvise_init], [LIBLTDL=-lltdl], [LIBLTDL=])],
+ [LIBLTDL=])
+
+AS_IF([test "x$LIBLTDL" = "x"],
+ [AC_MSG_ERROR([Unable to find libltdl version 2. Makes sure you have libtool 2.2 or later installed.])])
+AC_SUBST([LIBLTDL])
+LTDL_SUBDIRS=
+INCLTDL=-DWITH_SYSTEM_LTDL
+AC_SUBST(LTDL_SUBDIRS)
+
dnl Put this in later, when all distributed modules use autoconf.
dnl AC_ARG_WITH(disablemodulefoo,
dnl [ --without-rlm_foo Disables module compilation. Module list:]
--
2.25.1

View File

@@ -0,0 +1,70 @@
From 9548dc5e1a6c835cd4f387ba384d8f3f14c3fc8b Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 22 Aug 2019 10:50:21 +0800
Subject: [PATCH] configure.ac: add option for libcap
Upstream-Status: Pending
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
configure.ac | 36 +++++++++++++++++++++++++++---------
1 file changed, 27 insertions(+), 9 deletions(-)
diff --git a/configure.ac b/configure.ac
index ef8fced680..263098f7fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1161,6 +1161,22 @@ fi
dnl Set by FR_SMART_CHECKLIB
LIBS="${old_LIBS}"
+dnl #
+dnl # extra argument: --with-libcap
+dnl #
+WITH_LIBCAP=yes
+AC_ARG_WITH(libcap,
+[ --with-licap use licap for debugger checks. (default=yes)],
+[ case "$withval" in
+ no)
+ WITH_LIBCAP=no
+ ;;
+ *)
+ WITH_LIBCAP=yes
+ ;;
+ esac ]
+)
+
dnl Check for cap
dnl extra argument: --with-cap-lib-dir=DIR
cap_lib_dir=
@@ -1194,15 +1210,17 @@ AC_ARG_WITH(cap-include-dir,
;;
esac])
-smart_try_dir="$cap_lib_dir"
-FR_SMART_CHECK_LIB(cap, cap_get_proc)
-if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
- AC_MSG_WARN([cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>.])
-else
- AC_DEFINE(HAVE_LIBCAP, 1,
- [Define to 1 if you have the `cap' library (-lcap).]
- )
- HAVE_LIBCAP=1
+if test "x$WITH_LIBCAP" = xyes; then
+ smart_try_dir="$cap_lib_dir"
+ FR_SMART_CHECK_LIB(cap, cap_get_proc)
+ if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
+ AC_MSG_WARN([cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>.])
+ else
+ AC_DEFINE(HAVE_LIBCAP, 1,
+ [Define to 1 if you have the `cap' library (-lcap).]
+ )
+ HAVE_LIBCAP=1
+ fi
fi
dnl #
--
2.25.1

View File

@@ -0,0 +1,198 @@
From 8fe25b30b6fbb3170705f4468eb4c92eef3a968f Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Mon, 4 Jan 2016 01:44:04 -0500
Subject: [PATCH] Avoid searching host dirs
Don't search the hardcoded host dirs to avoid
host contamination.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
acinclude.m4 | 4 ++--
src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac | 4 ++--
src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac | 4 ++--
src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac | 4 ++--
src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac | 6 +++---
src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac | 2 +-
src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac | 4 ++--
src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac | 4 ++--
8 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index a953d0e1b6..ede143d3c2 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -115,7 +115,7 @@ dnl #
dnl # Try to guess possible locations.
dnl #
if test "x$smart_lib" = "x"; then
- for try in /usr/local/lib /opt/lib; do
+ for try in $smart_lib_dir; do
AC_MSG_CHECKING([for $2 in -l$1 in $try])
LIBS="-l$1 $old_LIBS"
CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
@@ -155,7 +155,7 @@ ac_safe=`echo "$1" | sed 'y%./+-%__pm%'`
old_CPPFLAGS="$CPPFLAGS"
smart_include=
dnl # The default directories we search in (in addition to the compilers search path)
-smart_include_dir="/usr/local/include /opt/include"
+smart_include_dir=
dnl # Our local versions
_smart_try_dir=
diff --git a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
index 44f84aa27e..23a1899591 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
+++ b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
@@ -61,14 +61,14 @@ if test x$with_[]modname != xno; then
esac])
dnl Check for SQLConnect in -ldb2
- smart_try_dir="$ibmdb2_lib_dir /usr/local/db2/lib /usr/IBMdb2/V7.1/lib"
+ smart_try_dir="$ibmdb2_lib_dir"
FR_SMART_CHECK_LIB(db2, SQLConnect)
if test "x$ac_cv_lib_db2_SQLConnect" != xyes; then
fail="$fail libdb2"
fi
dnl Check for sqlcli.h
- smart_try_dir="$ibmdb2_include_dir /usr/local/db2/include /usr/IBMdb2/V7.1/include"
+ smart_try_dir="$ibmdb2_include_dir"
FR_SMART_CHECK_INCLUDE(sqlcli.h)
if test "x$ac_cv_header_sqlcli_h" != xyes; then
fail="$fail sqlcli.h"
diff --git a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
index 4c2fd7ba9e..10c864def5 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
+++ b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
@@ -60,14 +60,14 @@ if test x$with_[]modname != xno; then
esac])
dnl Check for isc_attach_database in -lfbclient
- smart_try_dir="$firebird_lib_dir /usr/lib/firebird2/lib /usr/local/firebird/lib"
+ smart_try_dir="$firebird_lib_dir"
FR_SMART_CHECK_LIB(fbclient, isc_attach_database)
if test "x$ac_cv_lib_fbclient_isc_attach_database" != xyes; then
fail="$fail libfbclient"
fi
dnl Check for ibase.h
- smart_try_dir="$firebird_include_dir /usr/lib/firebird2/include /usr/local/firebird/include"
+ smart_try_dir="$firebird_include_dir"
FR_SMART_CHECK_INCLUDE(ibase.h)
if test "x$ac_cv_header_ibase_h" != xyes; then
fail="$fail ibase.h"
diff --git a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
index d26ac9c431..6e4500e948 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
+++ b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
@@ -61,14 +61,14 @@ if test x$with_[]modname != xno; then
esac])
dnl Check for SQLConnect in -liodbc
- smart_try_dir="$iodbc_lib_dir /usr/lib /usr/lib/iodbc /usr/local/lib/iodbc /usr/local/iodbc/lib/iodbc"
+ smart_try_dir="$iodbc_lib_dir"
FR_SMART_CHECK_LIB(iodbc, SQLConnect)
if test "x$ac_cv_lib_iodbc_SQLConnect" != xyes; then
fail="$fail libiodbc"
fi
dnl Check for isql.h
- smart_try_dir="$iodbc_include_dir /usr/include /usr/include/iodbc /usr/local/iodbc/include"
+ smart_try_dir="$iodbc_include_dir"
FR_SMART_CHECK_INCLUDE(isql.h)
if test "x$ac_cv_header_isql_h" != xyes; then
fail="$fail isql.h"
diff --git a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
index df36da77bf..31359041c7 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
+++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
@@ -140,7 +140,7 @@ if test x$with_[]modname != xno; then
dnl # Check for libmysqlclient_r
if test "x$have_a_libmysqlclient" != "xyes"; then
- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
+ smart_try_dir="$mysql_lib_dir"
FR_SMART_CHECK_LIB(mysqlclient_r, mysql_init)
if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = "xyes"; then
have_a_libmysqlclient='yes'
@@ -149,7 +149,7 @@ if test x$with_[]modname != xno; then
dnl # Check for libmysqlclient
if test "x$have_a_libmysqlclient" != "xyes"; then
- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
+ smart_try_dir="$mysql_lib_dir"
FR_SMART_CHECK_LIB(mysqlclient, mysql_init)
if test "x$ac_cv_lib_mysqlclient_mysql_init" = "xyes"; then
have_a_libmysqlclient='yes'
@@ -243,7 +243,7 @@ if test x$with_[]modname != xno; then
fi
if test "x$have_mysql_h" != "xyes"; then
- smart_try_dir="$mysql_include_dir /usr/local/include /usr/local/mysql/include"
+ smart_try_dir="$mysql_include_dir"
FR_SMART_CHECK_INCLUDE(mysql/mysql.h)
if test "x$ac_cv_header_mysql_mysql_h" = "xyes"; then
AC_DEFINE(HAVE_MYSQL_MYSQL_H, [], [Define if you have <mysql/mysql.h>])
diff --git a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
index 3b45da582a..03e6607d2b 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
+++ b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
@@ -68,7 +68,7 @@ if test x$with_[]modname != xno; then
dnl # Check for header files
dnl ############################################################
- smart_try_dir="$oracle_include_dir /usr/local/instaclient/include"
+ smart_try_dir="$oracle_include_dir"
if test "x$ORACLE_HOME" != "x"; then
smart_try_dir="${smart_try_dir} ${ORACLE_HOME}/include"
diff --git a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
index 8ac1022e89..d46c0f66bf 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
+++ b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
@@ -45,7 +45,7 @@ if test x$with_[]modname != xno; then
esac ]
)
- smart_try_dir="$rlm_sql_postgresql_include_dir /usr/include/postgresql /usr/local/pgsql/include /usr/include/pgsql"
+ smart_try_dir="$rlm_sql_postgresql_include_dir"
FR_SMART_CHECK_INCLUDE(libpq-fe.h)
if test "x$ac_cv_header_libpqmfe_h" != "xyes"; then
fail="$fail libpq-fe.h"
@@ -94,7 +94,7 @@ if test x$with_[]modname != xno; then
])
fi
- smart_try_dir="$rlm_sql_postgresql_lib_dir /usr/lib /usr/local/pgsql/lib"
+ smart_try_dir="$rlm_sql_postgresql_lib_dir"
FR_SMART_CHECK_LIB(pq, PQconnectdb)
if test "x$ac_cv_lib_pq_PQconnectdb" != "xyes"; then
fail="$fail libpq"
diff --git a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
index f10279fe1f..0081a338c8 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
+++ b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
@@ -61,14 +61,14 @@ if test x$with_[]modname != xno; then
esac])
dnl Check for SQLConnect in -lodbc
- smart_try_dir="$unixodbc_lib_dir /usr/local/unixodbc/lib"
+ smart_try_dir="$unixodbc_lib_dir"
FR_SMART_CHECK_LIB(odbc, SQLConnect)
if test "x$ac_cv_lib_odbc_SQLConnect" != xyes; then
fail="$fail libodbc"
fi
dnl Check for sql.h
- smart_try_dir="$unixodbc_include_dir /usr/local/unixodbc/include"
+ smart_try_dir="$unixodbc_include_dir"
FR_SMART_CHECK_INCLUDE(sql.h)
if test "x$ac_cv_header_sql_h" != xyes; then
fail="$fail sql.h"
--
2.25.1

View File

@@ -0,0 +1,33 @@
From e4ff7a2a9834e2589bc7bdda4b74f5bc962b15e6 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Wed, 27 Jan 2016 05:07:19 -0500
Subject: [PATCH] rlm_python: add PY_INC_DIR in search dir
configure option --with-rlm-python-include-dir is used to set
PY_INC_DIR which is never used and it fails to find Python.h,
so add it into search dir to fix it.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
src/modules/rlm_python/configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/modules/rlm_python/configure.ac b/src/modules/rlm_python/configure.ac
index 08ecb62518..d5c0944ff1 100644
--- a/src/modules/rlm_python/configure.ac
+++ b/src/modules/rlm_python/configure.ac
@@ -98,7 +98,7 @@ if test x$with_[]modname != xno; then
old_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $PY_CFLAGS"
- smart_try_dir="$PY_PREFIX/include/python$PY_SYS_VERSION"
+ smart_try_dir="$PY_PREFIX/include/python$PY_SYS_VERSION $PY_INC_DIR"
FR_SMART_CHECK_INCLUDE(Python.h)
CFLAGS=$old_CFLAGS
--
2.25.1

View File

@@ -0,0 +1,160 @@
From d0fa5b259c2dc942d0a43a9cf1bfc32f40c184f9 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Thu, 7 Jan 2016 22:37:30 -0800
Subject: [PATCH] libtool: do not use jlibtool
jlibtool is hardcoded to be used but we need to use
our libtool, so fix the makfiles to make it compatible
with our libtool.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
Make.inc.in | 4 ++--
scripts/boiler.mk | 2 ++
scripts/install.mk | 14 +++++++-------
scripts/libtool.mk | 22 ++++++++++++++++------
4 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/Make.inc.in b/Make.inc.in
index 05f82776ff..e78f3fe9dc 100644
--- a/Make.inc.in
+++ b/Make.inc.in
@@ -57,7 +57,7 @@ CPPFLAGS = @CPPFLAGS@
LIBPREFIX = @LIBPREFIX@
EXEEXT = @EXEEXT@
-LIBTOOL = JLIBTOOL
+LIBTOOL = @LIBTOOL@
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -168,7 +168,7 @@ ANALYZE.c := @clang_path@
#
ifeq "$(USE_SHARED_LIBS)" "yes"
TESTBINDIR = ./$(BUILD_DIR)/bin/local
- TESTBIN = FR_LIBRARY_PATH=./build/lib/.libs $(JLIBTOOL) --quiet --mode=execute $(TESTBINDIR)
+ TESTBIN = FR_LIBRARY_PATH=./build/lib/.libs $(LIBTOOL) --quiet --mode=execute $(TESTBINDIR)
else
TESTBINDIR = ./$(BUILD_DIR)/bin
TESTBIN = ./$(BUILD_DIR)/bin
diff --git a/scripts/boiler.mk b/scripts/boiler.mk
index 2ce0c18f34..567cc0f22f 100644
--- a/scripts/boiler.mk
+++ b/scripts/boiler.mk
@@ -272,6 +272,7 @@ define COMPILE_C_CMDS
$(Q)$(ECHO) CC $<
$(Q)$(strip ${COMPILE.c} -o $@ -c -MD ${CPPFLAGS} ${CFLAGS} ${SRC_CFLAGS} ${INCDIRS} \
$(addprefix -I, ${SRC_INCDIRS}) ${SRC_DEFS} ${DEFS} $<)
+ ${Q}mv $(dir $@)/.libs/$(notdir $*.d) ${BUILD_DIR}/objs/$*.d
endef
else
#
@@ -287,6 +288,7 @@ define COMPILE_C_CMDS
$(Q)cppcheck --enable=style -q ${CHECKFLAGS} $(filter -isystem%,${SRC_CFLAGS}) \
$(filter -I%,${SRC_CFLAGS}) $(filter -D%,${SRC_CFLAGS}) ${INCDIRS} \
$(addprefix -I,${SRC_INCDIRS}) ${SRC_DEFS} ${DEFS} --suppress=variableScope --suppress=invalidscanf $<
+ ${Q}mv $(dir $@)/.libs/$(notdir $*.d) ${BUILD_DIR}/objs/$*.d
endef
endif
diff --git a/scripts/install.mk b/scripts/install.mk
index 916411563b..e38c1ed697 100644
--- a/scripts/install.mk
+++ b/scripts/install.mk
@@ -46,7 +46,7 @@ define ADD_INSTALL_RULE.exe
install: $${${1}_INSTALLDIR}/$(notdir ${1})
# Install executable ${1}
- $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
+ $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
@$(ECHO) INSTALL ${1}
$(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/bin/${1} $${${1}_INSTALLDIR}/
$(Q)$${${1}_POSTINSTALL}
@@ -65,7 +65,7 @@ define ADD_INSTALL_RULE.a
install: $${${1}_INSTALLDIR}/$(notdir ${1})
# Install static library ${1}
- $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} ${1} | $${${1}_INSTALLDIR}
+ $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} ${1} | $${${1}_INSTALLDIR}
@$(ECHO) INSTALL ${1}
$(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
$(Q)$${${1}_POSTINSTALL}
@@ -87,9 +87,9 @@ define ADD_INSTALL_RULE.la
install: $${${1}_INSTALLDIR}/$(notdir ${1})
# Install libtool library ${1}
- $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
+ $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
@$(ECHO) INSTALL ${1}
- $(Q)$${PROGRAM_INSTALL} -c -m 755 $${LOCAL_FLAGS_MIN} $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
+ $(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
$(Q)$${${1}_POSTINSTALL}
endef
@@ -107,7 +107,7 @@ define ADD_INSTALL_RULE.man
install: ${2}/$(notdir ${1})
# Install manual page ${1}
- ${2}/$(notdir ${1}): ${JLIBTOOL} ${1} | ${2}
+ ${2}/$(notdir ${1}): ${LIBTOOL} ${1} | ${2}
@$(ECHO) INSTALL $(notdir ${1})
$(Q)$${PROGRAM_INSTALL} -c -m 644 ${1} ${2}/
@@ -122,9 +122,9 @@ endef
define ADD_INSTALL_RULE.dir
# Install directory
.PHONY: ${1}
- ${1}: ${JLIBTOOL}
+ ${1}: ${LIBTOOL}
@$(ECHO) INSTALL -d -m 755 ${1}
- $(Q)$${PROGRAM_INSTALL} -d -m 755 ${1}
+ $(Q)$${INSTALL} -d -m 755 ${1}
endef
diff --git a/scripts/libtool.mk b/scripts/libtool.mk
index 381127ec2d..e83d7e6ad7 100644
--- a/scripts/libtool.mk
+++ b/scripts/libtool.mk
@@ -60,7 +60,9 @@ ifeq "${LIBTOOL}" "JLIBTOOL"
# Tell GNU Make to use this value, rather than anything specified
# on the command line.
override LIBTOOL := ${JLIBTOOL}
-endif # else we're not using jlibtool
+else # else we're not using jlibtool
+ all install: ${LIBTOOL}
+endif
# When using libtool, it produces a '.libs' directory. Ensure that it
# is removed on "make clean", too.
@@ -74,11 +76,19 @@ clean: .libs_clean
# Re-define compilers and linkers
#
OBJ_EXT = lo
-COMPILE.c = ${LIBTOOL} --silent --mode=compile ${CC}
-COMPILE.cxx = ${LIBTOOL} --mode=compile ${CXX}
-LINK.c = ${LIBTOOL} --silent --mode=link ${CC}
-LINK.cxx = ${LIBTOOL} --mode=link ${CXX}
-PROGRAM_INSTALL = ${LIBTOOL} --silent --mode=install ${INSTALL}
+ifeq "${LIBTOOL}" "JLIBTOOL"
+ COMPILE.c = ${LIBTOOL} --silent --mode=compile ${CC}
+ COMPILE.cxx = ${LIBTOOL} --mode=compile ${CXX}
+ LINK.c = ${LIBTOOL} --silent --mode=link ${CC}
+ LINK.cxx = ${LIBTOOL} --mode=link ${CXX}
+ PROGRAM_INSTALL = ${LIBTOOL} --silent --mode=install ${INSTALL}
+else
+ COMPILE.c = ${LIBTOOL} --mode=compile --tag=CC ${CC}
+ COMPILE.cxx = ${LIBTOOL} --mode=compile --tag=CC ${CXX}
+ LINK.c = ${LIBTOOL} --mode=link --tag=CC ${CC} -module -export-dynamic
+ LINK.cxx = ${LIBTOOL} --mode=link --tag=CC ${CXX} -module -export-dynamic
+ PROGRAM_INSTALL = ${LIBTOOL} --mode=install ${INSTALL}
+endif
# LIBTOOL_ENDINGS - Given a library ending in ".a" or ".so", replace that
--
2.25.1

View File

@@ -0,0 +1,58 @@
From 3e701d6274924adaed568e22af2362aa5af1f055 Mon Sep 17 00:00:00 2001
From: Peter Seebach <peter.seebach@windriver.com>
Date: Sun, 8 Jan 2023 23:01:28 +0800
Subject: [PATCH] Fix quoting for BUILD_WITH
The escaped quotes are to make the -D values produce strings which
can be used to display these values. However, if the values are more
than one word, with spaces, they also need shell quoting to make them
into single words.
Upstream-Status: Pending
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
src/main/libfreeradius-server.mk | 2 +-
src/main/unittest.mk | 2 +-
src/modules/rlm_eap/radeapclient.mk | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/libfreeradius-server.mk b/src/main/libfreeradius-server.mk
index 4495f72481..07c28f1968 100644
--- a/src/main/libfreeradius-server.mk
+++ b/src/main/libfreeradius-server.mk
@@ -18,5 +18,5 @@ SOURCES := conffile.c \
TGT_LDLIBS := $(OPENSSL_LIBS)
ifneq ($(MAKECMDGOALS),scan)
-SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
+SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
endif
diff --git a/src/main/unittest.mk b/src/main/unittest.mk
index edd4f133a7..b5b44d5e11 100644
--- a/src/main/unittest.mk
+++ b/src/main/unittest.mk
@@ -21,5 +21,5 @@ TGT_PREREQS += libfreeradius-eap.a
endif
ifneq ($(MAKECMDGOALS),scan)
-SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
+SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
endif
diff --git a/src/modules/rlm_eap/radeapclient.mk b/src/modules/rlm_eap/radeapclient.mk
index 6068f54813..7d3c55625b 100644
--- a/src/modules/rlm_eap/radeapclient.mk
+++ b/src/modules/rlm_eap/radeapclient.mk
@@ -23,7 +23,7 @@ SRC_CFLAGS += -DWITH_EAPCLIENT
SRC_INCDIRS := ${top_srcdir}/src/modules/rlm_eap/libeap
ifneq ($(MAKECMDGOALS),scan)
-SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
+SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
endif
endif
--
2.25.1

View File

@@ -0,0 +1,61 @@
From 30ce5ccd62446349d432ff65d3fe8d46872423c8 Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Wed, 18 Jan 2017 14:59:39 +0800
Subject: [PATCH] fix error for expansion of macro in thread.h
The parameter declaration is missing in expansion of macro
which cause the build error:
| In file included from src/freeradius-devel/libradius.h:80:0,
| from src/lib/log.c:26:
| src/lib/log.c: In function '__fr_thread_local_destroy_fr_strerror_buffer':
| src/lib/log.c:37:31: error: 'fr_strerror_buffer' undeclared (first use in this function)
| fr_thread_local_setup(char *, fr_strerror_buffer) /* macro */
| ^
Add the missing declaration in macro.
Upstream-Status: Pending
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
src/include/threads.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/include/threads.h b/src/include/threads.h
index e36d81dac0..2bcb6aadcb 100644
--- a/src/include/threads.h
+++ b/src/include/threads.h
@@ -89,7 +89,7 @@ static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
# define fr_thread_local_get(_n) _n
#elif defined(HAVE_PTHREAD_H)
# include <pthread.h>
-# define fr_thread_local_setup(_t, _n) \
+# define fr_thread_local_setup(_t, _n) static __thread _t _n;\
static pthread_key_t __fr_thread_local_key_##_n;\
static pthread_once_t __fr_thread_local_once_##_n = PTHREAD_ONCE_INIT;\
static pthread_destructor_t __fr_thread_local_destructor_##_n = NULL;\
@@ -100,17 +100,17 @@ static void __fr_thread_local_destroy_##_n(UNUSED void *unused)\
static void __fr_thread_local_key_init_##_n(void)\
{\
(void) pthread_key_create(&__fr_thread_local_key_##_n, __fr_thread_local_destroy_##_n);\
- (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
}\
static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
{\
__fr_thread_local_destructor_##_n = func;\
if (_n) return _n; \
(void) pthread_once(&__fr_thread_local_once_##_n, __fr_thread_local_key_init_##_n);\
+ (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
return _n;\
}
-# define fr_thread_local_init(_n, _f) __fr_thread_local_init_##_n(_f)
-# define fr_thread_local_set(_n, _v) __fr_thread_local_set_##_n(_v)
-# define fr_thread_local_get(_n) __fr_thread_local_get_##_n()
+# define fr_thread_local_init(_n, _f) __fr_thread_local_init_##_n(_f)
+# define fr_thread_local_set(_n, _v) ((int)!((_n = _v) || 1))
+# define fr_thread_local_get(_n) _n
#endif
#endif
--
2.25.1

View File

@@ -0,0 +1,31 @@
From f0e764826e3a85488047f7f4e94ebf91460d2c12 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 16 Jun 2017 20:10:49 -0700
Subject: [PATCH] rlm_mschap: Use includedir instead of hardcoding /usr/include
OE QA flags it correctly as a voilation of cross compilation
namespace
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/modules/rlm_mschap/configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/modules/rlm_mschap/configure.ac b/src/modules/rlm_mschap/configure.ac
index 0fd105d7e6..6ab15509e5 100644
--- a/src/modules/rlm_mschap/configure.ac
+++ b/src/modules/rlm_mschap/configure.ac
@@ -75,7 +75,7 @@ if test x$with_[]modname != xno; then
mod_ldflags="-F /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks -framework DirectoryService"
fi
- smart_try_dir="$winbind_include_dir /usr/include/samba-4.0"
+ smart_try_dir="$winbind_include_dir =/usr/include/samba-4.0"
FR_SMART_CHECK_INCLUDE(wbclient.h, [#include <stdint.h>
#include <stdbool.h>])
if test "x$ac_cv_header_wbclient_h" != "xyes"; then
--
2.25.1

View File

@@ -0,0 +1,55 @@
From 0f9f18fc330fe88080be13e43f300fbf7ba4a85a Mon Sep 17 00:00:00 2001
From: Mingli Yu <mingli.yu@windriver.com>
Date: Mon, 13 Jul 2020 07:01:45 +0000
Subject: [PATCH] raddb/certs/Makefile: fix the existed certificate error
Fixes:
# ./bootstrap
[snip]
openssl ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key 'whatever' -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
Using configuration from ./client.cnf
Check that the request matches the signature
Signature ok
ERROR:There is already a certificate for /C=FR/ST=Radius/O=Example Inc./CN=user@example.org/emailAddress=user@example.org
The matching entry has the following details
Type :Valid
Expires on :200908024833Z
Serial Number :02
File name :unknown
Subject Name :/C=FR/ST=Radius/O=Example Inc./CN=user@example.org/emailAddress=user@example.org
make: *** [Makefile:128: client.crt] Error 1
Add the check to fix the above error and it does the same for server.crt.
Upstream-Status: Pending
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
raddb/certs/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/raddb/certs/Makefile b/raddb/certs/Makefile
index c9fbc9e864..d064fe252d 100644
--- a/raddb/certs/Makefile
+++ b/raddb/certs/Makefile
@@ -92,7 +92,7 @@ server.csr server.key: server.cnf
chmod g+r server.key
server.crt: ca.key ca.pem server.csr
- $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key $(PASSWORD_CA) -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf
+ @[ -f server.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key $(PASSWORD_CA) -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf
server.p12: server.crt
$(OPENSSL) pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
@@ -117,7 +117,7 @@ client.csr client.key: client.cnf
chmod g+r client.key
client.crt: ca.key ca.pem client.csr
- $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key $(PASSWORD_CA) -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
+ @[ -f client.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key $(PASSWORD_CA) -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
client.p12: client.crt
$(OPENSSL) pkcs12 -export -in client.crt -inkey client.key -out client.p12 -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
--
2.25.1

View File

@@ -0,0 +1,136 @@
From bb1cb2ffc7a31c0a2bb2de51ef82d304b0a107c3 Mon Sep 17 00:00:00 2001
From: Mingli Yu <mingli.yu@windriver.com>
Date: Wed, 5 Aug 2020 07:23:11 +0000
Subject: [PATCH] raddb/certs/Makefile: fix the occasional verification failure
Fixes:
# cd /etc/raddb/certs
# ./bootstrap
[snip]
chmod g+r ca.key
openssl pkcs12 -in server.p12 -out server.pem -passin pass:'whatever' -passout pass:'whatever'
chmod g+r server.pem
C = FR, ST = Radius, O = Example Inc., CN = Example Server Certificate, emailAddress = admin@example.org
error 7 at 0 depth lookup: certificate signature failure
140066667427072:error:04067084:rsa routines:rsa_ossl_public_decrypt:data too large for modulus:../openssl-1.1.1g/crypto/rsa/rsa_ossl.c:553:
140066667427072:error:0D0C5006:asn1 encoding routines:ASN1_item_verify:EVP lib:../openssl-1.1.1g/crypto/asn1/a_verify.c:170:
error server.pem: verification failed
make: *** [Makefile:107: server.vrfy] Error 2
It seems the ca.pem mismatchs server.pem which results in failing to
execute "openssl verify -CAfile ca.pem server.pem", so add to check
the file to avoid inconsistency.
Upstream-Status: Pending
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
raddb/certs/Makefile | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/raddb/certs/Makefile b/raddb/certs/Makefile
index d064fe252d..86f4547804 100644
--- a/raddb/certs/Makefile
+++ b/raddb/certs/Makefile
@@ -59,7 +59,7 @@ passwords.mk: server.cnf ca.cnf client.cnf inner-server.cnf
#
######################################################################
dh:
- $(OPENSSL) dhparam -out dh -2 $(DH_KEY_SIZE)
+ @[ -f dh ] || $(OPENSSL) dhparam -out dh -2 $(DH_KEY_SIZE)
######################################################################
#
@@ -69,17 +69,17 @@ dh:
ca.key ca.pem: ca.cnf
@[ -f index.txt ] || $(MAKE) index.txt
@[ -f serial ] || $(MAKE) serial
- $(OPENSSL) req -new -x509 -keyout ca.key -out ca.pem \
+ @[ -f ca.pem ] || $(OPENSSL) req -new -x509 -keyout ca.key -out ca.pem \
-days $(CA_DEFAULT_DAYS) -config ./ca.cnf \
-passin pass:$(PASSWORD_CA) -passout pass:$(PASSWORD_CA)
chmod g+r ca.key
ca.der: ca.pem
- $(OPENSSL) x509 -inform PEM -outform DER -in ca.pem -out ca.der
+ @[ -f ca.der ] || $(OPENSSL) x509 -inform PEM -outform DER -in ca.pem -out ca.der
ca.crl: ca.pem
- $(OPENSSL) ca -gencrl -keyfile ca.key -cert ca.pem -config ./ca.cnf -out ca-crl.pem -key $(PASSWORD_CA)
- $(OPENSSL) crl -in ca-crl.pem -outform der -out ca.crl
+ @[ -f ca-crl.pem ] || $(OPENSSL) ca -gencrl -keyfile ca.key -cert ca.pem -config ./ca.cnf -out ca-crl.pem -key $(PASSWORD_CA)
+ @[ -f ca.crl ] || $(OPENSSL) crl -in ca-crl.pem -outform der -out ca.crl
rm ca-crl.pem
######################################################################
@@ -88,18 +88,18 @@ ca.crl: ca.pem
#
######################################################################
server.csr server.key: server.cnf
- $(OPENSSL) req -new -out server.csr -keyout server.key -config ./server.cnf
+ @[ -f server.csr ] || $(OPENSSL) req -new -out server.csr -keyout server.key -config ./server.cnf
chmod g+r server.key
server.crt: ca.key ca.pem server.csr
@[ -f server.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key $(PASSWORD_CA) -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf
server.p12: server.crt
- $(OPENSSL) pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
+ @[ -f server.p12 ] || $(OPENSSL) pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
chmod g+r server.p12
server.pem: server.p12
- $(OPENSSL) pkcs12 -in server.p12 -out server.pem -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
+ @[ -f server.pem ] || $(OPENSSL) pkcs12 -in server.p12 -out server.pem -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
chmod g+r server.pem
.PHONY: server.vrfy
@@ -113,19 +113,19 @@ server.vrfy: ca.pem
#
######################################################################
client.csr client.key: client.cnf
- $(OPENSSL) req -new -out client.csr -keyout client.key -config ./client.cnf
+ @[ -f client.csr ] || $(OPENSSL) req -new -out client.csr -keyout client.key -config ./client.cnf
chmod g+r client.key
client.crt: ca.key ca.pem client.csr
@[ -f client.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key $(PASSWORD_CA) -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
client.p12: client.crt
- $(OPENSSL) pkcs12 -export -in client.crt -inkey client.key -out client.p12 -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
+ @[ -f client.p12 ] || $(OPENSSL) pkcs12 -export -in client.crt -inkey client.key -out client.p12 -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
chmod g+r client.p12
cp client.p12 $(USER_NAME).p12
client.pem: client.p12
- $(OPENSSL) pkcs12 -in client.p12 -out client.pem -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
+ @[ -f client.pem ] || $(OPENSSL) pkcs12 -in client.p12 -out client.pem -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
chmod g+r client.pem
cp client.pem $(USER_NAME).pem
@@ -140,18 +140,18 @@ client.vrfy: ca.pem client.pem
#
######################################################################
inner-server.csr inner-server.key: inner-server.cnf
- $(OPENSSL) req -new -out inner-server.csr -keyout inner-server.key -config ./inner-server.cnf
+ @[ -f inner-server.csr] || $(OPENSSL) req -new -out inner-server.csr -keyout inner-server.key -config ./inner-server.cnf
chmod g+r inner-server.key
inner-server.crt: ca.key ca.pem inner-server.csr
- $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in inner-server.csr -key $(PASSWORD_CA) -out inner-server.crt -extensions xpserver_ext -extfile xpextensions -config ./inner-server.cnf
+ @[ -f inner-server.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in inner-server.csr -key $(PASSWORD_CA) -out inner-server.crt -extensions xpserver_ext -extfile xpextensions -config ./inner-server.cnf
inner-server.p12: inner-server.crt
- $(OPENSSL) pkcs12 -export -in inner-server.crt -inkey inner-server.key -out inner-server.p12 -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER)
+ @[ -f inner-server.p12 ] || $(OPENSSL) pkcs12 -export -in inner-server.crt -inkey inner-server.key -out inner-server.p12 -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER)
chmod g+r inner-server.p12
inner-server.pem: inner-server.p12
- $(OPENSSL) pkcs12 -in inner-server.p12 -out inner-server.pem -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER)
+ @[ -f inner-server.pem ] || $(OPENSSL) pkcs12 -in inner-server.p12 -out inner-server.pem -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER)
chmod g+r inner-server.pem
.PHONY: inner-server.vrfy
--
2.25.1

View File

@@ -0,0 +1,42 @@
From c591da4a361496eec93625cf8c4f89bddfedaca7 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Sun, 7 Feb 2021 16:02:36 +0800
Subject: [PATCH] Workaround error with autoconf 2.7
While using autoconf 2.7, the AM_MISSING_PROG caused unexpected error:
...
configure.ac: error: required file 'missing' not found
...
Since these tools were explicitly added by autotools bbclass,
remove the testing to workaround the error with autoconf 2.7
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
configure.ac | 8 --------
1 file changed, 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 263098f7fd..fc296832d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -878,14 +878,6 @@ fi
AC_PATH_PROG(RUSERS, rusers, /usr/bin/rusers)
-dnl #
-dnl # FIXME This is truly gross.
-dnl #
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-
AC_PATH_PROG(DIRNAME,dirname)
AC_PATH_PROG(GREP,grep)
--
2.25.1

View File

@@ -0,0 +1,44 @@
From 78494ea005bd38324953b05176d6eb2c3f55af2c Mon Sep 17 00:00:00 2001
From: Kai Kang <kai.kang@windriver.com>
Date: Sun, 8 Jan 2023 23:21:24 +0800
Subject: [PATCH] bootstrap: check commands of openssl exist
It calls openssl commands dhparam and pkcs12 in script bootstrap. These
commands are configurable based on configure options 'no-dh' and
'no-des', and may not be provided by openssl. So check existence of
these commands. If not, abort running of script bootstrap.
1. https://github.com/openssl/openssl/blob/master/apps/build.info#L37
2. https://github.com/openssl/openssl/blob/master/apps/build.info#L22
Upstream-Status: Denied [https://github.com/FreeRADIUS/freeradius-server/pull/4059]
The maintainer commented in the pull that the script could
be run on a host which provides these openssl commands.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
raddb/certs/bootstrap | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/raddb/certs/bootstrap b/raddb/certs/bootstrap
index 57de8cf0d7..4641c71700 100755
--- a/raddb/certs/bootstrap
+++ b/raddb/certs/bootstrap
@@ -13,6 +13,14 @@
umask 027
cd `dirname $0`
+# check commands of openssl exist
+for cmd in dhparam pkcs12; do
+ if ! openssl ${cmd} -help >/dev/null 2>&1; then
+ echo "Error: command ${cmd} is not supported by openssl."
+ exit 1
+ fi
+done
+
make -h > /dev/null 2>&1
#
--
2.25.1

View File

@@ -0,0 +1,41 @@
From cbbb62ddda5c189c225f96bf6b599b3b3e8c8252 Mon Sep 17 00:00:00 2001
From: Mingli Yu <mingli.yu@windriver.com>
Date: Wed, 3 Aug 2022 16:44:29 +0800
Subject: [PATCH] version.c: don't print build flags
Don't print the build flags to avoid collecting the build environment info.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
src/main/version.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/src/main/version.c b/src/main/version.c
index f1f1e87810..3ffcbb25a0 100644
--- a/src/main/version.c
+++ b/src/main/version.c
@@ -589,19 +589,6 @@ void version_print(void)
DEBUG2(" unknown");
#endif
- DEBUG2("Compilation flags:");
-#ifdef BUILT_WITH_CPPFLAGS
- DEBUG2(" cppflags : " BUILT_WITH_CPPFLAGS);
-#endif
-#ifdef BUILT_WITH_CFLAGS
- DEBUG2(" cflags : " BUILT_WITH_CFLAGS);
-#endif
-#ifdef BUILT_WITH_LDFLAGS
- DEBUG2(" ldflags : " BUILT_WITH_LDFLAGS);
-#endif
-#ifdef BUILT_WITH_LIBS
- DEBUG2(" libs : " BUILT_WITH_LIBS);
-#endif
DEBUG2(" ");
}
INFO("FreeRADIUS Version " RADIUSD_VERSION_STRING);
--
2.25.1

View File

@@ -0,0 +1,427 @@
From f1418e1b46cb1cbd130935b76f5c78c577d1ad28 Mon Sep 17 00:00:00 2001
From: Matthew Newton <matthew-git@newtoncomputing.co.uk>
Date: Wed, 28 Sep 2022 23:49:32 +0100
Subject: [PATCH] add python.m4 for detecting python > 3.10
Upstream-Status: Backport
[https://github.com/FreeRADIUS/freeradius-server/commit/86584d2753829756cc73aadce5d48f703af472b1]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
src/modules/rlm_python3/configure.ac | 4 +
src/modules/rlm_python3/m4/python.m4 | 363 +++++++++++++++++++++++++++
src/modules/rlm_python3/m4/runlog.m4 | 17 ++
3 files changed, 384 insertions(+)
create mode 100644 src/modules/rlm_python3/m4/python.m4
create mode 100644 src/modules/rlm_python3/m4/runlog.m4
diff --git a/src/modules/rlm_python3/configure.ac b/src/modules/rlm_python3/configure.ac
index bc0e97f9ba..90f2116e73 100644
--- a/src/modules/rlm_python3/configure.ac
+++ b/src/modules/rlm_python3/configure.ac
@@ -3,6 +3,10 @@ AC_INIT(rlm_python3.c)
AC_REVISION($Revision$)
AC_DEFUN(modname,[rlm_python3])
+m4_include([ax_compare_version.m4])
+m4_include([runlog.m4])
+m4_include([python.m4])
+
AC_ARG_WITH([]modname,
[ --with-[]modname build []modname. (default=yes)])
diff --git a/src/modules/rlm_python3/m4/python.m4 b/src/modules/rlm_python3/m4/python.m4
new file mode 100644
index 0000000000..78ca7635ab
--- /dev/null
+++ b/src/modules/rlm_python3/m4/python.m4
@@ -0,0 +1,363 @@
+## ------------------------ -*- Autoconf -*-
+## Python file handling
+## From Andrew Dalke
+## Updated by James Henstridge and other contributors.
+## ------------------------
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------------------------
+# Adds support for distributing Python modules and packages. To
+# install modules, copy them to $(pythondir), using the python_PYTHON
+# automake variable. To install a package with the same name as the
+# automake package, install to $(pkgpythondir), or use the
+# pkgpython_PYTHON automake variable.
+#
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
+# locations to install python extension modules (shared libraries).
+# Another macro is required to find the appropriate flags to compile
+# extension modules.
+#
+# If your package is configured with a different prefix to python,
+# users will have to add the install directory to the PYTHONPATH
+# environment variable, or create a .pth file (see the python
+# documentation for details).
+#
+# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement. MINIMUM-VERSION should consist of
+# numbers and dots only.
+AC_DEFUN([AM_PATH_PYTHON],
+ [
+ dnl Find a Python interpreter. Python versions prior to 2.0 are not
+ dnl supported. (2.0 was released on October 16, 2000).
+ m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
+[python python2 python3 dnl
+ python3.11 python3.10 dnl
+ python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl
+ python3.2 python3.1 python3.0 dnl
+ python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl
+ python2.0])
+
+ AC_ARG_VAR([PYTHON], [the Python interpreter])
+
+ m4_if([$1],[],[
+ dnl No version check is needed.
+ # Find any Python interpreter.
+ if test -z "$PYTHON"; then
+ AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
+ fi
+ am_display_PYTHON=python
+ ], [
+ dnl A version check is needed.
+ if test -n "$PYTHON"; then
+ # If the user set $PYTHON, use it and don't search something else.
+ AC_MSG_CHECKING([whether $PYTHON version is >= $1])
+ AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Python interpreter is too old])])
+ am_display_PYTHON=$PYTHON
+ else
+ # Otherwise, try each interpreter until we find one that satisfies
+ # VERSION.
+ AC_CACHE_CHECK([for a Python interpreter with version >= $1],
+ [am_cv_pathless_PYTHON],[
+ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
+ test "$am_cv_pathless_PYTHON" = none && break
+ AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+ done])
+ # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+ if test "$am_cv_pathless_PYTHON" = none; then
+ PYTHON=:
+ else
+ AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+ fi
+ am_display_PYTHON=$am_cv_pathless_PYTHON
+ fi
+ ])
+
+ if test "$PYTHON" = :; then
+ dnl Run any user-specified action, or abort.
+ m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
+ else
+
+ dnl Query Python for its version number. Although site.py simply uses
+ dnl sys.version[:3], printing that failed with Python 3.10, since the
+ dnl trailing zero was eliminated. So now we output just the major
+ dnl and minor version numbers, as numbers. Apparently the tertiary
+ dnl version is not of interest.
+ dnl
+ AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
+ [am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[[:2]])"`])
+ AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
+
+ dnl At times, e.g., when building shared libraries, you may want
+ dnl to know which OS platform Python thinks this is.
+ dnl
+ AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
+ [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
+ AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
+
+ dnl emacs-page
+ dnl If --with-python-sys-prefix is given, use the values of sys.prefix
+ dnl and sys.exec_prefix for the corresponding values of PYTHON_PREFIX
+ dnl and PYTHON_EXEC_PREFIX. Otherwise, use the GNU ${prefix} and
+ dnl ${exec_prefix} variables.
+ dnl
+ dnl The two are made distinct variables so they can be overridden if
+ dnl need be, although general consensus is that you shouldn't need
+ dnl this separation.
+ dnl
+ dnl Also allow directly setting the prefixes via configure options,
+ dnl overriding any default.
+ dnl
+ if test "x$prefix" = xNONE; then
+ am__usable_prefix=$ac_default_prefix
+ else
+ am__usable_prefix=$prefix
+ fi
+
+ # Allow user to request using sys.* values from Python,
+ # instead of the GNU $prefix values.
+ AC_ARG_WITH([python-sys-prefix],
+ [AS_HELP_STRING([--with-python-sys-prefix],
+ [use Python's sys.prefix and sys.exec_prefix values])],
+ [am_use_python_sys=:],
+ [am_use_python_sys=false])
+
+ # Allow user to override whatever the default Python prefix is.
+ AC_ARG_WITH([python_prefix],
+ [AS_HELP_STRING([--with-python_prefix],
+ [override the default PYTHON_PREFIX])],
+ [am_python_prefix_subst=$withval
+ am_cv_python_prefix=$withval
+ AC_MSG_CHECKING([for explicit $am_display_PYTHON prefix])
+ AC_MSG_RESULT([$am_cv_python_prefix])],
+ [
+ if $am_use_python_sys; then
+ # using python sys.prefix value, not GNU
+ AC_CACHE_CHECK([for python default $am_display_PYTHON prefix],
+ [am_cv_python_prefix],
+ [am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`])
+
+ dnl If sys.prefix is a subdir of $prefix, replace the literal value of
+ dnl $prefix with a variable reference so it can be overridden.
+ case $am_cv_python_prefix in
+ $am__usable_prefix*)
+ am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'`
+ am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"`
+ ;;
+ *)
+ am_python_prefix_subst=$am_cv_python_prefix
+ ;;
+ esac
+ else # using GNU prefix value, not python sys.prefix
+ am_python_prefix_subst='${prefix}'
+ am_python_prefix=$am_python_prefix_subst
+ AC_MSG_CHECKING([for GNU default $am_display_PYTHON prefix])
+ AC_MSG_RESULT([$am_python_prefix])
+ fi])
+ # Substituting python_prefix_subst value.
+ AC_SUBST([PYTHON_PREFIX], [$am_python_prefix_subst])
+
+ # emacs-page Now do it all over again for Python exec_prefix, but with yet
+ # another conditional: fall back to regular prefix if that was specified.
+ AC_ARG_WITH([python_exec_prefix],
+ [AS_HELP_STRING([--with-python_exec_prefix],
+ [override the default PYTHON_EXEC_PREFIX])],
+ [am_python_exec_prefix_subst=$withval
+ am_cv_python_exec_prefix=$withval
+ AC_MSG_CHECKING([for explicit $am_display_PYTHON exec_prefix])
+ AC_MSG_RESULT([$am_cv_python_exec_prefix])],
+ [
+ # no explicit --with-python_exec_prefix, but if
+ # --with-python_prefix was given, use its value for python_exec_prefix too.
+ AS_IF([test -n "$with_python_prefix"],
+ [am_python_exec_prefix_subst=$with_python_prefix
+ am_cv_python_exec_prefix=$with_python_prefix
+ AC_MSG_CHECKING([for python_prefix-given $am_display_PYTHON exec_prefix])
+ AC_MSG_RESULT([$am_cv_python_exec_prefix])],
+ [
+ # Set am__usable_exec_prefix whether using GNU or Python values,
+ # since we use that variable for pyexecdir.
+ if test "x$exec_prefix" = xNONE; then
+ am__usable_exec_prefix=$am__usable_prefix
+ else
+ am__usable_exec_prefix=$exec_prefix
+ fi
+ #
+ if $am_use_python_sys; then # using python sys.exec_prefix, not GNU
+ AC_CACHE_CHECK([for python default $am_display_PYTHON exec_prefix],
+ [am_cv_python_exec_prefix],
+ [am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`])
+ dnl If sys.exec_prefix is a subdir of $exec_prefix, replace the
+ dnl literal value of $exec_prefix with a variable reference so it can
+ dnl be overridden.
+ case $am_cv_python_exec_prefix in
+ $am__usable_exec_prefix*)
+ am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'`
+ am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"`
+ ;;
+ *)
+ am_python_exec_prefix_subst=$am_cv_python_exec_prefix
+ ;;
+ esac
+ else # using GNU $exec_prefix, not python sys.exec_prefix
+ am_python_exec_prefix_subst='${exec_prefix}'
+ am_python_exec_prefix=$am_python_exec_prefix_subst
+ AC_MSG_CHECKING([for GNU default $am_display_PYTHON exec_prefix])
+ AC_MSG_RESULT([$am_python_exec_prefix])
+ fi])])
+ # Substituting python_exec_prefix_subst.
+ AC_SUBST([PYTHON_EXEC_PREFIX], [$am_python_exec_prefix_subst])
+
+ # Factor out some code duplication into this shell variable.
+ am_python_setup_sysconfig="\
+import sys
+# Prefer sysconfig over distutils.sysconfig, for better compatibility
+# with python 3.x. See automake bug#10227.
+try:
+ import sysconfig
+except ImportError:
+ can_use_sysconfig = 0
+else:
+ can_use_sysconfig = 1
+# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
+# <https://github.com/pypa/virtualenv/issues/118>
+try:
+ from platform import python_implementation
+ if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
+ can_use_sysconfig = 0
+except ImportError:
+ pass"
+
+ dnl emacs-page Set up 4 directories:
+
+ dnl 1. pythondir: where to install python scripts. This is the
+ dnl site-packages directory, not the python standard library
+ dnl directory like in previous automake betas. This behavior
+ dnl is more consistent with lispdir.m4 for example.
+ dnl Query distutils for this directory.
+ dnl
+ AC_CACHE_CHECK([for $am_display_PYTHON script directory (pythondir)],
+ [am_cv_python_pythondir],
+ [if test "x$am_cv_python_prefix" = x; then
+ am_py_prefix=$am__usable_prefix
+ else
+ am_py_prefix=$am_cv_python_prefix
+ fi
+ am_cv_python_pythondir=`$PYTHON -c "
+$am_python_setup_sysconfig
+if can_use_sysconfig:
+ if hasattr(sysconfig, 'get_default_scheme'):
+ scheme = sysconfig.get_default_scheme()
+ else:
+ scheme = sysconfig._get_default_scheme()
+ if scheme == 'posix_local':
+ # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
+ scheme = 'posix_prefix'
+ sitedir = sysconfig.get_path('purelib', scheme, vars={'base':'$am_py_prefix'})
+else:
+ from distutils import sysconfig
+ sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
+sys.stdout.write(sitedir)"`
+ #
+ case $am_cv_python_pythondir in
+ $am_py_prefix*)
+ am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
+ am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"`
+ ;;
+ *)
+ case $am_py_prefix in
+ /usr|/System*) ;;
+ *) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
+ ;;
+ esac
+ ;;
+ esac
+ ])
+ AC_SUBST([pythondir], [$am_cv_python_pythondir])
+
+ dnl 2. pkgpythondir: $PACKAGE directory under pythondir. Was
+ dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
+ dnl more consistent with the rest of automake.
+ dnl
+ AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
+
+ dnl 3. pyexecdir: directory for installing python extension modules
+ dnl (shared libraries).
+ dnl Query distutils for this directory.
+ dnl
+ AC_CACHE_CHECK([for $am_display_PYTHON extension module directory (pyexecdir)],
+ [am_cv_python_pyexecdir],
+ [if test "x$am_cv_python_exec_prefix" = x; then
+ am_py_exec_prefix=$am__usable_exec_prefix
+ else
+ am_py_exec_prefix=$am_cv_python_exec_prefix
+ fi
+ am_cv_python_pyexecdir=`$PYTHON -c "
+$am_python_setup_sysconfig
+if can_use_sysconfig:
+ if hasattr(sysconfig, 'get_default_scheme'):
+ scheme = sysconfig.get_default_scheme()
+ else:
+ scheme = sysconfig._get_default_scheme()
+ if scheme == 'posix_local':
+ # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
+ scheme = 'posix_prefix'
+ sitedir = sysconfig.get_path('platlib', scheme, vars={'platbase':'$am_py_exec_prefix'})
+else:
+ from distutils import sysconfig
+ sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix')
+sys.stdout.write(sitedir)"`
+ #
+ case $am_cv_python_pyexecdir in
+ $am_py_exec_prefix*)
+ am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
+ am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"`
+ ;;
+ *)
+ case $am_py_exec_prefix in
+ /usr|/System*) ;;
+ *) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
+ ;;
+ esac
+ ;;
+ esac
+ ])
+ AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+
+ dnl 4. pkgpyexecdir: $(pyexecdir)/$(PACKAGE)
+ dnl
+ AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
+
+ dnl Run any user-specified action.
+ $2
+ fi
+])
+
+
+# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# ---------------------------------------------------------------------------
+# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
+# Run ACTION-IF-FALSE otherwise.
+# This test uses sys.hexversion instead of the string equivalent (first
+# word of sys.version), in order to cope with versions such as 2.2c1.
+# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
+AC_DEFUN([AM_PYTHON_CHECK_VERSION],
+ [prog="import sys
+# split strings by '.' and convert to numeric. Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(sys.hexversion < minverhex)"
+ AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
diff --git a/src/modules/rlm_python3/m4/runlog.m4 b/src/modules/rlm_python3/m4/runlog.m4
new file mode 100644
index 0000000000..690efc3258
--- /dev/null
+++ b/src/modules/rlm_python3/m4/runlog.m4
@@ -0,0 +1,17 @@
+## -*- Autoconf -*-
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
--
2.25.1

View File

@@ -0,0 +1,110 @@
#!/bin/sh
# Start/stop the FreeRADIUS daemon.
### BEGIN INIT INFO
# Provides: freeradius
# Required-Start: $remote_fs $network $syslog
# Should-Start: $time mysql slapd postgresql samba krb5-kdc
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Radius Daemon
# Description: Extensible, configurable radius daemon
### END INIT INFO
set -e
# Source function library.
. /etc/init.d/functions
if [ -f /lib/lsb/init-functions ]; then
. /lib/lsb/init-functions
fi
PROG="radiusd"
PROGRAM="/usr/sbin/radiusd"
PIDFILE="/var/run/radiusd/radiusd.pid"
DESCR="FreeRADIUS daemon"
if [ -r /etc/default/$PROG ]; then
. /etc/default/$PROG
fi
test -f $PROGRAM || exit 0
check_certs() {
if [ ! -f /etc/raddb/certs/server.pem ]; then
echo -n "Creating certificates for freeradius..."
if sudo -u radiusd /etc/raddb/certs/bootstrap 1> /dev/null 2> /dev/null; then
echo "done"
else
echo "failed!"
fi
fi
}
# /var/run may be a tmpfs
if [ ! -d /var/run/radiusd ]; then
mkdir -p /var/run/radiusd
chown radiusd:radiusd /var/run/radiusd
fi
if [ ! -d /var/log/radius ]; then
mkdir -p /var/log/radius
touch /var/log/radius/radius.log
chown radiusd:radiusd /var/run/radius
fi
if [ ! -f ${PIDFILE} ]; then
touch ${PIDFILE}
chown radiusd:radiusd ${PIDFILE}
fi
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
ret=0
case "$1" in
start)
check_certs
echo -n "Starting $DESCR" "$PROG"
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $PROGRAM -- $FREERADIUS_OPTIONS || ret=$?
[ "$ret" == 0 ] && echo " Success" || echo " Failed"
exit $ret
;;
stop)
echo -n "Stopping $DESCR" "$PROG"
if [ -f "$PIDFILE" ] ; then
start-stop-daemon --stop --retry=TERM/30/KILL/5 --quiet --pidfile $PIDFILE || ret=$?
else
echo -n "$PIDFILE not found"
ret=1
fi
[ "$ret" == 0 ] && echo " Success" || echo " Failed"
;;
status)
status $PROGRAM;
exit $?
;;
restart)
$0 stop
$0 start
;;
reload|force-reload)
echo -n "Reloading $DESCR" "$PROG"
if [ -f "$PIDFILE" ] ; then
start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE || ret=$?
else
echo -n "$PIDFILE not found"
ret=1
fi
[ "$ret" == 0 ] && echo " Success" || echo " Failed"
;;
*)
echo "Usage: $0 start|stop|status|restart|force-reload|reload"
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,2 @@
d /var/log/radius 0755 radiusd radiusd -
d /run/radiusd 0755 radiusd radiusd -

View File

@@ -0,0 +1,16 @@
[Unit]
Description=FreeRADIUS high performance RADIUS server.
After=syslog.target network.target
[Service]
Type=forking
EnvironmentFile=-/etc/sysconfig/radiusd
PIDFile=/run/radiusd/radiusd.pid
ExecStartPre=-@BASE_BINDIR@/chown -R radiusd:radiusd /run/radiusd
ExecStartPre=@SBINDIR@/radiusd -C
ExecStart=@SBINDIR@/radiusd -d @SYSCONFDIR@/${MLPREFIX}raddb
ExecReload=@SBINDIR@/radiusd -C
ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,3 @@
# <type> <owner> <group> <mode> <path> <linksource>
d radiusd radiusd 0755 /var/run/radiusd none
d radiusd radiusd 0755 /var/log/radius none

View File

@@ -0,0 +1,292 @@
DESCRIPTION = "FreeRADIUS is an Internet authentication daemon, which implements the RADIUS \
protocol, as defined in RFC 2865 (and others). It allows Network Access \
Servers (NAS boxes) to perform authentication for dial-up users. There are \
also RADIUS clients available for Web servers, firewalls, Unix logins, and \
more. Using RADIUS allows authentication and authorization for a network to \
be centralized, and minimizes the amount of re-configuration which has to be \
done when adding or deleting new users."
SUMMARY = "High-performance and highly configurable RADIUS server"
HOMEPAGE = "http://www.freeradius.org/"
SECTION = "System/Servers"
LICENSE = "GPL-2.0-only & LGPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
DEPENDS = "openssl-native openssl libidn libtool libpcap libtalloc"
SRC_URI = "git://github.com/FreeRADIUS/freeradius-server.git;branch=v3.0.x;lfs=0;;protocol=https \
file://freeradius \
file://volatiles.58_radiusd \
file://radiusd.service \
file://radiusd-volatiles.conf \
file://0001-Add-autogen.sh.patch \
file://0002-Enable-and-change-user-and-group-of-freeradius-serve.patch \
file://0003-configure.ac-allow-cross-compilation.patch \
file://0004-Fix-libtool-detection.patch \
file://0005-configure.ac-add-option-for-libcap.patch \
file://0006-Avoid-searching-host-dirs.patch \
file://0007-rlm_python-add-PY_INC_DIR-in-search-dir.patch \
file://0008-libtool-do-not-use-jlibtool.patch \
file://0009-Fix-quoting-for-BUILD_WITH.patch \
file://0010-fix-error-for-expansion-of-macro-in-thread.h.patch \
file://0011-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch \
file://0012-raddb-certs-Makefile-fix-the-existed-certificate-err.patch \
file://0013-raddb-certs-Makefile-fix-the-occasional-verification.patch \
file://0014-Workaround-error-with-autoconf-2.7.patch \
file://0015-bootstrap-check-commands-of-openssl-exist.patch \
file://0016-version.c-don-t-print-build-flags.patch \
file://0017-add-python.m4-for-detecting-python-3.10.patch \
"
raddbdir = "${sysconfdir}/${MLPREFIX}raddb"
SRCREV = "d956f683d37ea40e7977cc5907361f3e6988a439"
UPSTREAM_CHECK_GITTAGREGEX = "release_(?P<pver>\d+(\_\d+)+)"
CVE_CHECK_IGNORE = "\
CVE-2002-0318 \
CVE-2011-4966 \
"
PARALLEL_MAKE = ""
S = "${WORKDIR}/git"
LDFLAGS:append:powerpc = " -latomic"
LDFLAGS:append:mipsarch = " -latomic"
LDFLAGS:append:armv5 = " -latomic"
EXTRA_OECONF = " --enable-strict-dependencies \
--with-docdir=${docdir}/freeradius-${PV} \
--with-openssl-includes=${STAGING_INCDIR} \
--with-openssl-libraries=${STAGING_LIBDIR} \
--with-raddbdir=${raddbdir} \
--without-rlm_ippool \
--without-rlm_cache_memcached \
--without-rlm_counter \
--without-rlm_couchbase \
--without-rlm_dbm \
--without-rlm_eap_tnc \
--without-rlm_eap_ikev2 \
--without-rlm_opendirectory \
--without-rlm_redis \
--without-rlm_rediswho \
--without-rlm_sql_db2 \
--without-rlm_sql_firebird \
--without-rlm_sql_freetds \
--without-rlm_sql_iodbc \
--without-rlm_sql_oracle \
--without-rlm_sql_sybase \
--without-rlm_sql_mongo \
--without-rlm_sqlhpwippool \
--without-rlm_securid \
--without-rlm_unbound \
--without-rlm_python \
ac_cv_path_PERL=${bindir}/perl \
ax_cv_cc_builtin_choose_expr=no \
ax_cv_cc_builtin_types_compatible_p=no \
ax_cv_cc_builtin_bswap64=no \
ax_cv_cc_bounded_attribute=no \
"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
pcre libcap \
openssl rlm-eap-fast rlm-eap-pwd \
"
PACKAGECONFIG[krb5] = "--with-rlm_krb5,--without-rlm_krb5,krb5"
PACKAGECONFIG[pam] = "--with-rlm_pam,--without-rlm_pam,libpam"
PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
PACKAGECONFIG[ldap] = "--with-rlm_ldap,--without-rlm_ldap,openldap"
PACKAGECONFIG[mysql] = "--with-rlm_sql_mysql,--without-rlm_sql_mysql,mysql5"
PACKAGECONFIG[sqlite] = "--with-rlm_sql_sqlite,--without-rlm_sql_sqlite,sqlite3"
PACKAGECONFIG[unixodbc] = "--with-rlm_sql_unixodbc,--without-rlm_sql_unixodbc,unixodbc"
PACKAGECONFIG[postgresql] = "--with-rlm_sql_postgresql,--without-rlm_sql_postgresql,postgresql"
PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
PACKAGECONFIG[perl] = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl --with-rlm_perl,--without-rlm_perl,perl-native perl,perl"
PACKAGECONFIG[python3] = "--with-rlm_python3 --with-rlm-python3-bin=${STAGING_BINDIR_NATIVE}/python3-native/python3 --with-rlm-python3-include-dir=${STAGING_INCDIR}/${PYTHON_DIR},--without-rlm_python3,python3-native python3"
PACKAGECONFIG[rest] = "--with-rlm_rest,--without-rlm_rest,curl json-c"
PACKAGECONFIG[ruby] = "--with-rlm_ruby,--without-rlm_ruby,ruby"
PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl"
PACKAGECONFIG[rlm-eap-fast] = "--with-rlm_eap_fast, --without-rlm_eap_fast"
PACKAGECONFIG[rlm-eap-pwd] = "--with-rlm_eap_pwd, --without-rlm_eap_pwd"
inherit useradd autotools-brokensep update-rc.d systemd multilib_script multilib_header
MULTILIB_SCRIPTS = "${PN}:${sbindir}/checkrad"
# This is not a cpan or python based package, but it needs some definitions
# from cpan-base and python3-dir bbclasses for building rlm_perl and rlm_python
# correctly.
inherit cpan-base python3-dir
# The modules subdirs also need to be processed by autoreconf. Use autogen.sh
# in order to handle the subdirs correctly.
do_configure() {
./autogen.sh
# the configure of rlm_perl needs this to get correct
# mod_cflags and mod_ldflags
if ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'true', 'false', d)}; then
export PERL5LIB="${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
fi
oe_runconf
# we don't need dhcpclient
sed -i -e 's/dhcpclient.mk//' ${S}/src/modules/proto_dhcp/all.mk
}
INITSCRIPT_NAME = "radiusd"
SYSTEMD_SERVICE:${PN} = "radiusd.service"
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system --no-create-home --shell /bin/false --user-group radiusd"
do_install() {
rm -rf ${D}
install -d ${D}/${sysconfdir}/logrotate.d
install -d ${D}/${sysconfdir}/pam.d
install -d ${D}/${localstatedir}/lib/radiusd
export LD_LIBRARY_PATH=${D}/${libdir}
oe_runmake install R=${D} INSTALLSTRIP=""
# remove unsupported config files
rm -f ${D}/${raddbdir}/experimental.conf
# remove scripts that required Perl(DBI)
rm -rf ${D}/${bindir}/radsqlrelay
rm -f ${D}/${sbindir}/rc.radiusd
rm -rf ${D}/${localstatedir}/run/
rm -rf ${D}/${localstatedir}/log/
chown -R radiusd:radiusd ${D}/${raddbdir}
chown -R radiusd:radiusd ${D}/${localstatedir}/lib/radiusd
# For sysvinit
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/init.d
install -d ${D}${sysconfdir}/default/volatiles
install -m 0755 ${WORKDIR}/freeradius ${D}/etc/init.d/radiusd
install -m 0644 ${WORKDIR}/volatiles.58_radiusd ${D}${sysconfdir}/default/volatiles/58_radiusd
fi
# For systemd
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/radiusd.service ${D}${systemd_unitdir}/system
sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
-e 's,@SBINDIR@,${sbindir},g' \
-e 's,@STATEDIR@,${localstatedir},g' \
-e 's,@SYSCONFDIR@,${sysconfdir},g' \
${D}${systemd_unitdir}/system/radiusd.service
install -d ${D}${sysconfdir}/tmpfiles.d/
install -m 0644 ${WORKDIR}/radiusd-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/radiusd.conf
fi
oe_multilib_header freeradius/autoconf.h
oe_multilib_header freeradius/missing.h
oe_multilib_header freeradius/radpaths.h
}
# This is only needed when we install/update on a running target.
#
pkg_postinst:${PN} () {
if [ -z "$D" ]; then
if command -v systemd-tmpfiles >/dev/null; then
# create /var/log/radius, /var/run/radiusd
systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/radiusd.conf
elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
${sysconfdir}/init.d/populate-volatile.sh update
fi
# Fix ownership for /etc/raddb/*, /var/lib/radiusd
chown -R radiusd:radiusd ${raddbdir}
chown -R radiusd:radiusd ${localstatedir}/lib/radiusd
# for radiusd.service with multilib
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${sysconfdir}/sysconfig
echo "MLPREFIX=${MLPREFIX}" > ${sysconfdir}/sysconfig/radiusd
fi
else
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d $D${sysconfdir}/sysconfig
echo "MLPREFIX=${MLPREFIX}" > $D${sysconfdir}/sysconfig/radiusd
fi
fi
}
pkg_postrm:${PN} () {
# only try to remove ${sysconfdir}/sysconfig/radiusd for systemd
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)}; then
exit 0
fi
if [ -d ${sysconfdir}/raddb ]; then
exit 0
fi
for variant in ${MULTILIB_GLOBAL_VARIANTS}; do
if [ -d ${sysconfdir}/${variant}-raddb ]; then
exit 0
fi
done
rm -f ${sysconfdir}/sysconfig/radiusd
rmdir --ignore-fail-on-non-empty ${sysconfdir}/sysconfig
}
# We really need the symlink :(
INSANE_SKIP:${PN} = "dev-so"
INSANE_SKIP:${PN}-krb5 = "dev-so"
INSANE_SKIP:${PN}-ldap = "dev-so"
INSANE_SKIP:${PN}-mysql = "dev-so"
INSANE_SKIP:${PN}-perl = "dev-so"
INSANE_SKIP:${PN}-postgresql = "dev-so"
INSANE_SKIP:${PN}-python = "dev-so"
INSANE_SKIP:${PN}-unixodbc = "dev-so"
PACKAGES =+ "${PN}-utils ${PN}-ldap ${PN}-krb5 ${PN}-perl \
${PN}-python ${PN}-mysql ${PN}-postgresql ${PN}-unixodbc"
FILES:${PN}-utils = "${bindir}/*"
FILES:${PN}-ldap = "${libdir}/rlm_ldap.so* \
${raddbdir}/mods-available/ldap \
"
FILES:${PN}-krb5 = "${libdir}/rlm_krb5.so* \
${raddbdir}/mods-available/krb5 \
"
FILES:${PN}-perl = "${libdir}/rlm_perl.so* \
${raddbdir}/mods-config/perl \
${raddbdir}/mods-available/perl \
"
FILES:${PN}-python = "${libdir}/rlm_python3.so* \
${raddbdir}/mods-config/python3 \
${raddbdir}/mods-available/python3 \
"
FILES:${PN}-mysql = "${libdir}/rlm_sql_mysql.so* \
${raddbdir}/mods-config/sql/*/mysql \
${raddbdir}/mods-available/sql \
"
FILES:${PN}-postgresql = "${libdir}/rlm_sql_postgresql.so* \
${raddbdir}/mods-config/sql/*/postgresql \
"
FILES:${PN}-unixodbc = "${libdir}/rlm_sql_unixodbc.so*"
FILES:${PN} =+ "${libdir}/rlm_*.so* ${libdir}/proto_*so*"
RDEPENDS:${PN} += "perl"
RDEPENDS:${PN}-utils = "${PN} perl"
CLEANBROKEN = "1"

View File

@@ -0,0 +1,31 @@
DESCRIPTION = "LFTP is a sophisticated file transfer program with \
command line interface. It supports FTP, HTTP, \
FISH, SFTP, HTTPS and FTPS protocols"
HOMEPAGE = "http://lftp.yar.ru/"
SECTION = "console/network"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI = "http://lftp.yar.ru/ftp/lftp-${PV}.tar.bz2"
SRC_URI[md5sum] = "42ec1793c386702bc2734ffbc8a5cff1"
SRC_URI[sha256sum] = "8a07cbf4df09b107fe3fc41d133ee2f6cea6ef4c33ccf06c8448ad058cd96b7e"
inherit autotools gettext pkgconfig
acpaths = "-I ./m4"
EXTRA_OECONF += "--with-modules --disable-rpath"
PACKAGECONFIG ??= "openssl zlib gnutls readline expat"
PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_INCDIR}/.., --without-zlib, zlib"
PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls"
PACKAGECONFIG[readline] = "--with-readline=${STAGING_INCDIR}/.. --with-readline-inc=${STAGING_INCDIR} --with-readline-lib=-lreadline, --with-readline=no, readline"
PACKAGECONFIG[expat] = "--with-expat=${STAGING_INCDIR}/.. --with-expat-inc=${STAGING_INCDIR} --with-expat-lib=-lexpat, , expat"
do_install:append() {
rm -rf ${D}${libdir}/charset.alias
}
FILES:${PN} += "${datadir}/icons/hicolor"
FILES:${PN}-dbg += "${libdir}/lftp/${PV}/.debug"
RDEPENDS:${PN} = "perl bash readline"

View File

@@ -0,0 +1,39 @@
From b0c98f93a7f427d18206c79bf2a0350dc81172f6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 6 Apr 2023 10:44:08 -0700
Subject: [PATCH] configure: Replace use of AC_EGREP_CPP
Use AC_COMPILE_IFELSE instead to compute platform support for arp ioctls
AC_EGREP_CPP does not work as used with upcoming autoconf 2.72
Upstream-Status: Submitted [https://github.com/ofalk/libdnet/pull/85]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
m4/acinclude.m4 | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
index d6350a2..3699bf1 100644
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -196,12 +196,11 @@ dnl
AC_DEFUN([AC_DNET_IOCTL_ARP],
[AC_MSG_CHECKING(for arp(7) ioctls)
AC_CACHE_VAL(ac_cv_dnet_ioctl_arp,
- AC_EGREP_CPP(werd,[#include <sys/types.h>
- #define BSD_COMP
- #include <sys/ioctl.h>
- #ifdef SIOCGARP
- werd
- #endif],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <sys/types.h>
+ #define BSD_COMP
+ #include <sys/ioctl.h>]],
+ [[int foo = SIOCGARP;]])],
ac_cv_dnet_ioctl_arp=yes,
ac_cv_dnet_ioctl_arp=no))
case "$host_os" in
--
2.40.0

View File

@@ -0,0 +1,27 @@
From 85d8338a3ebc01a3ea7600aa602139c4eac3be07 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 6 Apr 2023 12:13:09 -0700
Subject: [PATCH] configure: Use pkg-config variable to find check include paths
Upstream-Status: Submitted [https://github.com/ofalk/libdnet/pull/85]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 3f0c404..553b487 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,7 +153,7 @@ AC_ARG_WITH(check,
esac ],
[ PKG_CHECK_MODULES([CHECK], [check])
if test -n "${CHECK_LIBS}"; then
- CHECKINC="-I${prefix}/include"
+ CHECKINC="${CHECK_CFLAGS}"
CHECKLIB="${CHECK_LIBS}"
AC_MSG_RESULT(yes)
else
--
2.40.0

View File

@@ -0,0 +1,23 @@
SUMMARY = "dumb networking library"
HOMEPAGE = "https://github.com/ofalk/libdnet"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=0036c1b155f4e999f3e0a373490b5db9"
SRC_URI = "git://github.com/ofalk/libdnet.git;nobranch=1;protocol=https \
file://0001-configure-Replace-use-of-AC_EGREP_CPP.patch \
file://0001-configure-Use-pkg-config-variable-to-find-check-incl.patch"
SRCREV = "a03043bec8e66b240a45555e37147b22db182c21"
UPSTREAM_CHECK_GITTAGREGEX = "libdnet-(?P<pver>\d+(\.\d+)+)"
S = "${WORKDIR}/git"
inherit autotools multilib_script pkgconfig
DEPENDS += "libcheck"
EXTRA_AUTORECONF += "-I ./config"
BBCLASSEXTEND = "native"
MULTILIB_SCRIPTS = "${PN}:${bindir}/dnet-config"

View File

@@ -0,0 +1,29 @@
From 16d07a82242c3263ec0038c9b4c97355795d2dd9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 19 Mar 2022 23:16:51 -0700
Subject: [PATCH] pyiec61850: Use CMAKE_INSTALL_LIBDIR from GNUInstallDirs in
cmake
This ensures that it gets installed in platform specified system libdir
all platforms do not use /usr/lib as assumed here e.g. ppc64 uses lib64
Upstream-Status: Submitted [https://github.com/mz-automation/libiec61850/pull/376]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
pyiec61850/CMakeLists.txt | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/pyiec61850/CMakeLists.txt
+++ b/pyiec61850/CMakeLists.txt
@@ -31,7 +31,9 @@ endif()
swig_link_libraries(iec61850 ${PYTHON_LIBRARIES} ${LIBS})
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
-install(TARGETS _iec61850 LIBRARY DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
+include(GNUInstallDirs)
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
+install(TARGETS _iec61850 LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}//python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
add_test(test_pyiec61850 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py)

View File

@@ -0,0 +1,37 @@
From d4ddfc7a350011b7944ed8d6bca80f164dfd1387 Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@smile.fr>
Date: Fri, 10 Jul 2020 17:08:34 +0200
Subject: [PATCH] pyiec61850: don't break CMAKE_INSTALL_PATH by trying to find
python modules install path (site-packages)
https://stackoverflow.com/questions/1242904/finding-python-site-packages-directory-with-cmake
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
pyiec61850/CMakeLists.txt | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/pyiec61850/CMakeLists.txt b/pyiec61850/CMakeLists.txt
index 159ef4b..d1732a1 100644
--- a/pyiec61850/CMakeLists.txt
+++ b/pyiec61850/CMakeLists.txt
@@ -31,14 +31,7 @@ endif()
swig_link_libraries(iec61850 ${PYTHON_LIBRARIES} ${LIBS})
-# Finding python modules install path
-execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c
- "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())"
- OUTPUT_VARIABLE PYTHON_SITE_DIR
-)
-
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION ${PYTHON_SITE_DIR})
-install(TARGETS _iec61850 LIBRARY DESTINATION ${PYTHON_SITE_DIR})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
+install(TARGETS _iec61850 LIBRARY DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
add_test(test_pyiec61850 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py)
--
2.31.1

View File

@@ -0,0 +1,38 @@
SUMMARY = "Open source iec61850 implementation"
DESCRIPTION = "IEC 61850 is an international standard for \
communication systems in Substation Automation Systems \
(SAS) and management of Decentralized Energy Resources \
(DER). It is seen as one of the communication standards \
of the emerging Smart Grid. \
The project libIEC61850 provides a server and client \
library for the IEC 61850/MMS, IEC 61850/GOOSE and IEC \
61850-9-2/Sampled Values communication protocols \
written in C. It is available under the GPLv3 license."
HOMEPAGE = "http://libiec61850.com"
SECTION = "console/network"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
DEPENDS = "swig-native python3"
SRCREV = "210cf30897631fe2006ac50483caf8fd616622a2"
SRC_URI = "git://github.com/mz-automation/${BPN}.git;branch=v1.5;protocol=https \
file://0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch \
file://0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch \
"
S = "${WORKDIR}/git"
inherit cmake pkgconfig python3-dir python3native siteinfo
EXTRA_OECMAKE = " \
-DBUILD_EXAMPLES=OFF \
-DBUILD_PYTHON_BINDINGS=ON \
"
RDEPENDS:${PN}-python = " python3-core "
RDEPENDS:${PN} = " python3-core "
FILES:${PN} += " \
${libdir}/${PYTHON_DIR}/site-packages/iec61850.py \
${libdir}/${PYTHON_DIR}/site-packages/_iec61850.so \
"

View File

@@ -0,0 +1,17 @@
#!/bin/sh
ptestdir=$(dirname "$(readlink -f "$0")")
cd "$ptestdir"/tests || exit
tests=$(find * -type f -name 'test_suite_*')
for f in $tests
do
if test -x ./"$f"; then
if ./"$f" > ./"$f".out 2> ./"$f".err; then
echo "PASS: $f"
else
echo "FAIL: $f"
fi
fi
done

View File

@@ -0,0 +1,82 @@
SUMMARY = "Lightweight crypto and SSL/TLS library"
DESCRIPTION = "mbedtls is a lean open source crypto library \
for providing SSL and TLS support in your programs. It offers \
an intuitive API and documented header files, so you can actually \
understand what the code does. It features: \
\
- Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4, \
Camellia and XTEA \
- Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5 \
- Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG \
- Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \
ECDSA and ECDH \
- SSL v3 and TLS 1.0, 1.1 and 1.2 \
- Abstraction layers for ciphers, hashes, public key operations, \
platform abstraction and threading \
"
HOMEPAGE = "https://tls.mbed.org/"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
SECTION = "libs"
S = "${WORKDIR}/git"
SRCREV = "981743de6fcdbe672e482b6fd724d31d0a0d2476"
SRC_URI = "git://github.com/ARMmbed/mbedtls.git;protocol=https;branch=mbedtls-2.28 \
file://run-ptest \
"
inherit cmake update-alternatives ptest
PACKAGECONFIG ??= "shared-libs programs ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
PACKAGECONFIG[shared-libs] = "-DUSE_SHARED_MBEDTLS_LIBRARY=ON,-DUSE_SHARED_MBEDTLS_LIBRARY=OFF"
PACKAGECONFIG[programs] = "-DENABLE_PROGRAMS=ON,-DENABLE_PROGRAMS=OFF"
PACKAGECONFIG[werror] = "-DMBEDTLS_FATAL_WARNINGS=ON,-DMBEDTLS_FATAL_WARNINGS=OFF"
# Make X.509 and TLS calls use PSA
# https://github.com/Mbed-TLS/mbedtls/blob/development/docs/use-psa-crypto.md
PACKAGECONFIG[psa] = ""
PACKAGECONFIG[tests] = "-DENABLE_TESTING=ON,-DENABLE_TESTING=OFF"
EXTRA_OECMAKE = "-DLIB_INSTALL_DIR:STRING=${libdir}"
# For now the only way to enable PSA is to explicitly pass a -D via CFLAGS
CFLAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'psa', ' -DMBEDTLS_USE_PSA_CRYPTO', '', d)}"
PROVIDES += "polarssl"
RPROVIDES:${PN} = "polarssl"
PACKAGES =+ "${PN}-programs"
FILES:${PN}-programs = "${bindir}/"
ALTERNATIVE:${PN}-programs = "hello"
ALTERNATIVE_LINK_NAME[hello] = "${bindir}/hello"
BBCLASSEXTEND = "native nativesdk"
CVE_PRODUCT = "mbed_tls"
# Fix merged upstream https://github.com/Mbed-TLS/mbedtls/pull/5310
CVE_CHECK_IGNORE += "CVE-2021-43666"
# Fix merged upstream https://github.com/Mbed-TLS/mbedtls/commit/9a4a9c66a48edfe9ece03c7e4a53310adf73a86c
CVE_CHECK_IGNORE += "CVE-2021-45451"
# Strip host paths from autogenerated test files
do_compile:append() {
sed -i 's+${S}/++g' ${B}/tests/*.c 2>/dev/null || :
sed -i 's+${B}/++g' ${B}/tests/*.c 2>/dev/null || :
}
# Export source files/headers needed by Arm Trusted Firmware
sysroot_stage_all:append() {
sysroot_stage_dir "${S}/library" "${SYSROOT_DESTDIR}/usr/share/mbedtls-source/library"
sysroot_stage_dir "${S}/include" "${SYSROOT_DESTDIR}/usr/share/mbedtls-source/include"
}
do_install_ptest () {
install -d ${D}${PTEST_PATH}/tests
cp -f ${B}/tests/test_suite_* ${D}${PTEST_PATH}/tests/
find ${D}${PTEST_PATH}/tests/ -type f -name "*.c" -delete
cp -fR ${S}/tests/data_files ${D}${PTEST_PATH}/tests/
}

View File

@@ -0,0 +1,38 @@
From 54698856e5602bbd9d61e855814c854a013b4840 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 22 Dec 2018 18:47:45 -0800
Subject: [PATCH] Add OpenEmbedded cross compile case
Upstream-Status: Submitted [https://github.com/miniupnp/miniupnp/pull/410]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
genconfig.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
--- a/genconfig.sh
+++ b/genconfig.sh
@@ -103,6 +103,12 @@ if [ -f ../shared/tomato_version ]; then
OS_VERSION="Tomato $TOMATO_VER"
fi
+# OpenEmbedded special case
+if [ -f ./os.openembedded ]; then
+ OS_NAME=OpenEmbedded
+ OS_VERSION=$(cat ./os.openembedded)
+fi
+
${RM} ${CONFIGFILE}
echo "/* MiniUPnP Project" >> ${CONFIGFILE}
@@ -346,6 +352,11 @@ case $OS_NAME in
echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE}
FW=iptables
;;
+ OpenEmbedded)
+ OS_URL=http://www.openembedded.org/
+ echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE}
+ FW=iptables
+ ;;
AstLinux)
OS_URL=http://www.astlinux.org/
echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE}

View File

@@ -0,0 +1,14 @@
[Unit]
Description=Lightweight UPnP IGD daemon
Documentation=man:miniupnpd(8)
After=network.target
[Service]
Type=forking
ExecStartPre=/etc/miniupnpd/iptables_init.sh
ExecStart=/usr/sbin/miniupnpd -f /etc/miniupnpd/miniupnpd.conf
ExecStopPost=/etc/miniupnpd/iptables_removeall.sh
PIDFile=/run/miniupnpd.pid
[Install]
WantedBy=network.target

View File

@@ -0,0 +1,50 @@
SUMMARY = "Lightweight UPnP IGD daemon"
DESCRIPTION = "The miniUPnP daemon is an UPnP IGD (internet gateway device) \
which provide NAT traversal services to any UPnP enabled client on \
the network."
SECTION = "networking"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a1ed15843ce66639bcf9f109cf247870"
inherit autotools gettext pkgconfig systemd
DEPENDS += "iptables net-tools util-linux libmnl libnetfilter-conntrack"
SRC_URI = "http://miniupnp.tuxfamily.org/files/download.php?file=${BP}.tar.gz;downloadfilename=${BP}.tar.gz \
file://miniupnpd.service \
file://0001-Add-OpenEmbedded-cross-compile-case.patch \
"
SRC_URI[md5sum] = "340789edd49c113afe37834cc901a1e8"
SRC_URI[sha256sum] = "218fad7af31f3c22fb4c9db28a55a2a8b5067d41f5b38f52008a057a00d2206d"
IPV6 = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--ipv6', '', d)}"
do_configure:prepend() {
echo "${@d.getVar('DISTRO_VERSION')}" > ${S}/os.openembedded
}
do_compile() {
cd ${S}
CONFIG_OPTIONS="${IPV6} --leasefile --vendorcfg" oe_runmake -f Makefile.linux config.h
CONFIG_OPTIONS="${IPV6} --leasefile --vendorcfg" oe_runmake -f Makefile.linux
}
do_install() {
install -d ${D}/${sbindir}
install ${S}/miniupnpd ${D}/${sbindir}
install -d ${D}/${sysconfdir}/${BPN}
install ${S}/netfilter/iptables_init.sh ${D}/${sysconfdir}/${BPN}
install ${S}/netfilter/iptables_removeall.sh ${D}/${sysconfdir}/${BPN}
install ${S}/netfilter/ip6tables_init.sh ${D}/${sysconfdir}/${BPN}
install ${S}/netfilter/miniupnpd_functions.sh ${D}/${sysconfdir}/${BPN}
install ${S}/netfilter/ip6tables_removeall.sh ${D}/${sysconfdir}/${BPN}
install -m 0644 -b ${S}/miniupnpd.conf ${D}/${sysconfdir}/${BPN}
install -d ${D}/${sysconfdir}/init.d
install ${S}/linux/miniupnpd.init.d.script ${D}/${sysconfdir}/init.d/miniupnpd
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/miniupnpd.service ${D}${systemd_unitdir}/system/
}
SYSTEMD_SERVICE:${PN} = "miniupnpd.service"

View File

@@ -0,0 +1,22 @@
Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1571]
From 3fe5468f1bdca1bff1d18cf43c9e338f41aa9e32 Mon Sep 17 00:00:00 2001
From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Date: Wed, 22 Jan 2020 12:39:49 +0100
Subject: [PATCH] Add dynamic symbols linking with cmake too
Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
---
lib/CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -94,6 +94,8 @@
OUTPUT_NAME mosquitto
VERSION ${VERSION}
SOVERSION 1
+ LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/linker.version
+ LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/linker.version"
)
install(TARGETS libmosquitto

View File

@@ -0,0 +1,89 @@
#! /bin/sh
# Based on the Debian initscript for mosquitto
### BEGIN INIT INFO
# Provides: mosquitto
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: mosquitto MQTT message broker
# Description:
# This is a message broker that supports version 3.1/3.1.1 of the MQ Telemetry
# Transport (MQTT) protocol.
#
# MQTT provides a method of carrying out messaging using a publish/subscribe
# model. It is lightweight, both in terms of bandwidth usage and ease of
# implementation. This makes it particularly useful at the edge of the network
# where a sensor or other simple device may be implemented using an arduino for
# example.
### END INIT INFO
set -e
PIDFILE=@LOCALSTATEDIR@/run/mosquitto.pid
DAEMON=@SBINDIR@/mosquitto
# start and stop the mosquitto MQTT message broker
test -x ${DAEMON} || exit 0
umask 022
. @SYSCONFDIR@/init.d/functions
export PATH="${PATH:+$PATH:}@SBINDIR@:@BASE_SBINDIR@"
case "$1" in
start)
echo "Starting Mosquitto message broker" "mosquitto"
if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c @SYSCONFDIR@/mosquitto/mosquitto.conf ; then
exit 0
else
exit 1
fi
;;
stop)
echo "Stopping Mosquitto message broker" "mosquitto"
if start-stop-daemon --stop --quiet --oknodo --pidfile ${PIDFILE}; then
rm -f ${PIDFILE}
exit 0
else
exit 1
fi
;;
reload|force-reload)
if [ -f ${PIDFILE} ] ; then
echo "Reloading configuration for mosquitto"
pid=`cat ${PIDFILE}`
kill -HUP $pid
else
echo "mosquitto does not seem to be running"
fi
;;
restart)
echo "Restarting Mosquitto message broker" "mosquitto"
if start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile ${PIDFILE}; then
rm -f ${PIDFILE}
fi
if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c @SYSCONFDIR@/mosquitto/mosquitto.conf ; then
exit 0
else
exit 1
fi
;;
status)
status ${DAEMON} && exit 0 || exit $?
;;
*)
echo "Usage: $0 {start|stop|reload|force-reload|restart|status}"
exit 1
esac
exit 0

View File

@@ -0,0 +1,90 @@
SUMMARY = "Open source MQTT implementation"
DESCRIPTION = "Mosquitto is an open source (Eclipse licensed) message broker \
that implements the MQ Telemetry Transport protocol version 3.1, 3.1.1 and \
5, providing both an MQTT broker and several command-line clients. MQTT \
provides a lightweight method of carrying out messaging using a \
publish/subscribe model. "
HOMEPAGE = "http://mosquitto.org/"
SECTION = "console/network"
LICENSE = "EPL-2.0 | EDL-1.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ca9a8f366c6babf593e374d0d7d58749 \
file://edl-v10;md5=9f6accb1afcb570f8be65039e2fcd49e \
file://epl-v20;md5=2dd765ca47a05140be15ebafddbeadfe \
file://NOTICE.md;md5=a7a91b4754c6f7995020d1b49bc829c6 \
"
DEPENDS = "uthash cjson"
SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \
file://mosquitto.init \
file://1571.patch \
"
SRC_URI[sha256sum] = "4735b1d32e3f91c7a8896741d88a3022e89730a1ee897946decfa0df27039ac6"
inherit systemd update-rc.d useradd cmake pkgconfig
PACKAGECONFIG ??= "ssl dlt websockets \
${@bb.utils.filter('DISTRO_FEATURES','systemd', d)} \
"
PACKAGECONFIG[manpages] = "-DDOCUMENTATION=ON,-DDOCUMENTATION=OFF,libxslt-native docbook-xsl-stylesheets-native"
PACKAGECONFIG[dns-srv] = "-DWITH_SRV=ON,-DWITH_SRV=OFF,c-ares"
PACKAGECONFIG[ssl] = "-DWITH_TLS=ON -DWITH_TLS_PSK=ON -DWITH_EC=ON,-DWITH_TLS=OFF -DWITH_TLS_PSK=OFF -DWITH_EC=OFF,openssl"
PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF,systemd"
PACKAGECONFIG[websockets] = "-DWITH_WEBSOCKETS=ON,-DWITH_WEBSOCKETS=OFF,libwebsockets"
PACKAGECONFIG[dlt] = "-DWITH_DLT=ON,-DWITH_DLT=OFF,dlt-daemon"
EXTRA_OECMAKE = " \
-DWITH_BUNDLED_DEPS=OFF \
-DWITH_ADNS=ON \
"
do_install:append() {
install -d ${D}${systemd_unitdir}/system/
install -m 0644 ${S}/service/systemd/mosquitto.service.notify ${D}${systemd_unitdir}/system/mosquitto.service
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto
sed -i -e 's,@SBINDIR@,${sbindir},g' \
-e 's,@BASE_SBINDIR@,${base_sbindir},g' \
-e 's,@LOCALSTATEDIR@,${localstatedir},g' \
-e 's,@SYSCONFDIR@,${sysconfdir},g' \
${D}${sysconfdir}/init.d/mosquitto
}
PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients"
PACKAGE_BEFORE_PN = "${PN}-examples"
FILES:${PN} = "${sbindir}/mosquitto \
${bindir}/mosquitto_passwd \
${bindir}/mosquitto_ctrl \
${libdir}/mosquitto_dynamic_security.so \
${sysconfdir}/mosquitto \
${sysconfdir}/init.d \
${systemd_unitdir}/system/mosquitto.service \
"
CONFFILES:${PN} += "${sysconfdir}/mosquitto/mosquitto.conf"
FILES:libmosquitto1 = "${libdir}/libmosquitto.so.*"
FILES:libmosquittopp1 = "${libdir}/libmosquittopp.so.*"
FILES:${PN}-clients = "${bindir}/mosquitto_pub \
${bindir}/mosquitto_sub \
${bindir}/mosquitto_rr \
"
FILES:${PN}-examples = "${sysconfdir}/mosquitto/*.example"
SYSTEMD_SERVICE:${PN} = "mosquitto.service"
INITSCRIPT_NAME = "mosquitto"
INITSCRIPT_PARAMS = "defaults 30"
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system --no-create-home --shell /bin/false \
--user-group mosquitto"
BBCLASSEXTEND += "native nativesdk"

View File

@@ -0,0 +1,28 @@
SUMMARY = "nanomsg socket library"
DESCRIPTION = "nanomsg is a socket library that provides several common \
communication patterns. It aims to make the networking layer fast, scalable, \
and easy to use. Implemented in C, it works on a wide range of operating \
systems with no further dependencies."
HOMEPAGE = "https://nanomsg.org/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=587b3fd7fd291e418ff4d2b8f3904755"
SECTION = "libs/networking"
SRC_URI = "git://github.com/nanomsg/nanomsg.git;protocol=https;branch=master"
SRCREV = "a081f1720f576d3e72ddce14e159ba90384e5b92"
S = "${WORKDIR}/git"
inherit cmake pkgconfig
# nanomsg documentation generation requires asciidoctor,
# not asciidoc, and currently there's no asciidoctor-native
# recipe anywhere in openembedded-core or meta-openembedded
EXTRA_OECMAKE = " -DNN_ENABLE_DOC=OFF "
# we don't want nanomsg-tools to be renamed to libnanomsg-tools
DEBIAN_NOAUTONAME:${PN}-tools = "1"
PACKAGES =+ "${PN}-tools"
FILES:${PN}-tools = "${bindir}/*"

View File

@@ -0,0 +1,22 @@
SUMMARY = "nanomsg-next-generation -- light-weight brokerless messaging"
DESCRIPTION = "NNG, like its predecessors nanomsg (and to some extent ZeroMQ), is a lightweight, broker-less library, offering a simple API to solve common recurring messaging problems, such as publish/subscribe, RPC-style request/reply, or service discovery."
HOMEPAGE = "https://github.com/nanomsg/nng"
SECTION = "libs/networking"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a41e579bb4326c21c774f8e51e41d8a3"
SRC_URI = "git://github.com/nanomsg/nng.git;branch=master;protocol=https"
SRCREV = "169221da8d53b2ca4fda76f894bee8505887a7c6"
S = "${WORKDIR}/git"
inherit cmake pkgconfig
EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DNNG_ENABLE_NNGCAT=ON"
PACKAGECONFIG ??= ""
PACKAGECONFIG[mbedtls] = "-DNNG_ENABLE_TLS=ON,-DNNG_ENABLE_TLS=OFF,mbedtls"
PACKAGES =+ "${PN}-tools"
FILES:${PN}-tools = "${bindir}/*"

View File

@@ -0,0 +1,14 @@
DESCRIPTION = "C++ wrapper around the nanomsg NNG API"
HOMEPAGE = "https://github.com/cwzx/nngpp"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://license.txt;md5=6d17d78c3597e0d4452fb1c63bf7c58e"
DEPENDS = "nng"
SRCREV = "cc5d2641babab165d8a9943817c46d36c6dc17c2"
PV = "1.3.0"
SRC_URI = "git://github.com/cwzx/nngpp;branch=master;protocol=https"
S = "${WORKDIR}/git"
inherit cmake

View File

@@ -0,0 +1,52 @@
SUMMARY = "NetworkManager-openvpn-plugin"
SECTION = "net/misc"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=100d5a599bead70ddcd70dcd73f2e29c"
DEPENDS = "dbus dbus-glib networkmanager openvpn intltool-native glib-2.0-native"
inherit gnomebase useradd gettext systemd
SRC_URI = "${GNOME_MIRROR}/NetworkManager-openvpn/${@gnome_verdir("${PV}")}/NetworkManager-openvpn-${PV}.tar.xz"
SRC_URI[sha256sum] = "62f0f2a8782221b923f212ac2a8ebbc1002efd6a90ee945dad4adfb56d076d21"
S = "${WORKDIR}/NetworkManager-openvpn-${PV}"
# meta-gnome in layers is required using gnome:
PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome,gtk+3 libnma libsecret"
do_configure:append() {
# network-manager-openvpn.metainfo.xml is created in source folder but
# compile expects it in build folder. As long as nobody comes up with a
# better solution just support build:
if [ -e ${S}/appdata/network-manager-openvpn.metainfo.xml ]; then
mkdir -p ${B}/appdata
cp -f ${S}/appdata/network-manager-openvpn.metainfo.xml ${B}/appdata/
fi
}
do_install:append () {
rm -rf ${D}${libdir}/NetworkManager/*.la
}
# Create user and group nm-openvpn that are needed since version 1.0.6
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system nm-openvpn"
FILES:${PN} += " \
${datadir}/dbus-1 \
${datadir}/metainfo \
${libdir}/NetworkManager/*.so \
${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \
"
FILES:${PN}-staticdev += " \
${libdir}/NetworkManager/*.a \
"
RDEPENDS:${PN} = " \
networkmanager \
openvpn \
"

View File

@@ -0,0 +1,3 @@
[device]
wifi.iwd.autoconnect=yes
wifi.backend=iwd

View File

@@ -0,0 +1,110 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: network-manager
# Required-Start: $remote_fs dbus udev
# Required-Stop: $remote_fs dbus udev
# Should-Start: $syslog
# Should-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: network connection manager
# Description: Daemon for automatically switching network
# connections to the best available connection.
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="network connection manager"
NAME="NetworkManager"
DAEMON=/usr/sbin/$NAME
PIDFILE=/run/$NAME/$NAME.pid
SCRIPTNAME=/etc/init.d/network-manager
. /etc/init.d/functions || exit 1
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
log_daemon_msg() {
echo -n $*
}
log_end_msg() {
if [ $1 -eq 0 ]; then
success
else
failure
fi
echo
}
log_progress_msg () {
if [ -z "${1:-}" ]; then
return 1
fi
echo -n " $@"
}
#
# Function that starts the daemon/service.
#
d_start() {
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--exec $DAEMON -- $DAEMON_OPTS
}
#
# Function that stops the daemon/service.
#
d_stop() {
start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \
--exec $DAEMON
}
d_reload() {
start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE \
--exec $DAEMON
}
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
d_start
case "$?" in
0) log_end_msg 0 ;;
1) log_progress_msg "already started"
log_end_msg 0 ;;
*) log_end_msg 1 ;;
esac
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
d_stop
case "$?" in
0) log_end_msg 0 ;;
1) log_progress_msg "already stopped"
log_end_msg 0 ;;
*) log_end_msg 1 ;;
esac
;;
reload|force-reload)
log_daemon_msg "Reloading $DESC" "$NAME"
d_reload
log_end_msg $?
;;
restart)
$0 stop
$0 start
;;
status)
status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,308 @@
SUMMARY = "NetworkManager"
HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager"
SECTION = "net/misc"
LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
"
DEPENDS = " \
coreutils-native \
intltool-native \
libxslt-native \
libnl \
udev \
util-linux \
libndp \
libnewt \
curl \
dbus \
"
DEPENDS:append:class-target = " bash-completion"
GNOMEBASEBUILDCLASS = "meson"
inherit gnomebase gettext update-rc.d systemd gobject-introspection gtk-doc update-alternatives upstream-version-is-even
SRC_URI = " \
${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \
file://${BPN}.initd \
file://enable-dhcpcd.conf \
file://enable-iwd.conf \
"
SRC_URI[sha256sum] = "86ee16a2f7f525629133fa0c3dc060caf96ae4f34084eda1c24551951abe5a3c"
S = "${WORKDIR}/NetworkManager-${PV}"
# ['auto', 'symlink', 'file', 'netconfig', 'resolvconf']
NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT ??= "auto"
# ['dhcpcanon', 'dhclient', 'dhcpcd', 'internal', 'nettools']
NETWORKMANAGER_DHCP_DEFAULT ??= "internal"
# The default gets detected based on whether /usr/sbin/nft or /usr/sbin/iptables is installed, with nftables preferred.
# ['', 'iptables', 'nftables']
NETWORKMANAGER_FIREWALL_DEFAULT ??= "nftables"
EXTRA_OEMESON = "\
-Difcfg_rh=false \
-Dtests=yes \
-Dnmtui=true \
-Dudev_dir=${nonarch_base_libdir}/udev \
-Dlibpsl=false \
-Dqt=false \
-Dconfig_dns_rc_manager_default=${NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT} \
-Dconfig_dhcp_default=${NETWORKMANAGER_DHCP_DEFAULT} \
-Ddhcpcanon=false \
-Diptables=${sbindir}/iptables \
-Dnft=${sbindir}/nft \
"
# stolen from https://github.com/void-linux/void-packages/blob/master/srcpkgs/NetworkManager/template
# avoids:
# | ../NetworkManager-1.16.0/libnm-core/nm-json.c:106:50: error: 'RTLD_DEEPBIND' undeclared (first use in this function); did you mean 'RTLD_DEFAULT'?
CFLAGS:append:libc-musl = " \
-DRTLD_DEEPBIND=0 \
"
do_compile:prepend() {
export GI_TYPELIB_PATH="${B}}/src/libnm-client-impl${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
}
PACKAGECONFIG ??= "readline nss ifupdown dnsmasq nmcli vala \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit', '', d)} \
"
inherit ${@bb.utils.contains('PACKAGECONFIG', 'vala', 'vala', '', d)}
PACKAGECONFIG[systemd] = "\
-Dsystemdsystemunitdir=${systemd_unitdir}/system -Dsession_tracking=systemd,\
-Dsystemdsystemunitdir=no -Dsystemd_journal=false -Dsession_tracking=no\
"
PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false,polkit"
PACKAGECONFIG[bluez5] = "-Dbluez5_dun=true,-Dbluez5_dun=false,bluez5"
# consolekit is not picked by shlibs, so add it to RDEPENDS too
PACKAGECONFIG[consolekit] = "-Dsession_tracking_consolekit=true,-Dsession_tracking_consolekit=false,consolekit,consolekit"
PACKAGECONFIG[modemmanager] = "-Dmodem_manager=true,-Dmodem_manager=false,modemmanager mobile-broadband-provider-info"
PACKAGECONFIG[ppp] = "-Dppp=true -Dpppd=${sbindir}/pppd,-Dppp=false,ppp"
PACKAGECONFIG[dnsmasq] = "-Ddnsmasq=${bindir}/dnsmasq"
PACKAGECONFIG[nss] = "-Dcrypto=nss,,nss"
PACKAGECONFIG[resolvconf] = "-Dresolvconf=${base_sbindir}/resolvconf,-Dresolvconf=no,,resolvconf"
PACKAGECONFIG[gnutls] = "-Dcrypto=gnutls,,gnutls"
PACKAGECONFIG[crypto-null] = "-Dcrypto=null"
PACKAGECONFIG[wifi] = "-Dwext=true -Dwifi=true,-Dwext=false -Dwifi=false"
PACKAGECONFIG[iwd] = "-Diwd=true,-Diwd=false"
PACKAGECONFIG[ifupdown] = "-Difupdown=true,-Difupdown=false"
PACKAGECONFIG[cloud-setup] = "-Dnm_cloud_setup=true,-Dnm_cloud_setup=false"
PACKAGECONFIG[nmcli] = "-Dnmcli=true,-Dnmcli=false"
PACKAGECONFIG[readline] = "-Dreadline=libreadline,,readline"
PACKAGECONFIG[libedit] = "-Dreadline=libedit,,libedit"
PACKAGECONFIG[ovs] = "-Dovs=true,-Dovs=false,jansson"
PACKAGECONFIG[audit] = "-Dlibaudit=yes,-Dlibaudit=no"
PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux"
PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false"
PACKAGECONFIG[dhcpcd] = "-Ddhcpcd=${base_sbindir}/dhcpcd,-Ddhcpcd=no,,dhcpcd"
PACKAGECONFIG[dhclient] = "-Ddhclient=yes,-Ddhclient=no,,dhcp"
PACKAGECONFIG[concheck] = "-Dconcheck=true,-Dconcheck=false"
# The following PACKAGECONFIG is used to determine whether NM is managing /etc/resolv.conf itself or not
PACKAGECONFIG[man-resolv-conf] = ",,"
PACKAGES =+ " \
libnm \
${PN}-adsl \
${PN}-bluetooth \
${PN}-cloud-setup \
${PN}-nmcli \
${PN}-nmcli-bash-completion \
${PN}-nmtui \
${PN}-wifi \
${PN}-wwan \
${PN}-ovs \
${PN}-ppp \
${PN}-daemon \
"
SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-cloud-setup"
INITSCRIPT_PACKAGES = "${PN}-daemon"
NETWORKMANAGER_PLUGINDIR = "${libdir}/NetworkManager/${PV}"
NETWORKMANAGER_DISPATCHERDIR = "${nonarch_libdir}/NetworkManager/dispatcher.d"
SUMMARY:libnm = "Libraries for adding NetworkManager support to applications"
FILES:libnm = "\
${libdir}/libnm.so.* \
${libdir}/girepository-1.0/NM-1.0.typelib \
"
SUMMARY:${PN}-adsl = "ADSL device plugin for NetworkManager"
FILES:${PN}-adsl = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-adsl.so"
RDEPENDS:${PN}-adsl += "${PN}-daemon"
SUMMARY:${PN}-bluetooth = "Bluetooth device plugin for NetworkManager"
FILES:${PN}-bluetooth = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-bluetooth.so"
RDEPENDS:${PN}-bluetooth += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG', 'bluez5', '${PN}-wwan bluez5', '', d)}"
SUMMARY:${PN}-cloud-setup = "Automatically configure NetworkManager in cloud"
FILES:${PN}-cloud-setup = " \
${libexecdir}/nm-cloud-setup \
${systemd_system_unitdir}/nm-cloud-setup.service \
${systemd_system_unitdir}/nm-cloud-setup.timer \
${libdir}/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh \
${libdir}/NetworkManager/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh \
"
RDEPENDS:${PN}-cloud-setup += "${PN}-daemon"
ALLOW_EMPTY:${PN}-cloud-setup = "1"
SYSTEMD_SERVICE:${PN}-cloud-setup = "${@bb.utils.contains('PACKAGECONFIG', 'cloud-setup', 'nm-cloud-setup.service nm-cloud-setup.timer', '', d)}"
SUMMARY:${PN}-nmcli = "NetworkManager command line client"
FILES:${PN}-nmcli = " \
${bindir}/nmcli \
"
RDEPENDS:${PN}-nmcli += "${PN}-daemon"
SUMMARY:${PN}-nmcli-bash-completion = "NetworkManager command line client bash completion"
FILES:${PN}-nmcli-bash-completion = "${datadir}/bash-completion/completions/nmcli"
RDEPENDS:${PN}-nmcli-bash-completion = "bash-completion"
SUMMARY:${PN}-nmtui = "NetworkManager curses-based UI"
FILES:${PN}-nmtui = " \
${bindir}/nmtui \
${bindir}/nmtui-edit \
${bindir}/nmtui-connect \
${bindir}/nmtui-hostname \
"
RDEPENDS:${PN}-nmtui += "${PN}-daemon"
SUMMARY:${PN}-wifi = "Wifi plugin for NetworkManager"
FILES:${PN}-wifi = "\
${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-wifi.so \
${libdir}/NetworkManager/conf.d/enable-iwd.conf \
"
def get_wifi_deps(d):
packageconfig = (d.getVar('PACKAGECONFIG') or "").split()
if 'wifi' in packageconfig:
if 'iwd' in packageconfig:
return 'iwd'
else:
return 'wpa-supplicant'
else:
return ''
RDEPENDS:${PN}-wifi += "${PN}-daemon ${@get_wifi_deps(d)}"
SUMMARY:${PN}-wwan = "Mobile broadband device plugin for NetworkManager"
FILES:${PN}-wwan = "\
${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-wwan.so \
${NETWORKMANAGER_PLUGINDIR}/libnm-wwan.so \
"
RDEPENDS:${PN}-wwan += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG','modemmanager','modemmanager','',d)}"
SUMMARY:${PN}-ovs = "Open vSwitch device plugin for NetworkManager"
FILES:${PN}-ovs = "\
${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-ovs.so \
${systemd_system_unitdir}/NetworkManager.service.d/NetworkManager-ovs.conf \
"
RDEPENDS:${PN}-ovs += "${PN}-daemon"
SUMMARY:${PN}-ppp = "PPP plugin for NetworkManager"
FILES:${PN}-ppp = "\
${NETWORKMANAGER_PLUGINDIR}/libnm-ppp-plugin.so \
${libdir}/pppd/*/nm-pppd-plugin.so \
"
RDEPENDS:${PN}-ppp += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG','ppp','ppp','',d)}"
FILES:${PN}-dev += " \
${libdir}/pppd/*/*.la \
${libdir}/NetworkManager/*.la \
${NETWORKMANAGER_PLUGINDIR}/*.la \
${datadir}/dbus-1/interfaces/*.xml \
"
SUMMARY:${PN}-daemon += "The NetworkManager daemon"
FILES:${PN}-daemon += " \
${bindir}/nm-online \
${datadir}/dbus-1 \
${datadir}/polkit-1 \
${libdir}/NetworkManager \
${libexecdir} \
${localstatedir}/lib/NetworkManager \
${NETWORKMANAGER_DISPATCHERDIR} \
${nonarch_base_libdir}/udev/* \
${nonarch_libdir}/firewalld \
${nonarch_libdir}/NetworkManager/conf.d \
${nonarch_libdir}/NetworkManager/dispatcher.d/no-wait.d \
${nonarch_libdir}/NetworkManager/dispatcher.d/pre-down.d \
${nonarch_libdir}/NetworkManager/dispatcher.d/pre-up.d \
${nonarch_libdir}/NetworkManager/system-connections \
${nonarch_libdir}/NetworkManager/VPN \
${sbindir}/NetworkManager \
${sysconfdir}/init.d/network-manager \
${sysconfdir}/NetworkManager \
${sysconfdir}/resolv-conf.NetworkManager \
${sysconfdir}/sysconfig/network-scripts \
${systemd_system_unitdir} \
"
RDEPENDS:${PN}-daemon += "\
${@bb.utils.contains('PACKAGECONFIG', 'ifupdown', 'bash', '', d)} \
"
RRECOMMENDS:${PN}-daemon += "\
${NETWORKMANAGER_FIREWALL_DEFAULT} \
${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \
"
INITSCRIPT_NAME:${PN}-daemon = "network-manager"
SYSTEMD_SERVICE:${PN}-daemon = "\
NetworkManager.service \
NetworkManager-dispatcher.service \
"
RCONFLICTS:${PN}-daemon += "connman"
ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE:${PN}-daemon = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','resolv-conf','',d)}"
ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','${sysconfdir}/resolv-conf.NetworkManager','',d)}"
ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','${sysconfdir}/resolv.conf','',d)}"
# The networkmanager package is an empty meta package which weakly depends on all the compiled features.
# Install this package to get all plugins and related dependencies installed. Alternatively just install
# plugins and related dependencies e.g. by installing networkmanager-wifi or networkmanager-wwan
# packages to the firmware.
ALLOW_EMPTY:${PN} = "1"
RRECOMMENDS:${PN} += "\
${@bb.utils.contains('PACKAGECONFIG','adsl','${PN}-adsl','',d)} \
${@bb.utils.contains('PACKAGECONFIG','bluez5','${PN}-bluetooth','',d)} \
${@bb.utils.contains('PACKAGECONFIG','cloud-setup','${PN}-cloud-setup','',d)} \
${@bb.utils.contains('PACKAGECONFIG','nmcli','${PN}-nmcli','',d)} \
${@bb.utils.contains('PACKAGECONFIG','nmtui','${PN}-nmtui','',d)} \
${@bb.utils.contains('PACKAGECONFIG','wifi','${PN}-wifi','',d)} \
${@bb.utils.contains('PACKAGECONFIG','wwan','${PN}-wwan','',d)} \
${@bb.utils.contains('PACKAGECONFIG','ovs','${PN}-ovs','',d)} \
${@bb.utils.contains('PACKAGECONFIG','ppp','${PN}-ppp','',d)} \
"
do_install:append() {
install -Dm 0755 ${WORKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/network-manager
rm -rf ${D}/run ${D}${localstatedir}/run
if ${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','true','false',d)}; then
# For read-only filesystem, do not create links during bootup
ln -sf ../run/NetworkManager/resolv.conf ${D}${sysconfdir}/resolv-conf.NetworkManager
# systemd v210 and newer do not need this rule file
rm ${D}/${nonarch_base_libdir}/udev/rules.d/84-nm-drivers.rules
fi
# Enable iwd if compiled
if ${@bb.utils.contains('PACKAGECONFIG','iwd','true','false',d)}; then
install -Dm 0644 ${WORKDIR}/enable-iwd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-iwd.conf
fi
# Enable dhcpd if compiled
if ${@bb.utils.contains('PACKAGECONFIG','dhcpcd','true','false',d)}; then
install -Dm 0644 ${WORKDIR}/enable-dhcpcd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-dhcpcd.conf
fi
}

View File

@@ -0,0 +1,32 @@
SUMMARY = "Open client for Cisco AnyConnect VPN"
LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=8c2e1ec1540fb3e0beb68361344cba7e"
SRC_URI = " \
git://git.infradead.org/users/dwmw2/openconnect.git;branch=master \
"
SRCREV = "5695cd6b0c7d42ca293ce0f00abcbe3d1ec4e609"
DEPENDS = "vpnc libxml2 krb5 gettext-native"
RDEPENDS:${PN} = "bash python3-core vpnc-script"
PACKAGECONFIG ??= "gnutls lz4 libproxy"
# config defaults
PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls,"
PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy,"
# not config defaults
PACKAGECONFIG[pcsc-lite] = "--with-libpcsclite,--without-libpcsclite,pcsc-lite,"
S = "${WORKDIR}/git"
inherit autotools pkgconfig bash-completion
EXTRA_OECONF += "--with-vpnc-script=${sysconfdir}/vpnc/vpnc-script \
--disable-static"
do_install:append() {
rm ${D}/usr/libexec/openconnect/hipreport-android.sh
}

View File

@@ -0,0 +1,68 @@
From c0546e351f6d7ab50eb1de8cef1d0d167760fccc Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <peter@korsgaard.com>
Date: Mon, 27 Aug 2018 22:50:57 +0200
Subject: [PATCH] bn_mul.h: fix x86 PIC inline ASM compilation with GCC < 5
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes #1910
With ebx added to the MULADDC_STOP clobber list to fix #1550, the inline
assembly fails to build with GCC < 5 in PIC mode with the following error:
include/mbedtls/bn_mul.h:46:13: error: PIC register clobbered by ebx in asm
This is because older GCC versions treated the x86 ebx register (which is
used for the GOT) as a fixed reserved register when building as PIC.
This is fixed by an improved register allocator in GCC 5+. From the release
notes:
Register allocation improvements: Reuse of the PIC hard register, instead of
using a fixed register, was implemented on x86/x86-64 targets. This
improves generated PIC code performance as more hard registers can be used.
https://www.gnu.org/software/gcc/gcc-5/changes.html
As a workaround, detect this situation and disable the inline assembly,
similar to the MULADDC_CANNOT_USE_R7 logic.
Upstream-Status: Backport [https://github.com/Mbed-TLS/mbedtls/commit/c0546e351f6d7ab50eb1de8cef1d0d167760fccc]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
library/bn_mul.h | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
--- a/third_party/openthread/repo/third_party/mbedtls/repo/include/mbedtls/bn_mul.h
+++ b/third_party/openthread/repo/third_party/mbedtls/repo/include/mbedtls/bn_mul.h
@@ -55,12 +55,28 @@
( !defined(__ARMCC_VERSION) || __ARMCC_VERSION >= 6000000 )
/*
+ * GCC < 5.0 treated the x86 ebx (which is used for the GOT) as a
+ * fixed reserved register when building as PIC, leading to errors
+ * like: bn_mul.h:46:13: error: PIC register clobbered by 'ebx' in 'asm'
+ *
+ * This is fixed by an improved register allocator in GCC 5+. From the
+ * release notes:
+ * Register allocation improvements: Reuse of the PIC hard register,
+ * instead of using a fixed register, was implemented on x86/x86-64
+ * targets. This improves generated PIC code performance as more hard
+ * registers can be used.
+ */
+#if defined(__GNUC__) && __GNUC__ < 5 && defined(__PIC__)
+#define MULADDC_CANNOT_USE_EBX
+#endif
+
+/*
* Disable use of the i386 assembly code below if option -O0, to disable all
* compiler optimisations, is passed, detected with __OPTIMIZE__
* This is done as the number of registers used in the assembly code doesn't
* work with the -O0 option.
*/
-#if defined(__i386__) && defined(__OPTIMIZE__)
+#if defined(__i386__) && defined(__OPTIMIZE__) && !defined(MULADDC_CANNOT_USE_EBX)
#define MULADDC_INIT \
asm( \

View File

@@ -0,0 +1,40 @@
From aa706d714294b83db696de2beca9a722a512796f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 19 Apr 2022 14:04:40 -0700
Subject: [PATCH] cmake: Disable nonnull-compare warning on gcc
GCC finds a legit warning which clang does not on code like this
class Message;
void SendResponse(Message & aMessage)
{
if ((&aMessage) != nullptr) { return; }
}
Perhaps it should be fixed upstream but for now disable treating this
warning as error when using gcc
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 59a567e729..3134740ff6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,6 +57,10 @@ endif()
set(CMAKE_CXX_EXTENSIONS OFF)
+if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ add_compile_options(-Wno-error=nonnull-compare)
+endif()
+
if (OTBR_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
message(STATUS "Coverage: ON")
target_compile_options(otbr-config INTERFACE -g -O0 --coverage)
--
2.36.0

View File

@@ -0,0 +1,35 @@
From ed60d4605b81c43b9ba9504a37835109c247c6f8 Mon Sep 17 00:00:00 2001
From: Stefan Schmidt <stefan.schmidt@huawei.com>
Date: Fri, 1 Apr 2022 21:46:03 +0200
Subject: [PATCH] otbr-agent.service.in: remove pre exec hook for mdns service
It uses the service command which is not available in all cases under
Yocto/OE. The upstream project uses this mainly with Ubuntu and Raspian
as testbeds.
In our case we simply ensure that avahi-daemon is installed on the
system inside the recipe.
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com>
---
src/agent/otbr-agent.service.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/agent/otbr-agent.service.in b/src/agent/otbr-agent.service.in
index 8314121347..4c97869def 100644
--- a/src/agent/otbr-agent.service.in
+++ b/src/agent/otbr-agent.service.in
@@ -6,7 +6,7 @@ After=dbus.socket
[Service]
EnvironmentFile=-@CMAKE_INSTALL_FULL_SYSCONFDIR@/default/otbr-agent
-@EXEC_START_PRE@ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/otbr-agent $OTBR_AGENT_OPTS
+ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/otbr-agent $OTBR_AGENT_OPTS
KillMode=mixed
Restart=on-failure
RestartSec=5
--
2.35.1

View File

@@ -0,0 +1,34 @@
mbedtls: Disable documentation warning as error with clang
There are shortcomings with doxygen info which clang-15+ flags, dont
treat them as errors
Remove unused variable
Fixes
library/bignum.c:1395:29: error: variable 't' set but not used [-Werror,-Wunused-but-set-variable]
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/third_party/openthread/repo/third_party/mbedtls/repo/library/bignum.c
+++ b/third_party/openthread/repo/third_party/mbedtls/repo/library/bignum.c
@@ -1544,7 +1544,7 @@ __attribute__ ((noinline))
#endif
void mpi_mul_hlp( size_t i, mbedtls_mpi_uint *s, mbedtls_mpi_uint *d, mbedtls_mpi_uint b )
{
- mbedtls_mpi_uint c = 0, t = 0;
+ mbedtls_mpi_uint c = 0, t __attribute__ ((unused)) = 0;
#if defined(MULADDC_HUIT)
for( ; i >= 8; i -= 8 )
--- a/third_party/openthread/repo/third_party/mbedtls/repo/CMakeLists.txt
+++ b/third_party/openthread/repo/third_party/mbedtls/repo/CMakeLists.txt
@@ -192,7 +192,7 @@ if(CMAKE_COMPILER_IS_GNU)
endif(CMAKE_COMPILER_IS_GNU)
if(CMAKE_COMPILER_IS_CLANG)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wno-error=documentation")
set(CMAKE_C_FLAGS_RELEASE "-O2")
set(CMAKE_C_FLAGS_DEBUG "-O0 -g3")
set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage")

View File

@@ -0,0 +1,10 @@
--- a/third_party/openthread/repo/src/cli/cli.cpp
+++ b/third_party/openthread/repo/src/cli/cli.cpp
@@ -1785,6 +1785,7 @@ template <> otError Interpreter::Process
for (uint8_t i = 0;; i++)
{
+ OT_UNUSED_VARIABLE(i);
SuccessOrExit(otThreadGetNextCacheEntry(GetInstancePtr(), &entry, &iterator));
OutputEidCacheEntry(entry);
}

View File

@@ -0,0 +1,65 @@
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
SUMMARY = "OpenThread Border Router"
SECTION = "net"
LICENSE = "BSD-3-Clause & MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=87109e44b2fda96a8991f27684a7349c \
file://third_party/Simple-web-server/repo/LICENSE;md5=852b3f7f320b19f6431487b8b2fb1d74 \
file://third_party/cJSON/repo/LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0 \
file://third_party/http-parser/repo/LICENSE-MIT;md5=9bfa835d048c194ab30487af8d7b3778 \
file://third_party/openthread/repo/LICENSE;md5=543b6fe90ec5901a683320a36390c65f \
"
DEPENDS = "autoconf-archive dbus readline avahi jsoncpp boost libnetfilter-queue"
SRCREV = "ad6822257ffddbac295db97186e4ab449a2ed32a"
PV = "0.3.0+git${SRCPV}"
SRC_URI = "gitsm://github.com/openthread/ot-br-posix.git;protocol=https;branch=main \
file://0001-otbr-agent.service.in-remove-pre-exec-hook-for-mdns-.patch \
file://0001-cmake-Disable-nonnull-compare-warning-on-gcc.patch \
file://0001-bn_mul.h-fix-x86-PIC-inline-ASM-compilation-with-GCC.patch \
file://mbedtls.patch \
file://unused_var.patch \
"
S = "${WORKDIR}/git"
SYSTEMD_SERVICE:${PN} = "otbr-agent.service"
inherit pkgconfig cmake systemd
# openthread/repo/src/cli/cli.cpp:1786:18: fatal error: variable 'i' set but not used [-Wunused-but-set-variable]
# for (uint8_t i = 0;; i++)
CXXFLAGS:append:libc-musl:toolchain-clang = " -Wno-error=sign-compare -Wno-error=unused-but-set-variable"
EXTRA_OECMAKE = "-DBUILD_TESTING=OFF \
-DOTBR_DBUS=ON \
-DOTBR_REST=ON \
-DOTBR_WEB=OFF \
-DCMAKE_LIBRARY_PATH=${libdir} \
-DOTBR_MDNS=avahi \
-DOTBR_BACKBONE_ROUTER=ON \
-DOTBR_BORDER_ROUTING=ON \
-DOTBR_SRP_ADVERTISING_PROXY=ON \
-DOTBR_BORDER_AGENT=ON \
-DOT_SPINEL_RESET_CONNECTION=ON \
-DOT_TREL=ON \
-DOT_MLR=ON \
-DOT_SRP_SERVER=ON \
-DOT_ECDSA=ON \
-DOT_SERVICE=ON \
-DOTBR_DUA_ROUTING=ON \
-DOT_DUA=ON \
-DOT_BORDER_ROUTING_NAT64=ON \
-DOTBR_DNSSD_DISCOVERY_PROXY=ON \
-DOTBR_INFRA_IF_NAME=eth0 \
-DOTBR_NO_AUTO_ATTACH=1 \
-DOT_REFERENCE_DEVICE=ON \
-DOT_DHCP6_CLIENT=ON \
-DOT_DHCP6_SERVER=ON \
"
RDEPENDS:${PN} = "iproute2 ipset avahi-daemon"
RCONFLICTS:${PN} = "ot-daemon"
FILES:${PN} += "${systemd_unitdir}/*"
FILES:${PN} += "${datadir}/*"

View File

@@ -0,0 +1,68 @@
From c0546e351f6d7ab50eb1de8cef1d0d167760fccc Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <peter@korsgaard.com>
Date: Mon, 27 Aug 2018 22:50:57 +0200
Subject: [PATCH] bn_mul.h: fix x86 PIC inline ASM compilation with GCC < 5
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes #1910
With ebx added to the MULADDC_STOP clobber list to fix #1550, the inline
assembly fails to build with GCC < 5 in PIC mode with the following error:
include/mbedtls/bn_mul.h:46:13: error: PIC register clobbered by ebx in asm
This is because older GCC versions treated the x86 ebx register (which is
used for the GOT) as a fixed reserved register when building as PIC.
This is fixed by an improved register allocator in GCC 5+. From the release
notes:
Register allocation improvements: Reuse of the PIC hard register, instead of
using a fixed register, was implemented on x86/x86-64 targets. This
improves generated PIC code performance as more hard registers can be used.
https://www.gnu.org/software/gcc/gcc-5/changes.html
As a workaround, detect this situation and disable the inline assembly,
similar to the MULADDC_CANNOT_USE_R7 logic.
Upstream-Status: Backport [https://github.com/Mbed-TLS/mbedtls/commit/c0546e351f6d7ab50eb1de8cef1d0d167760fccc]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
library/bn_mul.h | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
--- a/third_party/mbedtls/repo/include/mbedtls/bn_mul.h
+++ b/third_party/mbedtls/repo/include/mbedtls/bn_mul.h
@@ -55,12 +55,28 @@
( !defined(__ARMCC_VERSION) || __ARMCC_VERSION >= 6000000 )
/*
+ * GCC < 5.0 treated the x86 ebx (which is used for the GOT) as a
+ * fixed reserved register when building as PIC, leading to errors
+ * like: bn_mul.h:46:13: error: PIC register clobbered by 'ebx' in 'asm'
+ *
+ * This is fixed by an improved register allocator in GCC 5+. From the
+ * release notes:
+ * Register allocation improvements: Reuse of the PIC hard register,
+ * instead of using a fixed register, was implemented on x86/x86-64
+ * targets. This improves generated PIC code performance as more hard
+ * registers can be used.
+ */
+#if defined(__GNUC__) && __GNUC__ < 5 && defined(__PIC__)
+#define MULADDC_CANNOT_USE_EBX
+#endif
+
+/*
* Disable use of the i386 assembly code below if option -O0, to disable all
* compiler optimisations, is passed, detected with __OPTIMIZE__
* This is done as the number of registers used in the assembly code doesn't
* work with the -O0 option.
*/
-#if defined(__i386__) && defined(__OPTIMIZE__)
+#if defined(__i386__) && defined(__OPTIMIZE__) && !defined(MULADDC_CANNOT_USE_EBX)
#define MULADDC_INIT \
asm( \

View File

@@ -0,0 +1,34 @@
mbedtls: Disable documentation warning as error with clang
There are shortcomings with doxygen info which clang-15+ flags, dont
treat them as errors
Remove unused variable
Fixes
library/bignum.c:1395:29: error: variable 't' set but not used [-Werror,-Wunused-but-set-variable]
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/third_party/mbedtls/repo/library/bignum.c
+++ b/third_party/mbedtls/repo/library/bignum.c
@@ -1544,7 +1544,7 @@ __attribute__ ((noinline))
#endif
void mpi_mul_hlp( size_t i, mbedtls_mpi_uint *s, mbedtls_mpi_uint *d, mbedtls_mpi_uint b )
{
- mbedtls_mpi_uint c = 0, t = 0;
+ mbedtls_mpi_uint c = 0, t __attribute__ ((unused)) = 0;
#if defined(MULADDC_HUIT)
for( ; i >= 8; i -= 8 )
--- a/third_party/mbedtls/repo/CMakeLists.txt
+++ b/third_party/mbedtls/repo/CMakeLists.txt
@@ -192,7 +192,7 @@ if(CMAKE_COMPILER_IS_GNU)
endif(CMAKE_COMPILER_IS_GNU)
if(CMAKE_COMPILER_IS_CLANG)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wno-error=documentation")
set(CMAKE_C_FLAGS_RELEASE "-O2")
set(CMAKE_C_FLAGS_DEBUG "-O0 -g3")
set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage")

View File

@@ -0,0 +1,29 @@
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
SUMMARY = "OpenThread Daemon is an OpenThread POSIX build mode that runs OpenThread as a service."
SECTION = "net"
LICENSE = "BSD-3-Clause & Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=543b6fe90ec5901a683320a36390c65f \
file://third_party/mbedtls/repo/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
"
DEPENDS = "readline"
SRCREV = "7dfde1f12923f03c9680be4d838b94b7a2320324"
PV = "0.1+git${SRCPV}"
SRC_URI = "git://github.com/openthread/openthread.git;protocol=https;branch=main \
file://0001-bn_mul.h-fix-x86-PIC-inline-ASM-compilation-with-GCC.patch \
file://mbedtls.patch \
"
S = "${WORKDIR}/git"
inherit cmake
EXTRA_OECMAKE = "-DOT_DAEMON=ON \
-DOT_SPINEL_RESET_CONNECTION=ON \
-DOT_THREAD_VERSION=1.2 \
-DOT_COVERAGE=OFF \
-DOT_PLATFORM=posix \
-DCMAKE_BUILD_TYPE=Release \
"

View File

@@ -0,0 +1,32 @@
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
SUMMARY = "wpantund, Userspace WPAN Network Daemon"
SECTION = "net"
LICENSE = "Apache-2.0 & MIT & BSL-1.0 & BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e7820bc7f7d1638a6b54fc2e8d7fb103 \
file://third_party/assert-macros/LICENSE;md5=cbf35ecdc8161026afe4da2906fab204 \
file://third_party/boost/LICENSE;md5=e4224ccaecb14d942c71d31bef20d78c \
file://third_party/fgetln/LICENSE;md5=389e03d2254ecad45d0d9bbdefef7129 \
file://third_party/openthread/LICENSE;md5=543b6fe90ec5901a683320a36390c65f \
file://third_party/pt/LICENSE;md5=dcd598b69cad786beea33da7b1ae14b7 \
"
DEPENDS = "autoconf-archive dbus readline boost"
SRCREV = "0fb1f57e4224e2df3e630e146702bfcf63fbf07a"
PV = "0.07.01+git${SRCPV}"
SRC_URI = "gitsm://github.com/openthread/wpantund.git;protocol=https;branch=master \
"
S = "${WORKDIR}/git"
inherit pkgconfig perlnative autotools
# CVE-2020-8916 has been fixed in commit
# 3f108441e23e033b936e85be5b6877dd0a1fbf1c which is included in the SRCREV
# CVE-2021-33889 has been fixed in commit
# a8f3f761f6753b567d1e5ad22cbe6b0ceb6f2649 which is included in the SRCREV
# There has not been a wpantund release as of yet that includes these fixes.
# That means cve-check can not match them. Once a new release comes we can
# remove the ignore statement.
CVE_CHECK_IGNORE = "CVE-2020-8916 CVE-2021-33889"

View File

@@ -0,0 +1,13 @@
SUMMARY = "Easy communication with NetworkManager from Python"
HOMEPAGE = "https://github.com/seveas/python-networkmanager"
LICENSE = "Zlib"
LIC_FILES_CHKSUM = "file://COPYING;md5=9f8a5b5844f027357ab19ef3e3c6a956"
SRC_URI[md5sum] = "7e05d3ca40a4fa50222ba93cda3d0d02"
SRC_URI[sha256sum] = "de6eb921d94aba7549f428ed2b3aa482a5d543ecb6965cbaa0fbb555ab31b9d5"
PYPI_PACKAGE = "python-networkmanager"
inherit pypi setuptools3
RDEPENDS:${PN} = "networkmanager python3-dbus python3-six"

View File

@@ -0,0 +1,40 @@
From e0c690acfcddd3c3421f6eb0182c54815fd70f8f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 14 Jul 2017 23:21:08 -0700
Subject: [PATCH] rdate: define logwtmp on libc != glibc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/rdate.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/rdate.c b/src/rdate.c
index 943d481..685b1b8 100644
--- a/src/rdate.c
+++ b/src/rdate.c
@@ -41,7 +41,22 @@ static int print_mode = 0; // display the time
static int timeout = 10; // timeout for each connection attempt
static char *service = DEFAULT_SERVICE;
+#ifndef __GLIBC__
+static void logwtmp(const char * line, const char * name, const char * host)
+{
+ struct utmp u;
+ memset(&u, 0, sizeof(u));
+
+ u.ut_pid = getpid();
+ u.ut_type = name[0] ? USER_PROCESS : DEAD_PROCESS;
+ strncpy(u.ut_line, line, sizeof(u.ut_line));
+ strncpy(u.ut_name, name, sizeof(u.ut_name));
+ strncpy(u.ut_host, host, sizeof(u.ut_host));
+ gettimeofday(&(u.ut_tv), NULL);
+ updwtmp(_PATH_WTMP, &u);
+}
+#endif /* __GLIBC__ */
// Returns string from address info pointer
static char*
--
2.13.3

View File

@@ -0,0 +1,33 @@
From f58bcb43c31d08de58853b088681cbe4df36cbf9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 26 Jun 2017 22:50:56 -0700
Subject: [PATCH] src/rdate: Fix printf format errors
Fixes
rdate.c:85:41: error: format not a string literal and no format arguments [-Werror=format-security]
| syslog(is_error?LOG_WARNING:LOG_INFO, buf);
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Submitted
src/rdate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rdate.c b/src/rdate.c
index 5c3e829..943d481 100644
--- a/src/rdate.c
+++ b/src/rdate.c
@@ -82,7 +82,7 @@ write_log(int is_error, char *format, ...)
return; /* Error, which we can't report because this _is_ the error
reporting mechanism */
if(log_mode)
- syslog(is_error?LOG_WARNING:LOG_INFO, buf);
+ syslog(is_error?LOG_WARNING:LOG_INFO, "%s", buf);
if(is_error || print_mode)
fprintf(is_error?stderr:stdout, "%s: %s\n", argv0, buf);
}
--
2.13.2

View File

@@ -0,0 +1,21 @@
SUMMARY = "Tool for getting the date/time from a remote machine."
DESCRIPTION = "The rdate utility retrieves the date and time from \
another machine on your network, using the protocol described in RFC 868. \
If you run rdate as root, it will set your machine local time to the \
time of the machine that you queried. \
"
HOMEPAGE= "https://www.aelius.com/njh/rdate/"
SECTION = "Applications/System"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
SRC_URI = "https://www.aelius.com/njh/${BPN}/${BP}.tar.gz \
file://0001-src-rdate-Fix-printf-format-errors.patch \
file://0001-rdate-define-logwtmp-on-libc-glibc.patch \
"
SRC_URI[md5sum] = "0a4f612480777fdf25264ac03c57eae6"
SRC_URI[sha256sum] = "6e800053eaac2b21ff4486ec42f0aca7214941c7e5fceedd593fa0be99b9227d"
inherit autotools

View File

@@ -0,0 +1,75 @@
From 244861e2c9bb9cc44f4bd246964ba850a7cf1216 Mon Sep 17 00:00:00 2001
From: Xin Ouyang <Xin.Ouyang@windriver.com>
Date: Tue, 15 May 2012 15:06:43 +0800
Subject: [PATCH] rdist: bitbake build
Upstream-Status: Inappropriate [OE specific]
---
Makefile.local | 8 ++++----
doc/Makefile.real | 4 +++-
src/Makefile.real | 1 +
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/Makefile.local b/Makefile.local
index 26092b2..389cb84 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -14,7 +14,7 @@
# BIN_DIR variable, you would uncomment the following line
# or add your own line.
#
-#BIN_DIR = /usr/bin
+BIN_DIR = ${DESTDIR}/${bindir}
#
# Add any local definitions you want pass to the compiler to DEFS_LOCAL
@@ -46,13 +46,13 @@ LIBS_LOCAL =
# Set a site specific install program to use. Must support BSD style
# install(1) arguments.
#
-#INSTALL = install
+INSTALL = install
#
# Site specific Man Page configuration.
#
-#MAN_1_DIR = /usr/local/man/man1
-#MAN_8_DIR = /usr/local/man/man8
+MAN_1_DIR = ${DESTDIR}/${mandir}/man1
+MAN_8_DIR = ${DESTDIR}/${mandir}/man8
#MAN_OWNER = bin
#MAN_GROUP = bin
#MAN_MODE = 644
diff --git a/doc/Makefile.real b/doc/Makefile.real
index 42cabec..e32c30b 100644
--- a/doc/Makefile.real
+++ b/doc/Makefile.real
@@ -16,9 +16,11 @@ all:
doc:
-install:
+install: install.man
install.man: rdist.man rdistd.man
+ test -d ${MAN_1_DIR} || ${INSTALL} -d ${MAN_1_DIR}
+ test -d ${MAN_8_DIR} || ${INSTALL} -d ${MAN_8_DIR}
${INSTALL} ${INSTALL_ARGS} rdist.man ${CLIENT_DEST}
${INSTALL} ${INSTALL_ARGS} rdistd.man ${SERVER_DEST}
diff --git a/src/Makefile.real b/src/Makefile.real
index 02179e4..9ec551d 100644
--- a/src/Makefile.real
+++ b/src/Makefile.real
@@ -52,6 +52,7 @@ clean:
$(COMMONOBJS) $(MISSINGOBJS)
install:
+ test -d $(BIN_DIR) || $(INSTALL) -d $(BIN_DIR)
$(INSTALL) ${IN_ARGS} -o $(BIN_OWNER) -m ${RDIST_MODE} \
$(CLIENT_BIN) $(BIN_DIR)/$(CLIENT)
$(INSTALL) ${IN_ARGS} -o ${BIN_OWNER} -m ${RDISTD_MODE} \
--
1.7.5.4

View File

@@ -0,0 +1,147 @@
Upstream-Status: Inappropriate [1]
[1] Not the author, the patch is from:
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
--- rdist-6.1.5/src/gram.y.bison 1998-11-10 05:10:42.000000000 +0100
+++ rdist-6.1.5/src/gram.y 2003-06-04 16:02:19.000000000 +0200
@@ -90,10 +90,10 @@
struct namelist *namel;
}
-%type <optval> OPTION, options
-%type <string> NAME, STRING
-%type <subcmd> INSTALL, NOTIFY, EXCEPT, PATTERN, SPECIAL, CMDSPECIAL, cmdlist, cmd
-%type <namel> namelist, names, opt_namelist nlist
+%type <optval> OPTION options
+%type <string> NAME STRING
+%type <subcmd> INSTALL NOTIFY EXCEPT PATTERN SPECIAL CMDSPECIAL cmdlist cmd
+%type <namel> namelist names opt_namelist nlist
%%
@@ -101,19 +101,19 @@
| file command
;
-command: NAME '=' namelist = {
+command: NAME '=' namelist {
(void) lookup($1, INSERT, $3);
}
- | namelist ARROW namelist cmdlist = {
+ | namelist ARROW namelist cmdlist {
insert((char *)NULL, $1, $3, $4);
}
- | NAME COLON namelist ARROW namelist cmdlist = {
+ | NAME COLON namelist ARROW namelist cmdlist {
insert($1, $3, $5, $6);
}
- | namelist DCOLON NAME cmdlist = {
+ | namelist DCOLON NAME cmdlist {
append((char *)NULL, $1, $3, $4);
}
- | NAME COLON namelist DCOLON NAME cmdlist = {
+ | NAME COLON namelist DCOLON NAME cmdlist {
append($1, $3, $5, $6);
}
| error
@@ -133,10 +133,10 @@
}
;
-nlist: NAME = {
+nlist: NAME {
$$ = makenl($1);
}
- | '(' names ')' = {
+ | '(' names ')' {
$$ = $2;
}
;
@@ -144,7 +144,7 @@
names: /* VOID */ {
$$ = last_n = NULL;
}
- | names NAME = {
+ | names NAME {
if (last_n == NULL)
$$ = last_n = makenl($2);
else {
@@ -158,7 +158,7 @@
cmdlist: /* VOID */ {
$$ = last_sc = NULL;
}
- | cmdlist cmd = {
+ | cmdlist cmd {
if (last_sc == NULL)
$$ = last_sc = $2;
else {
@@ -169,7 +169,7 @@
}
;
-cmd: INSTALL options opt_namelist ';' = {
+cmd: INSTALL options opt_namelist ';' {
register struct namelist *nl;
$1->sc_options = $2 | options;
@@ -185,17 +185,17 @@
}
$$ = $1;
}
- | NOTIFY namelist ';' = {
+ | NOTIFY namelist ';' {
if ($2 != NULL)
$1->sc_args = expand($2, E_VARS);
$$ = $1;
}
- | EXCEPT namelist ';' = {
+ | EXCEPT namelist ';' {
if ($2 != NULL)
$1->sc_args = expand($2, E_ALL);
$$ = $1;
}
- | PATTERN namelist ';' = {
+ | PATTERN namelist ';' {
struct namelist *nl;
char *cp, *re_comp();
@@ -205,13 +205,13 @@
$1->sc_args = expand($2, E_VARS);
$$ = $1;
}
- | SPECIAL opt_namelist STRING ';' = {
+ | SPECIAL opt_namelist STRING ';' {
if ($2 != NULL)
$1->sc_args = expand($2, E_ALL);
$1->sc_name = $3;
$$ = $1;
}
- | CMDSPECIAL opt_namelist STRING ';' = {
+ | CMDSPECIAL opt_namelist STRING ';' {
if ($2 != NULL)
$1->sc_args = expand($2, E_ALL);
$1->sc_name = $3;
@@ -219,18 +219,18 @@
}
;
-options: /* VOID */ = {
+options: /* VOID */ {
$$ = 0;
}
- | options OPTION = {
+ | options OPTION {
$$ |= $2;
}
;
-opt_namelist: /* VOID */ = {
+opt_namelist: /* VOID */ {
$$ = NULL;
}
- | namelist = {
+ | namelist {
$$ = $1;
}
;

View File

@@ -0,0 +1,37 @@
Upstream-Status: Inappropriate [1]
[1] Not the author, the patch is from:
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
--- rdist-6.1.5/src/message.c.thestokes 2006-04-19 17:30:39.000000000 -0400
+++ rdist-6.1.5/src/message.c 2006-04-19 17:36:37.000000000 -0400
@@ -793,15 +793,20 @@
char *msg;
{
static char buf[MSGBUFSIZ];
-
- ++nerrs;
-
- if (isserver)
- (void) sprintf(buf, "REMOTE ERROR: %s", msg);
- else
- (void) sprintf(buf, "LOCAL ERROR: %s", msg);
-
- _message(MT_FERROR, buf);
+ /* Don't reenter this function. There is a nasty infinite recursion
+ case that pops up when msgsndnotify tries to exit. */
+ static int inside=0;
+
+ if(inside==0){
+ ++nerrs;
+ inside=1;
+
+ if (isserver)
+ (void) sprintf(buf, "REMOTE ERROR: %s", msg);
+ else
+ (void) sprintf(buf, "LOCAL ERROR: %s", msg);
+ _message(MT_FERROR, buf);
+ }
exit(nerrs);
}

Some files were not shown because too many files have changed in this diff Show More