summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-core/logger-systemd
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-core/logger-systemd')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd.inc43
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/avoid_parallel_tests.patch20
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/configure-sbindir.patch23
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/display_testname_for_subtest.patch25
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/ptest.patch23
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/run-ptest43
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/runuser-l.pamd3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/runuser.pamd4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd_2.34.bb12
9 files changed, 196 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd.inc b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd.inc
new file mode 100644
index 000000000..abad9d12d
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd.inc
@@ -0,0 +1,43 @@
+SUMMARY = "logger tool in util-linux with systemd support"
+HOMEPAGE = "http://userweb.kernel.org/~kzak/util-linux/"
+DESCRIPTION = "logger tool with systemd support, used to add log to systemd journald."
+
+SECTION = "base"
+
+LICENSE = "GPLv2+ & LGPLv2.1+ & BSD-3-Clause & BSD-4-Clause"
+
+LIC_FILES_CHKSUM = "file://README.licensing;md5=972a134f1e14b2b060e365df2fab0099 \
+ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \
+ file://Documentation/licenses/COPYING.BSD-3-Clause;md5=58dcd8452651fc8b07d1f65ce07ca8af \
+ file://Documentation/licenses/COPYING.BSD-4-Clause-UC;md5=263860f8968d8bafa5392cab74285262 \
+ file://libuuid/COPYING;md5=6d2cafc999feb2c2de84d4d24b23290c \
+ file://libmount/COPYING;md5=7c7e39fb7d70ffe5d693a643e29987c2 \
+ file://libblkid/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04"
+
+inherit autotools gettext pkgconfig
+DEPENDS = "libcap-ng ncurses virtual/crypt zlib systemd "
+#DEPENDS_intel-ast2500 += " systemd "
+#RDEPENDS_${PN} += " libsystemd"
+
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${MAJOR_VERSION}.tar.xz \
+ "
+
+S = "${WORKDIR}/util-linux-${MAJOR_VERSION}"
+
+EXTRA_OECONF = " --disable-nls --disable-all-programs \
+ --disable-libuuid --disable-libblkid --disable-libmount \
+ --disable-libsmartcols --disable-libfdisk --disable-pylibmount \
+ --with-systemd \
+ --enable-logger \
+ "
+
+do_install_append () {
+ mv ${D}${bindir}/logger ${D}${bindir}/logger-systemd
+ rm -rf ${D}${sbindir}
+ rm -rf ${D}${base_libdir}
+ rm -rf ${D}${libdir}
+ rm -rf ${D}${datadir}
+}
diff --git a/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/avoid_parallel_tests.patch b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/avoid_parallel_tests.patch
new file mode 100644
index 000000000..748b6ef09
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/avoid_parallel_tests.patch
@@ -0,0 +1,20 @@
+Ptest needs buildtest-TESTS and runtest-TESTS targets.
+serial-tests is required to generate those targets.
+Revert run.sh script accordingly to serialize running tests
+
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+Upstream-Status: Inappropriate
+
+Index: util-linux-2.32/configure.ac
+===================================================================
+--- util-linux-2.32.orig/configure.ac
++++ util-linux-2.32/configure.ac
+@@ -11,7 +11,7 @@ AC_CONFIG_MACRO_DIR([m4])
+ dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run
+ dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors.
+ AC_USE_SYSTEM_EXTENSIONS
+-AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects])
++AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects serial-tests])
+
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+ [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
diff --git a/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/configure-sbindir.patch b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/configure-sbindir.patch
new file mode 100644
index 000000000..e475289f6
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/configure-sbindir.patch
@@ -0,0 +1,23 @@
+util-linux: take ${sbindir} from the environment if it is set there
+fix the test, the [ ] syntax was getting eaten by autoconf
+
+Signed-off-by: Phil Blundell <pb@pbcl.net>
+Signed-off-by: Saul Wold <sgw@linux.intel.com
+Upstream-Status: Inappropriate [configuration]
+
+Index: util-linux-2.31/configure.ac
+===================================================================
+--- util-linux-2.31.orig/configure.ac
++++ util-linux-2.31/configure.ac
+@@ -89,7 +89,10 @@ AC_SUBST([runstatedir])
+ usrbin_execdir='${exec_prefix}/bin'
+ AC_SUBST([usrbin_execdir])
+
+-usrsbin_execdir='${exec_prefix}/sbin'
++if test -z "$usrsbin_execdir" ;
++then
++ usrsbin_execdir='${exec_prefix}/sbin'
++fi
+ AC_SUBST([usrsbin_execdir])
+
+ AS_CASE([$libdir],
diff --git a/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/display_testname_for_subtest.patch b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/display_testname_for_subtest.patch
new file mode 100644
index 000000000..417ca1d98
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/display_testname_for_subtest.patch
@@ -0,0 +1,25 @@
+Display testname for subtest
+
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+Upstream-Status: Pending
+
+---
+ tests/functions.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/functions.sh b/tests/functions.sh
+index 5246605..b24dc15 100644
+--- a/tests/functions.sh
++++ b/tests/functions.sh
+@@ -320,7 +320,7 @@ function ts_init_subtest {
+
+ if [ "$TS_PARSABLE" != "yes" ]; then
+ [ $TS_NSUBTESTS -eq 1 ] && echo
+- printf "%16s: %-27s ..." "" "$TS_SUBNAME"
++ printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_SUBNAME"
+ fi
+ }
+
+--
+2.8.3
+
diff --git a/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/ptest.patch b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/ptest.patch
new file mode 100644
index 000000000..0537f7d85
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/ptest.patch
@@ -0,0 +1,23 @@
+Define TESTS variable
+
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+Upstream-Status: Pending
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index bbaccb1..7d5a6bb 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -48,6 +48,7 @@ systemdsystemunit_DATA =
+ dist_bashcompletion_DATA =
+ check_PROGRAMS =
+ dist_check_SCRIPTS =
++TESTS = $(check_PROGRAMS)
+
+ PATHFILES =
+
+--
+2.8.3
+
diff --git a/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/run-ptest b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/run-ptest
new file mode 100644
index 000000000..e135ee583
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/run-ptest
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+
+# When udevd (from eudev) is running most eject/mount tests will fail because
+# of automount. We need to stop udevd before executing util-linux's tests.
+# The systemd-udevd daemon doesn't change the outcome of util-linux's tests.
+UDEV_PID="`pidof "@base_sbindir@/udevd"`"
+if [ "x$UDEV_PID" != "x" ]; then
+ /etc/init.d/udev stop
+fi
+
+current_path=$(readlink -f $0)
+export bindir=$(dirname $current_path)
+export PATH=$bindir/bin:$PATH
+
+cd tests || exit 1
+
+comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort)
+
+
+echo
+echo "-------------------- util-linux regression tests --------------------"
+echo
+echo " For development purpose only. "
+echo " Don't execute on production system! "
+echo
+
+res=0
+count=0
+for ts in $comps;
+do
+ $ts | sed -u '{
+ s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/
+ s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/
+ s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/
+ }'
+done
+
+
+if [ "x$UDEV_PID" != "x" ]; then
+ /etc/init.d/udev start
+fi
+
diff --git a/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/runuser-l.pamd b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/runuser-l.pamd
new file mode 100644
index 000000000..4b368ccf5
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/runuser-l.pamd
@@ -0,0 +1,3 @@
+auth include runuser
+session optional pam_keyinit.so force revoke
+session include runuser
diff --git a/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/runuser.pamd b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/runuser.pamd
new file mode 100644
index 000000000..48d133b9e
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd/runuser.pamd
@@ -0,0 +1,4 @@
+auth sufficient pam_rootok.so
+session optional pam_keyinit.so revoke
+session required pam_limits.so
+session required pam_unix.so
diff --git a/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd_2.34.bb b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd_2.34.bb
new file mode 100644
index 000000000..b58628667
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd_2.34.bb
@@ -0,0 +1,12 @@
+require logger-systemd.inc
+
+SRC_URI += "file://configure-sbindir.patch \
+ file://runuser.pamd \
+ file://runuser-l.pamd \
+ file://ptest.patch \
+ file://run-ptest \
+ file://display_testname_for_subtest.patch \
+ file://avoid_parallel_tests.patch \
+"
+SRC_URI[md5sum] = "a78cbeaed9c39094b96a48ba8f891d50"
+SRC_URI[sha256sum] = "743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5" \ No newline at end of file