Skip to contentSkip to conversation

sethdlc: don't search host directories for header files

PATCH In review [email protected] 2 participants 3 messages Apr 17, 2014 – Apr 25, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sethdlc: don't search host directories for header files

From: Chunrong Guo <[email protected]>

*The build process hard-codes searches of various directories
in /usr/src/linux/include when looking for header files, delete this to avoid host contamination

---
 .../sethdlc/files/fix-includedir.patch                    | 15 +++++++++++++++
 meta-networking/recipes-connectivity/sethdlc/sethdlc.bb   | 11 +++--------
 2 files changed, 18 insertions(+), 8 deletions(-)
 create mode 100644 meta-networking/recipes-connectivity/sethdlc/files/fix-includedir.patch
meta-networking/recipes-connectivity/sethdlc/files/fix-includedir.patch new file +15 -0
new file mode 100644
index 0000000..49d6d42
@@ -0,0 +1,15 @@
+--- a/Makefileold	2014-04-16 22:05:58.070199084 -0500
++++ b/Makefile	2014-04-16 22:06:27.153074058 -0500
+@@ -1,11 +1,10 @@
+ CC = gcc
+ CFLAGS = -O2 -Wall -W -Wno-long-long -pipe
+-INCLUDES = -I/usr/src/linux/include -I/usr/src/linux-2.6/include
+ 
+ all:		sethdlc
+ 
+ sethdlc:	sethdlc.c
+-		$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
++		$(CC) $(CFLAGS)  -o $@ $<
+ 
+ install:
+ 		install -C -p -s sethdlc /usr/local/sbin/
meta-networking/recipes-connectivity/sethdlc/sethdlc.bb +3 -8
index 3a9692f..3459a36 100644
@@ -1,27 +1,22 @@
 DESCRIPTION = "set Linux HDLC packet radio modem driver port information"
 HOMEPAGE = "https://www.kernel.org/pub/linux/utils/net/hdlc"
 LICENSE = "GPLv2 & GPLv2+ "
-LIC_FILES_CHKSUM = "file://Makefile;md5=19aada31930b2be84bf7138420d77263"
-
+LIC_FILES_CHKSUM = "file://sethdlc.c;beginline=1;endline=10;md5=90f936879e9f8b755a138aeb348782eb"
 
 SRC_URI = "https://www.kernel.org/pub/linux/utils/net/hdlc/${BPN}-1.18.tar.gz \
+           file://fix-includedir.patch \
 "
 SRC_URI[md5sum] = "9016878156a5eadb06c0bae71cc5c9ab"
 SRC_URI[sha256sum] = "21b1e2e1cb0e288b0ec8fcfd9fed449914e0f8e6fc273706bd5b3d4f6ab6b04e"
 
-
 S = "${WORKDIR}/${BPN}-1.18"
 
-DEPENDS="virtual/kernel"
-
-EXTRA_OEMAKE="CROSS_COMPILE=${TARGET_PREFIX} CC='${CC} ${LDFLAGS}' \
-              KERNEL_DIR=${STAGING_KERNEL_DIR} "
+EXTRA_OEMAKE="CROSS_COMPILE=${TARGET_PREFIX} CC='${CC} ${LDFLAGS}'" 
 
 do_compile_prepend () {
     oe_runmake clean
 }
 
-
 do_install() {
     install -d ${D}/${bindir}
     install sethdlc ${D}/${bindir}/
Signature · 1 line
1.8.3.2
#1 lore raw

Pings

Thanks,
chunrong

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, April 17, 2014 11:42 AM
To: [email protected]
Cc: Liu Ting-B28495; Luo Zhenhua-B19537; Guo Chunrong-B40290
Subject: [meta-networking][PATCH ] sethdlc: don't search host directories for header files

From: Chunrong Guo <[email protected]>

*The build process hard-codes searches of various directories
in /usr/src/linux/include when looking for header files, delete this to avoid host contamination

---
 .../sethdlc/files/fix-includedir.patch                    | 15 +++++++++++++++
 meta-networking/recipes-connectivity/sethdlc/sethdlc.bb   | 11 +++--------
 2 files changed, 18 insertions(+), 8 deletions(-)  create mode 100644 meta-networking/recipes-connectivity/sethdlc/files/fix-includedir.patch
meta-networking/recipes-connectivity/sethdlc/files/fix-includedir. new file +0 -0
new file mode 100644
index 0000000..49d6d42

+++ patch
@@ -0,0 +1,15 @@
+--- a/Makefileold 2014-04-16 22:05:58.070199084 -0500
++++ b/Makefile 2014-04-16 22:06:27.153074058 -0500
+@@ -1,11 +1,10 @@
+ CC = gcc
+ CFLAGS = -O2 -Wall -W -Wno-long-long -pipe -INCLUDES = +-I/usr/src/linux/include -I/usr/src/linux-2.6/include +
+ all: sethdlc
+
+ sethdlc: sethdlc.c

+-		$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
++		$(CC) $(CFLAGS)  -o $@ $<

+
+ install:
+ install -C -p -s sethdlc /usr/local/sbin/

meta-networking/recipes-connectivity/sethdlc/sethdlc.bb +3 -8
index 3a9692f..3459a36 100644
@@ -1,27 +1,22 @@
 DESCRIPTION = "set Linux HDLC packet radio modem driver port information"
 HOMEPAGE = "https://www.kernel.org/pub/linux/utils/net/hdlc"
 LICENSE = "GPLv2 & GPLv2+ "
-LIC_FILES_CHKSUM = "file://Makefile;md5=19aada31930b2be84bf7138420d77263"
-
+LIC_FILES_CHKSUM = "file://sethdlc.c;beginline=1;endline=10;md5=90f936879e9f8b755a138aeb348782eb"
 
 SRC_URI = "https://www.kernel.org/pub/linux/utils/net/hdlc/${BPN}-1.18.tar.gz \
+           file://fix-includedir.patch \
 "
 SRC_URI[md5sum] = "9016878156a5eadb06c0bae71cc5c9ab"
 SRC_URI[sha256sum] = "21b1e2e1cb0e288b0ec8fcfd9fed449914e0f8e6fc273706bd5b3d4f6ab6b04e"
 
-
 S = "${WORKDIR}/${BPN}-1.18"
 
-DEPENDS="virtual/kernel"
-
-EXTRA_OEMAKE="CROSS_COMPILE=${TARGET_PREFIX} CC='${CC} ${LDFLAGS}' \
-              KERNEL_DIR=${STAGING_KERNEL_DIR} "
+EXTRA_OEMAKE="CROSS_COMPILE=${TARGET_PREFIX} CC='${CC} ${LDFLAGS}'" 
 
 do_compile_prepend () {
     oe_runmake clean
 }
 
-
 do_install() {
     install -d ${D}/${bindir}
     install sethdlc ${D}/${bindir}/

--
1.8.3.2

#2 lore raw

Hi Chunrong,

Quoted 1 line · [Re: [oe] [meta-networking][PATCH ] sethdlc: don't search host directories for…

Pings

Sorry about the delayed response on this. I'm honestly not entirely sure what to do with this one. A while back Trevor Woerner proposed we remove sethdlc entirely:

http://comments.gmane.org/gmane.comp.handhelds.openembedded/62626

and I was ready to merge that when your update came in. Your patch addresses what looks like a host contamination problem, but does it also address the 2.6.x kernel expectation he mentioned? If so, or if you can also take a look at it, great, otherwise I'm thinking it may be appropriate to remove it entirely. Age isn't an always an indicator of obsolescence, of course, particularly in networking stuff where things get working and don't have to be updated very often, ideally, but this one is looking a bit suspicious.

-J.

Quoted 84 lines

Thanks,
chunrong

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, April 17, 2014 11:42 AM
To: [email protected]
Cc: Liu Ting-B28495; Luo Zhenhua-B19537; Guo Chunrong-B40290
Subject: [meta-networking][PATCH ] sethdlc: don't search host directories for header files

From: Chunrong Guo <[email protected]>

*The build process hard-codes searches of various directories
in /usr/src/linux/include when looking for header files, delete this to avoid host contamination

---
 .../sethdlc/files/fix-includedir.patch                    | 15 +++++++++++++++
 meta-networking/recipes-connectivity/sethdlc/sethdlc.bb   | 11 +++--------
 2 files changed, 18 insertions(+), 8 deletions(-)  create mode 100644 meta-networking/recipes-connectivity/sethdlc/files/fix-includedir.patch
meta-networking/recipes-connectivity/sethdlc/files/fix-includedir. new file +16 -0
new file mode 100644
index 0000000..49d6d42
+++ patch
@@ -0,0 +1,15 @@
+--- a/Makefileold	2014-04-16 22:05:58.070199084 -0500
++++ b/Makefile	2014-04-16 22:06:27.153074058 -0500
+@@ -1,11 +1,10 @@
+ CC = gcc
+ CFLAGS = -O2 -Wall -W -Wno-long-long -pipe -INCLUDES = 
+-I/usr/src/linux/include -I/usr/src/linux-2.6/include
+ 
+ all:		sethdlc
+ 
+ sethdlc:	sethdlc.c
+-		$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
++		$(CC) $(CFLAGS)  -o $@ $<
+ 
+ install:
+ 		install -C -p -s sethdlc /usr/local/sbin/
meta-networking/recipes-connectivity/sethdlc/sethdlc.bb +3 -9
index 3a9692f..3459a36 100644
@@ -1,27 +1,22 @@
 DESCRIPTION = "set Linux HDLC packet radio modem driver port information"
 HOMEPAGE = "https://www.kernel.org/pub/linux/utils/net/hdlc"
 LICENSE = "GPLv2 & GPLv2+ "
-LIC_FILES_CHKSUM = "file://Makefile;md5=19aada31930b2be84bf7138420d77263"
-
+LIC_FILES_CHKSUM = "file://sethdlc.c;beginline=1;endline=10;md5=90f936879e9f8b755a138aeb348782eb"
 
 SRC_URI = "https://www.kernel.org/pub/linux/utils/net/hdlc/${BPN}-1.18.tar.gz \
+           file://fix-includedir.patch \
 "
 SRC_URI[md5sum] = "9016878156a5eadb06c0bae71cc5c9ab"
 SRC_URI[sha256sum] = "21b1e2e1cb0e288b0ec8fcfd9fed449914e0f8e6fc273706bd5b3d4f6ab6b04e"
 
-
 S = "${WORKDIR}/${BPN}-1.18"
 
-DEPENDS="virtual/kernel"
-
-EXTRA_OEMAKE="CROSS_COMPILE=${TARGET_PREFIX} CC='${CC} ${LDFLAGS}' \
-              KERNEL_DIR=${STAGING_KERNEL_DIR} "
+EXTRA_OEMAKE="CROSS_COMPILE=${TARGET_PREFIX} CC='${CC} ${LDFLAGS}'" 
 
 do_compile_prepend () {
     oe_runmake clean
 }
 
-
 do_install() {
     install -d ${D}/${bindir}
     install sethdlc ${D}/${bindir}/
--

1.8.3.2

Signature · 2 lines
-Joe MacDonald.
:wq