Skip to contentSkip to conversation

quotatool: new package

PATCH New Peter Seiderer 3 participants 3 messages Feb 3, 2018 – Apr 1, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 quotatool: new package

---
 DEVELOPERS                                         |  1 +
 package/Config.in                                  |  1 +
 ...x-missing-__P-definition-for-musl-compile.patch | 36 ++++++++++++++++++++++
 package/quotatool/Config.in                        |  7 +++++
 package/quotatool/quotatool.hash                   |  5 +++
 package/quotatool/quotatool.mk                     | 18 +++++++++++
 6 files changed, 68 insertions(+)
 create mode 100644 package/quotatool/0001-fix-missing-__P-definition-for-musl-compile.patch
 create mode 100644 package/quotatool/Config.in
 create mode 100644 package/quotatool/quotatool.hash
 create mode 100644 package/quotatool/quotatool.mk
DEVELOPERS +1 -0
index 9048d45b16..40b9590ca1 100644
@@ -1376,6 +1376,7 @@ F:	package/libevdev/
 F:	package/log4cplus/
 F:	package/postgresql/
 F:	package/qt5/
+F:	package/quotatool/
 F:	package/racehound/
 F:	package/wiringpi/
 
package/Config.in +1 -0
index 9a6b199f40..8aa1126934 100644
@@ -1971,6 +1971,7 @@ menu "System tools"
 	source "package/psmisc/Config.in"
 	source "package/pwgen/Config.in"
 	source "package/quota/Config.in"
+	source "package/quotatool/Config.in"
 	source "package/rauc/Config.in"
 	source "package/rsyslog/Config.in"
 	source "package/runc/Config.in"
package/quotatool/0001-fix-missing-__P-definition-for-musl-compile.patch new file +36 -0
new file mode 100644
index 0000000000..927e62ba8c
@@ -0,0 +1,36 @@
+From 0e096badc901f755f3bcefabdc57091725a5a0c5 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Thu, 1 Feb 2018 23:50:43 +0100
+Subject: [PATCH] fix missing __P definition for musl compile
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+
+  In file included from src/quota.h:40:0,
+                   from src/parse.c:26:
+  src/linux/linux_quota.h:120:15: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?__P?
+   long quotactl __P((int, const char *, qid_t, caddr_t));
+                 ^~~
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ src/linux/linux_quota.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/linux/linux_quota.h b/src/linux/linux_quota.h
+index 11f9871..2b29a89 100644
+--- a/src/linux/linux_quota.h
++++ b/src/linux/linux_quota.h
+@@ -14,6 +14,7 @@
+ #ifndef LINUX_QUOTA_H
+ #define LINUX_QUOTA_H
+ 
++#include <sys/cdefs.h>
+ #include <sys/types.h>
+ #include "system.h"
+ 
+-- 
+2.16.1
+
package/quotatool/Config.in new file +7 -0
new file mode 100644
index 0000000000..4015cef6c8
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_QUOTATOOL
+	bool "quotatool"
+	help
+	  Quotatool is a utility to manipulate filesystem quotas from
+	  the commandline.
+
+	  http://quotatool.ekenberg.se/
package/quotatool/quotatool.hash new file +5 -0
new file mode 100644
index 0000000000..45b477830e
@@ -0,0 +1,5 @@
+# Locally computed
+sha256 e53adc480d54ae873d160dc0e88d78095f95d9131e528749fd982245513ea090 quotatool-1.6.2.tar.gz
+
+# Hash for license files:
+sha256 94686eeb98a40edc64106c6f8644068d8a08816a510a3cde75e50f1bf470564d COPYING
package/quotatool/quotatool.mk new file +18 -0
new file mode 100644
index 0000000000..ddff036264
@@ -0,0 +1,18 @@
+################################################################################
+#
+# quotatool
+#
+################################################################################
+
+QUOTATOOL_VERSION = 1.6.2
+QUOTATOOL_SITE = http://quotatool.ekenberg.se
+QUOTATOOL_LICENSE = GPL-2.0
+QUOTATOOL_LICENSE_FILES = COPYING
+
+define QUOTATOOL_PRE_INSTALL_FIXUP
+	mkdir -p $(TARGET_DIR)/usr/share/man/man8
+endef
+
+QUOTATOOL_PRE_INSTALL_TARGET_HOOKS += QUOTATOOL_PRE_INSTALL_FIXUP
+
+$(eval $(autotools-package))
Signature · 1 line
2.16.1
#1 lore raw

PATCH 1/1 quotatool: new package

Hi Peter,

Le 03/02/2018 ? 23:07, Peter Seiderer a ?crit?:

Quoted 64 lines
---
 DEVELOPERS                                         |  1 +
 package/Config.in                                  |  1 +
 ...x-missing-__P-definition-for-musl-compile.patch | 36 ++++++++++++++++++++++
 package/quotatool/Config.in                        |  7 +++++
 package/quotatool/quotatool.hash                   |  5 +++
 package/quotatool/quotatool.mk                     | 18 +++++++++++
 6 files changed, 68 insertions(+)
 create mode 100644 package/quotatool/0001-fix-missing-__P-definition-for-musl-compile.patch
 create mode 100644 package/quotatool/Config.in
 create mode 100644 package/quotatool/quotatool.hash
 create mode 100644 package/quotatool/quotatool.mk
DEVELOPERS +1 -0
index 9048d45b16..40b9590ca1 100644
@@ -1376,6 +1376,7 @@ F:	package/libevdev/
 F:	package/log4cplus/
 F:	package/postgresql/
 F:	package/qt5/
+F:	package/quotatool/
 F:	package/racehound/
 F:	package/wiringpi/
 
