[ptxdist] [PATCH v2] ptxd_make_world_compile.sh: conditionally redirect stderr>stdout

2017-05-19 Thread jon
From: Jon Ringle 

I discovered after updating to a new version of ptxdist that all of my
compile output including errors/warnings are now all going to stdout
instead of having the errors/warning going to stderr.

This is causing some problem when I use qtcreator as my IDE because
qtcreator will only filter stderr for errors/warnings to put into the
Issues tab, where one can simply click on the error/warning and be taken
right to the source line where the error/warning is found.

I found that this problem was introduced by commit
30b9267e35eea1c2edb4da0231a428bfa25b6766

This patch will conditionally redirect stderr>stdout on compile output
if ptxdist has output synchronization enabled.

This small program demonstrates the behavior with this patch applied:

$ cat local_src/testprog/testprog.c
#include 
#include 

#error An error here
int main(int argc, char *argv[])
{
printf("Hello World, I'm testprog!\n");

exit(EXIT_SUCCESS);
}

$ ptxdist compile testprog >/dev/null
testprog.c:4:2: error: #error An error here
 #error An error here
  ^
make[1]: *** [testprog] Error 1
make: *** 
[/home/jringle-admin/code/gpec/ec1k-rootfs/platform-EC1K/state/testprog.compile]
 Error 2

$ ptxdist compile --output-sync testprog >/dev/null
make: *** 
[/home/jringle-admin/code/gpec/ec1k-rootfs/platform-EC1K/state/testprog.compile]
 Error 2

$ ptxdist compile --no-output-sync testprog >/dev/null
testprog.c:4:2: error: #error An error here
 #error An error here
  ^
make[1]: *** [testprog] Error 1
make: *** 
[/home/jringle-admin/code/gpec/ec1k-rootfs/platform-EC1K/state/testprog.compile]
 Error 2

Signed-off-by: Jon Ringle 
---

v2 just removes an extra line that was put in the previous version of the patch

 bin/ptxdist|  6 +-
 scripts/lib/ptxd_make_world_compile.sh | 10 ++
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/bin/ptxdist b/bin/ptxdist
index 1e3c53a..ed113c6 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -2383,6 +2383,7 @@ setup_config() {
 #  PTXDIST_PARALLELMFLAGS_INTERN
 #  PTXDIST_PARALLELMFLAGS_EXTERN
 #  PTXDIST_OUTPUT_SYNC
+#  PTXDIST_STDERR_REDIRECT
 #
 setup_parallel() {
# default no parallel for now
@@ -2415,10 +2416,12 @@ setup_parallel() {
fi
 
PTXDIST_OUTPUT_SYNC="${PTXDIST_OUTPUT_SYNC:-${PTXDIST_QUIET}}"
+   PTXDIST_STDERR_REDIRECT=2
if [ "${PTXDIST_OUTPUT_SYNC}" == "1" ]; then
if "${PTXCONF_SETUP_HOST_MAKE}" -h | grep -q -- --output-sync; 
then
PTXDIST_OUTPUT_SYNC="--output-sync="
fi
+   PTXDIST_STDERR_REDIRECT=1
fi
if [[ "${PTXDIST_OUTPUT_SYNC}" =~ [01] ]]; then
unset PTXDIST_OUTPUT_SYNC
@@ -2720,7 +2723,8 @@ setup_export() {
PTXDIST_OUTPUT_SYNC \
PTXDIST_PEDANTIC \
PTXDIST_QUIET \
-   PTXDIST_VERBOSE
+   PTXDIST_VERBOSE \
+   PTXDIST_STDERR_REDIRECT
 }
 
 
diff --git a/scripts/lib/ptxd_make_world_compile.sh 
b/scripts/lib/ptxd_make_world_compile.sh
index 9cc739e..cbaf355 100644
--- a/scripts/lib/ptxd_make_world_compile.sh
+++ b/scripts/lib/ptxd_make_world_compile.sh
@@ -11,6 +11,8 @@
 # call the compiler
 #
 ptxd_make_world_compile() {
+
+( exec 2>&${PTXDIST_STDERR_REDIRECT}
 ptxd_make_world_init &&
 
 if [ -z "${pkg_build_dir}" ]; then
@@ -28,7 +30,7 @@ ptxd_make_world_compile() {
"${ptx_build_python}" \
setup.py \
"${pkg_make_opt}"
-   ) 2>&1
+   )
;;
meson)
ptxd_eval \
@@ -37,7 +39,7 @@ ptxd_make_world_compile() {
"${pkg_make_env}" \
ninja -C "${pkg_build_dir}" \
"${pkg_make_opt}" \
-   "${pkg_make_par}" 2>&1
+   "${pkg_make_par}"
;;
*)
ptxd_eval \
@@ -46,8 +48,8 @@ ptxd_make_world_compile() {
"${pkg_make_env}" \
"${MAKE}" -C "${pkg_build_dir}" \
"${pkg_make_opt}" \
-   "${pkg_make_par}" 2>&1
+   "${pkg_make_par}"
;;
-esac
+esac )
 }
 export -f ptxd_make_world_compile
-- 
1.9.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 2/3] host-qt4: Enable openssl

2017-05-19 Thread jon
From: Jon Ringle 

The build breaks if with a bunch of QSslSocket errors such as:

undefined reference to `QSslSocket::staticMetaObject'

Signed-off-by: Jon Ringle 
---
 rules/host-qt4.in   | 1 +
 rules/host-qt4.make | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/host-qt4.in b/rules/host-qt4.in
index 1be8b4d..27503ac 100644
--- a/rules/host-qt4.in
+++ b/rules/host-qt4.in
@@ -2,6 +2,7 @@
 
 config HOST_QT4
tristate
+   select HOST_OPENSSL
select HOST_DBUSif HOST_QT4_DBUS
default ALLYES
 
diff --git a/rules/host-qt4.make b/rules/host-qt4.make
index 6e1b651..66fac05 100644
--- a/rules/host-qt4.make
+++ b/rules/host-qt4.make
@@ -69,7 +69,6 @@ HOST_QT4_AUTOCONF := \
-no-libtiff \
-no-gif \
-no-libjpeg \
-   -no-openssl \
-qt-zlib \
-no-freetype \
-stl \
-- 
1.9.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 3/3] ptxd_make_world_compile.sh: conditionally redirect stderr>stdout

2017-05-19 Thread jon
From: Jon Ringle 

I discovered after updating to a new version of ptxdist that all of my
compile output including errors/warnings are now all going to stdout
instead of having the errors/warning going to stderr.

This is causing some problem when I use qtcreator as my IDE because
qtcreator will only filter stderr for errors/warnings to put into the
Issues tab, where one can simply click on the error/warning and be taken
right to the source line where the error/warning is found.

I found that this problem was introduced by commit
30b9267e35eea1c2edb4da0231a428bfa25b6766

This patch will conditionally redirect stderr>stdout on compile output
if ptxdist has output synchronization enabled.

This small program demonstrates the behavior with this patch applied:

$ cat local_src/testprog/testprog.c
#include 
#include 

#error An error here
int main(int argc, char *argv[])
{
printf("Hello World, I'm testprog!\n");

exit(EXIT_SUCCESS);
}

$ ptxdist compile testprog >/dev/null
testprog.c:4:2: error: #error An error here
 #error An error here
  ^
make[1]: *** [testprog] Error 1
make: *** 
[/home/jringle-admin/code/gpec/ec1k-rootfs/platform-EC1K/state/testprog.compile]
 Error 2

$ ptxdist compile --output-sync testprog >/dev/null
make: *** 
[/home/jringle-admin/code/gpec/ec1k-rootfs/platform-EC1K/state/testprog.compile]
 Error 2

$ ptxdist compile --no-output-sync testprog >/dev/null
testprog.c:4:2: error: #error An error here
 #error An error here
  ^
make[1]: *** [testprog] Error 1
make: *** 
[/home/jringle-admin/code/gpec/ec1k-rootfs/platform-EC1K/state/testprog.compile]
 Error 2

Signed-off-by: Jon Ringle 
---
 bin/ptxdist|  7 ++-
 scripts/lib/ptxd_make_world_compile.sh | 10 ++
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/bin/ptxdist b/bin/ptxdist
index 1e3c53a..7a5b0e4 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -2383,6 +2383,7 @@ setup_config() {
 #  PTXDIST_PARALLELMFLAGS_INTERN
 #  PTXDIST_PARALLELMFLAGS_EXTERN
 #  PTXDIST_OUTPUT_SYNC
+#  PTXDIST_STDERR_REDIRECT
 #
 setup_parallel() {
# default no parallel for now
@@ -2415,15 +2416,18 @@ setup_parallel() {
fi
 
PTXDIST_OUTPUT_SYNC="${PTXDIST_OUTPUT_SYNC:-${PTXDIST_QUIET}}"
+   PTXDIST_STDERR_REDIRECT=2
if [ "${PTXDIST_OUTPUT_SYNC}" == "1" ]; then
if "${PTXCONF_SETUP_HOST_MAKE}" -h | grep -q -- --output-sync; 
then
PTXDIST_OUTPUT_SYNC="--output-sync="
fi
+   PTXDIST_STDERR_REDIRECT=1
fi
if [[ "${PTXDIST_OUTPUT_SYNC}" =~ [01] ]]; then
unset PTXDIST_OUTPUT_SYNC
fi
 
+
#
# user may override these, via cmdline
#
@@ -2720,7 +2724,8 @@ setup_export() {
PTXDIST_OUTPUT_SYNC \
PTXDIST_PEDANTIC \
PTXDIST_QUIET \
-   PTXDIST_VERBOSE
+   PTXDIST_VERBOSE \
+   PTXDIST_STDERR_REDIRECT
 }
 
 
diff --git a/scripts/lib/ptxd_make_world_compile.sh 
b/scripts/lib/ptxd_make_world_compile.sh
index 9cc739e..cbaf355 100644
--- a/scripts/lib/ptxd_make_world_compile.sh
+++ b/scripts/lib/ptxd_make_world_compile.sh
@@ -11,6 +11,8 @@
 # call the compiler
 #
 ptxd_make_world_compile() {
+
+( exec 2>&${PTXDIST_STDERR_REDIRECT}
 ptxd_make_world_init &&
 
 if [ -z "${pkg_build_dir}" ]; then
@@ -28,7 +30,7 @@ ptxd_make_world_compile() {
"${ptx_build_python}" \
setup.py \
"${pkg_make_opt}"
-   ) 2>&1
+   )
;;
meson)
ptxd_eval \
@@ -37,7 +39,7 @@ ptxd_make_world_compile() {
"${pkg_make_env}" \
ninja -C "${pkg_build_dir}" \
"${pkg_make_opt}" \
-   "${pkg_make_par}" 2>&1
+   "${pkg_make_par}"
;;
*)
ptxd_eval \
@@ -46,8 +48,8 @@ ptxd_make_world_compile() {
"${pkg_make_env}" \
"${MAKE}" -C "${pkg_build_dir}" \
"${pkg_make_opt}" \
-   "${pkg_make_par}" 2>&1
+   "${pkg_make_par}"
;;
-esac
+esac )
 }
 export -f ptxd_make_world_compile
-- 
1.9.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 1/3] f2fs-tools: version bump 1.6.1 -> 1.8.0

2017-05-19 Thread jon
From: Jon Ringle 

Signed-off-by: Jon Ringle 
---
 patches/f2fs-tools-1.6.1/autogen.sh | 1 -
 patches/f2fs-tools-1.8.0/autogen.sh | 1 +
 rules/f2fs-tools.make   | 4 ++--
 3 files changed, 3 insertions(+), 3 deletions(-)
 delete mode 12 patches/f2fs-tools-1.6.1/autogen.sh
 create mode 12 patches/f2fs-tools-1.8.0/autogen.sh

diff --git a/patches/f2fs-tools-1.6.1/autogen.sh 
b/patches/f2fs-tools-1.6.1/autogen.sh
deleted file mode 12
index 9f8a4cb..000
--- a/patches/f2fs-tools-1.6.1/autogen.sh
+++ /dev/null
@@ -1 +0,0 @@
-../autogen.sh
\ No newline at end of file
diff --git a/patches/f2fs-tools-1.8.0/autogen.sh 
b/patches/f2fs-tools-1.8.0/autogen.sh
new file mode 12
index 000..9f8a4cb
--- /dev/null
+++ b/patches/f2fs-tools-1.8.0/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/rules/f2fs-tools.make b/rules/f2fs-tools.make
index 1aa8675..756b159 100644
--- a/rules/f2fs-tools.make
+++ b/rules/f2fs-tools.make
@@ -18,8 +18,8 @@ endif
 #
 # Paths and names
 #
-F2FS_TOOLS_VERSION := 1.6.1
-F2FS_TOOLS_MD5 := f4fe0b59ffef1eef71c20d12381a3054
+F2FS_TOOLS_VERSION := 1.8.0
+F2FS_TOOLS_MD5 := d4132ab388d30da729cb270aeac32bf1
 F2FS_TOOLS := f2fs-tools-$(F2FS_TOOLS_VERSION)
 F2FS_TOOLS_SUFFIX  := tar.xz
 F2FS_TOOLS_URL := 
git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git;tag=v$(F2FS_TOOLS_VERSION)
-- 
1.9.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH] stress: add new package: workload generator for POSIX systems

2017-05-19 Thread Roland Hieber
---
 Changes since v3:
 - use MAKEINFO=: in prepare stage instead of patching Makefiles
 - bring back section header for prepare stage

Signed-off-by: Roland Hieber 
---
 rules/stress.in   |  9 
 rules/stress.make | 64 +++
 2 files changed, 73 insertions(+)
 create mode 100644 rules/stress.in
 create mode 100644 rules/stress.make

diff --git a/rules/stress.in b/rules/stress.in
new file mode 100644
index 000..d8b2213
--- /dev/null
+++ b/rules/stress.in
@@ -0,0 +1,9 @@
+## SECTION=test_suites
+
+config STRESS
+   tristate
+   prompt "stress"
+   help
+ stress is a deliberately simple workload generator for POSIX
+ systems. It imposes a configurable amount of CPU, memory, I/O, and
+ disk stress on the system.
diff --git a/rules/stress.make b/rules/stress.make
new file mode 100644
index 000..3e57204
--- /dev/null
+++ b/rules/stress.make
@@ -0,0 +1,64 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Roland Hieber 
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_STRESS) += stress
+
+#
+# Paths and names
+#
+STRESS_VERSION := 1.0.4
+STRESS_MD5 := 890a4236dd1656792f3ef9a190cf99ef
+STRESS := stress-$(STRESS_VERSION)
+STRESS_SUFFIX  := tar.gz
+STRESS_URL := 
https://people.seas.harvard.edu/~apw/stress/$(STRESS).$(STRESS_SUFFIX)
+STRESS_SOURCE  := $(SRCDIR)/$(STRESS).$(STRESS_SUFFIX)
+STRESS_DIR := $(BUILDDIR)/$(STRESS)
+STRESS_LICENSE := GPL-2.0+
+
+# 
+# Prepare
+# 
+
+#
+# autoconf
+#
+STRESS_CONF_TOOL   := autoconf
+STRESS_CONF_OPT:= \
+   $(CROSS_AUTOCONF_USR) \
+   --disable-dependency-tracking
+
+# prevent errors when building the documentation, which is not installed 
anyways
+STRESS_CONF_ENV:= \
+   $(CROSS_ENV) \
+   MAKEINFO=:
+
+# 
+# Target-Install
+# 
+
+$(STATEDIR)/stress.targetinstall:
+   @$(call targetinfo)
+
+   @$(call install_init, stress)
+   @$(call install_fixup, stress,PRIORITY,optional)
+   @$(call install_fixup, stress,SECTION,base)
+   @$(call install_fixup, stress,AUTHOR,"Roland Hieber 
")
+   @$(call install_fixup, stress,DESCRIPTION,missing)
+
+   @$(call install_copy, stress, 0, 0, 0755, -, /usr/bin/stress)
+
+   @$(call install_finish, stress)
+
+   @$(call touch)
+
+# vim: syntax=make
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH v3] stress: add new package: workload generator for POSIX systems

2017-05-19 Thread Roland Hieber

On 18.05.2017 14:38, Michael Olbrich wrote:

I looked a bit closer at the source. Add this to the rule and you should be
able to drop the patch:

STRESS_CONF_ENV := \
$(CROSS_ENV) \
MAKEINFO=:


Oh yes, that is a much more elegant solution.


 - Roland

___
ptxdist mailing list
ptxdist@pengutronix.de