Skip to contentSkip to conversation

package/quota: bump to version 4.05

PATCH New Fabrice Fontaine 2 participants 3 messages Mar 29, 2019 – Mar 31, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/quota: bump to version 4.05

- Add COPYING and its hash to license files
- Drop all patches (not needed anymore or already in version)
- Drop autoreconf
- Drop --disable-strip-binaries (not available anymore)
- Drop all "hacks" as package now use pkg-config and automake

---
 package/quota/0001-tools-getrpcbynumber.patch |  42 ----
 package/quota/0002-fix-static-linking.patch   |  55 -----
 .../quota/0003-remove-non-posix-types.patch   | 200 ------------------
 package/quota/0004-import-sys-cdefs.patch     |  18 --
 package/quota/0005-include-fcntl.patch        |  20 --
 package/quota/quota.hash                      |  10 +-
 package/quota/quota.mk                        |  25 +--
 7 files changed, 11 insertions(+), 359 deletions(-)
 delete mode 100644 package/quota/0001-tools-getrpcbynumber.patch
 delete mode 100644 package/quota/0002-fix-static-linking.patch
 delete mode 100644 package/quota/0003-remove-non-posix-types.patch
 delete mode 100644 package/quota/0004-import-sys-cdefs.patch
 delete mode 100644 package/quota/0005-include-fcntl.patch
package/quota/0001-tools-getrpcbynumber.patch deleted +0 -42
deleted file mode 100644
index 899db914f0..0000000000
@@ -1,42 +0,0 @@
-allow usage of getrpcbynumber() instead of getrpcbynumber_r()
-
-libtirpc does not implement the reentrant function getrpcbynumber_r(),
-so allow quota to use the non-reentrant version getrpcbynumber(). This
-should not be a problem as quota tools are not multi-threaded.
-
-Signed-off-by: Thomas Petazzoni <[email protected]>
-
-Index: b/configure.in
-===================================================================
---- a/configure.in
-+++ b/configure.in
-@@ -182,6 +182,12 @@
- AC_C_CONST
- AC_C_INLINE
- 
-+AC_CHECK_FUNCS([getrpcbynumber getrpcbynumber_r])
-+
-+if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then
-+   AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available])
-+fi
-+
- AC_ARG_ENABLE(rpc,
- 	[  --enable-rpc=[yes/no]           Enable RPC support [default=yes].],
- 	,
-Index: b/svc_socket.c
-===================================================================
---- a/svc_socket.c
-+++ b/svc_socket.c
-@@ -55,7 +55,12 @@
- 	addr.sin_family = AF_INET;
- 
- 	if (!port) {
-+#if HAVE_GETRPCBYNUMBER_R
- 		ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof(rpcdata), &rpcp);
-+#else
-+		rpcp = getrpcbynumber(number);
-+		ret = 0;
-+#endif
- 		if (ret == 0 && rpcp != NULL) {
- 			/* First try name */
- 			ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,
package/quota/0002-fix-static-linking.patch deleted +0 -55

55 lines not on this page · raw message

package/quota/0003-remove-non-posix-types.patch deleted +0 -200

200 lines not on this page · raw message

package/quota/0004-import-sys-cdefs.patch deleted +0 -18
deleted file mode 100644
index 9acd1fe4f9..0000000000
@@ -1,18 +0,0 @@
-Add missing <sys/cdefs.h> include
-
-quota.h uses the __P definition, so it must include <sys/cdefs.h>.
-
-Signed-off-by: Thomas Petazzoni <[email protected]>
-
-Index: b/quota.h
-===================================================================
---- a/quota.h
-+++ b/quota.h
-@@ -2,6 +2,7 @@
- #define GUARD_QUOTA_H
- 
- #include <sys/types.h>
-+#include <sys/cdefs.h>
- 
- typedef u_int32_t qid_t;	/* Type in which we store ids in memory */
- typedef int64_t qsize_t;	/* Type in which we store size limitations */
package/quota/0005-include-fcntl.patch deleted +0 -20
deleted file mode 100644
index fe7ea98831..0000000000
@@ -1,20 +0,0 @@
-Include <fcntl.h> to get loff_t definition
-
-Fixes the following build issue with musl:
-
-dqblk_v2.h:32:2: error: unknown type name ?loff_t?
-
-Signed-off-by: Thomas Petazzoni <[email protected]>
-
-Index: b/dqblk_v2.h
-===================================================================
---- a/dqblk_v2.h
-+++ b/dqblk_v2.h
-@@ -8,6 +8,7 @@
- #define GUARD_DQBLK_V2_H
- 
- #include <sys/types.h>
-+#include <fcntl.h>
- #include "quota_tree.h"
- 
- #define Q_V2_GETQUOTA	0x0D00	/* Get limits and usage */
package/quota/quota.hash +7 -3
index 5e49693646..dc58b2842c 100644
@@ -1,3 +1,7 @@
-# From http://sourceforge.net/projects/linuxquota/files/quota-tools/4.01/ (click on info button)
-md5	5c2c31e321d2e1322ce12d69ae5c66d6	quota-4.01.tar.gz
-sha1	64d2ab8b039cfea1aa4bd9e77e8c373488a7f0bf	quota-4.01.tar.gz
+# From http://sourceforge.net/projects/linuxquota/files/quota-tools/4.05/ (click on info button)
+md5	1c1dbd2cd3d680ccac661239b067e147	quota-4.05.tar.gz
+sha1	d23711f3b204e0a86b8378c32545c95fb149168d	quota-4.05.tar.gz
+
+#?Locally calculated
+sha256	ef3b5b5d1014ed1344b46c1826145e20cbef8db967b522403c9a060761cf7ab9	quota-4.05.tar.gz
+sha256	35b2d9797b83bce16076da9c3273f264f50b8d02f492ee32cd4c51ba6897bceb	COPYING
package/quota/quota.mk +4 -21
index 38e18a60c2..46ef243ecc 100644
@@ -4,41 +4,24 @@
 #
 ################################################################################
 
-QUOTA_VERSION = 4.01
+QUOTA_VERSION = 4.05
 QUOTA_SITE = http://downloads.sourceforge.net/project/linuxquota/quota-tools/$(QUOTA_VERSION)
 QUOTA_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES) host-nfs-utils
-QUOTA_AUTORECONF = YES
 QUOTA_LICENSE = GPL-2.0+
-QUOTA_CONF_OPTS = --disable-strip-binaries
+QUOTA_LICENSE_FILES = COPYING
 QUOTA_LIBS = $(TARGET_NLS_LIBS)
 
-QUOTA_CFLAGS = $(TARGET_CFLAGS)
-
 ifeq ($(BR2_PACKAGE_E2FSPROGS),y)
-QUOTA_DEPENDENCIES += e2fsprogs
+QUOTA_DEPENDENCIES += host-pkgconf e2fsprogs
 QUOTA_CONF_OPTS += --enable-ext2direct
-# quote does not use pkg-config to find e2fsprogs, so it does not know it
-# may require -pthreads in case of static build
-ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
-QUOTA_LIBS += -pthread
-endif
 else
 QUOTA_CONF_OPTS += --disable-ext2direct
 endif
 
 ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
 QUOTA_DEPENDENCIES += libtirpc host-pkgconf
-QUOTA_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`
-QUOTA_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`
 endif
 
-QUOTA_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) CFLAGS="$(QUOTA_CFLAGS) -D_GNU_SOURCE" LIBS="$(QUOTA_LIBS)"
-QUOTA_CONF_ENV = \
-	CFLAGS="$(QUOTA_CFLAGS) -D_GNU_SOURCE" LIBS="$(QUOTA_LIBS)"
-
-# Package uses autoconf but not automake.
-QUOTA_INSTALL_TARGET_OPTS = \
-	ROOTDIR=$(TARGET_DIR) \
-	install
+QUOTA_CONF_ENV = LIBS="$(QUOTA_LIBS)"
 
 $(eval $(autotools-package))
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 package/quota: add optional netlink dependency

---
 package/quota/quota.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/quota/quota.mk +7 -0
index 46ef243ecc..836baf6071 100644
@@ -11,6 +11,13 @@ QUOTA_LICENSE = GPL-2.0+
 QUOTA_LICENSE_FILES = COPYING
 QUOTA_LIBS = $(TARGET_NLS_LIBS)
 
+ifeq ($(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_LIBNL),yy)
+QUOTA_DEPENDENCIES += host-pkgconf dbus libnl
+QUOTA_CONF_OTS += --enable-netlink
+else
+QUOTA_CONF_OPTS += --disable-netlink
+endif
+
 ifeq ($(BR2_PACKAGE_E2FSPROGS),y)
 QUOTA_DEPENDENCIES += host-pkgconf e2fsprogs
 QUOTA_CONF_OPTS += --enable-ext2direct
Signature · 1 line
2.20.1
#2 lore raw

PATCH 1/2 package/quota: bump to version 4.05

In reply to Fabrice Fontaine
Quoted 7 lines · On Fri, 29 Mar 2019 18:25:27 +0100 Fabrice Fontaine…

- Add COPYING and its hash to license files
- Drop all patches (not needed anymore or already in version)
- Drop autoreconf
- Drop --disable-strip-binaries (not available anymore)
- Drop all "hacks" as package now use pkg-config and automake

Quoted 14 lines
---
 package/quota/0001-tools-getrpcbynumber.patch |  42 ----
 package/quota/0002-fix-static-linking.patch   |  55 -----
 .../quota/0003-remove-non-posix-types.patch   | 200 ------------------
 package/quota/0004-import-sys-cdefs.patch     |  18 --
 package/quota/0005-include-fcntl.patch        |  20 --
 package/quota/quota.hash                      |  10 +-
 package/quota/quota.mk                        |  25 +--
 7 files changed, 11 insertions(+), 359 deletions(-)
 delete mode 100644 package/quota/0001-tools-getrpcbynumber.patch
 delete mode 100644 package/quota/0002-fix-static-linking.patch
 delete mode 100644 package/quota/0003-remove-non-posix-types.patch
 delete mode 100644 package/quota/0004-import-sys-cdefs.patch
 delete mode 100644 package/quota/0005-include-fcntl.patch

Both applied, thanks!

I think the QUOTA_LIBS stuff with TARGET_NLS_LIBS could be removed by patching quota's Makefile.am to properly use $(INTLLIBS). Perhaps this could be a useful contribution to upstream.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com