Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/dvb-apps: new package
From: Peter Korsgaard @ 2012-12-28 22:30 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <d4ede3beb81857dfef0587def373e943f2a6100d.1356731295.git.yann.morin.1998@free.fr>

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 Yann> We just need the transponders data, so we just install those.

Long term I think it would be good to make this a user visible package,
and have sub options for what kind of transponder data you want to
install, as it's fairly big (~3.4MB).

 Yann> +define DVB_APPS_INSTALL_TARGET_CMDS
 Yann> +	mkdir -p $(TARGET_DIR)/usr/share/dvb-apps/scan/atsc
 Yann> +	mkdir -p $(TARGET_DIR)/usr/share/dvb-apps/scan/dvb-c
 Yann> +	mkdir -p $(TARGET_DIR)/usr/share/dvb-apps/scan/dvb-s
 Yann> +	mkdir -p $(TARGET_DIR)/usr/share/dvb-apps/scan/dvb-t
 Yann> +	$(INSTALL) -D $(@D)/util/scan/atsc/* $(TARGET_DIR)/usr/share/dvb-apps/scan/atsc

install -D expects you to name the destination file name, which doesn't
make sense here, so I rewrote the install step to use a shell loop and
not use the -D option.

Committed with that change, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit] package/dvb-apps: new package
From: Peter Korsgaard @ 2012-12-28 22:27 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=5e0b900c72bce75a3f86306d0aae79e9655a4753
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

We just need the transponders data, so we just install those.

[Peter: rework install step]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/dvb-apps/dvb-apps.mk |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/package/dvb-apps/dvb-apps.mk b/package/dvb-apps/dvb-apps.mk
new file mode 100644
index 0000000..721fbf0
--- /dev/null
+++ b/package/dvb-apps/dvb-apps.mk
@@ -0,0 +1,28 @@
+#############################################################
+#
+# dvb-apps
+#
+#############################################################
+
+DVB_APPS_VERSION        = 3fc7dfa68484
+DVB_APPS_SOURCE         = dvb-apps-$(DVB_APPS_VERSION).tar.bz2
+DVB_APPS_SITE           = http://linuxtv.org/hg/dvb-apps/archive/
+
+# We just install the transponders data. As this is not a 'work' as per
+# traditional copyright, but just a collection of 'facts', there's probably
+# no license to apply to these data files.
+# To be noted however, is that the dvb-apps package bundles a copy of the
+# GPLv2 and a copy of the LGPLv2.1, and that some of the source files refer
+# to either the GPLv2+ or the LGPLv2.1+.
+# But since we do not use any of those source files, their license do not
+# apply to us.
+DVB_APPS_LICENSE        = unknown (probably public domain)
+
+define DVB_APPS_INSTALL_TARGET_CMDS
+	for i in atsc dvb-c dvb-s dvb-t; do \
+		mkdir -p $(TARGET_DIR)/usr/share/dvb-apps/scan/$$i; \
+		$(INSTALL) $(@D)/util/scan/$$i/* $(TARGET_DIR)/usr/share/dvb-apps/scan/$$i; \
+	done
+endef
+
+$(eval $(generic-package))

^ permalink raw reply related

* [Buildroot] [PATCH] libplayer: propagate 'depends on' from mplayer
From: Thomas Petazzoni @ 2012-12-28 22:17 UTC (permalink / raw)
  To: buildroot

BR2_PACKAGE_LIBPLAYER_MPLAYER should not select BR2_PACKAGE_MPLAYER
without having the 'depends on' that BR2_PACKAGE_MPLAYER has.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/libplayer/Config.in |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/libplayer/Config.in b/package/libplayer/Config.in
index fe851ac..5391b8b 100644
--- a/package/libplayer/Config.in
+++ b/package/libplayer/Config.in
@@ -11,6 +11,10 @@ config BR2_PACKAGE_LIBPLAYER
 if BR2_PACKAGE_LIBPLAYER
 config BR2_PACKAGE_LIBPLAYER_MPLAYER
 	bool "mplayer backend"
+	# mplayer
+	depends on !BR2_sh4a && !BR2_sh4aeb && !BR2_microblaze && !BR2_aarch64
+	# mplayer
+	depends on BR2_LARGEFILE
 	select BR2_PACKAGE_MPLAYER
 
 config BR2_PACKAGE_LIBPLAYER_GSTREAMER
-- 
1.7.9.5

^ permalink raw reply related

* [Buildroot] [PATCH 2/2] package/tvheadend: new package
From: Yann E. MORIN @ 2012-12-28 21:48 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1356731295.git.yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/Config.in                                  |    1 +
 package/tvheadend/Config.in                        |   19 ++++++
 package/tvheadend/S99tvheadend                     |   54 ++++++++++++++++++
 package/tvheadend/accesscontrol.1                  |   13 ++++
 package/tvheadend/etc.default.tvheadend            |    7 ++
 .../tvheadend-no-auto-download-dvbscans.patch      |   60 ++++++++++++++++++++
 package/tvheadend/tvheadend.mk                     |   43 ++++++++++++++
 7 files changed, 197 insertions(+), 0 deletions(-)
 create mode 100644 package/tvheadend/Config.in
 create mode 100644 package/tvheadend/S99tvheadend
 create mode 100644 package/tvheadend/accesscontrol.1
 create mode 100644 package/tvheadend/etc.default.tvheadend
 create mode 100644 package/tvheadend/tvheadend-no-auto-download-dvbscans.patch
 create mode 100644 package/tvheadend/tvheadend.mk

diff --git a/package/Config.in b/package/Config.in
index 3d556b2..bcf0009 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -682,6 +682,7 @@ source "package/tinyhttpd/Config.in"
 source "package/tn5250/Config.in"
 source "package/transmission/Config.in"
 source "package/ttcp/Config.in"
+source "package/tvheadend/Config.in"
 source "package/udpcast/Config.in"
 source "package/ulogd/Config.in"
 source "package/ushare/Config.in"
diff --git a/package/tvheadend/Config.in b/package/tvheadend/Config.in
new file mode 100644
index 0000000..944e31e
--- /dev/null
+++ b/package/tvheadend/Config.in
@@ -0,0 +1,19 @@
+comment "tvheadend requires a toolchain with LARGEFILE support"
+    depends on !BR2_LARGEFILE
+
+config BR2_PACKAGE_TVHEADEND
+	bool "tvheadend"
+	depends on BR2_LARGEFILE
+	select BR2_PACKAGE_OPENSSL
+	help
+	  Tvheadend is a TV streaming server for Linux supporting DVB-S,
+	  DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as
+	  input sources.
+	  
+	  https://www.lonelycoder.com/redmine/projects/tvheadend/
+	  
+	  Note:
+	    - a default user has been created to log in the web configuration
+	      GUI: admin/admin; you can change it at your discretion at runtime.
+	    - if you want Avahi support, you'll need to enable:
+	          Avahi, D-Bus, libdaemon
diff --git a/package/tvheadend/S99tvheadend b/package/tvheadend/S99tvheadend
new file mode 100644
index 0000000..407b873
--- /dev/null
+++ b/package/tvheadend/S99tvheadend
@@ -0,0 +1,54 @@
+#! /bin/sh
+# tvheadend startup script inspired by the Debian one in the package
+
+# Author: Yann E. MORIN <yann.morin.1998@free.fr>
+
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
+NAME=tvheadend
+DAEMON=/usr/bin/$NAME
+PIDFILE=/var/run/$NAME.pid
+
+[ -f "${DAEMON}" -a -x "${DAEMON}" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r "/etc/default/${NAME}" ] && . "/etc/default/${NAME}"
+
+ARGS="-f"
+[ -z "${TVH_USER}"      ] || ARGS="${ARGS} -u ${TVH_USER}"
+[ -z "${TVH_GROUP}"     ] || ARGS="${ARGS} -g ${TVH_GROUP}"
+[ -z "${TVH_ADAPTERS}"  ] || ARGS="${ARGS} -a ${TVH_ADAPTERS}"
+[ -z "${TVH_HTTP_PORT}" ] || ARGS="${ARGS} -w ${TVH_HTTP_PORT}"
+[ -z "${TVH_HTSP_PORT}" ] || ARGS="${ARGS} -e ${TVH_HTSP_PORT}"
+[ "${TVH_DEBUG}" = "1"  ] && ARGS="${ARGS} -s"
+
+case "$1" in
+    start)
+        printf "Starting TVHeadend daemon: "
+        if start-stop-daemon -S -q -p ${PIDFILE} -m --exec "${DAEMON}" -- ${ARGS}; then
+            printf "OK\n"
+        else
+            printf "failed\n"
+        fi
+        ;;
+    stop)
+        printf "Stoping TVHeadend daemon: "
+        start-stop-daemon -K -q -p ${PIDFILE} -s TERM
+        sleep 2
+        if start-stop-daemon -K -q -p ${PIDFILE} -t; then
+            printf "failed, killing: "
+            start-stop-daemon -K -q -p ${PIDFILE} -s KILL -o
+        fi
+        printf "OK\n"
+        ;;
+    restart|force-reload)
+        "${0}" stop
+        sleep 2
+        "${0}" stop
+        ;;
+    *)
+        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+        exit 1
+        ;;
+esac
+
+:
diff --git a/package/tvheadend/accesscontrol.1 b/package/tvheadend/accesscontrol.1
new file mode 100644
index 0000000..b920943
--- /dev/null
+++ b/package/tvheadend/accesscontrol.1
@@ -0,0 +1,13 @@
+{
+        "enabled": 1,
+        "username": "admin",
+        "password": "admin",
+        "comment": "TVHeadend admin user",
+        "prefix": "0.0.0.0/0",
+        "streaming": 1,
+        "dvr": 1,
+        "dvrallcfg": 1,
+        "webui": 1,
+        "admin": 1,
+        "id": "1"
+}
diff --git a/package/tvheadend/etc.default.tvheadend b/package/tvheadend/etc.default.tvheadend
new file mode 100644
index 0000000..c769055
--- /dev/null
+++ b/package/tvheadend/etc.default.tvheadend
@@ -0,0 +1,7 @@
+# Once we have a real user, we'll use it
+TVH_USER=root
+TVH_GROUP=root
+#TVH_ADAPTERS=
+#TVH_HTTP_PORT=9981
+#TVH_HTSP_PORT=9982
+#TVH_DEBUG=1
diff --git a/package/tvheadend/tvheadend-no-auto-download-dvbscans.patch b/package/tvheadend/tvheadend-no-auto-download-dvbscans.patch
new file mode 100644
index 0000000..879cc03
--- /dev/null
+++ b/package/tvheadend/tvheadend-no-auto-download-dvbscans.patch
@@ -0,0 +1,60 @@
+Do not download transponder data as part of the build
+
+Id dvb-scan is enabled, tvheadend will download the transponders data
+form the dvb-apps package. This does not play well with buildroot.
+
+Instead, we rely on the dvb-apps package to install those files, so
+it is no longer needed to install those as part of tvheadend.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff -durN tvheadend-v3.3.orig//configure tvheadend-v3.3/configure
+--- tvheadend-v3.3.orig//configure	2012-09-25 15:32:31.000000000 +0200
++++ tvheadend-v3.3/configure	2012-12-28 17:17:23.580253413 +0100
+@@ -96,13 +96,14 @@
+ #
+ # DVB scan
+ #
+-if enabled linuxdvb && enabled dvbscan; then
+-  if [ ! -d ${ROOTDIR}/data/dvb-scan ]; then
+-    echo -n "Fetching dvb-scan files... "
+-    ${ROOTDIR}/support/getmuxlist &> /dev/null || die "Failed to fetch dvb-scan files (use --disable-dvbscan to skip)"
+-    echo "done"
+-  fi
+-fi
++# For buildroot, we already installed those files via the dvb-apps package
++#if enabled linuxdvb && enabled dvbscan; then
++#  if [ ! -d ${ROOTDIR}/data/dvb-scan ]; then
++#    echo -n "Fetching dvb-scan files... "
++#    ${ROOTDIR}/support/getmuxlist &> /dev/null || die "Failed to fetch dvb-scan files (use --disable-dvbscan to skip)"
++#    echo "done"
++#  fi
++#fi
+ 
+ # ###########################################################################
+ # Write config
+diff -durN tvheadend-v3.3.orig//Makefile tvheadend-v3.3/Makefile
+--- tvheadend-v3.3.orig//Makefile	2012-09-25 15:32:31.000000000 +0200
++++ tvheadend-v3.3/Makefile	2012-12-28 17:17:47.573497346 +0100
+@@ -180,7 +180,7 @@
+ SRCS-${CONFIG_BUNDLE}     += bundle.c
+ BUNDLES-yes               += docs/html docs/docresources src/webui/static
+ BUNDLES-yes               += data/conf
+-BUNDLES-${CONFIG_DVBSCAN} += data/dvb-scan
++#BUNDLES-${CONFIG_DVBSCAN} += data/dvb-scan
+ BUNDLES                    = $(BUNDLES-yes)
+ 
+ #
+diff -durN tvheadend-v3.3.orig//support/posix.mk tvheadend-v3.3/support/posix.mk
+--- tvheadend-v3.3.orig//support/posix.mk	2012-09-25 15:32:31.000000000 +0200
++++ tvheadend-v3.3/support/posix.mk	2012-12-28 17:19:28.903121722 +0100
+@@ -12,7 +12,8 @@
+ 		mkdir -p ${DESTDIR}${datadir}/tvheadend/$$bundle ;\
+ 		cp -r $$bundle/*  ${DESTDIR}${datadir}/tvheadend/$$bundle ;\
+ 	done
+-
++	mkdir -p ${DESTDIR}${datadir}/tvheadend/data
++	ln -s /usr/share/dvb-apps/scan ${DESTDIR}${datadir}/tvheadend/data/dvb-scan
+ 
+ uninstall:
+ 	rm -f ${DESTDIR}${bindir)/tvheadend
diff --git a/package/tvheadend/tvheadend.mk b/package/tvheadend/tvheadend.mk
new file mode 100644
index 0000000..5100781
--- /dev/null
+++ b/package/tvheadend/tvheadend.mk
@@ -0,0 +1,43 @@
+#############################################################
+#
+# tvheadend
+#
+##############################################################
+
+TVHEADEND_VERSION           = v3.3
+TVHEADEND_SITE              = http://github.com/tvheadend/tvheadend/tarball/$(TVHEADEND_VERSION)
+TVHEADEND_LICENSE           = GPLv3+
+TVHEADEND_LICENSE_FILES     = LICENSE
+TVHEADEND_DEPENDENCIES      = host-pkgconf host-python openssl
+
+ifeq ($(BR2_PACKAGE_AVAHI),y)
+TVHEADEND_DEPENDENCIES     += avahi
+endif
+
+#----------------------------------------------------------------------------
+# tvheadend is a little smuggler and thief! ;-)
+# During the ./configure, it downloads some files from the dvb-apps
+# package, so it has a list of pre-scanned tunner configurations.
+# For buildroot, we add a patch that avoids doing that, but uses the
+# scan files installed by the dvb-apps package
+TVHEADEND_DEPENDENCIES     += dvb-apps
+
+#----------------------------------------------------------------------------
+# To run tvheadend, we need:
+#  - a startup script, and its config file
+#  - a default DB with a tvheadend admin
+define TVHEADEND_INSTALL_DB
+	$(INSTALL) -D package/tvheadend/accesscontrol.1     \
+	              $(TARGET_DIR)/root/.hts/tvheadend/accesscontrol/1
+endef
+TVHEADEND_POST_INSTALL_TARGET_HOOKS  = TVHEADEND_INSTALL_DB
+
+define TVHEADEND_INSTALL_INIT_SYSV
+	$(INSTALL) -D package/tvheadend/etc.default.tvheadend $(TARGET_DIR)/etc/default/tvheadend
+	$(INSTALL) -D package/tvheadend/S99tvheadend          $(TARGET_DIR)/etc/init.d/S99tvheadend
+endef
+
+#----------------------------------------------------------------------------
+# tvheadend is not an autotools-based package, but it is possible to
+# call its ./configure script as if it were an autotools one.
+$(eval $(autotools-package))
-- 
1.7.2.5

^ permalink raw reply related

* [Buildroot] [PATCH 1/2] package/dvb-apps: new package
From: Yann E. MORIN @ 2012-12-28 21:48 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1356731295.git.yann.morin.1998@free.fr>

We just need the transponders data, so we just install those.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/dvb-apps/dvb-apps.mk |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)
 create mode 100644 package/dvb-apps/dvb-apps.mk

diff --git a/package/dvb-apps/dvb-apps.mk b/package/dvb-apps/dvb-apps.mk
new file mode 100644
index 0000000..1109d94
--- /dev/null
+++ b/package/dvb-apps/dvb-apps.mk
@@ -0,0 +1,32 @@
+#############################################################
+#
+# dvb-apps
+#
+#############################################################
+
+DVB_APPS_VERSION        = 3fc7dfa68484
+DVB_APPS_SOURCE         = dvb-apps-$(DVB_APPS_VERSION).tar.bz2
+DVB_APPS_SITE           = http://linuxtv.org/hg/dvb-apps/archive/
+
+# We just install the transponders data. As this is not a 'work' as per
+# traditional copyright, but just a collection of 'facts', there's probably
+# no license to apply to these data files.
+# To be noted however, is that the dvb-apps package bundles a copy of the
+# GPLv2 and a copy of the LGPLv2.1, and that some of the source files refer
+# to either the GPLv2+ or the LGPLv2.1+.
+# But since we do not use any of those source files, their license do not
+# apply to us.
+DVB_APPS_LICENSE        = unknown (probably public domain)
+
+define DVB_APPS_INSTALL_TARGET_CMDS
+	mkdir -p $(TARGET_DIR)/usr/share/dvb-apps/scan/atsc
+	mkdir -p $(TARGET_DIR)/usr/share/dvb-apps/scan/dvb-c
+	mkdir -p $(TARGET_DIR)/usr/share/dvb-apps/scan/dvb-s
+	mkdir -p $(TARGET_DIR)/usr/share/dvb-apps/scan/dvb-t
+	$(INSTALL) -D $(@D)/util/scan/atsc/* $(TARGET_DIR)/usr/share/dvb-apps/scan/atsc
+	$(INSTALL) -D $(@D)/util/scan/dvb-c/* $(TARGET_DIR)/usr/share/dvb-apps/scan/dvb-c
+	$(INSTALL) -D $(@D)/util/scan/dvb-s/* $(TARGET_DIR)/usr/share/dvb-apps/scan/dvb-s
+	$(INSTALL) -D $(@D)/util/scan/dvb-t/* $(TARGET_DIR)/usr/share/dvb-apps/scan/dvb-t
+endef
+
+$(eval $(generic-package))
-- 
1.7.2.5

^ permalink raw reply related

* [Buildroot] [pull request] Pull request for branch yem-tvheadend
From: Yann E. MORIN @ 2012-12-28 21:48 UTC (permalink / raw)
  To: buildroot

Hello All!

Here's a short series to add TVHeadend.

TVHeadend implements a PVR/DVR solution, which can record either from
a broadcast tunner (DVB-{T,S,C}, or ATSC), or IPTV multicast streams.

TVHeadend can be used as a backend by media centers, such as XBMC, or
it can be used stand-alone.

Changes v2 -> v3:
  - fixed copy-paste and indentation (Thomas)
  - added desc to tvheadend patch (Thomas)
Changes v1 -> v2:
  - got rid of tvheadend user (Peter)
  - added dvb-apps package, get rid of cutom download (Thomas)

The following changes since commit 4848386446b937d4d0d9d3e9489932ca3fcb1003:

  libffi: fix mips build failures (2012-12-28 16:55:09 +0100)

are available in the git repository at:
  git://gitorious.org/buildroot/buildroot.git yem-tvheadend

Yann E. MORIN (2):
      package/dvb-apps: new package
      package/tvheadend: new package

 package/Config.in                                  |    1 +
 package/dvb-apps/dvb-apps.mk                       |   32 ++++++++++
 package/tvheadend/Config.in                        |   19 ++++++
 package/tvheadend/S99tvheadend                     |   54 ++++++++++++++++++
 package/tvheadend/accesscontrol.1                  |   13 ++++
 package/tvheadend/etc.default.tvheadend            |    7 ++
 .../tvheadend-no-auto-download-dvbscans.patch      |   60 ++++++++++++++++++++
 package/tvheadend/tvheadend.mk                     |   43 ++++++++++++++
 8 files changed, 229 insertions(+), 0 deletions(-)
 create mode 100644 package/dvb-apps/dvb-apps.mk
 create mode 100644 package/tvheadend/Config.in
 create mode 100644 package/tvheadend/S99tvheadend
 create mode 100644 package/tvheadend/accesscontrol.1
 create mode 100644 package/tvheadend/etc.default.tvheadend
 create mode 100644 package/tvheadend/tvheadend-no-auto-download-dvbscans.patch
 create mode 100644 package/tvheadend/tvheadend.mk

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] [PATCH 2/2] diffutils: fix build with recent glibc
From: Peter Korsgaard @ 2012-12-28 21:47 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1356727282-13118-1-git-send-email-thomas.petazzoni@free-electrons.com>

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Fixes the following build problem with recent toolchains:
 Thomas> In file included from exclude.c:31:0:
 Thomas> ./stdio.h:1012:1: error: 'gets' undeclared here (not in a function)
 Thomas>   CC       hard-locale.o
 Thomas> make[4]: *** [exclude.o] Error 1
 Thomas> make[4]: *** Waiting for unfinished jobs....
 Thomas> In file included from stdio-safer.h:20:0,
 Thomas>                  from freopen-safer.c:22:
 Thomas> ./stdio.h:1012:1: error: 'gets' undeclared here (not in a function)

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit] diffutils: fix build with recent glibc
From: Peter Korsgaard @ 2012-12-28 21:47 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=653d64c5094d34ade03d0c30ead151ac9223edbd
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Fixes the following build problem with recent toolchains:

In file included from exclude.c:31:0:
./stdio.h:1012:1: error: 'gets' undeclared here (not in a function)
  CC       hard-locale.o
make[4]: *** [exclude.o] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from stdio-safer.h:20:0,
                 from freopen-safer.c:22:
./stdio.h:1012:1: error: 'gets' undeclared here (not in a function)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 ...tils-gets-no-longer-exists-in-eglibc-2.16.patch |   26 ++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/package/diffutils/diffutils-gets-no-longer-exists-in-eglibc-2.16.patch b/package/diffutils/diffutils-gets-no-longer-exists-in-eglibc-2.16.patch
new file mode 100644
index 0000000..4785718
--- /dev/null
+++ b/package/diffutils/diffutils-gets-no-longer-exists-in-eglibc-2.16.patch
@@ -0,0 +1,26 @@
+Handle the fact that gets() no longer exists in glibc >= 2.16
+
+The problem has been fixed upstream, but no release containing the fix
+has been made so far.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/lib/stdio.in.h
+===================================================================
+--- a/lib/stdio.in.h
++++ b/lib/stdio.in.h
+@@ -693,12 +693,14 @@
+ _GL_CXXALIAS_SYS (gets, char *, (char *s));
+ #  undef gets
+ # endif
++# if defined gets
+ _GL_CXXALIASWARN (gets);
+ /* It is very rare that the developer ever has full control of stdin,
+    so any use of gets warrants an unconditional warning.  Assume it is
+    always declared, since it is required by C89.  */
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
++#endif
+ 
+ 
+ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@

^ permalink raw reply related

* [Buildroot] [PATCH 1/2] xserver_xorg-server: fix build on AArch64
From: Peter Korsgaard @ 2012-12-28 21:46 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1356727276-13075-1-git-send-email-thomas.petazzoni@free-electrons.com>

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Fixes the following build issue:
 Thomas> Making all in fb
 Thomas>   CC     libfb_la-fb24_32.lo
 Thomas> In file included from fb24_32.c:30:0:
 Thomas> fb.h:98:2: error: #error "GLYPHPADBYTES must be 4"

Committed, thanks.

Don't forget to send patch upstream.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit] xserver_xorg-server: fix build on AArch64
From: Peter Korsgaard @ 2012-12-28 21:45 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=695edcbabe5919fe52b593553c409e7ad9a4af83
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Fixes the following build issue:

Making all in fb
  CC     libfb_la-fb24_32.lo
In file included from fb24_32.c:30:0:
fb.h:98:2: error: #error "GLYPHPADBYTES must be 4"

See:

 http://autobuild.buildroot.org/results/9135238abcde29918f8cb61002f1fb9279884a47/build-end.log

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 .../xserver_xorg-server-aarch64-support.patch      |   23 ++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server-aarch64-support.patch b/package/x11r7/xserver_xorg-server/xserver_xorg-server-aarch64-support.patch
new file mode 100644
index 0000000..ec497c8
--- /dev/null
+++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server-aarch64-support.patch
@@ -0,0 +1,23 @@
+Add necessary definitions for AArch64
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: xserver_xorg-server-1.9.4/include/servermd.h
+===================================================================
+--- xserver_xorg-server-1.9.4.orig/include/servermd.h	2009-11-04 20:31:46.000000000 +0100
++++ xserver_xorg-server-1.9.4/include/servermd.h	2012-12-28 18:16:55.000000000 +0100
+@@ -68,6 +68,14 @@
+  * GLYPHPADBYTES is used.
+  */
+ 
++#ifdef __aarch64__
++
++# define IMAGE_BYTE_ORDER	LSBFirst
++# define BITMAP_BIT_ORDER       LSBFirst
++# define GLYPHPADBYTES		4
++
++#endif
++
+ #ifdef __avr32__
+ 
+ #define IMAGE_BYTE_ORDER        MSBFirst

^ permalink raw reply related

* [Buildroot] [pull request] Pull request for branch yem-tvheadend
From: Peter Korsgaard @ 2012-12-28 21:34 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <201212282226.18134.yann.morin.1998@free.fr>

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 Yann> Hello All!
 Yann> On Friday 28 December 2012 Yann E. MORIN wrote:
 >> Here's a short series to add TVHeadend.

 Yann> After Thomas' review, I've pushed an updated series, to be pulled from
 Yann> the same location.

It's a short series, could you please resend it (easier for review).

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [PATCH] nettle: add license info
From: Peter Korsgaard @ 2012-12-28 21:28 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1356727193-9272-1-git-send-email-gustavo@zacarias.com.ar>

>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit] nettle: add license info
From: Peter Korsgaard @ 2012-12-28 21:28 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=761ae9c3e13da753318851c4c71ab7fc8aa5a9db
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/nettle/nettle.mk |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/package/nettle/nettle.mk b/package/nettle/nettle.mk
index ef7640a..ae09ecc 100644
--- a/package/nettle/nettle.mk
+++ b/package/nettle/nettle.mk
@@ -2,6 +2,8 @@ NETTLE_VERSION = 2.5
 NETTLE_SITE = http://www.lysator.liu.se/~nisse/archive
 NETTLE_DEPENDENCIES = gmp
 NETTLE_INSTALL_STAGING = YES
+NETTLE_LICENSE = LGPLv2.1+
+NETTLE_LICENSE_FILES = COPYING.LIB
 
 define NETTLE_DITCH_DEBUGGING_CFLAGS
 	$(SED) '/CFLAGS/ s/ -ggdb3//' $(@D)/configure

^ permalink raw reply related

* [Buildroot] [PATCH 1/7] gnutls: bump to version 3.1.5
From: Peter Korsgaard @ 2012-12-28 21:27 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1356724043-8879-1-git-send-email-gustavo@zacarias.com.ar>

>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

Committed series, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit] connman: bump to version 1.10
From: Peter Korsgaard @ 2012-12-28 21:26 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=6fcb68511e317650b028a911b8fcd7bd241fd89b
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/connman/connman.mk |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/package/connman/connman.mk b/package/connman/connman.mk
index 2c376c9..73ea70d 100644
--- a/package/connman/connman.mk
+++ b/package/connman/connman.mk
@@ -4,10 +4,12 @@
 #
 #######################################################
 
-CONNMAN_VERSION = 1.9
+CONNMAN_VERSION = 1.10
 CONNMAN_SITE = $(BR2_KERNEL_MIRROR)/linux/network/connman/
 CONNMAN_DEPENDENCIES = libglib2 dbus iptables gnutls
 CONNMAN_INSTALL_STAGING = YES
+CONNMAN_LICENSE = GPLv2
+CONNMAN_LICENSE_FILES = COPYING
 CONNMAN_CONF_OPT += --localstatedir=/var \
 	$(if $(BR2_PACKAGE_CONNMAN_THREADS),--enable-threads,--disable-threads)		\
 	$(if $(BR2_PACKAGE_CONNMAN_DEBUG),--enable-debug,--disable-debug)		\

^ permalink raw reply related

* [Buildroot] [PATCH 1/2] target: add option to set the root password
From: Thomas Petazzoni @ 2012-12-28 21:26 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <751d161336cd6e35187e2faa67f456335908222c.1356728899.git.yann.morin.1998@free.fr>

Dear Yann E. MORIN,

On Fri, 28 Dec 2012 22:20:53 +0100, Yann E. MORIN wrote:
> Add an option in the menuconfig to specify a root password.
> 
> If set to empty, no root password is created; otherwise, the password is
> encrypted using MD5 (MD5 is not the default for crypt(3), DES-56 is, but
> MD5 is widely available, not-so-strong, but not-so-weak either).
> 
> Add a check for 'mkpasswd' as a new dependency.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> ---
> Switched to using MD5 as per Arnout's suggestion:
>     http://lists.busybox.net/pipermail/buildroot/2012-September/058712.html
> ---
>  support/dependencies/dependencies.sh |    9 +++++++++
>  system/Config.in                     |   21 +++++++++++++++++++++
>  system/system.mk                     |   14 ++++++++++++++
>  3 files changed, 44 insertions(+), 0 deletions(-)
> 
> diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
> index 7a02512..c86a5d0 100755
> --- a/support/dependencies/dependencies.sh
> +++ b/support/dependencies/dependencies.sh
> @@ -158,6 +158,7 @@ if grep ^BR2_TOOLCHAIN_BUILDROOT=y $CONFIG_FILE > /dev/null && \
>         exit 1 ;
>     fi
>  fi
> +
>  if grep -q ^BR2_PACKAGE_CLASSPATH=y $CONFIG_FILE ; then
>      for prog in javac jar; do
>  	if ! which $prog > /dev/null ; then
> @@ -166,3 +167,11 @@ if grep -q ^BR2_PACKAGE_CLASSPATH=y $CONFIG_FILE ; then
>  	fi
>      done
>  fi
> +
> +if grep -E '^TARGET_GENERIC_ROOT_PASSWD=".+"$' $CONFIG_FILE > /dev/null 2>&1; then

I guess it should be BR2_TARGET_GENERIC_ROOT_PASSWD since you have a ^
at the beginning of the regexp.

> +    if ! which mkpasswd > /dev/null 2>&1; then
> +        /bin/echo -e "\nYou need the 'mkpasswd' utility to set the root password\n"

Also mention that mkpasswd is typically bundled within the whois
package in distros (at least in Debian/Ubuntu), because it may not be
very obvious.

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] [git commit] network-manager: needs libgcrypt
From: Peter Korsgaard @ 2012-12-28 21:26 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=ecb73fbe0ced07034dc637eff4653f732e7487b3
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Since we moved to gnutls 3.x series which doesn't use libgcrypt we need
to pull it in as a dependency to avoid build breakage.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/network-manager/Config.in          |    1 +
 package/network-manager/network-manager.mk |    3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/package/network-manager/Config.in b/package/network-manager/Config.in
index f2544da..9b84083 100644
--- a/package/network-manager/Config.in
+++ b/package/network-manager/Config.in
@@ -11,6 +11,7 @@ config BR2_PACKAGE_NETWORK_MANAGER
 	select BR2_PACKAGE_UDEV
 	select BR2_PACKAGE_UDEV_ALL_EXTRAS
 	select BR2_PACKAGE_GNUTLS
+	select BR2_PACKAGE_LIBGCRYPT
 	select BR2_PACKAGE_LIBNL
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
diff --git a/package/network-manager/network-manager.mk b/package/network-manager/network-manager.mk
index d14c98d..2a68c96 100644
--- a/package/network-manager/network-manager.mk
+++ b/package/network-manager/network-manager.mk
@@ -7,7 +7,8 @@ NETWORK_MANAGER_VERSION = 0.9.2.0
 NETWORK_MANAGER_SOURCE = NetworkManager-$(NETWORK_MANAGER_VERSION).tar.bz2
 NETWORK_MANAGER_SITE = http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/0.9/
 NETWORK_MANAGER_INSTALL_STAGING = YES
-NETWORK_MANAGER_DEPENDENCIES = host-pkgconf udev dbus-glib libnl wireless_tools gnutls util-linux
+NETWORK_MANAGER_DEPENDENCIES = host-pkgconf udev dbus-glib libnl gnutls \
+	libgcrypt wireless_tools util-linux
 
 NETWORK_MANAGER_CONF_ENV = \
 	ac_cv_path_LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config

^ permalink raw reply related

* [Buildroot] [pull request] Pull request for branch yem-tvheadend
From: Yann E. MORIN @ 2012-12-28 21:26 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1356719913.git.yann.morin.1998@free.fr>

Hello All!

On Friday 28 December 2012 Yann E. MORIN wrote:
> Here's a short series to add TVHeadend.

After Thomas' review, I've pushed an updated series, to be pulled from
the same location.

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] [PATCH 2/2] target: add different methods to encode the root password
From: Yann E. MORIN @ 2012-12-28 21:20 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1356728899.git.yann.morin.1998@free.fr>

The password can be encoded in different ways (from the weakest
to the strongest): des, md5, sha-256, sha-512

Add a choice entry to select the method, defaulting to 'md5'.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 system/Config.in |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 system/system.mk |    3 ++-
 2 files changed, 48 insertions(+), 1 deletions(-)

diff --git a/system/Config.in b/system/Config.in
index deead86..2c90e8a 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -34,6 +34,52 @@ config BR2_TARGET_GENERIC_ROOT_PASSWD
 	  .config file or the build log may be distributed!
 
 choice
+	bool "root password encoding"
+	depends on BR2_TARGET_GENERIC_ROOT_PASSWD != ""
+	default BR2_TARGET_GENERIC_ROOT_PASSWD_MD5
+
+config BR2_TARGET_GENERIC_ROOT_PASSWD_DES
+	bool "des"
+	help
+	  Use standard 56-bit DES-based crypt(3).
+	  
+	  Old, wildly available, but also the weakest.
+
+config BR2_TARGET_GENERIC_ROOT_PASSWD_MD5
+	bool "md5"
+	help
+	  Use MD5 to encode the password.
+	  
+	  The default, wildly available, and pretty good.
+
+config BR2_TARGET_GENERIC_ROOT_PASSWD_SHA256
+	bool "sha-256"
+	help
+	  Use SHA256 to encode the password.
+	  
+	  Very strong, but not ubiquitous, although available in glibc
+	  for some time now. Choose only if you are sure your C library
+	  understands SHA256 passwords.
+
+config BR2_TARGET_GENERIC_ROOT_PASSWD_SHA512
+	bool "sha-512"
+	help
+	  Use SHA512 to encode the password.
+	  
+	  Extremely strong, but not ubiquitous, although available in glibc
+	  for some time now. Choose only if you are sure your C library
+	  understands SHA512 passwords.
+
+endchoice # root passwd encoding
+
+config BR2_TARGET_GENERIC_ROOT_PASSWD_METHOD
+	string
+	default "des"       if BR2_TARGET_GENERIC_ROOT_PASSWD_DES
+	default "md5"       if BR2_TARGET_GENERIC_ROOT_PASSWD_MD5
+	default "sha-256"   if BR2_TARGET_GENERIC_ROOT_PASSWD_SHA256
+	default "sha-512"   if BR2_TARGET_GENERIC_ROOT_PASSWD_SHA512
+
+choice
 	prompt "/dev management"
 	default BR2_ROOTFS_DEVICE_CREATION_STATIC
 
diff --git a/system/system.mk b/system/system.mk
index a23feef..f5a8310 100644
--- a/system/system.mk
+++ b/system/system.mk
@@ -1,6 +1,7 @@
 TARGET_GENERIC_HOSTNAME:=$(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME))
 TARGET_GENERIC_ISSUE:=$(call qstrip,$(BR2_TARGET_GENERIC_ISSUE))
 TARGET_GENERIC_ROOT_PASSWD:=$(call qstrip,$(BR2_TARGET_GENERIC_ROOT_PASSWD))
+TARGET_GENERIC_ROOT_PASSWD_METHOD:=$(call qstrip,$(BR2_TARGET_GENERIC_ROOT_PASSWD_METHOD))
 TARGET_GENERIC_GETTY:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT))
 TARGET_GENERIC_GETTY_BAUDRATE:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE))
 TARGET_GENERIC_GETTY_TERM:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_TERM))
@@ -19,7 +20,7 @@ target-no-root-passwd:
 	$(SED) "s/^root:[^:]*:/root::/" $(TARGET_DIR)/etc/shadow
 
 target-root-passwd:
-	root_passwd="$$( mkpasswd -m md5 "$(TARGET_GENERIC_ROOT_PASSWD)" )"; \
+	root_passwd="$$( mkpasswd -m "$(TARGET_GENERIC_ROOT_PASSWD_METHOD)" "$(TARGET_GENERIC_ROOT_PASSWD)" )"; \
 	$(SED) "s,^root::,root:$${root_passwd}:," $(TARGET_DIR)/etc/shadow
 
 target-generic-getty-busybox:
-- 
1.7.2.5

^ permalink raw reply related

* [Buildroot] [PATCH 1/2] target: add option to set the root password
From: Yann E. MORIN @ 2012-12-28 21:20 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1356728899.git.yann.morin.1998@free.fr>

Add an option in the menuconfig to specify a root password.

If set to empty, no root password is created; otherwise, the password is
encrypted using MD5 (MD5 is not the default for crypt(3), DES-56 is, but
MD5 is widely available, not-so-strong, but not-so-weak either).

Add a check for 'mkpasswd' as a new dependency.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
---
Switched to using MD5 as per Arnout's suggestion:
    http://lists.busybox.net/pipermail/buildroot/2012-September/058712.html
---
 support/dependencies/dependencies.sh |    9 +++++++++
 system/Config.in                     |   21 +++++++++++++++++++++
 system/system.mk                     |   14 ++++++++++++++
 3 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
index 7a02512..c86a5d0 100755
--- a/support/dependencies/dependencies.sh
+++ b/support/dependencies/dependencies.sh
@@ -158,6 +158,7 @@ if grep ^BR2_TOOLCHAIN_BUILDROOT=y $CONFIG_FILE > /dev/null && \
        exit 1 ;
    fi
 fi
+
 if grep -q ^BR2_PACKAGE_CLASSPATH=y $CONFIG_FILE ; then
     for prog in javac jar; do
 	if ! which $prog > /dev/null ; then
@@ -166,3 +167,11 @@ if grep -q ^BR2_PACKAGE_CLASSPATH=y $CONFIG_FILE ; then
 	fi
     done
 fi
+
+if grep -E '^TARGET_GENERIC_ROOT_PASSWD=".+"$' $CONFIG_FILE > /dev/null 2>&1; then
+    if ! which mkpasswd > /dev/null 2>&1; then
+        /bin/echo -e "\nYou need the 'mkpasswd' utility to set the root password\n"
+        exit 1
+    fi
+
+fi
diff --git a/system/Config.in b/system/Config.in
index a557ea0..deead86 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -12,6 +12,27 @@ config BR2_TARGET_GENERIC_ISSUE
        help
          Select system banner (/etc/issue) to be displayed at login.
 
+config BR2_TARGET_GENERIC_ROOT_PASSWD
+	string "root password"
+	default ""
+	help
+	  Set the initial root password (in clear). It will be md5-encrypted.
+	  
+	  If set to empty (the default), then no root password will be set,
+	  and root will need no password to log in.
+	  
+	  WARNING! WARNING!
+	  Although pretty strong, MD5 is now an old hash function, and
+	  suffers from som weaknesses, which makes it susceptible to attacks.
+	  It is showing its age, so this root password should not be trusted
+	  to properly secure any product that can be shipped to the wide,
+	  hostile world.
+	  
+	  WARNING! WARNING!
+	  The password appears in clear in the .config file, and may appear
+	  in the build log! Avoid using a valuable password if either the
+	  .config file or the build log may be distributed!
+
 choice
 	prompt "/dev management"
 	default BR2_ROOTFS_DEVICE_CREATION_STATIC
diff --git a/system/system.mk b/system/system.mk
index 353d0ba..a23feef 100644
--- a/system/system.mk
+++ b/system/system.mk
@@ -1,5 +1,6 @@
 TARGET_GENERIC_HOSTNAME:=$(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME))
 TARGET_GENERIC_ISSUE:=$(call qstrip,$(BR2_TARGET_GENERIC_ISSUE))
+TARGET_GENERIC_ROOT_PASSWD:=$(call qstrip,$(BR2_TARGET_GENERIC_ROOT_PASSWD))
 TARGET_GENERIC_GETTY:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT))
 TARGET_GENERIC_GETTY_BAUDRATE:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE))
 TARGET_GENERIC_GETTY_TERM:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_TERM))
@@ -14,6 +15,13 @@ target-generic-issue:
 	mkdir -p $(TARGET_DIR)/etc
 	echo "$(TARGET_GENERIC_ISSUE)" > $(TARGET_DIR)/etc/issue
 
+target-no-root-passwd:
+	$(SED) "s/^root:[^:]*:/root::/" $(TARGET_DIR)/etc/shadow
+
+target-root-passwd:
+	root_passwd="$$( mkpasswd -m md5 "$(TARGET_GENERIC_ROOT_PASSWD)" )"; \
+	$(SED) "s,^root::,root:$${root_passwd}:," $(TARGET_DIR)/etc/shadow
+
 target-generic-getty-busybox:
 	$(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(TARGET_GENERIC_GETTY)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \
 		$(TARGET_DIR)/etc/inittab
@@ -40,6 +48,12 @@ ifneq ($(TARGET_GENERIC_ISSUE),)
 TARGETS += target-generic-issue
 endif
 
+ifneq ($(TARGET_GENERIC_ROOT_PASSWD),)
+TARGETS += target-root-passwd
+else
+TARGETS += target-no-root-passwd
+endif
+
 ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT),y)
 ifeq ($(BR2_PACKAGE_SYSVINIT),y)
 TARGETS += target-generic-getty-sysvinit
