* [Buildroot] [git commit] docs/manual: small fixes and enhancements to adding generic packages
From: Peter Korsgaard @ 2012-12-30 21:39 UTC (permalink / raw)
To: buildroot
commit: http://git.buildroot.net/buildroot/commit/?id=f1d44593a04ff3be981c8a3b01a502f0b18193ee
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Add overall description of LIBFOO_DEVICES and LIBFOO_PERMISSIONS.
Fix line numbers.
Cc: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
docs/manual/adding-packages-generic.txt | 32 +++++++++++++++++++-----------
1 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt
index 6c1c35e..0759d4f 100644
--- a/docs/manual/adding-packages-generic.txt
+++ b/docs/manual/adding-packages-generic.txt
@@ -53,30 +53,32 @@ system is based on hand-written Makefiles or shell scripts.
37: $(eval $(generic-package))
--------------------------------
-The Makefile begins on line 6 to 8 with metadata information: the
+The Makefile begins on line 6 to 10 with metadata information: the
version of the package (+LIBFOO_VERSION+), the name of the
-tarball containing the package (+LIBFOO_SOURCE+) and the
-Internet location at which the tarball can be downloaded
-(+LIBFOO_SITE+). All variables must start with the same prefix,
-+LIBFOO_+ in this case. This prefix is always the uppercased
-version of the package name (see below to understand where the package
-name is defined).
-
-On line 9, we specify that this package wants to install something to
+tarball containing the package (+LIBFOO_SOURCE+) the
+Internet location at which the tarball can be downloaded from
+(+LIBFOO_SITE+), the license (+LIBFOO_LICENSE+) and file with the
+license text (+LIBFOO_LICENSE_FILES+). All variables must start with
+the same prefix, +LIBFOO_+ in this case. This prefix is always the
+uppercased version of the package name (see below to understand where
+the package name is defined).
+
+On line 11, we specify that this package wants to install something to
the staging space. This is often needed for libraries, since they must
install header files and other development files in the staging space.
This will ensure that the commands listed in the
+LIBFOO_INSTALL_STAGING_CMDS+ variable will be executed.
-On line 10, we specify the list of dependencies this package relies
+On line 12, we specify the list of dependencies this package relies
on. These dependencies are listed in terms of lower-case package names,
which can be packages for the target (without the +host-+
prefix) or packages for the host (with the +host-+) prefix).
Buildroot will ensure that all these packages are built and installed
'before' the current package starts its configuration.
-The rest of the Makefile defines what should be done at the different
-steps of the package configuration, compilation and installation.
+The rest of the Makefile, lines 14..27, defines what should be done
+at the different steps of the package configuration, compilation and
+installation.
+LIBFOO_BUILD_CMDS+ tells what steps should be performed to
build the package. +LIBFOO_INSTALL_STAGING_CMDS+ tells what
steps should be performed to install the package in the staging space.
@@ -87,7 +89,13 @@ All these steps rely on the +$(@D)+ variable, which
contains the directory where the source code of the package has been
extracted.
-Finally, on line 35, we call the +generic-package+ which
+On line 29..31, we define a device-node file used by this package
+(+LIBFOO_DEVICES+).
+
+On line 33..35, we define the permissions to set to specific files
+installed by this package (+LIBFOO_PERMISSIONS+).
+
+Finally, on line 37, we call the +generic-package+ function, which
generates, according to the variables defined previously, all the
Makefile code necessary to make your package working.
^ permalink raw reply related
* [Buildroot] [PATCH] docs/manual: small fixes and enhancements to adding generic packages
From: Peter Korsgaard @ 2012-12-30 21:39 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1356900441-15304-1-git-send-email-yann.morin.1998@free.fr>
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
Yann> Add overall description of LIBFOO_DEVICES and LIBFOO_PERMISSIONS.
Yann> Fix line numbers.
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply
* [Buildroot] [PATCH] system/skeleton: add the shadow-group file
From: Yann E. MORIN @ 2012-12-30 21:55 UTC (permalink / raw)
To: buildroot
/etc/gshadow is to /etc/group what /etc/shadow is to /etc/passwd.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
system/skeleton/etc/gshadow | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
create mode 100644 system/skeleton/etc/gshadow
diff --git a/system/skeleton/etc/gshadow b/system/skeleton/etc/gshadow
new file mode 100644
index 0000000..0af6dad
--- /dev/null
+++ b/system/skeleton/etc/gshadow
@@ -0,0 +1,21 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::
+adm:*::
+tty:*::
+disk:*::
+wheel:*::
+audio:*::
+www-data:*::
+utmp:*::
+staff:*::
+lock:*::
+haldaemon:*::
+dbus:*::
+netdev:*::
+ftp:*::
+nobody:*::
+nogroup:*::
+users:*::
+default:*::
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 1/8] matchbox-lib: fix license info
From: Thomas Petazzoni @ 2012-12-30 22:09 UTC (permalink / raw)
To: buildroot
In-Reply-To: <d624c5b2d5dad59e45c49cc41a40266430020751.1356903063.git.s.martin49@gmail.com>
Dear Samuel Martin,
On Sun, 30 Dec 2012 22:33:25 +0100, Samuel Martin wrote:
> ---
> package/matchbox/matchbox-lib/matchbox-lib.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [PATCH 3/8] package/Makefile.in: update/fix HOST_PATH variable
From: Thomas Petazzoni @ 2012-12-30 22:11 UTC (permalink / raw)
To: buildroot
In-Reply-To: <0a056ec61043dcada1eab6ab7e7ec4de25743bfd.1356903063.git.s.martin49@gmail.com>
Dear Samuel Martin,
On Sun, 30 Dec 2012 22:33:27 +0100, Samuel Martin wrote:
> ---
> package/Makefile.in | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/Makefile.in b/package/Makefile.in
> index cc8f320..dd04e25 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -165,7 +165,7 @@ HOST_CFLAGS ?= -O2
> HOST_CFLAGS += $(HOST_CPPFLAGS)
> HOST_CXXFLAGS += $(HOST_CFLAGS)
> HOST_LDFLAGS += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/usr/lib
> -HOST_PATH=$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(PATH)
> +HOST_PATH="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)"
Why?
For such core changes, a commit message of "update/fix something" is
definitely not enough. A detailed explanation is needed.
Thanks!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [PATCH 4/8] package/pkg-cmake.mk: make sure $(HOST_PATH) is in the PATH at configure time
From: Thomas Petazzoni @ 2012-12-30 22:14 UTC (permalink / raw)
To: buildroot
In-Reply-To: <5e67b559958501e38ddd579c1fce3b18cd363ad2.1356903063.git.s.martin49@gmail.com>
Dear Samuel Martin,
On Sun, 30 Dec 2012 22:33:28 +0100, Samuel Martin wrote:
> ---
> package/pkg-cmake.mk | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
> index 626a0b0..1e8302f 100644
> --- a/package/pkg-cmake.mk
> +++ b/package/pkg-cmake.mk
> @@ -62,7 +62,8 @@ ifeq ($(5),target)
> define $(2)_CONFIGURE_CMDS
> (cd $$($$(PKG)_BUILDDIR) && \
> rm -f CMakeCache.txt && \
> - $$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
> + PATH="$(TARGET_PATH)" $$($$(PKG)_CONF_ENV) \
> + $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
> -DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
> -DCMAKE_INSTALL_PREFIX="/usr" \
> $$($$(PKG)_CONF_OPT) \
> @@ -74,7 +75,7 @@ else
> define $(2)_CONFIGURE_CMDS
> (cd $$($$(PKG)_BUILDDIR) && \
> rm -f CMakeCache.txt && \
> - $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
> + PATH="$(HOST_PATH)" $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
> -DCMAKE_INSTALL_SO_NO_EXE=0 \
> -DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \
> -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" \
In fact, with your previous patch TARGET_PATH becomes equal to
HOST_PATH. And I find the name TARGET_PATH to be misleading. Maybe we
should just refactor that in a single variable instead?
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [pull request] Pull request for branch for-master/lttng
From: Samuel Martin @ 2012-12-30 22:17 UTC (permalink / raw)
To: buildroot
Hello,
Here is version bump for Lttng and related packages.
The following changes since commit f1d44593a04ff3be981c8a3b01a502f0b18193ee:
docs/manual: small fixes and enhancements to adding generic packages (2012-12-30 22:39:13 +0100)
are available in the git repository at:
git at github.com:tSed/buildroot.git for-master/lttng
for you to fetch changes up to 192d7031d43a55c00114dbb0bc54b697e4baf02e:
lttng-babeltrace: bump to 1.0.0 (2012-12-30 23:04:51 +0100)
----------------------------------------------------------------
Samuel Martin (4):
lttng-libust: bump to 2.1.0
lttng-modules: bump to 2.1.0
lttng-tools: bump to 2.1.0
lttng-babeltrace: bump to 1.0.0
package/lttng-babeltrace/lttng-babeltrace.mk | 2 +-
...t-dont-build-cxx-tests-when-not-available.patch | 13 ++--
.../lttng-libust-uclibc-sched_getcpu.patch | 32 ---------
package/lttng-libust/lttng-libust.mk | 2 +-
package/lttng-modules/lttng-modules.mk | 2 +-
...ng-tools-Support-new-lttng-ust-error-code.patch | 82 ++++++++++++++++++++++
.../lttng-tools-no-sync-file-range-in-uclibc.patch | 51 +++++++-------
package/lttng-tools/lttng-tools.mk | 5 +-
8 files changed, 122 insertions(+), 67 deletions(-)
delete mode 100644 package/lttng-libust/lttng-libust-uclibc-sched_getcpu.patch
create mode 100644 package/lttng-tools/lttng-tools-Support-new-lttng-ust-error-code.patch
Yours,
--
Samuel
^ permalink raw reply
* [Buildroot] [PATCH 1/4] lttng-libust: bump to 2.1.0
From: Samuel Martin @ 2012-12-30 22:17 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1356905589.git.s.martin49@gmail.com>
Also remove lttng-libust-uclibc-sed_getcpu.patch because it got merged
upstream.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
...t-dont-build-cxx-tests-when-not-available.patch | 13 +++++----
.../lttng-libust-uclibc-sched_getcpu.patch | 32 ----------------------
package/lttng-libust/lttng-libust.mk | 2 +-
3 files changed, 8 insertions(+), 39 deletions(-)
delete mode 100644 package/lttng-libust/lttng-libust-uclibc-sched_getcpu.patch
diff --git a/package/lttng-libust/lttng-libust-dont-build-cxx-tests-when-not-available.patch b/package/lttng-libust/lttng-libust-dont-build-cxx-tests-when-not-available.patch
index bcc5636..b7e8a8f 100644
--- a/package/lttng-libust/lttng-libust-dont-build-cxx-tests-when-not-available.patch
+++ b/package/lttng-libust/lttng-libust-dont-build-cxx-tests-when-not-available.patch
@@ -38,15 +38,16 @@ index 26227cb..56d84db 100644
+AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"])
+
## Checks for libraries.
- AC_CHECK_LIB([dl], [dlopen])
- AC_CHECK_LIB([pthread], [pthread_create])
+ AC_CHECK_LIB([dl], [dlopen],
+ [
diff --git a/tests/Makefile.am b/tests/Makefile.am
-index e79ab7c..1a8b795 100644
+index 2b12422..7365ce4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
-@@ -1,6 +1,10 @@
--SUBDIRS = . hello hello-static-lib fork ust-basic-tracing ust-multi-test demo hello.cxx
-+SUBDIRS = . hello hello-static-lib fork ust-basic-tracing ust-multi-test demo
+@@ -1,7 +1,11 @@
+ SUBDIRS = . hello hello-static-lib fork ust-basic-tracing ust-multi-test \
+- demo hello.cxx daemon
++ demo daemon
#SUBDIRS = . hello2 basic basic_long simple_include snprintf test-nevents test-libustinstr-malloc dlopen same_line_marker trace_event register_test tracepoint libustctl_function_tests exit-fast
+if CXX_WORKS
diff --git a/package/lttng-libust/lttng-libust-uclibc-sched_getcpu.patch b/package/lttng-libust/lttng-libust-uclibc-sched_getcpu.patch
deleted file mode 100644
index 6536185..0000000
--- a/package/lttng-libust/lttng-libust-uclibc-sched_getcpu.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-[PATCH] fix build with modern uClibc
-
-uClibc has sched_getcpu since 0.9.33, so the compat workaround should only
-be used for older uClibc versions.
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
----
- liblttng-ust/compat.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-Index: lttng-ust-1.9.2/liblttng-ust/compat.h
-===================================================================
---- lttng-ust-1.9.2.orig/liblttng-ust/compat.h
-+++ lttng-ust-1.9.2/liblttng-ust/compat.h
-@@ -17,6 +17,10 @@
- #include <sys/syscall.h>
-
- #ifdef __UCLIBC__
-+/* old uClibc versions didn't have sched_getcpu */
-+#if __UCLIBC_MAJOR__ == 0 && \
-+ (__UCLIBC_MINOR__ < 9 || \
-+ (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 32))
- #define __getcpu(cpu, node, cache) syscall(__NR_getcpu, cpu, node, cache)
- static inline
- int sched_getcpu(void)
-@@ -26,5 +30,6 @@
- s = __getcpu(&c, NULL, NULL);
- return (s == -1) ? s : c;
- }
-+#endif /* <= 0.9.32 */
- #endif /* __UCLIBC__ */
- #endif /* _UST_COMPAT_H */
diff --git a/package/lttng-libust/lttng-libust.mk b/package/lttng-libust/lttng-libust.mk
index cd6c65d..e1f51b1 100644
--- a/package/lttng-libust/lttng-libust.mk
+++ b/package/lttng-libust/lttng-libust.mk
@@ -4,7 +4,7 @@
#
#############################################################
LTTNG_LIBUST_SITE = http://lttng.org/files/lttng-ust/
-LTTNG_LIBUST_VERSION = 2.0.3
+LTTNG_LIBUST_VERSION = 2.1.0
LTTNG_LIBUST_SOURCE = lttng-ust-$(LTTNG_LIBUST_VERSION).tar.bz2
LTTNG_LIBUST_INSTALL_STAGING = YES
--
1.8.0.3
^ permalink raw reply related
* [Buildroot] [PATCH 2/4] lttng-modules: bump to 2.1.0
From: Samuel Martin @ 2012-12-30 22:17 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1356905589.git.s.martin49@gmail.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
package/lttng-modules/lttng-modules.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/lttng-modules/lttng-modules.mk b/package/lttng-modules/lttng-modules.mk
index a245b19..54ae864 100644
--- a/package/lttng-modules/lttng-modules.mk
+++ b/package/lttng-modules/lttng-modules.mk
@@ -3,7 +3,7 @@
# LTTng-modules: the kernel modules (requires at least Linux 2.6.38)
#
#############################################################
-LTTNG_MODULES_VERSION = 2.0.3
+LTTNG_MODULES_VERSION = 2.1.0
LTTNG_MODULES_SITE = http://lttng.org/files/lttng-modules/
LTTNG_MODULES_SOURCE = lttng-modules-$(LTTNG_MODULES_VERSION).tar.bz2
--
1.8.0.3
^ permalink raw reply related
* [Buildroot] [PATCH 3/4] lttng-tools: bump to 2.1.0
From: Samuel Martin @ 2012-12-30 22:17 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1356905589.git.s.martin49@gmail.com>
* add patch adding src/bin/lttng-sessiond/lttng-ust-error.h which is
missing in the lttng-tools-2.1.0 release tarball.
* update the sync_file_range patch.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
...ng-tools-Support-new-lttng-ust-error-code.patch | 82 ++++++++++++++++++++++
.../lttng-tools-no-sync-file-range-in-uclibc.patch | 51 +++++++-------
package/lttng-tools/lttng-tools.mk | 5 +-
3 files changed, 112 insertions(+), 26 deletions(-)
create mode 100644 package/lttng-tools/lttng-tools-Support-new-lttng-ust-error-code.patch
diff --git a/package/lttng-tools/lttng-tools-Support-new-lttng-ust-error-code.patch b/package/lttng-tools/lttng-tools-Support-new-lttng-ust-error-code.patch
new file mode 100644
index 0000000..73d0884
--- /dev/null
+++ b/package/lttng-tools/lttng-tools-Support-new-lttng-ust-error-code.patch
@@ -0,0 +1,82 @@
+From 49c336c1679295a31b92223dca05feccfe3e3464 Mon Sep 17 00:00:00 2001
+From: David Goulet <dgoulet@efficios.com>
+Date: Fri, 9 Nov 2012 13:37:25 -0500
+Subject: [PATCH] Support new lttng-ust error code
+
+Signed-off-by: David Goulet <dgoulet@efficios.com>
+---
+
+Only keep the src/bin/lttng-sessiond/lttng-ust-error.h adding part,
+needed to build lttng-tool without the lttng-libust dependency, i.e.
+with --disable-lttng-ust. (Samuel Martin)
+
+---
+ src/bin/lttng-sessiond/lttng-ust-error.h | 56 ++++++++++++++++++++++++++++++++
+ 6 files changed, 75 insertions(+), 13 deletions(-)
+ create mode 100644 src/bin/lttng-sessiond/lttng-ust-error.h
+
+diff --git a/src/bin/lttng-sessiond/lttng-ust-error.h b/src/bin/lttng-sessiond/lttng-ust-error.h
+new file mode 100644
+index 0000000..d83ecb8
+--- /dev/null
++++ b/src/bin/lttng-sessiond/lttng-ust-error.h
+@@ -0,0 +1,56 @@
++#ifndef _LTTNG_UST_ERROR_H
++#define _LTTNG_UST_ERROR_H
++
++/*
++ * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
++ * Julien Desfossez <julien.desfossez@polymtl.ca>
++ * Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; only
++ * version 2.1 of the License.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++/*
++ * This header is meant for liblttng and libust internal use ONLY.
++ * These declarations should NOT be considered stable API.
++ */
++
++#include <limits.h>
++#include <unistd.h>
++
++#include "lttng-ust-abi.h"
++
++/*
++ * ustcomm error code.
++ */
++enum lttng_ust_error_code {
++ LTTNG_UST_OK = 0, /* Ok */
++ LTTNG_UST_ERR = 1024, /* Unknown Error */
++ LTTNG_UST_ERR_NOENT = 1025, /* No entry */
++ LTTNG_UST_ERR_EXIST = 1026, /* Object exists */
++ LTTNG_UST_ERR_INVAL = 1027, /* Invalid argument */
++ LTTNG_UST_ERR_PERM = 1028, /* Permission denied */
++ LTTNG_UST_ERR_NOSYS = 1029, /* Not implemented */
++
++ /* MUST be last element */
++ LTTNG_UST_ERR_NR, /* Last element */
++};
++
++/*
++ * Return a human-readable error message for an lttng-ust error code.
++ * code must be a positive value (or 0).
++ */
++extern const char *lttng_ust_strerror(int code);
++
++#endif /* _LTTNG_UST_ERROR_H */
+--
+1.8.0.3
+
diff --git a/package/lttng-tools/lttng-tools-no-sync-file-range-in-uclibc.patch b/package/lttng-tools/lttng-tools-no-sync-file-range-in-uclibc.patch
index 3a1807e..fcaaa3e 100644
--- a/package/lttng-tools/lttng-tools-no-sync-file-range-in-uclibc.patch
+++ b/package/lttng-tools/lttng-tools-no-sync-file-range-in-uclibc.patch
@@ -16,35 +16,36 @@ diff --git a/configure.ac b/configure.ac
index 5808c79..065b9cf 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -120,7 +120,7 @@ AS_IF([test "x$lttng_ust_support" = "xyes"], [
-
- AM_CONDITIONAL([HAVE_LIBLTTNG_UST_CTL], [ test "x$ac_cv_lib_lttng_ust_ctl_ustctl_create_session" = "xyes" ])
-
+@@ -150,7 +150,7 @@ AS_IF([test "x$lttng_ust_support" = "xyes"], [
+ )
+ ])
+ AM_CONDITIONAL([HAVE_LIBLTTNG_UST_CTL], [test "x$lttng_ust_ctl_found" = xyes])
-AC_CHECK_FUNCS([sched_getcpu sysconf])
+AC_CHECK_FUNCS([sched_getcpu sysconf sync_file_range])
-
+
# check for dlopen
AC_CHECK_LIB([dl], [dlopen],
-diff --git a/src/common/compat/fcntl.h b/src/common/compat/fcntl.h
-index 58c1579..dafb33e 100644
---- a/src/common/compat/fcntl.h
-+++ b/src/common/compat/fcntl.h
-@@ -23,10 +23,15 @@
-
- #ifdef __linux__
-
-+#if defined(HAVE_SYNC_FILE_RANGE)
- extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
- unsigned int flags);
- #define lttng_sync_file_range(fd, offset, nbytes, flags) \
- compat_sync_file_range(fd, offset, nbytes, flags)
+@@ -394,4 +394,3 @@ AS_IF([test "x$consumerd_only" = "xno"],[
+ ])
+
+ AS_ECHO()
+-
+diff --git a/src/common/compat/compat-fcntl.c b/src/common/compat/compat-fcntl.c
+index 5a1c757..7ff63a3 100644
+--- a/src/common/compat/compat-fcntl.c
++++ b/src/common/compat/compat-fcntl.c
+@@ -23,7 +23,11 @@
+ int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
+ unsigned int flags)
+ {
++#ifdef HAVE_SYNC_FILE_RANGE
+ return sync_file_range(fd, offset, nbytes, flags);
+#else
-+#define lttng_sync_file_range(fd, offset, nbytes, flags) \
-+ fdatasync(fd);
++ return fdatasync(fd);
+#endif
-
- #elif defined(__FreeBSD__)
-
---
-1.7.10
+ }
+
+ #endif /* __linux__ */
+--
+1.8.0.3
diff --git a/package/lttng-tools/lttng-tools.mk b/package/lttng-tools/lttng-tools.mk
index fe48ac6..18477ba 100644
--- a/package/lttng-tools/lttng-tools.mk
+++ b/package/lttng-tools/lttng-tools.mk
@@ -3,7 +3,7 @@
# LTTng-Tools: the trace control client
#
#############################################################
-LTTNG_TOOLS_VERSION = 2.0.4
+LTTNG_TOOLS_VERSION = 2.1.0
LTTNG_TOOLS_SITE = http://lttng.org/files/lttng-tools/
LTTNG_TOOLS_SOURCE = lttng-tools-$(LTTNG_TOOLS_VERSION).tar.bz2
@@ -11,6 +11,9 @@ LTTNG_TOOLS_SOURCE = lttng-tools-$(LTTNG_TOOLS_VERSION).tar.bz2
# dependency. However, having the babeltrace utilities built for the
# host is very useful, since those tools allow to convert the binary
# trace format into an human readable format.
+# Since the 2.1.0 release, lttng-tools depends on flex and bison,
+# but they are not added to the dependency list since they are
+# already Buildroot dependencies.
LTTNG_TOOLS_DEPENDENCIES = liburcu popt host-lttng-babeltrace
LTTNG_AUTORECONF = YES
--
1.8.0.3
^ permalink raw reply related
* [Buildroot] [PATCH 4/4] lttng-babeltrace: bump to 1.0.0
From: Samuel Martin @ 2012-12-30 22:17 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1356905589.git.s.martin49@gmail.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
package/lttng-babeltrace/lttng-babeltrace.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/lttng-babeltrace/lttng-babeltrace.mk b/package/lttng-babeltrace/lttng-babeltrace.mk
index dd701df..60b8a93 100644
--- a/package/lttng-babeltrace/lttng-babeltrace.mk
+++ b/package/lttng-babeltrace/lttng-babeltrace.mk
@@ -1,5 +1,5 @@
LTTNG_BABELTRACE_SITE = http://lttng.org/files/babeltrace/
-LTTNG_BABELTRACE_VERSION = 1.0.0-rc6
+LTTNG_BABELTRACE_VERSION = 1.0.0
LTTNG_BABELTRACE_SOURCE = babeltrace-$(LTTNG_BABELTRACE_VERSION).tar.bz2
LTTNG_BABELTRACE_DEPENDENCIES = popt util-linux libglib2
--
1.8.0.3
^ permalink raw reply related
* [Buildroot] [PATCH 3/8] package/Makefile.in: update/fix HOST_PATH variable
From: Samuel Martin @ 2012-12-30 22:41 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20121230231115.7fefabb7@skate>
Hi Thomas, all,
2012/12/30 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Samuel Martin,
>
> On Sun, 30 Dec 2012 22:33:27 +0100, Samuel Martin wrote:
>> ---
>> package/Makefile.in | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/package/Makefile.in b/package/Makefile.in
>> index cc8f320..dd04e25 100644
>> --- a/package/Makefile.in
>> +++ b/package/Makefile.in
>> @@ -165,7 +165,7 @@ HOST_CFLAGS ?= -O2
>> HOST_CFLAGS += $(HOST_CPPFLAGS)
>> HOST_CXXFLAGS += $(HOST_CFLAGS)
>> HOST_LDFLAGS += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/usr/lib
>> -HOST_PATH=$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(PATH)
>> +HOST_PATH="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)"
>
> Why?
Well, honestly, to keep things consistent with TARGET_PATH...
We can also wonder why TARGET_PATH contains $(HOST_DIR)/usr/sbin? or
whether it is needed/used in TARGET_PATH?
I can do the other way, removing $(HOST_DIR)/usr/sbin from both
TARGET_PATH and HOST_PATH.
Also, TARGET_PATH and HOST_PATH store pretty much the same things...
do we need 2 distincts variables?
BTW, AFAICS nothing is installed in $(HOST_DIR)/bin...
And some binaries from $(HOST_DIR)/usr/sbin which could be used by
some post-build scripts, but I doubt HOST_PATH or TARGET_PATH are
correctly exported when post-build scripts are executed.
>
> For such core changes, a commit message of "update/fix something" is
> definitely not enough. A detailed explanation is needed.
Agreed.
Regards,
--
Samuel
^ permalink raw reply
* [Buildroot] [PATCH 4/8] package/pkg-cmake.mk: make sure $(HOST_PATH) is in the PATH at configure time
From: Samuel Martin @ 2012-12-30 22:42 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20121230231443.3a5ffb1f@skate>
Hi Thomas, all,
2012/12/30 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Samuel Martin,
>
> On Sun, 30 Dec 2012 22:33:28 +0100, Samuel Martin wrote:
>> ---
>> package/pkg-cmake.mk | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
>> index 626a0b0..1e8302f 100644
>> --- a/package/pkg-cmake.mk
>> +++ b/package/pkg-cmake.mk
>> @@ -62,7 +62,8 @@ ifeq ($(5),target)
>> define $(2)_CONFIGURE_CMDS
>> (cd $$($$(PKG)_BUILDDIR) && \
>> rm -f CMakeCache.txt && \
>> - $$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
>> + PATH="$(TARGET_PATH)" $$($$(PKG)_CONF_ENV) \
>> + $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
>> -DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
>> -DCMAKE_INSTALL_PREFIX="/usr" \
>> $$($$(PKG)_CONF_OPT) \
>> @@ -74,7 +75,7 @@ else
>> define $(2)_CONFIGURE_CMDS
>> (cd $$($$(PKG)_BUILDDIR) && \
>> rm -f CMakeCache.txt && \
>> - $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
>> + PATH="$(HOST_PATH)" $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
>> -DCMAKE_INSTALL_SO_NO_EXE=0 \
>> -DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \
>> -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" \
>
> In fact, with your previous patch TARGET_PATH becomes equal to
> HOST_PATH. And I find the name TARGET_PATH to be misleading. Maybe we
> should just refactor that in a single variable instead?
Just post the same comment ;-)
Regards,
--
Samuel
^ permalink raw reply
* [Buildroot] [pull request] Pull request for branch for-master/misc-fixes
From: Samuel Martin @ 2012-12-30 22:46 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1356903063.git.s.martin49@gmail.com>
2012/12/30 Samuel Martin <s.martin49@gmail.com>:
> Hello,
>
> Here are few random fixes, some of them are related to python handling
> from the host system.
Ooopss... !
Just realized I forgot to add the sob line to this series.
I'll repost the series.
Apologize for the spam.
Regards,
--
Samuel
^ permalink raw reply
* [Buildroot] [pull request] Pull request for branch for-master/misc-fixes
From: Samuel Martin @ 2012-12-30 22:54 UTC (permalink / raw)
To: buildroot
Hello,
Here are few random fixes, some of them are related to python handling
from the host system.
The patches handling the python binary provided by the host system are
also an RFC that summarize few discussions on the IRC channel.
The following changes since commit f1d44593a04ff3be981c8a3b01a502f0b18193ee:
docs/manual: small fixes and enhancements to adding generic packages (2012-12-30 22:39:13 +0100)
are available in the git repository at:
git at github.com:tSed/buildroot.git for-master/misc-fixes
for you to fetch changes up to 8de478e5aa4b0f15008159ea3ad238605e5ffe0e:
manual: add host python2 dependency section (2012-12-30 23:47:23 +0100)
----------------------------------------------------------------
Samuel Martin (8):
matchbox-lib: fix license info
fluxbox: fix build against imlib2
package/Makefile.in: update/fix HOST_PATH variable
package/pkg-cmake.mk: make sure $(HOST_PATH) is in the PATH at configure time
dependencies: build a host python2 if no suitable one can be found
scons: add host-python2-if-needed dependency
scons: ensure $(HOST_DIR)/usr/bin is in the PATH when invoking $(SCONS)
manual: add host python2 dependency section
docs/manual/adding-packages-tips.txt | 38 +++++++++++++++++++++++
package/Makefile.in | 2 +-
package/fluxbox/fluxbox-1.3.2-fix-configure.patch | 19 ++++++++++++
package/fluxbox/fluxbox.mk | 10 +++++-
package/matchbox/matchbox-lib/matchbox-lib.mk | 2 +-
package/pkg-cmake.mk | 5 +--
package/scons/scons.mk | 10 ++++--
support/dependencies/check-host-python2.mk | 18 +++++++++++
support/dependencies/check-host-python2.sh | 13 ++++++++
support/dependencies/dependencies.sh | 2 +-
10 files changed, 110 insertions(+), 9 deletions(-)
create mode 100644 package/fluxbox/fluxbox-1.3.2-fix-configure.patch
create mode 100644 support/dependencies/check-host-python2.mk
create mode 100755 support/dependencies/check-host-python2.sh
Yours,
--
Samuel
^ permalink raw reply
* [Buildroot] [PATCH 1/8] matchbox-lib: fix license info
From: Samuel Martin @ 2012-12-30 22:54 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1356907750.git.s.martin49@gmail.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
package/matchbox/matchbox-lib/matchbox-lib.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/matchbox/matchbox-lib/matchbox-lib.mk b/package/matchbox/matchbox-lib/matchbox-lib.mk
index 7730d94..d18df6b 100644
--- a/package/matchbox/matchbox-lib/matchbox-lib.mk
+++ b/package/matchbox/matchbox-lib/matchbox-lib.mk
@@ -7,7 +7,7 @@
MATCHBOX_LIB_VERSION = 1.9
MATCHBOX_LIB_SOURCE = libmatchbox-$(MATCHBOX_LIB_VERSION).tar.bz2
MATCHBOX_LIB_SITE = http://downloads.yoctoproject.org/releases/matchbox/libmatchbox/$(MATCHBOX_LIB_VERSION)
-MATCHBOX_LIB_LICENSE = LGPLv2.1
+MATCHBOX_LIB_LICENSE = LGPLv2.1+
MATCHBOX_LIB_LICENSE_FILES = COPYING
MATCHBOX_LIB_INSTALL_STAGING = YES
MATCHBOX_LIB_DEPENDENCIES = host-pkgconf expat xlib_libXext
--
1.8.0.3
^ permalink raw reply related
* [Buildroot] [PATCH 2/8] fluxbox: fix build against imlib2
From: Samuel Martin @ 2012-12-30 22:54 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1356907750.git.s.martin49@gmail.com>
* fix configure.in to take care of the given imlib2-prefix
* disable imlib2 support if imlib2 is not part of the selection
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
package/fluxbox/fluxbox-1.3.2-fix-configure.patch | 19 +++++++++++++++++++
package/fluxbox/fluxbox.mk | 10 +++++++++-
2 files changed, 28 insertions(+), 1 deletion(-)
create mode 100644 package/fluxbox/fluxbox-1.3.2-fix-configure.patch
diff --git a/package/fluxbox/fluxbox-1.3.2-fix-configure.patch b/package/fluxbox/fluxbox-1.3.2-fix-configure.patch
new file mode 100644
index 0000000..2cb8273
--- /dev/null
+++ b/package/fluxbox/fluxbox-1.3.2-fix-configure.patch
@@ -0,0 +1,19 @@
+Avoid to call the imlib2-config that may be installed on the host system
+(even when --with-imlib2-prefix or --with-imlib2-exec-prefix is passed to
+the configure script), which totally screws up the resulting linker flags.
+
+Inspired by: http://git.fluxbox.org/fluxbox.git/commit/?id=b178bed60b5bd8b2c9ed0cbc67fd729ff3820589
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+
+--- fluxbox-1.3.2.orig/configure.in 2012-10-21 16:11:59.445749396 +0200
++++ fluxbox-1.3.2/configure.in 2012-10-21 16:35:27.658390856 +0200
+@@ -443,8 +443,6 @@ if test x$enable_imlib2 = "xyes"; then
+ [
+ IMLIB2=true
+ AC_DEFINE(HAVE_IMLIB2, [], [Imlib2 support])
+- IMLIB2_LIBS=`imlib2-config --libs`
+- IMLIB2_CFLAGS=`imlib2-config --cflags`
+ LIBS="$LIBS $IMLIB2_LIBS"
+ CXXFLAGS="$CXXFLAGS $IMLIB2_CFLAGS"
+ ], [ AC_MSG_RESULT(no)]
diff --git a/package/fluxbox/fluxbox.mk b/package/fluxbox/fluxbox.mk
index 356c5a2..04ffb91 100644
--- a/package/fluxbox/fluxbox.mk
+++ b/package/fluxbox/fluxbox.mk
@@ -10,11 +10,19 @@ FLUXBOX_SITE = http://downloads.sourceforge.net/project/fluxbox/fluxbox/$(FLUXBO
FLUXBOX_LICENSE = MIT
FLUXBOX_LICENSE_FILES = COPYING
+FLUXBOX_AUTORECONF = YES
+
FLUXBOX_CONF_OPT = --x-includes=$(STAGING_DIR)/usr/include/X11 \
--x-libraries=$(STAGING_DIR)/usr/lib
-
FLUXBOX_DEPENDENCIES = xlib_libX11 $(if $(BR2_PACKAGE_LIBICONV),libiconv)
+ifeq ($(BR2_PACKAGE_IMLIB2),y)
+FLUXBOX_CONF_OPT += --enable-imlib2 --with-imlib2-prefix=$(STAGING_DIR)/usr
+FLUXBOX_DEPENDENCIES += imlib2
+else
+FLUXBOX_CONF_OPT += --disable-imlib2
+endif
+
define FLUXBOX_INSTALL_XSESSION_FILE
[ -f $(TARGET_DIR)/root/.xsession ] || $(INSTALL) -m 0755 -D \
package/fluxbox/xsession $(TARGET_DIR)/root/.xsession
--
1.8.0.3
^ permalink raw reply related
* [Buildroot] [PATCH 3/8] package/Makefile.in: update/fix HOST_PATH variable
From: Samuel Martin @ 2012-12-30 22:54 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1356907750.git.s.martin49@gmail.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
package/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/Makefile.in b/package/Makefile.in
index cc8f320..dd04e25 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -165,7 +165,7 @@ HOST_CFLAGS ?= -O2
HOST_CFLAGS += $(HOST_CPPFLAGS)
HOST_CXXFLAGS += $(HOST_CFLAGS)
HOST_LDFLAGS += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/usr/lib
-HOST_PATH=$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(PATH)
+HOST_PATH="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)"
# hostcc version as an integer - E.G. 4.3.2 => 432
HOSTCC_VERSION:=$(shell $(HOSTCC_NOCCACHE) --version | \
--
1.8.0.3
^ permalink raw reply related
* [Buildroot] [PATCH 4/8] package/pkg-cmake.mk: make sure $(HOST_PATH) is in the PATH at configure time
From: Samuel Martin @ 2012-12-30 22:54 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1356907750.git.s.martin49@gmail.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
package/pkg-cmake.mk | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index 626a0b0..1e8302f 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -62,7 +62,8 @@ ifeq ($(5),target)
define $(2)_CONFIGURE_CMDS
(cd $$($$(PKG)_BUILDDIR) && \
rm -f CMakeCache.txt && \
- $$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
+ PATH="$(TARGET_PATH)" $$($$(PKG)_CONF_ENV) \
+ $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
-DCMAKE_INSTALL_PREFIX="/usr" \
$$($$(PKG)_CONF_OPT) \
@@ -74,7 +75,7 @@ else
define $(2)_CONFIGURE_CMDS
(cd $$($$(PKG)_BUILDDIR) && \
rm -f CMakeCache.txt && \
- $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
+ PATH="$(HOST_PATH)" $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
-DCMAKE_INSTALL_SO_NO_EXE=0 \
-DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" \
--
1.8.0.3
^ permalink raw reply related
* [Buildroot] [PATCH 5/8] dependencies: build a host python2 if no suitable one can be found
From: Samuel Martin @ 2012-12-30 22:54 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1356907750.git.s.martin49@gmail.com>
Some distros now comes with only python3 installed, with or without a
/usr/bin/python pointing to python3.
So, /usr/bin/python may refer to either python2 or python3.
This may have some bad consequences for packages that uses some
non python{2,3}-friendly scripts in their build system (eg. in install
or post-install scripts).
This patch checks for a suitable python2 version (2.6 or 2.7) on the host
system, and:
* if a valid python2 interperter is found on the host system, then:
- a symlink pointing to the found python2 interpreter is created in the
buildroot host tree at the beginning of the build;
- a make target host-python2-if-needed is set to '$(HOST_DIR)/usr/bin/python'.
This way, if the host-python package is built later, the symlink will be
automatically overriden by the host-python install rules.
* if no valid python2 interperter is found on the host system, then:
- a make target host-python2-if-needed is set to 'host-python'.
Note 1: The symlink is checked and created if necessary at the beginning of
each build.
Note 2: Since there is no target named '$(HOST_DIR)/usr/bin/python' in the
python makefiles, there is no need for removing the symlink before
installing the host-pyhton package.
Note 3: The host-python is only built when necessary.
This also means that in the case there is no python2 interperter
available on the host system, there won't any host python2 interperter
until the host-python package is built.
Note 4: Any package containing some non python{2,3}-friendly scripts should:
- have 'host-python2-if-needed' in its *_DEPENDENCIES list;
- set and add to their build/install environment, either
PATH="$(HOST_PATH)" or PATH="$(TARGET_PATH)".
A (good) side effect of this patch is getting rid of any host python dependency.
Buildroot can run on a host without python, or with a too old python2 version,
or with only python3.
In any case where a host python2 interpreter is expected to run some build or
install scripts, 'host-python2-if-needed' should be added to the dependency
list.
With this patch, the host python2 interpreter is either found in the host
system, or build by Buildroot. So, we can drop the python dependency check.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
support/dependencies/check-host-python2.mk | 18 ++++++++++++++++++
support/dependencies/check-host-python2.sh | 13 +++++++++++++
support/dependencies/dependencies.sh | 2 +-
3 files changed, 32 insertions(+), 1 deletion(-)
create mode 100644 support/dependencies/check-host-python2.mk
create mode 100755 support/dependencies/check-host-python2.sh
diff --git a/support/dependencies/check-host-python2.mk b/support/dependencies/check-host-python2.mk
new file mode 100644
index 0000000..5bc2986
--- /dev/null
+++ b/support/dependencies/check-host-python2.mk
@@ -0,0 +1,18 @@
+PYTHON2 = $(call suitable-host-package,python2,$(HOST_DIR)/usr/bin/python)
+
+ifeq ($(PYTHON2),)
+host-python2-if-needed: host-python
+else
+host-python2-if-needed: $(HOST_DIR)/usr/bin/python
+# Create the python symlink once for all at the beginning of the build.
+DEPENDENCIES_HOST_PREREQ += host-python2-symlink
+endif
+
+# host-python install rules override the symlink created here.
+# So, there is no need to patch the python package to remove the symlink
+# before installing itself.
+host-python2-symlink:
+ @mkdir -p $(HOST_DIR)/usr/bin
+ test -x "$(HOST_DIR)/usr/bin/python" -a \
+ "$(PYTHON2)" = "$(HOST_DIR)/usr/bin/python" || \
+ $(HOSTLN) -sf "$(PYTHON2)" "$(HOST_DIR)/usr/bin/python"
diff --git a/support/dependencies/check-host-python2.sh b/support/dependencies/check-host-python2.sh
new file mode 100755
index 0000000..a340674
--- /dev/null
+++ b/support/dependencies/check-host-python2.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+candidates="${@} python python2"
+
+for candidate in ${candidates} ; do
+ which "${candidate}" &>/dev/null || continue
+ # restrict version of python2 to 2.6 or 2.7
+ if "${candidate}" --version 2>&1 | grep -q 'Python 2\.[6-7]\..*' ; then
+ # found a valid candidate, so quit now
+ echo $(which "${candidate}")
+ exit
+ fi
+done
diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
index eb5a481..1427ce3 100755
--- a/support/dependencies/dependencies.sh
+++ b/support/dependencies/dependencies.sh
@@ -131,7 +131,7 @@ if ! $SHELL --version 2>&1 | grep -q '^GNU bash'; then
fi;
# Check that a few mandatory programs are installed
-for prog in awk bison flex msgfmt makeinfo patch gzip bzip2 perl tar wget cpio python unzip rsync ${DL_TOOLS} ; do
+for prog in awk bison flex msgfmt makeinfo patch gzip bzip2 perl tar wget cpio unzip rsync ${DL_TOOLS} ; do
if ! which $prog > /dev/null ; then
/bin/echo -e "\nYou must install '$prog' on your build machine";
if test $prog = "makeinfo" ; then
--
1.8.0.3
^ permalink raw reply related
* [Buildroot] [PATCH 6/8] scons: add host-python2-if-needed dependency
From: Samuel Martin @ 2012-12-30 22:54 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1356907750.git.s.martin49@gmail.com>
Also, ensure $(HOST_DIR)/usr/bin is in the PATH during the configure phase.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
package/scons/scons.mk | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/package/scons/scons.mk b/package/scons/scons.mk
index 79fd6b1..e3ada92 100644
--- a/package/scons/scons.mk
+++ b/package/scons/scons.mk
@@ -4,12 +4,16 @@ SCONS_SITE = http://downloads.sourceforge.net/project/scons/scons/$(SCONS_VERSIO
SCONS_LICENSE = MIT
SCONS_LICENSE_FILES = LICENSE.txt
+# Because Scons is not python3-friendly, we have to ensure that
+HOST_SCONS_DEPENDENCIES = host-python2-if-needed
+
define HOST_SCONS_BUILD_CMDS
- (cd $(@D); python setup.py build)
+ (cd $(@D); $(HOST_CONFIGURE_OPTS) python setup.py build)
endef
define HOST_SCONS_INSTALL_CMDS
- (cd $(@D); python setup.py install --prefix=$(HOST_DIR)/usr \
+ (cd $(@D) ; $(HOST_CONFIGURE_OPTS) python setup.py install \
+ --prefix=$(HOST_DIR)/usr \
--install-lib=$(HOST_DIR)/usr/lib/scons-$(SCONS_VERSION))
endef
--
1.8.0.3
^ permalink raw reply related
* [Buildroot] [PATCH 7/8] scons: ensure $(HOST_DIR)/usr/bin is in the PATH when invoking $(SCONS)
From: Samuel Martin @ 2012-12-30 22:54 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1356907750.git.s.martin49@gmail.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
package/scons/scons.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/scons/scons.mk b/package/scons/scons.mk
index e3ada92..e828588 100644
--- a/package/scons/scons.mk
+++ b/package/scons/scons.mk
@@ -20,4 +20,4 @@ endef
$(eval $(host-generic-package))
# variables used by other packages
-SCONS = $(HOST_DIR)/usr/bin/scons
+SCONS = PATH=$(HOST_PATH) $(HOST_DIR)/usr/bin/scons
--
1.8.0.3
^ permalink raw reply related
* [Buildroot] [PATCH 8/8] manual: add host python2 dependency section
From: Samuel Martin @ 2012-12-30 22:54 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1356907750.git.s.martin49@gmail.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
docs/manual/adding-packages-tips.txt | 38 ++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/docs/manual/adding-packages-tips.txt b/docs/manual/adding-packages-tips.txt
index acdee40..4a971cb 100644
--- a/docs/manual/adding-packages-tips.txt
+++ b/docs/manual/adding-packages-tips.txt
@@ -62,3 +62,41 @@ FOO_SITE = http://github.com/<user>/<package>/tarball/<branch>
Note that the name of the tarball is the default +foo-1234567.tar.gz+
so it is not necessary to specify it in the +.mk+ file.
+
+[[python2-and-package-build-env]]
+Host python2 dependency and package environment
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Some packages provide some python scripts as part of their
+build/install system.
+
+Unfortunately, those python scripts are not always python3-friendly.
+So, a python2 interpreter on the host system is a prerequisite for
+those packages. Besides, their build system may call them invoking
++python <some script> ...+ which have bad consequences if the +python+
+command does not exist or if it call a python3 interperter instead of
+a python2 one.
+
+Buildroot provides a way to handle this case, without requiring to
+patch anything in the package sources.
+
+* add +host-python2-if-needed+ to the +*_DEPENDENCIES+ list;
+* make sure the +PATH+ environment variable contains
+ +$(HOST_DIR)/usr/bin+.
+
+.Notes
+- This is automatic if the package relies on the _autotools_ or
+ _cmake_ infrastructure and does not need to override some of the
+ configure, build or install commands.
+- Otherwise (i.e. the package uses the _generic_ infrastructure or
+ overrides some of the configure, build or install commands), you
+ should ensure +PATH=$(HOST_PATH)+ or +PATH=$(TARGET_PATH)+ to
+ overridden commands.
+- The +PATH+ environment variable is correctly set in the variables
+ +TARGET_CONFIGURE_OPTS+ or +TARGET_MAKE_ENV+ as well as in their
+ +HOST+ variants.
+- For package relying on http://www.scons.org[Scons] build system,
+ it should depend on +host-scons+ and use the +$(SCONS)+ variable.
+ This will automatically take care of the host python2 dependency
+ since http://www.scons.org[Scons] does not support python3 yet
+ (see http://www.scons.org/doc/production/HTML/scons-user/c95.html#AEN102).
--
1.8.0.3
^ permalink raw reply related
* [Buildroot] [PATCH] system/skeleton: add the shadow-group file
From: Yann E. MORIN @ 2012-12-30 23:12 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1356904511-22452-1-git-send-email-yann.morin.1998@free.fr>
All,
On Sunday 30 December 2012 Yann E. MORIN wrote:
> /etc/gshadow is to /etc/group what /etc/shadow is to /etc/passwd.
Superseded, it's now part of my (upcoming) package-create-users series.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply
* [Buildroot] [pull request] Pull request for branch yem-package-create-user
From: Yann E. MORIN @ 2012-12-30 23:26 UTC (permalink / raw)
To: buildroot
Hello All!
Here is a series that allows packages to create users.
Packages that install daemons may well want to run those daemons as
non-root users to avoid security issues. Currently, there are two users
of choice to run 'generic' daemons: root or daemon (although there are
a few dedicated users to run a few services: mail, sshd, ftp...).
This series builds upon both the package infrastrucutre to define the
user(s) a package may want to create, and the filesystem infrastructure
to actually generate these users, and chown their ${HOME}s.
Documentation is updated accordingly.
Note: for now, users' passwords are md5-encrypted. Once the pending
change to introduce alternative password-encryption schemes is applied,
we can use that to encode users' passwords, too.
As a proof of concept, the package tvheadend has been updated to use
a dedicated user to run its daemon as (call me stubborn! ;-] ).
The following changes since commit f1d44593a04ff3be981c8a3b01a502f0b18193ee:
docs/manual: small fixes and enhancements to adding generic packages (2012-12-30 22:39:13 +0100)
are available in the git repository at:
git://gitorious.org/buildroot/buildroot.git yem-package-create-user
Yann E. MORIN (3):
system/skeleton: add the shadow-group file
packages: add ability for packages to create users
package/tvheadend: use a non-root user to run the daemon
docs/manual/adding-packages-generic.txt | 16 ++-
docs/manual/makedev-syntax.txt | 65 ++++++
fs/common.mk | 5 +-
package/pkg-generic.mk | 1 +
package/tvheadend/etc.default.tvheadend | 5 +-
package/tvheadend/tvheadend.mk | 10 +-
support/scripts/mkusers | 341 +++++++++++++++++++++++++++++++
system/skeleton/etc/gshadow | 21 ++
8 files changed, 456 insertions(+), 8 deletions(-)
create mode 100755 support/scripts/mkusers
create mode 100644 system/skeleton/etc/gshadow
Regards,
Yann E. MORIN
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox