Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nathaniel Roach <nroach44@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] dhcp: fix bad --enable/disable-debug logic
Date: Tue, 11 Nov 2014 22:13:10 +0800	[thread overview]
Message-ID: <54621976.7000908@gmail.com> (raw)
In-Reply-To: <1415711336-27589-1-git-send-email-gustavo@zacarias.com.ar>

On 11/11/14 21:08, Gustavo Zacarias wrote:
> It interprets disable as enable and wreaks havoc since it changes the
> behaviour of the build, for instance not using configured leases files
> paths.
> Thanks to Nathaniel Roach for pointing me to this problem.
> 
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
>  package/dhcp/0001-fix-configure-debug.patch | 23 +++++++++++++++++++++++
>  package/dhcp/dhcp.mk                        |  2 ++
>  2 files changed, 25 insertions(+)
>  create mode 100644 package/dhcp/0001-fix-configure-debug.patch
> 
> diff --git a/package/dhcp/0001-fix-configure-debug.patch b/package/dhcp/0001-fix-configure-debug.patch
> new file mode 100644
> index 0000000..19c9bfe
> --- /dev/null
> +++ b/package/dhcp/0001-fix-configure-debug.patch
> @@ -0,0 +1,23 @@
> +AC_ARG_ENABLE is passed wrong parameters for action-if-given:
> +If someone passed --enable-debug to configure enable_debug was set to 'yes',
> +but if --disable-debug was passed the action is also called and debug was
> +also set to 'yes' which is wrong.
> +Use $enableval for this case.
> +
> +Reported upstream as ISC-Bugs #37780 (not publicly accesible).
> +Thanks to Nathaniel Roach for pointing out the problem.
> +
> +Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> +
> +diff -Nura dhcp-4.1-ESV-R10.orig/configure.ac dhcp-4.1-ESV-R10/configure.ac
> +--- dhcp-4.1-ESV-R10.orig/configure.ac	2014-11-11 09:50:07.719277076 -0300
> ++++ dhcp-4.1-ESV-R10/configure.ac	2014-11-11 09:51:10.722432148 -0300
> +@@ -53,7 +53,7 @@
> + AC_ARG_ENABLE(debug,
> + 	AC_HELP_STRING([--enable-debug],
> + 		[create a debug-only version of the software (default is no).]),
> +-		[enable_debug=yes],[enable_debug=no])
> ++		[enable_debug=$enableval],[enable_debug=no])
> + # This is very much off by default.
> + if test "$enable_debug" = "yes" ; then
> + 	AC_DEFINE([DEBUG], [1],
> diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk
> index 8b38fd0..27fb60b 100644
> --- a/package/dhcp/dhcp.mk
> +++ b/package/dhcp/dhcp.mk
> @@ -9,6 +9,8 @@ DHCP_SITE = http://ftp.isc.org/isc/dhcp/$(DHCP_VERSION)
>  DHCP_INSTALL_STAGING = YES
>  DHCP_LICENSE = ISC
>  DHCP_LICENSE_FILES = LICENSE
> +# For 0001-fix-configure-debug.patch
> +DHCP_AUTORECONF = YES
>  DHCP_CONF_ENV = \
>  	CPPFLAGS='-D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \
>  		-D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"' \
> 

Reviewed-by: Nathaniel Roach <nroach44@gmail.com>
Tested-by: Nathaniel Roach <nroach44@gmail.com>
 [run tested on cortex-a5 system, BR glibc toolchain]

  reply	other threads:[~2014-11-11 14:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 13:08 [Buildroot] [PATCH] dhcp: fix bad --enable/disable-debug logic Gustavo Zacarias
2014-11-11 14:13 ` Nathaniel Roach [this message]
2014-11-11 14:34 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54621976.7000908@gmail.com \
    --to=nroach44@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox