diff options
Diffstat (limited to 'sys-fs/quota')
-rw-r--r-- | sys-fs/quota/Manifest | 2 | ||||
-rw-r--r-- | sys-fs/quota/files/quota-4.09-fix-building-on-musl.patch | 187 | ||||
-rw-r--r-- | sys-fs/quota/quota-4.09-r1.ebuild | 86 |
3 files changed, 275 insertions, 0 deletions
diff --git a/sys-fs/quota/Manifest b/sys-fs/quota/Manifest index 20a633255ca7..f6f10b17d8aa 100644 --- a/sys-fs/quota/Manifest +++ b/sys-fs/quota/Manifest @@ -4,10 +4,12 @@ AUX ldap-scripts/quota.schema 552 BLAKE2B d9becd7bd0f66ba8a603e3b442bdd36748c059 AUX ldap-scripts/setSystemQuotas.pl 3930 BLAKE2B 728956edd5f3e35939a068c92c5d94606d9b62943a6131502f235647a5251c3737a5307555dcaf98114946b8e9318a8f7c683d7bd066195d24c6542b95462fbd SHA512 8ecdd09500a849c4572411e904dc78ff967ed71f819969e0a27e697ca6607ca17906318784ccf1aca4fe066666dd2a21d800ce6f224478d0751db1a5c276a6ad AUX ldap-scripts/setquota-ldap.pl 6039 BLAKE2B 9603c6f7aaf842563af9c1b9a5680be126ead114e0e0bc19d123c9440604b4941e6d9353e62408155180edd39076d634c5150334f3fbffb649af7dc04eeb9bef SHA512 f046c45b09b8afa88d11b4d55e35877c1c7e6c8e87f41f4c2dfcb063a2bd972cf584f88fdea2b42442cb44e460a48f3c9b12c3f5f3a99f759bbdb4ca95ab8e5b AUX quota-4.09-configure-bashism.patch 719 BLAKE2B 83dbfec4aa5e29fcbf53b3f7328bd9fa98604ee369c1bee63e0f88f7f9ebfea873843fac97f0aff27ae2c4878a81f14311b3e90baf2765e6155a1cd826baf0f9 SHA512 78e3dde6fe19254ea30e821c8f97b9b491c2244d16fa22c7cefde215c4bf8ec61ece7315b51d4fee73019959c6418c4d62861470aea0c8f97ad8c2770522f76a +AUX quota-4.09-fix-building-on-musl.patch 4380 BLAKE2B 0e56d8f1e41fe0b601e59f7ed05b387e645b3054fce93c2544f245a4f72b19f6a5c8fdabfe498c72836069b9d147e988e2811ae7050eb552f73d28112009379a SHA512 350dde28d4672ccbec4b2fb6ef68aa5c0930f6b02d6291dd933cb41b3582083e0cda1da83693d44d9133ede3a82f112642f1f0026bb1799b3697c620be258697 AUX quota-4.09-gettext-version.patch 358 BLAKE2B 2c9c6292416c17395cb8ef18db03820d05dfcfec72bde0fe1ffa0f8c78b03b89f8a6705eda938c76fa14f49584842c5d0c2ab2cf768e19e8a95efc009a4c3dc9 SHA512 6b3fe50a5bff78bebe3fb44216774dbbc1e3ebedef9cf633031b5e94efeefb9e7c95d3cb8705828a04745cbe608ec8f614720037fac33f232cd3fe376741a2d5 AUX quota.confd 359 BLAKE2B 37d0cf75f96ca4ccd2d9be1ac3def62a3ac409873cfad33e1fafc515875e587a3ab3f869fd078994bef3174e70c10ce0311a307a808b3469cac73c7f3e8f1883 SHA512 3253b69932332eff2944753f687d780d651dc2b21b524b7055164b91292c13c346cd46443bd58267b239f72fd8918a7e113eec62871573ee94e33df5eb3c82f8 AUX quota.rc7 688 BLAKE2B 18a3317da5360532d6e6d9051f674a7a8e0495fa08aae8511fc7b77d2b16adb36dcdd9e510cb7bd15444b1ae8b606d607cc1ebaa10afb064b052d31ed780afbd SHA512 6a0536285bb340779cf4989060ed5a10c9c4a24a48d334174cd84cd54938d042f7a4047f837f96fc7a3c88a1d20317f662c984bd88c00b32cbf48302ba82a529 AUX rpc.rquotad.initd 448 BLAKE2B 59dc12ee73ddd0473f8122c780ef94c46dc8cfa0e15bd7a839b2d0360ea08d18d239b17b538b0ff9cd8110b8c29676aa93d06f25cf4acbc7f169ac545ab5248e SHA512 c6ab8d6e0e15032bbbee523c2550e7f23d48fb45035d37181e988f2f96cd1ece316681f1b529b51fd1aeb390c5f27a6911f5de52132e90b4cbcfb4c2dfc95954 DIST quota-4.09.tar.gz 523191 BLAKE2B 30b3828a45dcd7d99ff053f362917c138b1f0bcbde5f6fd3dfc1b48cb12615e5673d852f9276f2b370f9c799a2103e220d91ddf6a770aaaf8944cfb5c1131a74 SHA512 003d45f33543d4c87446e6547079cdae293b8dade01c58cf3626623721a1400ee07681395ad656c23a9ea2a62ab27c6ad24ad55600890e6e25334aba27ab1ad5 +EBUILD quota-4.09-r1.ebuild 1875 BLAKE2B 4b807046be78949155f8795fea0b6fbf72ec44a0400f1c53b48f9d6dbc7a626f18b989720bce759091e1617e65379d6f5e6042c46f037dff81a086c334df1a8d SHA512 e38c350b5f8951dfa813b435e61baa081334a9b1ca988e7d9f8f70ca47f5adb4cfc5430e76f17857fad1da48b44e4a30d5c50c865b58114be93dd324a99d9ac1 EBUILD quota-4.09.ebuild 1815 BLAKE2B 7b17b601b830eb946da450d59c677a44671539b6e0d91eaf64fb80158c81ca1e94f419607a7c6b2c1449da0d232c1dfd9587244b6ca2f3a77174844342bd7a7d SHA512 0e86c4582b4c4353d89b7d1762a5d08c3b1f386aec0fa7924149d324d7896171903cec6053c7017e53c1029131be257f793d5b98aa9fd263d657d971b515538c MISC metadata.xml 483 BLAKE2B a66c5218d5879916eb8d1158e838644b600c79c0285236bb622d4c71d977593c4c95c2e35f52d2be34a3990a0e6ac3a9f6461c541cdf0d704c303ec242a77656 SHA512 0fe78ffe3560e8518ee02f71b7ce3b0ef4963f8d87fd16daac911e42acf269f7f652cd5efa5a498c0e50efa9854c1ba10cd79382b82972aea682510433804614 diff --git a/sys-fs/quota/files/quota-4.09-fix-building-on-musl.patch b/sys-fs/quota/files/quota-4.09-fix-building-on-musl.patch new file mode 100644 index 000000000000..5c8e0fdbb4ad --- /dev/null +++ b/sys-fs/quota/files/quota-4.09-fix-building-on-musl.patch @@ -0,0 +1,187 @@ +https://sourceforge.net/p/linuxquota/code/ci/e73c5b48e12c3f02e532864a1107cdc8a4feafc3/ +From: Brahmajit Das <brahmajit.xyz@gmail.com> +Date: Sun, 14 Jul 2024 07:58:50 +0000 +Subject: [PATCH 1/1] Fix building on musl + +basename(3) is defined in libgen.h in MUSL. Include libgen.h where +basename(3) is used. + +Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> +Signed-off-by: Jan Kara <jack@suse.cz> +--- a/convertquota.c ++++ b/convertquota.c +@@ -14,6 +14,7 @@ + #include <fcntl.h> + #include <errno.h> + #include <getopt.h> ++#include <libgen.h> + + #include <endian.h> + +--- a/edquota.c ++++ b/edquota.c +@@ -20,6 +20,7 @@ + #include <stdlib.h> + #include <fcntl.h> + #include <getopt.h> ++#include <libgen.h> + + #include "pot.h" + #include "quotaops.h" +@@ -38,7 +39,7 @@ char *progname; + static int flags, quotatype; + static int fmt = -1; + static char *protoname; +-static char *dirname; ++static char *dir_name; + + static void usage(void) + { +@@ -138,7 +139,7 @@ static int parse_options(int argc, char **argv) + exit(1); + break; + case 'f': +- dirname = optarg; ++ dir_name = optarg; + break; + case 256: + flags |= FL_NUMNAMES; +@@ -176,7 +177,7 @@ static void copy_prototype(int argc, char **argv, struct quota_handle **handles) + protoprivs = getprivs(protoid, handles, 0); + while (argc-- > 0) { + id = name2id(*argv, quotatype, !!(flags & FL_NUMNAMES), NULL); +- curprivs = getprivs(id, handles, !dirname); ++ curprivs = getprivs(id, handles, !dir_name); + if (!curprivs) + die(1, _("Cannot get quota information for user %s\n"), *argv); + argv++; +@@ -223,7 +224,7 @@ int main(int argc, char **argv) + argv += ret; + + init_kernel_interface(); +- handles = create_handle_list(dirname ? 1 : 0, dirname ? &dirname : NULL, quotatype, fmt, ++ handles = create_handle_list(dir_name ? 1 : 0, dir_name ? &dir_name : NULL, quotatype, fmt, + (flags & FL_NO_MIXED_PATHS) ? 0 : IOI_NFS_MIXED_PATHS, + (flags & FL_REMOTE) ? 0 : MS_LOCALONLY); + if (!handles[0]) { +@@ -296,7 +297,7 @@ int main(int argc, char **argv) + else { + for (; argc > 0; argc--, argv++) { + id = name2id(*argv, quotatype, !!(flags & FL_NUMNAMES), NULL); +- curprivs = getprivs(id, handles, !dirname); ++ curprivs = getprivs(id, handles, !dir_name); + if (!curprivs) + die(1, _("Cannot get quota information for user %s.\n"), *argv); + if (flags & FL_EDIT_TIMES) { +--- a/quota.c ++++ b/quota.c +@@ -20,6 +20,7 @@ + #include <unistd.h> + #include <limits.h> + #include <ctype.h> ++#include <libgen.h> + #ifdef RPC + #include <rpc/rpc.h> + #include "rquota.h" +--- a/quota_nld.c ++++ b/quota_nld.c +@@ -26,6 +26,7 @@ + #include <fcntl.h> + #include <limits.h> + #include <signal.h> ++#include <libgen.h> + #include <sys/stat.h> + #include <asm/types.h> + +--- a/quotacheck.c ++++ b/quotacheck.c +@@ -19,6 +19,7 @@ + #include <unistd.h> + #include <stdlib.h> + #include <errno.h> ++#include <libgen.h> + + #include <sys/stat.h> + #include <sys/types.h> +--- a/quotaon.c ++++ b/quotaon.c +@@ -13,6 +13,7 @@ + #include <string.h> + #include <stdlib.h> + #include <stdarg.h> ++#include <libgen.h> + + #include "quotaon.h" + #include "quota.h" +--- a/quotastats.c ++++ b/quotastats.c +@@ -24,6 +24,7 @@ + #include <errno.h> + #include <string.h> + #include <signal.h> ++#include <libgen.h> + + #include "pot.h" + #include "common.h" +--- a/quotasync.c ++++ b/quotasync.c +@@ -7,6 +7,7 @@ + #include <string.h> + #include <errno.h> + #include <getopt.h> ++#include <libgen.h> + + #include "pot.h" + #include "common.h" +--- a/repquota.c ++++ b/repquota.c +@@ -18,6 +18,7 @@ + #include <pwd.h> + #include <grp.h> + #include <getopt.h> ++#include <libgen.h> + + #include "pot.h" + #include "common.h" +--- a/rquota_svc.c ++++ b/rquota_svc.c +@@ -34,6 +34,7 @@ + #include <signal.h> + #include <errno.h> + #include <netconfig.h> ++#include <libgen.h> + #ifdef HOSTS_ACCESS + #include <tcpd.h> + #include <netdb.h> +--- a/setquota.c ++++ b/setquota.c +@@ -18,6 +18,7 @@ + #include <time.h> + #include <ctype.h> + #include <stdlib.h> ++#include <libgen.h> + + #if defined(RPC) + #include "rquota.h" +--- a/warnquota.c ++++ b/warnquota.c +@@ -31,6 +31,7 @@ + #include <time.h> + #include <getopt.h> + #include <locale.h> ++#include <libgen.h> + #ifdef HAVE_NL_LANGINFO + #include <langinfo.h> + #endif +--- a/xqmstats.c ++++ b/xqmstats.c +@@ -8,6 +8,7 @@ + #include <stdio.h> + #include <unistd.h> + #include <string.h> ++#include <libgen.h> + #include "common.h" + #include "pot.h" + +-- +2.45.2 diff --git a/sys-fs/quota/quota-4.09-r1.ebuild b/sys-fs/quota/quota-4.09-r1.ebuild new file mode 100644 index 000000000000..10e3bf5b8c7a --- /dev/null +++ b/sys-fs/quota/quota-4.09-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="Linux quota tools" +HOMEPAGE="https://sourceforge.net/projects/linuxquota/" +SRC_URI="https://downloads.sourceforge.net/linuxquota/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="ldap netlink nls rpc selinux tcpd" + +RDEPEND=" + sys-fs/e2fsprogs + ldap? ( >=net-nds/openldap-2.3.35:= ) + netlink? ( + sys-apps/dbus + dev-libs/libnl:3 + ) + rpc? ( + elibc_glibc? ( sys-libs/glibc[-rpc(-)] ) + net-libs/libtirpc:= + net-libs/rpcsvc-proto + ) + tcpd? ( sys-apps/tcp-wrappers ) +" +DEPEND="${RDEPEND}" +BDEPEND="nls? ( sys-devel/gettext )" +PDEPEND="rpc? ( net-nds/rpcbind )" +RDEPEND+=" selinux? ( sec-policy/selinux-quota )" + +PATCHES=( + "${FILESDIR}"/${PN}-4.09-configure-bashism.patch + "${FILESDIR}"/${PN}-4.09-gettext-version.patch + "${FILESDIR}"/${PN}-4.09-fix-building-on-musl.patch +) + +src_prepare() { + default + + # Only needed for bashism patch and stale macros patch + eautoreconf +} + +src_configure() { + local myeconfargs=( + --enable-ext2direct + $(use_enable nls) + $(use_enable ldap ldapmail) + $(use_enable netlink) + $(use_enable rpc) + $(use_enable rpc rpcsetquota) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + emake DESTDIR="${D}" install + dodoc doc/* README.* Changelog + + insinto /etc + insopts -m0644 + doins warnquota.conf quotatab + + newinitd "${FILESDIR}"/quota.rc7 quota + newconfd "${FILESDIR}"/quota.confd quota + + if use rpc ; then + newinitd "${FILESDIR}"/rpc.rquotad.initd rpc.rquotad + fi + + if use ldap ; then + insinto /etc/openldap/schema + insopts -m0644 + doins "${FILESDIR}"/ldap-scripts/quota.schema + + exeinto /usr/share/quota/ldap-scripts + doexe "${FILESDIR}"/ldap-scripts/*.pl + doexe "${FILESDIR}"/ldap-scripts/edquota_editor + fi +} |