[pgpool-general: 5833] Re: Creating RPMs from latest sources

Avi Weinberg AviW at gilat.com
Mon Dec 18 22:20:50 JST 2017


Hi,

Thanks for the reply.  I followed you advice and removed the code that executes the patch.  However, now I'm getting

make: Leaving directory `/var/lib/pgsql/rpmbuild/BUILD/pgpool-II-3.6.7/src/sql/pgpool_adm'
+ install -d /var/lib/pgsql/rpmbuild/BUILDROOT/pgpool-II-pg96-3.6.7-1pgdgrhel6.x86_64/usr/share/pgpool-II
+ install -d /var/lib/pgsql/rpmbuild/BUILDROOT/pgpool-II-pg96-3.6.7-1pgdgrhel6.x86_64/etc/pgpool-II
+ mv /var/lib/pgsql/rpmbuild/BUILDROOT/pgpool-II-pg96-3.6.7-1pgdgrhel6.x86_64/etc/pgpool-II/pcp.conf.sample /var/lib/pgsql/rpmbuild/BUILDROOT/pgpool-II-pg96-3.6.7-1pgdgrhel6.x86_64/etc/pgpool-II/pcp.conf
+ mv /var/lib/pgsql/rpmbuild/BUILDROOT/pgpool-II-pg96-3.6.7-1pgdgrhel6.x86_64/etc/pgpool-II/pgpool.conf.sample /var/lib/pgsql/rpmbuild/BUILDROOT/pgpool-II-pg96-3.6.7-1pgdgrhel6.x86_64/etc/pgpool-II/pgpool.conf
+ mv /var/lib/pgsql/rpmbuild/BUILDROOT/pgpool-II-pg96-3.6.7-1pgdgrhel6.x86_64/etc/pgpool-II/pool_hba.conf.sample /var/lib/pgsql/rpmbuild/BUILDROOT/pgpool-II-pg96-3.6.7-1pgdgrhel6.x86_64/etc/pgpool-II/pool_hba.conf
+ install -d /var/lib/pgsql/rpmbuild/BUILDROOT/pgpool-II-pg96-3.6.7-1pgdgrhel6.x86_64/etc/rc.d/init.d
+ install -m 755 /var/lib/pgsql/rpmbuild/SOURCES/pgpool.init /var/lib/pgsql/rpmbuild/BUILDROOT/pgpool-II-pg96-3.6.7-1pgdgrhel6.x86_64/etc/rc.d/init.d/pgpool
+ install -d /var/lib/pgsql/rpmbuild/BUILDROOT/pgpool-II-pg96-3.6.7-1pgdgrhel6.x86_64/etc/sysconfig
+ install -m 644 /var/lib/pgsql/rpmbuild/SOURCES/pgpool_rhel6.sysconfig /var/lib/pgsql/rpmbuild/BUILDROOT/pgpool-II-pg96-3.6.7-1pgdgrhel6.x86_64/etc/sysconfig/pgpool
+ rm -f /var/lib/pgsql/rpmbuild/BUILDROOT/pgpool-II-pg96-3.6.7-1pgdgrhel6.x86_64/usr/lib64/libpcp.a /var/lib/pgsql/rpmbuild/BUILDROOT/pgpool-II-pg96-3.6.7-1pgdgrhel6.x86_64/usr/lib64/libpcp.la
+ mkdir html
+ mv doc/src/sgml/html html/en
+ mv doc.ja/src/sgml/html html/ja
mv: cannot stat `doc.ja/src/sgml/html': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.hY20X8 (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.hY20X8 (%install)

Your assistance is most welcome


-----Original Message-----
From: Tatsuo Ishii [mailto:ishii at sraoss.co.jp]
Sent: Friday, December 15, 2017 4:19 PM
To: Avi Weinberg <AviW at gilat.com>
Cc: pgpool-general at pgpool.net
Subject: Re: [pgpool-general: 5828] Creating RPMs from latest sources

> Hi
>
> I would like to build rpm from the latest sources. Usually I apply the patch on existing rpm and it works fine.  However, now I would like to use the latest sources and not just apply a patch.
>
> I took the 3.6.7 rpms and replace the pgpool-II-3.6.7.tar.gz  file with the one that has the latest sources.  I ran the rpmbuild command and got the following error.
>
> bash-4.1$ rpmbuild -ba pgpool.spec --define="pgpool_version 3.6.7" --define="pg_version 96" --define="pghome /usr/pgsql-9.6" --define="dist rhel6"
> Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.F6r2o2
> + umask 022
> + cd /var/lib/pgsql/rpmbuild/BUILD
> + LANG=C
> + export LANG
> + unset DISPLAY
> + cd /var/lib/pgsql/rpmbuild/BUILD
> + rm -rf pgpool-II-3.6.7
> + /usr/bin/gzip -dc
> + /var/lib/pgsql/rpmbuild/SOURCES/pgpool-II-3.6.7.tar.gz
> + /bin/tar -xf -
> + STATUS=0
> + '[' 0 -ne 0 ']'
> + cd pgpool-II-3.6.7
> + /bin/chmod -Rf a+rX,u+w,g-w,o-w .
> + echo 'Patch #1 (pgpool-II-head.patch):'
> Patch #1 (pgpool-II-head.patch):
> + /bin/cat /var/lib/pgsql/rpmbuild/SOURCES/pgpool-II-head.patch
> + /usr/bin/patch -p1 --fuzz=0
> can't find file to patch at input line 4 Perhaps you used the wrong -p
> or --strip option?
> The text leading up to this was:
> --------------------------
> |diff -crN pgpool-II-3.6.7/doc/src/sgml/html/LEGALNOTICE.html
> |head/pgpool-II-3.6.7/doc/src/sgml/html/LEGALNOTICE.html
> |*** pgpool-II-3.6.7/doc/src/sgml/html/LEGALNOTICE.html Wed Nov  1 01:02:24 2017
> |--- head/pgpool-II-3.6.7/doc/src/sgml/html/LEGALNOTICE.html    Wed Nov  1 03:02:23 2017
> --------------------------

The missing file pgpool-II-head.patch is the difference between 3.6 stable head and pgpool-II-3.6.7. We create rpm files including the diff between previous release (in this case 3.6.7) and the stable branch head. The file is actually generated in the automatic rpm build process using docker. See https://github.com/pgpool/docker-pgpool-II-rpm for more details. In the mean time you can probably remove:

Patch1:         pgpool-II-head.patch

%patch1 -p1

from the spec file because you replace pgpool-II-.3.6.7.tar.gz with the 3.6 stable head tar ball.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
IMPORTANT - This email and any attachments is intended for the above named addressee(s), and may contain information which is confidential or privileged. If you are not the intended recipient, please inform the sender immediately and delete this email: you should not copy or use this e-mail for any purpose nor disclose its contents to any person.


More information about the pgpool-general mailing list