pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <myon@debian.org>
To: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: testing dist tarballs
Date: Thu, 25 May 2023 16:46:41 +0200
Message-ID: <ZG900WcTOIzK3bQ/@msg.df7cb.de> (raw)
In-Reply-To: <1329864.1684964152@sss.pgh.pa.us> <20230524212437.jm6e3iiehtehivbh@awork3.anarazel.de>

Re: Andres Freund
> That's due to MAKELEVEL:
> 
> submake-generated-headers:
> ifndef NO_GENERATED_HEADERS
> ifeq ($(MAKELEVEL),0)
> 	$(MAKE) -C $(top_builddir)/src/backend generated-headers
> endif
> endif
> 
> So the distcheck target needs to reset MAKELEVEL=0 - unless somebody has a
> better idea?

Fwiw, I've had that problem as well in the Debian packages where
debian/rules is already a Makefile and calling $(MAKE) from there
trips up that logic. The workaround I used is:

override_dh_auto_build-arch:
        # set MAKELEVEL to 0 to force building submake-generated-headers in src/Makefile.global(.in)
        MAKELEVEL=0 $(MAKE) -C build/src all

...
override_dh_auto_test-arch:
ifeq (, $(findstring nocheck, $(DEB_BUILD_OPTIONS)))
        # when tests fail, print newest log files
        # initdb doesn't like LANG and LC_ALL to contradict, unset LANG and LC_CTYPE here
        # temp-install wants to be invoked from a top-level make, unset MAKELEVEL here
        # tell pg_upgrade to create its sockets in /tmp to avoid too long paths
        unset LANG LC_CTYPE MAKELEVEL; ulimit -c unlimited; \
        if ! make -C build check-world \
          $(TEMP_CONFIG) \
          PGSOCKETDIR="/tmp" \
          PG_TEST_EXTRA='ssl' \
          PROVE_FLAGS="--verbose"; \
...

(Just mentioning this, not asking it to be changed.)


Re: Tom Lane
> Andres Freund <andres@anarazel.de> writes:
> > First thing I noticed that 'make dist' doesn't work in a vpath, failing in a
> > somewhat obscure way (likely because in a vpath build the the copy from the
> > source dir doesn't include GNUMakefile). Do we expect it to work?
> 
> Don't see how it could possibly be useful in a vpath, because you'd have
> the real source files and the generated files in different trees.

I don't think "make dist" is generally expected to work in vpath
builds, that's probably one indirection layer too much. (The "make
distcheck" rule generated by automake tests vpath builds, though.)

Christoph





view thread (6+ messages)  latest in thread

Message-ID: <ZG900WcTOIzK3bQ/@msg.df7cb.de>
Permalink:  ../ZG900WcTOIzK3bQ%2F@msg.df7cb.de/
Also on:    postgresql.org/message-id/ZG900WcTOIzK3bQ/@msg.df7cb.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: myon@debian.org, andres@anarazel.de, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: testing dist tarballs
  In-Reply-To: <ZG900WcTOIzK3bQ/@msg.df7cb.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox