mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v3] iproute2: update version and minor improvements
@ 2016-10-04 16:20 Clemens Gruber
  2016-10-14 12:56 ` Juergen Borleis
  0 siblings, 1 reply; 4+ messages in thread
From: Clemens Gruber @ 2016-10-04 16:20 UTC (permalink / raw)
  To: ptxdist; +Cc: Clemens Gruber

Update to iproute2 4.7.0, which - thanks to Alexander Aring - includes a
patch to fix a xtables-related build failure.

In addition we have to set TC_CONFIG_XT to y. Otherwise, the
hand-crafted Configure script enables legacy iptables code, which in
turn leads to multiple build failures.
Enabling the iptables package in ptxdist is still not required.

Also pass the kernel headers include directory to make.

Replace the description of tc with a few modified lines from the
manpage.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
---

Changes from v2:
- Better commit message
- Use KERNEL_HEADERS_INCLUDE_DIR
- Whitespace cleanup

 rules/iproute2.in   |  5 +++--
 rules/iproute2.make | 13 ++++++++-----
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/rules/iproute2.in b/rules/iproute2.in
index dadad03..888b595 100644
--- a/rules/iproute2.in
+++ b/rules/iproute2.in
@@ -135,7 +135,8 @@ config IPROUTE2_TC
 	bool
 	prompt "tc"
 	help
-	  In Quality Of Service (QOS) and Class Of Service (COS)
-	  scenarios used for traffic controlling
+	  tc is used to configure Traffic Control in the Linux Kernel, which
+	  consists of Shaping, Scheduling, Policing and Dropping.
+	  Processing of traffic is controlled by qdiscs, classes and filters.
 
 endif
diff --git a/rules/iproute2.make b/rules/iproute2.make
index 34f93f4..4178ebb 100644
--- a/rules/iproute2.make
+++ b/rules/iproute2.make
@@ -17,8 +17,8 @@ PACKAGES-$(PTXCONF_IPROUTE2) += iproute2
 #
 # Paths and names
 #
-IPROUTE2_VERSION	:= 4.4.0
-IPROUTE2_MD5		:= d762653ec3e1ab0d4a9689e169ca184f
+IPROUTE2_VERSION	:= 4.7.0
+IPROUTE2_MD5		:= d4b205830cdc2702f8a0cbd6232129cd
 IPROUTE2		:= iproute2-$(IPROUTE2_VERSION)
 IPROUTE2_SUFFIX		:= tar.xz
 IPROUTE2_URL		:= $(call ptx/mirror, KERNEL, utils/net/iproute2/$(IPROUTE2).$(IPROUTE2_SUFFIX))
@@ -38,7 +38,7 @@ $(STATEDIR)/iproute2.prepare:
 	@$(call world/prepare, IPROUTE2)
 # overwrite options we don't want, or may be misdetected
 	@echo 'TC_CONFIG_ATM:=n'	>> $(IPROUTE2_DIR)/Config
-	@echo 'TC_CONFIG_XT:=n'		>> $(IPROUTE2_DIR)/Config
+	@echo 'TC_CONFIG_XT:=y'		>> $(IPROUTE2_DIR)/Config
 	@echo 'IPT_LIB_DIR:=/usr/lib'	>> $(IPROUTE2_DIR)/Config
 	@echo 'TC_CONFIG_ELF:=n'	>> $(IPROUTE2_DIR)/Config
 ifndef PTXCONF_GLOBAL_SELINUX
@@ -53,7 +53,8 @@ endif
 IPROUTE2_MAKE_OPT := \
 	DESTDIR=$(SYSROOT) \
 	LDFLAGS='-rdynamic' \
-	WFLAGS="-Wall"
+	WFLAGS="-Wall" \
+	KERNEL_INCLUDE="$(KERNEL_HEADERS_INCLUDE_DIR)/"
 
 # ----------------------------------------------------------------------------
 # Target-Install
@@ -93,18 +94,20 @@ $(STATEDIR)/iproute2.targetinstall:
 	done
 
 ifdef PTXCONF_IPROUTE2_TC
+	@$(call install_copy, iproute2, 0, 0, 0644, -, /usr/lib/tc/normal.dist)
 	@$(call install_copy, iproute2, 0, 0, 0644, -, /usr/lib/tc/pareto.dist)
 	@$(call install_copy, iproute2, 0, 0, 0644, -, /usr/lib/tc/paretonormal.dist)
 	@$(call install_copy, iproute2, 0, 0, 0644, -, /usr/lib/tc/experimental.dist)
 endif
 
 	@$(call install_alternative, iproute2, 0, 0, 0644, /etc/iproute2/ematch_map)
+	@$(call install_alternative, iproute2, 0, 0, 0644, /etc/iproute2/group)
+	@$(call install_alternative, iproute2, 0, 0, 0644, /etc/iproute2/nl_protos)
 	@$(call install_alternative, iproute2, 0, 0, 0644, /etc/iproute2/rt_dsfield)
 	@$(call install_alternative, iproute2, 0, 0, 0644, /etc/iproute2/rt_protos)
 	@$(call install_alternative, iproute2, 0, 0, 0644, /etc/iproute2/rt_realms)
 	@$(call install_alternative, iproute2, 0, 0, 0644, /etc/iproute2/rt_scopes)
 	@$(call install_alternative, iproute2, 0, 0, 0644, /etc/iproute2/rt_tables)
-	@$(call install_alternative, iproute2, 0, 0, 0644, /etc/iproute2/group)
 
 	@$(call install_finish, iproute2)
 
-- 
2.10.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH v3] iproute2: update version and minor improvements
  2016-10-04 16:20 [ptxdist] [PATCH v3] iproute2: update version and minor improvements Clemens Gruber
@ 2016-10-14 12:56 ` Juergen Borleis
  2016-10-14 13:19   ` Clemens Gruber
  2016-10-14 13:20   ` Clemens Gruber
  0 siblings, 2 replies; 4+ messages in thread
