bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* update-copyright is broken
@ 2019-07-15 23:50 Brian C. Lane
  2019-07-16  8:03 ` Bruno Haible
  0 siblings, 1 reply; 4+ messages in thread
From: Brian C. Lane @ 2019-07-15 23:50 UTC (permalink / raw)
  To: bug-gnulib

I think it was the change in commit a05d5d121b10f24 where it moved and
changed the exec code at line 1.

In parted with the latest gnulib I am getting these errors with 'make
update-copyright'

  GEN      update-copyright
Use of uninitialized value $_ in pattern match (m//) at ./build-aux/update-copyright line 167.
Use of uninitialized value $_ in pattern match (m//) at ./build-aux/update-copyright line 173.
Use of uninitialized value $ARGV in concatenation (.) or string at ./build-aux/update-copyright line 285.
: warning: copyright statement not found

If I edit the new exec line to use the old one, but with -wSx, it works fine:

eval '(exit $?0)' && eval 'exec perl -wSx -0777 -pi "$0" ${1+"$@"}'
  & eval 'exec perl -wSx -0777 -pi "$0" $argv:q'
      if 0;

Thanks,

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: update-copyright is broken
  2019-07-15 23:50 update-copyright is broken Brian C. Lane
@ 2019-07-16  8:03 ` Bruno Haible
  2019-07-17  6:44   ` Bernhard Voelker
  0 siblings, 1 reply; 4+ messages in thread
From: Bruno Haible @ 2019-07-16  8:03 UTC (permalink / raw)
  To: bug-gnulib; +Cc: Brian C. Lane

Hi,

Brian C. Lane wrote:
> I think it was the change in commit a05d5d121b10f24 where it moved and
> changed the exec code at line 1.
> 
> In parted with the latest gnulib I am getting these errors with 'make
> update-copyright'
> 
>   GEN      update-copyright
> Use of uninitialized value $_ in pattern match (m//) at ./build-aux/update-copyright line 167.
> Use of uninitialized value $_ in pattern match (m//) at ./build-aux/update-copyright line 173.
> Use of uninitialized value $ARGV in concatenation (.) or string at ./build-aux/update-copyright line 285.
> : warning: copyright statement not found
> 
> If I edit the new exec line to use the old one, but with -wSx, it works fine:
> 
> eval '(exit $?0)' && eval 'exec perl -wSx -0777 -pi "$0" ${1+"$@"}'
>   & eval 'exec perl -wSx -0777 -pi "$0" $argv:q'
>       if 0;

Thanks for the report. Indeed, a bad regression. Fixed as follows:


2019-07-16  Bruno Haible  <bruno@clisp.org>

	update-copyright: Make it work again (regression from 2019-06-15).
	Reported by Brian C. Lane <bcl@redhat.com>.
	* build-aux/update-copyright: Add back the -0777, -p, -i options.

diff --git a/build-aux/update-copyright b/build-aux/update-copyright
index 4a9ea7c..b3f6b29 100755
--- a/build-aux/update-copyright
+++ b/build-aux/update-copyright
@@ -134,7 +134,7 @@
 # the script through the perl program found in $PATH.  The '-x' option
 # is essential as well; without it, perl would re-execute the script
 # through /bin/sh.  When executed by  perl, the next two lines are a no-op.
-eval 'exec perl -wSx "$0" "$@"'
+eval 'exec perl -wSx -0777 -pi "$0" "$@"'
      if 0;
 
 my $VERSION = '2018-03-07.03:47'; # UTC



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: update-copyright is broken
  2019-07-16  8:03 ` Bruno Haible
@ 2019-07-17  6:44   ` Bernhard Voelker
  2019-07-19 23:22     ` Bruno Haible
  0 siblings, 1 reply; 4+ messages in thread
From: Bernhard Voelker @ 2019-07-17  6:44 UTC (permalink / raw)
  To: Bruno Haible, bug-gnulib; +Cc: Brian C. Lane

On 7/16/19 10:03 AM, Bruno Haible wrote:
> Thanks for the report. Indeed, a bad regression. Fixed as follows:

Hmm, and what about the other changes of perl options in commit a05d5d121b10:

* build-aux/useless-if-before-free:
  had tainting checks enabled (-T):

  < eval 'exec perl -wST "$0" "$@"'
  > eval 'exec perl -wSx "$0" "$@"'

* tests/test-update-copyright.sh:
  had -0777 -pi:

  < eval 'exec perl -wS -0777 -pi "$0" "$@"'
  > eval 'exec perl -wSx "$0" "$@"'

?

Are they consciously dropped?

announce-gen, gitlog-to-changelog and prefix-gnulib-mk still have
their original perl options BTW.

Have a nice day,
Berny


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: update-copyright is broken
  2019-07-17  6:44   ` Bernhard Voelker
@ 2019-07-19 23:22     ` Bruno Haible
  0 siblings, 0 replies; 4+ messages in thread
From: Bruno Haible @ 2019-07-19 23:22 UTC (permalink / raw)
  To: Bernhard Voelker; +Cc: Brian C. Lane, bug-gnulib

Bernhard Voelker wrote:
> Hmm, and what about the other changes of perl options in commit a05d5d121b10:
> 
> * build-aux/useless-if-before-free:
>   had tainting checks enabled (-T):
> 
>   < eval 'exec perl -wST "$0" "$@"'
>   > eval 'exec perl -wSx "$0" "$@"'

The benefit of this "taint mode" was not and is not clear to me. If you
feel it is important, feel free to enable it again.

> * tests/test-update-copyright.sh:
>   had -0777 -pi:
> 
>   < eval 'exec perl -wS -0777 -pi "$0" "$@"'
>   > eval 'exec perl -wSx "$0" "$@"'
> 
> ?

This was not a conscious change. But it is harmless: this code only
tests whether perl can be invoked.

Bruno



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-19 23:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-15 23:50 update-copyright is broken Brian C. Lane
2019-07-16  8:03 ` Bruno Haible
2019-07-17  6:44   ` Bernhard Voelker
2019-07-19 23:22     ` Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).