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,27 @@
From 38c97e590fde19213f6ba31e72d1c227db869427 Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Sun, 31 Aug 2014 22:28:38 -0700
Subject: [PATCH] aoe-stat.in: no bashism
The checkbashisms shows there is no bashism, so use /bin/sh.
Upstream-Status: Pending
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
aoe-stat.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aoe-stat.in b/aoe-stat.in
index 50e6ac6..0c1d6f5 100755
--- a/aoe-stat.in
+++ b/aoe-stat.in
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /bin/sh
# aoe-stat - collate and present information about AoE storage
# Copyright 2012, CORAID, Inc., and licensed under GPL v.2.
--
1.7.9.5

View File

@@ -0,0 +1,31 @@
Add LDFLAGS variable to Makefile, make sure the extra linker flags can be passed.
Upstream-Status: Pending
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
diff --git a/Makefile b/Makefile
index 0c56ade..79f2e2b 100644
--- a/Makefile
+++ b/Makefile
@@ -68,17 +68,17 @@ clean :
rm -f ${CONF_SCRIPTS} ${AOE_PING_OBJ} ${AOE_CFG_OBJ} ${SANCHECK_OBJ} ${PROGS}
aoeping : ${AOE_PING_OBJ}
- ${CC} ${CFLAGS} -o $@ ${AOE_PING_OBJ}
+ ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${AOE_PING_OBJ}
aoeping.o : aoeping.c dat.h fns.h
${CC} ${CFLAGS} -o $@ -c $<
linux.o : linux.c config.h
${CC} ${CFLAGS} -o $@ -c $<
aoecfg: ${AOE_CFG_OBJ}
- ${CC} ${CFLAGS} -o $@ ${AOE_CFG_OBJ}
+ ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${AOE_CFG_OBJ}
aoecfg.o : aoecfg.c dat.h fns.h
${CC} ${CFLAGS} -o $@ -c $<
aoe-sancheck : ${SANCHECK_OBJ}
- -$(CC) $(CFLAGS) -o $@ ${SANCHECK_OBJ} $(SANCHECKLIBS)
+ -$(CC) $(CFLAGS) ${LDFLAGS} -o $@ ${SANCHECK_OBJ} $(SANCHECKLIBS)
aoe-sancheck.o : aoe-sancheck.c
-$(CC) $(CFLAGS) -o $@ -c $<

View File

@@ -0,0 +1,12 @@
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,8 @@ NPERSHELF=16
CONF_SCRIPTS = aoe-discover aoe-interfaces aoe-mkshelf aoe-revalidate aoe-flush aoe-stat
PROGS = aoeping aoecfg aoe-sancheck
COMMANDS := ${CONF_SCRIPTS} aoe-mkdevs aoe-version coraid-update ${PROGS}
-CFLAGS = -Wall -O -g
+# We could still override this on the command line.
+CFLAGS += -Wall -O -g
SANCHECKLIBS = -lpthread
AOE_PING_OBJ = aoeping.o linux.o

View File

@@ -0,0 +1,27 @@
SUMMARY = "ATA over Ethernet Tools"
DESCRIPTION = " \
The aoetools are programs for users of the ATA over Ethernet (AoE)network \
storage protocol, a simple protocol for using storage over anethernet LAN. \
The vblade program (storage target) exports a blockdevice using AoE. \
"
HOMEPAGE = "http://sourceforge.net/projects/${BPN}"
SECTION = "admin"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
RRECOMMENDS:${PN} = "kernel-module-aoe"
SRC_URI = "http://sourceforge.net/projects/${BPN}/files/${BPN}/${BPN}-${PV}.tar.gz \
file://aoe-stat-no-bashism.patch \
file://makefile-add-ldflags.patch \
file://reproducible-build.patch \
"
SRC_URI[md5sum] = "bff30daa988a65f69d4448ce4726a6db"
SRC_URI[sha256sum] = "fb5e2cd0de7644cc1ec04ee3aeb43211cf7445a0c19e13d6b3ed5a8fbdf215ff"
# EXTRA_OEMAKE is typically: -e MAKEFLAGS=
# the -e causes problems as CFLAGS is modified in the Makefile.
EXTRA_OEMAKE = ""
do_install() {
oe_runmake DESTDIR=${D} install
}

View File

@@ -0,0 +1,61 @@
From a2021f0bc0f029dfa05dcca5db3d2ec77904d41a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 30 Mar 2017 12:33:51 -0700
Subject: [PATCH] Use ARPCFLAGS for package specific compiler flags
This leaves room for setting CFLAGS in environment
which OE uses to pass tweaks
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Makefile | 10 ++++------
extensions/Makefile | 4 ++++
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 62ebdf2..cd06813 100644
--- a/Makefile
+++ b/Makefile
@@ -12,9 +12,7 @@ DESTDIR:=
MANS = arptables-legacy.8 arptables-save.8 arptables-restore.8
-COPT_FLAGS:=-O2
-CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DARPTC_DEBUG
-
+ARPCFLAGS:=-Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\"
ifndef ARPT_LIBDIR
ARPT_LIBDIR:=$(LIBDIR)/arptables
endif
@@ -24,13 +22,13 @@ include extensions/Makefile
all: arptables-legacy libarptc/libarptc.a
arptables.o: arptables.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
arptables-standalone.o: arptables-standalone.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
libarptc/libarptc.o: libarptc/libarptc.c libarptc/libarptc_incl.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
libarptc/libarptc.a: libarptc/libarptc.o
$(AR) rcs $@ $<
diff --git a/extensions/Makefile b/extensions/Makefile
index 0189cc9..e8af782 100644
--- a/extensions/Makefile
+++ b/extensions/Makefile
@@ -5,3 +5,7 @@ EXT_OBJS+=$(foreach T,$(EXT_FUNC), extensions/arpt_$(T).o)
extensions/ebt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h
$(CC) $(CFLAGS) $(PROGSPECS) -c -o $@ $<
+ $(CC) $(CFLAGS) $(ARPCFLAGS) $(PROGSPECS) -c -o $@ $<
+
+extensions/arpt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h
+ $(CC) $(CFLAGS) $(ARPCFLAGS) $(PROGSPECS) -c -o $@ $<
--
2.17.1

View File

@@ -0,0 +1,30 @@
arptables: fix the redefinition of 'arpt_get_target'
Upstream-Status: Pending
This function is already defined as a static inline function in
include/linux/netfilter_arp/arp_tables.h, once GCC uses -O0, the
inline will not work, and the redefinition error will happen
Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
diff --git a/libarptc/libarptc_incl.c b/libarptc/libarptc_incl.c
index 35736db..addd3f9 100644
--- a/libarptc/libarptc_incl.c
+++ b/libarptc/libarptc_incl.c
@@ -11,14 +11,6 @@
/* (C)1999 Paul ``Rusty'' Russell - Placed under the GNU GPL (See
COPYING for details). */
-#ifndef __OPTIMIZE__
-STRUCT_ENTRY_TARGET *
-GET_TARGET(STRUCT_ENTRY *e)
-{
- return (void *)e + e->target_offset;
-}
-#endif
-
static int sockfd = -1;
static void *arptc_fn = NULL;

View File

@@ -0,0 +1,16 @@
[Unit]
Description=Arp filtering arptables
After=network.target
Requires=network.target
[Service]
Type=oneshot
ExecStartPre=/bin/sh -c "mkdir -p /etc/sysconfig; if [ ! -f /etc/sysconfig/arptables ]; then /usr/sbin/arptables-save > /etc/sysconfig/arptables; fi"
ExecStart=/bin/sh -c "/usr/sbin/arptables-restore < /etc/sysconfig/arptables"
ExecStartPost=/bin/sh -c "touch /var/lock/subsys/arptables"
RemainAfterExit=yes
ExecStop=/bin/sh -c "/usr/sbin/arptables-restore < /dev/null"
ExecStopPost=/bin/sh -c "rm -f /var/lock/subsys/arptables"
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,37 @@
SUMMARY = "Administration tool for arp packet filtering"
SECTION = "net"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
SRCREV = "efae8949e31f8b2eb6290f377a28384cecaf105a"
PV = "0.0.5+git${SRCPV}"
SRC_URI = " \
git://git.netfilter.org/arptables;branch=master \
file://0001-Use-ARPCFLAGS-for-package-specific-compiler-flags.patch \
file://arptables-arpt-get-target-fix.patch \
file://arptables.service \
"
SRC_URI[arptables.md5sum] = "1d4ab05761f063b0751645d8f2b8f8e5"
SRC_URI[arptables.sha256sum] = "e529fd465c67d69ad335299a043516e6b38cdcd337a5ed21718413e96073f928"
S = "${WORKDIR}/git"
SYSTEMD_SERVICE:${PN} = "arptables.service"
inherit systemd
EXTRA_OEMAKE = "'BINDIR=${sbindir}' 'MANDIR=${mandir}'"
do_install() {
oe_runmake install DESTDIR=${D}
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/arptables.service ${D}${systemd_unitdir}/system
fi
}
RDEPENDS:${PN} += "perl"
# the install target is not multi-job safe, but it doesn't do much
# so we just install serially
#
PARALLEL_MAKEINST = "-j1"

View File

@@ -0,0 +1,12 @@
DESCRIPTION = "Portable Bandwidth Monitor and rate estimator"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
# only works with libnl-0.5.0
DEPENDS = "libnl libconfuse ncurses"
SRCREV = "1b3f11bde315e221474f7d066ce4efb4ff4d39e3"
SRC_URI = "git://github.com/tgraf/bmon.git;branch=master;protocol=https"
inherit autotools pkgconfig
S = "${WORKDIR}/git"

View File

@@ -0,0 +1,33 @@
From 203801ae47399569868aa468988e711ba3ddfa92 Mon Sep 17 00:00:00 2001
From: Joe MacDonald <joe_macdonald@mentor.com>
Date: Mon, 30 Oct 2017 13:18:20 -0400
Subject: [PATCH] include missing kernel header
Fixes errors like
| /b/kraj/jlinux-next/poky/build/tmp-eglibc/sysroots/re-64b/usr/include/linux/if_bridge.h:172:20: error: field 'ip6' has incomplete type
| In file included from ../libbridge/libbridge.h:24:0,
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
---
libbridge/libbridge.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h
index 962f316..422ec33 100644
--- a/libbridge/libbridge.h
+++ b/libbridge/libbridge.h
@@ -24,6 +24,7 @@
#include <sys/time.h>
#include <netinet/in.h>
+#include <linux/in6.h>
#include <linux/if.h>
#include <linux/if_bridge.h>
--
2.17.1

View File

@@ -0,0 +1,40 @@
From 0c1a66fc62cc321d307c94f962031283142eea69 Mon Sep 17 00:00:00 2001
From: Joe MacDonald <joe_macdonald@mentor.com>
Date: Mon, 30 Oct 2017 13:37:48 -0400
Subject: [PATCH] build: don't ignore CFLAGS from environment
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We need to take them into account so as to behave nicely towards
build environments which expect to be able to set them, e.g. for
optimisation flags, or debug options.
Therefore they need to be added to the compiler command line of
every source file, and in addition, the same CFLAGS that were
used during compilation must also always be used during linking!
Upstream-Status: Pending
Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
---
brctl/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/brctl/Makefile.in b/brctl/Makefile.in
index e1956d6..eff260c 100644
--- a/brctl/Makefile.in
+++ b/brctl/Makefile.in
@@ -34,7 +34,7 @@ install: $(PROGRAMS)
$(INSTALL) -m 755 $(PROGRAMS) $(DESTDIR)$(sbindir)
brctl: $(brctl_OBJECTS) ../libbridge/libbridge.a
- $(CC) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl
+ $(CC) $(CFLAGS) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl
%.o: %.c brctl.h
$(CC) $(CFLAGS) $(INCLUDE) -c $<
--
2.17.1

View File

@@ -0,0 +1,51 @@
From 99264c688ff98d8f0f237cba6c7098eb4d5a12a7 Mon Sep 17 00:00:00 2001
From: Joe MacDonald <joe_macdonald@mentor.com>
Date: Mon, 30 Oct 2017 13:48:33 -0400
Subject: [PATCH] libbridge: Modifying the AR to cross toolchain
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The Makefile uses the host “ar” tool when it should be using the ar from
the target toolchain.
Upstream-Status: Pending
Signed-off-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
---
configure.ac | 4 ++++
libbridge/Makefile.in | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 66817bb..bcc6946 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,6 +12,10 @@ dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB
+AN_MAKEVAR([AR], [AC_PROG_AR])
+AN_PROGRAM([ar], [AC_PROG_AR])
+AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
+AC_PROG_AR
dnl Checks for header files.
AC_HEADER_STDC
diff --git a/libbridge/Makefile.in b/libbridge/Makefile.in
index 7932bfe..bd55e9b 100644
--- a/libbridge/Makefile.in
+++ b/libbridge/Makefile.in
@@ -1,7 +1,7 @@
KERNEL_HEADERS=-I@KERNEL_HEADERS@
-AR=ar
+AR=@AR@
RANLIB=@RANLIB@
CC=@CC@
--
2.17.1

View File

