Add quotatool package to Mariner (#6995)

This commit is contained in:
sindhu-karri 2023-12-15 17:15:08 +05:30 коммит произвёл GitHub
Родитель 4742b8bf0b
Коммит eb04937dc1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
10 изменённых файлов: 303 добавлений и 1 удалений

2
SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md сгенерированный

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1843,6 +1843,7 @@
"qt5-rpm-macros",
"quagga",
"quota",
"quotatool",
"radvd",
"ragel",
"raptor2",

Просмотреть файл

@ -0,0 +1,21 @@
From 09695c944947d804cbe3b5c7e2c854953984413e Mon Sep 17 00:00:00 2001
From: Bas Zoetekouw <bas.zoetekouw@surfnet.nl>
Date: Thu, 9 Aug 2018 22:17:22 +0200
Subject: [PATCH] fix implicit fallthrough
---
src/parse.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/parse.c b/src/parse.c
index c22654a..b59c931 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -268,6 +268,7 @@ argdata_t *parse_commandline (int argc, char **argv)
case '?':
output_error ("Unrecognized option: '%c'", optopt);
+ __attribute__ ((fallthrough));
default:
output_help();

Просмотреть файл

@ -0,0 +1,29 @@
From 58cdec3cdc6ae94864891a4e179ad68d4d136864 Mon Sep 17 00:00:00 2001
From: Bas Zoetekouw <bas.zoetekouw@surfnet.nl>
Date: Fri, 10 Aug 2018 12:59:20 +0200
Subject: [PATCH] Clearer error message if quota is off (see
https://bugs.debian.org/670642)
---
src/linux/quota.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/linux/quota.c b/src/linux/quota.c
index 362bf10..be569ff 100644
--- a/src/linux/quota.c
+++ b/src/linux/quota.c
@@ -531,7 +531,13 @@ int kern_quota_format(fs_t *fs, int q_type) {
retval = quotactl(QCMD(Q_GETFMT, q_type), fs->device, 0, (void *) &actfmt);
if (retval < 0) {
if (! QF_IS_XFS(quota_format)) {
- output_error("Error while detecting kernel quota version: %s\n", strerror(errno));
+ if (errno == 3) {
+ output_error("Quotatool cannot function while quotas are disabled. "
+ "Please enable quotas by running `quotaon -a`.\n");
+ }
+ else {
+ output_error("Error while detecting kernel quota version: %i, %s\n", errno, strerror(errno));
+ }
exit(ERR_SYS);
}
}

Просмотреть файл

@ -0,0 +1,38 @@
From ad6944baaa73cf6230f9a2bef2399b31c2130547 Mon Sep 17 00:00:00 2001
From: Bas Zoetekouw <bas.zoetekouw@surfnet.nl>
Date: Thu, 9 Aug 2018 22:11:58 +0200
Subject: [PATCH] fix compiler warnings
---
src/output.h | 4 ++--
src/quota.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/output.h b/src/output.h
index 5a3b640..429e053 100644
--- a/src/output.h
+++ b/src/output.h
@@ -17,8 +17,8 @@
extern int output_level;
-inline void output_version (void);
-inline void output_help (void);
+void output_version (void);
+void output_help (void);
void output_debug (const char *format, ...);
void output_info (const char *format, ...);
diff --git a/src/quota.h b/src/quota.h
index e783977..72b5f09 100644
--- a/src/quota.h
+++ b/src/quota.h
@@ -110,7 +110,7 @@ void quota_delete (quota_t *myquota);
int quota_get (quota_t *myquota);
int quota_set (quota_t *myquota);
-int xfs_reset_grace(quota_t *myquota, int grace_type);
+int quota_reset_grace(quota_t *myquota, int grace_type);
#endif /* INCLUDE_QUOTATOOL_QUOTA */

Просмотреть файл

@ -0,0 +1,55 @@
From af27842d1a6640d932407999ceec57f54a225a78 Mon Sep 17 00:00:00 2001
From: Johan Ekenberg <johan.ekenberg@gmail.com>
Date: Mon, 1 Apr 2019 13:19:08 +0200
Subject: [PATCH] Fix compiler warnings
__P() seems to not be used with modern compilers
Fix switch-case attribute fallthrough warning
---
src/linux/linux_quota.h | 15 +--------------
src/parse.c | 2 +-
2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/src/linux/linux_quota.h b/src/linux/linux_quota.h
index 11f9871..747aea7 100644
--- a/src/linux/linux_quota.h
+++ b/src/linux/linux_quota.h
@@ -117,7 +117,7 @@ struct if_dqinfo {
#endif
#endif
-long quotactl __P((int, const char *, qid_t, caddr_t));
+long quotactl (int, const char *, qid_t, caddr_t);
/*
* runtime detection of quota format
@@ -139,16 +139,3 @@ int kern_quota_format(fs_t *, int);
#include "xfs_quota.h"
#endif /* _QUOTA_ */
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/parse.c b/src/parse.c
index b59c931..9e5881b 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -268,7 +268,7 @@ argdata_t *parse_commandline (int argc, char **argv)
case '?':
output_error ("Unrecognized option: '%c'", optopt);
- __attribute__ ((fallthrough));
+ // fall through
default:
output_help();

Просмотреть файл

@ -0,0 +1,22 @@
From ca68628de86d18fda67ebcc4191c2b37891ed36e Mon Sep 17 00:00:00 2001
From: Bas Zoetekouw <bas.zoetekouw@surfnet.nl>
Date: Fri, 10 Aug 2018 12:52:26 +0200
Subject: [PATCH] make sure make clean works if configure has not yet run
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index c8aa217..7047914 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@
# local configuration options
-include ./local.mk
+-include ./local.mk
# keep track of our current location

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"quotatool-1.6.2.tar.gz": "e53adc480d54ae873d160dc0e88d78095f95d9131e528749fd982245513ea090"
}
}

Просмотреть файл

@ -0,0 +1,121 @@
Vendor: Microsoft Corporation
Distribution: Mariner
Name: quotatool
Version: 1.6.2
Release: 24%{?dist}
Summary: Command-line utility for filesystem quotas
License: GPLv2
URL: http://quotatool.ekenberg.se
Source0: http://quotatool.ekenberg.se/%{name}-%{version}.tar.gz
# Upstream fixes
Patch0: https://github.com/ekenberg/quotatool/commit/ad6944baaa73cf6230f9a2bef2399b31c2130547.patch
Patch1: https://github.com/ekenberg/quotatool/commit/09695c944947d804cbe3b5c7e2c854953984413e.patch
Patch2: https://github.com/ekenberg/quotatool/commit/ca68628de86d18fda67ebcc4191c2b37891ed36e.patch
Patch3: https://github.com/ekenberg/quotatool/commit/58cdec3cdc6ae94864891a4e179ad68d4d136864.patch
Patch4: https://github.com/ekenberg/quotatool/commit/af27842d1a6640d932407999ceec57f54a225a78.patch
BuildRequires: make
BuildRequires: gcc
%description
Quotatool is a utility to manipulate filesystem quotas from the commandline.
Most quota-utilities are interactive, requiring manual intervention from the
user. Quotatool on the other hand is not, making it suitable for use in
scripts and other non-interactive situations.
%prep
%setup -q
%patch0 -p1 -b .fix-compiler-warnings
%patch1 -p1 -b .fix-implicit-fallthrough
%patch2 -p1 -b .make-sure-make-clean-works-if-configure-has-not-run
%patch3 -p1 -b .improved-error-message
%patch4 -p1 -b .fix-compiler-warnings-again
%build
%configure
%make_build
%install
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_mandir}/man8
%make_install INSTALL_PROGRAM="%{_bindir}/install -p"
%files
%doc AUTHORS ChangeLog COPYING README TODO
%{_sbindir}/%{name}
%{_mandir}/man8/%{name}.8*
%changelog
* Wed Dec 13 2023 Sindhu Karri <lakarri@microsoft.com> - 1.6.2-24
- Initial CBL-Mariner import from Fedora 39 (license: MIT)
- Source license verified to be GPLv2
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Oct 13 2022 Tom Callaway <spot@fedoraproject.org> - 1.6.2-21
- apply fixes from upstream
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-16
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Jul 05 2013 Christopher Meng <rpm@cicku.me> - 1.6.2-1
- Initial Package.

Просмотреть файл

@ -25339,6 +25339,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "quotatool",
"version": "1.6.2",
"downloadUrl": "http://quotatool.ekenberg.se/quotatool-1.6.2.tar.gz"
}
}
},
{
"component": {
"type": "other",