-- 
1.7.2.5

^ permalink raw reply related

* [Buildroot] [pull request v3] Pull request for branch yem-root-passwd
From: Yann E. MORIN @ 2012-12-28 21:20 UTC (permalink / raw)
  To: buildroot

Hello All!

This is iteration #3 for setting the root password from the configuration
menu:
  - first patch adds the basic functionality:
    - plain text password in menuconfig
    - MD5-encrypted in /etc/shadow
  - second patch adds additional encryption methods

There has been previous review of this series by Arnout, who suggested
dropping patch #2, and only use an MD5-encrypted password. Since MD5 is now
considered to be a weak hash, stronger alternatives may be usefull for the
security-conscious lurking among us. That's why I kept (resurrected) that
second patch.

Arnout also objected to having the root password in clear in the .config,
and recommended that the user enters the already-encrypted password. That
has, IMHO, a few drawbacks, in that it requires the user actually _reads_
the help text, switch to an alternate terminal, generates a password, and
copy-pastes it back in the initial terminal with the menuconfig. OTOH, if
the user forgets his/her password, he/she can recover it by looking at the
.config file. That's why I still advocates for entering a clear-text
password in the menuconfig.

Any more comments are welcome!

The following changes since commit 4848386446b937d4d0d9d3e9489932ca3fcb1003:

  libffi: fix mips build failures (2012-12-28 16:55:09 +0100)

are available in the git repository at:
  git://gitorious.org/buildroot/buildroot.git yem-root-passwd

Yann E. MORIN (2):
      target: add option to set the root password
      target: add different methods to encode the root password

 support/dependencies/dependencies.sh |    9 +++++
 system/Config.in                     |   67 ++++++++++++++++++++++++++++++++++
 system/system.mk                     |   15 ++++++++
 3 files changed, 91 insertions(+), 0 deletions(-)

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] [git commit] glib-networking: fix build failure with gnutls3
From: Peter Korsgaard @ 2012-12-28 20:56 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=484652cbd8d4a647f7833b2e032d0d37147e8424
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/glib-networking/glib-networking.mk |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/package/glib-networking/glib-networking.mk b/package/glib-networking/glib-networking.mk
index b1eec4d..e8d71e5 100644
--- a/package/glib-networking/glib-networking.mk
+++ b/package/glib-networking/glib-networking.mk
@@ -25,4 +25,11 @@ else
 GLIB_NETWORKING_CONF_OPT += --without-gnutls
 endif
 
+# gnutls 3.x+ doesn't use libgcrypt, it uses nettle/hogweed
+define GLIB_NETWORKING_NO_LIBGCRYPT
+	$(SED) 's:#include <gcrypt.h>::' $(@D)/tls/gnutls/gtlsbackend-gnutls.c
+endef
+
+GLIB_NETWORKING_POST_EXTRACT_HOOKS += GLIB_NETWORKING_NO_LIBGCRYPT
+
 $(eval $(autotools-package))

^ permalink raw reply related

* [Buildroot] [git commit] ntfs-3g: needs libgcrypt
From: Peter Korsgaard @ 2012-12-28 20:55 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=2007e3b1ef5e6e2e646750496c7496ce831aae01
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Now that we've moved to gnutls 3.x which no longer uses libgcrypt we
need to pull it in as a dependency for ntfs-3g encrypted volume support
to avoid build breakage.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/ntfs-3g/Config.in  |    1 +
 package/ntfs-3g/ntfs-3g.mk |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/package/ntfs-3g/Config.in b/package/ntfs-3g/Config.in
index 5301038..1d3e2fb 100644
--- a/package/ntfs-3g/Config.in
+++ b/package/ntfs-3g/Config.in
@@ -17,6 +17,7 @@ if BR2_PACKAGE_NTFS_3G
 config BR2_PACKAGE_NTFS_3G_ENCRYPTED
 	bool "encrypted volumes"
 	select BR2_PACKAGE_GNUTLS
+	select BR2_PACKAGE_LIBGCRYPT
 	help
 	  Enable support for NTFS encrypted volumes.
 
diff --git a/package/ntfs-3g/ntfs-3g.mk b/package/ntfs-3g/ntfs-3g.mk
index d2e6861..cefb73a 100644
--- a/package/ntfs-3g/ntfs-3g.mk
+++ b/package/ntfs-3g/ntfs-3g.mk
@@ -23,7 +23,7 @@ endif
 ifeq ($(BR2_PACKAGE_NTFS_3G_ENCRYPTED),y)
 	NTFS_3G_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config
 	NTFS_3G_CONF_OPT += --enable-crypto
-	NTFS_3G_DEPENDENCIES += gnutls
+	NTFS_3G_DEPENDENCIES += gnutls libgcrypt
 endif
 
 ifneq ($(BR2_PACKAGE_NTFS_3G_NTFSPROGS),y)

^ permalink raw reply related

* [Buildroot] [git commit] wpa_supplicant: remove gnutls support
From: Peter Korsgaard @ 2012-12-28 20:55 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=c89cc4b4b311b927d0c02af5717c6cc1150a1480
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

wpa_supplicant isn't API compatible with gnutls3 so remove support.
It's probably hardly used since openssl is far more common, and
wpa_supplicant can use its internal routines if it's not available.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/wpa_supplicant/wpa_supplicant.mk |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk
index 71be11f..3830d65 100644
--- a/package/wpa_supplicant/wpa_supplicant.mk
+++ b/package/wpa_supplicant/wpa_supplicant.mk
@@ -59,7 +59,7 @@ define WPA_SUPPLICANT_LIBTOMMATH_CONFIG
 	$(SED) 's/\(#\)\(CONFIG_INTERNAL_LIBTOMMATH.*\)/\2/' $(WPA_SUPPLICANT_CONFIG)
 endef
 
-# Try to use openssl or gnutls if it's already available
+# Try to use openssl if it's already available
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 	WPA_SUPPLICANT_DEPENDENCIES += openssl
 define WPA_SUPPLICANT_TLS_CONFIG
@@ -67,17 +67,10 @@ define WPA_SUPPLICANT_TLS_CONFIG
 	$(SED) 's/\(#\)\(CONFIG_EAP_PWD.*\)/\2/' $(WPA_SUPPLICANT_CONFIG)
 endef
 else
-ifeq ($(BR2_PACKAGE_GNUTLS),y)
-	WPA_SUPPLICANT_DEPENDENCIES += gnutls
-define WPA_SUPPLICANT_TLS_CONFIG
-	$(SED) 's/\(#\)\(CONFIG_TLS=\).*/\2gnutls/' $(WPA_SUPPLICANT_CONFIG)
-endef
-else
 define WPA_SUPPLICANT_TLS_CONFIG
 	$(SED) 's/\(#\)\(CONFIG_TLS=\).*/\2internal/' $(WPA_SUPPLICANT_CONFIG)
 endef
 endif
-endif
 
 ifeq ($(BR2_PACKAGE_DBUS),y)
 	WPA_SUPPLICANT_DEPENDENCIES += host-pkgconf dbus

^ permalink raw reply related

* [Buildroot] [git commit] gnutls: bump to version 3.1.5
From: Peter Korsgaard @ 2012-12-28 20:55 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=a8293a376574c439041de48e6571a4b82f7d2c3b
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

[Peter: add comment when tools not available]
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/gnutls/Config.in                           |   12 ++++-
 ...001-gets-no-longer-exists-in-e-glibc-2.16.patch |   56 --------------------
 package/gnutls/gnutls.mk                           |   26 +++++++---
 3 files changed, 30 insertions(+), 64 deletions(-)

diff --git a/package/gnutls/Config.in b/package/gnutls/Config.in
index cedf120..2739088 100644
--- a/package/gnutls/Config.in
+++ b/package/gnutls/Config.in
@@ -1,8 +1,18 @@
 config BR2_PACKAGE_GNUTLS
 	bool "gnutls"
-	select BR2_PACKAGE_LIBGCRYPT
+	select BR2_PACKAGE_NETTLE
 	help
 	  GnuTLS is a secure communications library implementing the SSL
 	  and TLS protocols and technologies around them.
 
 	  http://www.gnu.org/software/gnutls/gnutls.html
+
+config BR2_PACKAGE_GNUTLS_TOOLS
+	bool "install tools"
+	depends on BR2_PACKAGE_GNUTLS
+	depends on BR2_USE_WCHAR
+	help
+	  Install GnuTLS command line tools for various cryptographic tasks.
+
+comment "gnutls tools requires a toolchain with WCHAR support"
+	depends on BR2_PACKAGE_GNUTLS && !BR2_USE_WCHAR
diff --git a/package/gnutls/gnutls-0001-gets-no-longer-exists-in-e-glibc-2.16.patch b/package/gnutls/gnutls-0001-gets-no-longer-exists-in-e-glibc-2.16.patch
deleted file mode 100644
index 802e7ac..0000000
--- a/package/gnutls/gnutls-0001-gets-no-longer-exists-in-e-glibc-2.16.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 855f72c4fe7f4bbf2137ab60357ae3b27bb65185 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Sat, 17 Nov 2012 17:45:41 +0100
-Subject: [PATCH] gets() no longer exists in (e)glibc >= 2.16
-
-gnutls has already updated gnulib upstream in more recent versions
-(3.x) but apparently not in the 2.x branch that we are using.
-
-This patch comes from OpenEmbedded, and has originally been written by
-Khem Raj <raj.khem@gmail.com>.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- gl/stdio.in.h     |    2 ++
- lib/gl/stdio.in.h |    2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/gl/stdio.in.h b/gl/stdio.in.h
-index 9dc7c4a..8cb19d7 100644
---- a/gl/stdio.in.h
-+++ b/gl/stdio.in.h
-@@ -710,11 +710,13 @@ _GL_CXXALIAS_RPL (gets, char *, (char *s));
- _GL_CXXALIAS_SYS (gets, char *, (char *s));
- #  undef gets
- # endif
-+# if defined gets
- _GL_CXXALIASWARN (gets);
- /* It is very rare that the developer ever has full control of stdin,
-    so any use of gets warrants an unconditional warning.  Assume it is
-    always declared, since it is required by C89.  */
- _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
-+# endif
- #endif
- 
- 
-diff --git a/lib/gl/stdio.in.h b/lib/gl/stdio.in.h
-index 03bea2a..cb6483b 100644
---- a/lib/gl/stdio.in.h
-+++ b/lib/gl/stdio.in.h
-@@ -710,11 +710,13 @@ _GL_CXXALIAS_RPL (gets, char *, (char *s));
- _GL_CXXALIAS_SYS (gets, char *, (char *s));
- #  undef gets
- # endif
-+# if defined gets
- _GL_CXXALIASWARN (gets);
- /* It is very rare that the developer ever has full control of stdin,
-    so any use of gets warrants an unconditional warning.  Assume it is
-    always declared, since it is required by C89.  */
- _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
-+# endif
- #endif
- 
- 
--- 
-1.7.9.5
-
diff --git a/package/gnutls/gnutls.mk b/package/gnutls/gnutls.mk
index 506d7f5..e27c1a3 100644
--- a/package/gnutls/gnutls.mk
+++ b/package/gnutls/gnutls.mk
@@ -4,18 +4,30 @@
 #
 #############################################################
 
-GNUTLS_VERSION = 2.12.20
-GNUTLS_SOURCE = gnutls-$(GNUTLS_VERSION).tar.bz2
+GNUTLS_VERSION = 3.1.5
+GNUTLS_SOURCE = gnutls-$(GNUTLS_VERSION).tar.xz
 GNUTLS_SITE = $(BR2_GNU_MIRROR)/gnutls
-GNUTLS_LICENSE = GPLv3+ LGPLv2.1+
+GNUTLS_LICENSE = GPLv3+ LGPLv3
 GNUTLS_LICENSE_FILES = COPYING lib/COPYING
-GNUTLS_DEPENDENCIES = host-pkgconf libgcrypt $(if $(BR2_PACKAGE_ZLIB),zlib)
-GNUTLS_CONF_ENV = acl_cv_rpath=no \
+GNUTLS_DEPENDENCIES = host-pkgconf nettle $(if $(BR2_PACKAGE_ZLIB),zlib)
+GNUTLS_CONF_OPT = --with-libnettle-prefix=$(STAGING_DIR)/usr --disable-rpath
+GNUTLS_CONF_ENV = gl_cv_socket_ipv6=$(if $(BR2_INET_IPV6),yes,no) \
 	ac_cv_header_wchar_h=$(if $(BR2_USE_WCHAR),yes,no) \
 	gt_cv_c_wchar_t=$(if $(BR2_USE_WCHAR),yes,no) \
 	gt_cv_c_wint_t=$(if $(BR2_USE_WCHAR),yes,no)
-GNUTLS_CONF_OPT = --with-libgcrypt --without-libgcrypt-prefix \
-		--without-p11-kit --disable-rpath
 GNUTLS_INSTALL_STAGING = YES
 
+# Some examples in doc/examples use wchar
+define GNUTLS_DISABLE_DOCS
+	$(SED) 's/ doc / /' $(@D)/Makefile.in
+endef
+
+define GNUTLS_DISABLE_TOOLS
+	$(SED) 's/\$$(PROGRAMS)//' $(@D)/src/Makefile.in
+	$(SED) 's/) install-exec-am/)/' $(@D)/src/Makefile.in
+endef
+
+GNUTLS_POST_PATCH_HOOKS += GNUTLS_DISABLE_DOCS
+GNUTLS_POST_PATCH_HOOKS += $(if $(BR2_PACKAGE_GNUTLS_TOOLS),,GNUTLS_DISABLE_TOOLS)
+
 $(eval $(autotools-package))

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox