Update nfs support and add libtirpc to base
authorRISCi_ATOM <bob@bobcall.me>
Sat, 29 Jun 2019 17:22:25 +0000 (13:22 -0400)
committerRISCi_ATOM <bob@bobcall.me>
Sat, 29 Jun 2019 17:22:25 +0000 (13:22 -0400)
package/libs/libtirpc/Makefile [new file with mode: 0644]
package/libs/libtirpc/patches/001-musl.patch [new file with mode: 0644]
package/network/services/nfs-kernel-server/Makefile

diff --git a/package/libs/libtirpc/Makefile b/package/libs/libtirpc/Makefile
new file mode 100644 (file)
index 0000000..84c5f2b
--- /dev/null
@@ -0,0 +1,60 @@
+# 
+# Copyright (C) 2006-2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libtirpc
+PKG_VERSION:=1.1.4
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://librecmc.org/librecmc/downloads/sources/v1.4
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_HASH:=2ca529f02292e10c158562295a1ffd95d2ce8af97820e3534fe1b0e3aec7561d
+
+PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_FIXUP:=autoreconf
+PKG_REMOVE_FILES:=autogen.sh aclocal.m4
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+define Package/libtirpc
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Library TI RPC for RPC bindings
+  URL:=http://libtirpc.sourceforge.net/
+  DEPENDS:=+libpthread
+endef
+
+CONFIGURE_ARGS += --disable-gssapi
+HOST_CONFIGURE_ARGS += --disable-gssapi
+
+TARGET_CFLAGS += -DGQ
+HOST_CFLAGS += -DGQ
+
+define Package/libtirpc/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtirpc.so* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/netconfig $(1)/etc/
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtirpc.{a,so*} $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include
+       $(SED) 's,/usr,${STAGING_DIR}/usr,g' $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtirpc.pc
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtirpc.pc $(1)/usr/lib/pkgconfig/libtirpc.pc
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,libtirpc))
diff --git a/package/libs/libtirpc/patches/001-musl.patch b/package/libs/libtirpc/patches/001-musl.patch
new file mode 100644 (file)
index 0000000..0c3ce60
--- /dev/null
@@ -0,0 +1,18 @@
+Consider musl provided built-in defines
+
+Helps compile libtirpc with musl
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- ./tirpc/rpc/types.h.orig   2018-03-17 10:23:10.022055255 +0100
++++ ./tirpc/rpc/types.h        2018-03-17 10:23:30.877751656 +0100
+@@ -66,7 +66,7 @@
+ #define mem_free(ptr, bsize)  free(ptr)
+-#if defined __APPLE_CC__ || defined __FreeBSD__
++#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined(__GLIBC__)
+ # define __u_char_defined
+ # define __daddr_t_defined
+ #endif
index 127a3f692cfc143dcc9b8b03a63737495eb60cc3..da41d9a99dc418d51c088d93f84e3cc3fb3387ea 100644 (file)
@@ -7,11 +7,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nfs-kernel-server
-PKG_VERSION:=2.3.1
-PKG_RELEASE:=1
-PKG_HASH:=245ec2f9abb51bcc233b64f6f3e9ac8e5cd16ffd35dba9450f83ce2803844cda
+PKG_VERSION:=2.3.3
+PKG_RELEASE:=3
+PKG_HASH:=3c8c63611c7e78b7a3b2f8a28b9928a5b5e66d5e9ad09a1e54681508884320a4
 
-PKG_SOURCE_URL:=@SF/nfs
+PKG_SOURCE_URL:=https://librecmc.org/librecmc/downloads/sources/v1.4
 PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.xz
 
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/nfs-utils-$(PKG_VERSION)
@@ -19,6 +19,8 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION)
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 PKG_BUILD_DEPENDS:=$(PKG_NAME)/host
+HOST_BUILD_DEPENDS:=libtirpc/host
+PKG_CONFIG_DEPENDS:= CONFIG_IPV6
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
@@ -27,7 +29,7 @@ define Package/nfs-kernel-server/Default
   SECTION:=net
   CATEGORY:=Network
   SUBMENU:=Filesystem
-  DEPENDS:=+libwrap +libblkid +libuuid $(LIBRPC_DEPENDS)
+  DEPENDS:=+libwrap +libblkid +libuuid +libtirpc
   URL:=http://nfs.sourceforge.net/
   MAINTAINER:=Peter Wagner <tripolar@gmx.at>
 endef
@@ -60,7 +62,7 @@ define Package/nfs-utils
   $(call Package/nfs-kernel-server/Default)
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS+= +libevent2 +USE_UCLIBC:librpc
+  DEPENDS+= +libevent2
   TITLE:=updated mount utility (includes nfs4)
 endef
 
@@ -68,25 +70,32 @@ define Package/nfs-utils/description
   Updated mount.nfs command - allows mounting nfs4 volumes
 endef
 
-TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib -I$(STAGING_DIR)/usr/include/libevent \
-                -I$(STAGING_DIR)/usr/include/ -Drpc_uint=uint
-TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(LIBRPC) \
+TARGET_CFLAGS += -Wno-error=implicit-function-declaration \
+                -Wno-error=strict-prototypes \
+                -Wno-error=incompatible-pointer-types \
+                -Wno-error=format-security \
+                -Wno-error=undef \
+                -Wno-error=missing-include-dirs
+
+TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
                  -L$(STAGING_DIR)/usr/lib/libevent
 
 CONFIGURE_ARGS += \
        --disable-gss \
        --disable-nfsv4 \
        --disable-nfsv41 \
-       --disable-ipv6 \
        --enable-static \
        --enable-shared \
-       --disable-caps \
-       --disable-tirpc \
-       --disable-nfsdcld
+       --disable-caps
+
+ifeq ($(CONFIG_IPV6),n)
+CONFIGURE_ARGS += --disable-ipv6
+endif
 
 CONFIGURE_VARS += \
        libblkid_cv_is_recent=yes \
        ac_cv_lib_resolv___res_querydomain=yes \
+       ac_cv_lib_bsd_daemon=no \
        CONFIG_SQLITE3_TRUE="\#" \
        CONFIG_NFSDCLD_TRUE="\#"
 
@@ -97,14 +106,13 @@ MAKE_FLAGS += \
        RPCGEN_PATH=$(STAGING_DIR_HOSTPKG)/bin/rpcgen \
        RPCGEN=$(STAGING_DIR_HOSTPKG)/bin/rpcgen
 
-HOST_CFLAGS += -Dlinux
+HOST_CFLAGS += -Dlinux \
+       -Wno-error=missing-include-dirs
 
 HOST_CONFIGURE_ARGS += \
        --disable-gss \
        --disable-nfsv4 \
        --disable-nfsv41 \
-       --disable-ipv6 \
-       --disable-tirpc \
        --without-tcp-wrappers
 
 HOST_CONFIGURE_VARS += \
@@ -114,6 +122,7 @@ HOST_CONFIGURE_VARS += \
        ac_cv_header_event_h=yes \
        ac_cv_header_nfsidmap_h=yes \
        ac_cv_header_blkid_blkid_h=yes \
+       ac_cv_lib_resolv___res_querydomain=yes \
        GSSGLUE_CFLAGS=" " \
        GSSGLUE_LIBS=" " \
        RPCSECGSS_CFLAGS=" " \