@@ -0,0 +1,149 @@
From 1763c5b7f8f72d651d62337029c3bdfb269491e4 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <sthemmin@microsoft.com>
Date: Fri, 7 Jan 2022 08:44:19 -0800
Subject: [PATCH] cleanup includes
Use IWYU to only include necessary headers.
Should resolve build issues for distros that need limits.h
to find PATH_MAX.
Upstream-Status: Backport
[https://git.kernel.org/pub/scm/network/bridge/bridge-utils.git/commit/?h=main&id=1763c5b7f8f72d651d62337029c3bdfb269491e4]
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
brctl/brctl.c | 1 -
brctl/brctl_cmd.c | 3 ++-
brctl/brctl_disp.c | 1 -
libbridge/libbridge_devif.c | 5 ++++-
libbridge/libbridge_if.c | 5 +----
libbridge/libbridge_init.c | 4 +++-
libbridge/libbridge_misc.c | 5 +----
7 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/brctl/brctl.c b/brctl/brctl.c
index 8855234..d2fa005 100644
--- a/brctl/brctl.c
+++ b/brctl/brctl.c
@@ -17,7 +17,6 @@
*/
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <getopt.h>
diff --git a/brctl/brctl_cmd.c b/brctl/brctl_cmd.c
index 81f7dfa..4167503 100644
--- a/brctl/brctl_cmd.c
+++ b/brctl/brctl_cmd.c
@@ -18,10 +18,11 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#include <sys/time.h>
#include <errno.h>
-#include <asm/param.h>
+
#include "libbridge.h"
#include "brctl.h"
diff --git a/brctl/brctl_disp.c b/brctl/brctl_disp.c
index 3e81241..f6bf2af 100644
--- a/brctl/brctl_disp.c
+++ b/brctl/brctl_disp.c
@@ -17,7 +17,6 @@
*/
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c
index 8b7d954..3aac0f9 100644
--- a/libbridge/libbridge_devif.c
+++ b/libbridge/libbridge_devif.c
@@ -18,12 +18,15 @@
#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <dirent.h>
#include <fcntl.h>
+#include <limits.h>
+
+#include <sys/ioctl.h>
+#include <linux/sockios.h>
#include "libbridge.h"
#include "libbridge_private.h"
diff --git a/libbridge/libbridge_if.c b/libbridge/libbridge_if.c
index 5f3aed1..96dda30 100644
--- a/libbridge/libbridge_if.c
+++ b/libbridge/libbridge_if.c
@@ -16,12 +16,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <stdio.h>
-#include <stdlib.h>
#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
#include <sys/ioctl.h>
+#include <linux/sockios.h>
#include "libbridge.h"
#include "libbridge_private.h"
diff --git a/libbridge/libbridge_init.c b/libbridge/libbridge_init.c
index c914971..d572895 100644
--- a/libbridge/libbridge_init.c
+++ b/libbridge/libbridge_init.c
@@ -16,14 +16,16 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <dirent.h>
-#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <linux/sockios.h>
#include "libbridge.h"
#include "libbridge_private.h"
diff --git a/libbridge/libbridge_misc.c b/libbridge/libbridge_misc.c
index 9379e93..5b146fd 100644
--- a/libbridge/libbridge_misc.c
+++ b/libbridge/libbridge_misc.c
@@ -16,14 +16,11 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/time.h>
#include <asm/param.h>
-#include "libbridge.h"
-#include "libbridge_private.h"
+#include "libbridge.h"
static const char *state_names[5] = {
[BR_STATE_DISABLED] = "disabled",
--
2.17.1

View File

@@ -0,0 +1,36 @@
SUMMARY = "Tools for ethernet bridging"
HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge"
SECTION = "net"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=f9d20a453221a1b7e32ae84694da2c37"
SRCREV = "75d949b9fae9718201422f0bd3d1103e67dd597c"
SRC_URI = "\
git://git.kernel.org/pub/scm/network/bridge/bridge-utils.git;branch=main \
file://0001-include-missing-kernel-header.patch \
file://0002-build-don-t-ignore-CFLAGS-from-environment.patch \
file://0003-libbridge-Modifying-the-AR-to-cross-toolchain.patch \
file://0004-cleanup-includes.patch \
"
S = "${WORKDIR}/git"
DEPENDS = "sysfsutils"
inherit autotools-brokensep update-alternatives
ALTERNATIVE:${PN} = "brctl"
ALTERNATIVE_PRIORITY[brctl] = "100"
ALTERNATIVE_LINK_NAME[brctl] = "${sbindir}/brctl"
EXTRA_OECONF = "--with-linux-headers=${STAGING_INCDIR}"
do_install:append () {
install -d ${D}/${datadir}/bridge-utils
install -d ${D}/${sysconfdir}/network/if-pre-up.d
install -d ${D}/${sysconfdir}/network/if-post-down.d
}
RRECOMMENDS:${PN} = "kernel-module-bridge"

View File

@@ -0,0 +1,39 @@
From 86df4200c9c33d999df0e8cc3c9771f17a297ec4 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Wed, 13 Sep 2017 15:01:54 +0200
Subject: [PATCH] configure.ac: make tools support optional
* add --enable-tools option
* XIPH_PATH_OGG macro is provided by libogg so we cannot call
it without the libogg dependency
Upstream-Status: Pending
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
configure.ac | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index d4b1a3f..7d6b2dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,8 +68,14 @@ AC_MSG_RESULT($has_alloca)
AC_CHECK_HEADERS(sys/soundcard.h sys/audioio.h)
-XIPH_PATH_OGG([tools="tools"], [tools=""])
+AC_ARG_ENABLE(tools, [ --enable-tools Compile ogg tools],
+[if test "$enableval" = yes; then
+ [tools="tools"]
+else
+ [tools=""]
+fi],
AC_SUBST(tools)
+)
AC_CHECK_LIB(m, sin)
--
2.14.1

View File

@@ -0,0 +1,55 @@
From 61fbdddb660c5944ac23b820754a7c4cf4eee097 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 8 Jun 2018 19:29:03 -0700
Subject: [PATCH] tests: Include entcode.c into test sources to provide
definitions of functions e.g. ec_ilog()
Fixes link errors in tests
| /usr/src/debug/celt051/0.5.1.3+gitAUTOINC+5555aae843-r0/git/tests/../libcelt/rangedec.c:202: undefined reference to `ec_ilog'
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
tests/cwrs32-test.c | 1 +
tests/ectest.c | 2 +-
tests/laplace-test.c | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/cwrs32-test.c b/tests/cwrs32-test.c
index 3a95df2..a159ab3 100644
--- a/tests/cwrs32-test.c
+++ b/tests/cwrs32-test.c
@@ -8,6 +8,7 @@
#include "rangeenc.c"
#include "rangedec.c"
#include "cwrs.c"
+#include "entcode.c"
#include <string.h>
#define NMAX (10)
#define MMAX (9)
diff --git a/tests/ectest.c b/tests/ectest.c
index aa35453..94eb9a3 100644
--- a/tests/ectest.c
+++ b/tests/ectest.c
@@ -5,7 +5,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
-#include "entcode.h"
+#include "entcode.c"
#include "entenc.c"
#include "entdec.c"
#include "rangeenc.c"
diff --git a/tests/laplace-test.c b/tests/laplace-test.c
index 3f98ab3..8e1fb4e 100644
--- a/tests/laplace-test.c
+++ b/tests/laplace-test.c
@@ -6,6 +6,7 @@
#include <stdlib.h>
#include "laplace.c"
#include "stack_alloc.h"
+#include "entcode.c"
#include "entenc.c"
#include "entdec.c"
#include "rangeenc.c"

View File

@@ -0,0 +1,33 @@
#
# Copyright (C) 2013 Wind River Systems, Inc.
#
SUMMARY = "The CELT codec is a compression algorithm for audio"
DESCRIPTION = "The CELT codec is a compression algorithm for \
audio. Like MP3, Vorbis, and AAC it is suitable for transmitting music \
with high quality. Unlike these formats CELT imposes very little delay \
on the signal, even less than is typical for speech centric formats \
like Speex, GSM, or G.729."
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=375f60ab360d17f0172737036ff155b2"
PV = "0.5.1.3+git${SRCPV}"
SRCREV = "5555aae843f57241d005e330b9cb65602d56db0f"
SRC_URI = "git://gitlab.xiph.org/xiph/celt.git;branch=compat-v0.5.1;protocol=https \
file://0001-configure.ac-make-tools-support-optional.patch \
file://0001-tests-Include-entcode.c-into-test-sources-to-provide.patch \
"
S = "${WORKDIR}/git"
inherit pkgconfig autotools-brokensep
PACKAGECONFIG:class-native = ""
PACKAGECONFIG ??= ""
PACKAGECONFIG[ogg] = "--enable-tools,--disable-tools,libogg,"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,29 @@
From 11ec10cdb5ab4b94c5999e018a9c854419997761 Mon Sep 17 00:00:00 2001
From: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
Date: Wed, 10 Apr 2019 03:18:17 +0200
Subject: [PATCH] Fix compilation with musl
Fixes:
../hash_intmd5.c:58: undefined reference to `MIN'
Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
---
hash_intmd5.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hash_intmd5.c b/hash_intmd5.c
index 49da1cf..47efe4c 100644
--- a/hash_intmd5.c
+++ b/hash_intmd5.c
@@ -33,6 +33,8 @@
#include "md5.c"
+#include <sys/param.h>
+
static MD5_CTX ctx;
int
--
2.17.1

View File

@@ -0,0 +1,90 @@
From 28b9f115e36e2133301b02fa02ad71a8efbed9b9 Mon Sep 17 00:00:00 2001
From: Joe Slater <jslater@windriver.com>
Date: Thu, 9 Mar 2017 10:58:06 -0800
Subject: [PATCH] chrony: fix build failure for arma9
Eliminate references to syscalls not available
for ARM_EABI. Also add a dependency on libseccomp
which is needed for scfilter to work.
Set PACKAGECONFIG to not enable scfilter, since
kernel CONFIG_SECCOMP is unlikely to be set. This
aligns the usage of libseccomp with that of other packages.
Upstream-Status: Pending
Signed-off-by: Joe Slater <jslater@windriver.com>
Refresh patch for new upstream version.
Signed-off-by: Robert Joslyn <robert.joslyn@redrectangle.org>
Refreshed for 4.0
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
sys_linux.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/sys_linux.c b/sys_linux.c
index f2baab1..14a9241 100644
--- a/sys_linux.c
+++ b/sys_linux.c
@@ -484,7 +484,6 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
#endif
SCMP_SYS(gettimeofday),
SCMP_SYS(settimeofday),
- SCMP_SYS(time),
/* Process */
SCMP_SYS(clone),
@@ -494,7 +493,6 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
SCMP_SYS(exit),
SCMP_SYS(exit_group),
SCMP_SYS(getpid),
- SCMP_SYS(getrlimit),
SCMP_SYS(getuid),
SCMP_SYS(getuid32),
#ifdef __NR_rseq
@@ -511,7 +509,6 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
/* Memory */
SCMP_SYS(brk),
SCMP_SYS(madvise),
- SCMP_SYS(mmap),
SCMP_SYS(mmap2),
SCMP_SYS(mprotect),
SCMP_SYS(mremap),
@@ -571,8 +568,6 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
SCMP_SYS(sendmsg),
SCMP_SYS(sendto),
SCMP_SYS(shutdown),
- /* TODO: check socketcall arguments */
- SCMP_SYS(socketcall),
/* General I/O */
SCMP_SYS(_newselect),
@@ -596,7 +591,6 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
#ifdef __NR_futex_time64
SCMP_SYS(futex_time64),
#endif
- SCMP_SYS(select),
SCMP_SYS(set_robust_list),
SCMP_SYS(write),
@@ -604,6 +598,15 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
SCMP_SYS(getrandom),
SCMP_SYS(sysinfo),
SCMP_SYS(uname),
+ /* not always available */
+#if ! defined(__ARM_EABI__)
+ SCMP_SYS(time),
+ SCMP_SYS(getrlimit),
+ SCMP_SYS(select),
+ SCMP_SYS(mmap),
+ /* TODO: check socketcall arguments */
+ SCMP_SYS(socketcall),
+#endif
};
const int denied_any[] = {

View File

@@ -0,0 +1,51 @@
# Load config files matching the /etc/chrony/conf.d/*.conf pattern.
confdir /etc/chrony/conf.d
# Use public NTP servers from the pool.ntp.org project.
# Please consider joining the pool project if possible by running your own
# server(s).
# If you are a vendor distributing a product using chrony, you *MUST*
# read and comply with http://www.pool.ntp.org/vendors.html
pool 0.openembedded.pool.ntp.org iburst
# Use a local timeserver in preference to the pool, if it's reachable.
#server 192.168.22.22 iburst minpoll 2 prefer
# Sync to pulse-per-second from an onboard GPS.
#refclock PPS /dev/pps0 poll 0 prefer
# You'll want to enable CONFIG_PPS and CONFIG_PPS_CLIENT_GPIO in your kernel,
# and an entry something like this in your device tree:
# pps {
# compatible = "pps-gpio";
# gpios = <&ps7_gpio_0 56 0>;
# };
# Load source files matching the /etc/chrony/sources.d/*.sources pattern.
# These can be reloaded using 'chronyc reload sources'.
sourcedir /etc/chrony/sources.d
# In first three updates step the system clock instead of slew
# if the adjustment is larger than 1 second.
makestep 1.0 3
# Record the rate at which the system clock gains/loses time,
# improving accuracy after reboot
driftfile /var/lib/chrony/drift
# Enable kernel synchronization of the hardware real-time clock (RTC).
rtcsync
# Allow NTP client access from local network.
#allow 192.168/16
# Serve time even if not synchronized to any NTP server.
#local stratum 10
# Specify file containing keys for NTP authentication.
#keyfile /etc/chrony.keys
# Specify directory for log files.
logdir /var/log/chrony
# Select which information is logged.
#log measurements statistics tracking

View File

@@ -0,0 +1,58 @@
#! /bin/sh
# System V init script for chrony
# Adapted from the script already in meta-networking for ntpd
### BEGIN INIT INFO
# Provides: chrony
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Start chrony time daemon
### END INIT INFO
PATH=/sbin:/bin:/usr/bin:/usr/sbin
DAEMON=/usr/sbin/chronyd
PIDFILE=/run/chrony/chronyd.pid
test -x $DAEMON -a -r /etc/chrony.conf || exit 0
# Source function library.
. /etc/init.d/functions
# Functions to do individual actions
startdaemon(){
echo -n "Starting chronyd: "
start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- "$@"
echo "done"
}
stopdaemon(){
echo -n "Stopping chronyd: "
start-stop-daemon --stop --quiet --oknodo -p $PIDFILE
echo "done"
}
case "$1" in
start)
startdaemon
;;
stop)
stopdaemon
;;
force-reload | restart | reload)
stopdaemon
startdaemon
;;
status)
status /usr/sbin/chronyd;
exit $?
;;
*)
echo "Usage: chronyd { start | stop | status | restart | reload }" >&2
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,140 @@
SUMMARY = "Versatile implementation of the Network Time Protocol"
DESCRIPTION = "Chrony can synchronize the system clock with NTP \
servers, reference clocks (e.g. GPS receiver), and manual input using \
wristwatch and keyboard. It can also operate as an NTPv4 (RFC 5905) \
server and peer to provide a time service to other computers in the \
network. \
\
It is designed to perform well in a wide range of conditions, \
including intermittent network connections, heavily congested \
networks, changing temperatures (ordinary computer clocks are \
sensitive to temperature), and systems that do not run continuously, or \
run on a virtual machine. \
\
Typical accuracy between two machines on a LAN is in tens, or a few \
hundreds, of microseconds; over the Internet, accuracy is typically \
within a few milliseconds. With a good hardware reference clock \
sub-microsecond accuracy is possible. \
\
Two programs are included in chrony: chronyd is a daemon that can be \
started at boot time and chronyc is a command-line interface program \
which can be used to monitor chronyd's performance and to change \
various operating parameters whilst it is running. \
\
This recipe produces two binary packages: 'chrony' which contains chronyd, \
the configuration file and the init script, and 'chronyc' which contains \
the client program only."
HOMEPAGE = "https://chrony.tuxfamily.org/"
SECTION = "net"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
SRC_URI = "https://download.tuxfamily.org/chrony/chrony-${PV}.tar.gz \
file://chrony.conf \
file://chronyd \
file://arm_eabi.patch \
"
SRC_URI:append:libc-musl = " \
file://0001-Fix-compilation-with-musl.patch \
"
SRC_URI[sha256sum] = "9d0da889a865f089a5a21610ffb6713e3c9438ce303a63b49c2fb6eaff5b8804"
DEPENDS = "pps-tools"
# Note: Despite being built via './configure; make; make install',
# chrony does not use GNU Autotools.
inherit update-rc.d systemd pkgconfig
# Add chronyd user if privdrop packageconfig is selected
inherit ${@bb.utils.contains('PACKAGECONFIG', 'privdrop', 'useradd', '', d)}
USERADD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', '${PN}', '', d)}"
USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', '--system -d / -M --shell /bin/nologin chronyd;', '', d)}"
# Configuration options:
# - Security-related:
# - 'sechash' is omitted by default because it pulls in nss which is huge.
# - 'privdrop' allows chronyd to run as non-root; would need changes to
# chrony.conf and init script.
# - 'scfilter' enables support for system call filtering, but requires the
# kernel to have CONFIG_SECCOMP enabled.
PACKAGECONFIG ??= "editline \
${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
"
PACKAGECONFIG[editline] = ",--without-editline,libedit"
PACKAGECONFIG[sechash] = "--without-tomcrypt,--disable-sechash,nss"
PACKAGECONFIG[privdrop] = ",--disable-privdrop,libcap"
PACKAGECONFIG[scfilter] = "--enable-scfilter,--without-seccomp,libseccomp"
PACKAGECONFIG[ipv6] = ",--disable-ipv6,"
# --disable-static isn't supported by chrony's configure script.
DISABLE_STATIC = ""
do_configure() {
./configure --sysconfdir=${sysconfdir} --bindir=${bindir} --sbindir=${sbindir} \
--localstatedir=${localstatedir} --datarootdir=${datadir} \
--with-ntp-era=$(shell date -d '1970-01-01 00:00:00+00:00' +'%s') \
--with-pidfile=/run/chrony/chronyd.pid \
--chronyrundir=/run/chrony \
--host-system=Linux \
${PACKAGECONFIG_CONFARGS}
}
do_install() {
# Binaries
install -d ${D}${bindir}
install -m 0755 ${S}/chronyc ${D}${bindir}
install -d ${D}${sbindir}
install -m 0755 ${S}/chronyd ${D}${sbindir}
# Config file
install -d ${D}${sysconfdir}
install -m 644 ${WORKDIR}/chrony.conf ${D}${sysconfdir}
if ${@bb.utils.contains('PACKAGECONFIG', 'privdrop', 'true', 'false', d)}; then
echo "# Define user to drop to after dropping root privileges" >> ${D}${sysconfdir}/chrony.conf
echo "user chronyd" >> ${D}${sysconfdir}/chrony.conf
fi
# System V init script
install -d ${D}${sysconfdir}/init.d
install -m 755 ${WORKDIR}/chronyd ${D}${sysconfdir}/init.d
# systemd unit configuration file
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${S}/examples/chronyd.service ${D}${systemd_unitdir}/system/
# Variable data (for drift and/or rtc file)
install -d ${D}${localstatedir}/lib/chrony
# Fix hard-coded paths in config files and init scripts
sed -i -e 's!/var/!${localstatedir}/!g' -e 's!/etc/!${sysconfdir}/!g' \
-e 's!/usr/sbin/!${sbindir}/!g' -e 's!/usr/bin/!${bindir}/!g' \
${D}${sysconfdir}/chrony.conf \
${D}${sysconfdir}/init.d/chronyd \
${D}${systemd_unitdir}/system/chronyd.service
sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/chronyd
sed -i 's!^EnvironmentFile=.*!EnvironmentFile=-${sysconfdir}/default/chronyd!' ${D}${systemd_unitdir}/system/chronyd.service
install -d ${D}${sysconfdir}/tmpfiles.d
echo "d /var/lib/chrony 0755 root root -" > ${D}${sysconfdir}/tmpfiles.d/chronyd.conf
}
FILES:${PN} = "${sbindir}/chronyd ${sysconfdir} ${localstatedir}/lib/chrony ${localstatedir}"
CONFFILES:${PN} = "${sysconfdir}/chrony.conf"
INITSCRIPT_NAME = "chronyd"
INITSCRIPT_PARAMS = "defaults"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE:${PN} = "chronyd.service"
# It's probably a bad idea to run chrony and another time daemon on
# the same system. systemd includes the SNTP client 'timesyncd', which
# will be disabled by chronyd.service, however it will remain on the rootfs
# wasting 150 kB unless you put 'PACKAGECONFIG:remove:pn-systemd = "timesyncd"'
# in a conf file or bbappend somewhere.
RCONFLICTS:${PN} = "ntp ntimed"
# Separate the client program into its own package
PACKAGES =+ "chronyc"
FILES:chronyc = "${bindir}/chronyc"

View File

@@ -0,0 +1,44 @@
DESCRIPTION = "A a package of utilities for doing and managing mounts of the Linux CIFS filesystem."
HOMEPAGE = "http://wiki.samba.org/index.php/LinuxCIFS_utils"
SECTION = "otherosfs"
LICENSE = "GPL-3.0-only & LGPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRCREV = "316522036133d44ed02cd39ed2748e2b59c85b30"
SRC_URI = "git://git.samba.org/cifs-utils.git;branch=master"
S = "${WORKDIR}/git"
DEPENDS += "libtalloc"
PACKAGECONFIG ??= ""
PACKAGECONFIG[cap] = "--with-libcap,--without-libcap,libcap"
# when enabled, it creates ${bindir}/cifscreds and --ignore-fail-on-non-empty in do_install:append is needed
PACKAGECONFIG[cifscreds] = "--enable-cifscreds,--disable-cifscreds,keyutils"
# when enabled, it creates ${sbindir}/cifs.upcall and --ignore-fail-on-non-empty in do_install:append is needed
PACKAGECONFIG[cifsupcall] = "--enable-cifsupcall,--disable-cifsupcall,krb5 libtalloc keyutils"
PACKAGECONFIG[cifsidmap] = "--enable-cifsidmap,--disable-cifsidmap,keyutils samba"
PACKAGECONFIG[cifsacl] = "--enable-cifsacl,--disable-cifsacl,samba"
PACKAGECONFIG[pam] = "--enable-pam --with-pamdir=${base_libdir}/security,--disable-pam,libpam keyutils"
inherit autotools pkgconfig
do_configure:prepend() {
# want installed to /usr/sbin rather than /sbin to be DISTRO_FEATURES usrmerge compliant
# must override ROOTSBINDIR (default '/sbin'),
# setting --exec-prefix or --prefix in EXTRA_OECONF does not work
if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then
export ROOTSBINDIR=${sbindir}
fi
}
do_install:append() {
if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','false','true',d)}; then
# Remove empty /usr/bin and /usr/sbin directories since the mount helper
# is installed to /sbin
rmdir --ignore-fail-on-non-empty ${D}${bindir} ${D}${sbindir}
fi
}
FILES:${PN} += "${base_libdir}/security"
FILES:${PN}-dbg += "${base_libdir}/security/.debug"
RRECOMMENDS:${PN} = "kernel-module-cifs"

View File

@@ -0,0 +1,20 @@
require cim-schema.inc
SECTION = "doc"
LICENSE = "DMTF"
SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2400/cim_schema_${PV}Final-Doc.zip;subdir=${BP} \
file://LICENSE \
"
SRC_URI[md5sum] = "3d01940bc1085c6c42184c25fb61f739"
SRC_URI[sha256sum] = "3174cf0f8657b19d80dc59e184778d8e553da424728cb2966fe9d5428dd84267"
LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4"
do_install() {
install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV}-docs
cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${datadir}/doc/cim-schema-${PV}-docs
}
FILES:${PN} = "${datadir}/doc/*"
FILES:${PN}-doc = ""

View File

@@ -0,0 +1,29 @@
require cim-schema.inc
LICENSE = "DMTF"
RCONFLICTS:${PN} = "cim-schema-final"
SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2500/cim_schema_${PV}Experimental-MOFs.zip;subdir=${BPN}-${PV} \
file://LICENSE \
"
SRC_URI[md5sum] = "ee4ad6441a2b65ca60a3abc53e3ec629"
SRC_URI[sha256sum] = "a44d67881325e267ef46b72eabe0c69f90470b1033b1ce7c26d9ba99072adb50"
LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4"
do_install() {
install -d -m 0755 ${D}${datadir}/mof/cimv${PV}/
install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV}
install -m 644 ${WORKDIR}/LICENSE ${D}${datadir}/doc/cim-schema-${PV}
cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${datadir}/mof/cimv${PV}/
chown -R root:root ${D}${datadir}/mof/cimv${PV}
for i in `find ${D}${datadir}/mof/cimv${PV} -name "*.mof"`; do
sed -i -e 's/\r//g' $i
done
ln -s cimv${PV} ${D}${datadir}/mof/cim-current
ln -s cim_schema_${PV}.mof ${D}${datadir}/mof/cim-current/CIM_Schema.mof
}
FILES:${PN} = "${datadir}/mof/* ${datadir}/doc/*"
FILES:${PN}-doc = ""

View File

@@ -0,0 +1,29 @@
require cim-schema.inc
LICENSE = "DMTF"
RCONFLICTS:${PN} = "cim-schema-exper"
SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2400/cim_schema_${PV}Final-MOFs.zip;subdir=${BP} \
file://LICENSE \
"
SRC_URI[md5sum] = "a9bdf17c7374e3b5b7adeaac4842c4ad"
SRC_URI[sha256sum] = "dbfa3064ea427acd71a4bebbc172ca2dc44b0b09a6d83b0945b9ffa988a9058a"
LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4"
do_install() {
install -d -m 0755 ${D}${datadir}/mof/cimv${PV}/
install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV}
install -m 644 ${WORKDIR}/LICENSE ${D}${datadir}/doc/cim-schema-${PV}
cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${datadir}/mof/cimv${PV}/
chown -R root:root ${D}${datadir}/mof/cimv${PV}/
for i in `find ${D}${datadir}/mof/cimv${PV} -name "*.mof"`; do
sed -i -e 's/\r//g' $i
done
ln -s cimv${PV} ${D}${datadir}/mof/cim-current
ln -s cim_schema_${PV}.mof ${D}${datadir}/mof/cim-current/CIM_Schema.mof
}
FILES:${PN} = "${datadir}/mof/* ${datadir}/doc/*"
FILES:${PN}-doc = ""

View File

@@ -0,0 +1,9 @@
SUMMARY = "Common Information Model (CIM) Schema"
DESCRIPTION = "Common Information Model (CIM) is a model for describing overall\
management information in a network or enterprise environment. CIM\
consists of a specification and a schema. The specification defines the\
details for integration with other management models. The schema\
provides the actual model descriptions."
HOMEPAGE = "http://www.dmtf.org/"
SECTION = "libs"

View File

@@ -0,0 +1,34 @@
// Copyright 1998-2008 Distributed Management Task Force, Inc. (DMTF).
// All rights reserved.
// DMTF is a not-for-profit association of industry members dedicated
// to promoting enterprise and systems management and interoperability.
// DMTF specifications and documents may be reproduced by
// members and non-members, provided that correct attribution is given.
// As DMTF specifications may be revised from time to time,
// the particular version and release date should always be noted.
//
// Implementation of certain elements of this standard or proposed
// standard may be subject to third party patent rights, including
// provisional patent rights (herein "patent rights"). DMTF makes
// no representations to users of the standard as to the existence
// of such rights, and is not responsible to recognize, disclose, or
// identify any or all such third party patent right, owners or
// claimants, nor for any incomplete or inaccurate identification or
// disclosure of such rights, owners or claimants. DMTF shall have no
// liability to any party, in any manner or circumstance, under any
// legal theory whatsoever, for failure to recognize, disclose, or
// identify any such third party patent rights, or for such party's
// reliance on the standard or incorporation thereof in its product,
// protocols or testing procedures. DMTF shall have no liability to
// any party implementing such standard, whether such implementation
// is foreseeable or not, nor to any patent owner or claimant, and shall
// have no liability or responsibility for costs or losses incurred if
// a standard is withdrawn or modified after publication, and shall be
// indemnified and held harmless by any party implementing the
// standard from any and all claims of infringement by a patent owner
// for such implementations.
//
// For information about patents held by third-parties which have
// notified the DMTF that, in their opinion, such patent may relate to
// or impact implementations of DMTF standards, visit
// http://www.dmtf.org/about/policies/disclosures.php.

View File

@@ -0,0 +1,40 @@
From d6eee2d52f31e034f9d84d38a749d86a63d5b769 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 22 May 2023 20:37:47 -0700
Subject: [PATCH] curlpp-config.in: Remove references to absolute buildpaths
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
extras/curlpp-config.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/extras/curlpp-config.in b/extras/curlpp-config.in
index b0bd964..1416b94 100644
--- a/extras/curlpp-config.in
+++ b/extras/curlpp-config.in
@@ -43,7 +43,7 @@ while test $# -gt 0; do
case "$1" in
--cc)
- echo @CC@
+ curl-config --cc
;;
--prefix)
@@ -73,10 +73,10 @@ while test $# -gt 0; do
;;
--libs)
- echo -L@libdir@ @LDFLAGS@ @LIBS@ `curl-config --libs` -lcurlpp
+ echo `curl-config --libs` -lcurlpp
;;
--static-libs)
- echo @libdir_static@/libcurlpp.@libext@ @LDFLAGS@ @LIBS@ `curl-config --static-libs`
+ echo $prefix/@libdir_static@/libcurlpp.@libext@ `curl-config --static-libs`
;;
*)
--
2.40.1

View File

@@ -0,0 +1,26 @@
SUMMARY = "C++ library for client-side URL transfers"
HOMEPAGE = "http://www.curlpp.org/"
SECTION = "libdevel"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=fd0c9adf285a69aa3b4faf34384e1029"
DEPENDS = "curl"
DEPENDS:class-native = "curl-native"
SRC_URI = "git://github.com/jpbarrette/curlpp.git;branch=master;protocol=https \
file://0001-curlpp-config.in-Remove-references-to-absolute-build.patch"
SRCREV = "592552a165cc569dac7674cb7fc9de3dc829906f"
S = "${WORKDIR}/git"
inherit cmake pkgconfig binconfig
BBCLASSEXTEND = "native nativesdk"
do_install:append() {
sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \
-e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \
-e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \
-i ${D}${libdir}/pkgconfig/*.pc
}

View File

@@ -0,0 +1,31 @@
From be1b3d2d0f1608cba5efee73d6aac5ad0709041b Mon Sep 17 00:00:00 2001
From: Joe MacDonald <joe_macdonald@mentor.com>
Date: Tue, 9 Sep 2014 10:24:58 -0400
Subject: [PATCH] Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 73ea23e..ed3eeb9 100644
--- a/Makefile
+++ b/Makefile
@@ -60,8 +60,8 @@ idn2_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LIBIDN2 $(PKG_CONFI
idn2_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LIBIDN2 $(PKG_CONFIG) --libs libidn2`
ct_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --cflags libnetfilter_conntrack`
ct_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --libs libnetfilter_conntrack`
-lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua5.2`
-lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.2`
+lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua`
+lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua`
nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --cflags 'nettle hogweed' \
HAVE_CRYPTOHASH $(PKG_CONFIG) --cflags nettle \
HAVE_NETTLEHASH $(PKG_CONFIG) --cflags nettle`
--
2.9.5

View File

@@ -0,0 +1,131 @@
SUMMARY = "Lightweight, easy to configure DNS forwarder and DHCP server"
HOMEPAGE = "http://www.thekelleys.org.uk/dnsmasq/doc.html"
SECTION = "net"
# GPLv3 was added in version 2.41 as license option
LICENSE = "GPL-2.0-only | GPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING-v3;md5=d32239bcb673463ab874e80d47fae504 \
"
DEPENDS += "gettext-native"
#at least versions 2.69 and prior are moved to the archive folder on the server
SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getVar('PV').split('.')[1]) > 69]}dnsmasq-${PV}.tar.gz \
file://lua.patch \
file://init \
file://dnsmasq.conf \
file://dnsmasq-resolvconf.service \
file://dnsmasq-noresolvconf.service \
file://dnsmasq-resolved.conf \
file://CVE-2023-28450.patch \
"
SRC_URI[sha256sum] = "8651373d000cae23776256e83dcaa6723dee72c06a39362700344e0c12c4e7e4"
inherit pkgconfig update-rc.d systemd
INITSCRIPT_NAME = "dnsmasq"
INITSCRIPT_PARAMS = "defaults"
# dnsmasq defaults
PACKAGECONFIG ?= "auth dhcp dhcp6 dumpfile inotify ipset loop script tftp"
PACKAGECONFIG[auth] = "-DHAVE_AUTH,-DNO_AUTH"
PACKAGECONFIG[broken-rtc] = "-DHAVE_BROKEN_RTC,"
PACKAGECONFIG[conntrack] = "-DHAVE_CONNTRACK,,libnetfilter-conntrack"
PACKAGECONFIG[dbus] = "-DHAVE_DBUS,,dbus"
PACKAGECONFIG[dhcp] = "-DHAVE_DHCP,-DNO_DHCP"
PACKAGECONFIG[dhcp6] = "-DHAVE_DHCP6,-DNO_DHCP6"
PACKAGECONFIG[dnssec] = "-DHAVE_DNSSEC,,nettle"
PACKAGECONFIG[dumpfile] = "-DHAVE_DUMPFILE,-DNO_DUMPFILE"
PACKAGECONFIG[idn] = "-DHAVE_LIBIDN,,libidn,,,idn2"
PACKAGECONFIG[idn2] = "-DHAVE_LIBIDN2,,libidn2,,,idn"
PACKAGECONFIG[inotify] = "-DHAVE_INOTIFY,-DNO_INOTIFY"
PACKAGECONFIG[ipset] = "-DHAVE_IPSET,-DNO_IPSET"
PACKAGECONFIG[loop] = "-DHAVE_LOOP,-DNO_LOOP"
PACKAGECONFIG[lua] = "-DHAVE_LUASCRIPT -DHAVE_SCRIPT,,lua"
PACKAGECONFIG[nftset] = "-DHAVE_NFTSET,,nftables"
PACKAGECONFIG[no-gmp] = "-DNO_GMP,"
PACKAGECONFIG[no-id] = "-DNO_ID,"
PACKAGECONFIG[resolvconf] = ",,,resolvconf"
PACKAGECONFIG[script] = "-DHAVE_SCRIPT,-DNO_SCRIPT"
PACKAGECONFIG[tftp] = "-DHAVE_TFTP,-DNO_TFTP"
PACKAGECONFIG[ubus] = "-DHAVE_UBUS,,ubus"
DNSMASQ_LEASEFILE ?= "${localstatedir}/lib/misc/dnsmasq.leases"
DNSMASQ_CONFFILE ?= "${sysconfdir}/dnsmasq.conf"
DNSMASQ_RESOLVFILE ?= "${sysconfdir}/resolv.conf"
COPTS = "${PACKAGECONFIG_CONFARGS} \
-DLEASEFILE=\"${DNSMASQ_LEASEFILE}\" \
-DCONFFILE=\"${DNSMASQ_CONFFILE}\" \
-DRESOLVFILE=\"${DNSMASQ_RESOLVFILE}\" \
-DLOCALEDIR=\"${localedir}\""
EXTRA_OEMAKE = "\
'COPTS=${COPTS}' \
'CFLAGS=${CFLAGS}' \
'LDFLAGS=${LDFLAGS}' \
"
SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'resolvconf', 'file://dnsmasq.resolvconf file://99_dnsmasq file://dnsmasq-resolvconf-helper', '', d)}"
do_compile () {
oe_runmake all-i18n
if ${@bb.utils.contains_any('PACKAGECONFIG', ['dhcp', 'dhcp6'], 'true', 'false', d)}; then
# build dhcp_release
oe_runmake -C ${S}/contrib/lease-tools
fi
}
do_install () {
oe_runmake "PREFIX=${D}${prefix}" \
"BINDIR=${D}${bindir}" \
"MANDIR=${D}${mandir}" \
install-i18n
install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d ${D}${sysconfdir}/dnsmasq.d
install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/
install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq
install -d ${D}${systemd_unitdir}/system
if [ "${@bb.utils.filter('PACKAGECONFIG', 'resolvconf', d)}" ]; then
install -m 0644 ${WORKDIR}/dnsmasq-resolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service
else
install -m 0644 ${WORKDIR}/dnsmasq-noresolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service
fi
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
install -d ${D}${sysconfdir}/systemd/resolved.conf.d/
install -m 0644 ${WORKDIR}/dnsmasq-resolved.conf ${D}${sysconfdir}/systemd/resolved.conf.d/
fi
if [ "${@bb.utils.filter('PACKAGECONFIG', 'dhcp', d)}" ]; then
install -m 0755 ${S}/contrib/lease-tools/dhcp_release ${D}${bindir}
install -m 0755 ${S}/contrib/lease-tools/dhcp_lease_time ${D}${bindir}
fi
if [ "${@bb.utils.filter('PACKAGECONFIG', 'dhcp6', d)}" ]; then
install -m 0755 ${S}/contrib/lease-tools/dhcp_release6 ${D}${bindir}
fi
if [ "${@bb.utils.filter('PACKAGECONFIG', 'dbus', d)}" ]; then
install -d ${D}${sysconfdir}/dbus-1/system.d
install -m 644 dbus/dnsmasq.conf ${D}${sysconfdir}/dbus-1/system.d/
fi
if [ "${@bb.utils.filter('PACKAGECONFIG', 'resolvconf', d)}" ]; then
install -d ${D}${sysconfdir}/resolvconf/update.d/
install -m 0755 ${WORKDIR}/dnsmasq.resolvconf ${D}${sysconfdir}/resolvconf/update.d/dnsmasq
install -d ${D}${sysconfdir}/default/volatiles
install -m 0644 ${WORKDIR}/99_dnsmasq ${D}${sysconfdir}/default/volatiles
install -m 0755 ${WORKDIR}/dnsmasq-resolvconf-helper ${D}${bindir}
fi
}
CONFFILES:${PN} = "${sysconfdir}/dnsmasq.conf"
RPROVIDES:${PN} += "${PN}-systemd"
RREPLACES:${PN} += "${PN}-systemd"
RCONFLICTS:${PN} += "${PN}-systemd"
SYSTEMD_SERVICE:${PN} = "dnsmasq.service"

View File

@@ -0,0 +1 @@
d root root 0755 /run/dnsmasq none

View File

@@ -0,0 +1,48 @@
From eb92fb32b746f2104b0f370b5b295bb8dd4bd5e5 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk>
Date: Tue, 7 Mar 2023 22:07:46 +0000
Subject: [PATCH] Set the default maximum DNS UDP packet size to 1232.
http://www.dnsflagday.net/2020/ refers.
Thanks to Xiang Li for the prompt.
CVE: CVE-2023-28450
Upstream-Status: Backport [https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=eb92fb32b746f2104b0f370b5b295bb8dd4bd5e5]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
man/dnsmasq.8 | 3 ++-
src/config.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/man/dnsmasq.8 b/man/dnsmasq.8
index 41e2e04..5acb935 100644
--- a/man/dnsmasq.8
+++ b/man/dnsmasq.8
@@ -183,7 +183,8 @@ to zero completely disables DNS function, leaving only DHCP and/or TFTP.
.TP
.B \-P, --edns-packet-max=<size>
Specify the largest EDNS.0 UDP packet which is supported by the DNS
-forwarder. Defaults to 4096, which is the RFC5625-recommended size.
+forwarder. Defaults to 1232, which is the recommended size following the
+DNS flag day in 2020. Only increase if you know what you are doing.
.TP
.B \-Q, --query-port=<query_port>
Send outbound DNS queries from, and listen for their replies on, the
diff --git a/src/config.h b/src/config.h
index 1e7b30f..37b374e 100644
--- a/src/config.h
+++ b/src/config.h
@@ -19,7 +19,7 @@
#define CHILD_LIFETIME 150 /* secs 'till terminated (RFC1035 suggests > 120s) */
#define TCP_MAX_QUERIES 100 /* Maximum number of queries per incoming TCP connection */
#define TCP_BACKLOG 32 /* kernel backlog limit for TCP connections */
-#define EDNS_PKTSZ 4096 /* default max EDNS.0 UDP packet from RFC5625 */
+#define EDNS_PKTSZ 1232 /* default max EDNS.0 UDP packet from from /dnsflagday.net/2020 */
#define SAFE_PKTSZ 1232 /* "go anywhere" UDP packet size, see https://dnsflagday.net/2020/ */
#define KEYBLOCK_LEN 40 /* choose to minimise fragmentation when storing DNSSEC keys */
#define DNSSEC_WORK 50 /* Max number of queries to validate one question */
--
2.20.1

View File

@@ -0,0 +1,15 @@
[Unit]
Description=DNS forwarder and DHCP server
After=network.target
[Service]
Type=forking
PIDFile=/run/dnsmasq.pid
ExecStartPre=/usr/bin/dnsmasq --test
ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid -7 /etc/dnsmasq.d --local-service
ExecStop=/bin/kill $MAINPID
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,62 @@
#!/bin/bash
#
# Borrowing heavily from the dnsmasq initscript's version of support for
# resolvconf, intended for use in systemd-only configurations.
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/dnsmasq
NAME=dnsmasq
# Most configuration options in /etc/default/dnsmasq are deprecated
# but still honoured.
if [ -r /etc/default/$NAME ]; then
. /etc/default/$NAME
fi
start_resolvconf()
{
# If interface "lo" is explicitly disabled in /etc/default/dnsmasq
# Then dnsmasq won't be providing local DNS, so don't add it to
# the resolvconf server set.
for interface in $DNSMASQ_EXCEPT
do
[ $interface = lo ] && return
done
if [ -x /sbin/resolvconf ] ; then
echo "nameserver 127.0.0.1" |
/sbin/resolvconf -a lo.$NAME
fi
return 0
}
stop_resolvconf()
{
if [ -x /sbin/resolvconf ] ; then
/sbin/resolvconf -d lo.$NAME
fi
return 0
}
case "$1" in
start)
start_resolvconf
exit 0
;;
stop)
stop_resolvconf
exit 0
;;
restart)
stop_resolvconf
start_resolvconf
exit 0
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|restart}" >&2
exit 3
;;
esac
exit 0

View File

@@ -0,0 +1,17 @@
[Unit]
Description=DNS forwarder and DHCP server
After=network.target
[Service]
Type=forking
PIDFile=/run/dnsmasq.pid
ExecStartPre=/usr/bin/dnsmasq --test
ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid -7 /etc/dnsmasq.d --local-service
ExecStartPost=/usr/bin/dnsmasq-resolvconf-helper start
ExecStop=/usr/bin/dnsmasq-resolvconf-helper stop
ExecStop=/bin/kill $MAINPID
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,3 @@
# Avoid conflicts between dnsmasq and systemd-resolved about port 53
[Resolve]
DNSStubListener=no

View File

@@ -0,0 +1,298 @@
# Configuration file for dnsmasq.
#
# Format is one option per line, legal options are the same
# as the long options legal on the command line. See
# "/usr/bin/dnsmasq --help" or "man 8 dnsmasq" for details.
# Listen on this specific port instead of the standard DNS port
# (53). Setting this to zero completely disables DNS function,
# leaving only DHCP and/or TFTP.
#port=5353
# Change these lines if you want dnsmasq to serve MX records.
# Only one of mx-host and mx-target need be set, the other defaults
# to the name of the host running dnsmasq.
#mx-host=
#mx-target=
#selfmx
#localmx
# The following two options make you a better netizen, since they
# tell dnsmasq to filter out queries which the public DNS cannot
# answer, and which load the servers (especially the root servers)
# uneccessarily. If you have a dial-on-demand link they also stop
# these requests from bringing up the link uneccessarily.
# Never forward plain names (with a dot or domain part)
domain-needed
# Never forward addresses in the non-routed address spaces.
bogus-priv
# Uncomment this to filter useless windows-originated DNS requests
# which can trigger dial-on-demand links needlessly.
# Note that (amongst other things) this blocks all SRV requests,
# so don't use it if you use eg Kerberos.
#filterwin2k
# Change this line if you want dns to get its upstream servers from
# somewhere other that /etc/resolv.conf
#resolv-file=
# By default, dnsmasq will send queries to any of the upstream
# servers it knows about and tries to favour servers to are known
# to be up. Uncommenting this forces dnsmasq to try each query
# with each server strictly in the order they appear in
# /etc/resolv.conf
#strict-order
# If you don't want dnsmasq to read /etc/resolv.conf or any other
# file, getting its servers for this file instead (see below), then
# uncomment this
#no-resolv
# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv
# files for changes and re-read them then uncomment this.
#no-poll
# Add other name servers here, with domain specs if they are for
# non-public domains.
#server=/localnet/192.168.0.1
# Add local-only domains here, queries in these domains are answered
# from /etc/hosts or DHCP only.
#local=/localnet/
# Add domains which you want to force to an IP address here.
# The example below send any host in doubleclick.net to a local
# webserver.
#address=/doubleclick.net/127.0.0.1
# You no longer (as of version 1.7) need to set these to enable
# dnsmasq to read /etc/ppp/resolv.conf since dnsmasq now uses the
# "dip" group to achieve this.
#user=
#group=
# If you want dnsmasq to listen for requests only on specified interfaces
# (and the loopback) give the name of the interface (eg eth0) here.
# Repeat the line for more than one interface.
#interface=
# Or you can specify which interface _not_ to listen on
#except-interface=
# Or which to listen on by address (remember to include 127.0.0.1 if
# you use this.)
#listen-address=127.0.0.1
# On systems which support it, dnsmasq binds the wildcard address,
# even when it is listening on only some interfaces. It then discards
# requests that it shouldn't reply to. This has the advantage of
# working even when interfaces come and go and change address. If you
# want dnsmasq to really bind only the interfaces it is listening on,
# uncomment this option. About the only time you may need this is when
# running another nameserver on the same machine.
#bind-interfaces
# If you don't want dnsmasq to read /etc/hosts, uncomment the
# following line.
#no-hosts
# or if you want it to read another file, as well as /etc/hosts, use
# this.
#addn-hosts=/etc/banner_add_hosts
# Set this (and domain: see below) if you want to have a domain
# automatically added to simple names in a hosts-file.
#expand-hosts
# Set the domain for dnsmasq. this is optional, but if it is set, it
# does the following things.
# 1) Allows DHCP hosts to have fully qualified domain names, as long
# as the domain part matches this setting.
# 2) Sets the "domain" DHCP option thereby potentially setting the
# domain of all systems configured by DHCP
# 3) Provides the domain part for "expand-hosts"
#domain=thekelleys.org.uk
# Uncomment this to enable the integrated DHCP server, you need
# to supply the range of addresses available for lease and optionally
# a lease time. If you have more than one network, you will need to
# repeat this for each network on which you want to supply DHCP
# service.
#dhcp-range=192.168.0.50,192.168.0.150,12h
#dhcp-range=10.0.0.10,10.0.0.200,2h
# This is an example of a DHCP range where the netmask is given. This
# is needed for networks we reach the dnsmasq DHCP server via a relay
# agent. If you don't know what a DHCP relay agent is, you probably
# don't need to worry about this.
#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h
# This is an example of a DHCP range with a network-id, so that
# some DHCP options may be set only for this network.
#dhcp-range=red,192.168.0.50,192.168.0.150
# Supply parameters for specified hosts using DHCP. There are lots
# of valid alternatives, so we will give examples of each. Note that
# IP addresses DO NOT have to be in the range given above, they just
# need to be on the same network. The order of the parameters in these
# do not matter, it's permissble to give name,adddress and MAC in any order
# Always allocate the host with ethernet address 11:22:33:44:55:66
# The IP address 192.168.0.60
#dhcp-host=11:22:33:44:55:66,192.168.0.60
# Always set the name of the host with hardware address
# 11:22:33:44:55:66 to be "fred"
#dhcp-host=11:22:33:44:55:66,fred
# Always give the host with ethernet address 11:22:33:44:55:66
# the name fred and IP address 192.168.0.60 and lease time 45 minutes
#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m
# Give the machine which says it's name is "bert" IP address
# 192.168.0.70 and an infinite lease
#dhcp-host=bert,192.168.0.70,infinite
# Always give the host with client identifier 01:02:02:04
# the IP address 192.168.0.60
#dhcp-host=id:01:02:02:04,192.168.0.60
# Always give the host with client identifier "marjorie"
# the IP address 192.168.0.60
#dhcp-host=id:marjorie,192.168.0.60
# Enable the address given for "judge" in /etc/hosts
# to be given to a machine presenting the name "judge" when
# it asks for a DHCP lease.
#dhcp-host=judge
# Never offer DHCP service to a machine whose ethernet
# address is 11:22:33:44:55:66
#dhcp-host=11:22:33:44:55:66,ignore
# Ignore any client-id presented by the machine with ethernet
# address 11:22:33:44:55:66. This is useful to prevent a machine
# being treated differently when running under different OS's or
# between PXE boot and OS boot.
#dhcp-host=11:22:33:44:55:66,id:*
# Send extra options which are tagged as "red" to
# the machine with ethernet address 11:22:33:44:55:66
#dhcp-host=11:22:33:44:55:66,net:red
# Send extra options which are tagged as "red" to any machine whose
# DHCP vendorclass string includes the substring "Linux"
#dhcp-vendorclass=red,Linux
# Send extra options which are tagged as "red" to any machine one
# of whose DHCP userclass strings includes the substring "accounts"
#dhcp-userclass=red,accounts
# If this line is uncommented, dnsmasq will read /etc/ethers and act
# on the ethernet-address/IP pairs found there just as if they had
# been given as --dhcp-host options. Useful if you keep
# MAC-address/host mappings there for other purposes.
#read-ethers
# Send options to hosts which ask for a DHCP lease.
# See RFC 2132 for details of available options.
# Note that all the common settings, such as netmask and
# broadcast address, DNS server and default route, are given
# sane defaults by dnsmasq. You very likely will not need any
# any dhcp-options. If you use Windows clients and Samba, there
# are some options which are recommended, they are detailed at the
# end of this section.
# For reference, the common options are:
# subnet mask - 1
# default router - 3
# DNS server - 6
# broadcast address - 28
# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5
#dhcp-option=42,192.168.0.4,10.10.0.5
# Set the NTP time server address to be the same machine as
# is running dnsmasq
#dhcp-option=42,0.0.0.0
# Set the NIS domain name to "welly"
#dhcp-option=40,welly
# Set the default time-to-live to 50
#dhcp-option=23,50
# Set the "all subnets are local" flag
#dhcp-option=27,1
# Send the etherboot magic flag and then etherboot options (a string).
#dhcp-option=128,e4:45:74:68:00:00
#dhcp-option=129,NIC=eepro100
# Specify an option which will only be sent to the "red" network
# (see dhcp-range for the declaration of the "red" network)
#dhcp-option=red,42,192.168.1.1
# The following DHCP options set up dnsmasq in the same way as is specified
# for the ISC dhcpcd in
# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt
# adapted for a typical dnsmasq installation where the host running
# dnsmasq is also the host running samba.
# you may want to uncomment them if you use Windows clients and Samba.
#dhcp-option=19,0 # option ip-forwarding off
#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s)
#dhcp-option=45,0.0.0.0 # netbios datagram distribution server
#dhcp-option=46,8 # netbios node type
#dhcp-option=47 # empty netbios scope.
# Set the boot filename and tftpd server name and address
# for BOOTP. You will only need this is you want to
# boot machines over the network.
#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3
# Set the limit on DHCP leases, the default is 150
#dhcp-lease-max=150
# The DHCP server needs somewhere on disk to keep its lease database.
# This defaults to a sane location, but if you want to change it, use
# the line below.
#dhcp-leasefile=/var/lib/misc/dnsmasq.leases
# Set the cachesize here.
#cache-size=150
# If you want to disable negative caching, uncomment this.
#no-negcache
# Normally responses which come form /etc/hosts and the DHCP lease
# file have Time-To-Live set as zero, which conventionally means
# do not cache further. If you are happy to trade lower load on the
# server for potentially stale date, you can set a time-to-live (in
# seconds) here.
#local-ttl=
# If you want dnsmasq to detect attempts by Verisign to send queries
# to unregistered .com and .net hosts to its sitefinder service and
# have dnsmasq instead return the correct NXDOMAIN response, uncomment
# this line. You can add similar lines to do the same for other
# registries which have implemented wildcard A records.
#bogus-nxdomain=64.94.110.11
# If you want to fix up DNS results from upstream servers, use the
# alias option. This only works for IPv4.
# This alias makes a result of 1.2.3.4 appear as 5.6.7.8
#alias=1.2.3.4,5.6.7.8
# and this maps 1.2.3.x to 5.6.7.x
#alias=1.2.3.0,5.6.7.0,255.255.255.0
# For debugging purposes, log each DNS query as it passes through
# dnsmasq.
#log-queries
# Include a another lot of configuration options.
#conf-file=/etc/dnsmasq.more.conf

View File

@@ -0,0 +1,84 @@
#!/bin/sh
#
# Script to update the resolver list for dnsmasq
#
# N.B. Resolvconf may run us even if dnsmasq is not (yet) running.
# If dnsmasq is installed then we go ahead and update the resolver list
# in case dnsmasq is started later.
#
# Assumption: On entry, PWD contains the resolv.conf-type files.
#
# This file is part of the dnsmasq package.
#
set -e
RUN_DIR="/run/dnsmasq"
RSLVRLIST_FILE="${RUN_DIR}/resolv.conf"
TMP_FILE="${RSLVRLIST_FILE}_new.$$"
MY_NAME_FOR_RESOLVCONF="dnsmasq"
[ -x /usr/bin/dnsmasq ] || exit 0
[ -x /lib/resolvconf/list-records ] || exit 1
PATH=/bin:/sbin
report_err() { echo "$0: Error: $*" >&2 ; }
# Stores arguments (minus duplicates) in RSLT, separated by spaces
# Doesn't work properly if an argument itself contains whitespace
uniquify()
{
RSLT=""
while [ "$1" ] ; do
for E in $RSLT ; do
[ "$1" = "$E" ] && { shift ; continue 2 ; }
done
RSLT="${RSLT:+$RSLT }$1"
shift
done
}
if [ ! -d "$RUN_DIR" ] && ! mkdir --parents --mode=0755 "$RUN_DIR" ; then
report_err "Failed trying to create directory $RUN_DIR"
exit 1
fi
RSLVCNFFILES=""
for F in $(/lib/resolvconf/list-records --after "lo.$MY_NAME_FOR_RESOLVCONF") ; do
case "$F" in
"lo.$MY_NAME_FOR_RESOLVCONF")
# Omit own record
;;
lo.*)
# Include no more records after one for a local nameserver
RSLVCNFFILES="${RSLVCNFFILES:+$RSLVCNFFILES }$F"
break
;;
*)
RSLVCNFFILES="${RSLVCNFFILES:+$RSLVCNFFILES }$F"
;;
esac
done
NMSRVRS=""
if [ "$RSLVCNFFILES" ] ; then
uniquify $(sed -n -e 's/^[[:space:]]*nameserver[[:space:]]\+//p' $RSLVCNFFILES)
NMSRVRS="$RSLT"
fi
# Dnsmasq uses the mtime of $RSLVRLIST_FILE, with a resolution of one second,
# to detect changes in the file. This means that if a resolvconf update occurs
# within one second of the previous one then dnsmasq may fail to notice the
# more recent change. To work around this problem we sleep one second here
# if necessary in order to ensure that the new mtime is different.
if [ -f "$RSLVRLIST_FILE" ] && [ "$(stat -c %X "$RSLVRLIST_FILE")" = "$(date +%s)" ] ; then
sleep 1
fi
clean_up() { rm -f "$TMP_FILE" ; }
trap clean_up EXIT
: >| "$TMP_FILE"
for N in $NMSRVRS ; do echo "nameserver $N" >> "$TMP_FILE" ; done
mv -f "$TMP_FILE" "$RSLVRLIST_FILE"

View File

@@ -0,0 +1,117 @@
#!/bin/sh
DAEMON=/usr/bin/dnsmasq
NAME=dnsmasq
DESC="DNS forwarder and DHCP server"
ARGS="-7 /etc/dnsmasq.d"
test -f $DAEMON || exit 0
set -e
if [ -r /etc/default/$NAME ]
then
. /etc/default/$NAME
fi
DNSMASQ_CONF="/etc/dnsmasq.conf"
test "/etc/dnsmasq.d/*" != '/etc/dnsmasq.d/*' && DNSMASQ_CONF="${DNSMASQ_CONF} /etc/dnsmasq.d/*"
test -z "${PIDFILE}" && PIDFILE="/run/dnsmasq.pid"
if [ -z "$IGNORE_RESOLVCONF" ]
then
egrep -h -q '^no-resolv' ${DNSMASQ_CONF} && IGNORE_RESOLVCONF="yes"
fi
# RESOLV_CONF:
# If the resolvconf package is installed then use the resolv conf file
# that it provides as the default. Otherwise use /etc/resolv.conf as
# the default.
#
# If IGNORE_RESOLVCONF is set in /etc/default/dnsmasq or an explicit
# filename is set there then this inhibits the use of the resolvconf-provided
# information.
#
# Note that if the resolvconf package is installed it is not possible to
# override it just by configuration in /etc/dnsmasq.conf, it is necessary
# to set IGNORE_RESOLVCONF=yes in /etc/default/dnsmasq.
test -z "$RESOLV_CONF" -a "$IGNORE_RESOLVCONF" != "yes" -a -x /sbin/resolvconf && \
RESOLV_CONF=/run/dnsmasq/resolv.conf
start_resolvconf()
{
if [ "$IGNORE_RESOLVCONF" != "yes" -a -x /sbin/resolvconf ]
then
echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.$NAME
fi
:
}
stop_resolvconf()
{
if [ "$IGNORE_RESOLVCONF" != "yes" -a -x /sbin/resolvconf ]
then
/sbin/resolvconf -d lo.$NAME
fi
:
}
case "$1" in
start)
echo -n "starting $DESC: $NAME... "
test -d /var/lib/misc/ || mkdir /var/lib/misc/
start-stop-daemon -S -x $DAEMON -- $ARGS \
${RESOLV_CONF:+ -r $RESOLV_CONF} \
${PIDFILE:+ -x $PIDFILE}
test $? -eq 0 && start_resolvconf
echo "done."
;;
stop)
echo -n "stopping $DESC: $NAME... "
stop_resolvconf
start-stop-daemon -K -x $DAEMON
echo "done."
;;
status)
echo -n "dnsmasq "
start-stop-daemon -q -K -t -x $DAEMON
RET=$?
if [ "$RET" = "0" ]; then
PID=`cat ${PIDFILE}`
echo "($PID) is running"
else
echo "is not running"
exit $RET
fi
;;
restart)
echo "restarting $DESC: $NAME... "
$0 stop
$0 start
echo "done."
;;
reload)
echo -n "reloading $DESC: $NAME... "
killall -HUP $(basename ${DAEMON})
echo "done."
;;
systemd-start-resolvconf)
start_resolvconf
;;
systemd-stop-resolvconf)
stop_resolvconf
;;
systemd-exec)
test -d /var/lib/misc/ || mkdir /var/lib/misc/
exec $DAEMON --keep-in-foreground $ARGS \
${RESOLV_CONF:+ -r $RESOLV_CONF} \
${PIDFILE:+ -x $PIDFILE}
;;
*)
echo "Usage: $0 {start|stop|status|restart|reload}"
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,73 @@
From 07150f3a27681e034f18ab2ed2b68914c1e10af6 Mon Sep 17 00:00:00 2001
From: Li xin <lixin.fnst@cn.fujitsu.com>
Date: Sat, 18 Jul 2015 05:03:57 +0900
Subject: [PATCH] configure.ac: convert AC_TRY_RUN to AC_TRY_LINK statements
This is not completely safe, but it's the least invasive fix.
Upstream-Status: Pending
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
---
m4/glibc.m4 | 6 ++----
m4/ioloop.m4 | 9 +++------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/m4/glibc.m4 b/m4/glibc.m4
index 5d722aa..ce088d3 100644
--- a/m4/glibc.m4
+++ b/m4/glibc.m4
@@ -17,7 +17,7 @@ AC_DEFUN([DOVECOT_GLIBC], [
dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
dnl * It may also be broken in AIX.
AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
- AC_TRY_RUN([
+ AC_TRY_LINK([
#define _XOPEN_SOURCE 600
#include <stdio.h>
#include <stdlib.h>
@@ -26,7 +26,7 @@ AC_DEFUN([DOVECOT_GLIBC], [
#if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
possibly broken posix_fallocate
#endif
- int main() {
+ ], [
int fd = creat("conftest.temp", 0600);
int ret;
if (fd == -1) {
@@ -35,8 +35,6 @@ AC_DEFUN([DOVECOT_GLIBC], [
}
ret = posix_fallocate(fd, 1024, 1024) < 0 ? 1 : 0;
unlink("conftest.temp");
- return ret;
- }
], [
i_cv_posix_fallocate_works=yes
], [
diff --git a/m4/ioloop.m4 b/m4/ioloop.m4
index 0f7dde0..f40fd62 100644
--- a/m4/ioloop.m4
+++ b/m4/ioloop.m4
@@ -4,13 +4,10 @@ AC_DEFUN([DOVECOT_IOLOOP], [
if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then
AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[
- AC_TRY_RUN([
+ AC_TRY_LINK([
#include <sys/epoll.h>
-
- int main()
- {
- return epoll_create(5) < 1;
- }
+ ], [
+ epoll_create(5) < 1;
], [
i_cv_epoll_works=yes
], [
--
2.25.1

View File

@@ -0,0 +1,30 @@
From 6c0ff65f782ad38130b18e4ecb1538d9a8633684 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 29 May 2021 14:32:17 -0700
Subject: [PATCH] m4: Check for libunwind instead of libunwind-generic
libunwind-generic is specific to nongnu libunwind, when using llvm
libunwind this fails, so poking for libunwind make it generic
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
m4/want_unwind.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/m4/want_unwind.m4 b/m4/want_unwind.m4
index cadb62b..5517314 100644
--- a/m4/want_unwind.m4
+++ b/m4/want_unwind.m4
@@ -2,7 +2,7 @@ AC_DEFUN([DOVECOT_WANT_UNWIND], [
have_libunwind=no
AS_IF([test "$want_libunwind" != "no"], [
PKG_CHECK_EXISTS([libunwind], [
- PKG_CHECK_MODULES([LIBUNWIND], [libunwind-generic],[
+ PKG_CHECK_MODULES([LIBUNWIND], [libunwind],[
have_libunwind=yes
AC_DEFINE([HAVE_LIBUNWIND],,[Define this if you have libunwind])
])
--
2.31.1

View File

@@ -0,0 +1,26 @@
From 8c7d143ff28441c8b74b0f518dd2281239aede3d Mon Sep 17 00:00:00 2001
From: Wang Mingyu <wangmy@cn.fujitsu.com>
Date: Fri, 15 Jan 2021 11:10:22 +0900
Subject: [PATCH] not check pandoc
Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
---
m4/dovecot.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/m4/dovecot.m4 b/m4/dovecot.m4
index 2b5d895..ece8489 100644
--- a/m4/dovecot.m4
+++ b/m4/dovecot.m4
@@ -447,7 +447,7 @@ AC_DEFUN([DC_PANDOC], [
dnl Optional tool for making documentation
AC_CHECK_PROGS(PANDOC, [pandoc], [true])
- AS_IF([test "$PANDOC" = "true"], [
+ AS_IF([test "$PANDOC" = "false"], [
AS_IF([test ! -e README], [
AC_MSG_ERROR([Cannot produce documentation without pandoc - disable with PANDOC=false ./configure])
])
--
2.25.1

View File

@@ -0,0 +1,14 @@
[Unit]
Description=Dovecot IMAP/POP3 email server
After=local-fs.target network.target
[Service]
Type=simple
EnvironmentFile=-@SYSCONFDIR@/sysconfig/dovecot
ExecStart=@SBINDIR@/dovecot -F
ExecReload=/bin/kill -HUP $MAINPID
NonBlocking=yes
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,14 @@
[Unit]
Description=Dovecot IMAP/POP3 email server activation socket
[Socket]
#dovecot expects separate IPv4 and IPv6 sockets
BindIPv6Only=ipv6-only
ListenStream=0.0.0.0:143
ListenStream=[::]:143
ListenStream=0.0.0.0:993
ListenStream=[::]:993
KeepAlive=true
[Install]
WantedBy=sockets.target

View File

@@ -0,0 +1,77 @@
SUMMARY = "Dovecot is an open source IMAP and POP3 email server"
HOMEPAGE = "https://www.dovecot.org/"
DESCRIPTION = "Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It's fast, simple to set up, requires no special administration and it uses very little memory."
SECTION = "mail"
LICENSE = "LGPL-2.1-only & MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=2956560272e5b31d9d64f03111732048"
SRC_URI = "http://dovecot.org/releases/2.3/dovecot-${PV}.tar.gz \
file://0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch \
file://dovecot.service \
file://dovecot.socket \
file://0001-not-check-pandoc.patch \
file://0001-m4-Check-for-libunwind-instead-of-libunwind-generic.patch \
"
SRC_URI[md5sum] = "2f03532cec3280ae45a101a7a55ccef5"
SRC_URI[sha256sum] = "c8b3d7f3af1e558a3ff0f970309d4013a4d3ce136f8c02a53a3b05f345b9a34a"
DEPENDS = "openssl xz zlib bzip2 libcap icu libtirpc bison-native"
CFLAGS += "-I${STAGING_INCDIR}/tirpc"
LDFLAGS += "-ltirpc"
inherit autotools pkgconfig systemd useradd gettext
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam', d)}"
PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
PACKAGECONFIG[ldap] = "--with-ldap=plugin,--without-ldap,openldap,"
PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
# From native build in armv7a-hf/eglibc
CACHED_CONFIGUREVARS += "i_cv_signed_size_t=no \
i_cv_gmtime_max_time_t=32 \
i_cv_signed_time_t=yes \
i_cv_mmap_plays_with_write=yes \
i_cv_fd_passing=yes \
i_cv_c99_vsnprintf=yes \
lib_cv___va_copy=yes \
lib_cv_va_copy=yes \
lib_cv_va_val_copy=yes \
"
# hardcode epoll() to avoid running unsafe tests
# BSD needs kqueue and uclibc poll()
EXTRA_OECONF = " --with-ioloop=epoll \
--with-systemdsystemunitdir=${systemd_unitdir}/system"
# Uses hidden symbols
# libssl_iostream_openssl.so: undefined reference to `ssl_iostream_handshake'
LTO = ""
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE:${PN} = "dovecot.service dovecot.socket"
SYSTEMD_AUTO_ENABLE = "disable"
do_install:append () {
install -d 755 ${D}/etc/dovecot
touch 644 ${D}/etc/dovecot/dovecot.conf
install -m 0644 ${WORKDIR}/dovecot.service ${D}${systemd_unitdir}/system
sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service
sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/dovecot.service
}
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "-r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovecot dovecot; \
-r -d ${libexecdir} -M -s ${base_sbindir}/nologin -g dovenull dovenull"
GROUPADD_PARAM:${PN} = "-f -r dovecot;-f -r dovenull"
FILES:${PN} += "${libdir}/dovecot/*plugin.so \
${libdir}/dovecot/libfs_compress.so \
${libdir}/dovecot/libssl_iostream_openssl.so"
FILES:${PN}-staticdev += "${libdir}/dovecot/*/*.a"
FILES:${PN}-dev += "${libdir}/dovecot/libdovecot*.so"
FILES:${PN}-dbg += "${libdir}/dovecot/*/.debug"
# CVE-2016-4983 affects only postinstall script on specific distribution
CVE_CHECK_IGNORE += "CVE-2016-4983"

View File

@@ -0,0 +1,204 @@
From 69011c7227ad1aaf08d5ab28e46f85dac951c597 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 21 Apr 2022 17:22:35 +0800
Subject: [PATCH] drbd-utils: support usermerge
Upstream-Status: Inappropriate [oe-specific]
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
---
configure.ac | 2 +-
scripts/Makefile.in | 10 +++++-----
scripts/drbd-demote-or-escalate@.service | 2 +-
scripts/drbd-promote@.service | 4 ++--
scripts/drbd-wait-promotable@.service | 2 +-
scripts/drbd.service | 6 +++---
scripts/drbd@.service | 6 +++---
scripts/ocf.ra@.service | 4 ++--
user/v83/Makefile.in | 14 +++++++-------
user/v84/Makefile.in | 14 +++++++-------
10 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/configure.ac b/configure.ac
index ae575586..3d7deeae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,7 +180,7 @@ AC_ARG_WITH(tmpfilesdir,
AC_SUBST(tmpfilesdir)
# set default early
-default_udevdir=/lib/udev
+default_udevdir=${prefix}/lib/udev
if test x"$with_udev" = x || \
test x"$with_udev" = xyes ; then
if test x"$PKG_CONFIG" != x; then
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index fcd298e9..bab441a5 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -88,11 +88,11 @@ ifeq ($(subst both,systemd,$(initscripttype)),systemd)
install -d $(DESTDIR)$(systemdunitdir)
install -m 644 drbd.service $(DESTDIR)$(systemdunitdir)/
install -m 644 $(SYSTEMD_TEMPLATES) $(DESTDIR)$(systemdunitdir)/
- install -d $(DESTDIR)/lib/drbd/scripts
- install -m 755 drbd $(DESTDIR)/lib/drbd/scripts
- install -m 755 drbd-service-shim.sh $(DESTDIR)/lib/drbd/scripts
- install -m 755 drbd-wait-promotable.sh $(DESTDIR)/lib/drbd/scripts
- install -m 755 ocf.ra.wrapper.sh $(DESTDIR)/lib/drbd/scripts
+ install -d $(DESTDIR)/${nonarch_libdir}/drbd/scripts
+ install -m 755 drbd $(DESTDIR)/${nonarch_libdir}/drbd/scripts
+ install -m 755 drbd-service-shim.sh $(DESTDIR)/${nonarch_libdir}/drbd/scripts
+ install -m 755 drbd-wait-promotable.sh $(DESTDIR)/${nonarch_libdir}/drbd/scripts
+ install -m 755 ocf.ra.wrapper.sh $(DESTDIR)/${nonarch_libdir}/drbd/scripts
install -d $(DESTDIR)$(tmpfilesdir)/
install -m 444 drbd.tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/drbd.conf
endif
diff --git a/scripts/drbd-demote-or-escalate@.service b/scripts/drbd-demote-or-escalate@.service
index 20932238..8b5ce4a2 100644
--- a/scripts/drbd-demote-or-escalate@.service
+++ b/scripts/drbd-demote-or-escalate@.service
@@ -28,5 +28,5 @@ TimeoutSec=60
# "Type=forking" would be an option to have it retry a number of times,
# and then only escalate to FailureAction if that did not help.
Type=oneshot
-ExecStart=/lib/drbd/scripts/drbd-service-shim.sh secondary-or-escalate %I
+ExecStart=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh secondary-or-escalate %I
ExecStopPost=-/bin/journalctl --sync
diff --git a/scripts/drbd-promote@.service b/scripts/drbd-promote@.service
index 71345d9b..678e0703 100644
--- a/scripts/drbd-promote@.service
+++ b/scripts/drbd-promote@.service
@@ -24,5 +24,5 @@ RemainAfterExit=yes
# (ab)using systemd features
# if we cannot configure and promote, that's a condition, not a failure
# See the comment above wrt. FailureAction vs OnFailure
-ExecCondition=/lib/drbd/scripts/drbd-service-shim.sh primary %I
-ExecStop=/lib/drbd/scripts/drbd-service-shim.sh secondary %I
+ExecCondition=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh primary %I
+ExecStop=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh secondary %I
diff --git a/scripts/drbd-wait-promotable@.service b/scripts/drbd-wait-promotable@.service
index 81c3789f..3416abc6 100644
--- a/scripts/drbd-wait-promotable@.service
+++ b/scripts/drbd-wait-promotable@.service
@@ -10,7 +10,7 @@ Type=oneshot
# on first start, wait for access to "good data"
# let systemd handle timeouts
-ExecStart=/lib/drbd/scripts/drbd-wait-promotable.sh %I
+ExecStart=@nonarch_libdir@/drbd/scripts/drbd-wait-promotable.sh %I
RemainAfterExit=yes
[Install]
diff --git a/scripts/drbd.service b/scripts/drbd.service
index 96c599e7..c81e95a6 100644
--- a/scripts/drbd.service
+++ b/scripts/drbd.service
@@ -12,11 +12,11 @@ RemainAfterExit=yes
# A check for INIT_VERSION already exists, just set it to something.
Environment=INIT_VERSION=systemd
-ExecStart=/lib/drbd/scripts/drbd start
-ExecStop=/lib/drbd/scripts/drbd stop
+ExecStart=@nonarch_libdir@/drbd/scripts/drbd start
+ExecStop=@nonarch_libdir@/drbd/scripts/drbd stop
# Re-adjust everything on reload
-ExecReload=/lib/drbd/scripts/drbd reload
+ExecReload=@nonarch_libdir@/drbd/scripts/drbd reload
[Install]
WantedBy=multi-user.target
diff --git a/scripts/drbd@.service b/scripts/drbd@.service
index 76514c5b..e2e500ba 100644
--- a/scripts/drbd@.service
+++ b/scripts/drbd@.service
@@ -35,8 +35,8 @@ RemainAfterExit=yes
# depends... do we want this as ExecCondition or as ExecStart
# failed start is "failed", failed condition is just "not startable yet"
-ExecStart=/lib/drbd/scripts/drbd-service-shim.sh adjust %I
-ExecReload=/lib/drbd/scripts/drbd-service-shim.sh adjust %I
+ExecStart=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh adjust %I
+ExecReload=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh adjust %I
# can only succeed, if you first stop all depending services
-ExecStopPost=/lib/drbd/scripts/drbd-service-shim.sh down %I
+ExecStopPost=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh down %I
diff --git a/scripts/ocf.ra@.service b/scripts/ocf.ra@.service
index 9c2268a6..1666c482 100644
--- a/scripts/ocf.ra@.service
+++ b/scripts/ocf.ra@.service
@@ -22,5 +22,5 @@ Environment=monitor_inverval=30
# Only the first argument is used by the wrapper,
# the %n is just to identify which is which in the process list.
# All parameterization is done via Environment= in per instance override.conf
-ExecStart=/lib/drbd/scripts/ocf.ra.wrapper.sh start-and-monitor %n
-ExecStopPost=/lib/drbd/scripts/ocf.ra.wrapper.sh stop %n
+ExecStart=@nonarch_libdir@/drbd/scripts/ocf.ra.wrapper.sh start-and-monitor %n
+ExecStopPost=@nonarch_libdir@/drbd/scripts/ocf.ra.wrapper.sh stop %n
diff --git a/user/v83/Makefile.in b/user/v83/Makefile.in
index 08cfe574..4c4971b6 100644
--- a/user/v83/Makefile.in
+++ b/user/v83/Makefile.in
@@ -96,19 +96,19 @@ install:
ifeq ($(WITH_83_SUPPORT),yes)
install -d $(DESTDIR)$(localstatedir)/lib/drbd
install -d $(DESTDIR)$(localstatedir)/lock
- install -d $(DESTDIR)/lib/drbd/
+ install -d $(DESTDIR)/${nonarch_libdir}/drbd/
if getent group haclient > /dev/null 2> /dev/null ; then \
- install -g haclient -m 4750 drbdsetup-83 $(DESTDIR)/lib/drbd/ ; \
- install -m 755 drbdadm-83 $(DESTDIR)/lib/drbd/ ; \
+ install -g haclient -m 4750 drbdsetup-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
+ install -m 755 drbdadm-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
else \
- install -m 755 drbdsetup-83 $(DESTDIR)/lib/drbd/ ; \
- install -m 755 drbdadm-83 $(DESTDIR)/lib/drbd/ ; \
+ install -m 755 drbdsetup-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
+ install -m 755 drbdadm-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
fi
endif
uninstall:
- rm -f $(DESTDIR)/lib/drbd/drbdsetup-83
- rm -f $(DESTDIR)/lib/drbd/drbdadm-83
+ rm -f $(DESTDIR)/${nonarch_libdir}/drbd/drbdsetup-83
+ rm -f $(DESTDIR)/${nonarch_libdir}/drbd/drbdadm-83
.PHONY: install uninstall clean distclean
../../configure:
diff --git a/user/v84/Makefile.in b/user/v84/Makefile.in
index 0fcefc5f..81f7d5ec 100644
--- a/user/v84/Makefile.in
+++ b/user/v84/Makefile.in
@@ -110,19 +110,19 @@ ifeq ($(WITH_84_SUPPORT),yes)
install -d $(DESTDIR)$(localstatedir)/lib/drbd
install -d $(DESTDIR)$(localstatedir)/run/drbd
install -d $(DESTDIR)$(localstatedir)/lock
- install -d $(DESTDIR)/lib/drbd/
+ install -d $(DESTDIR)/${nonarch_libdir}/drbd/
if getent group haclient > /dev/null 2> /dev/null ; then \
- install -g haclient -m 4750 drbdsetup-84 $(DESTDIR)/lib/drbd/ ; \
- install -m 755 drbdadm-84 $(DESTDIR)/lib/drbd/ ; \
+ install -g haclient -m 4750 drbdsetup-84 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
+ install -m 755 drbdadm-84 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
else \
- install -m 755 drbdsetup-84 $(DESTDIR)/lib/drbd/ ; \
- install -m 755 drbdadm-84 $(DESTDIR)/lib/drbd/ ; \
+ install -m 755 drbdsetup-84 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
+ install -m 755 drbdadm-84 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
fi
endif
uninstall:
- rm -f $(DESTDIR)/lib/drbd/drbdsetup-84
- rm -f $(DESTDIR)/lib/drbd/drbdadm-84
+ rm -f $(DESTDIR)/${nonarch_libdir}/drbd/drbdsetup-84
+ rm -f $(DESTDIR)/${nonarch_libdir}/drbd/drbdadm-84
spell:
for f in drbdadm_adjust.c drbdadm_main.c drbdadm_parser.c drbdadm_usage_cnt.c drbdsetup.c drbdtool_common.c; do \
--
2.25.1

View File

@@ -0,0 +1,29 @@
From a61b9ff2d2cb7387a5cd347b2201535ee45a46ee Mon Sep 17 00:00:00 2001
From: Sakib Sajal <sakib.sajal@windriver.com>
Date: Thu, 31 Mar 2022 15:09:58 -0400
Subject: [PATCH] drbdmon: add LDFLAGS when linking
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
---
user/drbdmon/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/user/drbdmon/Makefile.in
+++ b/user/drbdmon/Makefile.in
@@ -1,6 +1,6 @@
CXXFLAGS=-std=c++11 -I. -I../shared -Icppdsaext/src -Wall -Werror -pedantic-errors -fPIC -O2 \
-Wsign-compare -Wpointer-arith -Wswitch-default -Wswitch-enum -Wtype-limits \
--Wmissing-declarations -Wshadow
+-Wmissing-declarations -Wshadow -Wno-defaulted-function-deleted -Wno-unused-private-field
CXX = @CXX@
LIBS = @LIBS@
@@ -51,7 +51,7 @@ $(dsaext-obj): $(basename $(dsaext-obj))
$(integerparse-obj): $(basename $(integerparse-obj)).cpp $(basename $(integerparse-obj)).h
drbdmon: $(ls-obj)
- $(CXX) -o $@ $(CPPFLAGS) $(CXXFLAGS) $^ $(LIBS)
+ $(CXX) -o $@ $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ $(LIBS)
# do not try to rebuild Makefile itself
Makefile: ;

View File

@@ -0,0 +1,48 @@
From 5adae6737e919d957a08df437951ccb6996f9882 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 21 Dec 2022 19:16:03 -0800
Subject: [PATCH 1/2] replace off64_t with off_t
off_t is already 64-bits when _FILE_OFFSET_BITS=64
using off_t also makes it portable on musl systems
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
user/v9/drbdadm_main.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/user/v9/drbdadm_main.c b/user/v9/drbdadm_main.c
index 91e9507d..2030946c 100644
--- a/user/v9/drbdadm_main.c
+++ b/user/v9/drbdadm_main.c
@@ -1264,11 +1264,11 @@ static int adm_resource(const struct cfg_ctx *ctx)
return ex;
}
-static off64_t read_drbd_dev_size(int minor)
+static off_t read_drbd_dev_size(int minor)
{
char *path;
FILE *file;
- off64_t val;
+ off_t val;
int r;
m_asprintf(&path, "/sys/block/drbd%d/size", minor);
@@ -1289,9 +1289,9 @@ int adm_resize(const struct cfg_ctx *ctx)
char *argv[MAX_ARGS];
struct d_option *opt;
bool is_resize = !strcmp(ctx->cmd->name, "resize");
- off64_t old_size = -1;
- off64_t target_size = 0;
- off64_t new_size;
+ off_t old_size = -1;
+ off_t target_size = 0;
+ off_t new_size;
int argc = 0;
int silent;
int ex;
--
2.39.0

View File

@@ -0,0 +1,96 @@
From b70e5bf5bfa5fa2c2fffe08bcf300da1d3583602 Mon Sep 17 00:00:00 2001
From: Lars Ellenberg <lars.ellenberg@linbit.com>
Date: Wed, 9 Nov 2022 11:01:54 +0100
Subject: [PATCH 2/2] drbdadm: drop use of GLOB_MAGCHAR, use strchr heuristic only
Fixup for
2022-09-05 4a1b5900 drbdadm: allow files from an expanded include glob to vanish
When using the `include` statement, if the glob did not match any file,
there is nothing to do, silently ignore. Unless it was no glob, but a literal,
which we would expect to exist.
Also, there is a race between expanding a glob and accessing the file.
That also should not happen for literals, though.
Since we still had the heuristic anyways, because apparently |GLOB_MAGCHAR
does not happen for GLOB_NOMATCH returns, and there exist non-GNU libc that
don't (and likely won't) implement that extension, just forget about
(gl_flags & GLOB_MAGCHAR) but use the incomplete strchr heuristic only.
Sourced From Alpine: https://git.alpinelinux.org/aports/tree/main/drbd-utils/drop_use_of_GLOB_MAGCHAR.patch
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
user/v9/drbdadm_parser.c | 35 ++++++++++++++++++++---------------
1 file changed, 20 insertions(+), 15 deletions(-)
diff --git a/user/v9/drbdadm_parser.c b/user/v9/drbdadm_parser.c
index b2f6ed8a..9a0a775d 100644
--- a/user/v9/drbdadm_parser.c
+++ b/user/v9/drbdadm_parser.c
@@ -1947,14 +1947,29 @@ void include_stmt(char *str)
size_t i;
int r;
- cwd = pushd_to_current_config_file_unless_stdin();
-
- /* """
+ /*
+ * If the glob did not match any file,
+ * there is nothing to do, silently ignore.
+ * Unless it was no glob, but a literal,
+ * which we would expect to exist.
+ *
+ * """
* As a GNU extension, pglob->gl_flags is set to the
* flags specified, ored with GLOB_MAGCHAR if any
* metacharacters were found.
* """
+ *
+ * But apparently |GLOB_MAGCHAR does not happen for GLOB_NOMATCH returns,
+ * at least not consistently :-(
+ * Also, there exist non-GNU libc
+ * So we have this incomplete strchr heuristic anyways.
*/
+ bool contains_glob_magic_char =
+ strchr(str, '*') ||
+ strchr(str, '?') ||
+ strchr(str, '[');
+
+ cwd = pushd_to_current_config_file_unless_stdin();
r = glob(str, 0, NULL, &glob_buf);
if (r == 0) {
for (i=0; i<glob_buf.gl_pathc; i++) {
@@ -1965,7 +1980,7 @@ void include_stmt(char *str)
if (f) {
include_file(f, strdup(glob_buf.gl_pathv[i]));
fclose(f);
- } else if (errno == ENOENT && glob_buf.gl_flags & GLOB_MAGCHAR) {
+ } else if (errno == ENOENT && contains_glob_magic_char) {
/* Noisily ignore race between glob expansion
* and actual open. */
err("%s:%d: include file vanished after glob expansion '%s'.\n",
@@ -1979,17 +1994,7 @@ void include_stmt(char *str)
}
globfree(&glob_buf);
} else if (r == GLOB_NOMATCH) {
- /*
- * If the glob did not match any file,
- * there is nothing to do, silently ignore.
- * Unless it was no glob, but a literal,
- * which we would expect to exist.
- * Apparently |GLOB_MAGCHAR does not happen for GLOB_NOMATCH returns,
- * at least not consistently :-(
- * So we have this strchr heuristic anyways.
- */
- /* if (!(glob_buf.gl_flags & GLOB_MAGCHAR)) { */
- if (!strchr(str, '?') && !strchr(str, '*') && !strchr(str, '[')) {
+ if (!contains_glob_magic_char) {
err("%s:%d: Failed to open include file '%s'.\n",
config_save, line, str);
config_valid = 0;
--
2.39.0

View File

@@ -0,0 +1,74 @@
SUMMARY = "Distributed block device driver for Linux"
DESCRIPTION = "DRBD mirrors a block device over the network to another machine.\
DRBD mirrors a block device over the network to another machine.\
Think of it as networked raid 1. It is a building block for\
setting up high availability (HA) clusters."
HOMEPAGE = "http://www.drbd.org/"
SECTION = "admin"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;protocol=https \
git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \
file://0001-drbdmon-add-LDFLAGS-when-linking.patch \
file://0001-replace-off64_t-with-off_t.patch \
${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \
"
SRC_URI:append:libc-musl = " file://0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch "
SRCREV_drbd-utils = "409097fe02187f83790b88ac3e0d94f3c167adab"
SRCREV_drbd-headers = "9a0f151fa0085f57910a2dcbbd658d6069554f62"
SRCREV_FORMAT = "drbd-utils_drbd-headers"
S = "${WORKDIR}/git"
UPSTREAM_CHECK_URI = "https://github.com/LINBIT/drbd-utils/releases"
SYSTEMD_SERVICE:${PN} = "drbd.service"
SYSTEMD_AUTO_ENABLE = "disable"
DEPENDS = "flex-native"
inherit autotools-brokensep systemd
EXTRA_OECONF = " \
--with-initdir=/etc/init.d \
--without-pacemaker \
--without-rgmanager \
--without-bashcompletion \
--with-distro debian \
--with-initscripttype=both \
--with-systemdunitdir=${systemd_unitdir}/system \
--without-manual \
"
# If we have inherited reproducible_build, we want to use it.
export WANT_DRBD_REPRODUCIBLE_BUILD = "yes"
do_install:append() {
# don't install empty /var/lock and /var/run to avoid conflict with base-files
rm -rf ${D}${localstatedir}/lock
rm -rf ${D}${localstatedir}/run
sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-demote-or-escalate@.service
sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-promote@.service
sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-wait-promotable@.service
sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd.service
sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd@.service
sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/ocf.ra@.service
}
RDEPENDS:${PN} += "bash perl-module-getopt-long perl-module-exporter perl-module-constant perl-module-overloading perl-module-exporter-heavy"
# The drbd items are explicitly put under /lib when installed.
#
FILES:${PN} += "/run"
FILES:${PN} += "${nonarch_base_libdir}/drbd \
${nonarch_libdir}/drbd \
${nonarch_libdir}/tmpfiles.d \
${nonarch_libdir}/drbdscripts/* \
${systemd_unitdir}/system/* \
"
FILES:${PN}-dbg += "${nonarch_base_libdir}/drbd/.debug"
CLEANBROKEN = "1"

View File

@@ -0,0 +1,24 @@
If CONFIG_BLK_DEV_DRBD kernel config is enabled, then DRBD
does not build drbd.ko here. Under this circumstance do_install
task is going to fail with a below error:
-- snip --
| install: cannot stat drbd.ko: No such file or directory
| make[1]: *** [install] Error 1
-- snip --
So, check for kernel module existence before installing.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
--- drbd-9.0.1-1/drbd/Makefile 2016-07-03 06:54:19.421538690 -0700
+++ drbd-9.0.1-1/drbd/Makefile_mod 2016-07-03 06:53:18.938801628 -0700
@@ -158,7 +158,7 @@ else
fi
install -d $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
set -e ; for ko in $(MODOBJS); do \
- install -m 644 $$ko $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR); \
+ [ -e $$ko ] && install -m 644 $$ko $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR); \
done
ifeq ($(DESTDIR),/)
ifeq ($(shell uname -r),$(KERNELRELEASE))

View File

@@ -0,0 +1,24 @@
SUMMARY = "Distributed block device driver for Linux"
DESCRIPTION = "DRBD is a block device which is designed to build high \
availability clusters. This is done by mirroring a whole \
block device via (a dedicated) network. You could see \
it as a network raid-1."
HOMEPAGE = "http://oss.linbit.com/drbd/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
DEPENDS = "virtual/kernel"
SRC_URI = "https://pkg.linbit.com//downloads/drbd/9/${BP}.tar.gz \
file://check_existence_of_modules_before_installing.patch \
"
SRC_URI[sha256sum] = "f59ee795188f21d4a62c5319c371ebad65ab3fb9b55e5212c3f1dd558978a843"
inherit module
EXTRA_OEMAKE += "KDIR='${STAGING_KERNEL_DIR}' SPAAS=true"
do_install () {
oe_runmake install DESTDIR="${D}"
}
SKIP_RECIPE[drbd] ?= "Needs coccinelle to build with SPAAS"

View File

@@ -0,0 +1,44 @@
From 63dbf8a9f04b34474021e8f0bf239b7446f10a7f Mon Sep 17 00:00:00 2001
From: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Date: Thu, 3 Mar 2022 09:01:23 +0000
Subject: [PATCH] Fix libESMTP dependency check
Since libesmtp-1.1.0, libesmtp-config is removed, use pkg-config to
check for existence instead.
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
---
configure.ac | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 64b19b4..83346a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,8 @@ AC_PROG_CC
AC_HEADER_STDC
+PKG_PROG_PKG_CONFIG
+
dnl getopt needs this
AC_C_CONST
@@ -30,11 +32,11 @@ then
AC_CHECK_HEADER(libesmtp.h, ,[AC_MSG_ERROR([libesmtp.h not found in $with_libesmtp])])
fi
AC_MSG_CHECKING(for libESMTP)
-if libesmtp-config --version > /dev/null 2>&1
+if $PKG_CONFIG --exists 'libesmtp-1.0'
then
AC_MSG_RESULT(yes)
- CFLAGS="$CFLAGS `libesmtp-config --cflags`"
- LIBS="$LIBS `libesmtp-config --libs`"
+ CFLAGS="$CFLAGS `$PKG_CONFIG --cflags 'libesmtp-1.0'`"
+ LIBS="$LIBS `$PKG_CONFIG --libs 'libesmtp-1.0'`"
else
AC_MSG_RESULT(no)
AC_MSG_ERROR(libESMTP library not found)
--
2.32.0

View File

@@ -0,0 +1,48 @@
SUMMARY = "User configurable send-only Mail Transfer Agent"
DESCRIPTION = "ESMTP is a user-configurable relay-only MTA \
with a sendmail-compatible syntax, based on libESMTP and \
supporting the AUTH (including the CRAM-MD5 and NTLM SASL \
mechanisms) and StartTLS SMTP extensions."
HOMEPAGE = "http://esmtp.sourceforge.net/"
SECTION = "net"
DEPENDS = "libesmtp"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BPN}-${PV}.tar.bz2 \
file://0001-Fix-libESMTP-dependency-check.patch \
"
# Have to set this or we get -L/lib in LDFLAGS
EXTRA_OECONF = "--with-libesmtp=${STAGING_EXECPREFIXDIR}"
inherit autotools update-alternatives pkgconfig
ALTERNATIVE:${PN} = "sendmail mailq newaliases"
# /usr/lib/sendmial is required by LSB core test
ALTERNATIVE:${PN}:linuxstdbase = "sendmail mailq newaliases usr-lib-sendmail"
ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq"
ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases"
ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
ALTERNATIVE_TARGET[sendmail] = "${bindir}/esmtp"
ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail"
ALTERNATIVE_TARGET[usr-lib-sendmail] = "${bindir}/esmtp"
ALTERNATIVE_PRIORITY = "10"
ALTERNATIVE:${PN}-doc += "mailq.1 newaliases.1 sendmail.1"
ALTERNATIVE_LINK_NAME[mailq.1] = "${mandir}/man1/mailq.1"
ALTERNATIVE_LINK_NAME[newaliases.1] = "${mandir}/man1/newaliases.1"
ALTERNATIVE_LINK_NAME[sendmail.1] = "${mandir}/man1/sendmail.1"
SRC_URI[md5sum] = "79a9c1f9023d53f35bb82bf446150a72"
SRC_URI[sha256sum] = "a0d26931bf731f97514da266d079d8bc7d73c65b3499ed080576ab606b21c0ce"
do_install:append() {
# only one file /usr/lib/sendmail in ${D}${libdir}
rm -rf ${D}${libdir}
}
FILES:${PN} += "${libdir}/"

View File

@@ -0,0 +1,38 @@
From 40534662043b7d831d1f6c70448afa9d374a9b63 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 23 Mar 2023 10:23:14 -0700
Subject: [PATCH] sslstrip: Enhance the libcurl version check to consider
version 8+
Lately curl has released version 8 and hence LIBCURL_VERSION_MAJOR is
reset to 0, current check assumes major version to be 7 at max and hence
on systems with libcurl 8+ this check breaks and build fails
Fixes
TOPDIR/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/ettercap/0.8.3.1-r0/git/plug-ins/sslstrip/sslstrip.c:57:2: error: libcurl 7.26.0 or up is needed
^
1 error generated.
Upstream-Status: Backport [https://github.com/Ettercap/ettercap/commit/40534662043b7d831d1f6c70448afa9d374a9b63]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
plug-ins/sslstrip/sslstrip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plug-ins/sslstrip/sslstrip.c b/plug-ins/sslstrip/sslstrip.c
index 327bf58a..d9b67c8b 100644
--- a/plug-ins/sslstrip/sslstrip.c
+++ b/plug-ins/sslstrip/sslstrip.c
@@ -51,7 +51,7 @@
#include <curl/curl.h>
-#if (LIBCURL_VERSION_MAJOR < 7) || (LIBCURL_VERSION_MINOR < 26)
+#if (LIBCURL_VERSION_MAJOR < 7) || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR < 26)
#error libcurl 7.26.0 or up is needed
#endif
--
2.40.0

View File

@@ -0,0 +1,45 @@
SUMMARY = "A suite for man in the middle attacks"
HOMEPAGE = "https://github.com/Ettercap/ettercap"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
inherit cmake
DEPENDS += "ethtool \
geoip \
librepo \
libnet \
libpcap \
libpcre \
ncurses \
openssl \
zlib \
bison-native \
flex-native \
"
RDEPENDS:${PN} += "bash ethtool libgcc"
SRC_URI = "gitsm://github.com/Ettercap/ettercap;branch=master;protocol=https \
file://0001-sslstrip-Enhance-the-libcurl-version-check-to-consid.patch"
SRCREV = "7281fbddb7da7478beb1d21e3cb105fff3778b31"
S = "${WORKDIR}/git"
EXTRA_OECMAKE = " \
-DCMAKE_SKIP_RPATH=TRUE \
-DBUNDLED_LIBS=ON \
-DENABLE_IPV6=ON \
-DENABLE_GTK=OFF \
"
CFLAGS += "-D_GNU_SOURCE"
# Replaces default encoding set (ISO-8859-1) with UTF-8 in ettercap
# configuration file installed by the package.
# It ensures that all characters are properly decoded and avoids
# any fatal errors while running in text mode (-T).
do_install:append() {
sed -i 's@utf8_encoding.*@utf8_encoding = "UTF-8"@g' \
${D}/etc/ettercap/etter.conf
}

View File

@@ -0,0 +1,26 @@
SUMMARY = "Fetchmail retrieves mail from remote mail servers and forwards it via SMTP"
HOMEPAGE = "http://www.fetchmail.info/"
DESCRIPTION = "Fetchmail is a full-featured, robust, well-documented remote-mail retrieval \
and forwarding utility intended to be used over on-demand TCP/IP links (such as SLIP or PPP \
connections). It supports every remote-mail protocol now in use on the Internet: POP2, POP3, \
RPOP, APOP, KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6 and IPSEC."
SECTION = "mail"
LICENSE = "GPL-2.0-only & MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=c3a05d9b9d3784c824c9b92a648e1353"
DEPENDS = "openssl"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz \
"
SRC_URI[sha256sum] = "5f7a5e13731431134a2ca535bbced7adc666d3aeb93169a0830945d91f492300"
inherit autotools gettext pkgconfig python3-dir python3native
EXTRA_OECONF = "--with-ssl=${STAGING_DIR_HOST}${prefix}"
do_install:append() {
sed -i 's,${RECIPE_SYSROOT_NATIVE},,g' ${D}${bindir}/fetchmailconf
}
PACKAGES =+ "fetchmail-python"
FILES:fetchmail-python = "${libdir}/${PYTHON_DIR}/*"

View File

@@ -0,0 +1,42 @@
From c3f476a763412be51b4df0e748af04d4150a2c71 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 29 Aug 2022 15:41:51 -0700
Subject: [PATCH] fping: Initialize msghdr struct in a portable way
Initializing the structure assuming glibc layout results in
compile errors on musl, therefore do partial intialization and then
assigning the members individually.
Upstream-Status: Submitted [https://github.com/schweikert/fping/pull/263]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/fping.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/src/fping.c b/src/fping.c
index e26b216..81a61d9 100644
--- a/src/fping.c
+++ b/src/fping.c
@@ -1951,15 +1951,13 @@ int receive_packet(int64_t wait_time,
reply_buf,
reply_buf_len
};
- struct msghdr recv_msghdr = {
- reply_src_addr,
- reply_src_addr_len,
- &msg_iov,
- 1,
- &msg_control,
- sizeof(msg_control),
- 0
- };
+ struct msghdr recv_msghdr = {0};
+ recv_msghdr.msg_name = reply_src_addr;
+ recv_msghdr.msg_namelen = reply_src_addr_len;
+ recv_msghdr.msg_iov = &msg_iov;
+ recv_msghdr.msg_iovlen = 1;
+ recv_msghdr.msg_control = &msg_control;
+ recv_msghdr.msg_controllen = sizeof(msg_control);
#if HAVE_SO_TIMESTAMPNS
struct cmsghdr* cmsg;
#endif

View File

@@ -0,0 +1,29 @@
SUMMARY = "sends ICMP ECHO_REQUEST packets to network hosts"
DESCRIPTION = "fping is a ping like program which uses the Internet Control \
Message Protocol (ICMP) echo request to determine if a target host is \
responding. fping differs from ping in that you can specify any number of \
targets on the command line, or specify a file containing the lists of \
targets to ping. Instead of sending to one target until it times out or \
replies, fping will send out a ping packet and move on to the next target \
in a round-robin fashion."
HOMEPAGE = "http://www.fping.org/"
BUGTRACKER = "https://github.com/schweikert/fping/issues"
SECTION = "net"
LICENSE = "fping"
NO_GENERIC_LICENSE[fping] = "COPYING"
LIC_FILES_CHKSUM = "file://COPYING;md5=c6170fbadddfcd74f011515291d96901"
SRC_URI = "http://www.fping.org/dist/fping-${PV}.tar.gz \
file://0001-fping-Initialize-msghdr-struct-in-a-portable-way.patch \
"
SRC_URI[sha256sum] = "1ee5268c063d76646af2b4426052e7d81a42b657e6a77d8e7d3d2e60fd7409fe"
S = "${WORKDIR}/fping-${PV}"
inherit autotools
EXTRA_OECONF = "--enable-ipv4"
PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"

View File

@@ -0,0 +1,27 @@
From 5aea816f27a71e6c88ad50e7326fa6584eeb7ad9 Mon Sep 17 00:00:00 2001
From: Francois Marier <francois@debian.org>
Date: Fri, 24 Jul 2020 21:22:47 -0700
Subject: [PATCH] Fix compilation with GCC's -fno-common flag (fixes #305)
Upstream-Status: Submitted [https://github.com/mrash/fwknop/pull/319]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
client/log_msg.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/log_msg.h b/client/log_msg.h
index cc17716..3dda161 100644
--- a/client/log_msg.h
+++ b/client/log_msg.h
@@ -38,7 +38,7 @@ enum
LOG_VERBOSITY_INFO, /*!< Constant to define a INFO message */
LOG_VERBOSITY_DEBUG, /*!< Constant to define a DEBUG message */
LOG_LAST_VERBOSITY
-} log_level_t;
+};
#define LOG_DEFAULT_VERBOSITY LOG_VERBOSITY_NORMAL /*!< Default verbosity to use */
--
2.28.0

View File

@@ -0,0 +1,27 @@
From f8f4e1a617c4610ea7dc40a60f1c696ebc37850c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 2 Apr 2023 09:27:42 -0700
Subject: [PATCH] Use pkg-config to find gpgme
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
m4/gpgme.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/m4/gpgme.m4 b/m4/gpgme.m4
index 44bf43c..c9a8ae6 100644
--- a/m4/gpgme.m4
+++ b/m4/gpgme.m4
@@ -18,7 +18,7 @@ AC_DEFUN([_AM_PATH_GPGME_CONFIG],
if test "x$gpgme_config_prefix" != x ; then
GPGME_CONFIG="$gpgme_config_prefix/bin/gpgme-config"
fi
- AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no)
+ GPGME_CONFIG="pkg-config gpgme"
if test "$GPGME_CONFIG" != "no" ; then
gpgme_version=`$GPGME_CONFIG --version`
--
2.40.0

View File

@@ -0,0 +1,29 @@
From fee4cb0ae2d1fcd012cb7f501c3db0d8ec910798 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 2 Apr 2023 10:01:51 -0700
Subject: [PATCH] configure.ac: Fix missing comma in AS_IF
this is flagged with autconf 2.72
Upstream-Status: Pending
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 47a069e..9cdfd3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -744,7 +744,7 @@ dnl
IPFW_EXE=""
IPTABLES_EXE=""
FIREWALLD_EXE=""
- ]
+ ],
]
]
]
--
2.40.0

View File

@@ -0,0 +1,30 @@
SUMMARY = "fwknop - Single Packet Authorization"
HOMEPAGE = "http://www.cipherdyne.org/fwknop/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
"
inherit autotools-brokensep pkgconfig
SRC_URI = "http://www.cipherdyne.org/${BPN}/download/${BPN}-${PV}.tar.bz2 \
file://0001-Fix-compilation-with-GCC-s-fno-common-flag-fixes-305.patch \
file://0001-Use-pkg-config-to-find-gpgme.patch \
file://0001-configure.ac-Fix-missing-comma-in-AS_IF.patch \
"
SRC_URI[sha256sum] = "f6c09bec97ed8e474a98ae14f9f53e1bcdda33393f20667b6af3fb6bb894ca77"
DEPENDS = "libpcap gpgme"
EXTRA_OECONF = " --with-iptables=${sbindir}/iptables"
do_configure:prepend () {
install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/config
install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/config
}
PACKAGES =+ "${PN}-client ${PN}-daemon"
FILES:${PN}-client = "${bindir}/fwknop"
FILES:${PN}-daemon = "${sbindir}/fwknopd \
${sysconfdir}/fwknop/access.conf \
${sysconfdir}/fwknop/fwknopd.conf"

View File

@@ -0,0 +1,11 @@
#!/bin/sh
pdir=`dirname $0`
cd ${pdir}/tests
for i in ./benchmark ./test-geoip-city ; do
${i} 1>/dev/null 2>&1;
if [ $? == 0 ]; then
echo PASS: $i;
else
echo FAIL: $i;
fi;
done

View File

@@ -0,0 +1,15 @@
#!/bin/sh
# The tests contain hard-coded relative paths and must be
# executed from $pdir.
#
pdir=`dirname $0`
cd ${pdir}
for i in t/*.t ; do
perl ${i} 1>/dev/null 2>&1;
if [ $? == 0 ]; then
echo PASS: $i;
else
echo FAIL: $i;
fi;
done

View File

@@ -0,0 +1,35 @@
#
# Copyright (C) 2014, 2015 Wind River Systems, Inc.
# Released under the MIT license (see COPYING.MIT for the terms)
#
SUMMARY = "GeoIP perl API library to access location database"
DESCRIPTION = "perl library for country/city/organization to IP address or hostname mapping"
HOMEPAGE = "http://www.maxmind.com/app/ip-location"
SECTION = "libdevel"
LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e4f3ea6e9b28af88dc0321190a1f8250"
S = "${WORKDIR}/git"
SRCREV = "4cdfdc38eca237c19c22a8b90490446ce6d970fa"
SRC_URI = "git://github.com/maxmind/geoip-api-perl.git;branch=main;protocol=https \
file://run-ptest \
"
DEPENDS += "geoip"
inherit cpan ptest
EXTRA_CPANFLAGS = "LIBS='-L${STAGING_LIBDIR}' INC='-I${STAGING_INCDIR}'"
# perl scripts and some special small data files
#
do_install_ptest () {
install -d -m 0755 ${D}${PTEST_PATH}/t/data
install ${S}/t/*.t* ${D}${PTEST_PATH}/t
install ${S}/t/data/* ${D}${PTEST_PATH}/t/data
}
FILES:${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/Geo/IP/.debug"

View File

@@ -0,0 +1,92 @@
SUMMARY = "C library for country/city/organization to IP address or hostname mapping"
DESCRIPTION = "GeoIP is a C library that enables the user to find the country that any IP \
address or hostname originates from. It uses a file based database that is \
accurate as of March 2003. This database simply contains IP blocks as keys, and \
countries as values. This database should be more complete and accurate than \
using reverse DNS lookups."
HOMEPAGE = "http://dev.maxmind.com/geoip/"
SECTION = "libdevel"
GEOIP_DATABASE_VERSION = "20181205"
SRC_URI = "git://github.com/maxmind/geoip-api-c.git;branch=main;protocol=https \
http://sources.openembedded.org/GeoIP.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoIP-dat; \
http://sources.openembedded.org/GeoIPv6.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoIPv6-dat; \
http://sources.openembedded.org/GeoLiteCity.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoLiteCity-dat; \
http://sources.openembedded.org/GeoLiteCityv6.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoLiteCityv6-dat; \
file://run-ptest \
"
SRCREV = "4b526e7331ca1d692b74a0509ddcc725622ed31a"
SRC_URI[GeoIP-dat.md5sum] = "d538e57ad9268fdc7955c6cf9a37c4a9"
SRC_URI[GeoIP-dat.sha256sum] = "b9c05eb8bfcf90a6ddfdc6815caf40a8db2710f0ce3dd48fbd6c24d485ae0449"
SRC_URI[GeoIPv6-dat.md5sum] = "52d6aa0aac1adbfa5eb7fa4742197c11"
SRC_URI[GeoIPv6.sha256sum] = "416ac92fcc35a21d5efbb32e5c88e609c37aec1aa1af6247d088b8da1af6e9bf"
SRC_URI[GeoLiteCity-dat.md5sum] = "d700c137232f8e077ac8db8577f699d9"
SRC_URI[GeoLiteCity-dat.sha256sum] = "90db2e52195e3d1bcdb2c2789209006d09de5c742812dbd9a1b36c12675ec4cd"
SRC_URI[GeoLiteCityv6-dat.md5sum] = "6734ccdc644fc0ba76eb276dce73d005"
SRC_URI[GeoLiteCityv6-dat.sha256sum] = "c95a9d2643b7f53d7abeed2114388870e13fbbad4653f450a49efa7e4b86aca4"
LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad \
file://LICENSE;md5=0388276749a542b0d611601fa7c1dcc8 "
S = "${WORKDIR}/git"
inherit autotools
EXTRA_OECONF = "--disable-static \
--disable-dependency-tracking "
do_install() {
make DESTDIR=${D} install
install -d ${D}/${datadir}/GeoIP
install ${WORKDIR}/GeoIP.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoIP.dat
install ${WORKDIR}/GeoIPv6.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoIPv6.dat
install ${WORKDIR}/GeoLiteCity.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoLiteCity.dat
install ${WORKDIR}/GeoLiteCityv6.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoLiteCityv6.dat
ln -s GeoLiteCity.dat ${D}${datadir}/GeoIP/GeoIPCity.dat
}
PACKAGES =+ "${PN}-database"
FILES:${PN}-database = ""
FILES:${PN}-database += "${datadir}/GeoIP/*"
# We cannot do much looking up without databases.
#
RDEPENDS:${PN} += "${PN}-database"
inherit ptest
do_configure_ptest() {
sed -i -e "s/noinst_PROGRAMS = /test_PROGRAMS = /g" \
-e 's:SRCDIR=\\"$(top_srcdir)\\":SRCDIR=\\"$(testdir)\\":' \
${S}/test/Makefile.am
if ! grep "^testdir = " ${S}/test/Makefile.am ; then
sed -e '/EXTRA_PROGRAMS = /itestdir = ${PTEST_PATH}/tests' \
-i ${S}/test/Makefile.am
fi
sed -i -e "s:/usr/local/share:/usr/share:g" \
${S}/test/benchmark.c
sed -i -e 's:"../data/:"/usr/share/GeoIP/:g' \
${S}/test/test-geoip-city.c \
${S}/test/test-geoip-isp.c \
${S}/test/test-geoip-asnum.c \
${S}/test/test-geoip-netspeed.c \
${S}/test/test-geoip-org.c \
${S}/test/test-geoip-region.c
}
do_install_ptest() {
oe_runmake -C test DESTDIR=${D} install-testPROGRAMS
install ${S}/test/*.txt ${D}${PTEST_PATH}/tests
}

View File

@@ -0,0 +1,11 @@
# The following UserId and LicenseKey are required placeholders:
UserId 999999
LicenseKey 000000000000
# Include one or more of the following ProductIds:
# * GeoLite2-City - GeoLite 2 City
# * GeoLite2-Country - GeoLite2 Country
# * 506 - GeoLite Legacy Country
# * 517 - GeoLite Legacy ASN
# * 533 - GeoLite Legacy City
ProductIds GeoLite2-City GeoLite2-Country 506 517 533

View File

@@ -0,0 +1,5 @@
# top of crontab
MAILTO=your@email.com
32 11 * * 4 /usr/local/bin/geoipupdate
# end of crontab

View File

@@ -0,0 +1,33 @@
SUMMARY = "Crontab entry to provide weekly updates of the GeoIP free databases."
DESCRIPTION = "update databases for GeoIP"
HOMEPAGE = "http://dev.maxmind.com/geoip/"
SECTION = "net"
DEPENDS = "zlib curl"
SRC_URI = "https://github.com/maxmind/geoipupdate/releases/download/v2.5.0/geoipupdate-2.5.0.tar.gz \
file://GeoIP.conf \
file://geoipupdate.cron \
"
SRC_URI[md5sum] = "28f633c49ec87ab01ad3c0fb0228a696"
SRC_URI[sha256sum] = "5119fd0e338cd083e886228b26679c64bcbaade8a815be092aecf865a610ab26"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "\
file://ChangeLog.md;md5=11d2e31df0de2be3ccc3e2286c4dafcb \
"
FILES:${PN} = "/usr/share/GeoIP \
/etc/GeoIP.conf \
/etc/cron.d/geoipupdate.cron \
/usr/bin/geoipupdate \
"
inherit autotools
do_install:append() {
install -d ${D}/${sysconfdir}
install -d ${D}/${sysconfdir}/cron.d
install ${WORKDIR}/GeoIP.conf ${D}/${sysconfdir}/
install ${WORKDIR}/geoipupdate.cron ${D}/${sysconfdir}/cron.d/
}

View File

@@ -0,0 +1,31 @@
SUMMARY = "HTTP based time synchronization tool"
DESCRIPTION = "The HTTP Time Protocol (HTP) is used to synchronize a computer's time with\
web servers as reference time source. This program can be used instead\
ntpdate or similar, in networks that has a firewall blocking the NTP port.\
Htpdate will synchronize the computer time to Greenwich Mean Time (GMT),\
using the timestamps from HTTP headers found in web servers response (the\
HEAD method will be used to get the information).\
Htpdate works through proxy servers. Accuracy of htpdate will be usually\
within 0.5 seconds (better with multiple servers).\
"
HOMEPAGE = "https://github.com/twekkel/htpdate"
BUGTRACKER = "https://github.com/twekkel/htpdate/issues"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://htpdate.c;beginline=26;endline=30;md5=2b6cdb94bd5349646d7e33f9f501eef7"
SRC_URI = "http://www.vervest.org/htp/archive/c/htpdate-${PV}.tar.gz"
SRC_URI[sha256sum] = "88c52fe475308ee95f560fd7cf68c75bc6e9a6abf56be7fed203a7f762fe7ab2"
TARGET_CC_ARCH += "${LDFLAGS}"
do_configure () {
:
}
do_compile () {
oe_runmake
}
do_install () {
oe_runmake install 'INSTALL=install' 'STRIP=echo' 'DESTDIR=${D}'
}

View File

@@ -0,0 +1,32 @@
SUMMARY = "HTTP request/response parser for C"
DESCRIPTION = "This is a parser for HTTP messages written in C. It parses \
both requests and responses. The parser is designed to be used \
in performance HTTP applications. It does not make any \
syscalls nor allocations, it does not buffer data, it can be \
interrupted at anytime. Depending on your architecture, it \
only requires about 40 bytes of data per message stream (in a \
web server that is per connection)."
AUTHOR = "Stefan Wiehler <stefan.wiehler@missinglinkelectronics.com>"
HOMEPAGE = "https://github.com/nodejs/http-parser"
SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE-MIT;md5=9bfa835d048c194ab30487af8d7b3778"
SRC_URI = "git://github.com/nodejs/http-parser.git;branch=master;protocol=https"
SRCREV = "2343fd6b5214b2ded2cdcf76de2bf60903bb90cd"
S = "${WORKDIR}/git"
EXTRA_OEMAKE = "PLATFORM=linux"
do_configure[noexec] = "1"
do_compile() {
oe_runmake library package
}
do_install() {
oe_runmake install DESTDIR=${D} PREFIX=${prefix} LIBDIR=${libdir}
}
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,22 @@
SUMMARY = "Configure network interfaces for parallel routing"
HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding"
SECTION = "net"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=acc89812938cf9ad6b1debc37cea0253"
inherit manpages
MAN_PKG = "${PN}"
SRCREV = "1bdfb472f2f8212056ed418d48387e8b36e61b34"
SRC_URI = "git://salsa.debian.org/debian/ifenslave.git;protocol=https;branch=main"
S = "${WORKDIR}/git"
do_install() {
install -m 0755 -D ${S}/debian/ifenslave.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/ifenslave
install -m 0755 -D ${S}/debian/ifenslave.if-post-down ${D}${sysconfdir}/network/if-post-down.d/ifenslave
install -m 0755 -D ${S}/debian/ifenslave.if-up ${D}${sysconfdir}/network/if-up.d/ifenslave
}
FILES:${PN}-doc:remove = "${mandir}"

View File

@@ -0,0 +1,15 @@
Description: Correct typo: s/ommited/omitted/
Author: Michael Shuler <michael@pbandjelly.org>
Index: ifmetric/man/ifmetric.8
===================================================================
--- ifmetric.orig/man/ifmetric.8
+++ ifmetric/man/ifmetric.8
@@ -9,7 +9,7 @@ ifmetric is a Linux tool for setting the
ifmetric uses the Linux NETLINK interface to manipulate the routes. Because of that it is compatible with routes created with the new iproute2 utility.
.SH OPTIONS
-You should specify the interface name as first parameter. The second parameter should be the new metric. If ommited the metric 0 (highest) is used.
+You should specify the interface name as first parameter. The second parameter should be the new metric. If omitted the metric 0 (highest) is used.
.SH RETURN VALUES
\fI0\f1 Success

View File

@@ -0,0 +1,16 @@
Description: Fix "NETLINK: Error: Invalid argument" for links that are down, in kernel 4.4+
Author: Jim Paris <jim@jtan.com>
Bug-Debian: http://bugs.debian.org/864889
Index: ifmetric/src/nlrequest.c
===================================================================
--- a/src/ifmetric.c
+++ b/src/ifmetric.c
@@ -97,6 +97,8 @@
l = NLMSG_PAYLOAD(n, sizeof(struct rtmsg));
a = RTM_RTA(r);
+ r->rtm_flags &= ~(RTNH_F_DEAD | RTNH_F_LINKDOWN);
+
while(RTA_OK(a, l)) {
switch(a->rta_type) {
case RTA_PRIORITY:

View File

@@ -0,0 +1,24 @@
Description: Correct spelling-error-in-binary s/Recieved/Received/
Author: Michael Shuler <michael@pbandjelly.org>
Index: ifmetric/src/ifmetric.c
===================================================================
--- ifmetric.orig/src/ifmetric.c 2013-09-04 18:37:59.000000000 -0500
+++ ifmetric/src/ifmetric.c 2013-09-04 19:08:38.539750778 -0500
@@ -38,7 +38,7 @@
case RTA_OIF:
if (RTA_PAYLOAD(a) != sizeof(int)) {
- fprintf(stderr, "NETLINK: Recieved corrupt RTA_OIF payload.\n");
+ fprintf(stderr, "NETLINK: Received corrupt RTA_OIF payload.\n");
return -1;
}
@@ -102,7 +102,7 @@
case RTA_PRIORITY:
if (RTA_PAYLOAD(a) != sizeof(int)) {
- fprintf(stderr, "NETLINK: Recieved corrupt RTA_PRIORITY payload.\n");
+ fprintf(stderr, "NETLINK: Received corrupt RTA_PRIORITY payload.\n");
return NULL;
}

View File

@@ -0,0 +1,16 @@
Description: Fix "NETLINK: Packet too small or truncated!" error.
Author: Benedek László <benedekl@gmail.com>
Bug-Debian: http://bugs.debian.org/514197
Index: ifmetric/src/nlrequest.c
===================================================================
--- ifmetric.orig/src/nlrequest.c 2013-09-05 14:10:42.000000000 -0500
+++ ifmetric/src/nlrequest.c 2013-09-05 14:19:06.573420862 -0500
@@ -44,7 +44,7 @@
for (;;) {
int bytes;
- char replybuf[2048];
+ char replybuf[4096];
struct nlmsghdr *p = (struct nlmsghdr *) replybuf;
if ((bytes = recv(s, &replybuf, sizeof(replybuf), 0)) < 0) {

View File

@@ -0,0 +1,17 @@
DESCRIPTION = "Set routing metrics for a network interface"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
SRC_URI = "http://0pointer.de/lennart/projects/ifmetric/ifmetric-${PV}.tar.gz \
file://ifmetric.8_typo.patch \
file://ifmetric.c_netlink-invalid-arg.patch \
file://ifmetric.c_typo.patch \
file://nlrequest.c_packet-too-small_fix.patch"
SRC_URI[md5sum] = "74aa3f5ee8aca16a87e124ddcc64fa36"
SRC_URI[sha256sum] = "0fa8510a4e34e555f136f9df81d26618313f2d69a4880c0fb5967f19502f1aec"
inherit autotools
# disable lynx support for now
EXTRA_OECONF = "--disable-lynx"

View File

@@ -0,0 +1,68 @@
Patch by Robert Scheck <robert@fedoraproject.org> for iftop <= 1.0pre4 to avoid a
GCC 10 related build failure due to global variables in a header file with omitted
"extern" declaration, see also: https://gcc.gnu.org/gcc-10/porting_to.html
Example build failure output:
/usr/bin/ld: ui_common.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:36: multiple definition of `screen_list'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:36: first defined here
/usr/bin/ld: ui_common.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peaktotal'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here
/usr/bin/ld: ui_common.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peakrecv'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here
/usr/bin/ld: ui_common.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peaksent'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here
/usr/bin/ld: ui_common.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:37: multiple definition of `totals'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:37: first defined here
/usr/bin/ld: ui_common.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:40: multiple definition of `screen_hash'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:40: first defined here
/usr/bin/ld: ui_common.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:41: multiple definition of `service_hash'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:41: first defined here
/usr/bin/ld: ui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:36: multiple definition of `screen_list'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:36: first defined here
/usr/bin/ld: ui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peaksent'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here
/usr/bin/ld: ui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peakrecv'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here
/usr/bin/ld: ui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peaktotal'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here
/usr/bin/ld: ui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:37: multiple definition of `totals'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:37: first defined here
/usr/bin/ld: ui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:40: multiple definition of `screen_hash'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:40: first defined here
/usr/bin/ld: ui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:41: multiple definition of `service_hash'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:41: first defined here
/usr/bin/ld: tui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:36: multiple definition of `screen_list'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:36: first defined here
/usr/bin/ld: tui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:37: multiple definition of `totals'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:37: first defined here
/usr/bin/ld: tui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peaksent'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here
/usr/bin/ld: tui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peakrecv'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here
/usr/bin/ld: tui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peaktotal'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here
/usr/bin/ld: tui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:40: multiple definition of `screen_hash'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:40: first defined here
/usr/bin/ld: tui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:41: multiple definition of `service_hash'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:41: first defined here
collect2: error: ld returned 1 exit status
Patch from https://src.fedoraproject.org/rpms/iftop/raw/master/f/iftop-1.0-gcc10.patch
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/ui_common.h
+++ b/ui_common.h
@@ -33,12 +33,12 @@ typedef struct host_pair_line_tag {
extern options_t options;
-sorted_list_type screen_list;
-host_pair_line totals;
-int peaksent, peakrecv, peaktotal;
+extern sorted_list_type screen_list;
+extern host_pair_line totals;
+extern int peaksent, peakrecv, peaktotal;
extern history_type history_totals;
-hash_type* screen_hash;
-hash_type* service_hash;
+extern hash_type* screen_hash;
+extern hash_type* service_hash;
void analyse_data(void);
void screen_list_init(void);
--- a/ui_common.c
+++ b/ui_common.c
@@ -24,6 +24,12 @@ int history_divs[HISTORY_DIVISIONS] = {1
char* unit_bits[UNIT_DIVISIONS] = { "b", "Kb", "Mb", "Gb"};
char* unit_bytes[UNIT_DIVISIONS] = { "B", "KB", "MB", "GB"};
+sorted_list_type screen_list;
+host_pair_line totals;
+int peaksent, peakrecv, peaktotal;
+hash_type* screen_hash;
+hash_type* service_hash;
+
extern hash_type* history;
extern int history_pos;
extern int history_len;

View File

@@ -0,0 +1,16 @@
SUMMARY = "iftop does for network usage what top(1) does for CPU usage"
HOMEPAGE = "http://www.ex-parrot.com/pdw/iftop/"
SECTION = "net"
DEPENDS = "libpcap ncurses"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=76498170798db0f4f0fb685a225f702f"
SRC_URI = "http://www.ex-parrot.com/pdw/iftop/download/iftop-${PV}.tar.gz \
file://iftop-1.0-gcc10.patch \
"
SRC_URI[md5sum] = "7e6decb4958e8a4890cccac335239f24"
SRC_URI[sha256sum] = "f733eeea371a7577f8fe353d86dd88d16f5b2a2e702bd96f5ffb2c197d9b4f97"
inherit autotools-brokensep

View File

@@ -0,0 +1,14 @@
SUMMARY = "Tool to assist in network address calculations for IPv4 and IPv6."
HOMEPAGE = "https://gitlab.com/ipcalc/ipcalc"
SECTION = "net"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "git://gitlab.com/ipcalc/ipcalc.git;protocol=https;branch=master"
SRCREV = "4c4261a47f355946ee74013d4f5d0494487cc2d6"
S = "${WORKDIR}/git"
inherit meson

View File

@@ -0,0 +1,73 @@
From 801224257015788d3aff026bf2ae1cd8531d4fcc Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Wed, 25 Jul 2018 13:12:04 +0800
Subject: [PATCH] Modify the Makefile for cross compile.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
update to version 1.29
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
Makefile | 9 ++++-----
libipvs/Makefile | 3 +--
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 91a2991..906086d 100644
--- a/Makefile
+++ b/Makefile
@@ -35,10 +35,9 @@ ARCH = $(shell uname -m)
RPMSOURCEDIR = $(shell rpm --eval '%_sourcedir')
RPMSPECDIR = $(shell rpm --eval '%_specdir')
-CC = gcc
INCLUDE =
SBIN = $(BUILD_ROOT)/sbin
-MANDIR = usr/man
+MANDIR = usr/share/man
MAN = $(BUILD_ROOT)/$(MANDIR)/man8
INIT = $(BUILD_ROOT)/etc/rc.d/init.d
MKDIR = mkdir
@@ -81,13 +80,13 @@ DEFINES += $(shell if [ ! -f ../ip_vs.h ]; then \
.PHONY = all clean install dist distclean rpm rpms
-all: libs ipvsadm
+all: ipvsadm
libs:
make -C libipvs
-ipvsadm: $(OBJS) $(STATIC_LIBS)
- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
+ipvsadm: $(OBJS) libs
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(STATIC_LIBS) $(LIBS)
install: all
if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
diff --git a/libipvs/Makefile b/libipvs/Makefile
index f845c8b..dafab30 100644
--- a/libipvs/Makefile
+++ b/libipvs/Makefile
@@ -1,6 +1,5 @@
# Makefile for libipvs
-CC = gcc
CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC
ifneq (0,$(HAVE_NL))
CFLAGS += -DLIBIPVS_USE_NL
@@ -30,7 +29,7 @@ SHARED_LIB = libipvs.so
all: $(STATIC_LIB) $(SHARED_LIB)
$(STATIC_LIB): libipvs.o ip_vs_nl_policy.o
- ar rv $@ $^
+ $(AR) rv $@ $^
$(SHARED_LIB): libipvs.o ip_vs_nl_policy.o
$(CC) -shared -Wl,-soname,$@ -o $@ $^
--
2.7.4

View File

@@ -0,0 +1,39 @@
From 2f4cdf70cf92d3a9503d8ff045ba277db40bb4e7 Mon Sep 17 00:00:00 2001
From: Joe MacDonald <joe_macdonald@mentor.com>
Date: Monday, 13 Apr 2015 14:12:37 -0400
Subject: [PATCH] ipvsadm: remove dependency on bash
The save/restore scripts are very simple and don't depend on any BASH
features at all, so switch the interpreter to /bin/sh.
Upstream-Status: Pending
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
---
ipvsadm-restore | 2 +-
ipvsadm-save | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ipvsadm-restore b/ipvsadm-restore
index f24e1b3..a9fa8bc 100644
--- a/ipvsadm-restore
+++ b/ipvsadm-restore
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# ipvsadm-restore - Restore IPVS rules
#
# A very simple wrapper to restore IPVS rules
diff --git a/ipvsadm-save b/ipvsadm-save
index f4d399e..af51638 100644
--- a/ipvsadm-save
+++ b/ipvsadm-save
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# ipvsadm-save - Save IPVS rules
#
# A very simple wrapper to save IPVS rules
--
1.9.1

View File

@@ -0,0 +1,33 @@
From 8aff1e965ec17262f3a5b376f7eb3e053d81905c Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Tue, 24 Jul 2018 18:18:05 +0800
Subject: [PATCH] Add LDFLAGS variable to Makefile, make sure the extra linker
flags can be passed.
Upstream-Status: Pending
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Update to version 1.29
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index f29bbae..81beb5a 100644
--- a/Makefile
+++ b/Makefile
@@ -86,7 +86,7 @@ libs:
make -C libipvs
ipvsadm: $(OBJS) libs
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(STATIC_LIBS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(STATIC_LIBS) $(LIBS)
install: all
if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
--
2.7.4

View File

@@ -0,0 +1,43 @@
SUMMARY = "Linux Virtual Server administration Utility"
HOMEPAGE = "http://www.linux-vs.org/software/index.html"
DESCRIPTION = "Ipvsadm is used to set up, maintain or inspect the virtual server \
table in the Linux kernel. The Linux Virtual Server can be used to \
build scalable network services based on a cluster of two or more nodes. \
The active node of the cluster redirects service requests to a \
collection of server hosts that will actually perform the services. \
Supported features include two protocols (TCP and UDP), three packet-forwarding \
methods (NAT, tunneling, and direct routing), and eight load balancing algorithms \
(round robin, weighted round robin, least-connec-tion, weighted least-connection, \
locality-based least-connection, locality-based least-connection with replication, \
destination-hashing, and source-hashing)."
SECTION = "net"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://README;beginline=40;endline=56;md5=b4e40069f15598d0e3fe2aa177e5ec77"
DEPENDS += "libnl popt"
SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/utils/kernel/ipvsadm/${BP}.tar.xz \
file://0001-Modify-the-Makefile-for-cross-compile.patch \
file://0003-ipvsadm-remove-dependency-on-bash.patch \
file://makefile-add-ldflags.patch \
"
SRC_URI[md5sum] = "f6d1707c5baf684b58fd33682d67871f"
SRC_URI[sha256sum] = "1a0a5e25b5a1226435d2fb76341656f83a710183aebb0d204db39c0ec3bedfdb"
UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/ipvsadm"
do_compile() {
oe_runmake \
CC="${CC} -I${STAGING_INCDIR} -I${STAGING_INCDIR}/libnl3 -L${STAGING_LIBDIR}" \
all
}
do_install() {
sed -i -e "s;SBIN\t\t= \$(BUILD_ROOT)/sbin;SBIN\t\t= \$(BUILD_ROOT)$base_sbindir;" \
-e "s;INIT\t\t= \$(BUILD_ROOT)/etc/rc.d/init.d;INIT\t\t= \$(BUILD_ROOT)${sysconfdir}/init.d;" \
${S}/Makefile
oe_runmake 'BUILD_ROOT=${D}' install
}
inherit pkgconfig

View File

@@ -0,0 +1,14 @@
DESCRIPTION = "libConfuse is a configuration file parser library"
LICENSE = "ISC"
LIC_FILES_CHKSUM = "file://LICENSE;md5=42fa47330d4051cd219f7d99d023de3a"
SRCREV = "a42aebf13db33afd575da6e63f55163d371f776d"
SRC_URI = "git://github.com/libconfuse/libconfuse.git;branch=master;protocol=https"
inherit autotools-brokensep pkgconfig gettext
S = "${WORKDIR}/git"
do_configure:prepend(){
(cd ${S} && ${S}/autogen.sh)
}

View File

@@ -0,0 +1,85 @@
From 1c304e7886a08fb56485e41614ff3f8685afb59d Mon Sep 17 00:00:00 2001
From: Jiaqing Zhao <jiaqing.zhao@intel.com>
Date: Tue, 8 Mar 2022 15:05:32 +0000
Subject: [PATCH] Add build option for NTLM support
Currently, NTLM plugin is built by default when openssl is available
and STARTTLS is enabled. But in libesmtp 1.0.6, there is a separate
build option. This commits adds the 'ntlm' option back. It's also
disabled by default.
Like 1.0.6, it will check openssl MD4 algorithm support as MD4 is
insecure and modern systems may drop MD4 support.
Upstream-Status: Accepted [https://github.com/libesmtp/libESMTP/commit/1c304e7886a08fb56485e41614ff3f8685afb59d]
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
---
meson.build | 13 ++++++++++---
meson_options.txt | 1 +
ntlm/meson.build | 2 +-
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 11d6ed8..d2a0e06 100644
--- a/meson.build
+++ b/meson.build
@@ -61,6 +61,7 @@ add_project_arguments(cc.get_supported_arguments(cflags), language: 'c')
################################################################################
dldep = cc.find_library('dl')
ssldep = dependency('openssl', version : '>=1.1.0', required : get_option('tls'))
+ntlmdep = dependency('openssl', version : '>=1.1.0', required : get_option('ntlm'))
threaddep = dependency('threads', required : get_option('pthreads'))
#XXX add test for libbind9.so
@@ -69,6 +70,7 @@ lwresdep = cc.find_library('lwres', required : get_option('lwres'))
deps = [
dldep,
ssldep,
+ ntlmdep,
threaddep,
lwresdep,
]
@@ -237,8 +239,12 @@ include_dir = include_directories('.')
subdir('login')
subdir('plain')
subdir('crammd5')
-if ssldep.found()
- subdir('ntlm')
+if ntlmdep.found()
+ if cc.has_header('openssl/md4.h') and cc.has_function('MD4_Init', dependencies : ntlmdep)
+ subdir('ntlm')
+ else
+ error('MD4 is not supported in current openssl, unable to build NTLM plugin')
+ endif
endif
################################################################################
@@ -264,4 +270,5 @@ summary({'current:revision:age': libesmtp_cra,
'STARTTLS': ssldep.found(),
'CHUNKING': get_option('bdat'),
'ETRN': get_option('etrn'),
- 'XUSR': get_option('xusr')})
+ 'XUSR': get_option('xusr'),
+ 'NTLM': ntlmdep.found()})
diff --git a/meson_options.txt b/meson_options.txt
index 8375e2c..158f38f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -5,3 +5,4 @@ option('lwres', type : 'feature', value : 'disabled', description : 'use lwres l
option('bdat', type : 'boolean', value : 'true', description : 'enable SMTP BDAT extension')
option('etrn', type : 'boolean', value : 'true', description : 'enable SMTP ETRN extension')
option('xusr', type : 'boolean', value : 'true', description : 'enable sendmail XUSR extension')
+option('ntlm', type : 'feature', value : 'disabled', description : 'build with support for NTLM authentication')
diff --git a/ntlm/meson.build b/ntlm/meson.build
index e0eef58..11d7f58 100644
--- a/ntlm/meson.build
+++ b/ntlm/meson.build
@@ -5,7 +5,7 @@ sasl_ntlm_sources = [
'ntlmstruct.c',
]
-ntlm_deps = [ ssldep, ]
+ntlm_deps = [ ntlmdep, ]
sasl_ntlm = shared_module('ntlm', sasl_ntlm_sources,
name_prefix : 'sasl-',

View File

@@ -0,0 +1,40 @@
SUMMARY = "SMTP client library"
DESCRIPTION = "LibESMTP is a library to manage posting \
(or submission of) electronic mail using SMTP to a \
preconfigured Mail Transport Agent (MTA) such as Exim or PostFix."
HOMEPAGE = "https://libesmtp.github.io/"
LICENSE = "LGPL-2.0-or-later"
SECTION = "libs"
DEPENDS = "openssl"
SRC_URI = "git://github.com/libesmtp/libESMTP.git;branch=master;protocol=https \
file://0001-Add-build-option-for-NTLM-support.patch"
SRCREV = "1d0af244310a66943ab400be56b15a9087f181eb"
S = "${WORKDIR}/git"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1803fa9c2c3ce8cb06b4861d75310742 \
file://COPYING.GPL;md5=393a5ca445f6965873eca0259a17f833"
inherit meson pkgconfig
EXTRA_OEMESON = " \
-Dpthreads=enabled \
-Dtls=enabled \
-Dxdg=false \
-Dlwres=disabled \
-Dbdat=true \
-Detrn=true \
-Dxusr=true \
-Dntlm=disabled \
"
CFLAGS += "-D_GNU_SOURCE"
do_configure:prepend:libc-glibc() {
sed -i -e "s/conf.set('HAVE_WORKING_STRERROR_R', 0)/conf.set('HAVE_WORKING_STRERROR_R', 1)/g" ${S}/meson.build
}
FILES:${PN} = "${libdir}/lib*${SOLIBS} \
${libdir}/esmtp-plugins-6.2.0/*${SOLIBSDEV}"

View File

@@ -0,0 +1,71 @@
From 69c409195ede704ed7e9298ed4942cc70a52e099 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Tue, 25 Jun 2019 14:25:08 +0800
Subject: [PATCH] do not import target module while cross compile
Some modules such as dynamic library maybe cann't be imported
while cross compile, we just check whether does the module exist.
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
update to version 4.10.5, and switch to python3
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
buildtools/wafsamba/samba_bundled.py | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
index 7d2d855..01dcb56 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -4,6 +4,7 @@ import sys
from waflib import Build, Options, Logs
from waflib.Configure import conf
from wafsamba import samba_utils
+import importlib.util, os
def PRIVATE_NAME(bld, name):
'''possibly rename a library to include a bundled extension'''
@@ -241,17 +242,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
# versions
minversion = minimum_library_version(conf, libname, minversion)
- try:
- m = __import__(modulename)
- except ImportError:
- found = False
- else:
+ # Find module in PYTHONPATH
+ spec = importlib.util._find_spec_from_path(modulename, [os.environ["PYTHONPATH"]])
+ if spec:
try:
- version = m.__version__
- except AttributeError:
+ module = importlib.util.module_from_spec(spec)
+ spec.loader.load_module(module)
+ except ImportError:
found = False
+
+ if conf.env.CROSS_COMPILE:
+ # Some modules such as dynamic library maybe cann't be imported
+ # while cross compile, we just check whether the module exist
+ Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (spec.name))
+ found = True
else:
- found = tuplize_version(version) >= tuplize_version(minversion)
+ try:
+ version = module.__version__
+ except AttributeError:
+ found = False
+ else:
+ found = tuplize_version(version) >= tuplize_version(minversion)
if not found and not conf.LIB_MAY_BE_BUNDLED(libname):
Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
sys.exit(1)
--
2.25.1

View File

@@ -0,0 +1,173 @@
From acd3985f9c428882f1b731a6f9ce5cb1a4a3a02c Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Mon, 1 Jul 2019 16:14:16 +0800
Subject: [PATCH] ldb: Add configure options for packages
Add configure options for the following packages:
- acl
- attr
- libaio
- libbsd
- libcap
- valgrind
Upstream-Status: Inappropriate [oe deterministic build specific]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
upgrade to version 1.5.4
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Rebase to 2.3.0
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
lib/replace/wscript | 90 +++++++++++++++++++++++++++++++++++----------
wscript | 8 ++++
2 files changed, 78 insertions(+), 20 deletions(-)
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 5c2b750..a38baae 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -25,6 +25,41 @@ def options(opt):
opt.PRIVATE_EXTENSION_DEFAULT('')
opt.RECURSE('buildtools/wafsamba')
+ opt.add_option('--with-acl',
+ help=("Enable use of acl"),
+ action="store_true", dest='enable_acl')
+ opt.add_option('--without-acl',
+ help=("Disable use of acl"),
+ action="store_false", dest='enable_acl', default=False)
+
+ opt.add_option('--with-attr',
+ help=("Enable use of attr"),
+ action="store_true", dest='enable_attr')
+ opt.add_option('--without-attr',
+ help=("Disable use of attr"),
+ action="store_false", dest='enable_attr', default=False)
+
+ opt.add_option('--with-libaio',
+ help=("Enable use of libaio"),
+ action="store_true", dest='enable_libaio')
+ opt.add_option('--without-libaio',
+ help=("Disable use of libaio"),
+ action="store_false", dest='enable_libaio', default=False)
+
+ opt.add_option('--with-libbsd',
+ help=("Enable use of libbsd"),
+ action="store_true", dest='enable_libbsd')
+ opt.add_option('--without-libbsd',
+ help=("Disable use of libbsd"),
+ action="store_false", dest='enable_libbsd', default=False)
+
+ opt.add_option('--with-libcap',
+ help=("Enable use of libcap"),
+ action="store_true", dest='enable_libcap')
+ opt.add_option('--without-libcap',
+ help=("Disable use of libcap"),
+ action="store_false", dest='enable_libcap', default=False)
+
@Utils.run_once
def configure(conf):
conf.RECURSE('buildtools/wafsamba')
@@ -38,12 +73,25 @@ def configure(conf):
conf.DEFINE('HAVE_LIBREPLACE', 1)
conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
- conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
- conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
+ conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
+ conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
- conf.CHECK_HEADERS('shadow.h sys/acl.h')
- conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
+ conf.CHECK_HEADERS('shadow.h')
+ conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
+
+ if Options.options.enable_acl:
+ conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
+
+ if Options.options.enable_attr:
+ conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
+
+ if Options.options.enable_libaio:
+ conf.CHECK_HEADERS('libaio.h')
+
+ if Options.options.enable_libcap:
+ conf.CHECK_HEADERS('sys/capability.h')
+
conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h')
conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
conf.CHECK_HEADERS('sys/resource.h sys/security.h sys/shm.h sys/statfs.h sys/statvfs.h sys/termio.h')
@@ -113,8 +161,9 @@ def configure(conf):
conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
- conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
+ if Options.options.enable_valgrind:
+ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
+ conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
@@ -436,20 +485,21 @@ def configure(conf):
strlcpy_in_bsd = False
- # libbsd on some platforms provides strlcpy and strlcat
- if not conf.CHECK_FUNCS('strlcpy strlcat'):
- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
- checklibc=True):
- strlcpy_in_bsd = True
- if not conf.CHECK_FUNCS('getpeereid'):
- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
- if not conf.CHECK_FUNCS('setproctitle_init'):
- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
-
- if not conf.CHECK_FUNCS('closefrom'):
- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+ if Options.options.enable_libbsd:
+ # libbsd on some platforms provides strlcpy and strlcat
+ if not conf.CHECK_FUNCS('strlcpy strlcat'):
+ if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+ checklibc=True):
+ strlcpy_in_bsd = True
+ if not conf.CHECK_FUNCS('getpeereid'):
+ conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+ if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+ if not conf.CHECK_FUNCS('setproctitle_init'):
+ conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+
+ if not conf.CHECK_FUNCS('closefrom'):
+ conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
conf.CHECK_CODE('''
struct ucred cred;
diff --git a/wscript b/wscript
index 03076e6..5365408 100644
--- a/wscript
+++ b/wscript
@@ -40,6 +40,14 @@ def options(opt):
help='disable new LMDB backend for LDB',
action='store_true', dest='without_ldb_lmdb', default=False)
+ opt.add_option('--with-valgrind',
+ help=("enable use of valgrind"),
+ action="store_true", dest='enable_valgrind')
+ opt.add_option('--without-valgrind',
+ help=("disable use of valgrind"),
+ action="store_false", dest='enable_valgrind', default=False)
+
+
def configure(conf):
conf.RECURSE('lib/tdb')
--
2.25.1

View File

@@ -0,0 +1,59 @@
From d9f4d5bbd3e58ca7fd7cbc4ab7656fe27bf4c346 Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Wed, 24 Nov 2021 13:33:35 +0800
Subject: [PATCH] Fix pyext_PATTERN for cross compilation
The pyext_PATTERN will add native arch as suffix when cross compiling.
For example, on qemuarm64, it is expanded to:
pyext_PATTERN ='%s.cpython-310-x86_64-linux-gnu.so'
which will result in the incorrect library name.
root@qemuarm64:~# find /usr/lib/ -name \*ldb\*
/usr/lib/pkgconfig/pyldb-util.cpython-310-x86_64-linux-gnu.pc
/usr/lib/pkgconfig/ldb.pc
/usr/lib/libpyldb-util.cpython-310-x86-64-linux-gnu.so.2.3.2
/usr/lib/libldb.so.2.3.2
/usr/lib/libpyldb-util.cpython-310-x86-64-linux-gnu.so.2
/usr/lib/libldb.so
/usr/lib/libldb.so.2
/usr/lib/python3.10/site-packages/_ldb_text.py
/usr/lib/python3.10/site-packages/ldb.cpython-310-x86_64-linux-gnu.so
/usr/lib/libpyldb-util.cpython-310-x86-64-linux-gnu.so
Set pyext_PATTERN to '%s.so' to remove the suffix.
After the patch:
root@qemuarm64:~# find /usr/lib/ -name \*ldb\*
/usr/lib/pkgconfig/pyldb-util.pc
/usr/lib/pkgconfig/ldb.pc
/usr/lib/libpyldb-util.so.2.3.2
/usr/lib/libldb.so.2.3.2
/usr/lib/libpyldb-util.so.2
/usr/lib/libldb.so
/usr/lib/libldb.so.2
/usr/lib/python3.10/site-packages/_ldb_text.py
/usr/lib/python3.10/site-packages/ldb.so
/usr/lib/libpyldb-util.so
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
third_party/waf/waflib/Tools/python.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/third_party/waf/waflib/Tools/python.py b/third_party/waf/waflib/Tools/python.py
index a23bd01..af202e0 100644
--- a/third_party/waf/waflib/Tools/python.py
+++ b/third_party/waf/waflib/Tools/python.py
@@ -328,7 +328,7 @@ def check_python_headers(conf, features='pyembed pyext'):
x = 'MACOSX_DEPLOYMENT_TARGET'
if dct[x]:
env[x] = conf.environ[x] = str(dct[x])
- env.pyext_PATTERN = '%s' + (dct['EXT_SUFFIX'] or dct['SO']) # SO is deprecated in 3.5 and removed in 3.11
+ env.pyext_PATTERN = '%s.so'
# Try to get pythonX.Y-config
--
2.25.1

View File

@@ -0,0 +1,31 @@
From cc86b8bdd45ca30bdf65a3b8b0960b27aeb34522 Mon Sep 17 00:00:00 2001
From: Jens Rehsack <rehsack@gmail.com>
Date: Thu, 19 Nov 2015 20:45:56 +0100
Subject: [PATCH] avoid openldap unless wanted
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Jens Rehsack <rehsack@gmail.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
wscript | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/wscript b/wscript
index 7f14847..092da2d 100644
--- a/wscript
+++ b/wscript
@@ -154,9 +154,7 @@ def configure(conf):
if conf.env.standalone_ldb:
conf.CHECK_XSLTPROC_MANPAGES()
- # we need this for the ldap backend
- if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
- conf.env.ENABLE_LDAP_BACKEND = True
+ conf.env.ENABLE_LDAP_BACKEND = False
# we don't want any libraries or modules to rely on runtime
# resolution of symbols
--
2.25.1

View File

@@ -0,0 +1,45 @@
From a37eb0a46669592e32ed4e004abb2698ee4f90c5 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Wed, 25 Jul 2018 09:55:25 +0800
Subject: [PATCH] cmocka: fix musl libc conflicting types error
/third_party/cmocka/cmocka.h:126:28: error: conflicting types for 'uintptr_t'
typedef unsigned int uintptr_t;
^~~~~~~~~
use __DEFINED_uintptr_t in alltypes.h to check if uintptr already defined
Upstream-Status: Pending
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
third_party/cmocka/cmocka.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/third_party/cmocka/cmocka.h b/third_party/cmocka/cmocka.h
index e6861c8..238201d 100644
--- a/third_party/cmocka/cmocka.h
+++ b/third_party/cmocka/cmocka.h
@@ -111,7 +111,7 @@ typedef uintmax_t LargestIntegralType;
((LargestIntegralType)(value))
/* Smallest integral type capable of holding a pointer. */
-#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED)
+#if !defined(__DEFINED_uintptr_t)
# if defined(_WIN32)
/* WIN32 is an ILP32 platform */
typedef unsigned int uintptr_t;
@@ -135,9 +135,8 @@ typedef uintmax_t LargestIntegralType;
# endif /* __WORDSIZE */
# endif /* _WIN32 */
-# define _UINTPTR_T
-# define _UINTPTR_T_DEFINED
-#endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */
+# define __DEFINED_uintptr_t
+#endif /* !defined(__DEFINED_uintptr_t) */
/* Perform an unsigned cast to uintptr_t. */
#define cast_to_pointer_integral_type(value) \
--
2.25.1

View File

@@ -0,0 +1,83 @@
SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
HOMEPAGE = "https://ldb.samba.org"
SECTION = "libs"
LICENSE = "LGPL-3.0-or-later & LGPL-2.1-or-later & GPL-3.0-or-later"
DEPENDS += "libtdb libtalloc libtevent popt"
RDEPENDS:pyldb += "python3"
export PYTHONHASHSEED="1"
SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \
file://0001-do-not-import-target-module-while-cross-compile.patch \
file://0002-ldb-Add-configure-options-for-packages.patch \
file://0003-Fix-pyext_PATTERN-for-cross-compilation.patch \
"
SRC_URI:append:libc-musl = " file://cmocka-fix-musl-libc-conflicting-types-error.patch"
PACKAGECONFIG ??= "\
${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
"
PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
PACKAGECONFIG[ldap] = ",,openldap"
PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio"
PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb,"
SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'ldap', '', 'file://avoid-openldap-unless-wanted.patch', d)}"
LIC_FILES_CHKSUM = "file://pyldb.h;endline=24;md5=dfbd238cecad76957f7f860fbe9adade \
file://man/ldb.3.xml;beginline=261;endline=262;md5=137f9fd61040c1505d1aa1019663fd08 \
file://tools/ldbdump.c;endline=19;md5=a7d4fc5d1f75676b49df491575a86a42"
SRC_URI[sha256sum] = "26ee72d647854e662d99643eb2b2d341655abf31f4990838d6650fb5cf9209c8"
inherit pkgconfig waf-samba
S = "${WORKDIR}/ldb-${PV}"
#cross_compile cannot use preforked process, since fork process earlier than point subproces.popen
#to cross Popen
export WAF_NO_PREFORK="yes"
EXTRA_OECONF += "--disable-rpath \
--disable-rpath-install \
--bundled-libraries=cmocka \
--builtin-libraries=replace \
--with-modulesdir=${libdir}/ldb/modules \
--with-privatelibdir=${libdir}/ldb \
--with-libiconv=${STAGING_DIR_HOST}${prefix}\
"
PACKAGES =+ "pyldb pyldb-dbg pyldb-dev"
NOAUTOPACKAGEDEBUG = "1"
FILES:${PN} += "${libdir}/ldb/*"
FILES:${PN}-dbg += "${bindir}/.debug/* \
${libdir}/.debug/* \
${libdir}/ldb/.debug/* \
${libdir}/ldb/modules/ldb/.debug/*"
FILES:pyldb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
${libdir}/libpyldb-util.*.so.* \
"
FILES:pyldb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \
${libdir}/.debug/libpyldb-util.*.so.*"
FILES:pyldb-dev = "${libdir}/libpyldb-util.*.so"
# Prevent third_party/waf/waflib/Configure.py checking host's path which is
# incorrect for cross building.
export PREFIX = "/"
export LIBDIR = "${libdir}"
export BINDIR = "${bindir}"
do_configure:prepend() {
# For a clean rebuild
rm -fr bin/
}

View File

@@ -0,0 +1,18 @@
SUMMARY = "C library for the MaxMind DB file format"
DESCRIPTION = "The libmaxminddb library provides a C library for reading MaxMind DB files, \
ncluding the GeoIP2 databases from MaxMind. This is a custom binary \
format designed to facilitate fast lookups of IP addresses while allowing \
for great flexibility in the type of data associated with an address."
HOMEPAGE = "https://github.com/maxmind/libmaxminddb"
SECTION = "libs"
LICENSE = " Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
"
SRC_URI = "https://github.com/maxmind/libmaxminddb/releases/download/${PV}/${BPN}-${PV}.tar.gz \
"
SRC_URI[sha256sum] = "a5fdf6c7b4880fdc7620f8ace5bd5cbe9f65650c9493034b5b9fc7d83551a439"
inherit autotools-brokensep

View File

@@ -0,0 +1,38 @@
From ed4422979b221c8613ca02eb5c57cb80009366d1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 18 Mar 2017 10:13:24 -0700
Subject: [PATCH 1/2] Fix comparison types
Fixes
error: comparison between pointer and integer ('char *' and 'int')
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
clients/memflush.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clients/memflush.cc b/clients/memflush.cc
index 8bd0dbf..71545ea 100644
--- a/clients/memflush.cc
+++ b/clients/memflush.cc
@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
{
options_parse(argc, argv);
- if (opt_servers == false)
+ if (opt_servers == NULL)
{
char *temp;
@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
opt_servers= strdup(temp);
}
- if (opt_servers == false)
+ if (opt_servers == NULL)
{
std::cerr << "No Servers provided" << std::endl;
exit(EXIT_FAILURE);
--
2.12.0

View File

@@ -0,0 +1,28 @@
From fa0fe001a5373c1ef9ff2175555b14fc07399e1b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 18 Mar 2017 10:01:44 -0700
Subject: [PATCH] configure.ac: Do not configure build-aux
Fixes
configure: error: cannot find install-sh, install.sh, or shtool
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.ac | 1 -
1 file changed, 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 17b7351..0263112 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,6 @@ AC_INIT([libmemcached],VERSION_NUMBER,[http://libmemcached.org/])
AC_PROG_CC([cc gcc clang])
AC_PROG_CXX([c++ g++ clang++])
-AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
--
2.12.0

View File

@@ -0,0 +1,30 @@
From e95609e4ae40a794ed198924505fd22d7d86a124 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 18 Mar 2017 10:16:14 -0700
Subject: [PATCH 2/2] POSIX_SPAWN_USEVFORK is not linux specific but glibc
specific
Fixes
cmdline.cc:206:12: error: use of undeclared identifier 'POSIX_SPAWN_USEVFORK'
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
libtest/cmdline.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libtest/cmdline.cc b/libtest/cmdline.cc
index 29a22de..34f0a89 100644
--- a/libtest/cmdline.cc
+++ b/libtest/cmdline.cc
@@ -201,7 +201,7 @@ Application::error_t Application::run(const char *args[])
fatal_assert(posix_spawnattr_setsigmask(&spawnattr, &mask) == 0);
-#if defined(POSIX_SPAWN_USEVFORK) || defined(__linux__)
+#if defined(POSIX_SPAWN_USEVFORK) || defined(__GLIBC__)
// Use USEVFORK on linux
flags |= POSIX_SPAWN_USEVFORK;
#endif
--
2.12.0

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