base64: fix typos in comment
Hi! I looked over the base64 tool a bit, and found two minor issues. Thanks, /Simon From 5621aab03b8187c50cab094369e0faaf7e01d14c Mon Sep 17 00:00:00 2001 From: Simon Josefsson [EMAIL PROTECTED] Date: Sun, 1 Jun 2008 13:08:20 +0200 Subject: [PATCH] Improve comments. --- src/base64.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base64.c b/src/base64.c index c9e50cf..a3a7345 100644 --- a/src/base64.c +++ b/src/base64.c @@ -240,9 +240,9 @@ main (int argc, char **argv) FILE *input_fh; const char *infile; - /* True if --decode has bene given and we should decode data. */ + /* True if --decode has been given and we should decode data. */ bool decode = false; - /* True if we should ignore non-alphabetic characters. */ + /* True if we should ignore non-base64-alphabetic characters. */ bool ignore_garbage = false; /* Wrap encoded base64 data around the 76:th column, by default. */ uintmax_t wrap_column = 76; -- 1.5.5.1 ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: Feature request - base64 Filename Safe Alphabet
Christopher Kerr [EMAIL PROTECTED] writes: After being burned by using `head -c6 /dev/urandom | base64` as part of a directory name, I realised that it would be useful if base64 had an option to generate URL and Filename safe encodings, as specified in RFC 3548 section 4. This would make cat FILE | base64 --filename-safe equivalent to cat FILE | base64 | tr '+/' '-_' using the current coreutils tools. I think --filename-safe is a good idea. The documentation should discuss the potential for generating files starting with '-' or '--'. Patching gnulib's base64.c to support an arbitrary alphabet seems messy. Patches welcome though. Regarding the discussion of different characters to use, let me add that '+' is not a URI safe character, so it would be unsafe from that aspect. I believe the parameter name clash is the least problematic consequence that we can chose. /Simon ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: base64: fix typos in comment
Jim Meyering [EMAIL PROTECTED] writes: Simon Josefsson [EMAIL PROTECTED] wrote: Hi! I looked over the base64 tool a bit, and found two minor issues. Subject: [PATCH] Improve comments. ... Thanks! Applied. That was quick, thanks. I went over the documentation as well. /Simon From 450da29a8766003e35891e7f5209e4fa135d2845 Mon Sep 17 00:00:00 2001 From: Simon Josefsson [EMAIL PROTECTED] Date: Sun, 1 Jun 2008 13:51:14 +0200 Subject: [PATCH] use RFC 4648 as base64 specification, and move the URL down a bit in the text --- doc/coreutils.texi |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index dbc8a8b..020cb00 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -1860,8 +1860,7 @@ address. @command{base64} transforms data read from a file, or standard input, into (or from) base64 encoded form. The base64 encoded form uses -printable @acronym{ASCII} characters to represent binary data, see [EMAIL PROTECTED]://ftp.rfc-editor.org/in-notes/rfc3548.txt, RFC 3548}. +printable @acronym{ASCII} characters to represent binary data. Synopses: @smallexample @@ -1869,7 +1868,9 @@ base64 [EMAIL PROTECTED]@dots{} [EMAIL PROTECTED] base64 --decode [EMAIL PROTECTED]@dots{} [EMAIL PROTECTED] @end smallexample -The base64 encoding expands data to roughly 133% of the original. +The base64 encoding expands data to roughly 133% of the original. The +format conforms to [EMAIL PROTECTED]://ftp.rfc-editor.org/in-notes/rfc4648.txt, RFC 4648}. The program accepts the following options. Also see @ref{Common options}. -- 1.5.5.1 ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
coreutils-6.12 released
Coreutils version 6.12 has been released. This is a stable, bug-fix release. For a summary of changes and contributors, see: http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=shortlog;h=v6.12 or run this command from a git-cloned coreutils directory: git shortlog v6.11..v6.12 To summarize the gnulib-related changes, you can run this command From a git-cloned gnulib directory: git shortlog 2e8956774250d3f5636898fea193c5abaf041d08\ ..b9c1b3ae9d1cb02e7712988570355d4258f1bcb0 Here are the compressed sources: ftp://ftp.gnu.org/gnu/coreutils/coreutils-6.12.tar.gz (8.7MB) ftp://ftp.gnu.org/gnu/coreutils/coreutils-6.12.tar.lzma (3.6MB) Here are the GPG detached signatures[*]: ftp://ftp.gnu.org/gnu/coreutils/coreutils-6.12.tar.gz.sig ftp://ftp.gnu.org/gnu/coreutils/coreutils-6.12.tar.lzma.sig [*] You can use either of the above signature files to verify that the corresponding file (without the .sig suffix) is intact. First, be sure to download both the .sig file and the corresponding tarball. Then, run a command like this: gpg --verify coreutils-6.12.tar.gz.sig If that command fails because you don't have the required public key, then run this command to import it: gpg --keyserver wwwkeys.pgp.net --recv-keys B9AB9A16 and rerun the `gpg --verify' command. This release was bootstrapped with the following tools: Autoconf 2.62 Automake 1.10a Bison 2.3 Gnulib v0.0-713-gb9c1b3a * How can you help? * If you're interested in lending a hand, or just want to use the latest versions right now, you can build these programs and run the test suite like this: gzip -dc coreutils-6.12.tar.gz | tar xf - cd coreutils-6.12 ./configure make make -k check log grep FAIL log [If you downloaded the much-smaller .lzma tarball, then just substitute this for the gzip... line above: lzma -dc coreutils-6.12.tar.lzma | tar xf - If you don't have lzma installed yet, first try getting it via your distribution, e.g., aptitude install lzma or yum install lzma] Be sure to use make's -k option so that make doesn't stop just because one of the earlier tests fails. Please report any build problems or test failures to the bug-coreutils@gnu.org mailing list. There are detailed instructions in the `Reporting bugs:' section of the README file. * NEWS (since coreutils-6.11) * Perhaps I need to revise my notion of Noteworthy. A few changes not mentioned below: - in multibyte mode, wc -m and wc -w are now ~3x faster - many tests have been revamped * Noteworthy changes in release 6.12 (2008-05-31) [stable] ** Bug fixes chcon, runcon: --help output now includes the bug-reporting address cp -p copies permissions more portably. For example, on MacOS X 10.5, cp -p some-fifo some-file no longer fails while trying to copy the permissions from the some-fifo argument. id with no options now prints the SELinux context only when invoked with no USERNAME argument. id and groups once again print the AFS-specific nameless group-ID (PAG). Printing of such large-numbered, kernel-only (not in /etc/group) group-IDs was suppressed in 6.11 due to ignorance that they are useful. uniq: avoid subtle field-skipping malfunction due to isblank misuse. In some locales on some systems, isblank(240) (aka nbsp) is nonzero. On such systems, uniq --skip-fields=N would fail to skip the proper number of fields for some inputs. tac: avoid segfault with --regex (-r) and multiple files, e.g., echo x; tac -r x x. [bug present at least in textutils-1.8b, from 1992] ** Changes in behavior install once again sets SELinux context, when possible [it was deliberately disabled in 6.9.90] pgpbNpLdfSSSY.pgp Description: PGP signature ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: [PATCH] md5sum+sha*sum: add option --quiet/-q to suppress OK messages
Erik Auerswald [EMAIL PROTECTED] wrote: And here it is... (attached). Thanks. Here are some minor changes I expect to amend into your patch. They alphabetize lists, tweak wording and correct a comment. Plus, in NEWS (as in ChangeLog/commit log), it's good to list all program names explicitly, rather than abbreviating like sha*sum. diff --git a/NEWS b/NEWS index 194dde8..b12631b 100644 --- a/NEWS +++ b/NEWS @@ -4,8 +4,8 @@ GNU coreutils NEWS-*- outline -*- ** New features - md5sum and sha*sum now know an option --quiet to suppress the printing - of 'OK' messages. + md5sum now accepts the new option, --quiet, to suppress the printing of + 'OK' messages. sha1sum, sha224sum, sha384sum, and sha512sum accept it, too. * Noteworthy changes in release 6.12 (2008-05-31) [stable] diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 21ed1c0..e804d58 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -3277,6 +3277,15 @@ an MD5 checksum inconsistent with the associated file, or if no valid line is found, @command{md5sum} exits with nonzero status. Otherwise, it exits successfully. [EMAIL PROTECTED] --quiet [EMAIL PROTECTED] --quiet [EMAIL PROTECTED] verifying MD5 checksums +This option is useful only when verifying checksums. +When verifying checksums, don't generate an 'OK' message per successfully +checked file. Files that fail the verification are reported in the +default one-line-per-file format. If there is any checksum mismatch, +print a warning summarizing the failures to standard error. + @itemx --status @opindex --status @cindex verifying MD5 checksums @@ -3289,15 +3298,6 @@ If all listed files are readable and are consistent with the associated MD5 checksums, exit successfully. Otherwise exit with a status code indicating there was a failure. [EMAIL PROTECTED] --quiet [EMAIL PROTECTED] --quiet [EMAIL PROTECTED] verifying MD5 checksums -This option is useful only when verifying checksums. -When verifying checksums, don't generate an 'OK' message per successfully -checked file. Files that fail the verification are reported in the -default one-line-per-file format. If any files failed verification, -a warning summarizing any failures is printed to standard error. - @item -t @itemx --text @opindex -t diff --git a/src/md5sum.c b/src/md5sum.c index 5fe17c5..c0b5ed5 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -117,7 +117,7 @@ static bool status_only = false; improperly formatted checksum line. */ static bool warn = false; -/* With --quiet, don't print a message for successfully verified files */ +/* With --check, suppress the OK printed for each verified file. */ static bool quiet = false; /* The name this program was run with. */ @@ -135,10 +135,10 @@ static const struct option long_options[] = { { binary, no_argument, NULL, 'b' }, { check, no_argument, NULL, 'c' }, + { quiet, no_argument, NULL, QUIET_OPTION }, { status, no_argument, NULL, STATUS_OPTION }, { text, no_argument, NULL, 't' }, { warn, no_argument, NULL, 'w' }, - { quiet, no_argument, NULL, QUIET_OPTION }, { GETOPT_HELP_OPTION_DECL }, { GETOPT_VERSION_OPTION_DECL }, { NULL, 0, NULL, 0 } @@ -183,8 +183,8 @@ With no FILE, or when FILE is -, read standard input.\n\ fputs (_(\ \n\ The following three options are useful only when verifying checksums:\n\ + --quiet don't print OK for each successfully verified file\n\ --statusdon't output anything, status code shows success\n\ - --quiet no output for successfully verified files\n\ -w, --warn warn about improperly formatted checksum lines\n\ \n\ ), stdout); ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: [PATCH] md5sum+sha*sum: add option --quiet/-q to suppress OK messages
Hi, On Sun, Jun 01, 2008 at 04:51:43PM +0200, Jim Meyering wrote: Erik Auerswald [EMAIL PROTECTED] wrote: And here it is... (attached). Thanks. Here are some minor changes I expect to amend into your patch. They alphabetize lists, tweak wording and correct a comment. Plus, in NEWS (as in ChangeLog/commit log), it's good to list all program names explicitly, rather than abbreviating like sha*sum. This is fine with me, go ahead. Erik ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: base64: fix typos in comment
Simon Josefsson [EMAIL PROTECTED] wrote: That was quick, thanks. I went over the documentation as well. Pushed, too. I added a doc: prefix on the summary line, and the usual * filename (section) ChangeLog stuff, though I'm not sure it's worth doing that for documentation. ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils