Re: VPATH distcheck build fails
Tim Rühsen wrote: > Nothing documented found. After reading some code, it seems po/Makevars > is left alone when removing AM_GNU_GETTEXT_VERSION([0.17]) from > configure.ac. The Makefile.in.in from version 0.17 did not contain the support for the PACKAGE_GNU customization. You need at least AM_GNU_GETTEXT_VERSION([0.19]) for that. > The wget.po created in the vpath build still contains just 'wget' > instead of 'GNU Wget' due to > > if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | > grep -v 'libtool:' >/dev/null; then \ > package_gnu='GNU '; \ > else \ > package_gnu=''; \ > fi; \ > > That is, package_gnu is empty due to not finding 'GNU wget' in the main > project/tarball dir. You are repeating yourself. I told you already that this heuristic is not reliable, and the way to avoid the heuristic is to add a po/Makevars that contains PACKAGE_GNU = yes Bruno
Re: VPATH distcheck build fails
On 04.05.19 18:13, Bruno Haible wrote: > Tim Rühsen wrote: >> Both, 'po/Makevars' and 'po/Makevars.template' are overwritten by >> './bootstrap' (the gnulib bootstrap) (adding to git doesn't matter). > > po/Makevars is meant to contain *package-specific* customizations > of the gettext integration. > > If 'bootstrap' overwrites it, surely it has a way to override this > behaviour (in bootstrap.conf)? Nothing documented found. After reading some code, it seems po/Makevars is left alone when removing AM_GNU_GETTEXT_VERSION([0.17]) from configure.ac. Good, but now I am back at the original reported error :-( The wget.po created in the vpath build still contains just 'wget' instead of 'GNU Wget' due to if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \ package_gnu='GNU '; \ else \ package_gnu=''; \ fi; \ That is, package_gnu is empty due to not finding 'GNU wget' in the main project/tarball dir. Of course I could just generate a file with such a signature, but it feels like a hack. And I wonder how other GNU projects do it. GNU Wget2 has the same issue. GNU Libidn2 names itself just 'libidn2' everywhere - so the 'cmp' works (by random). Thank you for your patience and time, Bruno. Regards, Tim signature.asc Description: OpenPGP digital signature
Re: VPATH distcheck build fails
Tim Rühsen wrote: > Both, 'po/Makevars' and 'po/Makevars.template' are overwritten by > './bootstrap' (the gnulib bootstrap) (adding to git doesn't matter). po/Makevars is meant to contain *package-specific* customizations of the gettext integration. If 'bootstrap' overwrites it, surely it has a way to override this behaviour (in bootstrap.conf)? Bruno
Re: VPATH distcheck build fails
On 04.05.19 16:26, Tim Rühsen wrote: > On 04.05.19 16:25, Bruno Haible wrote: >> Tim Rühsen wrote: >>> $ diff wget.po ../../../po/wget.pot >>> 3c3 >>> < # This file is distributed under the same license as the wget package. >>> --- # This file is distributed under the same license as the GNU wget package. >>> 9c9 >>> < "Project-Id-Version: wget 1.20.3.13-ee7fe-dirty\n" >>> --- "Project-Id-Version: GNU wget 1.20.3.13-ee7fe-dirty\n" >> >> The determination whether a package is a GNU package or not is a bit >> unreliable. To fix this, set the PACKAGE_GNU variable in your >> po/Makevars: >> >> # This tells whether or not to prepend "GNU " prefix to the package >> # name that gets inserted into the header of the $(DOMAIN).pot file. >> # Possible values are "yes", "no", or empty. If it is empty, try to >> # detect it automatically by scanning the files in $(top_srcdir) for >> # "GNU packagename" string. >> PACKAGE_GNU = yes > > Thanks, Bruno. > > That seems much better than changing AC_INIT in configure.ac. Both, 'po/Makevars' and 'po/Makevars.template' are overwritten by './bootstrap' (the gnulib bootstrap) (adding to git doesn't matter). We use gnulib module 'gettext-h' but not 'gettext', in configure.ac there is AM_GNU_GETTEXT([external],[need-ngettext]) AM_GNU_GETTEXT_VERSION([0.17]) Sorry, but I'm a bit puzzled here. Regards, Tim signature.asc Description: OpenPGP digital signature
Re: VPATH distcheck build fails
Tim Rühsen wrote: > $ diff wget.po ../../../po/wget.pot > 3c3 > < # This file is distributed under the same license as the wget package. > --- > > # This file is distributed under the same license as the GNU wget package. > 9c9 > < "Project-Id-Version: wget 1.20.3.13-ee7fe-dirty\n" > --- > > "Project-Id-Version: GNU wget 1.20.3.13-ee7fe-dirty\n" The determination whether a package is a GNU package or not is a bit unreliable. To fix this, set the PACKAGE_GNU variable in your po/Makevars: # This tells whether or not to prepend "GNU " prefix to the package # name that gets inserted into the header of the $(DOMAIN).pot file. # Possible values are "yes", "no", or empty. If it is empty, try to # detect it automatically by scanning the files in $(top_srcdir) for # "GNU packagename" string. PACKAGE_GNU = yes Bruno
Re: VPATH distcheck build fails
Hi Tim, > I am possible at the wrong ML now, but see the braking shell code as > well in gnulib/build-aux/po/Makefile.in.in. CCing bug-gettext, since that is the more appropriate mailing list. > The make target '$(DOMAIN).pot-update:' contains this code: > if test -f $(srcdir)/$(DOMAIN).pot; then \ > sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > > $(DOMAIN).1po && \ > sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ > if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ > rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ > else \ > rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ > mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ > fi; \ > else \ > mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ > fi; \ > > In a vpath build (using the configure script outside the main project > directory), the line > rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot > is triggered and thus breaks 'make distcheck'. > > This due to all files in $(srcdir) are read-only. That piece of Makefile code is careful to not touch $(srcdir)/$(DOMAIN).pot if $(DOMAIN).1po $(DOMAIN).2po are the same. They are generated through sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ To investigate the cause of this failure, compare the files wget.po and $(srcdir)/wget.po. They ought to differ only in the POT-Creation-Date line. Bruno
VPATH distcheck build fails
Hi, I am possible at the wrong ML now, but see the braking shell code as well in gnulib/build-aux/po/Makefile.in.in. The make target '$(DOMAIN).pot-update:' contains this code: if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ In a vpath build (using the configure script outside the main project directory), the line rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot is triggered and thus breaks 'make distcheck'. This due to all files in $(srcdir) are read-only. What is the general advice from the experts here how to deal with it ? Projects like GNU Wget fail on the first run, others need a second run to trigger the error: rm: cannot remove '../../../po/wget.pot': Permission denied make[6]: *** [Makefile:223: wget.pot-update] Error 1 make[6]: Leaving directory '/home/tim/src/wget1.x/vpath/wget-1.20.3.13-ee7fe-dirty/_build/sub/po' Regards, Tim signature.asc Description: OpenPGP digital signature