X-Git-Url: https://git.tld-linux.org/?p=packages%2Fcoreutils.git;a=blobdiff_plain;f=coreutils-getgid.patch;h=79c21d5f84f212689d430542a7884d834b92ee03;hp=eef4d6099e7a1459a5e5491996fdb0320ac4ac47;hb=HEAD;hpb=c15795f273c4569d3441eb7522d227bd518f0c58 diff --git a/coreutils-getgid.patch b/coreutils-getgid.patch index eef4d60..d73e737 100644 --- a/coreutils-getgid.patch +++ b/coreutils-getgid.patch @@ -1,16 +1,29 @@ ---- coreutils-6.10/man/Makefile.am.orig 2008-01-11 11:34:22.000000000 +0100 -+++ coreutils-6.10/man/Makefile.am 2008-03-02 02:14:20.884410857 +0100 -@@ -59,6 +59,7 @@ - false.1: $(common_dep) $(srcdir)/false.x ../src/false.c - fmt.1: $(common_dep) $(srcdir)/fmt.x ../src/fmt.c - fold.1: $(common_dep) $(srcdir)/fold.x ../src/fold.c -+getgid.1: $(common_dep) $(srcdir)/getgid.x ../src/getgid.c - groups.1: $(common_dep) $(srcdir)/groups.x ../src/groups.c - head.1: $(common_dep) $(srcdir)/head.x ../src/head.c - hostid.1: $(common_dep) $(srcdir)/hostid.x ../src/hostid.c -diff -Nur coreutils-4.5.3.orig/man/getgid.1 coreutils-4.5.3/man/getgid.1 ---- coreutils-4.5.3.orig/man/getgid.1 Thu Jan 1 01:00:00 1970 -+++ coreutils-4.5.3/man/getgid.1 Sun Oct 27 21:40:54 2002 +diff -urNp -x '*.orig' coreutils-8.32.org/README coreutils-8.32/README +--- coreutils-8.32.org/README 2020-01-01 15:13:12.000000000 +0100 ++++ coreutils-8.32/README 2021-03-21 00:28:40.313899186 +0100 +@@ -9,7 +9,7 @@ The programs that can be built with this + + [ arch b2sum base32 base64 basename basenc cat chcon chgrp chmod chown + chroot cksum comm coreutils cp csplit cut date dd df dir dircolors dirname +- du echo env expand expr factor false fmt fold groups head hostid hostname ++ du echo env expand expr factor false fmt fold getgid groups head hostid hostname + id install join kill link ln logname ls md5sum mkdir mkfifo mknod mktemp + mv nice nl nohup nproc numfmt od paste pathchk pinky pr printenv printf ptx + pwd readlink realpath rm rmdir runcon seq sha1sum sha224sum sha256sum +diff -urNp -x '*.orig' coreutils-8.32.org/build-aux/gen-lists-of-programs.sh coreutils-8.32/build-aux/gen-lists-of-programs.sh +--- coreutils-8.32.org/build-aux/gen-lists-of-programs.sh 2018-12-31 13:19:23.000000000 +0100 ++++ coreutils-8.32/build-aux/gen-lists-of-programs.sh 2021-03-21 00:28:40.314899186 +0100 +@@ -71,6 +71,7 @@ normal_progs=' + false + fmt + fold ++ getgid + ginstall + groups + head +diff -urNp -x '*.orig' coreutils-8.32.org/man/getgid.1 coreutils-8.32/man/getgid.1 +--- coreutils-8.32.org/man/getgid.1 1970-01-01 01:00:00.000000000 +0100 ++++ coreutils-8.32/man/getgid.1 2021-03-21 00:28:40.314899186 +0100 @@ -0,0 +1,22 @@ +.TH GETGID "1" "October 2002" "getgid (coreutils) 4.5.3" "User Commands" +.SH NAME @@ -34,53 +47,74 @@ diff -Nur coreutils-4.5.3.orig/man/getgid.1 coreutils-4.5.3/man/getgid.1 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +.BR id (1) ---- coreutils-4.5.3.orig/man/getgid.x 2007-02-13 17:29:53.000000000 +0100 -+++ coreutils-4.5.3.orig/man/getgid.x 2008-08-08 20:54:14.890808765 +0200 +diff -urNp -x '*.orig' coreutils-8.32.org/man/getgid.x coreutils-8.32/man/getgid.x +--- coreutils-8.32.org/man/getgid.x 1970-01-01 01:00:00.000000000 +0100 ++++ coreutils-8.32/man/getgid.x 2021-03-21 00:28:40.314899186 +0100 @@ -0,0 +1,4 @@ +[NAME] +getgid \- print ID of given group +[DESCRIPTION] +.\" Add any additional description here -diff -Nur coreutils-4.5.3.orig/man/pl/getgid.1 coreutils-4.5.3/man/pl/getgid.1 ---- coreutils-4.5.3.orig/man/pl/getgid.1 Thu Jan 1 01:00:00 1970 -+++ coreutils-4.5.3/man/pl/getgid.1 Sun Oct 27 21:46:48 2002 +diff -urNp -x '*.orig' coreutils-8.32.org/man/pl/getgid.1 coreutils-8.32/man/pl/getgid.1 +--- coreutils-8.32.org/man/pl/getgid.1 1970-01-01 01:00:00.000000000 +0100 ++++ coreutils-8.32/man/pl/getgid.1 2021-03-21 00:28:40.314899186 +0100 @@ -0,0 +1,22 @@ -+.TH GETGID "1" "Pa¼dziernik 2002" "getgid (coreutils) 4.5.3" "Polecenia u¿ytkownika" ++.TH GETGID "1" "Pa?dziernik 2002" "getgid (coreutils) 4.5.3" "Polecenia u?ytkownika" +.SH NAZWA +getgid \- wypisuje identyfikator podanej grupy -+.SH SK£ADNIA ++.SH SK?ADNIA +.B getgid +\fINAZWA-GRUPY\fR +.SH OPIS +.PP +Wypisuje identyfikator grupy NAZWA-GRUPY. +.PP -+Bez ¿adnych opcji podaje sposób u¿ycia. ++Bez ?adnych opcji podaje spos?b u?ycia. +.SH AUTOR +Napisane przez Artura Frysiaka. -+.SH "ZG£ASZANIE B£ÊDÓW" -+B³êdy proszê zg³aszaæ (w jêz. polskim lub angielskim) pod . ++.SH "ZG?ASZANIE B??D?W" ++B??dy prosz? zg?asza? (w j?z. polskim lub angielskim) pod . +.SH COPYRIGHT +Copyright \(co 1999 Artur Frysiak. +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -+.SH ZOBACZ TAK¯E ++.SH ZOBACZ TAK?E +.BR id (1) ---- coreutils-6.10/src/Makefile.am.orig 2008-03-02 02:12:29.418058752 +0100 -+++ coreutils-6.10/src/Makefile.am 2008-03-02 02:14:46.205853844 +0100 -@@ -69,6 +69,7 @@ - false \ - fmt \ - fold \ -+ getgid \ - ginstall \ - groups \ - head \ -diff -Nur coreutils-4.5.3.orig/src/getgid.c coreutils-4.5.3/src/getgid.c ---- coreutils-4.5.3.orig/src/getgid.c Thu Jan 1 01:00:00 1970 -+++ coreutils-4.5.3/src/getgid.c Sun Oct 27 21:52:01 2002 -@@ -0,0 +1,106 @@ +diff -urNp -x '*.orig' coreutils-8.32.org/po/POTFILES.in coreutils-8.32/po/POTFILES.in +--- coreutils-8.32.org/po/POTFILES.in 2020-01-01 15:13:12.000000000 +0100 ++++ coreutils-8.32/po/POTFILES.in 2021-03-21 00:28:40.314899186 +0100 +@@ -66,6 +66,7 @@ src/false.c + src/find-mount-point.c + src/fmt.c + src/fold.c ++src/getgid.c + src/getlimits.c + src/group-list.c + src/groups.c +diff -urNp -x '*.orig' coreutils-8.32.org/po/pl.po coreutils-8.32/po/pl.po +--- coreutils-8.32.org/po/pl.po 2021-03-21 00:28:39.617899186 +0100 ++++ coreutils-8.32/po/pl.po 2021-03-21 00:28:40.316899186 +0100 +@@ -4199,6 +4199,15 @@ msgstr "przy czytaniu nazw na wejściu p + msgid "invalid zero-length file name" + msgstr "błędna nazwa pliku o zerowej długości" + ++#: src/getgid.c:37 ++#, c-format ++msgid "" ++"Usage:\n" ++"\t%s groupname\n" ++msgstr "" ++"Składnia:\n" ++"\t%s nazwa-grupy\n" ++ + #. This is a proper name. See the gettext manual, section Names. + #: src/echo.c:28 + msgid "Brian Fox" +diff -urNp -x '*.orig' coreutils-8.32.org/src/getgid.c coreutils-8.32/src/getgid.c +--- coreutils-8.32.org/src/getgid.c 1970-01-01 01:00:00.000000000 +0100 ++++ coreutils-8.32/src/getgid.c 2021-03-21 00:28:40.317899186 +0100 +@@ -0,0 +1,88 @@ +/* getgid - print GID of given group + Copyright (C) 1999 Artur Frysiak + @@ -100,130 +134,83 @@ diff -Nur coreutils-4.5.3.orig/src/getgid.c coreutils-4.5.3/src/getgid.c + +#include +#include -+#include +#include ++#include ++ +#include "system.h" -+#include "quote.h" +#include "error.h" ++#include "long-options.h" ++#include "quote.h" + ++/* The official name of this program (e.g., no 'g' prefix). */ +#define PROGRAM_NAME "getgid" + +#define AUTHORS proper_name ("Artur Frysiak") + -+/* The name by which this program was run. */ -+const char *program_name; -+ -+static struct option const longopts[] = -+{ -+ {GETOPT_HELP_OPTION_DECL}, -+ {GETOPT_VERSION_OPTION_DECL}, -+ {NULL, 0, NULL, 0} -+}; -+ +void +usage (int status) +{ + if (status != EXIT_SUCCESS) -+ fprintf (stderr, _("Try `%s --help' for more information.\n"), -+ program_name); ++ emit_try_help (); + else + { -+ printf (_("\ -+Usage: %s [OPTION]... [GROUPNAME]...\n\ -+"), -+ program_name); ++ printf (_("Usage: %s [OPTION]... [GROUPNAME]...\n"), program_name); + fputs (_("\ +Prints ID of given group name.\ +\n\ +"), stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); -+ emit_bug_reporting_address (); ++ emit_ancillary_info (PROGRAM_NAME); + } + exit (status); +} + -+int main(int argc, char **argv) ++int ++main (int argc, char **argv) +{ -+ struct group *gr; -+ int optc; -+ -+ initialize_main (&argc, &argv); -+ program_name = argv[0]; -+ -+ setlocale (LC_ALL, ""); -+ bindtextdomain (PACKAGE, LOCALEDIR); -+ textdomain (PACKAGE); -+ -+ atexit (close_stdout); -+ -+ while ((optc = getopt_long (argc, argv, "+", longopts, NULL)) != -1) { -+ switch (optc) { -+ case_GETOPT_HELP_CHAR; -+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); -+ default: -+ usage (EXIT_FAILURE); -+ } -+ } -+ -+ if (argc < optind + 1) -+ { -+ error (0, 0, _("missing operand")); -+ usage (EXIT_FAILURE); -+ } -+ -+ if (optind + 2 < argc) -+ { -+ error (0, 0, _("extra operand %s"), quote (argv[optind + 2])); -+ usage (EXIT_FAILURE); -+ } -+ -+ gr = getgrnam(argv[optind]); -+ if (gr == NULL) { -+ error (0, 0, _("cannot find group name %s"), quote(argv[optind])); -+ exit(EXIT_FAILURE); -+ } else -+ printf("%lu\n", (unsigned long int) gr->gr_gid); -+ exit(EXIT_SUCCESS); -+} ++ struct group *gr; + ---- coreutils-4.5.3/po/POTFILES.in.orig Mon Jul 1 23:26:55 2002 -+++ coreutils-4.5.3/po/POTFILES.in Fri Nov 1 02:25:41 2002 -@@ -61,6 +61,7 @@ - src/false.c - src/fmt.c - src/fold.c -+src/getgid.c - src/getlimits.c - src/group-list.c - src/groups.c ---- coreutils-6.10/po/pl.po.orig 2008-03-02 02:12:29.526064907 +0100 -+++ coreutils-6.10/po/pl.po 2008-03-02 02:15:20.139787629 +0100 -@@ -4152,6 +4152,15 @@ - msgid "invalid number of columns: %s" - msgstr "b³êdna liczba kolumn: %s" - -+#: src/getgid.c:37 -+#, c-format -+msgid "" -+"Usage:\n" -+"\t%s groupname\n" -+msgstr "" -+"Składnia:\n" -+"\t%s nazwa-grupy\n" ++ initialize_main (&argc, &argv); ++ set_program_name (argv[0]); ++ setlocale (LC_ALL, ""); ++ bindtextdomain (PACKAGE, LOCALEDIR); ++ textdomain (PACKAGE); + - #. This is a proper name. See the gettext manual, section Names. - #: src/getlimits.c:29 src/timeout.c:74 src/truncate.c:42 - msgid "Padraig Brady" - ---- coreutils-8.6/README~ 2010-10-17 21:37:11.589739007 +0200 -+++ coreutils-8.6/README 2010-10-17 21:42:27.222782339 +0200 -@@ -9,7 +9,7 @@ - - [ arch base64 basename cat chcon chgrp chmod chown chroot cksum comm cp - csplit cut date dd df dir dircolors dirname du echo env expand expr -- factor false fmt fold groups head hostid hostname id install join kill -+ factor false fmt fold getgid groups head hostid hostname id install join kill - link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup - nproc od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir - runcon runuser seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf ++ atexit (close_stdout); ++ ++ parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE_NAME, Version, ++ usage, AUTHORS, (char const *) NULL); ++ if (getopt_long (argc, argv, "", NULL, NULL) != -1) ++ usage (EXIT_FAILURE); ++ ++ if (argc < optind + 1) ++ { ++ error (0, 0, _("missing operand")); ++ usage (EXIT_FAILURE); ++ } ++ ++ if (optind + 2 < argc) ++ { ++ error (0, 0, _("extra operand %s"), quote (argv[optind + 2])); ++ usage (EXIT_FAILURE); ++ } ++ ++ gr = getgrnam(argv[optind]); ++ if (gr == NULL) ++ error (EXIT_FAILURE, errno, _("cannot find group name %s"), quote (argv[optind])); ++ else ++ printf("%lu\n", (unsigned long int) gr->gr_gid); ++ exit(EXIT_SUCCESS); ++} +diff -urNp -x '*.orig' coreutils-8.32.org/src/local.mk coreutils-8.32/src/local.mk +--- coreutils-8.32.org/src/local.mk 2020-02-25 13:54:28.000000000 +0100 ++++ coreutils-8.32/src/local.mk 2021-03-21 00:28:40.317899186 +0100 +@@ -130,6 +130,7 @@ src_factor_LDADD = $(LDADD) + src_false_LDADD = $(LDADD) + src_fmt_LDADD = $(LDADD) + src_fold_LDADD = $(LDADD) ++src_getgid_LDADD = $(LDADD) + src_getlimits_LDADD = $(LDADD) + src_ginstall_LDADD = $(LDADD) + src_groups_LDADD = $(LDADD)