mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCHv3 1/1] dhcp-helper: this patch adds dhcp-helper to ptxdist
@ 2015-04-01 14:29 Oliver Graute
  2015-04-02  8:34 ` Marc Kleine-Budde
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Graute @ 2015-04-01 14:29 UTC (permalink / raw)
  To: ptxdist; +Cc: Oliver Graute

This patch adds dhcp-helper a DHCP and BOOTP relay agent to ptxdist

Signed-off-by: Oliver Graute <oliver.graute@neuhaus.de>
---
 rules/dhcp-helper.in   |   12 ++++++++
 rules/dhcp-helper.make |   74 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100644 rules/dhcp-helper.in
 create mode 100644 rules/dhcp-helper.make

diff --git a/rules/dhcp-helper.in b/rules/dhcp-helper.in
new file mode 100644
index 0000000..b55755b
--- /dev/null
+++ b/rules/dhcp-helper.in
@@ -0,0 +1,12 @@
+## SECTION=networking
+
+config DHCP_HELPER
+	tristate
+	prompt "dhcp-helper"
+	help
+	 dhcp-helper is a DHCP and BOOTP relay agent. It listens for DHCP and
+	 BOOTP broadcasts on directly connected subnets and relays them to DHCP
+	 or BOOTP servers elsewhere.  It also relays replies from the remote
+	 servers back to partially configured hosts. Once hosts are fully
+	 configured they can communicate directly with their servers and no
+	 longer need the services of a relay.
diff --git a/rules/dhcp-helper.make b/rules/dhcp-helper.make
new file mode 100644
index 0000000..38a2eb2
--- /dev/null
+++ b/rules/dhcp-helper.make
@@ -0,0 +1,74 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2015 Dr. Neuhaus Telekommunikation GmbH, Hamburg Germany, Oliver Graute <oliver.graute@neuhaus.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_DHCP_HELPER) += dhcp-helper
+
+#
+# Paths and names
+#
+DHCP_HELPER_VERSION	:= 1.1
+DHCP_HELPER_MD5		:= d749a53d8b488b6a15b7400185b99bb3
+DHCP_HELPER		:= dhcp-helper-$(DHCP_HELPER_VERSION)
+DHCP_HELPER_SUFFIX	:= tar.gz
+DHCP_HELPER_URL		:= http://www.thekelleys.org.uk/dhcp-helper/$(DHCP_HELPER).$(DHCP_HELPER_SUFFIX)
+DHCP_HELPER_SOURCE	:= $(SRCDIR)/$(DHCP_HELPER).$(DHCP_HELPER_SUFFIX)
+DHCP_HELPER_DIR		:= $(BUILDDIR)/$(DHCP_HELPER)
+DHCP_HELPER_LICENSE	:= GPLv2
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/dhcp-helper.prepare:
+	@$(call targetinfo)
+	@$(call clean, $(DHCP_HELPER_DIR)/config.cache)
+	@$(call touch)
+
+#
+# autoconf
+#
+DHCP_HELPER_CONF_TOOL	:=  NO
+DHCP_HELPER_CONF_OPT	:= \
+ 	CROSS_COMPILE=$(COMPILER_PREFIX) PREFIX=/usr
+DHCP_HELPER_INSTALL_OPT := $(COMPILE_OPT)
+
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/dhcp-helper.compile:
+	@$(call targetinfo)
+	@$(call world/compile, DHCP_HELPER)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/dhcp-helper.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, dhcp-helper)
+	@$(call install_fixup, dhcp-helper,PRIORITY,optional)
+	@$(call install_fixup, dhcp-helper,SECTION,base)
+	@$(call install_fixup, dhcp-helper,AUTHOR,"<oliver.graute@neuhaus.de>")
+	@$(call install_fixup, dhcp-helper,DESCRIPTION,missing)
+
+	@$(call install_copy, dhcp-helper, 0, 0, 0755, -, /usr/local/sbin/dhcp-helper)
+
+	@$(call install_finish, dhcp-helper)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
1.7.9.5


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCHv3 1/1] dhcp-helper: this patch adds dhcp-helper to ptxdist
  2015-04-01 14:29 [ptxdist] [PATCHv3 1/1] dhcp-helper: this patch adds dhcp-helper to ptxdist Oliver Graute
@ 2015-04-02  8:34 ` Marc Kleine-Budde
  2015-04-02  9:17   ` Marc Kleine-Budde
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Kleine-Budde @ 2015-04-02  8:34 UTC (permalink / raw)
  To: ptxdist; +Cc: Oliver Graute


[-- Attachment #1.1: Type: text/plain, Size: 5108 bytes --]

On 04/01/2015 04:29 PM, Oliver Graute wrote:
> This patch adds dhcp-helper a DHCP and BOOTP relay agent to ptxdist

The package is not cross compiled, and the targetinstall stage fails.
Please test your package before posting.

> Signed-off-by: Oliver Graute <oliver.graute@neuhaus.de>
> ---
>  rules/dhcp-helper.in   |   12 ++++++++
>  rules/dhcp-helper.make |   74 ++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 86 insertions(+)
>  create mode 100644 rules/dhcp-helper.in
>  create mode 100644 rules/dhcp-helper.make
> 
> diff --git a/rules/dhcp-helper.in b/rules/dhcp-helper.in
> new file mode 100644
> index 0000000..b55755b
> --- /dev/null
> +++ b/rules/dhcp-helper.in
> @@ -0,0 +1,12 @@
> +## SECTION=networking
> +
> +config DHCP_HELPER
> +	tristate
> +	prompt "dhcp-helper"
> +	help
> +	 dhcp-helper is a DHCP and BOOTP relay agent. It listens for DHCP and
> +	 BOOTP broadcasts on directly connected subnets and relays them to DHCP
> +	 or BOOTP servers elsewhere.  It also relays replies from the remote
> +	 servers back to partially configured hosts. Once hosts are fully
> +	 configured they can communicate directly with their servers and no
> +	 longer need the services of a relay.

please indent here with <tab><space><space>.

> diff --git a/rules/dhcp-helper.make b/rules/dhcp-helper.make
> new file mode 100644
> index 0000000..38a2eb2
> --- /dev/null
> +++ b/rules/dhcp-helper.make
> @@ -0,0 +1,74 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2015 Dr. Neuhaus Telekommunikation GmbH, Hamburg Germany, Oliver Graute <oliver.graute@neuhaus.de>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_DHCP_HELPER) += dhcp-helper
> +
> +#
> +# Paths and names
> +#
> +DHCP_HELPER_VERSION	:= 1.1
> +DHCP_HELPER_MD5		:= d749a53d8b488b6a15b7400185b99bb3
> +DHCP_HELPER		:= dhcp-helper-$(DHCP_HELPER_VERSION)
> +DHCP_HELPER_SUFFIX	:= tar.gz
> +DHCP_HELPER_URL		:= http://www.thekelleys.org.uk/dhcp-helper/$(DHCP_HELPER).$(DHCP_HELPER_SUFFIX)
> +DHCP_HELPER_SOURCE	:= $(SRCDIR)/$(DHCP_HELPER).$(DHCP_HELPER_SUFFIX)
> +DHCP_HELPER_DIR		:= $(BUILDDIR)/$(DHCP_HELPER)
> +DHCP_HELPER_LICENSE	:= GPLv2
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/dhcp-helper.prepare:
> +	@$(call targetinfo)
> +	@$(call clean, $(DHCP_HELPER_DIR)/config.cache)
> +	@$(call touch)

Please remove the prepare stage, as the default (together with the
CONF_TOOL :=  NO) works.

> +
> +#
> +# autoconf
> +#
> +DHCP_HELPER_CONF_TOOL	:=  NO
> +DHCP_HELPER_CONF_OPT	:= \
> + 	CROSS_COMPILE=$(COMPILER_PREFIX) PREFIX=/usr

ptxdist/ptxdist/.git/rebase-apply/patch:73: space before tab in indent.
 	CROSS_COMPILE=$(COMPILER_PREFIX) PREFIX=/usr

The correct option is "COMPILE_OPT". The rationale is: COMPILE_OPT is
used in the compile stage (as args to make), while CONF_OPT is used in
the prepare stage, as arguments to ./configure:

DHCP_HELPER_COMPILE_OPT : \
	CROSS_COMPILE=$(COMPILER_PREFIX) \
	PREFIX=/usr

> +DHCP_HELPER_INSTALL_OPT := $(COMPILE_OPT)

Please add "install":

DHCP_HELPER_INSTALL_OPT := \
	$(COMPILE_OPT) \
	install

> +
> +
> +# ----------------------------------------------------------------------------
> +# Compile
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/dhcp-helper.compile:
> +	@$(call targetinfo)
> +	@$(call world/compile, DHCP_HELPER)
> +	@$(call touch)

please remove, as the default works.

> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/dhcp-helper.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, dhcp-helper)
> +	@$(call install_fixup, dhcp-helper,PRIORITY,optional)
> +	@$(call install_fixup, dhcp-helper,SECTION,base)
> +	@$(call install_fixup, dhcp-helper,AUTHOR,"<oliver.graute@neuhaus.de>")
> +	@$(call install_fixup, dhcp-helper,DESCRIPTION,missing)
> +
> +	@$(call install_copy, dhcp-helper, 0, 0, 0755, -, /usr/local/sbin/dhcp-helper)
                                                               ^^^^^

When setting PREFIX=/usr this will be installed into /usr/sbin. (But the
PREFIX=/usr never reached the install stage, see above)

> +
> +	@$(call install_finish, dhcp-helper)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> 

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCHv3 1/1] dhcp-helper: this patch adds dhcp-helper to ptxdist
  2015-04-02  8:34 ` Marc Kleine-Budde
