This commit is contained in:
TriForceX
2019-09-25 20:51:37 -03:00
commit 6203ff3e7c
11215 changed files with 428258 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
rename err() function to avoid clashing with err() form C library
err() is a function available in the C library, so when static linking,
there is a clash at link timebecause the function is provided both by
nbd and the C library:
http://autobuild.buildroot.org/results/aa8/aa8a1ac35a93e1c8b9fddbc2b5d66ecaa921f31e/build-end.log
Fix that by renaming err() to nbd_err() and providing a small maco
wrapper to avoid touching the many call sites.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Upstream status: hack, not submitted.
diff -durN nbd-3.11.orig/cliserv.h nbd-3.11/cliserv.h
--- nbd-3.11.orig/cliserv.h 2015-05-25 12:27:56.000000000 +0200
+++ nbd-3.11/cliserv.h 2015-08-13 19:28:21.609467505 +0200
@@ -75,7 +75,8 @@
void setmysockopt(int sock);
void err_nonfatal(const char *s);
-void err(const char *s) G_GNUC_NORETURN;
+void nbd_err(const char *s) G_GNUC_NORETURN;
+#define err(S) nbd_err(S)
void logging(const char* name);

35
package/nbd/Config.in Normal file
View File

@@ -0,0 +1,35 @@
config BR2_PACKAGE_NBD
bool "nbd"
depends on BR2_USE_WCHAR
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_MMU
select BR2_PACKAGE_LIBGLIB2
help
NBD is a set of utilities to configure network block devices,
allowing access to remote block devices over TCP/IP network.
http://nbd.sf.net/
if BR2_PACKAGE_NBD
config BR2_PACKAGE_NBD_CLIENT
bool "nbd client"
default y
help
The client part of NBD.
config BR2_PACKAGE_NBD_SERVER
bool "nbd server"
help
The server part of NBD.
config BR2_PACKAGE_NBD_TRDUMP
bool "nbd trdump"
help
Utility to dump server logs in human-readable form.
endif
comment "nbd needs a toolchain w/ wchar, threads"
depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS

7
package/nbd/nbd.hash Normal file
View File

@@ -0,0 +1,7 @@
# From http://sourceforge.net/projects/nbd/files/nbd/3.19/
md5 162da84302abb5b9be06143c7943a642 nbd-3.19.tar.xz
sha1 97edd98f7323a2fcd0dcf441f307d348cdbbb807 nbd-3.19.tar.xz
# Locally calculated
sha256 b4466412f13e057659f25d35e1e8e181afd62c7179bff22a6add81445ecb8690 nbd-3.19.tar.xz
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING

37
package/nbd/nbd.mk Normal file
View File

@@ -0,0 +1,37 @@
################################################################################
#
# nbd
#
################################################################################
NBD_VERSION = 3.19
NBD_SOURCE = nbd-$(NBD_VERSION).tar.xz
NBD_SITE = http://downloads.sourceforge.net/project/nbd/nbd/$(NBD_VERSION)
NBD_CONF_OPTS = --enable-lfs
NBD_DEPENDENCIES = libglib2
NBD_LICENSE = GPL-2.0
NBD_LICENSE_FILES = COPYING
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
# We have linux/falloc.h
# but uClibc lacks fallocate(2) which is a glibc-ism
NBD_CONF_ENV = ac_cv_header_linux_falloc_h=no
endif
ifneq ($(BR2_PACKAGE_NBD_CLIENT),y)
NBD_TOREMOVE += /usr/sbin/nbd-client
endif
ifneq ($(BR2_PACKAGE_NBD_SERVER),y)
NBD_TOREMOVE += /usr/bin/nbd-server
endif
ifneq ($(BR2_PACKAGE_NBD_TRDUMP),y)
NBD_TOREMOVE += /usr/bin/nbd-trdump
endif
define NBD_CLEANUP_AFTER_INSTALL
rm -f $(addprefix $(TARGET_DIR), $(NBD_TOREMOVE))
endef
NBD_POST_INSTALL_TARGET_HOOKS += NBD_CLEANUP_AFTER_INSTALL
$(eval $(autotools-package))