]> git.pld-linux.org Git - packages/coreutils.git/blob - coreutils-getgid.patch
up to 9.5
[packages/coreutils.git] / coreutils-getgid.patch
1 diff -ruN coreutils-8.27.orig/README coreutils-8.27/README
2 --- coreutils-8.27.orig/README  2017-01-21 15:53:43.000000000 +0100
3 +++ coreutils-8.27/README       2017-06-10 20:34:17.945208906 +0200
4 @@ -9,7 +9,7 @@
5  
6    [ arch b2sum base32 base64 basename cat chcon chgrp chmod chown chroot cksum
7    comm coreutils cp csplit cut date dd df dir dircolors dirname du echo env
8 -  expand expr factor false fmt fold groups head hostid hostname id install
9 +  expand expr factor false fmt fold getgid groups head hostid hostname id install
10    join kill link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl
11    nohup nproc numfmt od paste pathchk pinky pr printenv printf ptx pwd
12    readlink realpath rm rmdir runcon seq sha1sum sha224sum sha256sum sha384sum
13 diff -ruN coreutils-8.27.orig/build-aux/gen-lists-of-programs.sh coreutils-8.27/build-aux/gen-lists-of-programs.sh
14 --- coreutils-8.27.orig/build-aux/gen-lists-of-programs.sh      2017-02-10 06:53:47.000000000 +0100
15 +++ coreutils-8.27/build-aux/gen-lists-of-programs.sh   2017-06-10 20:32:44.126465035 +0200
16 @@ -70,6 +70,7 @@
17      false
18      fmt
19      fold
20 +    getgid
21      ginstall
22      groups
23      head
24 diff -ruN coreutils-8.27.orig/man/getgid.1 coreutils-8.27/man/getgid.1
25 --- coreutils-8.27.orig/man/getgid.1    1970-01-01 01:00:00.000000000 +0100
26 +++ coreutils-8.27/man/getgid.1 2017-06-10 20:32:44.116465062 +0200
27 @@ -0,0 +1,22 @@
28 +.TH GETGID "1" "October 2002" "getgid (coreutils) 4.5.3" "User Commands"
29 +.SH NAME
30 +getgid \- print ID of given group
31 +.SH SYNOPSIS
32 +.B getgid
33 +\fIGROUPNAME\fR
34 +.SH DESCRIPTION
35 +.PP
36 +Print group ID for GROUPNAME.
37 +.PP
38 +Without any OPTION, print usage information.
39 +.SH AUTHOR
40 +Written by Artur Frysiak.
41 +.SH "REPORTING BUGS"
42 +Report bugs to <feedback@pld-linux.org>.
43 +.SH COPYRIGHT
44 +Copyright \(co 1999 Artur Frysiak.
45 +.br
46 +This is free software; see the source for copying conditions.  There is NO
47 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48 +.SH "SEE ALSO"
49 +.BR id (1)
50 diff -ruN coreutils-8.27.orig/man/getgid.x coreutils-8.27/man/getgid.x
51 --- coreutils-8.27.orig/man/getgid.x    1970-01-01 01:00:00.000000000 +0100
52 +++ coreutils-8.27/man/getgid.x 2017-06-10 20:32:44.116465062 +0200
53 @@ -0,0 +1,4 @@
54 +[NAME]
55 +getgid \- print ID of given group
56 +[DESCRIPTION]
57 +.\" Add any additional description here
58 diff -ruN coreutils-8.27.orig/man/pl/getgid.1 coreutils-8.27/man/pl/getgid.1
59 --- coreutils-8.27.orig/man/pl/getgid.1 1970-01-01 01:00:00.000000000 +0100
60 +++ coreutils-8.27/man/pl/getgid.1      2017-06-10 20:32:44.117465059 +0200
61 @@ -0,0 +1,22 @@
62 +.TH GETGID "1" "Pa¼dziernik 2002" "getgid (coreutils) 4.5.3" "Polecenia u¿ytkownika"
63 +.SH NAZWA
64 +getgid \- wypisuje identyfikator podanej grupy
65 +.SH SK£ADNIA
66 +.B getgid
67 +\fINAZWA-GRUPY\fR
68 +.SH OPIS
69 +.PP
70 +Wypisuje identyfikator grupy NAZWA-GRUPY.
71 +.PP
72 +Bez ¿adnych opcji podaje sposób u¿ycia.
73 +.SH AUTOR
74 +Napisane przez Artura Frysiaka.
75 +.SH "ZG£ASZANIE B£ÊDÓW"
76 +B³êdy proszê zg³aszaæ (w jêz. polskim lub angielskim) pod <feedback@pld-linux.org>.
77 +.SH COPYRIGHT
78 +Copyright \(co 1999 Artur Frysiak.
79 +.br
80 +This is free software; see the source for copying conditions.  There is NO
81 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
82 +.SH ZOBACZ TAK¯E
83 +.BR id (1)
84 diff -ruN coreutils-8.27.orig/po/POTFILES.in coreutils-8.27/po/POTFILES.in
85 --- coreutils-8.27.orig/po/POTFILES.in  2017-02-18 04:37:23.000000000 +0100
86 +++ coreutils-8.27/po/POTFILES.in       2017-06-10 20:32:44.118465057 +0200
87 @@ -65,6 +65,7 @@
88  src/find-mount-point.c
89  src/fmt.c
90  src/fold.c
91 +src/getgid.c
92  src/getlimits.c
93  src/group-list.c
94  src/groups.c
95 diff -ruN coreutils-8.27.orig/po/pl.po coreutils-8.27/po/pl.po
96 --- coreutils-8.27.orig/po/pl.po        2017-03-09 06:02:56.000000000 +0100
97 +++ coreutils-8.27/po/pl.po     2017-06-10 20:32:44.124465040 +0200
98 @@ -4128,6 +4128,15 @@
99  msgid "invalid zero-length file name"
100  msgstr "błędna nazwa pliku o zerowej długości"
101  
102 +#: src/getgid.c:37
103 +#, c-format
104 +msgid ""
105 +"Usage:\n"
106 +"\t%s groupname\n"
107 +msgstr ""
108 +"Składnia:\n"
109 +"\t%s nazwa-grupy\n"
110 +
111  #. This is a proper name. See the gettext manual, section Names.
112  #: src/echo.c:26
113  msgid "Brian Fox"
114 diff -ruN coreutils-8.27.orig/src/getgid.c coreutils-8.27/src/getgid.c
115 --- coreutils-8.27.orig/src/getgid.c    1970-01-01 01:00:00.000000000 +0100
116 +++ coreutils-8.27/src/getgid.c 2017-06-10 20:32:44.125465038 +0200
117 @@ -0,0 +1,88 @@
118 +/* getgid - print GID of given group
119 +   Copyright (C) 1999 Artur Frysiak <wiget@pld-linux.org>
120 +
121 +   This program is free software; you can redistribute it and/or modify
122 +   it under the terms of the GNU General Public License as published by
123 +   the Free Software Foundation; either version 2, or (at your option)
124 +   any later version.
125 +
126 +   This program is distributed in the hope that it will be useful,
127 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
128 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
129 +   GNU General Public License for more details.
130 +
131 +   You should have received a copy of the GNU General Public License
132 +   along with this program; if not, write to the Free Software Foundation,
133 +   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
134 +
135 +#include <config.h>
136 +#include <grp.h>
137 +#include <getopt.h>
138 +#include <sys/types.h>
139 +
140 +#include "system.h"
141 +#include "error.h"
142 +#include "long-options.h"
143 +#include "quote.h"
144 +
145 +/* The official name of this program (e.g., no 'g' prefix).  */
146 +#define PROGRAM_NAME "getgid"
147 +
148 +#define AUTHORS proper_name ("Artur Frysiak")
149 +
150 +void
151 +usage (int status)
152 +{
153 +  if (status != EXIT_SUCCESS)
154 +    emit_try_help ();
155 +  else
156 +    {
157 +      printf (_("Usage: %s [OPTION]... [GROUPNAME]...\n"), program_name);
158 +      fputs (_("\
159 +Prints ID of given group name.\
160 +\n\
161 +"), stdout);
162 +      fputs (HELP_OPTION_DESCRIPTION, stdout);
163 +      fputs (VERSION_OPTION_DESCRIPTION, stdout);
164 +      emit_ancillary_info (PROGRAM_NAME);
165 +    }
166 +  exit (status);
167 +}
168 +
169 +int
170 +main (int argc, char **argv)
171 +{
172 +  struct group *gr;
173 +
174 +  initialize_main (&argc, &argv);
175 +  set_program_name (argv[0]);
176 +  setlocale (LC_ALL, "");
177 +  bindtextdomain (PACKAGE, LOCALEDIR);
178 +  textdomain (PACKAGE);
179 +
180 +  atexit (close_stdout);
181 +
182 +  parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE_NAME, Version,
183 +                      usage, AUTHORS, (char const *) NULL);
184 +  if (getopt_long (argc, argv, "", NULL, NULL) != -1)
185 +    usage (EXIT_FAILURE);
186 +
187 +  if (argc < optind + 1)
188 +    {
189 +      error (0, 0, _("missing operand"));
190 +      usage (EXIT_FAILURE);
191 +    }
192 +
193 +  if (optind + 2 < argc)
194 +    {
195 +      error (0, 0, _("extra operand %s"), quote (argv[optind + 2]));
196 +      usage (EXIT_FAILURE);
197 +    }
198 +
199 +  gr = getgrnam(argv[optind]);
200 +  if (gr == NULL)
201 +    error (EXIT_FAILURE, errno, _("cannot find group name %s"), quote (argv[optind]));
202 +  else
203 +    printf("%lu\n", (unsigned long int) gr->gr_gid);
204 +  exit(EXIT_SUCCESS);
205 +}
206 diff -ruN coreutils-8.27.orig/src/local.mk coreutils-8.27/src/local.mk
207 --- coreutils-8.27.orig/src/local.mk    2017-03-08 06:34:11.000000000 +0100
208 +++ coreutils-8.27/src/local.mk 2017-06-10 20:32:44.124465040 +0200
209 @@ -128,6 +128,7 @@
210  src_false_LDADD = $(LDADD)
211  src_fmt_LDADD = $(LDADD)
212  src_fold_LDADD = $(LDADD)
213 +src_getgid_LDADD = $(LDADD)
214  src_getlimits_LDADD = $(LDADD)
215  src_ginstall_LDADD = $(LDADD)
216  src_groups_LDADD = $(LDADD)
This page took 0.040687 seconds and 3 git commands to generate.