From 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd Mon Sep 17 00:00:00 2001 From: ToshikazuOhiwa Date: Mon, 30 Mar 2020 09:24:26 +0900 Subject: agl-basesystem --- ...ow-builds-to-work-with-separate-build-dir.patch | 126 +++++++++++++++++++++ ...01-diod-ops.c-add-header-file-for-makedev.patch | 40 +++++++ .../files/0002-auto.diod.in-remove-bashisms.patch | 47 ++++++++ .../recipes-extended/diod/files/diod | 75 ++++++++++++ .../recipes-extended/diod/files/diod.conf | 15 +++ 5 files changed, 303 insertions(+) create mode 100644 external/meta-virtualization/recipes-extended/diod/files/0001-build-allow-builds-to-work-with-separate-build-dir.patch create mode 100644 external/meta-virtualization/recipes-extended/diod/files/0001-diod-ops.c-add-header-file-for-makedev.patch create mode 100644 external/meta-virtualization/recipes-extended/diod/files/0002-auto.diod.in-remove-bashisms.patch create mode 100644 external/meta-virtualization/recipes-extended/diod/files/diod create mode 100644 external/meta-virtualization/recipes-extended/diod/files/diod.conf (limited to 'external/meta-virtualization/recipes-extended/diod/files') diff --git a/external/meta-virtualization/recipes-extended/diod/files/0001-build-allow-builds-to-work-with-separate-build-dir.patch b/external/meta-virtualization/recipes-extended/diod/files/0001-build-allow-builds-to-work-with-separate-build-dir.patch new file mode 100644 index 00000000..f40e0eb5 --- /dev/null +++ b/external/meta-virtualization/recipes-extended/diod/files/0001-build-allow-builds-to-work-with-separate-build-dir.patch @@ -0,0 +1,126 @@ +From 43403468298ef4167baa5d84de2ee2eaf7f4007a Mon Sep 17 00:00:00 2001 +From: Mark Asselstine +Date: Fri, 9 Jan 2015 18:34:04 +0000 +Subject: [PATCH 1/2] build: allow builds to work with separate build dir + +Remove assumptions in include paths that assume the build +is happening in the source directories. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Mark Asselstine +--- + diod/Makefile.am | 2 +- + libdiod/Makefile.am | 2 +- + liblsd/Makefile.am | 2 +- + libnpclient/Makefile.am | 2 +- + scripts/Makefile.am | 6 +++--- + tests/kern/dbench/Makefile.am | 4 ++-- + utils/Makefile.am | 2 +- + 7 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/diod/Makefile.am b/diod/Makefile.am +index 7644be7..fdaf130 100644 +--- a/diod/Makefile.am ++++ b/diod/Makefile.am +@@ -1,7 +1,7 @@ + AM_CFLAGS = @GCCWARN@ + + AM_CPPFLAGS = \ +- -I../libnpfs -I../liblsd -I../libdiod ++ -I$(srcdir)/../libnpfs -I$(srcdir)/../liblsd -I$(srcdir)/../libdiod + + sbin_PROGRAMS = diod + +diff --git a/libdiod/Makefile.am b/libdiod/Makefile.am +index 4810e14..6905cdd 100644 +--- a/libdiod/Makefile.am ++++ b/libdiod/Makefile.am +@@ -1,7 +1,7 @@ + AM_CFLAGS = @GCCWARN@ + + AM_CPPFLAGS = \ +- -I../libnpfs -I../libnpclient -I../liblsd ++ -I$(srcdir)/../libnpfs -I$(srcdir)/../libnpclient -I$(srcdir)/../liblsd + + noinst_LIBRARIES = libdiod.a + +diff --git a/liblsd/Makefile.am b/liblsd/Makefile.am +index c3e5658..7e18bf8 100644 +--- a/liblsd/Makefile.am ++++ b/liblsd/Makefile.am +@@ -1,6 +1,6 @@ + AM_CFLAGS = @GCCWARN@ + +-AM_CPPFLAGS = -I../libdiod ++AM_CPPFLAGS = -I$(srcdir)/../libdiod + + noinst_LIBRARIES = liblsd.a + +diff --git a/libnpclient/Makefile.am b/libnpclient/Makefile.am +index 5305df9..cbaf266 100644 +--- a/libnpclient/Makefile.am ++++ b/libnpclient/Makefile.am +@@ -1,7 +1,7 @@ + AM_CFLAGS = @GCCWARN@ + + AM_CPPFLAGS = \ +- -I../libnpfs ++ -I$(srcdir)/../libnpfs + + noinst_LIBRARIES = libnpclient.a + +diff --git a/scripts/Makefile.am b/scripts/Makefile.am +index 51c24a3..2aba728 100644 +--- a/scripts/Makefile.am ++++ b/scripts/Makefile.am +@@ -1,9 +1,9 @@ +-systemddir=$(sysconfdir)/systemd/system ++systemddir=/lib/systemd/system + + install-data-local: +- $(top_srcdir)/config/install-sh -m 755 $(srcdir)/auto.diod \ ++ $(top_srcdir)/config/install-sh -m 755 ./auto.diod \ + $(DESTDIR)$(sysconfdir)/auto.diod +- $(top_srcdir)/config/install-sh -m 755 $(srcdir)/diod.service \ ++ $(top_srcdir)/config/install-sh -m 644 ./diod.service \ + $(DESTDIR)$(systemddir)/diod.service + + uninstall-local: +diff --git a/tests/kern/dbench/Makefile.am b/tests/kern/dbench/Makefile.am +index e0cdefa..1704f9f 100644 +--- a/tests/kern/dbench/Makefile.am ++++ b/tests/kern/dbench/Makefile.am +@@ -2,7 +2,7 @@ AM_CFLAGS = -w + + # VERSION=4.00 + +-AM_CPPFLAGS = -DDATADIR=\"$(X_DATADIR)\" ++AM_CPPFLAGS = -I. -DDATADIR=\"$(X_DATADIR)\" + + LDADD = $(LIBPOPT) + +@@ -25,6 +25,6 @@ BUILT_SOURCES = proto.h + CLEANFILES = proto.h + + proto.h: $(dbench_SOURCES) mkproto.pl +- perl mkproto.pl $(dbench_SOURCES) > proto.h ++ $(srcdir)/mkproto.pl $(patsubst %,$(srcdir),$(dbench_SOURCES)) > proto.h + + EXTRA_DIST = mkproto.pl +diff --git a/utils/Makefile.am b/utils/Makefile.am +index 169b6c4..91d571d 100644 +--- a/utils/Makefile.am ++++ b/utils/Makefile.am +@@ -1,7 +1,7 @@ + AM_CFLAGS = @GCCWARN@ + + AM_CPPFLAGS = \ +- -I../libnpfs -I../liblsd -I../libdiod -I../libnpclient ++ -I$(srcdir)/../libnpfs -I$(srcdir)/../liblsd -I$(srcdir)/../libdiod -I$(srcdir)/../libnpclient + + sbin_PROGRAMS = diodmount diodcat dtop diodload diodls diodshowmount dioddate + +-- +2.11.0 + diff --git a/external/meta-virtualization/recipes-extended/diod/files/0001-diod-ops.c-add-header-file-for-makedev.patch b/external/meta-virtualization/recipes-extended/diod/files/0001-diod-ops.c-add-header-file-for-makedev.patch new file mode 100644 index 00000000..e6f7ece2 --- /dev/null +++ b/external/meta-virtualization/recipes-extended/diod/files/0001-diod-ops.c-add-header-file-for-makedev.patch @@ -0,0 +1,40 @@ +From f75836731d6051d85e6317eb4c12465bafb4973e Mon Sep 17 00:00:00 2001 +From: "Hongzhi.Song" +Date: Fri, 31 Aug 2018 05:47:02 -0400 +Subject: [PATCH] diod/ops.c: add header file for makedev + +Error: +diod/ops.c:845: undefined reference to `makedev' + +Fixed: +Glibc removes sys/sysmacros.h which defines makedev from sys/types.h +since v2.28. [Commit ID: e16deca62e16f] + +And then glibc suggestions us to include directly if +code needs it. + +Upstream-Status: Submitted +[diod: +mail: v9fs-developer@lists.sourceforge.net +author: hongzhi.song@windriver.com] + +Signed-off-by: Hongzhi.Song +--- + diod/ops.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/diod/ops.c b/diod/ops.c +index c6c8291..469a502 100644 +--- a/diod/ops.c ++++ b/diod/ops.c +@@ -74,6 +74,7 @@ + #include + #include + #include ++#include + + #ifdef __FreeBSD__ + #if !__BSD_VISIBLE +-- +2.8.1 + diff --git a/external/meta-virtualization/recipes-extended/diod/files/0002-auto.diod.in-remove-bashisms.patch b/external/meta-virtualization/recipes-extended/diod/files/0002-auto.diod.in-remove-bashisms.patch new file mode 100644 index 00000000..65d6ff6b --- /dev/null +++ b/external/meta-virtualization/recipes-extended/diod/files/0002-auto.diod.in-remove-bashisms.patch @@ -0,0 +1,47 @@ +From 5a9e09dc5de833db11607530351cd87cecbfd17e Mon Sep 17 00:00:00 2001 +From: Roy Li +Date: Thu, 22 Jun 2017 06:32:30 +0000 +Subject: [PATCH 2/2] auto.diod.in: remove bashisms + +Upstream-Status: Pending + +Signed-off-by: Roy Li +--- + scripts/auto.diod.in | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/scripts/auto.diod.in b/scripts/auto.diod.in +index f63e004..4d5fc3a 100755 +--- a/scripts/auto.diod.in ++++ b/scripts/auto.diod.in +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # + # auto.diod - executable automounter map for diod file systems + # +@@ -41,15 +41,15 @@ dcatopts="${DIOD_TIMEOUT:+-t $DIOD_TIMEOUT}" + for server in $DIOD_SERVERS; do + $DIOD_DIODCAT -s $server $dcatopts exports | awk '{print $1}' |\ + while read path; do +- if [ "$path" == "/" ]; then +- if [ "$key" == "ROOT" ]; then ++ if [ "$path" = "/" ]; then ++ if [ "$key" = "ROOT" ]; then + echo "$prefix $server:$path" + exit 0 + fi +- elif [ "$key" == "$(echo $path|sed -e's/^\///' -e's/\//./g')" ] \ +- || [ "$key" == "$(echo $path|sed -e's/^\///' -e's/\//_/g')" ] \ +- || [ "$key" == "$(echo $path|sed -e's/^\///' -e's/\//-/g')" ] \ +- || [ "$key" == "$(basename $path)" ]; then ++ elif [ "$key" = "$(echo $path|sed -e's/^\///' -e's/\//./g')" ] \ ++ || [ "$key" = "$(echo $path|sed -e's/^\///' -e's/\//_/g')" ] \ ++ || [ "$key" = "$(echo $path|sed -e's/^\///' -e's/\//-/g')" ] \ ++ || [ "$key" = "$(basename $path)" ]; then + echo "$prefix $server:$path" + exit 0 + fi +-- +2.11.0 + diff --git a/external/meta-virtualization/recipes-extended/diod/files/diod b/external/meta-virtualization/recipes-extended/diod/files/diod new file mode 100644 index 00000000..cd0bf987 --- /dev/null +++ b/external/meta-virtualization/recipes-extended/diod/files/diod @@ -0,0 +1,75 @@ +#!/bin/sh +# +# chkconfig: 35 20 80 +# description: Distributed Input Output Daemon +# + +# Get function from functions library +. /etc/init.d/functions + +BASE=diod +PIDFILE=/var/run/$BASE.pid +PID=`test -f $PIDFILE && cat $PIDFILE` +DIOD_BIN=/usr/sbin/$BASE +DIOD_CONF=/etc/$BASE.conf +DIOD_OPTS="-c $DIOD_CONF" +DIOD="$DIOD_BIN $DIOD_OPTS" +RETVAL=0 + +# Start the service $BASE +start() +{ + # Force creation of the log directory even on a tmpfs /var/log. + mkdir -p /var/log/diod + + start-stop-daemon --stop --test --quiet --pidfile $PIDFILE + status=$? + if [ $status -eq 0 ]; then + echo "diod service is already running with pid $PID" + exit 1 + else + echo -n "Starting $BASE:" + start-stop-daemon --start --pidfile $PIDFILE \ + --exec $DIOD_BIN -- $DIOD_OPTS + RETVAL=$? + echo + [ $RETVAL -ne 0 ] && exit $RETVAL + fi +} + +# Stop the service $BASE +stop() +{ + echo -n "Stopping $BASE:" + start-stop-daemon --stop --test --quiet --pidfile $PIDFILE + status=$? + if [ $status -eq 0 ]; then + start-stop-daemon --stop --quiet --pidfile $PIDFILE + [ -w $PIDFILE ] && rm -f $PIDFILE + else + start-stop-daemon --stop --quiet --name $BASE + fi +} + + +### service arguments ### +case $1 in + start) + start + ;; + stop) + stop + ;; + status) + status $BASE + ;; + restart | force-reload) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|status|restart}." + exit 1 +esac + +exit 0 diff --git a/external/meta-virtualization/recipes-extended/diod/files/diod.conf b/external/meta-virtualization/recipes-extended/diod/files/diod.conf new file mode 100644 index 00000000..e97743a0 --- /dev/null +++ b/external/meta-virtualization/recipes-extended/diod/files/diod.conf @@ -0,0 +1,15 @@ +-- +-- /etc/diod.conf - config file for diod distributed I/O daemon +-- +-- NOTE: This config file is a lua script that diod runs, then extracts +-- the value of certain globally defined variables. See diod.conf(5). + +listen = { "0.0.0.0:564" } +nwthreads = 16 +auth_required = 1 +logdest = "syslog:daemon:err" + +exports = { "/g/g0", "/g/g10" } + +allsquash = 0 +squashuser = "nobody" -- cgit 1.2.3-korg