From: Juergen Borleis @ 2016-10-14 12:56 UTC (permalink / raw)
  To: Clemens Gruber; +Cc: ptxdist

Hi Clemens.

On Tuesday 04 October 2016 18:20:20 Clemens Gruber wrote:
> Update to iproute2 4.7.0, which - thanks to Alexander Aring - includes a
> patch to fix a xtables-related build failure.
>
> In addition we have to set TC_CONFIG_XT to y. Otherwise, the
> hand-crafted Configure script enables legacy iptables code, which in
> turn leads to multiple build failures.
> Enabling the iptables package in ptxdist is still not required.

Did you ever tried a

$ ptxdist clean
$ ptxdist compile iproute2

?

Here it fails with:

------------------------
target: iproute2.prepare
------------------------

TC schedulers
 ATM    no
 IPT    Package xtables was not found in the pkg-config search path.
Perhaps you should add the directory containing `xtables.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xtables' found
using iptables
 IPSET  yes

iptables modules directory: Package xtables was not found in the pkg-config search path.
Perhaps you should add the directory containing `xtables.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xtables' found
not found!
libc has setns: yes
SELinux support: no
ELF support: no
libmnl support: no
Berkeley DB: no

docs: latex: yes
 pdflatex: yes
 sgml2latex: no
 WARNING: no LaTeX files can be build from SGML files
 sgml2html: no
 WARNING: no HTML docs can be built from SGML

