diff -ruN coreutils-8.27.orig/README coreutils-8.27/README --- coreutils-8.27.orig/README 2017-01-21 15:53:43.000000000 +0100 +++ coreutils-8.27/README 2017-06-10 20:34:17.945208906 +0200 @@ -9,7 +9,7 @@ [ arch b2sum base32 base64 basename 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 id install + 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 sha384sum diff -ruN coreutils-8.27.orig/build-aux/gen-lists-of-programs.sh coreutils-8.27/build-aux/gen-lists-of-programs.sh --- coreutils-8.27.orig/build-aux/gen-lists-of-programs.sh 2017-02-10 06:53:47.000000000 +0100 +++ coreutils-8.27/build-aux/gen-lists-of-programs.sh 2017-06-10 20:32:44.126465035 +0200 @@ -70,6 +70,7 @@ false fmt fold + getgid ginstall groups head diff -ruN coreutils-8.27.orig/man/getgid.1 coreutils-8.27/man/getgid.1 --- coreutils-8.27.orig/man/getgid.1 1970-01-01 01:00:00.000000000 +0100 +++ coreutils-8.27/man/getgid.1 2017-06-10 20:32:44.116465062 +0200 @@ -0,0 +1,22 @@ +.TH GETGID "1" "October 2002" "getgid (coreutils) 4.5.3" "User Commands" +.SH NAME +getgid \- print ID of given group +.SH SYNOPSIS +.B getgid +\fIGROUPNAME\fR +.SH DESCRIPTION +.PP +Print group ID for GROUPNAME. +.PP +Without any OPTION, print usage information. +.SH AUTHOR +Written by Artur Frysiak. +.SH "REPORTING BUGS" +Report bugs to . +.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 "SEE ALSO" +.BR id (1) diff -ruN coreutils-8.27.orig/man/getgid.x coreutils-8.27/man/getgid.x --- coreutils-8.27.orig/man/getgid.x 1970-01-01 01:00:00.000000000 +0100 +++ coreutils-8.27/man/getgid.x 2017-06-10 20:32:44.116465062 +0200 @@ -0,0 +1,4 @@ +[NAME] +getgid \- print ID of given group +[DESCRIPTION] +.\" Add any additional description here diff -ruN coreutils-8.27.orig/man/pl/getgid.1 coreutils-8.27/man/pl/getgid.1 --- coreutils-8.27.orig/man/pl/getgid.1 1970-01-01 01:00:00.000000000 +0100 +++ coreutils-8.27/man/pl/getgid.1 2017-06-10 20:32:44.117465059 +0200 @@ -0,0 +1,22 @@ +.TH GETGID "1" "PaĽdziernik 2002" "getgid (coreutils) 4.5.3" "Polecenia użytkownika" +.SH NAZWA +getgid \- wypisuje identyfikator podanej grupy +.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. +.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 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 +.BR id (1) diff -ruN coreutils-8.27.orig/po/POTFILES.in coreutils-8.27/po/POTFILES.in --- coreutils-8.27.orig/po/POTFILES.in 2017-02-18 04:37:23.000000000 +0100 +++ coreutils-8.27/po/POTFILES.in 2017-06-10 20:32:44.118465057 +0200 @@ -65,6 +65,7 @@ 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 -ruN coreutils-8.27.orig/po/pl.po coreutils-8.27/po/pl.po --- coreutils-8.27.orig/po/pl.po 2017-03-09 06:02:56.000000000 +0100 +++ coreutils-8.27/po/pl.po 2017-06-10 20:32:44.124465040 +0200 @@ -4128,6 +4128,15 @@ 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:26 msgid "Brian Fox" diff -ruN coreutils-8.27.orig/src/getgid.c coreutils-8.27/src/getgid.c --- coreutils-8.27.orig/src/getgid.c 1970-01-01 01:00:00.000000000 +0100 +++ coreutils-8.27/src/getgid.c 2017-06-10 20:32:44.125465038 +0200 @@ -0,0 +1,88 @@ +/* getgid - print GID of given group + Copyright (C) 1999 Artur Frysiak + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +#include "system.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") + +void +usage (int status) +{ + if (status != EXIT_SUCCESS) + emit_try_help (); + else + { + 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_ancillary_info (PROGRAM_NAME); + } + exit (status); +} + +int +main (int argc, char **argv) +{ + struct group *gr; + + initialize_main (&argc, &argv); + set_program_name (argv[0]); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + 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 -ruN coreutils-8.27.orig/src/local.mk coreutils-8.27/src/local.mk --- coreutils-8.27.orig/src/local.mk 2017-03-08 06:34:11.000000000 +0100 +++ coreutils-8.27/src/local.mk 2017-06-10 20:32:44.124465040 +0200 @@ -128,6 +128,7 @@ 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)