@ 2015-04-02  9:17   ` Marc Kleine-Budde
  0 siblings, 0 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2015-04-02  9:17 UTC (permalink / raw)
  To: ptxdist; +Cc: Oliver Graute


[-- Attachment #1.1: Type: text/plain, Size: 4587 bytes --]

On 04/02/2015 10:34 AM, Marc Kleine-Budde wrote:
> The package is not cross compiled, and the targetinstall stage fails.
> Please test your package before posting.

I'd better test my suggestions myself first.

>> Signed-off-by: Oliver Graute <oliver.graute@neuhaus.de>
>> ---
>>  rules/dhcp-helper.in   |   12 ++++++++
>>  rules/dhcp-helper.make |   74 ++++++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 86 insertions(+)
>>  create mode 100644 rules/dhcp-helper.in
>>  create mode 100644 rules/dhcp-helper.make
>>
>> diff --git a/rules/dhcp-helper.in b/rules/dhcp-helper.in
>> new file mode 100644
>> index 0000000..b55755b
>> --- /dev/null
>> +++ b/rules/dhcp-helper.in
>> @@ -0,0 +1,12 @@
>> +## SECTION=networking
>> +
>> +config DHCP_HELPER
>> +	tristate
>> +	prompt "dhcp-helper"
>> +	help
>> +	 dhcp-helper is a DHCP and BOOTP relay agent. It listens for DHCP and
>> +	 BOOTP broadcasts on directly connected subnets and relays them to DHCP
>> +	 or BOOTP servers elsewhere.  It also relays replies from the remote
>> +	 servers back to partially configured hosts. Once hosts are fully
>> +	 configured they can communicate directly with their servers and no
>> +	 longer need the services of a relay.
> 
> please indent here with <tab><space><space>.
> 
>> diff --git a/rules/dhcp-helper.make b/rules/dhcp-helper.make
>> new file mode 100644
>> index 0000000..38a2eb2
>> --- /dev/null
>> +++ b/rules/dhcp-helper.make
>> @@ -0,0 +1,74 @@
>> +# -*-makefile-*-
>> +#
>> +# Copyright (C) 2015 Dr. Neuhaus Telekommunikation GmbH, Hamburg Germany, Oliver Graute <oliver.graute@neuhaus.de>
>> +#
>> +# See CREDITS for details about who has contributed to this project.
>> +#
>> +# For further information about the PTXdist project and license conditions
>> +# see the README file.
>> +#
>> +
>> +#
>> +# We provide this package
>> +#
>> +PACKAGES-$(PTXCONF_DHCP_HELPER) += dhcp-helper
>> +
>> +#
>> +# Paths and names
>> +#
>> +DHCP_HELPER_VERSION	:= 1.1
>> +DHCP_HELPER_MD5		:= d749a53d8b488b6a15b7400185b99bb3
>> +DHCP_HELPER		:= dhcp-helper-$(DHCP_HELPER_VERSION)
>> +DHCP_HELPER_SUFFIX	:= tar.gz
>> +DHCP_HELPER_URL		:= http://www.thekelleys.org.uk/dhcp-helper/$(DHCP_HELPER).$(DHCP_HELPER_SUFFIX)
>> +DHCP_HELPER_SOURCE	:= $(SRCDIR)/$(DHCP_HELPER).$(DHCP_HELPER_SUFFIX)
>> +DHCP_HELPER_DIR		:= $(BUILDDIR)/$(DHCP_HELPER)
>> +DHCP_HELPER_LICENSE	:= GPLv2
>> +
>> +# ----------------------------------------------------------------------------
>> +# Prepare
>> +# ----------------------------------------------------------------------------
>> +
>> +$(STATEDIR)/dhcp-helper.prepare:
>> +	@$(call targetinfo)
>> +	@$(call clean, $(DHCP_HELPER_DIR)/config.cache)
>> +	@$(call touch)
> 
> Please remove the prepare stage, as the default (together with the
> CONF_TOOL :=  NO) works.
> 
>> +
>> +#
>> +# autoconf
>> +#
>> +DHCP_HELPER_CONF_TOOL	:=  NO
>> +DHCP_HELPER_CONF_OPT	:= \
>> + 	CROSS_COMPILE=$(COMPILER_PREFIX) PREFIX=/usr
> 
> ptxdist/ptxdist/.git/rebase-apply/patch:73: space before tab in indent.
>  	CROSS_COMPILE=$(COMPILER_PREFIX) PREFIX=/usr
> 
> The correct option is "COMPILE_OPT". The rationale is: COMPILE_OPT is
> used in the compile stage (as args to make), while CONF_OPT is used in
> the prepare stage, as arguments to ./configure:

This is not correct, it should say:

The correct option is "MAKE_OPT". The rationale is: MAKE_OPT is
used in the compile stage (as args to make), while CONF_OPT is used in
the prepare stage, as arguments to ./configure:

This leads to a prepare stage like this (tested):

> # ----------------------------------------------------------------------------
> # Prepare
> # ----------------------------------------------------------------------------
> 
> DHCP_HELPER_CONF_TOOL	:=  NO
> DHCP_HELPER_MAKE_OPT	:= \
> 	$(CROSS_ENV_CC) \
> 	PREFIX=/usr
> 
> DHCP_HELPER_INSTALL_OPT := \
> 	$(DHCP_HELPER_MAKE_OPT) \
> 	install
> 

CROSS_ENV_CC is CC=$(COMPILER_PREFIX)gcc, as the unpatched makefile uses
CC directly, there's no CROSS_COMPILE:

> all: dhcp-helper.c                                                               
>         $(CC) $(CFLAGS) $(RPM_OPT_FLAGS) -Wall -W dhcp-helper.c -o dhcp-helper   

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-02  9:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-01 14:29 [ptxdist] [PATCHv3 1/1] dhcp-helper: this patch adds dhcp-helper to ptxdist Oliver Graute
2015-04-02  8:34 ` Marc Kleine-Budde
2015-04-02  9:17   ` Marc Kleine-Budde

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