(prepare stage does not fail :( )

------------------------
target: iproute2.compile
------------------------

make[1]: Entering directory '/ptx/work/dude/WORK_A/jbe/git_repositories/OSELAS.BSP-Pengutronix-Mini2440.git/platform-mini2440/build-target/iproute2-4.7.0'

[...]
tc
    CC       tc_core.o
    CC       tc_red.o
    CC       tc_cbq.o
    CC       tc_estimator.o
[...]
    CC       emp_ematch.yacc.o
    CC       emp_ematch.lex.o
    AR       libtc.a
Package xtables was not found in the pkg-config search path.
Perhaps you should add the directory containing `xtables.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xtables' found
Package xtables was not found in the pkg-config search path.
Perhaps you should add the directory containing `xtables.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xtables' found
In file included from m_xt.c:21:0:
../include/xtables.h:34:29: fatal error: xtables-version.h: No such file or directory
 #include <xtables-version.h>
                             ^
compilation terminated.
Makefile:161: recipe for target 'm_xt.so' failed
make[2]: *** [m_xt.so] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from em_ipset.c:26:0:
../include/xtables.h:34:29: fatal error: xtables-version.h: No such file or directory
 #include <xtables-version.h>
                             ^
compilation terminated.
../Config:31: recipe for target 'em_ipset.o' failed
make[2]: *** [em_ipset.o] Error 1
rm emp_ematch.lex.c
Makefile:55: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '[...]/build-target/iproute2-4.7.0'
[...]/ptxdist.git/rules/post/ptxd_make_world_compile.make:21: recipe for target '[...]/state/iproute2.compile' failed
make: *** [[...]/iproute2.compile] Error 2

When I add a dependency to the iptables package it compiles again.

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Borleis             |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH v3] iproute2: update version and minor improvements
  2016-10-14 12:56 ` Juergen Borleis
@ 2016-10-14 13:19   ` Clemens Gruber
  2016-10-14 13:20   ` Clemens Gruber
  1 sibling, 0 replies; 4+ messages in thread
From: Clemens Gruber @ 2016-10-14 13:19 UTC (permalink / raw)
  To: Juergen Borleis; +Cc: ptxdist

Hi Juergen,

On Fri, Oct 14, 2016 at 02:56:12PM +0200, Juergen Borleis wrote:
> Did you ever tried a
> 
> $ ptxdist clean
> $ ptxdist compile iproute2
> 
> ?

Sure, does not throw an error at my machine. I also have iptables
disabled in my ptxconfig.

> 
> Here it fails with:
> 
> ------------------------
> target: iproute2.prepare
> ------------------------
> 
> TC schedulers
>  ATM    no
>  IPT    Package xtables was not found in the pkg-config search path.
> Perhaps you should add the directory containing `xtables.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'xtables' found
> using iptables
>  IPSET  yes
> 
> iptables modules directory: Package xtables was not found in the pkg-config search path.
> Perhaps you should add the directory containing `xtables.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'xtables' found
> not found!
> libc has setns: yes
> SELinux support: no
> ELF support: no
> libmnl support: no
> Berkeley DB: no
> 
> docs: latex: yes
>  pdflatex: yes
>  sgml2latex: no
>  WARNING: no LaTeX files can be build from SGML files
>  sgml2html: no
>  WARNING: no HTML docs can be built from SGML
> 
> (prepare stage does not fail :( )
> 
> ------------------------
> target: iproute2.compile
> ------------------------
> 
> make[1]: Entering directory '/ptx/work/dude/WORK_A/jbe/git_repositories/OSELAS.BSP-Pengutronix-Mini2440.git/platform-mini2440/build-target/iproute2-4.7.0'
> 
> [...]
> tc
>     CC       tc_core.o
>     CC       tc_red.o
>     CC       tc_cbq.o
>     CC       tc_estimator.o
> [...]
>     CC       emp_ematch.yacc.o
>     CC       emp_ematch.lex.o
>     AR       libtc.a
> Package xtables was not found in the pkg-config search path.
> Perhaps you should add the directory containing `xtables.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'xtables' found
> Package xtables was not found in the pkg-config search path.
> Perhaps you should add the directory containing `xtables.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'xtables' found
> In file included from m_xt.c:21:0:
> ../include/xtables.h:34:29: fatal error: xtables-version.h: No such file or directory
>  #include <xtables-version.h>
>                              ^
> compilation terminated.
> Makefile:161: recipe for target 'm_xt.so' failed
> make[2]: *** [m_xt.so] Error 1
> make[2]: *** Waiting for unfinished jobs....
> In file included from em_ipset.c:26:0:
> ../include/xtables.h:34:29: fatal error: xtables-version.h: No such file or directory
>  #include <xtables-version.h>
>                              ^
> compilation terminated.
> ../Config:31: recipe for target 'em_ipset.o' failed
> make[2]: *** [em_ipset.o] Error 1
> rm emp_ematch.lex.c
> Makefile:55: recipe for target 'all' failed
> make[1]: *** [all] Error 2
> make[1]: Leaving directory '[...]/build-target/iproute2-4.7.0'
> [...]/ptxdist.git/rules/post/ptxd_make_world_compile.make:21: recipe for target '[...]/state/iproute2.compile' failed
> make: *** [[...]/iproute2.compile] Error 2
> 
> When I add a dependency to the iptables package it compiles again.

Hmm I fear I missed that because there is still a xtables.h file in my
sysroot-target/usr/include folder.
So I disabled iptables but without a ptxdist clean iptables before
disabling it..

I'll investigate and report back with a patch.

I hope we do not have to enable iptables. Was trying to avoid that.

Regards,
Clemens

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH v3] iproute2: update version and minor improvements
  2016-10-14 12:56 ` Juergen Borleis
  2016-10-14 13:19   ` Clemens Gruber
@ 2016-10-14 13:20   ` Clemens Gruber
  1 sibling, 0 replies; 4+ messages in thread
From: Clemens Gruber @ 2016-10-14 13:20 UTC (permalink / raw)
  To: Juergen Borleis; +Cc: ptxdist

On Fri, Oct 14, 2016 at 02:56:12PM +0200, Juergen Borleis wrote:
> Hi Clemens.
> 
> On Tuesday 04 October 2016 18:20:20 Clemens Gruber wrote:
> > Update to iproute2 4.7.0, which - thanks to Alexander Aring - includes a
> > patch to fix a xtables-related build failure.
> >
> > In addition we have to set TC_CONFIG_XT to y. Otherwise, the
> > hand-crafted Configure script enables legacy iptables code, which in
> > turn leads to multiple build failures.
> > Enabling the iptables package in ptxdist is still not required.
> 
> Did you ever tried a
> 
> $ ptxdist clean

That was the mistake:

I only did a ptxdist clean iproute2 ..

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2016-10-14 13:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-04 16:20 [ptxdist] [PATCH v3] iproute2: update version and minor improvements Clemens Gruber
2016-10-14 12:56 ` Juergen Borleis
2016-10-14 13:19   ` Clemens Gruber
2016-10-14 13:20   ` Clemens Gruber

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