Re: chroot with --userspec when chrooting from x86_64 to i686

2012-05-02 Thread Pádraig Brady
On 05/02/2012 10:37 AM, Dmitry V. Levin wrote: Hi, On Tue, May 01, 2012 at 09:32:20PM +0100, John Lane wrote: Hello, this is my first post here, I hope this is the right place to ask this question. I have also asked this on Stack Exchange but I think this might be a more appropriate

Re: chroot with --userspec when chrooting from x86_64 to i686

2012-05-02 Thread Pádraig Brady
On 05/02/2012 12:08 PM, Dmitry V. Levin wrote: On Wed, May 02, 2012 at 10:58:57AM +0100, Pádraig Brady wrote: On 05/02/2012 10:37 AM, Dmitry V. Levin wrote: On Tue, May 01, 2012 at 09:32:20PM +0100, John Lane wrote: Hello, this is my first post here, I hope this is the right place to ask

Re: join more than two files

2012-05-04 Thread Pádraig Brady
On 05/04/2012 02:56 PM, Pádraig Brady wrote: On 01/13/2012 08:49 AM, goodman@gmail.com wrote: Hello, I fairly recently discovered the joys of join, but now I wonder why it is limited to two files? In other words, I would like to do the following: join file1 file2 ... fileN While I

Re: Group results according the indicators appended by -F/--classify (ls --sort=class)

2012-05-04 Thread Pádraig Brady
On 04/27/2012 03:51 AM, aristidesfl wrote: From the man entry: ``` -F, --classify append indicator (one of */=@|) to entries ``` Would be useful for readability purposes to be able group entries according the indicators appended by -F/--classify. A WORD called class could

Re: [PATCH] stat,tail: recognize new FS types: bdevfs, inodefs, qnx6

2012-05-10 Thread Pádraig Brady
On 05/10/2012 02:54 PM, Jim Meyering wrote: Going through the coreutils README-release procedure, I ran make -C src fs-magic-compare on my handy Fedora rawhide VM, and it printed these new symbol names: # define S_MAGIC_BDEVFS 0x62646576 # define S_MAGIC_BINFMTFS 0x42494E4D # define

Re: [RFC/PATCH] cp: Add option to pre-allocate space for files

2012-05-11 Thread Pádraig Brady
On 05/11/2012 04:03 PM, Mark wrote: Hi, Here's a patch for cp which adds a new --preallocate option. When specified, cp allocates disk space for the destination file before writing data. It uses fallocate() with FALLOC_FL_KEEP_SIZE on Linux, falling back to posix_fallocate() if that fails.

bug#9500: [RFC/PATCH] cp: Add option to pre-allocate space for files

2012-05-11 Thread Pádraig Brady
On 05/11/2012 04:03 PM, Mark wrote: Hi, Here's a patch for cp which adds a new --preallocate option. When specified, cp allocates disk space for the destination file before writing data. It uses fallocate() with FALLOC_FL_KEEP_SIZE on Linux, falling back to posix_fallocate() if that fails.

Re: PATCH: relpath

2012-05-14 Thread Pádraig Brady
On 05/13/2012 04:27 AM, Peng Yu wrote: `--relative-base=BASE' Only output relative names when both the `--relative-to' and processed FILEs are descendants of BASE. Otherwise output the absolute file name. Note this option honors the @option{-m} and @option{-e} options

bug#11406: Bug? df uses f_bsize instead of f_frsize to calculate file system sizes

2012-05-14 Thread Pádraig Brady
On 05/12/2012 05:05 AM, Paul Eggert wrote: On 05/11/2012 06:56 PM, Nikolaus Rath wrote: Yes, this works: OK, thanks, I pushed that patch into gnulib, where coreutils should eventually pick it up. I just noticed that the stat command is affected by this as well: Ouch. Perhaps Padraig

Re: PATCH: relpath

2012-05-14 Thread Pádraig Brady
On 05/14/2012 01:39 PM, Peng Yu wrote: On Mon, May 14, 2012 at 3:33 AM, Pádraig Brady p...@draigbrady.com wrote: On 05/13/2012 04:27 AM, Peng Yu wrote: `--relative-base=BASE' Only output relative names when both the `--relative-to' and processed FILEs are descendants of BASE

Fwd: [PULL] su

2012-05-24 Thread Pádraig Brady
Original Message Subject: [PULL] su Date: Thu, 24 May 2012 14:58:01 +0200 From: Ludwig Nussel ludwig.nus...@suse.de To: util-li...@vger.kernel.org Hi, coreutils isn't really interested in maintaining su anymore. Distributions have to add custom patches to fix bugs and add

Re: removing su from coreutils [Re: Fwd: [PULL] su

2012-05-24 Thread Pádraig Brady
On 05/24/2012 02:21 PM, Jim Meyering wrote: Pádraig Brady wrote: Original Message Subject: [PULL] su Date: Thu, 24 May 2012 14:58:01 +0200 From: Ludwig Nussel ludwig.nus...@suse.de To: util-li...@vger.kernel.org Hi, coreutils isn't really interested in maintaining su

Re: removing su from coreutils [Re: Fwd: [PULL] su

2012-05-24 Thread Pádraig Brady
On 05/24/2012 03:07 PM, Jim Meyering wrote: Pádraig Brady wrote: Well it's not clear cut to me, given that su isn't really Linux specific. Right, but how many non-Linux-based systems rely on coreutils' su? When this last came up, that the Hurd needed it was a deciding factor (along

Re: removing su from coreutils [Re: Fwd: [PULL] su

2012-05-29 Thread Pádraig Brady
On 05/29/2012 10:50 AM, Thomas Schwinge wrote: A minor portability patch was all that was needed, http://news.gmane.org/find-root.php?message_id=%3c1337971261-20684-1-git-send-email-tho...@codesourcery.com%3E, and all that has now been merged to util-linux. How to coordinate this with

Fwd: [HEADS-UP] Rawhide: /tmp is now on tmpfs

2012-06-01 Thread Pádraig Brady
on tmpfs Date: Thu, 31 May 2012 11:45:36 +0100 From: Pádraig Brady p...@draigbrady.com Reply-To: Development discussions related to Fedora de...@lists.fedoraproject.org To: Development discussions related to Fedora de...@lists.fedoraproject.org CC: Roberto Ragusa m...@robertoragusa.it On 05/31/2012 08

Re: [HEADS-UP] Rawhide: /tmp is now on tmpfs

2012-06-01 Thread Pádraig Brady
On 06/01/2012 02:13 PM, Jim Meyering wrote: Pádraig Brady wrote: It seems like we should default to /var/tmp in sort(1) and tac(1), as debian and fedora at least are probably moving to tmpfs for /tmp. I'll monitor the situation a bit before making the change. Thanks. Just to be clear

Re: Problem while compiling libstdbuf

2012-06-01 Thread Pádraig Brady
On 06/01/2012 02:17 PM, Basavaraj B wrote: Hi Team, I am compiling coreutils-8.14 on NonStop (TANDEM) platform. Currently I need to compile stdbuf which has libstdbuf.so dependency. I modified configure and configure.ac http://configure.ac to avoid check of $elf_sys and $GCC so that I

bug#11709: allows the user to modify the file when no access is given

2012-06-14 Thread Pádraig Brady
tags + notabug forcemerge 11709 11696 stop I've already answered this request. When you mv a file you're operating on the directory, not the file itself. cheers, Pádraig. On 06/14/2012 08:40 AM, Vai Dy wrote: Hi, It seems to bug in the following scenario. - created directory

[no subject]

2012-06-22 Thread Pádraig Brady
FYI I've just pushed these cleanups. cheers, Pádraig.

[PATCH 2/2] maint: refactor common mode bits used to create files

2012-06-22 Thread Pádraig Brady
* src/system.h (MODE_RW_UGO): The new refactored define (666). * src/mkfifo.c: Use the new define. * src/mknod.c: Likewise. * src/split.c: Likewise. * src/system.h: Likewise. * src/touch.c: Likewise. * src/truncate.c: Likewise. Suggested-by: Jim Meyering --- src/dd.c |2 +-

[PATCH] maint: sc_prohibit_fail_0: update a stale comment

2012-07-02 Thread Pádraig Brady
* cfg.mk (sc_prohibit_fail_0): Following on from commit v8.0-79-g71c2f88, update the comment to match. --- cfg.mk |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/cfg.mk b/cfg.mk index 36458a4..ef8a2c8 100644 --- a/cfg.mk +++ b/cfg.mk @@ -263,9 +263,7 @@

Re: [PATCH 2/2] maint: add syntax-check rule to help avoid misuse of EXIT_FAILURE

2012-07-03 Thread Pádraig Brady
On 07/03/2012 08:19 PM, Jim Meyering wrote: Inspired by the EXIT_FAILURE problem Pádraig spotted and that Paul just fixed, I wrote a new syntax-check rule to help avoid that sort of problem. The following programs must avoid most new uses of EXIT_FAILURE: chroot.c env.c expr.c

[PATCH] tests: sort-merge-fdlimit: reduce the limit by one

2012-07-05 Thread Pádraig Brady
* tests/misc/sort-merge-fdlimit: As a consequence of commit v8.17-34-g59daf05, we can reduce the descriptor limit by one. --- tests/misc/sort-merge-fdlimit |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tests/misc/sort-merge-fdlimit b/tests/misc/sort-merge-fdlimit index

Re: cp with subdirectories following some pattern removed?

2012-07-11 Thread Pádraig Brady
On 07/11/2012 06:13 PM, Pádraig Brady wrote: On 07/11/2012 05:27 PM, Peng Yu wrote: Hi, I need to cp a directories with all the the subdirectories matching a pattern removed (ignore all the test* subdirectories). There can be many solutions to this problem. I'm wondering if anybody is aware

Re: cp with subdirectories following some pattern removed?

2012-07-11 Thread Pádraig Brady
On 07/11/2012 07:44 PM, Jim Meyering wrote: Peng Yu wrote: I need to cp a directories with all the the subdirectories matching a pattern removed (ignore all the test* subdirectories). There can be many solutions to this problem. I'm wondering if anybody is aware of an easy and robust

Re: overly aggressive memory usage by sort.c

2012-07-12 Thread Pádraig Brady
96168117cbde9cb68dabbce2cf34848957462d49 Author: Pádraig Brady p...@draigbrady.com Date: Thu Jul 12 15:02:19 2012 +0100 doc: mention the improved sort memory allocation * NEWS: Mention the improvement. diff --git a/NEWS b/NEWS index 3aff3a8..836ecec 100644 --- a/NEWS +++ b/NEWS @@ -52,6

Re: find ls sort

2012-07-23 Thread Pádraig Brady
On 07/23/2012 06:04 PM, Eric Blake wrote: On 07/23/2012 09:59 AM, Enda wrote: Thanks Pádraig, Eric, Andreas and Jim, This almost gives the output that I want: find * -mtime 0 -exec ls -rt {} + Is there a way to list files not on a separate line, but one after the other with a space in

Re: RFE: hash-type in sum utils

2012-07-24 Thread Pádraig Brady
On 07/24/2012 12:18 PM, Ondrej Oprala wrote: Hello, I'd like to consult this RFE http://lists.gnu.org/archive/html/bug-coreutils/2009-11/msg00341.html and find out if my proposed solutions would be satisfactory. There shouldn't be a problem with printing the hash-type prefix before

Re: RFE: hash-type in sum utils

2012-07-24 Thread Pádraig Brady
On 07/24/2012 02:44 PM, Pádraig Brady wrote: On 07/24/2012 12:18 PM, Ondrej Oprala wrote: Hello, I'd like to consult this RFE http://lists.gnu.org/archive/html/bug-coreutils/2009-11/msg00341.html and find out if my proposed solutions would be satisfactory. There shouldn't be a problem

Re: RFE: hash-type in sum utils

2012-07-25 Thread Pádraig Brady
On 07/25/2012 02:23 PM, Ondrej Oprala wrote: How should the '--tag' switch treat binary files? Should it create something like this: MD5 (*filename) = ? Good question. I wouldn't tag the filenamem because to be unambiguous you'd have to have a space before the filename in text

Re: [PATCH] tail: avoid misleading diagnostic upon fstat failure

2012-07-26 Thread Pádraig Brady
On 07/26/2012 11:38 AM, Jim Meyering wrote: FYI. This bug seems hard enough to trigger and low enough impact that the fix does not deserve an entry in NEWS. Provoking the failure might be tricky, since in addition to causing fstat failure, you'd have to make the intervening close (via

Re: RFE: hash-type in sum utils

2012-07-26 Thread Pádraig Brady
On 07/26/2012 12:59 PM, Ondrej Oprala wrote: Ok, here is my patch proposition. I hope it's satisfactory. Thanks for doing that! I've attached a mainly formatting cleanup patch. BTW be careful with strlen() in a for loop test. That may not be optimized by the compiler, especially when the passed

Re: Bug#682969: timeout 20 /usr/sbin/ntpd -g -q gives wrong return code

2012-07-27 Thread Pádraig Brady
On 07/27/2012 05:56 PM, Jim Meyering wrote: Goswin von Brederlow wrote: Package: coreutils Version: 8.13-3.2 Severity: normal File: /usr/bin/timeout I'm trying to set the time during boot. Unfortunately ntpd hangs forever if the timeserver is unavailable. So I added a timeout to it so the

Re: coreutils-8.18: ready for release?

2012-08-01 Thread Pádraig Brady
On 08/01/2012 12:41 PM, Jim Meyering wrote: Now that util-linux has made a v2.22-rc release with improved su[1], I'd like to make a coreutils release (which removes su altogether). There's enough new code in md5sum --tag that I will defer adding that feature until after 8.18. I've just

Re: [PATCH] tail: avoid rare error-path FD leak

2012-08-02 Thread Pádraig Brady
On 08/02/2012 03:52 PM, Jim Meyering wrote: FYI, From 81806035310c5c16b1b11c88709bf066305ed160 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Fri, 27 Jul 2012 23:42:05 +0200 Subject: [PATCH] tail: avoid rare error-path FD leak * src/tail.c (tail_forever): Close FD

Re: [PATCH] split: plug a nominal leak

2012-08-03 Thread Pádraig Brady
On 08/03/2012 01:53 PM, Jim Meyering wrote: I ran make check on valgrind-wrapped tools (took most of a day on a 6/12-core system) and saw split at the top of the list of definitely lost buffer leaks. So far, the only ones I've investigated are not important, but at least now, they are plugged

Re: [PATCH] split: plug a nominal leak

2012-08-04 Thread Pádraig Brady
On 08/04/2012 10:12 AM, Jim Meyering wrote: Pádraig Brady wrote: On 08/03/2012 01:53 PM, Jim Meyering wrote: I ran make check on valgrind-wrapped tools (took most of a day on a 6/12-core system) and saw split at the top of the list of definitely lost buffer leaks. So far, the only ones I've

Re: [PATCH] truncate: don't leak a file descriptor with --ref=PIPE

2012-08-04 Thread Pádraig Brady
On 08/04/2012 10:06 AM, Jim Meyering wrote: FYI, From 0ee727e612ae202e5b47e39062f6604d65a76074 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Sat, 4 Aug 2012 11:02:40 +0200 Subject: [PATCH] truncate: don't leak a file descriptor with --ref=PIPE * src/truncate.c

Re: [PATCH] truncate: don't leak a file descriptor with --ref=PIPE

2012-08-04 Thread Pádraig Brady
On 08/04/2012 11:26 AM, Jim Meyering wrote: Pádraig Brady wrote: On 08/04/2012 10:06 AM, Jim Meyering wrote: ... Subject: [PATCH] truncate: don't leak a file descriptor with --ref=PIPE * src/truncate.c (main): For a user who makes the mistake of using a non-seekable file as a reference

Re: [PATCH] df: fix exit code and ensure printing unprocessed msg when totaling

2012-08-04 Thread Pádraig Brady
Pushed with Jim's improvement. http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=3b8139e cheers, Pádraig.

[PATCH] wc,*sum: indicate potentially more performant buffering

2012-08-05 Thread Pádraig Brady
We already use _IOLBF so that we output lines atomically. However there is no need to output lines _immediately_ and doing so can cause overhead. For example on recent GNU/Linux systems, processes writing to a pipe, will encourage the process reading the pipe to wake up. Thus if processing many

Re: cp preserves mode with --no-preserve=mode

2012-08-07 Thread Pádraig Brady
On 08/06/2012 12:29 PM, Ondrej Oprala wrote: Hi, I'd like to propose a fix for a bug mentioned in the redhat bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=755508 The patch adds another boolean instead of a proposed tristate, thus not upsetting any existing code. Also, if the behaviour

Re: new snapshot available: coreutils-8.17.70-1bacb4

2012-08-08 Thread Pádraig Brady
On 08/08/2012 03:57 PM, Jim Meyering wrote: Here's a preview of what coreutils-8.18 should look like. I noticed one spurious test failure reported by the Nixos Hydra autobuilder: http://hydra.nixos.org/build/2924158 It's in the most recently added test, so we'll probably have to fix it

Re: using dd to prepare a file to be written to memory blocks(remove padding)

2012-08-08 Thread Pádraig Brady
On 08/09/2012 12:08 AM, Justin Mattock wrote: im not on the list so please cc's me, and if this is the wrong list for this question then let me know so I may find the right one to find info. what are the tools to _prepare_ a file to be uploaded to memory(right now im using dd)? is there a

Re: removing su from coreutils [Re: Fwd: [PULL] su

2012-08-20 Thread Pádraig Brady
On 05/24/2012 02:50 PM, Pádraig Brady wrote: Note Fedora and Suse use su from coreutils while debian use their own: http://pkg-shadow.alioth.debian.org/ Note also Fedora has `runuser` which is based on su: http://pkgs.fedoraproject.org/gitweb/?p=coreutils.git;a=blob;f=coreutils-8.7

Re: Premature removal of su from coreutils

2012-08-21 Thread Pádraig Brady
On 08/21/2012 04:14 PM, Philipp Thomas wrote: Why was su removed from coreutils before util-linux 2.22, which will include the enhanced su, has been released? Now I have to wait for the release of util-linux before I can make packages of 8.18 or newer. Yes not ideal, but we did communicate on

Re: RFE: hash-type in sum utils

2012-08-22 Thread Pádraig Brady
On 08/22/2012 03:00 PM, Ondrej Oprala wrote: Hi, I haven't heard from this thread since I posted the last patch, are there still things to correct or should I consider it closed? The --tag description in the texinfo is a bit sparse. It says: If the file is not binary, put a leading whitespace

Re: comm: use numeric sort (optionally)

2012-08-22 Thread Pádraig Brady
unarchive 6366 stop On 08/22/2012 09:17 PM, Sam Steingold wrote: Hi, I have a file of numbers (integers IDs) which are sorted numerically, but comm complains that they are not. I suggest that comm accept -n option (like sort) to use numeric sort. Thanks. Yes. comm, join, uniq really should

Re: RFE: hash-type in sum utils

2012-08-24 Thread Pádraig Brady
On 07/26/2012 04:50 PM, Pádraig Brady wrote: BTW, I'm wondering why we enable escaping on output when there are '\' characters in the name, but no '\n' chars? Avoiding that would increase compatibility with the BSDs. But also complicate unescaping within and outside of *sum. So I won't change

Re: RFE: hash-type in sum utils

2012-08-24 Thread Pádraig Brady
On 08/23/2012 10:31 AM, Ondrej Oprala wrote: On 08/23/2012 11:16 AM, Pádraig Brady wrote: On 08/23/2012 10:06 AM, Ondrej Oprala wrote: echo -E $ex_output exp That's using the shell's version which may not be portable. To select the built echo binary use: env echo ... Or even better, use

Re: sort: new feature: use environment variable to set buffer size

2012-08-29 Thread Pádraig Brady
On 08/29/2012 09:50 PM, Assaf Gordon wrote: Hello, I'd like to suggest a new feature to sort: the ability to set the buffer size (-S/--buffer-size X) using an environment variable. In summary: $ export SORT_BUFFER_SIZE=20G $ someprogram | sort -k1,1 output.txt # sort will use 20G

Re: [PATCH] tests: misc/sort-exit-early: do not run as root.

2012-08-29 Thread Pádraig Brady
On 08/29/2012 11:02 PM, Nick Alcock wrote: This test requires an unwritable input and an unreadable output, so will fail if the testsuite is being run as root, and should not be run in this case. --- tests/misc/sort-exit-early | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH] create a convenient function to align/print option help text

2012-09-03 Thread Pádraig Brady
On 09/03/2012 11:13 AM, Nguyen Thai Ngoc Duy wrote: On Mon, Sep 3, 2012 at 3:15 PM, Pádraig Brady p...@draigbrady.com wrote: Would you be willing to update the translations as a group, if I concentrated on the coreutils side? I think I could. Ok great. I'll look at the coreutils side

[PATCH] maint: add more control flags to mbsalign

2012-09-08 Thread Pádraig Brady
In support of the upcoming `df --output` and $cmd --help auto alignment changes, the attached patch gives more formatting control to callers of mbsalign(). cheers, Pádraig. From 47842f53d4b3dd3aee529d1a50001851903454fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?=

Re: [PATCH] maint: add more control flags to mbsalign

2012-09-10 Thread Pádraig Brady
On 09/10/2012 08:11 PM, Jim Meyering wrote: Subject: [PATCH] maint: add more control flags to mbsalign * gl/lib/mbsalign.h: Add MBA_UNIBYTE_ONLY (to allow faster processing), and MBA_NO_{LEFT,RIGHT}_PAD It's slightly better to spell out those symbol names, to ease log searching. + /*

Re: [PATCH] build: graceful degradation in man pages generation if perl is lacking

2012-09-12 Thread Pádraig Brady
On 09/12/2012 08:48 AM, Stefano Lattarini wrote: In our situation, the best and simplest way to implement a graceful degradation it to keep the correct dependencies for man pages (that is, man/ls.1: src/ls), and if perl is not present, just generate dummy man pages reporting that built-time

Re: bug#8938: make timeout and CTRL-C

2012-09-12 Thread Pádraig Brady
On 08/25/2011 11:35 AM, Pádraig Brady wrote: I'm committing this revert now... From d00c73cf4d6402dbacc7cd587127a16a0e93724c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?=p...@draigbrady.com Date: Thu, 25 Aug 2011 11:25:30 +0100 Subject: [PATCH] timeout: revert signal

Re: [PATCH] maint: mbsalign.h: fix typo from previous comment edit

2012-09-12 Thread Pádraig Brady
On 09/12/2012 04:25 PM, Bernhard Voelker wrote: From 40c8f1c766cc1b8bba32be270ceb7dfc3df493c3 Mon Sep 17 00:00:00 2001 From: Bernhard Voelkerm...@bernhard-voelker.de Date: Tue, 11 Sep 2012 23:57:25 +0200 Subject: [PATCH] maint: mbsalign.h: fix typo from previous comment edit *

Re: [HEADS-UP] Rawhide: /tmp is now on tmpfs

2012-09-12 Thread Pádraig Brady
On 06/01/2012 02:05 PM, Pádraig Brady wrote: It seems like we should default to /var/tmp in sort(1) and tac(1), as debian and fedora at least are probably moving to tmpfs for /tmp. I'll monitor the situation a bit before making the change. Thinking a bit more about this, as I see it: /tmp

Re: 70x speed-up for seq's common cases

2012-09-14 Thread Pádraig Brady
On 09/14/2012 07:54 AM, Jim Meyering wrote: Inspired by Pádraig's April-fools post, http://thread.gmane.org/gmane.comp.gnu.coreutils.general/972 and spurred by the fact that Torbjorn and Niels had to roll their own seq-like program to test their new factoring code

Re: perl tests not using correct $PATH

2012-09-14 Thread Pádraig Brady
On 09/14/2012 04:54 PM, Jim Meyering wrote: Pádraig Brady wrote: I just did this and noticed that seq from my system rather than the just build seq was used. make check TESTS=tests/misc/seq.pl SUBDIRS=. I'll look later tonight, but someone might know off the top of their heads what

Re: 70x speed-up for seq's common cases

2012-09-14 Thread Pádraig Brady
On 09/15/2012 01:49 AM, Torbjorn Granlund wrote: For general seq use, I suppose we should do away with `incr' and instead use a general `add'. Below is a suggested implementation, and as bonus also a `sub'. Like `incr', `add' needs an extra byte if space, since if the end value is within the

Re: 70x speed-up for seq's common cases

2012-09-15 Thread Pádraig Brady
On 09/15/2012 12:24 PM, Torbjorn Granlund wrote: Pádraig Bradyp...@draigbrady.com writes: For comparison here is an add function that used to be in coreutils: http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=blob;f=src/getlimits.c;hb=a2be861b#l81 Same thing, very different styles. I

Re: df: the inode format and various block-size arguments

2012-09-17 Thread Pádraig Brady
On 09/17/2012 07:39 AM, Bernhard Voelker wrote: Working on the new --output option for df, I realized that 'df -i' only honors the --block-size arguments 'si' and 'human-readable', but not arbitrary values like '1M': $ for o in human-readable si M 1M ; do \ src/df -i --block-size=$o .

Re: df: --inodes versus --portability mode

2012-09-18 Thread Pádraig Brady
On 09/18/2012 10:47 AM, Bernhard Voelker wrote: According to the info pages, the -P mode is like the default mode: `-P' `--portability' Use the POSIX output format. This is like the default format except for the following: 1. The information about each file system is

Re: [PATCH] doc: NEWS: mention the conversion to non-recursive make

2012-09-18 Thread Pádraig Brady
On 09/18/2012 02:21 PM, Jim Meyering wrote: + was seen when running parallel make check. s/check/syntax-check/ ? cheers, Pádraig.

Re: df: --inodes versus --portability mode

2012-09-19 Thread Pádraig Brady
On 09/18/2012 11:54 AM, Bernhard Voelker wrote: On 09/18/2012 12:04 PM, Pádraig Brady wrote: On 09/18/2012 10:47 AM, Bernhard Voelker wrote: For the implementation of the new --output option, and the cleanup necessarily coming with it, I'd like to fix that so that a -P will override a previous

Re: df --output

2012-09-21 Thread Pádraig Brady
On 09/21/2012 03:51 AM, Bernhard Voelker wrote: Finally, I made it the whole long way to df's new --output option. Example use: $ src/df --o=target,ipcent,pcent . Mounted on IUse% Use% /media/sdb55% 75% The discussion about it started with http://bugs.gnu.org/10915. The biggest

Re: df --output

2012-10-01 Thread Pádraig Brady
On 09/30/2012 05:43 PM, Bernhard Voelker wrote: On 09/29/2012 11:29 PM, Bernhard Voelker wrote: Here you are (see attached): [PATCH 20/20] df: print total in grand total's target field if no source [PATCH 19/20] df: cleanup comments regarding double blank after [PATCH 18/20] df: add a test for

[PATCH] factor: fix integer validation and GMP fallback

2012-10-08 Thread Pádraig Brady
In the recent factor rewrite, the GMP code wasn't actually used; just an error was printed on integer overflow. While fixing that it was noticed that correct input validation wasn't done in all cases when falling back to the GMP code. * src/factor.c (print_factors) Fallback to GMP on overflow.

factor: new GMP slow down?

2012-10-08 Thread Pádraig Brady
With the new factor rewrite I've noticed a large slowdown, with the GMP path. No time to investigate at present... $ time ~/git/coreutils/src/factor '4' gmp

Re: Make mv work better with SELinux.

2012-10-08 Thread Pádraig Brady
On 10/08/2012 09:24 PM, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 One of if not the most common problem people hit with SELinux is the mv command, which maintains the file context of the source destination. mv /home/dwalsh/index.html /var/www/html/ This blows up on

Re: factor: new GMP slow down?

2012-10-08 Thread Pádraig Brady
On 10/08/2012 21:46 PM, Torbjörn Granlund wrote: On 10/08/2012 05:01 PM, Pádraig Brady wrote: With the new factor rewrite I've noticed a large slowdown, with the GMP path. No time to investigate at present... $ time ~/git/coreutils/src/factor

Re: [PATCH] factor: fix integer validation and GMP fallback

2012-10-08 Thread Pádraig Brady
On 10/08/2012 06:10 PM, Jim Meyering wrote: Jim Meyering wrote: Pádraig Brady wrote: In the recent factor rewrite, the GMP code wasn't actually used; just an error was printed on integer overflow. While fixing that it was noticed that correct input validation wasn't done in all cases when

Re: 8.20 release plan?

2012-10-17 Thread Pádraig Brady
On 10/17/2012 03:07 AM, Jim Meyering wrote: Hi Pádraig, Would you please review this? [ cp: avoid data-corrupting free-memory-read ] http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/25139/focus=25151 Thanks for handling this. The fix looks good, and I can't see any other

Re: issues with new factor on sparc

2012-10-22 Thread Pádraig Brady
On 10/22/2012 02:21 PM, Pádraig Brady wrote: compile warning with gcc 3.4.3 on SunOS login 5.10 Generic_147440-19 sun4v sparc SUNW,SPARC-Enterprise-T5220 src/factor.c: In function `factor_using_pollard_rho2': src/factor.c:1535: warning: right shift count = width of type src/factor.c:1558

more compile warnings with new factor

2012-10-22 Thread Pádraig Brady
If I manually undef HAVE_GMP at the top of factor.c, then... $ make src/factor.o src/factor.c:154:0: error: macro __GMP_GNUC_PREREQ is not used [-Werror=unused-macros] $ make CFLAGS=-m32 src/factor.o src/factor.c: In function 'factor_using_division': src/factor.c:755:33: error: variable 'lo'

Re: more compile warnings with new factor

2012-10-23 Thread Pádraig Brady
On 10/23/2012 08:46 AM, Jim Meyering wrote: Torbjorn Granlund wrote: Pádraig Brady p...@draigbrady.com writes: If I manually undef HAVE_GMP at the top of factor.c, then... $ make src/factor.o src/factor.c:154:0: error: macro __GMP_GNUC_PREREQ is not used [-Werror=unused-macros

Re: more compile warnings with new factor

2012-10-23 Thread Pádraig Brady
This patchset should address all factor compiler issues in this thread. cheers, Pádraig.

[PATCH 3/3] build: avoid warnings about unused variables and macros

2012-10-23 Thread Pádraig Brady
src/factor.c (__GMP_DECLSPEC): Move back from longlong.h to treat consistently with other stub macros. (__GMP_GNUC_PREREQ): Reference to avoid -Wunused-macros warning. (__GMP_DECLSPEC): Likewise. (ASSERT): Likewise. (__clz_tab): Likewise. (factor_using_division): Mark variable as unused.

Re: [PATCH 2/3] build: avoid compile warnings in factor.c on some systems

2012-10-23 Thread Pádraig Brady
On 10/23/2012 01:13 PM, Jim Meyering wrote: Thanks. I confirmed that this addresses the problem. Did you consider other ways of addressing it, say without adding that cast? Imagine that someone adds another addmod2 use in this code... They will have to know to widen any argument that may be

Re: more compile warnings with new factor

2012-10-23 Thread Pádraig Brady
On 10/23/2012 11:20 AM, Jim Meyering wrote: Pádraig Brady wrote: On 10/23/2012 08:46 AM, Jim Meyering wrote: Torbjorn Granlund wrote: Pádraig Brady p...@draigbrady.com writes: ... Aren't this Draconian options (ask the compiler to nag about everything it can, then treat nagging as errors

Re: pr: floating-point error

2012-10-24 Thread Pádraig Brady
On 10/24/2012 10:26 AM, Pádraig Brady wrote: On 10/24/2012 09:03 AM, Ondrej Oprala wrote: Hello, one of our customers made a bug report, stating that pr -nNUM FILE causes a floating point exception if NUM = 32 and I would really like to hear your opinion on how to solve this. The easiest

[PATCH] maint: refactor tests/misc/pr.pl into tests/pr/pr-tests.pl

2012-10-24 Thread Pádraig Brady
* tests/misc/pr.pl: Refactor this test into ... * tests/pr/pr-tests.pl: ... here. * tests/local.mk: Remove the reference to the removed test * tests/pr/m-w-t-1: Input file for the refactored test. * tests/pr/m-w-t-2: Likewise. * tests/pr/m-w-t-3: Likewise. --- tests/local.mk |1 -

Re: bug#12715: [PATCH] build: do not require help2man at build-from-tarball time

2012-10-26 Thread Pádraig Brady
On 10/26/2012 10:34 AM, Jim Meyering wrote: +** Build-related + + The generated man/*.1 man pages are no longer distributed. Building + without perl, you would create stub man pages, and besides would be + unable to run a significant percentage of the tests (so don't do that!). + Thus,

Re: bug#12715: [PATCH] build: do not require help2man at build-from-tarball time

2012-10-26 Thread Pádraig Brady
On 10/26/2012 10:50 AM, Jim Meyering wrote: Pádraig Brady wrote: On 10/26/2012 10:34 AM, Jim Meyering wrote: +** Build-related + + The generated man/*.1 man pages are no longer distributed. Building + without perl, you would create stub man pages, and besides would be + unable to run

[PATCH] tests: use sub-second timeouts to speed up a timeout test

2012-10-28 Thread Pádraig Brady
* tests/misc/timeout.sh: Take advantage of recent support for sub-second timeouts to decrease runtime from about 6s to 2s. --- tests/misc/timeout.sh |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/misc/timeout.sh b/tests/misc/timeout.sh index 3fa8522..662b4be

Re: Make coretutils work better with SELinux.

2012-10-31 Thread Pádraig Brady
On 10/30/2012 02:43 PM, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 For some reason I could not get git to take more then a one line comment. This is the comment I was trying to add. build: Change -Z opt w/out arg label target with default label The

Re: Make coretutils work better with SELinux.

2012-11-01 Thread Pádraig Brady
On 11/01/2012 06:42 PM, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/01/2012 11:47 AM, Pádraig Brady wrote: On 11/01/2012 01:20 PM, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/31/2012 08:54 PM, Pádraig Brady wrote: On 10/30/2012 02

[PATCH] tests: use sub-second timeouts to speed up a timeout test

2012-11-03 Thread Pádraig Brady
* tests/misc/timeout.sh: Take advantage of recent support for sub-second timeouts to decrease runtime from about 6s to 2s. --- tests/misc/timeout.sh |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/misc/timeout.sh b/tests/misc/timeout.sh index 66d6956..8db27c7

[PATCH] doc: update info cross reference to bash

2012-11-03 Thread Pádraig Brady
* doc/coreutils.texi (tee invocation): Reference the bash manual rather than bashref, as the latter is more likely to work on newer systems. --- doc/coreutils.texi |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index

Re: [PATCH] maint: fix factor's test file name pattern in .gitignore

2012-11-05 Thread Pádraig Brady
On 11/05/2012 07:39 PM, Bernhard Voelker wrote: I missed to adapt .gitignore in v8.20-9-g1cace4a, sorry. Have a nice day, Berny From c1d6ac0bd57817ceb3436d84170fe0c922fcb50f Mon Sep 17 00:00:00 2001 From: Bernhard Voelker m...@bernhard-voelker.de Date: Mon, 5 Nov 2012 20:35:13 +0100

Re: df --output

2012-11-06 Thread Pádraig Brady
On 09/30/2012 05:43 PM, Bernhard Voelker wrote: On 09/29/2012 11:29 PM, Bernhard Voelker wrote: Here you are (see attached): [PATCH 20/20] df: print total in grand total's target field if no source [PATCH 19/20] df: cleanup comments regarding double blank after [PATCH 18/20] df: add a test for

Re: df --output

2012-11-07 Thread Pádraig Brady
On 11/07/2012 08:33 AM, Bernhard Voelker wrote: On 11/07/2012 04:09 AM, Pádraig Brady wrote: I've finished my review. Sorry for the delay. Thank you, no worries. I've made a couple of adjustments in the attached df--output-adjustments.patch The first is to rename --output=total to --output

Re: df --output

2012-11-07 Thread Pádraig Brady
On 11/07/2012 11:48 AM, Bernhard Voelker wrote: On 11/07/2012 12:23 PM, Pádraig Brady wrote: I've rolled the patch set up to 3 patches here: http://www.pixelbeat.org/patches/coreutils/df--output-merge.patch.bz2 which I'll merge later today. Hi Padraig, thanks - although I still don't

Re: Make mv work better with SELinux.

2012-11-08 Thread Pádraig Brady
On 11/08/2012 10:20 PM, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Another pass at the patch. This time -Z is not optional, only --context is. - -Z or --context indicates use default label. - --context=CTX uses previous behavior. You can now do cp -aZ and cp -Za

Re: [PATCH] df: port the new df test to POSIX sed, larger file systems

2012-11-09 Thread Pádraig Brady
On 11/09/2012 09:50 AM, Bernhard Voelker wrote: On 11/09/2012 10:13 AM, Paul Eggert wrote: * tests/df/df-output.sh: For the test df -B1K --output=size, do not assume that the file system size fits in 9 bytes; it might be larger than that, so omit leading space. Also, use portable 'sed'

Re: [PATCH] maint: fix factor's tests to use coreutil's own sha1sum

2012-11-09 Thread Pádraig Brady
On 11/09/2012 02:12 PM, Bernhard Voelker wrote: From 3b16882dc7af6b84ad269f42a8d611c1fdcd0493 Mon Sep 17 00:00:00 2001 From: Bernhard Voelker m...@bernhard-voelker.de Date: Fri, 9 Nov 2012 15:09:05 +0100 Subject: [PATCH] maint: fix factor's tests to use coreutil's own sha1sum Since this is a

bug#11150: getlogin test failure

2012-11-09 Thread Pádraig Brady
On 08/13/2012 03:02 PM, Jim Meyering wrote: Andrew Warshall wrote: I'm seeing the same issue with 8.18. Apparently xterm doesn't write to /var/run/utmp by default, so getlogin () fails with errno == ENOENT. However, isatty (0) still succeeds. The attached patch (based on, though

Re: [feature-propsal] mv leaving symlink behind

2012-11-11 Thread Pádraig Brady
On 11/10/2012 10:53 PM, Dmitry Bogatov wrote: Hello! I have idea about adding functionality of moving file and adding symbolic link at previous place, that links to new place. What your opinion, would it be useful? For me, it would be quick way to move configuration file into VCS directory. I

<    1   2   3   4   5   6   7   8   9   10   >