package/Config.in +1 -0
index 9a6b199f40..8aa1126934 100644
@@ -1971,6 +1971,7 @@ menu "System tools"
 	source "package/psmisc/Config.in"
 	source "package/pwgen/Config.in"
 	source "package/quota/Config.in"
+	source "package/quotatool/Config.in"
 	source "package/rauc/Config.in"
 	source "package/rsyslog/Config.in"
 	source "package/runc/Config.in"
package/quotatool/0001-fix-missing-__P-definition-for-musl-compile.patch new file +20 -0
new file mode 100644
index 0000000000..927e62ba8c
@@ -0,0 +1,36 @@
+From 0e096badc901f755f3bcefabdc57091725a5a0c5 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Thu, 1 Feb 2018 23:50:43 +0100
+Subject: [PATCH] fix missing __P definition for musl compile
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+
+  In file included from src/quota.h:40:0,
+                   from src/parse.c:26:
+  src/linux/linux_quota.h:120:15: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?__P?
+   long quotactl __P((int, const char *, qid_t, caddr_t));
+                 ^~~
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ src/linux/linux_quota.h | 1 +
+ 1 file changed, 1 insertion(+)

package/quotatool/0001-fix-missing-__P-definition-for-musl-compile.patch line 30

Quoted 10 lines
package/quotatool/0001-fix-missing-__P-definition-for-musl-compile.patch new file +10 -0
+
+diff --git a/src/linux/linux_quota.h b/src/linux/linux_quota.h
+index 11f9871..2b29a89 100644
+--- a/src/linux/linux_quota.h
++++ b/src/linux/linux_quota.h
+@@ -14,6 +14,7 @@
+ #ifndef LINUX_QUOTA_H
+ #define LINUX_QUOTA_H
+ 
++#include <sys/cdefs.h>

Note that cdefs.h file is provided by musl-compat-headers package.

"__P() is used for compatibility with old K&R C compilers. With ANSI C this macro has no effect."

Since there is only one "__P" in the code, it's easier to remove it?

Quoted 42 lines
package/quotatool/0001-fix-missing-__P-definition-for-musl-compile.patch new file +6 -0
+ #include <sys/types.h>
+ #include "system.h"
+ 
+-- 
+2.16.1
+
package/quotatool/Config.in new file +7 -0
new file mode 100644
index 0000000000..4015cef6c8
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_QUOTATOOL
+	bool "quotatool"
+	help
+	  Quotatool is a utility to manipulate filesystem quotas from
+	  the commandline.
+
+	  http://quotatool.ekenberg.se/
package/quotatool/quotatool.hash new file +5 -0
new file mode 100644
index 0000000000..45b477830e
@@ -0,0 +1,5 @@
+# Locally computed
+sha256 e53adc480d54ae873d160dc0e88d78095f95d9131e528749fd982245513ea090 quotatool-1.6.2.tar.gz
+
+# Hash for license files:
+sha256 94686eeb98a40edc64106c6f8644068d8a08816a510a3cde75e50f1bf470564d COPYING
package/quotatool/quotatool.mk new file +6 -0
new file mode 100644
index 0000000000..ddff036264
@@ -0,0 +1,18 @@
+################################################################################
+#
+# quotatool
+#
+################################################################################
+

package/quotatool/quotatool.mk line 16

Quoted 10 lines
package/quotatool/quotatool.mk new file +10 -0
+QUOTATOOL_VERSION = 1.6.2
+QUOTATOOL_SITE = http://quotatool.ekenberg.se
+QUOTATOOL_LICENSE = GPL-2.0
+QUOTATOOL_LICENSE_FILES = COPYING
+
+define QUOTATOOL_PRE_INSTALL_FIXUP
+	mkdir -p $(TARGET_DIR)/usr/share/man/man8
+endef
+
+QUOTATOOL_PRE_INSTALL_TARGET_HOOKS += QUOTATOOL_PRE_INSTALL_FIXUP

It look weird to create /usr/share/man/man8 in TARGET_DIR, another solution would be redefine QUOTATOOL_INSTALL_TARGET_OPTS to override "men" variable during install.

QUOTATOOL_INSTALL_TARGET_OPTS += DESTDIR=$(TARGET_DIR) install men=""

Best regards,
Romain

Quoted 3 lines
package/quotatool/quotatool.mk new file +2 -0
+
+$(eval $(autotools-package))
#2 lore raw

PATCH 1/1 quotatool: new package

In reply to Peter Seiderer

Hello,

Quoted 13 lines · Peter Seiderer
---
 DEVELOPERS                                         |  1 +
 package/Config.in                                  |  1 +
 ...x-missing-__P-definition-for-musl-compile.patch | 36 ++++++++++++++++++++++
 package/quotatool/Config.in                        |  7 +++++
 package/quotatool/quotatool.hash                   |  5 +++
 package/quotatool/quotatool.mk                     | 18 +++++++++++
 6 files changed, 68 insertions(+)
 create mode 100644 package/quotatool/0001-fix-missing-__P-definition-for-musl-compile.patch
 create mode 100644 package/quotatool/Config.in
 create mode 100644 package/quotatool/quotatool.hash
 create mode 100644 package/quotatool/quotatool.mk

Applied to master with the change to use QUOTATOOL_INSTALL_TARGET_OPTS, as suggested by Romain.

Romain also suggested to remove __P instead of using <sys/cdefs.h>, but since it would result in a patch of the same size, I was too lazy to change to removing __P. The fact that upstream hasn't committed anything since 2013 is also not very encouraging in terms of getting patches accepted. So I've kept your patch as-is.

Thanks!

Thomas

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