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