Skip to contentSkip to conversation

ncp - a fast file copy tool for LANs

PATCH In review André Draszik 3 participants 13 messages Nov 15, 2016 – Nov 18, 2016

lore
Share & tools
lore
#0 lore raw

cover ncp - a fast file copy tool for LANs

"ncp" is a utility for copying files in a LAN. It has absolutely no security or integrity checking, no throttling, no features, except one:
you don't have to type the coordinates of your peer.

Basically it works like this:

- You and your buddy want to play Quake
- Your buddy has a level that you don't have
- He types npush filename and waits. npush sends out UDP announcement packets proclaiming that someone wants to send something
- You type npoll. npoll waits until it sees one of these packets
- The files are copied with tar over a TCP socket, so permissions and file dates (and if you are root, owners) are preserved
- There are other usage modes. You can also use it like this:

peer1$ ncp
peer2$ ncp peer1 file1 file2 file3
or like this:

peer1$ npush file1
peer2$ npoll peer1

#1 lore raw

PATCH 1/2 libowfat: add v0.31

---
 .../recipes-support/ncp/libowfat_0.31.bb           | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 meta-networking/recipes-support/ncp/libowfat_0.31.bb
meta-networking/recipes-support/ncp/libowfat_0.31.bb new file +27 -0
new file mode 100644
index 0000000..4b072f7
@@ -0,0 +1,27 @@
+SUMMARY = "reimplement libdjb"
+DESCRIPTION = "libowfat is a library of general purpose APIs extracted from Dan \
+Bernstein's software (libdjb), reimplemented and covered by the GNU \
+General Public License Version 2 (no later versions)."
+HOMEPAGE = "http://www.fefe.de/libowfat"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+SRC_URI = "https://www.fefe.de/${BPN}/${BP}.tar.xz"
+SRC_URI[md5sum] = "120798fab86cfd72dc6b12284d248dd0"
+SRC_URI[sha256sum] = "d1e4ac1cfccbb7dc51d77d96398e6302d229ba7538158826c84cb4254c7e8a12"
+
+EXTRA_OEMAKE = "\
+    DIET= \
+    CC='${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}' \
+    CCC='${CC}' CFLAGS='${CFLAGS} -I.' CFLAGS_OPT='${CFLAGS} -I.' \
+"
+
+do_install() {
+    make install \
+        DESTDIR=${D} \
+        INCLUDEDIR=${includedir}/${BPN} \
+        LIBDIR=${libdir} \
+        MAN3DIR=${mandir}/man3
+}
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.10.2
#2 lore raw

PATCH 2/2 ncp: add v1.2.4

In reply to André Draszik
---
 meta-networking/recipes-support/ncp/ncp_1.2.4.bb | 53 ++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 meta-networking/recipes-support/ncp/ncp_1.2.4.bb
meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +53 -0
new file mode 100644
index 0000000..d52044f
@@ -0,0 +1,53 @@
+SUMMARY = "a fast file copy tool for LANs"
+DESCRIPTION = "ncp is a utility for copying files in a LAN. It has absolutely no \n\
+security or integrity checking, no throttling, no features, except \n\
+one: you don't have to type the coordinates of your peer. \n\
+\n\
+Please note that the DNS resolver does not use /etc/hosts (as that \n\
+would not work with IPv6 anyway), so you should have a properly \n\
+configured DNS server. \n\
+\n\
+Basically it works like this: \n\
+   1. You and your buddy want to play Quake \n\
+   2. Your buddy has a level that you don't have \n\
+   3. He types npush filename and waits. npush sends out UDP \n\
+      announcement packets proclaiming that someone wants to send \n\
+      something \n\
+   4. You type npoll. npoll waits until it sees one of these packets \n\
+   5. The files are copied with tar over a TCP socket, so permissions \n\
+      and file dates (and if you are root, owners) are preserved. \n\
+\n\
+There are other usage modes. You can also use it like this: \n\
+   peer1$ ncp \n\
+                           peer2$ ncp peer1 file1 file2 file3 \n\
+or like this: \n\
+   peer1$ npush file1 \n\
+                           peer2$ npoll peer1"
+HOMEPAGE = "http://www.fefe.de/ncp"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+DEPENDS = "libowfat"
+
+SRC_URI = "https://dl.fefe.de/${BP}.tar.bz2"
+SRC_URI[md5sum] = "421c4855bd3148b7d0a4342942b4bf13"
+SRC_URI[sha256sum] = "6cfa72edd5f7717bf7a4a93ccc74c4abd89892360e2e0bb095a73c24b9359b88"
+
+EXTRA_OEMAKE = "\
+    DIET= \
+    DEBUG=nostrip \
+    CC='${CC}' CFLAGS='${CFLAGS} -I${STAGING_INCDIR}/libowfat' LDFLAGS='${LDFLAGS}' \
+"
+
+do_install() {
+    install -d -m0755 ${D}${bindir}
+    install -d -m0755 ${D}${mandir}/man1
+
+    install -m0755 ncp ${D}${bindir}
+    ln -sf ncp ${D}${bindir}/npoll
+    ln -sf ncp ${D}${bindir}/npush
+
+    install -m0644 ncp.1 npush.1 ${D}${mandir}/man1
+    ln -sf npush.1 ${D}${mandir}/man1/npoll.1
+}
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.10.2
#3 lore raw

PATCH v2 2/2 ncp: add v1.2.4

---
 meta-networking/recipes-support/ncp/ncp_1.2.4.bb | 32 ++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 meta-networking/recipes-support/ncp/ncp_1.2.4.bb
meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +32 -0
new file mode 100644
index 0000000..7bbaaad
@@ -0,0 +1,32 @@
+SUMMARY = "a fast file copy tool for LANs"
+DESCRIPTION = "ncp is a utility for copying files in a LAN. It has absolutely no \
+security or integrity checking, no throttling, no features, except \
+one: you don't have to type the coordinates of your peer."
+HOMEPAGE = "http://www.fefe.de/ncp"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+DEPENDS = "libowfat"
+
+SRC_URI = "https://dl.fefe.de/${BP}.tar.bz2"
+SRC_URI[md5sum] = "421c4855bd3148b7d0a4342942b4bf13"
+SRC_URI[sha256sum] = "6cfa72edd5f7717bf7a4a93ccc74c4abd89892360e2e0bb095a73c24b9359b88"
+
+EXTRA_OEMAKE = "\
+    DIET= \
+    DEBUG=nostrip \
+    CC='${CC}' CFLAGS='${CFLAGS} -I${STAGING_INCDIR}/libowfat' LDFLAGS='${LDFLAGS}' \
+"
+
+do_install() {
+    install -d -m0755 ${D}${bindir}
+    install -d -m0755 ${D}${mandir}/man1
+
+    install -m0755 ncp ${D}${bindir}
+    ln -sf ncp ${D}${bindir}/npoll
+    ln -sf ncp ${D}${bindir}/npush
+
+    install -m0644 ncp.1 npush.1 ${D}${mandir}/man1
+    ln -sf npush.1 ${D}${mandir}/man1/npoll.1
+}
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.10.2
#4 lore raw

Re: [meta-networking][PATCH 2/2 v2] ncp: add v1.2.4

Quoted 20 lines · André Draszik
---
 meta-networking/recipes-support/ncp/ncp_1.2.4.bb | 32 ++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 meta-networking/recipes-support/ncp/ncp_1.2.4.bb
meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +8 -0
new file mode 100644
index 0000000..7bbaaad
@@ -0,0 +1,32 @@
+SUMMARY = "a fast file copy tool for LANs"
+DESCRIPTION = "ncp is a utility for copying files in a LAN. It has absolutely no \
+security or integrity checking, no throttling, no features, except \
+one: you don't have to type the coordinates of your peer."
+HOMEPAGE = "http://www.fefe.de/ncp"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+DEPENDS = "libowfat"

meta-networking/recipes-support/ncp/ncp_1.2.4.bb line 18

Quoted 10 lines
meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +10 -0
+
+SRC_URI = "https://dl.fefe.de/${BP}.tar.bz2"
+SRC_URI[md5sum] = "421c4855bd3148b7d0a4342942b4bf13"
+SRC_URI[sha256sum] = "6cfa72edd5f7717bf7a4a93ccc74c4abd89892360e2e0bb095a73c24b9359b88"
+
+EXTRA_OEMAKE = "\
+    DIET= \
+    DEBUG=nostrip \
+    CC='${CC}' CFLAGS='${CFLAGS} -I${STAGING_INCDIR}/libowfat' LDFLAGS='${LDFLAGS}' \
+"

Is setting CC etc. on make cmdline really needed ? may be just adding the -I flags to CPPFLAGS is enough ?

meta-networking/recipes-support/ncp/ncp_1.2.4.bb line 21

Quoted 3 lines
meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +3 -0
+
+do_install() {
+    install -d -m0755 ${D}${bindir}

not needed if you can just do

install -D -m 0755 ncp ${D}${bindir}/ncp

and avoid two calls to install ( one for dir and another for file )

meta-networking/recipes-support/ncp/ncp_1.2.4.bb line 28

Quoted 9 lines
meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +7 -0
+    install -d -m0755 ${D}${mandir}/man1
+
+    install -m0755 ncp ${D}${bindir}
 
 
+    ln -sf ncp ${D}${bindir}/npoll
+    ln -sf ncp ${D}${bindir}/npush
+
+    install -m0644 ncp.1 npush.1 ${D}${mandir}/man1

same here not needed.

Quoted 5 lines
meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +4 -0
+    ln -sf npush.1 ${D}${mandir}/man1/npoll.1
+}
+
+BBCLASSEXTEND = "native nativesdk"
#5 lore raw

Re: [meta-networking][PATCH 2/2 v2] ncp: add v1.2.4

Quoted 32 lines · Khem Raj
Quoted 30 lines · André Draszik

---
 meta-networking/recipes-support/ncp/ncp_1.2.4.bb | 32
++++++++++++++++++++++++

 1 file changed, 32 insertions(+)

 create mode 100644 meta-networking/recipes-support/ncp/ncp_1.2.4.bb

meta- renamed from meta-networking/recipes-support/ncp/ncp_1.2.4.bb +0 -0

networking/recipes-support/ncp/ncp_1.2.4.bb
new file mode 100644
index 0000000..7bbaaad

meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +2 -0
@@ -0,0 +1,32 @@
+SUMMARY = "a fast file copy tool for LANs"
+DESCRIPTION = "ncp is a utility for copying files in a LAN. It has

absolutely no \

meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +5 -0
+security or integrity checking, no throttling, no features, except \
+one: you don't have to type the coordinates of your peer."
+HOMEPAGE = "http://www.fefe.de/ncp"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-

2.0;md5=801f80980d171dd6425610833a22dbe6"

meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +5 -0
+DEPENDS = "libowfat"
+
+SRC_URI = "https://dl.fefe.de/${BP}.tar.bz2"
+SRC_URI[md5sum] = "421c4855bd3148b7d0a4342942b4bf13"
+SRC_URI[sha256sum] =

"6cfa72edd5f7717bf7a4a93ccc74c4abd89892360e2e0bb095a73c24b9359b88" +

Quoted 8 lines
Quoted 6 lines

+EXTRA_OEMAKE = "\
+    DIET= \
+    DEBUG=nostrip \
+    CC='${CC}' CFLAGS='${CFLAGS} -I${STAGING_INCDIR}/libowfat' LDFLAGS='${LDFLAGS}' \
+"

Is setting CC etc. on make cmdline really needed ?

Yes, the Makefile sets CC CFLAGS LDFLAGS excplicitly, so make doesn't inherit them from the environment variables, because OE doesn't pass the -e make flag anymore. https://www.gnu.org/software/make/manual/html_node/Enviro
nment.html#Environment

Quoted 1 line

may be just adding the -I flags to CPPFLAGS is enough ?

It doesn't respect CPPFLAGS, but an alternative would be:

EXTRA_OEMAKE = "\
    DIET= \
    DEBUG=nostrip \
    -e \

"
CFLAGS_append = " -I${STAGING_INCDIR}/libowfat"

I have no preference either way, but my original version makes it more obvious what we're after.

Quoted 15 lines

meta-networking/recipes-support/ncp/ncp_1.2.4.bb line 21

Quoted 3 lines
meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +3 -0
+
+do_install() {
+    install -d -m0755 ${D}${bindir}

not needed if you can just do

install -D -m 0755 ncp ${D}${bindir}/ncp

and avoid two calls to install ( one for dir and another for file )

Quoted 3 lines

+    install -d -m0755 ${D}${mandir}/man1
+
+    install -m0755 ncp ${D}${bindir}

Quoted 6 lines
Quoted 4 lines

+    ln -sf ncp ${D}${bindir}/npoll
+    ln -sf ncp ${D}${bindir}/npush
+
+    install -m0644 ncp.1 npush.1 ${D}${mandir}/man1

same here not needed.

Using -D that'd still need two calls, as multiple files are being copied and -D only allows you to specify one destination (I think). Not really gaining anything here. In addition, you have to specify the source filename multiple times (in src and destination).
This:
    install -d -m0755 ${D}${mandir}/man1
    install -m0644 ncp.1 npush.1 ${D}${mandir}/man1
vs.
    install -D -m0644 ncp.1 ${D}${mandir}/man1/ncp.1
    install -D -m0644 npush.1 ${D}${mandir}/man1/npush.1

Cheers,
Andre'

#6 lore raw

Re: [meta-networking][PATCH 2/2 v2] ncp: add v1.2.4

Quoted 49 lines · André Draszik
Quoted 32 lines · Khem Raj
Quoted 30 lines · André Draszik
---
 meta-networking/recipes-support/ncp/ncp_1.2.4.bb | 32
++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 meta-networking/recipes-support/ncp/ncp_1.2.4.bb
meta- renamed from meta-networking/recipes-support/ncp/ncp_1.2.4.bb +0 -0

networking/recipes-support/ncp/ncp_1.2.4.bb
new file mode 100644
index 0000000..7bbaaad

meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +2 -0
@@ -0,0 +1,32 @@
+SUMMARY = "a fast file copy tool for LANs"
+DESCRIPTION = "ncp is a utility for copying files in a LAN. It has

absolutely no \

meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +5 -0
+security or integrity checking, no throttling, no features, except \
+one: you don't have to type the coordinates of your peer."
+HOMEPAGE = "http://www.fefe.de/ncp"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-

2.0;md5=801f80980d171dd6425610833a22dbe6"

meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +5 -0
+DEPENDS = "libowfat"
+
+SRC_URI = "https://dl.fefe.de/${BP}.tar.bz2"
+SRC_URI[md5sum] = "421c4855bd3148b7d0a4342942b4bf13"
+SRC_URI[sha256sum] =

"6cfa72edd5f7717bf7a4a93ccc74c4abd89892360e2e0bb095a73c24b9359b88" +

Quoted 8 lines
Quoted 6 lines
meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +4 -0
+EXTRA_OEMAKE = "\
+    DIET= \
+    DEBUG=nostrip \
+    CC='${CC}' CFLAGS='${CFLAGS} -I${STAGING_INCDIR}/libowfat'

LDFLAGS='${LDFLAGS}' \
+"

Is setting CC etc. on make cmdline really needed ?

Yes, the Makefile sets CC CFLAGS LDFLAGS excplicitly, so make doesn't inherit them from the environment variables, because OE doesn't pass the -e make flag anymore. https://www.gnu.org/software/make/manual/html_node/Enviro
nment.html#Environment

Quoted 1 line

may be just adding the -I flags to CPPFLAGS is enough ?

Quoted 8 lines

It doesn't respect CPPFLAGS, but an alternative would be:

EXTRA_OEMAKE = "\
    DIET= \
    DEBUG=nostrip \
    -e \

"
CFLAGS_append = " -I${STAGING_INCDIR}/libowfat"

Thats seems better.

Quoted 32 lines

I have no preference either way, but my original version makes it more obvious what we're after.

Quoted 15 lines

meta-networking/recipes-support/ncp/ncp_1.2.4.bb line 21

Quoted 3 lines
meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +3 -0
+
+do_install() {
+    install -d -m0755 ${D}${bindir}

not needed if you can just do

install -D -m 0755 ncp ${D}${bindir}/ncp

and avoid two calls to install ( one for dir and another for file )

Quoted 3 lines
meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +3 -0
+    install -d -m0755 ${D}${mandir}/man1
+
+    install -m0755 ncp ${D}${bindir}
Quoted 6 lines

meta-networking/recipes-support/ncp/ncp_1.2.4.bb line 28

Quoted 4 lines
meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +4 -0
+    ln -sf ncp ${D}${bindir}/npoll
+    ln -sf ncp ${D}${bindir}/npush
+
+    install -m0644 ncp.1 npush.1 ${D}${mandir}/man1

same here not needed.

Using -D that'd still need two calls, as multiple files are being copied and -D only allows you to specify one destination (I think). Not really gaining anything here. In addition, you have to specify the source filename multiple times (in src and destination).
This:

Quoted 5 lines
    install -d -m0755 ${D}${mandir}/man1
    install -m0644 ncp.1 npush.1 ${D}${mandir}/man1
vs.
    install -D -m0644 ncp.1 ${D}${mandir}/man1/ncp.1
    install -D -m0644 npush.1 ${D}${mandir}/man1/npush.1

but 4 install calls will be reduced to two.

Quoted 5 lines

Cheers,
Andre'

#7 lore raw

Re: [meta-networking][PATCH 2/2 v2] ncp: add v1.2.4

Quoted 57 lines · Khem Raj
Quoted 56 lines · André Draszik
Quoted 35 lines · Khem Raj
Quoted 33 lines · André Draszik

---
 meta-networking/recipes-support/ncp/ncp_1.2.4.bb | 32
++++++++++++++++++++++++

 1 file changed, 32 insertions(+)

 create mode 100644 meta-networking/recipes-support/ncp/ncp_1.2.4.bb

meta- renamed from meta-networking/recipes-support/ncp/ncp_1.2.4.bb +0 -0

networking/recipes-support/ncp/ncp_1.2.4.bb
new file mode 100644
index 0000000..7bbaaad

meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +2 -0
@@ -0,0 +1,32 @@
+SUMMARY = "a fast file copy tool for LANs"
+DESCRIPTION = "ncp is a utility for copying files in a LAN. It has

absolutely no \
+security or integrity checking, no throttling, no features, except \

meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +4 -0
+one: you don't have to type the coordinates of your peer."
+HOMEPAGE = "http://www.fefe.de/ncp"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-

licenses/GPL-
2.0;md5=801f80980d171dd6425610833a22dbe6"

meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +5 -0
+DEPENDS = "libowfat"
+
+SRC_URI = "https://dl.fefe.de/${BP}.tar.bz2"
+SRC_URI[md5sum] = "421c4855bd3148b7d0a4342942b4bf13"
+SRC_URI[sha256sum] =

"6cfa72edd5f7717bf7a4a93ccc74c4abd89892360e2e0bb095a73c24b9359b88" +

Quoted 8 lines
Quoted 6 lines

+EXTRA_OEMAKE = "\
+    DIET= \
+    DEBUG=nostrip \
+    CC='${CC}' CFLAGS='${CFLAGS} -I${STAGING_INCDIR}/libowfat' LDFLAGS='${LDFLAGS}' \
+"

Is setting CC etc. on make cmdline really needed ?

Yes, the Makefile sets CC CFLAGS LDFLAGS excplicitly, so make doesn't inherit them from the environment variables, because OE doesn't pass the -e
make flag anymore. https://www.gnu.org/software/make/manual/html_node/En
viro
nment.html#Environment

Quoted 1 line

may be just adding the -I flags to CPPFLAGS is enough ?

It doesn't respect CPPFLAGS, but an alternative would be:

Quoted 8 lines
Quoted 6 lines

EXTRA_OEMAKE = "\
    DIET= \
    DEBUG=nostrip \
    -e \
"
CFLAGS_append = " -I${STAGING_INCDIR}/libowfat"

Thats seems better.

I am not sure I agree. This means one could accidentally override make variables. Being explicit as in the original version is more deterministic. Otherwise somebody would have to audit each recipe's makefile once a variable is added or removed from the bitbake environment. That doesn't scale. It would appear that the -e flag was removed from EXTRA_OEMAKE in rev aeb653861a0ec39ea7a014c0622980edcbf653fa for a similar reason... Even the make manual recommends against using -e.

Andre'

#8 lore raw

Re: [meta-networking][PATCH 2/2 v2] ncp: add v1.2.4

Quoted 67 lines · André Draszik
Quoted 57 lines · Khem Raj
Quoted 56 lines · André Draszik
Quoted 35 lines · Khem Raj
Quoted 33 lines · André Draszik
---
 meta-networking/recipes-support/ncp/ncp_1.2.4.bb | 32
++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 meta-networking/recipes-support/ncp/ncp_1.2.4.bb
meta- renamed from meta-networking/recipes-support/ncp/ncp_1.2.4.bb +0 -0

networking/recipes-support/ncp/ncp_1.2.4.bb
new file mode 100644
index 0000000..7bbaaad

meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +2 -0
@@ -0,0 +1,32 @@
+SUMMARY = "a fast file copy tool for LANs"
+DESCRIPTION = "ncp is a utility for copying files in a LAN. It has

absolutely no \
+security or integrity checking, no throttling, no features, except \

meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +4 -0
+one: you don't have to type the coordinates of your peer."
+HOMEPAGE = "http://www.fefe.de/ncp"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-

licenses/GPL-
2.0;md5=801f80980d171dd6425610833a22dbe6"

meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +5 -0
+DEPENDS = "libowfat"
+
+SRC_URI = "https://dl.fefe.de/${BP}.tar.bz2"
+SRC_URI[md5sum] = "421c4855bd3148b7d0a4342942b4bf13"
+SRC_URI[sha256sum] =

"6cfa72edd5f7717bf7a4a93ccc74c4abd89892360e2e0bb095a73c24b9359b88" +

Quoted 8 lines
Quoted 6 lines
meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +4 -0
+EXTRA_OEMAKE = "\
+    DIET= \
+    DEBUG=nostrip \
+    CC='${CC}' CFLAGS='${CFLAGS} -I${STAGING_INCDIR}/libowfat'

LDFLAGS='${LDFLAGS}' \
+"

Is setting CC etc. on make cmdline really needed ?

Yes, the Makefile sets CC CFLAGS LDFLAGS excplicitly, so make doesn't inherit them from the environment variables, because OE doesn't pass the -e
make flag anymore. https://www.gnu.org/software/make/manual/html_node/En
viro
nment.html#Environment

Quoted 1 line

may be just adding the -I flags to CPPFLAGS is enough ?

It doesn't respect CPPFLAGS, but an alternative would be:

Quoted 8 lines
Quoted 6 lines
EXTRA_OEMAKE = "\
    DIET= \
    DEBUG=nostrip \
    -e \

"
CFLAGS_append = " -I${STAGING_INCDIR}/libowfat"

Thats seems better.

Quoted 7 lines

I am not sure I agree. This means one could accidentally override make variables. Being explicit as in the original version is more deterministic. Otherwise somebody would have to audit each recipe's makefile once a variable is added or removed from the bitbake environment. That doesn't scale. It would appear that the -e flag was removed from EXTRA_OEMAKE in rev aeb653861a0ec39ea7a014c0622980edcbf653fa for a similar reason... Even the make manual recommends against using -e.

-e is bad for some reason It missed my eye last time so I agree on -e part my suggestion was mainly on CC and CFLAGS being passed in makefile options it seems the package Make infra needs a patch for this to work cleanly.

Quoted 4 lines

Andre'

#9 lore raw

PATCH v3 2/2 ncp: add v1.2.4

In reply to André Draszik
---
 meta-networking/recipes-support/ncp/ncp_1.2.4.bb | 31 ++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 meta-networking/recipes-support/ncp/ncp_1.2.4.bb
meta-networking/recipes-support/ncp/ncp_1.2.4.bb new file +31 -0
new file mode 100644
index 0000000..f42223b
@@ -0,0 +1,31 @@
+SUMMARY = "a fast file copy tool for LANs"
+DESCRIPTION = "ncp is a utility for copying files in a LAN. It has absolutely no \
+security or integrity checking, no throttling, no features, except \
+one: you don't have to type the coordinates of your peer."
+HOMEPAGE = "http://www.fefe.de/ncp"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+DEPENDS = "libowfat"
+
+SRC_URI = "https://dl.fefe.de/${BP}.tar.bz2"
+SRC_URI[md5sum] = "421c4855bd3148b7d0a4342942b4bf13"
+SRC_URI[sha256sum] = "6cfa72edd5f7717bf7a4a93ccc74c4abd89892360e2e0bb095a73c24b9359b88"
+
+EXTRA_OEMAKE = "\
+    DIET= \
+    DEBUG=nostrip \
+    CC='${CC}' CFLAGS='${CFLAGS} -I${STAGING_INCDIR}/libowfat' LDFLAGS='${LDFLAGS}' \
+"
+
+do_install() {
+    install -d -m0755 ${D}${bindir} ${D}${mandir}/man1
+
+    install -m0755 ncp ${D}${bindir}
+    ln -sf ncp ${D}${bindir}/npoll
+    ln -sf ncp ${D}${bindir}/npush
+
+    install -m0644 ncp.1 npush.1 ${D}${mandir}/man1
+    ln -sf npush.1 ${D}${mandir}/man1/npoll.1
+}
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.10.2
#10 lore raw
In reply to André Draszik
Quoted 4 lines · André Draszik

"ncp" is a utility for copying files in a LAN. It has absolutely no security or integrity checking, no throttling, no features, except one:
  you don't have to type the coordinates of your peer.

Hm, hold on. Something went wrong along the way. I can't actually install it anymore:

root@poky:~# opkg update
Package ncp-dbg version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp-dev version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp-doc version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp version 1.2.4-r0 has no valid architecture, ignoring.
root@poky:~# opkg install ncp
Package ncp-dbg version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp-dev version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp-doc version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp version 1.2.4-r0 has no valid architecture, ignoring.
Collected errors:
 * opkg_prepare_url_for_install: Couldn't find anything to satisfy 'ncp'.

a.

#11 lore raw

\n in DESCRIPTION creates invalid (ipk) packages? (was: Re: [oe][meta-networking][PATCH 0/2] ncp - a fast file copy tool for LANs)

Quoted 16 lines · André Draszik
Quoted 4 lines · André Draszik

"ncp" is a utility for copying files in a LAN. It has absolutely no security or integrity checking, no throttling, no features, except one:
  you don't have to type the coordinates of your peer.

Hm, hold on. Something went wrong along the way. I can't actually install it
anymore:

root@poky:~# opkg update
Package ncp-dbg version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp-dev version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp-doc version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp version 1.2.4-r0 has no valid architecture, ignoring.
Quoted 7 lines
root@poky:~# opkg install ncp
Package ncp-dbg version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp-dev version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp-doc version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp version 1.2.4-r0 has no valid architecture, ignoring.
Collected errors:
 * opkg_prepare_url_for_install: Couldn't find anything to satisfy 'ncp'.

It looks like this was caused by additional \n in the DESCRIPTION string. Is it expected that those cause the packaging process to create apparently invalid ipk packages?

Cheers,
Andre'

#12 lore raw

Re: \n in DESCRIPTION creates invalid (ipk) packages? (was: Re: [oe][meta-networking][PATCH 0/2] ncp - a fast file copy tool for LANs)

Quoted 25 lines · André Draszik
Quoted 16 lines · André Draszik
Quoted 4 lines · André Draszik

"ncp" is a utility for copying files in a LAN. It has absolutely no security or integrity checking, no throttling, no features, except one:
  you don't have to type the coordinates of your peer.

Hm, hold on. Something went wrong along the way. I can't actually install it
anymore:

root@poky:~# opkg update
Package ncp-dbg version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp-dev version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp-doc version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp version 1.2.4-r0 has no valid architecture, ignoring.
Quoted 7 lines
root@poky:~# opkg install ncp
Package ncp-dbg version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp-dev version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp-doc version 1.2.4-r0 has no valid architecture, ignoring.
Package ncp version 1.2.4-r0 has no valid architecture, ignoring.
Collected errors:
 * opkg_prepare_url_for_install: Couldn't find anything to satisfy 'ncp'.
Quoted 3 lines

It looks like this was caused by additional \n in the DESCRIPTION string. Is it expected that those cause the packaging process to create apparently invalid ipk packages?

Was the \n at the end of DESCRIPTION?
If it leads into empty line in status file, then it's considered separator for next package, see:
http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/commit/?id=7f0a7976c29b34feaf4f6b00f0a63626614d1c7d

Quoted 12 lines

Cheers,
Andre'

Signature · 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]