* [Buildroot] [PATCH] util-linux: build schedutils without enabling basic binaries
2017-02-13 4:21 ` [Buildroot] [Bug 9656] util-linux: " bugzilla at busybox.net
@ 2017-02-18 20:06 ` Carlos Santos
2017-02-18 20:26 ` Baruch Siach
2017-02-18 20:45 ` [Buildroot] [PATCH v2] " Carlos Santos
2017-02-20 17:05 ` [Buildroot] [PATCH v3] " Carlos Santos
2 siblings, 1 reply; 11+ messages in thread
From: Carlos Santos @ 2017-02-18 20:06 UTC (permalink / raw)
To: buildroot
Pull a patch already sent upstream tp fix AM_CONDITIONAL parameters that
conditioned the build of ionice, taskset an chrt to the wrong variable.
Fixes:
https://bugs.busybox.net/show_bug.cgi?id=9656
https://github.com/karelzak/util-linux/issues/415
Reported-by: Aaron Holtzman <aholtzma@gmail.com>
Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
---
...build-when-configured-with-disable-all-pr.patch | 52 ++++++++++++++++++++++
1 file changed, 52 insertions(+)
create mode 100644 package/util-linux/0003-schedutils-build-when-configured-with-disable-all-pr.patch
diff --git a/package/util-linux/0003-schedutils-build-when-configured-with-disable-all-pr.patch b/package/util-linux/0003-schedutils-build-when-configured-with-disable-all-pr.patch
new file mode 100644
index 0000000..812927e
--- /dev/null
+++ b/package/util-linux/0003-schedutils-build-when-configured-with-disable-all-pr.patch
@@ -0,0 +1,52 @@
+From e1578c3d32cc9f817f19729b5eee21e49b639185 Mon Sep 17 00:00:00 2001
+From: Carlos Santos <casantos@datacom.ind.br>
+Date: Sat, 18 Feb 2017 17:23:37 -0200
+Subject: [PATCH] schedutils: build when configured with --disable-all-programs
+
+Fix AM_CONDITIONAL parameters that conditioned ionice, taskset an chrt
+to the values of build_{ionice,taskset,chrt} respectively, instead of
+build_schedutils.
+
+Fixes:
+ https://bugs.busybox.net/show_bug.cgi?id=9656
+ https://github.com/karelzak/util-linux/issues/415
+
+Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ad241fe..1933741 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1935,7 +1935,7 @@ UL_REQUIRES_SYSCALL_CHECK([ionice],
+ [x86_64*], [252])],
+ [ioprio_get])
+
+-AM_CONDITIONAL([BUILD_IONICE], [test "x$build_ionice" = xyes])
++AM_CONDITIONAL([BUILD_IONICE], [test "x$build_schedutils" = xyes])
+
+ UL_BUILD_INIT([taskset], [check])
+ UL_REQUIRES_BUILD([taskset], [schedutils])
+@@ -1943,7 +1943,7 @@ UL_REQUIRES_HAVE([taskset], [cpu_set_t], [cpu_set_t type])
+ UL_REQUIRES_SYSCALL_CHECK([taskset],
+ [UL_CHECK_SYSCALL([sched_getaffinity])],
+ [sched_getaffinity])
+-AM_CONDITIONAL([BUILD_TASKSET], [test "x$build_taskset" = xyes])
++AM_CONDITIONAL([BUILD_TASKSET], [test "x$build_schedutils" = xyes])
+
+
+ have_schedsetter=no
+@@ -1953,7 +1953,7 @@ AS_IF([test "x$ac_cv_func_sched_setscheduler" = xyes], [have_schedsetter=yes],
+ UL_BUILD_INIT([chrt], [check])
+ UL_REQUIRES_BUILD([chrt], [schedutils])
+ UL_REQUIRES_HAVE([chrt], [schedsetter], [sched_set functions])
+-AM_CONDITIONAL([BUILD_CHRT], [test "x$build_chrt" = xyes])
++AM_CONDITIONAL([BUILD_CHRT], [test "x$build_schedutils" = xyes])
+
+ AS_IF([test "x$build_chrt" = xyes], [
+ UL_CHECK_SYSCALL([sched_setattr])
+--
+2.7.4
+
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] util-linux: build schedutils without enabling basic binaries
2017-02-18 20:06 ` [Buildroot] [PATCH] util-linux: build schedutils without " Carlos Santos
@ 2017-02-18 20:26 ` Baruch Siach
0 siblings, 0 replies; 11+ messages in thread
From: Baruch Siach @ 2017-02-18 20:26 UTC (permalink / raw)
To: buildroot
Hi Carlos,
On Sat, Feb 18, 2017 at 06:06:41PM -0200, Carlos Santos wrote:
> Pull a patch already sent upstream tp fix AM_CONDITIONAL parameters that
> conditioned the build of ionice, taskset an chrt to the wrong variable.
>
> Fixes:
> https://bugs.busybox.net/show_bug.cgi?id=9656
> https://github.com/karelzak/util-linux/issues/415
>
> Reported-by: Aaron Holtzman <aholtzma@gmail.com>
> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
> ---
> ...build-when-configured-with-disable-all-pr.patch | 52 ++++++++++++++++++++++
> 1 file changed, 52 insertions(+)
> create mode 100644 package/util-linux/0003-schedutils-build-when-configured-with-disable-all-pr.patch
>
> diff --git a/package/util-linux/0003-schedutils-build-when-configured-with-disable-all-pr.patch b/package/util-linux/0003-schedutils-build-when-configured-with-disable-all-pr.patch
> new file mode 100644
> index 0000000..812927e
> --- /dev/null
> +++ b/package/util-linux/0003-schedutils-build-when-configured-with-disable-all-pr.patch
> @@ -0,0 +1,52 @@
> +From e1578c3d32cc9f817f19729b5eee21e49b639185 Mon Sep 17 00:00:00 2001
> +From: Carlos Santos <casantos@datacom.ind.br>
> +Date: Sat, 18 Feb 2017 17:23:37 -0200
> +Subject: [PATCH] schedutils: build when configured with --disable-all-programs
> +
> +Fix AM_CONDITIONAL parameters that conditioned ionice, taskset an chrt
> +to the values of build_{ionice,taskset,chrt} respectively, instead of
> +build_schedutils.
> +
> +Fixes:
> + https://bugs.busybox.net/show_bug.cgi?id=9656
> + https://github.com/karelzak/util-linux/issues/415
> +
> +Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
> +---
> + configure.ac | 6 +++---
Please update the _AUTORECONF comment in util-linux.mk.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH v2] util-linux: build schedutils without enabling basic binaries
2017-02-13 4:21 ` [Buildroot] [Bug 9656] util-linux: " bugzilla at busybox.net
2017-02-18 20:06 ` [Buildroot] [PATCH] util-linux: build schedutils without " Carlos Santos
@ 2017-02-18 20:45 ` Carlos Santos
2017-02-20 17:05 ` [Buildroot] [PATCH v3] " Carlos Santos
2 siblings, 0 replies; 11+ messages in thread
From: Carlos Santos @ 2017-02-18 20:45 UTC (permalink / raw)
To: buildroot
Pull a patch already sent upstream tp fix AM_CONDITIONAL parameters that
conditioned the build of ionice, taskset an chrt to the wrong variable.
Fixes:
https://bugs.busybox.net/show_bug.cgi?id=9656
https://github.com/karelzak/util-linux/issues/415
Reported-by: Aaron Holtzman <aholtzma@gmail.com>
Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
---
...build-when-configured-with-disable-all-pr.patch | 52 ++++++++++++++++++++++
package/util-linux/util-linux.mk | 4 +-
2 files changed, 54 insertions(+), 2 deletions(-)
create mode 100644 package/util-linux/0003-schedutils-build-when-configured-with-disable-all-pr.patch
diff --git a/package/util-linux/0003-schedutils-build-when-configured-with-disable-all-pr.patch b/package/util-linux/0003-schedutils-build-when-configured-with-disable-all-pr.patch
new file mode 100644
index 0000000..812927e
--- /dev/null
+++ b/package/util-linux/0003-schedutils-build-when-configured-with-disable-all-pr.patch
@@ -0,0 +1,52 @@
+From e1578c3d32cc9f817f19729b5eee21e49b639185 Mon Sep 17 00:00:00 2001
+From: Carlos Santos <casantos@datacom.ind.br>
+Date: Sat, 18 Feb 2017 17:23:37 -0200
+Subject: [PATCH] schedutils: build when configured with --disable-all-programs
+
+Fix AM_CONDITIONAL parameters that conditioned ionice, taskset an chrt
+to the values of build_{ionice,taskset,chrt} respectively, instead of
+build_schedutils.
+
+Fixes:
+ https://bugs.busybox.net/show_bug.cgi?id=9656
+ https://github.com/karelzak/util-linux/issues/415
+
+Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ad241fe..1933741 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1935,7 +1935,7 @@ UL_REQUIRES_SYSCALL_CHECK([ionice],
+ [x86_64*], [252])],
+ [ioprio_get])
+
+-AM_CONDITIONAL([BUILD_IONICE], [test "x$build_ionice" = xyes])
++AM_CONDITIONAL([BUILD_IONICE], [test "x$build_schedutils" = xyes])
+
+ UL_BUILD_INIT([taskset], [check])
+ UL_REQUIRES_BUILD([taskset], [schedutils])
+@@ -1943,7 +1943,7 @@ UL_REQUIRES_HAVE([taskset], [cpu_set_t], [cpu_set_t type])
+ UL_REQUIRES_SYSCALL_CHECK([taskset],
+ [UL_CHECK_SYSCALL([sched_getaffinity])],
+ [sched_getaffinity])
+-AM_CONDITIONAL([BUILD_TASKSET], [test "x$build_taskset" = xyes])
++AM_CONDITIONAL([BUILD_TASKSET], [test "x$build_schedutils" = xyes])
+
+
+ have_schedsetter=no
+@@ -1953,7 +1953,7 @@ AS_IF([test "x$ac_cv_func_sched_setscheduler" = xyes], [have_schedsetter=yes],
+ UL_BUILD_INIT([chrt], [check])
+ UL_REQUIRES_BUILD([chrt], [schedutils])
+ UL_REQUIRES_HAVE([chrt], [schedsetter], [sched_set functions])
+-AM_CONDITIONAL([BUILD_CHRT], [test "x$build_chrt" = xyes])
++AM_CONDITIONAL([BUILD_CHRT], [test "x$build_schedutils" = xyes])
+
+ AS_IF([test "x$build_chrt" = xyes], [
+ UL_CHECK_SYSCALL([sched_setattr])
+--
+2.7.4
+
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 441c252..f991b44 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -8,8 +8,8 @@ UTIL_LINUX_VERSION_MAJOR = 2.29
UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).1
UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz
UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR)
-# For 0001-build-sys-use-lm-for-scriptreplay-if-necessary.patch and
-# 0002-build-sys-improve-detection-of-the-isnan-function-in.patch
+
+# Required because of the patches for configure.ac.
UTIL_LINUX_AUTORECONF = YES
# README.licensing claims that some files are GPLv2-only, but this is not true.
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH v3] util-linux: build schedutils without enabling basic binaries
2017-02-13 4:21 ` [Buildroot] [Bug 9656] util-linux: " bugzilla at busybox.net
2017-02-18 20:06 ` [Buildroot] [PATCH] util-linux: build schedutils without " Carlos Santos
2017-02-18 20:45 ` [Buildroot] [PATCH v2] " Carlos Santos
@ 2017-02-20 17:05 ` Carlos Santos
2017-02-20 20:43 ` Thomas Petazzoni
2 siblings, 1 reply; 11+ messages in thread
From: Carlos Santos @ 2017-02-20 17:05 UTC (permalink / raw)
To: buildroot
Pull an upstream fix to allow building schedutils (ionice, taskset,
chrt) when util-linux is configured with
$ configure --disable-all-programs --enable-schedutils
Fixes:
https://bugs.busybox.net/show_bug.cgi?id=9656
Reported-by: Aaron Holtzman <aholtzma@gmail.com>
Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
---
Changes v1->v2
Update comment explaining why we need UTIL_LINUX_AUTORECONF = YES
Changes v2->v3
Pull full patch, as applied upstream by Karel Zak
Clean-up commit message
---
...ix-disable-all-programs-enable-schedutils.patch | 99 ++++++++++++++++++++++
package/util-linux/util-linux.mk | 4 +-
2 files changed, 101 insertions(+), 2 deletions(-)
create mode 100644 package/util-linux/0003-build-sys-fix-disable-all-programs-enable-schedutils.patch
diff --git a/package/util-linux/0003-build-sys-fix-disable-all-programs-enable-schedutils.patch b/package/util-linux/0003-build-sys-fix-disable-all-programs-enable-schedutils.patch
new file mode 100644
index 0000000..bf19e10
--- /dev/null
+++ b/package/util-linux/0003-build-sys-fix-disable-all-programs-enable-schedutils.patch
@@ -0,0 +1,99 @@
+From 6f2eb03433bcb2d3c351efed848a1f8554a7ff78 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Mon, 20 Feb 2017 14:17:37 +0100
+Subject: [PATCH] build-sys: fix --disable-all-programs --enable-schedutils
+
+* add UL_ENABLE_ALIAS(NAME, MASTERNAME) to initialize $enable_<name>
+ according to MASTERNAME. Note that we have to use $build_<mastername>,
+ the $enable_<mastername> is just AC_ARG_ENABLE() stuff only. The
+ $build_ is evaluated and modified by our UL_...() functions.
+
+* add enable-schedutils.conf to have build-system regression test for
+ this use-case
+
+Addresses: https://github.com/karelzak/util-linux/issues/415
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ configure.ac | 14 ++++++++------
+ m4/ul.m4 | 15 +++++++++++++++
+ tools/config-gen.d/enable-schedutils.conf | 3 +++
+ 3 files changed, 26 insertions(+), 6 deletions(-)
+ create mode 100644 tools/config-gen.d/enable-schedutils.conf
+
+diff --git a/configure.ac b/configure.ac
+index ad241fe..be282f0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1909,8 +1909,9 @@ AC_ARG_ENABLE([schedutils],
+ )
+ UL_BUILD_INIT([schedutils])
+
+-UL_BUILD_INIT([ionice], [check])
+-UL_REQUIRES_BUILD([ionice], [schedutils])
++
++UL_ENABLE_ALIAS([ionice], [schedutils])
++UL_BUILD_INIT([ionice])
+ UL_REQUIRES_SYSCALL_CHECK([ionice],
+ [UL_CHECK_SYSCALL([ioprio_set],
+ [alpha], [442],
+@@ -1937,8 +1938,9 @@ UL_REQUIRES_SYSCALL_CHECK([ionice],
+
+ AM_CONDITIONAL([BUILD_IONICE], [test "x$build_ionice" = xyes])
+
+-UL_BUILD_INIT([taskset], [check])
+-UL_REQUIRES_BUILD([taskset], [schedutils])
++
++UL_ENABLE_ALIAS([taskset], [schedutils])
++UL_BUILD_INIT([taskset])
+ UL_REQUIRES_HAVE([taskset], [cpu_set_t], [cpu_set_t type])
+ UL_REQUIRES_SYSCALL_CHECK([taskset],
+ [UL_CHECK_SYSCALL([sched_getaffinity])],
+@@ -1950,8 +1952,8 @@ have_schedsetter=no
+ AS_IF([test "x$ac_cv_func_sched_setscheduler" = xyes], [have_schedsetter=yes],
+ [test "x$ac_cv_func_sched_setattr" = xyes], [have_schedsetter=yes])
+
+-UL_BUILD_INIT([chrt], [check])
+-UL_REQUIRES_BUILD([chrt], [schedutils])
++UL_ENABLE_ALIAS([chrt], [schedutils])
++UL_BUILD_INIT([chrt])
+ UL_REQUIRES_HAVE([chrt], [schedsetter], [sched_set functions])
+ AM_CONDITIONAL([BUILD_CHRT], [test "x$build_chrt" = xyes])
+
+diff --git a/m4/ul.m4 b/m4/ul.m4
+index f8a0dd7..ed7227c 100644
+--- a/m4/ul.m4
++++ b/m4/ul.m4
+@@ -429,6 +429,21 @@ AC_DEFUN([UL_DEFAULT_ENABLE], [
+ fi
+ ])
+
++
++dnl UL_ENABLE_ALIAS(NAME, MASTERNAME)
++dnl
++dnl Initializes $enable_<name> variable according to $build_<mastername>. This
++dnl is usefull for example if you want to use one --enable-mastername option
++dnl for group of programs.
++dnl
++AC_DEFUN([UL_ENABLE_ALIAS], [
++ m4_define([suffix], $1)
++ m4_define([mastersuffix], $2)
++
++ enable_[]suffix=$build_[]mastersuffix
++])
++
++
+ dnl UL_NCURSES_CHECK(NAME)
+ dnl
+ dnl Initializes $have_<name>, NCURSES_LIBS and NCURSES_CFLAGS variables according to
+diff --git a/tools/config-gen.d/enable-schedutils.conf b/tools/config-gen.d/enable-schedutils.conf
+new file mode 100644
+index 0000000..08deee4
+--- /dev/null
++++ b/tools/config-gen.d/enable-schedutils.conf
+@@ -0,0 +1,3 @@
++include:disable-all.conf
++
++--enable-schedutils
+--
+2.7.4
+
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 441c252..f991b44 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -8,8 +8,8 @@ UTIL_LINUX_VERSION_MAJOR = 2.29
UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).1
UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz
UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR)
-# For 0001-build-sys-use-lm-for-scriptreplay-if-necessary.patch and
-# 0002-build-sys-improve-detection-of-the-isnan-function-in.patch
+
+# Required because of the patches for configure.ac.
UTIL_LINUX_AUTORECONF = YES
# README.licensing claims that some files are GPLv2-only, but this is not true.
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH v3] util-linux: build schedutils without enabling basic binaries
2017-02-20 17:05 ` [Buildroot] [PATCH v3] " Carlos Santos
@ 2017-02-20 20:43 ` Thomas Petazzoni
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2017-02-20 20:43 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 20 Feb 2017 14:05:35 -0300, Carlos Santos wrote:
> Pull an upstream fix to allow building schedutils (ionice, taskset,
> chrt) when util-linux is configured with
>
> $ configure --disable-all-programs --enable-schedutils
>
> Fixes:
> https://bugs.busybox.net/show_bug.cgi?id=9656
>
> Reported-by: Aaron Holtzman <aholtzma@gmail.com>
> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
> ---
> Changes v1->v2
> Update comment explaining why we need UTIL_LINUX_AUTORECONF = YES
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread