bug#19377: bug#19376: [PATCH 4/4] build: use -pi.bak instead of -pi

2014-12-14 Thread KO Myung-Hun


Jim Meyering wrote:
> On Sun, Dec 14, 2014 at 5:25 AM, Pádraig Brady  wrote:
>> forcemerge 19376 19377
>> stop
>>
>> On 14/12/14 03:47, KO Myung-Hun wrote:
>>> This fixes the following error.
>>>
>>> -
>>> Can't do inplace edit without backup.
>>> -
>>>
>>> * Makefile.am (dist-hook): Use -pi.bak instead of -pi.
>>> * bootstrap.conf (bootstrap_epilogue): Likewise.
>>> ---
>>>  Makefile.am| 2 +-
>>>  bootstrap.conf | 2 +-
>>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/Makefile.am b/Makefile.am
>>> index fb4af27..371eb59 100644
>>> --- a/Makefile.am
>>> +++ b/Makefile.am
>>> @@ -105,7 +105,7 @@ BUILT_SOURCES = .version
>>>  # See the rm_subst comment for details.
>>>  dist-hook: gen-ChangeLog
>>>   $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
>>> - $(AM_V_at)perl -pi -e '$(rm_subst)' $(distdir)/Makefile.in
>>> + $(AM_V_at)perl -pi.bak -e '$(rm_subst)' $(distdir)/Makefile.in
>>>
>>>  gen_start_date = 2008-02-08
>>>  .PHONY: gen-ChangeLog
>>> diff --git a/bootstrap.conf b/bootstrap.conf
>>> index c0b5f02..0baf455 100644
>>> --- a/bootstrap.conf
>>> +++ b/bootstrap.conf
>>> @@ -366,7 +366,7 @@ bootstrap_epilogue()
>>># Why?  That pipeline searches all files in $(top_srcdir), and if you
>>># happen to have large files (or apparently large sparse files), the
>>># first grep may well run out of memory.
>>> -  perl -pi -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; then/' \
>>> +  perl -pi.bak -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; 
>>> then/' \
>>>  po/Makefile.in.in
>>>
>>># Install our git hooks, as long as "cp" accepts the --backup option,
>>
>> This will leave .bak files in place on all platforms which isn't ideal.
>> Pity `perl -i` doesn't handle the platform differences transparently.
>> Does sed -i behave better. That's less portable though could be tried
>> and then fall back to perl -i.
> 
> Actually, neither of those uses of perl -pi is run by one who builds
> from a distribution tarball.  Only people who build from git and who
> run "make dist" will run those commands, so I think it is fine to
> require a working version of perl for those uses.
> 

Yes, getting a working perl would be better.

> i.e., I would prefer not to incur the cost of ugly work-around
> changes here for what appears to be a very "fringe" platform.

Ah, ok. This is a destiny of a very "fringe" platform.

Thanks.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr






bug#19377: bug#19378: [PATCH 3/4] cat, chcon, chgrp, chmod, chown, cp, du, head: support wildcards on OS/2

2014-12-14 Thread KO Myung-Hun


Pádraig Brady wrote:
> forcemerge 19378 19377
> stop
> 
> On 14/12/14 03:47, KO Myung-Hun wrote:
>> And ln,ls,mv,rm,tail.
>>
>> * src/cat.c (main): Expand wildcards on OS/2.
>> * src/chcon.c (main): Likewise.
>> * src/chgrp.c (main): Likewise.
>> * src/chmod.c (main): Likewise.
>> * src/chown.c (main): Likewise.
>> * src/cp.c (main): Likewise.
>> * src/du.c (main): Likewise.
>> * src/head.c (main): Likewise.
>> * src/ln.c (main): Likewise.
>> * src/ls.c (main): Likewise.
>> * src/mv.c (main): Likewise.
>> * src/rm.c (main): Likewise.
>> * src/tail.c (main): Likewise.
>>
>> Patches from coreutils 8.8 by Paul Smedley.
> 
>> diff --git a/src/cat.c b/src/cat.c
>> index c7bb7e1..0138114 100644
>> --- a/src/cat.c
>> +++ b/src/cat.c
>> @@ -544,6 +544,10 @@ main (int argc, char **argv)
>>bool show_tabs = false;
>>int file_open_mode = O_RDONLY;
>>  
>> +#ifdef __OS2__
>> +  _wildcard (&argc, &argv);
>> +#endif
>> +
> 
> Interesing, the OS/2 shell doesn't doe the globbing.

Ported unixy shells(sh) support it, but OS/2 default shell(CMD) does not.

> I'm wondering about the scalability of this.
> Are there any facilities for dealing with arbitrary numbers
> of files, like with xargs for example?

No. It always processes all files.

> What are the practical limits of the number of files?

It's up to a free memory.

> Does _wildcard() exit with an error in this case?
> 

Call exit(255) with printing an error message.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr






bug#19374: [PATCH 2/4] build: configure.ac: support a response file on OS/2

2014-12-14 Thread KO Myung-Hun


Pádraig Brady wrote:
> forcemerge 19374 19377
> stop
> 
> On 14/12/14 03:47, KO Myung-Hun wrote:
>> * configure.ac (LDFLAGS): Add -Zargs-resp on os2*.
> 
> This imparts no information.  Please comment as to the "why"
> rather than the "what".
> 

Fixed.

>> ---
>>  configure.ac | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 0744964..7cb1085 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -589,6 +589,9 @@ AM_GNU_GETTEXT_VERSION([0.18.1])
>>  # For a test of uniq: it uses the $LOCALE_FR envvar.
>>  gt_LOCALE_FR
>>  
>> +# In order to support a response file on OS/2
>> +AS_CASE([$host_os], [os2*], [LDFLAGS="$LDFLAGS -Zargs-resp"])
> 
> This relies on an implicit AC_CANONICAL_HOST which seems brittle.
> 

Fixed.


-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

>From 8165ae870666afb45a4e4c6af659c99d324e917a Mon Sep 17 00:00:00 2001
From: KO Myung-Hun 
Date: Mon, 24 Nov 2014 14:02:00 +0900
Subject: [PATCH] build: configure.ac: support a response file on OS/2

By default, a response file(@file) is not supported on OS/2. This
enables that support.

* configure.ac (AC_CANONICAL_HOST): Added for host_os.
(LDFLAGS): Add -Zargs-resp on os2*.
---
 configure.ac | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/configure.ac b/configure.ac
index f078034..92e3ee1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -595,6 +595,12 @@ AM_GNU_GETTEXT_VERSION([0.18.1])
 # For a test of uniq: it uses the $LOCALE_FR envvar.
 gt_LOCALE_FR
 
+# For host_os
+AC_CANONICAL_HOST
+
+# In order to support a response file on OS/2
+AS_CASE([$host_os], [os2*], [LDFLAGS="$LDFLAGS -Zargs-resp"])
+
 AC_CONFIG_FILES(
   Makefile
   po/Makefile.in
-- 
1.8.5.2



bug#19377: bug#19376: [PATCH 4/4] build: use -pi.bak instead of -pi

2014-12-14 Thread Jim Meyering
On Sun, Dec 14, 2014 at 5:25 AM, Pádraig Brady  wrote:
> forcemerge 19376 19377
> stop
>
> On 14/12/14 03:47, KO Myung-Hun wrote:
>> This fixes the following error.
>>
>> -
>> Can't do inplace edit without backup.
>> -
>>
>> * Makefile.am (dist-hook): Use -pi.bak instead of -pi.
>> * bootstrap.conf (bootstrap_epilogue): Likewise.
>> ---
>>  Makefile.am| 2 +-
>>  bootstrap.conf | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index fb4af27..371eb59 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -105,7 +105,7 @@ BUILT_SOURCES = .version
>>  # See the rm_subst comment for details.
>>  dist-hook: gen-ChangeLog
>>   $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
>> - $(AM_V_at)perl -pi -e '$(rm_subst)' $(distdir)/Makefile.in
>> + $(AM_V_at)perl -pi.bak -e '$(rm_subst)' $(distdir)/Makefile.in
>>
>>  gen_start_date = 2008-02-08
>>  .PHONY: gen-ChangeLog
>> diff --git a/bootstrap.conf b/bootstrap.conf
>> index c0b5f02..0baf455 100644
>> --- a/bootstrap.conf
>> +++ b/bootstrap.conf
>> @@ -366,7 +366,7 @@ bootstrap_epilogue()
>># Why?  That pipeline searches all files in $(top_srcdir), and if you
>># happen to have large files (or apparently large sparse files), the
>># first grep may well run out of memory.
>> -  perl -pi -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; then/' \
>> +  perl -pi.bak -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; then/' 
>> \
>>  po/Makefile.in.in
>>
>># Install our git hooks, as long as "cp" accepts the --backup option,
>
> This will leave .bak files in place on all platforms which isn't ideal.
> Pity `perl -i` doesn't handle the platform differences transparently.
> Does sed -i behave better. That's less portable though could be tried
> and then fall back to perl -i.

Actually, neither of those uses of perl -pi is run by one who builds
from a distribution tarball.  Only people who build from git and who
run "make dist" will run those commands, so I think it is fine to
require a working version of perl for those uses.

i.e., I would prefer not to incur the cost of ugly work-around
changes here for what appears to be a very "fringe" platform.





bug#19377: bug#19376: [PATCH 4/4] build: use -pi.bak instead of -pi

2014-12-14 Thread Pádraig Brady
forcemerge 19376 19377
stop

On 14/12/14 03:47, KO Myung-Hun wrote:
> This fixes the following error.
> 
> -
> Can't do inplace edit without backup.
> -
> 
> * Makefile.am (dist-hook): Use -pi.bak instead of -pi.
> * bootstrap.conf (bootstrap_epilogue): Likewise.
> ---
>  Makefile.am| 2 +-
>  bootstrap.conf | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index fb4af27..371eb59 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -105,7 +105,7 @@ BUILT_SOURCES = .version
>  # See the rm_subst comment for details.
>  dist-hook: gen-ChangeLog
>   $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
> - $(AM_V_at)perl -pi -e '$(rm_subst)' $(distdir)/Makefile.in
> + $(AM_V_at)perl -pi.bak -e '$(rm_subst)' $(distdir)/Makefile.in
>  
>  gen_start_date = 2008-02-08
>  .PHONY: gen-ChangeLog
> diff --git a/bootstrap.conf b/bootstrap.conf
> index c0b5f02..0baf455 100644
> --- a/bootstrap.conf
> +++ b/bootstrap.conf
> @@ -366,7 +366,7 @@ bootstrap_epilogue()
># Why?  That pipeline searches all files in $(top_srcdir), and if you
># happen to have large files (or apparently large sparse files), the
># first grep may well run out of memory.
> -  perl -pi -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; then/' \
> +  perl -pi.bak -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; then/' \
>  po/Makefile.in.in
>  
># Install our git hooks, as long as "cp" accepts the --backup option,

This will leave .bak files in place on all platforms which isn't ideal.
Pity `perl -i` doesn't handle the platform differences transparently.
Does sed -i behave better. That's less portable though could be tried
and then fall back to perl -i.

thanks,
Pádraig.






bug#19377: bug#19378: [PATCH 3/4] cat, chcon, chgrp, chmod, chown, cp, du, head: support wildcards on OS/2

2014-12-14 Thread Pádraig Brady
forcemerge 19378 19377
stop

On 14/12/14 03:47, KO Myung-Hun wrote:
> And ln,ls,mv,rm,tail.
> 
> * src/cat.c (main): Expand wildcards on OS/2.
> * src/chcon.c (main): Likewise.
> * src/chgrp.c (main): Likewise.
> * src/chmod.c (main): Likewise.
> * src/chown.c (main): Likewise.
> * src/cp.c (main): Likewise.
> * src/du.c (main): Likewise.
> * src/head.c (main): Likewise.
> * src/ln.c (main): Likewise.
> * src/ls.c (main): Likewise.
> * src/mv.c (main): Likewise.
> * src/rm.c (main): Likewise.
> * src/tail.c (main): Likewise.
> 
> Patches from coreutils 8.8 by Paul Smedley.

> diff --git a/src/cat.c b/src/cat.c
> index c7bb7e1..0138114 100644
> --- a/src/cat.c
> +++ b/src/cat.c
> @@ -544,6 +544,10 @@ main (int argc, char **argv)
>bool show_tabs = false;
>int file_open_mode = O_RDONLY;
>  
> +#ifdef __OS2__
> +  _wildcard (&argc, &argv);
> +#endif
> +

Interesing, the OS/2 shell doesn't doe the globbing.
I'm wondering about the scalability of this.
Are there any facilities for dealing with arbitrary numbers
of files, like with xargs for example?
What are the practical limits of the number of files?
Does _wildcard() exit with an error in this case?

thanks,
Pádraig






bug#19374: [PATCH 2/4] build: configure.ac: support a response file on OS/2

2014-12-14 Thread Pádraig Brady
forcemerge 19374 19377
stop

On 14/12/14 03:47, KO Myung-Hun wrote:
> * configure.ac (LDFLAGS): Add -Zargs-resp on os2*.

This imparts no information.  Please comment as to the "why"
rather than the "what".

> ---
>  configure.ac | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/configure.ac b/configure.ac
> index 0744964..7cb1085 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -589,6 +589,9 @@ AM_GNU_GETTEXT_VERSION([0.18.1])
>  # For a test of uniq: it uses the $LOCALE_FR envvar.
>  gt_LOCALE_FR
>  
> +# In order to support a response file on OS/2
> +AS_CASE([$host_os], [os2*], [LDFLAGS="$LDFLAGS -Zargs-resp"])

This relies on an implicit AC_CANONICAL_HOST which seems brittle.

thanks,
Pádraig





bug#19375: [PATCH 1/4] doc: add $(EXEEXT) suffix to the executables

2014-12-14 Thread Pádraig Brady
foremerge 19375 19377
stop

On 14/12/14 03:47, KO Myung-Hun wrote:
> * man/local.mk: Add $(EXEEXT) suffix to the executables.

LGTM.

thanks,
Pádraig.