On 2022-Oct-14, Donghang Lin wrote:

> Hi hackers,
> 
> When I was building pg_regress, it didn’t always copy a rebuilt version of 
> refint.so to the folder.
> 
> Steps to reproduce:
> OS: centos7
> PSQL version: 14.5
> 
> 1. configure and build postgres
> 2. edit file src/include/utils/rel.h so that contrib/spi will rebuild
> 3. cd ${builddir}/src/test/regress
> 4. make
> We’ll find refint.so is rebuilt in contrib/spi, but not copied over to 
> regress folder.
> While autoinc.so is rebuilt and copied over.

I have a somewhat-related-but-not-really complaint.  I recently had need to
have refint.so, autoinc.so and regress.so in the install directory; but it
turns out that there's no provision at all to get them installed.

Packagers have long have had a need for this; for example the postgresql-test
RPM file is built using this icky recipe:

%if %test
        # tests. There are many files included here that are unnecessary,
        # but include them anyway for completeness.  We replace the original
        # Makefiles, however.
        %{__mkdir} -p %{buildroot}%{pgbaseinstdir}/lib/test
        %{__cp} -a src/test/regress %{buildroot}%{pgbaseinstdir}/lib/test
        %{__install} -m 0755 contrib/spi/refint.so 
%{buildroot}%{pgbaseinstdir}/lib/test/regress
        %{__install} -m 0755 contrib/spi/autoinc.so 
%{buildroot}%{pgbaseinstdir}/lib/test/regress

I assume that the DEB does something similar, but I didn't look.

I think it would be better to provide a Make rule to allow these files to be
installed.  I'll see about a proposed patch.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"Saca el libro que tu religión considere como el indicado para encontrar la
oración que traiga paz a tu alma. Luego rebootea el computador
y ve si funciona" (Carlos Duclós)


Reply via email to