Pull request for branch yem-new-packages
Hello All!
This series deals with adding the required packages to build QEMU on the target.
Hopefully, we'll have time to review and definitely ack/nack that during the DevDay in Brussels.
Changes v4 -> v5:
- fixed the ceph build after the boost changes
- rebased ontop current master
Changes v3 -> v4:
- removed pmake patches, grab them at download time (Arnout, Thomas)
Changes v2 -> v3:
- rebased on-top latest tree, drop already applied packages
- bumped usbredir version (needed later for qemu 1.3.x)
Changes v1 -> v2:
- vde2: do not require C++ (Peter)
- usbredir: select libusb (Peter)
- ceph: use 'select' instead of 'depends on'
- cegui06: add comment
The following changes since commit 1382af876b1f5d89201c1b96116b0814990a8dba:
toolchain-external: remove support for AArch64 Linaro 2012.10 toolchain (2013-02-02 17:35:53 +0100)
are available in the git repository at:
git://gitorious.org/buildroot/buildroot.git yem-new-packages
Yann E. MORIN (7):
package/usbredir: update to version 0.6
package/pmake: add host pmake
package/libbsd: new package
package/libedit2: new package
package/ceph: new package
package/dtc: new package
package/dtc: add option to install programs
package/Config.in | 4 + package/ceph/Config.in | 25 +++++++ package/ceph/ceph-no-envz.patch | 63 ++++++++++++++++ package/ceph/ceph-no-getloadavg.patch | 61 ++++++++++++++++ package/ceph/ceph-no-posix_fallocate.patch | 50 +++++++++++++ package/ceph/ceph.mk | 57 +++++++++++++++ package/dtc/Config.in | 29 ++++++++ package/dtc/dtc-extra_cflags.patch | 27 +++++++ package/dtc/dtc-separate-lib-install.patch | 28 +++++++ package/dtc/dtc.mk | 51 +++++++++++++ package/libbsd/Config.in | 10 +++ package/libbsd/libbsd.mk | 21 ++++++ package/libedit2/Config.in | 9 +++ package/libedit2/libedit2-01-Makefile.patch | 25 +++++++ package/libedit2/libedit2-02-el.c-issetugid.patch | 24 ++++++ package/libedit2/libedit2-03-el.c-MAXPATHLEN.patch | 40 +++++++++++ .../libedit2/libedit2-04-readline.h-stdio.patch | 17 +++++ .../libedit2/libedit2-08-readline-history.h.patch | 20 +++++ .../libedit2/libedit2-10-define_SIZE_T_MAX.patch | 18 +++++ .../libedit2/libedit2-12-libedit-Makefile.patch | 54 ++++++++++++++ package/libedit2/libedit2-20-fortify.patch | 23 ++++++ package/libedit2/libedit2.mk | 75 ++++++++++++++++++++ package/libedit2/libedit2.pc | 13 ++++ package/pmake/pmake.mk | 49 +++++++++++++ package/usbredir/usbredir.mk | 2 +- 25 files changed, 794 insertions(+), 1 deletions(-) create mode 100644 package/ceph/Config.in create mode 100644 package/ceph/ceph-no-envz.patch create mode 100644 package/ceph/ceph-no-getloadavg.patch create mode 100644 package/ceph/ceph-no-posix_fallocate.patch create mode 100644 package/ceph/ceph.mk create mode 100644 package/dtc/Config.in create mode 100644 package/dtc/dtc-extra_cflags.patch create mode 100644 package/dtc/dtc-separate-lib-install.patch create mode 100644 package/dtc/dtc.mk create mode 100644 package/libbsd/Config.in create mode 100644 package/libbsd/libbsd.mk create mode 100644 package/libedit2/Config.in create mode 100644 package/libedit2/libedit2-01-Makefile.patch create mode 100644 package/libedit2/libedit2-02-el.c-issetugid.patch create mode 100644 package/libedit2/libedit2-03-el.c-MAXPATHLEN.patch create mode 100644 package/libedit2/libedit2-04-readline.h-stdio.patch create mode 100644 package/libedit2/libedit2-08-readline-history.h.patch create mode 100644 package/libedit2/libedit2-10-define_SIZE_T_MAX.patch create mode 100644 package/libedit2/libedit2-12-libedit-Makefile.patch create mode 100644 package/libedit2/libedit2-20-fortify.patch create mode 100644 package/libedit2/libedit2.mk create mode 100644 package/libedit2/libedit2.pc create mode 100644 package/pmake/pmake.mk
Regards,
Yann E. MORIN
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/7 package/usbredir: update to version 0.6
--- package/usbredir/usbredir.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
package/usbredir/usbredir.mk +1 -1
@@ -4,7 +4,7 @@ # ############################################################# -USBREDIR_VERSION = 0.4.4 +USBREDIR_VERSION = 0.6 USBREDIR_SOURCE = usbredir-$(USBREDIR_VERSION).tar.bz2 USBREDIR_SITE = http://spice-space.org/download/usbredir USBREDIR_LICENSE = LGPLv2.1+
Signature · 1 line
1.7.2.5
PATCH 1/7 package/usbredir: update to version 0.6
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
Yann> Signed-off-by: "Yann E. MORIN" <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/7 package/pmake: add host pmake
In reply to Yann E. MORINpmake is the make command used by the BSD.
It will used to build BSD-related packages, coming later.
--- package/pmake/pmake.mk | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-) create mode 100644 package/pmake/pmake.mk
package/pmake/pmake.mk new file +49 -0
@@ -0,0 +1,49 @@ +############################################################# +# +# pmake +# +############################################################## + +PMAKE_VERSION = 1.111 +PMAKE_SOURCE = pmake_$(PMAKE_VERSION).orig.tar.gz +PMAKE_SITE = http://snapshot.debian.org/archive/debian/20120601T033558Z/pool/main/p/pmake +PMAKE_LICENSE = BSD-3c BSD-4c +# No license file. License texts are spread in the boilerplates +# of each individual source files; some are BSD-3c, some BSD-4c. + +# Vampirise patches from Debian +PMAKE_PATCH = pmake_1.111-3.2.debian.tar.gz + +# CFLAGS vampirised from Debian's rules, adapted to buildroot variables +HOST_PMAKE_CFLAGS = -O2 -g -Wall -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= -I. \ + -DMACHINE=\\\"buildroot\\\" \ + -DMACHINE_ARCH=\\\"$(ARCH)\\\" -DMACHINE_MULTIARCH=\\\"\\\" \ + -DHAVE_SETENV -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_STRFTIME \ + -DHAVE_VSNPRINTF -D_GNU_SOURCE -Wno-unused + +define HOST_PMAKE_BUILD_CMDS + $(MAKE) -C $(@D) -f Makefile.boot CFLAGS="$(HOST_PMAKE_CFLAGS)" +endef + +# The generated file is named bmake, but we want pmake; but: +# - pmake uses support files (in mk/) +# - it's not possible to tell pmake, at build-time, where to expect +# these support files, and pmake expects them in /usr/share/mk/ +# - but pmake has an option to override that search path at runtime +# - so we install bmake as bmake +# - and we install a wraper named pmake that calls pmake with the +# appropriate search path +define HOST_PMAKE_INSTALL_CMDS + $(INSTALL) -m 0755 $(@D)/bmake $(HOST_DIR)/usr/bin/bmake + $(INSTALL) -d -m 0755 $(HOST_DIR)/usr/share/pmake/mk + for mk in $(@D)/mk/*; do \ + $(INSTALL) -m 0644 $${mk} $(HOST_DIR)/usr/share/pmake/mk; \ + done + printf '#!/bin/sh\nexec %s -m %s "$$@"\n' \ + $(HOST_DIR)/usr/bin/bmake \ + $(HOST_DIR)/usr/share/pmake/mk \ + >$(HOST_DIR)/usr/bin/pmake + chmod 0755 $(HOST_DIR)/usr/bin/pmake +endef + +$(eval $(host-generic-package))
Signature · 1 line
1.7.2.5
PATCH 2/7 package/pmake: add host pmake
package/pmake/pmake.mk line 46
Quoted 5 lines · Yann E. MORIN
package/pmake/pmake.mk new file +5
-0+ printf '#!/bin/sh\nexec %s -m %s "$$@"\n' \ + $(HOST_DIR)/usr/bin/bmake \ + $(HOST_DIR)/usr/share/pmake/mk \ + >$(HOST_DIR)/usr/bin/pmake + chmod 0755 $(HOST_DIR)/usr/bin/pmake
I should have mentioned this earlier of course, but:
I would prefer to have a package/pmake/pmake script that discovers the
mk path based on ${0%/*}. That immediately makes it relocatable :-)
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 2/7 package/pmake: add host pmake
Arnout, All,
Quoted 11 lines · On Monday 04 February 2013 Arnout Vandecappelle wrote:
package/pmake/pmake.mk line 46
Quoted 5 lines · Yann E. MORIN
package/pmake/pmake.mk new file +5
-0+ printf '#!/bin/sh\nexec %s -m %s "$$@"\n' \ + $(HOST_DIR)/usr/bin/bmake \ + $(HOST_DIR)/usr/share/pmake/mk \ + >$(HOST_DIR)/usr/bin/pmake + chmod 0755 $(HOST_DIR)/usr/bin/pmakeI should have mentioned this earlier of course, but:
I would prefer to have a package/pmake/pmake script that discovers the
mk path based on ${0%/*}. That immediately makes it relocatable :-)
Nice catch, indeed! Done. :-)
Thank you,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 3/7 package/libbsd: new package
In reply to Yann E. MORIN--- package/Config.in | 1 + package/libbsd/Config.in | 10 ++++++++++ package/libbsd/libbsd.mk | 21 +++++++++++++++++++++ 3 files changed, 32 insertions(+), 0 deletions(-) create mode 100644 package/libbsd/Config.in create mode 100644 package/libbsd/libbsd.mk
package/Config.in +1 -0
@@ -541,6 +541,7 @@ source "package/libargtable2/Config.in" source "package/argp-standalone/Config.in" source "package/boost/Config.in" source "package/libatomic_ops/Config.in" +source "package/libbsd/Config.in" source "package/libcap/Config.in" source "package/libcap-ng/Config.in" source "package/libdaemon/Config.in"
package/libbsd/Config.in new file +10 -0
@@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBBSD + bool "libbsd" + help + This library provides useful functions commonly found on BSD + systems, and lacking on others like GNU systems, thus making + it easier to port projects with strong BSD origins, without + needing to embed the same code over and over again on each + project. + + http://libbsd.freedesktop.org/
package/libbsd/libbsd.mk new file +21 -0
@@ -0,0 +1,21 @@ +############################################################# +# +# libbsd +# +############################################################# + +LIBBSD_VERSION = 0.4.2 +LIBBSD_SOURCE = libbsd-$(LIBBSD_VERSION).tar.gz +LIBBSD_SITE = http://libbsd.freedesktop.org/releases +LIBBSD_LICENSE = BSD-3c MIT +LIBBSD_LICENSE_FILES = LICENSE + +# man-pages are BSD-4c, so that license only matters +# if doc is kept in the target rootfs +ifeq ($(BR2_HAVE_DOCUMENTATION),y) +LIBBSD_LICENSE += (libraries), BSD-4c (documentation) +endif + +LIBBSD_INSTALL_STAGING = YES + +$(eval $(autotools-package))
Signature · 1 line
1.7.2.5
PATCH 4/7 package/libedit2: new package
In reply to Yann E. MORIN--- package/Config.in | 1 + package/libedit2/Config.in | 9 +++ package/libedit2/libedit2-01-Makefile.patch | 25 +++++++ package/libedit2/libedit2-02-el.c-issetugid.patch | 24 ++++++ package/libedit2/libedit2-03-el.c-MAXPATHLEN.patch | 40 +++++++++++ .../libedit2/libedit2-04-readline.h-stdio.patch | 17 +++++ .../libedit2/libedit2-08-readline-history.h.patch | 20 +++++ .../libedit2/libedit2-10-define_SIZE_T_MAX.patch | 18 +++++ .../libedit2/libedit2-12-libedit-Makefile.patch | 54 ++++++++++++++ package/libedit2/libedit2-20-fortify.patch | 23 ++++++ package/libedit2/libedit2.mk | 75 ++++++++++++++++++++ package/libedit2/libedit2.pc | 13 ++++ 12 files changed, 319 insertions(+), 0 deletions(-) create mode 100644 package/libedit2/Config.in create mode 100644 package/libedit2/libedit2-01-Makefile.patch create mode 100644 package/libedit2/libedit2-02-el.c-issetugid.patch create mode 100644 package/libedit2/libedit2-03-el.c-MAXPATHLEN.patch create mode 100644 package/libedit2/libedit2-04-readline.h-stdio.patch create mode 100644 package/libedit2/libedit2-08-readline-history.h.patch create mode 100644 package/libedit2/libedit2-10-define_SIZE_T_MAX.patch create mode 100644 package/libedit2/libedit2-12-libedit-Makefile.patch create mode 100644 package/libedit2/libedit2-20-fortify.patch create mode 100644 package/libedit2/libedit2.mk create mode 100644 package/libedit2/libedit2.pc
package/Config.in +1 -0
@@ -572,6 +572,7 @@ menu "Text and terminal handling" source "package/enchant/Config.in" source "package/libfribidi/Config.in" source "package/icu/Config.in" +source "package/libedit2/Config.in" source "package/libiconv/Config.in" source "package/linenoise/Config.in" source "package/ncurses/Config.in"
package/libedit2/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBEDIT2 + bool "libedit2" + select BR2_PACKAGE_LIBBSD + select BR2_PACKAGE_NCURSES + help + The editline library (from BSD) provides generic line editing + and history functions. It slightly resembles GNU readline. + + http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-5-0/src/lib/libedit/
package/libedit2/libedit2-01-Makefile.patch new file +25 -0
@@ -0,0 +1,25 @@ + 01-Makefile.diff by Neal H Walfield <[email protected]> and + Gergely Nagy <[email protected]> + + Add the necessary includes and other things to the libedit + Makefile, so it will compile on GNU systems, with our supplied + glue code + + Yann E. MORIN: patch from debian. + +--- a/libedit/Makefile ++++ b/libedit/Makefile +@@ -1,6 +1,13 @@ + # $NetBSD: Makefile,v 1.36 2007/05/28 12:06:18 tls Exp $ + # @(#)Makefile 8.1 (Berkeley) 6/4/93 + ++OS!= sh -c "case `uname -s` in GNU|GNU/*) echo GNU ;; *) uname -s ;; esac" ++ ++.if ${OS} == GNU || ${OS} == Linux ++CFLAGS += -include bsd/bsd.h ++MKLINT=no ++.endif ++ + USE_SHLIBDIR= yes + + WARNS= 3
package/libedit2/libedit2-02-el.c-issetugid.patch new file +24 -0
@@ -0,0 +1,24 @@ + 02-el.c-issetugid.diff by Gergely Nagy <[email protected]> + + issetugid(2) is not implemented on GNU systems, so #ifdef it out + + Yann E. MORIN: patch from debian. + +--- a/libedit/el.c 2008-04-06 02:53:28.000000000 +1100 ++++ b/libedit/el.c 2009-06-23 08:51:48.000000000 +1000 +@@ -479,12 +479,14 @@ el_source(EditLine *el, const char *fnam + + fp = NULL; + if (fname == NULL) { +-#ifdef HAVE_ISSETUGID ++#if 1 + static const char elpath[] = "/.editrc"; + char path[MAXPATHLEN]; + ++#ifndef __GLIBC__ + if (issetugid()) + return (-1); ++#endif + if ((ptr = getenv("HOME")) == NULL) + return (-1); + if (strlcpy(path, ptr, sizeof(path)) >= sizeof(path))
package/libedit2/libedit2-03-el.c-MAXPATHLEN.patch new file +40 -0
@@ -0,0 +1,40 @@ + 03-el.c-MAXPATHLEN.diff by Gergely Nagy <[email protected]> + + on systems without MAXPATHLEN, allocate memory dynamically + + Yann E. MORIN: patch from debian. + +--- a/libedit/el.c 2009-06-23 08:57:04.000000000 +1000 ++++ b/libedit/el.c 2009-06-23 08:57:30.000000000 +1000 +@@ -481,7 +481,11 @@ el_source(EditLine *el, const char *fnam + if (fname == NULL) { + #if 1 + static const char elpath[] = "/.editrc"; ++#ifdef MAXPATHLEN + char path[MAXPATHLEN]; ++#else ++ char *path; ++#endif + + #ifndef __GLIBC__ + if (issetugid()) +@@ -489,10 +493,19 @@ el_source(EditLine *el, const char *fnam + #endif + if ((ptr = getenv("HOME")) == NULL) + return (-1); ++#ifndef MAXPATHLEN ++ path = (char *)malloc(strlen(ptr) + strlen(elpath) + 10); ++ if (path == NULL) ++ return (-1); ++ /* Always succeeds, since we have enough memory */ ++ strcpy(path, ptr); ++ strcat(path, elpath); ++#else + if (strlcpy(path, ptr, sizeof(path)) >= sizeof(path)) + return (-1); + if (strlcat(path, elpath, sizeof(path)) >= sizeof(path)) + return (-1); ++#endif + fname = path; + #else + /*
package/libedit2/libedit2-04-readline.h-stdio.patch new file +17 -0
@@ -0,0 +1,17 @@ + 04-readline.h-stdio.diff by Gergely Nagy <[email protected]> + + since readline.h uses types defined in stdio.h, that header should + be included + + Yann E. MORIN: patch from debian. + +--- a/libedit/readline/readline.h 2008-04-29 16:53:01.000000000 +1000 ++++ b/libedit/readline/readline.h 2009-06-23 08:35:58.000000000 +1000 +@@ -31,6 +31,7 @@ + #ifndef _READLINE_H_ + #define _READLINE_H_ + ++#include <stdio.h> + #include <sys/types.h> + + /* list of readline stuff supported by editline library's readline wrapper */
package/libedit2/libedit2-08-readline-history.h.patch new file +20 -0
@@ -0,0 +1,20 @@ + 08-readline-history.h.diff by Pawel Wiecek <[email protected]> + (compatibility with older versions) + + Setting the global variable rl_inhibit_completion to 1 did indeed + disable completion, but the invoking key (e.g., <TAB>) was not + inserted directly into the input line as it should be. + This patch fixes this problem, and also declares rl_inhibit_completion + in readline.h for better readline compatibility. + + Yann E. MORIN: patch from debian. + +--- a/libedit/readline/Makefile 2003-08-03 19:23:15.000000000 +1000 ++++ b/libedit/readline/Makefile 2009-06-23 08:35:58.000000000 +1000 +@@ -10,4 +10,6 @@ INCS= readline.h + INCSDIR= /usr/include/readline + INCSYMLINKS= readline.h ${INCSDIR}/history.h + ++incinstall:: linksinstall ++ + .include <bsd.prog.mk>
package/libedit2/libedit2-10-define_SIZE_T_MAX.patch new file +18 -0
@@ -0,0 +1,18 @@ + 10-define_SIZE_T_MAX.diff by Anibal Monsalve Salazar + define SIZE_T_MAX as UINT_MAX in limits.h + + Yann E. MORIN: patch from debian. + +--- a/libedit/readline.c 2008-04-29 16:53:01.000000000 +1000 ++++ a/libedit/readline.c 2008-06-14 23:54:16.000000000 +1000 +@@ -61,6 +61,10 @@ __RCSID("$NetBSD: readline.c,v 1.75 2008 + #include "readline/readline.h" + #include "filecomplete.h" + ++#ifndef SIZE_T_MAX ++#define SIZE_T_MAX UINT_MAX ++#endif ++ + void rl_prep_terminal(int); + void rl_deprep_terminal(void); +
package/libedit2/libedit2-12-libedit-Makefile.patch new file +54 -0
54 lines not on this page · raw message
package/libedit2/libedit2-20-fortify.patch new file +23 -0
@@ -0,0 +1,23 @@ +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488456 + +Patch by Kees Cook <[email protected]> + +Yann E. MORIN: patch from debian. + +--- a/libedit/vi.c 2006-10-22 17:48:13.000000000 +1000 ++++ b/libedit/vi.c 2009-06-23 08:35:58.000000000 +1000 +@@ -1012,8 +1012,12 @@ vi_histedit(EditLine *el, int c) + if (fd < 0) + return CC_ERROR; + cp = el->el_line.buffer; +- write(fd, cp, el->el_line.lastchar - cp +0u); +- write(fd, "\n", 1); ++ if (write(fd, cp, el->el_line.lastchar - cp +0u)<0 || ++ write(fd, "\n", 1)<0) { ++ close(fd); ++ unlink(tempfile); ++ return CC_ERROR; ++ } + pid = fork(); + switch (pid) { + case -1:
package/libedit2/libedit2.mk new file +75 -0
75 lines not on this page · raw message
package/libedit2/libedit2.pc new file +13 -0
@@ -0,0 +1,13 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libedit +Description: Not just a replacement library for libreadline and libhistory. +Version: 2.11 +Requires: libbsd ncurses +Requires.private: +Libs: -L${libdir} -ledit +Libs.private: +Cflags: -I${includedir}
Signature · 1 line
1.7.2.5
PATCH 4/7 package/libedit2: new package
Quoted 12 lines · Yann E. MORIN
Signed-off-by "Yann E. MORIN" <[email protected]>--- package/Config.in | 1 + package/libedit2/Config.in | 9 +++ package/libedit2/libedit2-01-Makefile.patch | 25 +++++++ package/libedit2/libedit2-02-el.c-issetugid.patch | 24 ++++++ package/libedit2/libedit2-03-el.c-MAXPATHLEN.patch | 40 +++++++++++ .../libedit2/libedit2-04-readline.h-stdio.patch | 17 +++++ .../libedit2/libedit2-08-readline-history.h.patch | 20 +++++ .../libedit2/libedit2-10-define_SIZE_T_MAX.patch | 18 +++++ .../libedit2/libedit2-12-libedit-Makefile.patch | 54 ++++++++++++++ package/libedit2/libedit2-20-fortify.patch | 23 ++++++
Any chance of using libedit_2.11-20080614-5.debian.tar.bz2 instead?
[snip]
Quoted 15 lines
package/libedit2/libedit2.mk new file +9
-0@@ -0,0 +1,75 @@ +############################################################# +# +# libedit2 +# +############################################################# + +# Note: libedit2 does not have a regular homepage, and it seems +# there is no place where to download a tarball from. That's +# why we use the Debian way-back machine.
package/libedit2/libedit2.mk line 19
Quoted 10 lines
package/libedit2/libedit2.mk new file +10
-0+LIBEDIT2_VERSION_MAJOR = 2 +LIBEDIT2_VERSION_MINOR = 11-20080614 +LIBEDIT2_VERSION = $(LIBEDIT2_VERSION_MAJOR).$(LIBEDIT2_VERSION_MINOR) +LIBEDIT2_SOURCE = libedit_$(LIBEDIT2_VERSION).orig.tar.bz2 +LIBEDIT2_SITE = http://snapshot.debian.org/archive/debian/20120601T033558Z/pool/main/libe/libedit +LIBEDIT2_SUBDIR = libedit +LIBEDIT2_INSTALL_STAGING = YES +LIBEDIT2_DEPENDENCIES = host-pmake libbsd ncurses + +define POST_PATCH_PERMISSIONS
Start the name with LIBEDIT2
package/libedit2/libedit2.mk line 26
Quoted 7 lines
package/libedit2/libedit2.mk new file +7
-0+ chmod +x $(@D)/libedit/makelist +endef + +LIBEDIT2_POST_PATCH_HOOKS += POST_PATCH_PERMISSIONS + +define LIBEDIT2_FIX_VIS_H_INCLUDE + $(SED) 's/^#include <vis.h>$$/#include <bsd\/vis.h>/;' $(@D)/libedit/filecomplete.c
If you use s,foo,bar, instead of s/foo/bar/ you don't need to quote /.
Also, the ; is redundant.
package/libedit2/libedit2.mk line 28
Quoted 2 lines
package/libedit2/libedit2.mk new file +2
-0+ $(SED) 's/^#include <vis.h>$$/#include <bsd\/vis.h>/;' $(@D)/libedit/history.c + $(SED) 's/^#include <vis.h>$$/#include <bsd\/vis.h>/;' $(@D)/libedit/readline.c
Three times the same sed rule => just apply once to all files.
package/libedit2/libedit2.mk line 32
Quoted 4 lines
package/libedit2/libedit2.mk new file +4
-0+endef +LIBEDIT2_POST_PATCH_HOOKS += LIBEDIT2_FIX_VIS_H_INCLUDE + +LIBEDIT2_PMAKE_ARGS = MKPROFILE=no MKCATPAGES=no MLINKS= MANPAGES= NOGCCERROR=1 \
We normally use _OPTS, not _ARGS. (There is TARGET_CONFIGURE_ARGS but
it's just plain wrong.)
package/libedit2/libedit2.mk line 33
Quoted 1 line
package/libedit2/libedit2.mk new file +1
-0+ SHLIB_SHFLAGS="-Wl,-soname,libedit.so.${LIBEDIT2_VERSION_MAJOR}" \
Redundant trailing \.
Quoted 10 lines
package/libedit2/libedit2.mk new file +10
-0+ +define LIBEDIT2_BUILD_CMDS + cd $(@D)/$(LIBEDIT2_SUBDIR); \ + $(TARGET_CONFIGURE_OPTS) LDADD="-lbsd -lcurses" pmake $(LIBEDIT2_PMAKE_ARGS) +endef + +LIBEDIT2_MAN_LINKS = el_init el_end el_reset el_gets el_getc el_push el_parse \ + el_set el_get el_source el_resize el_line el_insertstr \ + el_deletestr history_init history_end history +
package/libedit2/libedit2.mk line 53
Quoted 10 lines
package/libedit2/libedit2.mk new file +10
-0+# $1: DESTDIR to install into +# Can't use pmake to install, it wants to be root. sigh... :-( +define LIBEDIT2_INSTALL_CMDS + $(INSTALL) -D -m 0644 package/libedit2/libedit2.pc $(1)/usr/lib/pkgconfig/libedit2.pc + ln -sf libedit2.pc $(1)/usr/lib/pkgconfig/libedit.pc + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit.a $(1)/usr/lib/libedit.a + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit_pic.a $(1)/usr/lib/libedit_pic.a + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit.so.2.11 $(1)/usr/lib/libedit.so.2.11 + $(INSTALL) -D -m 0644 $(@D)/libedit/histedit.h $(1)/usr/include/histedit.h + ln -sf libedit.so.$(LIBEDIT2_VERSION) $(1)/usr/lib/libedit.so.$(LIBEDIT2_VERSION_MAJOR)
This doesn't seem right: LIBEDIT2_VERSION is 2.11-20080614, but you
just installed 2.11...
package/libedit2/libedit2.mk line 56
Quoted 3 lines
package/libedit2/libedit2.mk new file +3
-0+ ln -sf libedit.so.$(LIBEDIT2_VERSION_MAJOR) $(1)/usr/lib/libedit.so + $(INSTALL) -D -m 0644 $(@D)/libedit/readline/readline.h $(1)/usr/include/editline/readline.h + if [ "$(BR2_HAVE_DOCUMENTATION)" = "y" ]; then \
This condition is redundant, because the finalize step will remove man
anyway if !BR2_HAVE_DOCUMENTATION.
package/libedit2/libedit2.mk line 63
Quoted 7 lines
package/libedit2/libedit2.mk new file +7
-0+ $(INSTALL) -v -D -m 0644 $(@D)/libedit/editline.3 $(1)/usr/share/man/man3/editline.3el; \ + $(INSTALL) -v -D -m 0644 $(@D)/libedit/editrc.3 $(1)/usr/share/man/man5/editrc.5el; \ + for lnk in $(LIBEDIT2_MAN_LINKS); do \ + ln -sfv editline.3el $(1)/usr/share/man/man3/$${lnk}.3el; \ + done; \ + fi +endef
A perfect candidate to use the unified TARGET/STAGING install commands!
package/libedit2/libedit2.mk line 65
Quoted 2 lines
package/libedit2/libedit2.mk new file +2
-0+# cd $(@D)/libedit; pmake install incinstall DESTDIR=$(1) $(LIBEDIT2_PMAKE_ARGS) +# cd $(@D)/libedit/readline; pmake incinstall DESTDIR=$(1) $(LIBEDIT2_PMAKE_ARGS)
Redundant comments.
Regards,
Arnout
Quoted 29 lines
package/libedit2/libedit2.mk new file +10
-0+ +define LIBEDIT2_INSTALL_STAGING_CMDS + $(call LIBEDIT2_INSTALL_CMDS,$(STAGING_DIR)) +endef + +define LIBEDIT2_INSTALL_TARGET_CMDS + $(call LIBEDIT2_INSTALL_CMDS,$(TARGET_DIR)) +endef + +$(eval $(generic-package))package/libedit2/libedit2.pc new file +13
-0@@ -0,0 +1,13 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libedit +Description: Not just a replacement library for libreadline and libhistory. +Version: 2.11 +Requires: libbsd ncurses +Requires.private: +Libs: -L${libdir} -ledit +Libs.private: +Cflags: -I${includedir}
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 4/7 package/libedit2: new package
Arnout, All,
Quoted 14 lines · On Monday 04 February 2013 Arnout Vandecappelle wrote:
Quoted 12 lines · Yann E. MORIN
Signed-off-by "Yann E. MORIN" <[email protected]>--- package/Config.in | 1 + package/libedit2/Config.in | 9 +++ package/libedit2/libedit2-01-Makefile.patch | 25 +++++++ package/libedit2/libedit2-02-el.c-issetugid.patch | 24 ++++++ package/libedit2/libedit2-03-el.c-MAXPATHLEN.patch | 40 +++++++++++ .../libedit2/libedit2-04-readline.h-stdio.patch | 17 +++++ .../libedit2/libedit2-08-readline-history.h.patch | 20 +++++ .../libedit2/libedit2-10-define_SIZE_T_MAX.patch | 18 +++++ .../libedit2/libedit2-12-libedit-Makefile.patch | 54 ++++++++++++++ package/libedit2/libedit2-20-fortify.patch | 23 ++++++
Quoted 1 line
Any chance of using libedit_2.11-20080614-5.debian.tar.bz2 instead?
Hey! ;-)
Yes, I'll look at it.
Quoted 5 lines
package/libedit2/libedit2.mk
Quoted 5 lines
package/libedit2/libedit2.mk new file +0
-0
[--SNIP--]
Quoted 2 lines
Quoted 1 line
+define
POST_PATCH_PERMISSIONSStart the name with LIBEDIT2
Done.
Quoted 9 lines
package/libedit2/libedit2.mk line 26
Quoted 7 lines
package/libedit2/libedit2.mk new file +7
-0+ chmod +x $(@D)/libedit/makelist +endef + +LIBEDIT2_POST_PATCH_HOOKS += POST_PATCH_PERMISSIONS + +define LIBEDIT2_FIX_VIS_H_INCLUDE + $(SED) 's/^#include <vis.h>$$/#include <bsd\/vis.h>/;' $(@D)/libedit/filecomplete.cIf you use s,foo,bar, instead of s/foo/bar/ you don't need to quote /.
Granted. I usualy do not do that, as I sometime have paths that do contain commas, and would broke anyway, so I always explicitly quote '/'.
Quoted 1 line
Also, the ; is redundant.
I like it that all my sed expressions are properly terminated, even if it is not mandatory. It is very annoying to me that, when there are two or more expressions, they are all terminated, save for the last one...
Quoted 3 lines
package/libedit2/libedit2.mk line 28
Quoted 2 lines
package/libedit2/libedit2.mk new file +2
-0+ $(SED) 's/^#include <vis.h>$$/#include <bsd\/vis.h>/;' $(@D)/libedit/history.c + $(SED) 's/^#include <vis.h>$$/#include <bsd\/vis.h>/;' $(@D)/libedit/readline.cThree times the same sed rule => just apply once to all files.
Done.
Quoted 6 lines
package/libedit2/libedit2.mk line 32
Quoted 4 lines
package/libedit2/libedit2.mk new file +4
-0+endef +LIBEDIT2_POST_PATCH_HOOKS += LIBEDIT2_FIX_VIS_H_INCLUDE + +LIBEDIT2_PMAKE_ARGS = MKPROFILE=no MKCATPAGES=no MLINKS= MANPAGES= NOGCCERROR=1 \We normally use
_OPTS, not_ARGS. (There isTARGET_CONFIGURE_ARGSbut
it's just plain wrong.)
OK, although I disagree. Those are really 'arguments' to the command (as we have when we declare in C: "main( int argc, char** argv )" ). But OK, I'll change to keep in sync with the Buildroot naming scheme. ;-)
Quoted 2 lines
Quoted 1 line
+ SHLIB_SHFLAGS="-Wl,-soname,libedit.so.${LIBEDIT2_VERSION_MAJOR}" \
Redundant trailing \.
Yep.
[--SNIP--]
Quoted 4 lines
Quoted 4 lines
package/libedit2/libedit2.mk new file +4
-0+# $1: DESTDIR to install into +# Can't use pmake to install, it wants to be root. sigh... :-( +define LIBEDIT2_INSTALL_CMDS + $(INSTALL) -D -m 0644 package/libedit2/libedit2.pc $(1)/usr/lib/pkgconfig/libedit2.pc
Quoted 8 lines
package/libedit2/libedit2.mk line 53
Quoted 6 lines
package/libedit2/libedit2.mk new file +6
-0+ ln -sf libedit2.pc $(1)/usr/lib/pkgconfig/libedit.pc + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit.a $(1)/usr/lib/libedit.a + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit_pic.a $(1)/usr/lib/libedit_pic.a + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit.so.2.11 $(1)/usr/lib/libedit.so.2.11 + $(INSTALL) -D -m 0644 $(@D)/libedit/histedit.h $(1)/usr/include/histedit.h + ln -sf libedit.so.$(LIBEDIT2_VERSION) $(1)/usr/lib/libedit.so.$(LIBEDIT2_VERSION_MAJOR)This doesn't seem right:
LIBEDIT2_VERSIONis 2.11-20080614, but you
just installed 2.11...
Hmmm... Lemme check...
Quoted 5 lines
package/libedit2/libedit2.mk line 56
Quoted 3 lines
package/libedit2/libedit2.mk new file +3
-0+ ln -sf libedit.so.$(LIBEDIT2_VERSION_MAJOR) $(1)/usr/lib/libedit.so + $(INSTALL) -D -m 0644 $(@D)/libedit/readline/readline.h $(1)/usr/include/editline/readline.h + if [ "$(BR2_HAVE_DOCUMENTATION)" = "y" ]; then \This condition is redundant, because the finalize step will remove man
anyway if !BR2_HAVE_DOCUMENTATION.
OK.
Quoted 8 lines
package/libedit2/libedit2.mk line 63
Quoted 7 lines
package/libedit2/libedit2.mk new file +7
-0+ $(INSTALL) -v -D -m 0644 $(@D)/libedit/editline.3 $(1)/usr/share/man/man3/editline.3el; \ + $(INSTALL) -v -D -m 0644 $(@D)/libedit/editrc.3 $(1)/usr/share/man/man5/editrc.5el; \ + for lnk in $(LIBEDIT2_MAN_LINKS); do \ + ln -sfv editline.3el $(1)/usr/share/man/man3/$${lnk}.3el; \ + done; \ + fi +endefA perfect candidate to use the unified TARGET/STAGING install commands!
But for now, we do not have this option. ;-)
Quoted 3 lines
package/libedit2/libedit2.mk line 65
Quoted 2 lines
package/libedit2/libedit2.mk new file +2
-0+# cd $(@D)/libedit; pmake install incinstall DESTDIR=$(1) $(LIBEDIT2_PMAKE_ARGS) +# cd $(@D)/libedit/readline; pmake incinstall DESTDIR=$(1) $(LIBEDIT2_PMAKE_ARGS)Redundant comments.
Yep, Thomas already mentionned it, but I forgot to remove them. Sorry.
Thank you!
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 4/7 package/libedit2: new package
Arnout, All,
Quoted 2 lines · On Wednesday 06 February 2013 Yann E. MORIN wrote:
Quoted 1 line · On Monday 04 February 2013 Arnout Vandecappelle wrote:
On 04/02/13 17:01, Yann E. MORIN wrote:
[--SNIP--]
Quoted 13 lines
Quoted 4 lines
Quoted 4 lines
package/libedit2/libedit2.mk new file +4
-0+# $1: DESTDIR to install into +# Can't use pmake to install, it wants to be root. sigh... :-( +define LIBEDIT2_INSTALL_CMDS + $(INSTALL) -D -m 0644 package/libedit2/libedit2.pc $(1)/usr/lib/pkgconfig/libedit2.pcQuoted 8 lines
package/libedit2/libedit2.mk line 53
Quoted 6 lines
package/libedit2/libedit2.mk new file +6
-0+ ln -sf libedit2.pc $(1)/usr/lib/pkgconfig/libedit.pc + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit.a $(1)/usr/lib/libedit.a + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit_pic.a $(1)/usr/lib/libedit_pic.a + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit.so.2.11 $(1)/usr/lib/libedit.so.2.11 + $(INSTALL) -D -m 0644 $(@D)/libedit/histedit.h $(1)/usr/include/histedit.h + ln -sf libedit.so.$(LIBEDIT2_VERSION) $(1)/usr/lib/libedit.so.$(LIBEDIT2_VERSION_MAJOR)This doesn't seem right:
LIBEDIT2_VERSIONis 2.11-20080614, but you
just installed 2.11...
Quoted 1 line
Hmmm... Lemme check...
OK, here's what in the build log:
/usr/bin/install -D -m 0644 [...]/build/libedit2-2.11-20080614/libedit/libedit.so.2.11 [...]/target/usr/lib/libedit.so.2.11 ln -sf libedit.so.2.11-20080614 [...]/target/usr/lib/libedit.so.2
ln -sf libedit.so.2 [...]/target/usr/lib/libedit.so
And now, here's what is in target/usr/lib:
$ ls -l target/usr/lib/libedit* lrwxrwxrwx 1 ymorin ymorin 12 Feb 6 20:09 target/usr/lib/libedit.so -> libedit.so.2 lrwxrwxrwx 1 ymorin ymorin 15 Feb 6 20:09 target/usr/lib/libedit.so.2 -> libedit.so.2.11 -rw-r--r-- 1 ymorin ymorin 135945 Feb 6 20:09 target/usr/lib/libedit.so.2.11
WTF?
OK, I'll fix this. But dinner first! ;-)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 4/7 package/libedit2: new package
Quoted 27 lines · Yann E. MORIN
Arnout, All,
Quoted 2 lines · On Wednesday 06 February 2013 Yann E. MORIN wrote:
Quoted 1 line · On Monday 04 February 2013 Arnout Vandecappelle wrote:
On 04/02/13 17:01, Yann E. MORIN wrote:
[--SNIP--]
Quoted 13 lines
Quoted 4 lines
Quoted 4 lines
package/libedit2/libedit2.mk new file +4
-0+# $1: DESTDIR to install into +# Can't use pmake to install, it wants to be root. sigh... :-( +define LIBEDIT2_INSTALL_CMDS + $(INSTALL) -D -m 0644 package/libedit2/libedit2.pc $(1)/usr/lib/pkgconfig/libedit2.pcQuoted 8 lines
package/libedit2/libedit2.mk line 53
Quoted 6 lines
package/libedit2/libedit2.mk new file +6
-0+ ln -sf libedit2.pc $(1)/usr/lib/pkgconfig/libedit.pc + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit.a $(1)/usr/lib/libedit.a + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit_pic.a $(1)/usr/lib/libedit_pic.a + $(INSTALL) -D -m 0644 $(@D)/libedit/libedit.so.2.11 $(1)/usr/lib/libedit.so.2.11 + $(INSTALL) -D -m 0644 $(@D)/libedit/histedit.h $(1)/usr/include/histedit.h + ln -sf libedit.so.$(LIBEDIT2_VERSION) $(1)/usr/lib/libedit.so.$(LIBEDIT2_VERSION_MAJOR)This doesn't seem right:
LIBEDIT2_VERSIONis 2.11-20080614, but you
just installed 2.11...Quoted 1 line
Hmmm... Lemme check...
OK, here's what in the build log:
/usr/bin/install-D -m 0644 [...]/build/libedit2-2.11-20080614/libedit/libedit.so.2.11 [...]/target/usr/lib/libedit.so.2.11 ln -sf libedit.so.2.11-20080614 [...]/target/usr/lib/libedit.so.2
ln -sf libedit.so.2 [...]/target/usr/lib/libedit.so
Quoted 8 lines
And now, here's what is in target/usr/lib:
$ ls -l target/usr/lib/libedit* lrwxrwxrwx 1 ymorin ymorin 12 Feb 6 20:09 target/usr/lib/libedit.so -> libedit.so.2 lrwxrwxrwx 1 ymorin ymorin 15 Feb 6 20:09 target/usr/lib/libedit.so.2 -> libedit.so.2.11 -rw-r--r-- 1 ymorin ymorin 135945 Feb 6 20:09 target/usr/lib/libedit.so.2.11WTF?
Hang on... Aren't these links created by ldconfig? Is it even necessary
to create them manually, since we run ldconfig in target-finalize?
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 4/7 package/libedit2: new package
Arnout, all,
Quoted 7 lines · On Wednesday 06 February 2013 Arnout Vandecappelle wrote:
Quoted 4 lines · Yann E. MORIN
$ ls -l target/usr/lib/libedit* lrwxrwxrwx 1 ymorin ymorin 12 Feb 6 20:09 target/usr/lib/libedit.so -> libedit.so.2 lrwxrwxrwx 1 ymorin ymorin 15 Feb 6 20:09 target/usr/lib/libedit.so.2 -> libedit.so.2.11 -rw-r--r-- 1 ymorin ymorin 135945 Feb 6 20:09 target/usr/lib/libedit.so.2.11Hang on... Aren't these links created by ldconfig? Is it even necessary
to create them manually, since we run ldconfig in target-finalize?
Just tried. Nice catch! :-)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 4/7 package/libedit2: new package
In reply to Yann E. MORINQuoted 4 lines · Yann E. MORIN
Arnout, All,
Quoted 1 line · On Monday 04 February 2013 Arnout Vandecappelle wrote:
On 04/02/13 17:01, Yann E. MORIN wrote:
[snip]
Quoted 7 lines
Quoted 4 lines
package/libedit2/libedit2.mk line 26
Quoted 2 lines
package/libedit2/libedit2.mk new file +2
-0+define LIBEDIT2_FIX_VIS_H_INCLUDE + $(SED) 's/^#include <vis.h>$$/#include <bsd\/vis.h>/;' $(@D)/libedit/filecomplete.cIf you use s,foo,bar, instead of s/foo/bar/ you don't need to quote /.
Granted. I usualy do not do that, as I sometime have paths that do contain commas, and would broke anyway, so I always explicitly quote '/'.
@ is a good alternative. But feel free to keep the quoting if you prefer.
Quoted 6 lines
Quoted 2 lines
Also, the ; is redundant.
I like it that all my sed expressions are properly terminated, even if it is not mandatory. It is very annoying to me that, when there are two or more expressions, they are all terminated, save for the last one...
OK, I thought it was a mistake.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 5/7 package/ceph: new package
In reply to Yann E. MORIN--- package/Config.in | 1 + package/ceph/Config.in | 25 +++++++++++ package/ceph/ceph-no-envz.patch | 63 ++++++++++++++++++++++++++++ package/ceph/ceph-no-getloadavg.patch | 61 +++++++++++++++++++++++++++ package/ceph/ceph-no-posix_fallocate.patch | 50 ++++++++++++++++++++++ package/ceph/ceph.mk | 57 +++++++++++++++++++++++++ 6 files changed, 257 insertions(+), 0 deletions(-) create mode 100644 package/ceph/Config.in create mode 100644 package/ceph/ceph-no-envz.patch create mode 100644 package/ceph/ceph-no-getloadavg.patch create mode 100644 package/ceph/ceph-no-posix_fallocate.patch create mode 100644 package/ceph/ceph.mk
package/Config.in +1 -0
@@ -623,6 +623,7 @@ source "package/bind/Config.in" source "package/bmon/Config.in" source "package/bridge-utils/Config.in" source "package/can-utils/Config.in" +source "package/ceph/Config.in" source "package/connman/Config.in" source "package/ctorrent/Config.in" source "package/conntrack-tools/Config.in"
package/ceph/Config.in new file +25 -0
@@ -0,0 +1,25 @@ +comment "ceph requires C++, largefiles, threads, wide chars" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR + depends on !BR2_avr2 && !BR2_microblaze + +config BR2_PACKAGE_CEPH + bool "ceph" + depends on BR2_INSTALL_LIBSTDCPP # boost + depends on BR2_LARGEFILE # boost, libnss, util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS # boost, libnss + depends on BR2_USE_WCHAR # util-linux + depends on !BR2_avr32 && !BR2_microblaze # keyutils + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_SYSTEM + select BR2_PACKAGE_BOOST_THREAD + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_KEYUTILS + select BR2_PACKAGE_LIBEDIT2 + select BR2_PACKAGE_LIBNSS + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Ceph is a distributed object store and file system designed to + provide excellent performance, reliability and scalability. + + http://ceph.com/
package/ceph/ceph-no-envz.patch new file +63 -0
63 lines not on this page · raw message
package/ceph/ceph-no-getloadavg.patch new file +61 -0
61 lines not on this page · raw message
package/ceph/ceph-no-posix_fallocate.patch new file +50 -0
50 lines not on this page · raw message
package/ceph/ceph.mk new file +57 -0
57 lines not on this page · raw message
Signature · 1 line
1.7.2.5
PATCH 5/7 package/ceph: new package
Quoted 34 lines · Yann E. MORIN
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Peter Korsgaard <[email protected]>--- package/Config.in | 1 + package/ceph/Config.in | 25 +++++++++++ package/ceph/ceph-no-envz.patch | 63 ++++++++++++++++++++++++++++ package/ceph/ceph-no-getloadavg.patch | 61 +++++++++++++++++++++++++++ package/ceph/ceph-no-posix_fallocate.patch | 50 ++++++++++++++++++++++ package/ceph/ceph.mk | 57 +++++++++++++++++++++++++ 6 files changed, 257 insertions(+), 0 deletions(-)create mode 100644 package/ceph/Config.in
create mode 100644package/ceph/ceph-no-envz.patchcreate mode 100644package/ceph/ceph-no-getloadavg.patchcreate mode 100644package/ceph/ceph-no-posix_fallocate.patchcreate mode 100644package/ceph/ceph.mkpackage/Config.in +1
-0@@ -623,6 +623,7 @@ source "package/bind/Config.in" source "package/bmon/Config.in" source "package/bridge-utils/Config.in" source "package/can-utils/Config.in" +source "package/ceph/Config.in" source "package/connman/Config.in" source "package/ctorrent/Config.in" source "package/conntrack-tools/Config.in"package/ceph/Config.in new file +0
-0
package/ceph/Config.in line 3
Quoted 3 lines
package/ceph/Config.in new file +3
-0@@ -0,0 +1,25 @@ +comment "ceph requires C++, largefiles, threads, wide chars" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR + depends on !BR2_avr2 && !BR2_microblaze
avr32
Quoted 28 lines
package/ceph/Config.in new file +22
-0+ +config BR2_PACKAGE_CEPH + bool "ceph" + depends on BR2_INSTALL_LIBSTDCPP # boost + depends on BR2_LARGEFILE # boost, libnss, util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS # boost, libnss + depends on BR2_USE_WCHAR # util-linux + depends on !BR2_avr32 && !BR2_microblaze # keyutils + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_SYSTEM + select BR2_PACKAGE_BOOST_THREAD + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_KEYUTILS + select BR2_PACKAGE_LIBEDIT2 + select BR2_PACKAGE_LIBNSS + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Ceph is a distributed object store and file system designed to + provide excellent performance, reliability and scalability. + + http://ceph.com/package/ceph/ceph-no-envz.patch new file +0
-0
package/ceph/ceph-no-envz.patch line 4
Quoted 4 lines
package/ceph/ceph-no-envz.patch new file +4
-0@@ -0,0 +1,63 @@ +tools+base: do not include envz.h on uClibc + +uClibc does not have envz, and no envz function is in fact used. +So, simply do not include it under uClibc.
If it's not used, why not just remove the header (and upstream the patch)?
Quoted 17 lines
package/ceph/ceph-no-envz.patch new file +17
-0+ +Signed-off-by: "Yann E. MORIN" <[email protected]> + +--- ceph-0.51.orig/src/tools/common.cc 2012-09-09 00:13:32.128838177 +0200 ++++ ceph-0.51/src/tools/common.cc 2012-09-09 00:13:59.432064556 +0200 +@@ -17,9 +17,9 @@ + #include <string> + using namespace std; + +-#if !defined(DARWIN) && !defined(__FreeBSD__) ++#if !defined(DARWIN) && !defined(__FreeBSD__) && !defined(__UCLIBC__) + #include <envz.h> +-#endif // DARWIN ++#endif // DARWIN || __UCLIBC__ + + #include <memory> + #include <sys/types.h>
[snip]
Quoted 6 lines
package/ceph/ceph.mk new file +0
-0
package/ceph/ceph.mk line 10
Quoted 10 lines
package/ceph/ceph.mk new file +10
-0@@ -0,0 +1,57 @@ +############################################################# +# +# ceph +# +############################################################# + +CEPH_VERSION = 0.56.2 +CEPH_SOURCE = ceph-$(CEPH_VERSION).tar.bz2 +CEPH_SITE = http://ceph.com/download/ +CEPH_LICENSE = LGPLv2.1 CC-BY-SA Apache-2.0 GPLv2 LGPLv2+ BSD-3c MIT PD
I'm not sure if PD is a generally accepted abbreviation. And I also
don't think it is necessary to mention it in the first place (it the entire package is public domain, yes it makes sense, but if it's just part of it then no).
package/ceph/ceph.mk line 15
Quoted 5 lines
package/ceph/ceph.mk new file +5
-0+CEPH_LICENSE_FILES = COPYING +CEPH_INSTALL_STAGING = YES + +# Bundled ./configure and Makefile.in file are not in sync +# with the correposnding configure.ac and Makefile.am
corresponding
Regards,
Arnout
Quoted 43 lines
package/ceph/ceph.mk new file +42
-0+CEPH_AUTORECONF = YES + +CEPH_DEPENDENCIES = \ + boost \ + expat \ + keyutils \ + libedit2 \ + libnss \ + util-linux \ + +# We disable everything for now, because the dependency tree can become +# quite deep if we try to enable some features, and I have not tested that. +# We need at least one crypto lib, and the currently only one available in +# BR, that ceph can use, is libnss +CEPH_CONF_OPT = \ + --with-nss \ + --without-profiler \ + --without-debug \ + --without-tcmalloc \ + --without-hadoop \ + --without-libatomic-ops \ + --without-system-leveldb \ + --without-system-libs3 \ + --without-rest-bench \ + --without-cryptopp \ + --with-ocf \ + +ifeq ($(BR2_PACKAGE_LIBFUSE),y) +CEPH_DEPENDENCIES += libfuse +CEPH_CONF_OPT += --with-fuse +else +CEPH_CONF_OPT += --without-fuse +endif + +ifeq ($(BR2_PACKAGE_LIBAIO),y) +CEPH_DEPENDENCIES += libaio +CEPH_CONF_OPT += --with-libaio +else +CEPH_CONF_OPT += --without-libaio +endif + +$(eval $(autotools-package))
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 5/7 package/ceph: new package
Arnout, All,
Quoted 1 line · On Monday 04 February 2013 Arnout Vandecappelle wrote:
On 04/02/13 17:01, Yann E. MORIN wrote:
[--SNIP--]
Quoted 11 lines
package/ceph/ceph-no-envz.patch line 4
Quoted 10 lines
package/ceph/ceph-no-envz.patch new file +4
-0@@ -0,0 +1,63 @@ +tools+base: do not include envz.h on uClibc + +uClibc does not have envz, and no envz function is in fact used. +So, simply do not include it under uClibc.If it's not used, why not just remove the header (and upstream the patch)?
Well... IIRC, upstream never replied to my patch.
So I kept it as-is, in case we needed to later bump ceph version with as litle impact as possible.
Quoted 13 lines
Quoted 13 lines
package/ceph/ceph.mk new file +7
-0@@ -0,0 +1,57 @@ +############################################################# +# +# ceph +# +############################################################# + +CEPH_VERSION = 0.56.2
Quoted 8 lines
package/ceph/ceph.mk line 10
Quoted 3 lines
package/ceph/ceph.mk new file +3
-0+CEPH_SOURCE = ceph-$(CEPH_VERSION).tar.bz2 +CEPH_SITE = http://ceph.com/download/ +CEPH_LICENSE = LGPLv2.1 CC-BY-SA Apache-2.0 GPLv2 LGPLv2+ BSD-3c MIT PDI'm not sure if PD is a generally accepted abbreviation. And I also
don't think it is necessary to mention it in the first place (it the entire package is public domain, yes it makes sense, but if it's just part of it then no).
OK, I'll drop it.
Thank you!
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 6/7 package/dtc: new package
In reply to Yann E. MORINdtc is the Device Tree Compiler, and manipulates device trees.
---
Although Arnout suggested to move it out of the libraries sub-menu, I kept it there, as by default, only the library is installed, like it is done for, eg., libcurl.
--- package/Config.in | 1 + package/dtc/Config.in | 9 +++++++ package/dtc/dtc-extra_cflags.patch | 27 ++++++++++++++++++++++ package/dtc/dtc-separate-lib-install.patch | 28 +++++++++++++++++++++++ package/dtc/dtc.mk | 34 ++++++++++++++++++++++++++++ 5 files changed, 99 insertions(+), 0 deletions(-) create mode 100644 package/dtc/Config.in create mode 100644 package/dtc/dtc-extra_cflags.patch create mode 100644 package/dtc/dtc-separate-lib-install.patch create mode 100644 package/dtc/dtc.mk
package/Config.in +1 -0
@@ -443,6 +443,7 @@ endmenu menu "Hardware handling" source "package/ccid/Config.in" +source "package/dtc/Config.in" source "package/imx-lib/Config.in" source "package/lcdapi/Config.in" source "package/libaio/Config.in"
package/dtc/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_DTC + bool "dtc" + help + The Device Tree Compiler, dtc, takes as input a device-tree in + a given format and outputs a device-tree in another format. + + Note that only the library is installed for now. + + http://git.jdl.com/gitweb/?p=dtc.git (no home page)
package/dtc/dtc-extra_cflags.patch new file +27 -0
@@ -0,0 +1,27 @@ +Makefile: append the CFLAGS to existing ones + +Allow the user to pass custom CFLAGS (eg. optimisation flags). + +Do not use EXTRA_CFLAGS, append to existing CFLAGS with += (Arnout) + +Cc: Arnout Vandecappelle <[email protected]> +Signed-off-by: "Yann E. MORIN" <[email protected]> + +--- +Patch not sent upstream. + +Although not specific to buildroot, I am not sure this is the best +way to handle user-supplied CFLAGS. + +diff -durN dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef.orig/Makefile dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef/Makefile +--- dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef.orig/Makefile 2012-10-22 22:02:47.541240846 +0200 ++++ dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef/Makefile 2012-10-22 22:03:21.151047833 +0200 +@@ -18,7 +18,7 @@ + CPPFLAGS = -I libfdt -I . + WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ + -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls +-CFLAGS = -g -Os -fPIC -Werror $(WARNINGS) ++CFLAGS += -g -Os -fPIC -Werror $(WARNINGS) + + BISON = bison + LEX = flex
package/dtc/dtc-separate-lib-install.patch new file +28 -0
@@ -0,0 +1,28 @@ +Makefile: add a rule to only install libfdt + +Signed-off-by: "Yann E. MORIN" <[email protected]> + +--- +Patch not sent upstream. + +It's really specific to buildroot, and is probably not +good (aka generic) enough to be pushed upstream. + +diff --git a/Makefile b/Makefile +index 1169e6c..39e7190 100644 +--- a/Makefile ++++ b/Makefile +@@ -160,10 +160,12 @@ endif + # intermediate target and building them again "for real" + .SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS) + +-install: all $(SCRIPTS) ++install: all $(SCRIPTS) libfdt_install + @$(VECHO) INSTALL + $(INSTALL) -d $(DESTDIR)$(BINDIR) + $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR) ++ ++libfdt_install: libfdt + $(INSTALL) -d $(DESTDIR)$(LIBDIR) + $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) + ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
package/dtc/dtc.mk new file +34 -0
@@ -0,0 +1,34 @@ +############################################################# +# +# dtc +# +############################################################# + +DTC_VERSION = e4b497f367a3b2ae99cc52089a14a221b13a76ef +DTC_SITE = git://git.jdl.com/software/dtc.git +DTC_LICENSE = GPLv2+/BSD-2c +DTC_LICENSE_FILES = README.license GPL +# Note: the dual-license only applies to the library. +# The DT compiler (dtc) is GPLv2+, but we do not install it. +DTC_INSTALL_STAGING = YES + +define DTC_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + $(MAKE) -C $(@D) PREFIX=/usr libfdt +endef + +#?libfdt_install is our own install rule added by our patch +define DTC_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr libfdt_install +endef + +define DTC_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr libfdt_install +endef + +define DTC_CLEAN_CMDS + $(MAKE) -C $(@D) libfdt_clean +endef + +$(eval $(generic-package))
Signature · 1 line
1.7.2.5
PATCH 6/7 package/dtc: new package
Quoted 58 lines · Yann E. MORIN
dtc is the Device Tree Compiler, and manipulates device trees.
Cc Arnout Vandecappelle <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>---
Although Arnout suggested to move it out of the libraries sub-menu, I kept it there, as by default, only the library is installed, like it is done for, eg., libcurl.--- package/Config.in | 1 + package/dtc/Config.in | 9 +++++++ package/dtc/dtc-extra_cflags.patch | 27 ++++++++++++++++++++++ package/dtc/dtc-separate-lib-install.patch | 28 +++++++++++++++++++++++ package/dtc/dtc.mk | 34 ++++++++++++++++++++++++++++ 5 files changed, 99 insertions(+), 0 deletions(-)create mode 100644 package/dtc/Config.in
create mode 100644package/dtc/dtc-extra_cflags.patchcreate mode 100644package/dtc/dtc-separate-lib-install.patchcreate mode 100644package/dtc/dtc.mkpackage/Config.in +1
-0@@ -443,6 +443,7 @@ endmenu menu "Hardware handling" source "package/ccid/Config.in" +source "package/dtc/Config.in" source "package/imx-lib/Config.in" source "package/lcdapi/Config.in" source "package/libaio/Config.in"package/dtc/Config.in new file +9
-0@@ -0,0 +1,9 @@ +config BR2_PACKAGE_DTC + bool "dtc" + help + The Device Tree Compiler, dtc, takes as input a device-tree in + a given format and outputs a device-tree in another format. + + Note that only the library is installed for now. + + http://git.jdl.com/gitweb/?p=dtc.git (no home page)package/dtc/dtc-extra_cflags.patch new file +4
-0@@ -0,0 +1,27 @@ +Makefile: append the CFLAGS to existing ones + +Allow the user to pass custom CFLAGS (eg. optimisation flags). +
package/dtc/dtc-extra_cflags.patch line 14
Quoted 10 lines
package/dtc/dtc-extra_cflags.patch new file +10
-0+Do not use EXTRA_CFLAGS, append to existing CFLAGS with += (Arnout) + +Cc: Arnout Vandecappelle <[email protected]> +Signed-off-by: "Yann E. MORIN" <[email protected]> + +--- +Patch not sent upstream. + +Although not specific to buildroot, I am not sure this is the best +way to handle user-supplied CFLAGS.
It is the proper way according to info '(make)Command Variables'
"If there are C compiler options that _must_ be used for proper compilation of certain files, do not include them in CFLAGS'. Users expect to be able to specify CFLAGS' freely themselves. Instead, arrange to pass the necessary options to the C compiler independently of `CFLAGS'..."
Admittedly, the example that is given in the GNU make manual is a
different approach: set the options that must be used directly in the rule.
package/dtc/dtc-extra_cflags.patch line 24
Quoted 10 lines
package/dtc/dtc-extra_cflags.patch new file +10
-0+ +diff -durN dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef.orig/Makefile dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef/Makefile +--- dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef.orig/Makefile 2012-10-22 22:02:47.541240846 +0200 ++++ dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef/Makefile 2012-10-22 22:03:21.151047833 +0200 +@@ -18,7 +18,7 @@ + CPPFLAGS = -I libfdt -I . + WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ + -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls +-CFLAGS = -g -Os -fPIC -Werror $(WARNINGS) ++CFLAGS += -g -Os -fPIC -Werror $(WARNINGS)
Actually this is not yet entirely perfect, because the -g -Os -W...
should be overridable by the user. I would have put:
CFLAGS ?= -g -Os -Werror $(WARNINGS)
CFLAGS += -fPIC
(but that's a matter of opinion, I guess.
Quoted 43 lines
package/dtc/dtc-extra_cflags.patch new file +3
-0+ + BISON = bison + LEX = flexpackage/dtc/dtc-separate-lib-install.patch new file +28
-0@@ -0,0 +1,28 @@ +Makefile: add a rule to only install libfdt + +Signed-off-by: "Yann E. MORIN" <[email protected]> + +--- +Patch not sent upstream. + +It's really specific to buildroot, and is probably not +good (aka generic) enough to be pushed upstream. + +diff --git a/Makefile b/Makefile +index 1169e6c..39e7190 100644 +--- a/Makefile ++++ b/Makefile +@@ -160,10 +160,12 @@ endif + # intermediate target and building them again "for real" + .SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS) + +-install: all $(SCRIPTS) ++install: all $(SCRIPTS) libfdt_install + @$(VECHO) INSTALL + $(INSTALL) -d $(DESTDIR)$(BINDIR) + $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR) ++ ++libfdt_install: libfdt + $(INSTALL) -d $(DESTDIR)$(LIBDIR) + $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) + ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)package/dtc/dtc.mk new file +0
-0
package/dtc/dtc.mk line 8
Quoted 8 lines
package/dtc/dtc.mk new file +8
-0@@ -0,0 +1,34 @@ +############################################################# +# +# dtc +# +############################################################# + +DTC_VERSION = e4b497f367a3b2ae99cc52089a14a221b13a76ef +DTC_SITE = git://git.jdl.com/software/dtc.git
I realize the choice between the in-kernel or external version was
discussed before, but isn't it a bit strange that host-dtc is created from the in-kernel tree, while target-dtc uses the external tree?
(this doesn't affect this patch, of course, since host support can be
added later).
package/dtc/dtc.mk line 17
Quoted 9 lines
package/dtc/dtc.mk new file +9
-0+DTC_LICENSE = GPLv2+/BSD-2c +DTC_LICENSE_FILES = README.license GPL +# Note: the dual-license only applies to the library. +# The DT compiler (dtc) is GPLv2+, but we do not install it. +DTC_INSTALL_STAGING = YES + +define DTC_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \
This is already in TARGET_CONFIGURE_OPTS...
package/dtc/dtc.mk line 28
Quoted 11 lines
package/dtc/dtc.mk new file +11
-0+ $(MAKE) -C $(@D) PREFIX=/usr libfdt +endef + +# libfdt_install is our own install rule added by our patch +define DTC_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr libfdt_install +endef + +define DTC_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr libfdt_install +endef
Another nice use-case of the unified install :-)
Regards,
Arnout
Quoted 7 lines
package/dtc/dtc.mk new file +6
-0+ +define DTC_CLEAN_CMDS + $(MAKE) -C $(@D) libfdt_clean +endef + +$(eval $(generic-package))
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 6/7 package/dtc: new package
Arnout, All,
Quoted 2 lines · On Tuesday 05 February 2013 Arnout Vandecappelle wrote:
Quoted 1 line · Yann E. MORIN
dtc is the Device Tree Compiler, and manipulates device trees.
[--SNIP--]
Quoted 10 lines
package/dtc/dtc-extra_cflags.patch line 24
Quoted 9 lines
package/dtc/dtc-extra_cflags.patch new file +9
-0+diff -durN dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef.orig/Makefile dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef/Makefile +--- dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef.orig/Makefile 2012-10-22 22:02:47.541240846 +0200 ++++ dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef/Makefile 2012-10-22 22:03:21.151047833 +0200 +@@ -18,7 +18,7 @@ + CPPFLAGS = -I libfdt -I . + WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ + -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls +-CFLAGS = -g -Os -fPIC -Werror $(WARNINGS) ++CFLAGS += -g -Os -fPIC -Werror $(WARNINGS)
Quoted 7 lines
Actually this is not yet entirely perfect, because the -g -Os -W...
should be overridable by the user. I would have put:CFLAGS ?= -g -Os -Werror $(WARNINGS)
CFLAGS += -fPIC(but that's a matter of opinion, I guess.
I like it better, too. Thanks!
Quoted 19 lines
Quoted 6 lines
package/dtc/dtc.mk new file +0
-0package/dtc/dtc.mk line 8
Quoted 8 lines
package/dtc/dtc.mk new file +8
-0@@ -0,0 +1,34 @@ +############################################################# +# +# dtc +# +############################################################# + +DTC_VERSION = e4b497f367a3b2ae99cc52089a14a221b13a76ef +DTC_SITE = git://git.jdl.com/software/dtc.gitI realize the choice between the in-kernel or external version was
discussed before, but isn't it a bit strange that host-dtc is created from the in-kernel tree, while target-dtc uses the external tree?
Quoted 2 lines
(this doesn't affect this patch, of course, since host support can be
added later).
The dtc in ther kernek tree is built by the kernel's build system and does not build libfdt. It also lacks a complete and proper Makefile.
The upstream dtc (from which the kernel-bundled one is synced from time to time) has a complete build system, and is more up-to-date (which reminds me to bump the sha1 before re-pushing...).
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 7/7 package/dtc: add option to install programs
In reply to Yann E. MORINBy default, we only install the libfdt library.
As suggested by Arnout, add an option that also
installs the few dtc programs.
---
dtdiff, a diff for device trees, requires bash.
I did not add a 'depends on bash' (or a 'select' either), because requiring bash just for that is a bit far-fetched.
Instead, at dtc install time, if bash is selected, dtdiff is installed as usual to the target rootfs; if bash is not selected, dtdiff is removed from the target rootfs.
--- package/dtc/Config.in | 24 ++++++++++++++++++++++-- package/dtc/dtc.mk | 29 +++++++++++++++++++++++------ 2 files changed, 45 insertions(+), 8 deletions(-)
package/dtc/Config.in +22 -2
@@ -1,9 +1,29 @@ config BR2_PACKAGE_DTC - bool "dtc" + bool "dtc (libfdt)" help The Device Tree Compiler, dtc, takes as input a device-tree in a given format and outputs a device-tree in another format. - Note that only the library is installed for now. + Note that only the library is installed. + If you want the programs, say 'y' here, and to "dtc programs", below. http://git.jdl.com/gitweb/?p=dtc.git (no home page) + +if BR2_PACKAGE_DTC + +config BR2_PACKAGE_DTC_PROGRAMS + bool "dtc programs" + help + Say 'y' here if you also want the programs on the target: + - convert-dtsv0 convert from version 0 to version 1 + - dtc the device tree compiler + - dtdiff compare two device trees (needs bash) + - fdtdump print a readable version of a flat device tree + - fdtget read values from device tree + - fdtput write a property value to a device tree + + Note: dtdiff requires bash, so if bash is not selected, dtdiff will + be removed from the target file system. Enable bash if you + need dtdiff on the target. + +endif
package/dtc/dtc.mk +23 -6
@@ -8,27 +8,44 @@ DTC_VERSION = e4b497f367a3b2ae99cc52089a14a221b13a76ef DTC_SITE = git://git.jdl.com/software/dtc.git DTC_LICENSE = GPLv2+/BSD-2c DTC_LICENSE_FILES = README.license GPL -# Note: the dual-license only applies to the library. -# The DT compiler (dtc) is GPLv2+, but we do not install it. DTC_INSTALL_STAGING = YES +ifeq ($(BR2_PACKAGE_DTC_PROGRAMS),y) +DTC_LICENSE += (for the library), GPLv2+ (for the executables) +# Use default goal to build everything +DTC_BUILD_GOAL = +DTC_INSTALL_GOAL = install +DTC_CLEAN_GOAL = clean +else # $(BR2_PACKAGE_DTC_PROGRAMS) != y +DTC_BUILD_GOAL = libfdt +#?libfdt_install is our own install rule added by our patch +DTC_INSTALL_GOAL = libfdt_install +DTC_CLEAN_GOAL = libfdt_clean +ifeq ($(BR2_PACKAGE_BASH),) +DTC_POST_INSTALL_TARGET_HOOKS += DTC_POST_INSTALL_TARGET_RM_DTDIFF +endif +endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y + define DTC_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ - $(MAKE) -C $(@D) PREFIX=/usr libfdt + $(MAKE) -C $(@D) PREFIX=/usr $(DTC_BUILD_GOAL) endef -#?libfdt_install is our own install rule added by our patch +# For staging, only the library is needed define DTC_INSTALL_STAGING_CMDS $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr libfdt_install endef define DTC_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr libfdt_install + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr $(DTC_INSTALL_GOAL) +endef +define DTC_POST_INSTALL_TARGET_RM_DTDIFF + rm -f $(TARGET_DIR)/usr/bin/dtdiff endef define DTC_CLEAN_CMDS - $(MAKE) -C $(@D) libfdt_clean + $(MAKE) -C $(@D) $(DTC_CLEAN_GOAL) endef $(eval $(generic-package))
Signature · 1 line
1.7.2.5
PATCH 7/7 package/dtc: add option to install programs
Quoted 47 lines · Yann E. MORIN
By default, we only install the libfdt library.
As suggested by Arnout, add an option that also
installs the few dtc programs.Cc Thomas Petazzoni <[email protected]>Cc Arnout Vandecappelle <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>---
dtdiff, a diff for device trees, requires bash.I did not add a 'depends on bash' (or a 'select' either), because requiring bash just for that is a bit far-fetched.
Instead, at dtc install time, if bash is selected, dtdiff is installed as usual to the target rootfs; if bash is not selected, dtdiff is removed from the target rootfs.
--- package/dtc/Config.in | 24 ++++++++++++++++++++++-- package/dtc/dtc.mk | 29 +++++++++++++++++++++++------ 2 files changed, 45 insertions(+), 8 deletions(-)package/dtc/Config.in +10
-2@@ -1,9 +1,29 @@ config BR2_PACKAGE_DTC - bool "dtc" + bool "dtc (libfdt)" help The Device Tree Compiler, dtc, takes as input a device-tree in a given format and outputs a device-tree in another format. - Note that only the library is installed for now. + Note that only the library is installed. + If you want the programs, say 'y' here, and to "dtc programs", below. http://git.jdl.com/gitweb/?p=dtc.git (no home page) + +if BR2_PACKAGE_DTC + +config BR2_PACKAGE_DTC_PROGRAMS + bool "dtc programs" + help + Say 'y' here if you also want the programs on the target:
package/dtc/Config.in line 27
Quoted 10 lines
package/dtc/Config.in +10
-0+ - convert-dtsv0 convert from version 0 to version 1 + - dtc the device tree compiler + - dtdiff compare two device trees (needs bash) + - fdtdump print a readable version of a flat device tree + - fdtget read values from device tree + - fdtput write a property value to a device tree + + Note: dtdiff requires bash, so if bash is not selected, dtdiff will + be removed from the target file system. Enable bash if you + need dtdiff on the target.
I don't know if it is really necessary, but maybe this can be made even
more explicit like:
comment "dtdiff will not be installed: it requires bash"
depends on BR2_PACKAGE_DTC_PROGRAMS depends on !BR2_PACKAGE_BASH
Quoted 17 lines
package/dtc/Config.in +2
-0+ +endifpackage/dtc/dtc.mk +3
-2@@ -8,27 +8,44 @@ DTC_VERSION = e4b497f367a3b2ae99cc52089a14a221b13a76ef DTC_SITE = git://git.jdl.com/software/dtc.git DTC_LICENSE = GPLv2+/BSD-2c DTC_LICENSE_FILES = README.license GPL -# Note: the dual-license only applies to the library. -# The DT compiler (dtc) is GPLv2+, but we do not install it. DTC_INSTALL_STAGING = YES +ifeq ($(BR2_PACKAGE_DTC_PROGRAMS),y) +DTC_LICENSE += (for the library), GPLv2+ (for the executables) +# Use default goal to build everything
package/dtc/dtc.mk DTC_VERSION = e4b497f367a3b2ae99cc52089a14a221b13a76ef · line 25
Quoted 10 lines
package/dtc/dtc.mk +10
-0+DTC_BUILD_GOAL = +DTC_INSTALL_GOAL = install +DTC_CLEAN_GOAL = clean +else # $(BR2_PACKAGE_DTC_PROGRAMS) != y +DTC_BUILD_GOAL = libfdt +# libfdt_install is our own install rule added by our patch +DTC_INSTALL_GOAL = libfdt_install +DTC_CLEAN_GOAL = libfdt_clean +ifeq ($(BR2_PACKAGE_BASH),) +DTC_POST_INSTALL_TARGET_HOOKS += DTC_POST_INSTALL_TARGET_RM_DTDIFF
This should be in the =y branch.
I don't really like that the definition of the hook comes below. It
works, of course, but it's not what people expect.
Quoted 12 lines
package/dtc/dtc.mk +5
-2+endif +endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y + define DTC_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ - $(MAKE) -C $(@D) PREFIX=/usr libfdt + $(MAKE) -C $(@D) PREFIX=/usr $(DTC_BUILD_GOAL) endef -# libfdt_install is our own install rule added by our patch +# For staging, only the library is needed
package/dtc/dtc.mk DTC_VERSION = e4b497f367a3b2ae99cc52089a14a221b13a76ef · line 44
Quoted 10 lines
package/dtc/dtc.mk +4
-1define DTC_INSTALL_STAGING_CMDS $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr libfdt_install endef define DTC_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr libfdt_install + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr $(DTC_INSTALL_GOAL) +endef +define DTC_POST_INSTALL_TARGET_RM_DTDIFF + rm -f $(TARGET_DIR)/usr/bin/dtdiff
As said before, put this higher, just below the INSTALL_STAGING.
Regards,
Arnout
Quoted 9 lines
package/dtc/dtc.mk +1
-1endef define DTC_CLEAN_CMDS - $(MAKE) -C $(@D) libfdt_clean + $(MAKE) -C $(@D) $(DTC_CLEAN_GOAL) endef $(eval $(generic-package))
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 7/7 package/dtc: add option to install programs
Arnout, All,
Quoted 5 lines · On Tuesday 05 February 2013 Arnout Vandecappelle wrote:
Quoted 4 lines · Yann E. MORIN
By default, we only install the libfdt library.
As suggested by Arnout, add an option that also
installs the few dtc programs.
[--SNIP--]
Quoted 9 lines
package/dtc/Config.in line 27
Quoted 3 lines
package/dtc/Config.in +3
-0+ Note: dtdiff requires bash, so if bash is not selected, dtdiff will + be removed from the target file system. Enable bash if you + need dtdiff on the target.I don't know if it is really necessary, but maybe this can be made even
more explicit like:comment "dtdiff will not be installed: it requires bash"
depends onBR2_PACKAGE_DTC_PROGRAMSdepends on !BR2_PACKAGE_BASH
Yep, done.
[--SNIP--]
Quoted 4 lines
Quoted 1 line
+DTC_POST_INSTALL_TARGET_HOOKS +=
DTC_POST_INSTALL_TARGET_RM_DTDIFFThis should be in the =y branch.
I don't really like that the definition of the hook comes below. It
works, of course, but it's not what people expect.
OK, done.
Quoted 3 lines
package/dtc/dtc.mk DTC_VERSION = e4b497f367a3b2ae99cc52089a14a221b13a76ef · line 44
Quoted 2 lines
package/dtc/dtc.mk +2
-0+define DTC_POST_INSTALL_TARGET_RM_DTDIFF + rm -f $(TARGET_DIR)/usr/bin/dtdiffAs said before, put this higher, just below the
INSTALL_STAGING.
OK, done.
Thank you!
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'