jconway / plr

PL/R - R Procedural Language for PostgreSQL
http://www.joeconway.com
90 stars 41 forks source link

Error building rpm with given spec file #10

Closed johnrc closed 9 years ago

johnrc commented 9 years ago

I tried creating the plr rpm with the given spec file but got the following error:

Processing files: plr-8.3.0.15-1.el6.x86_64
error: File not found: /u/users/jcragun/rpmbuild/BUILDROOT/plr-8.3.0.15-1.el6.x86_64/usr/share/doc/README.plr
error: File not found: /u/users/jcragun/rpmbuild/BUILDROOT/plr-8.3.0.15-1.el6.x86_64/usr/share/pgsql/extension/plr.sql
error: File not found: /u/users/jcragun/rpmbuild/BUILDROOT/plr-8.3.0.15-1.el6.x86_64/usr/share/pgsql/extension/plr.control
error: File not found: /u/users/jcragun/rpmbuild/BUILDROOT/plr-8.3.0.15-1.el6.x86_64/usr/share/pgsql/extension/plr--8.3.0.15.sql
error: File not found: /u/users/jcragun/rpmbuild/BUILDROOT/plr-8.3.0.15-1.el6.x86_64/usr/share/pgsql/extension/plr--unpackaged--8.3.0.15.sql

RPM build errors:
    File not found: /u/users/jcragun/rpmbuild/BUILDROOT/plr-8.3.0.15-1.el6.x86_64/usr/share/doc/README.plr
    File not found: /u/users/jcragun/rpmbuild/BUILDROOT/plr-8.3.0.15-1.el6.x86_64/usr/share/pgsql/extension/plr.sql
    File not found: /u/users/jcragun/rpmbuild/BUILDROOT/plr-8.3.0.15-1.el6.x86_64/usr/share/pgsql/extension/plr.control
    File not found: /u/users/jcragun/rpmbuild/BUILDROOT/plr-8.3.0.15-1.el6.x86_64/usr/share/pgsql/extension/plr--8.3.0.15.sql
    File not found: /u/users/jcragun/rpmbuild/BUILDROOT/plr-8.3.0.15-1.el6.x86_64/usr/share/pgsql/extension/plr--unpackaged--8.3.0.15.sql

I'm building on

$ cat /etc/*-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)

The plr.control file is not installed anywhere during make install. Because of that, I removed the following line in plr.spec

%{_datadir}/pgsql/extension/plr.control

I then noticed the install location for a few of the files is different than what's in the spec. So I modified their paths.

%doc %{_docdir}/pgsql/contrib/README.plr
%{_datadir}/pgsql/contrib/plr.sql
%{_datadir}/pgsql/contrib/plr--8.3.0.15.sql     
%{_datadir}/pgsql/contrib/plr--unpackaged--8.3.0.15.sql

Is this an issue with the spec file or am I missing something? Perhaps this issue only occurs on Red Hat.

sharmay commented 9 years ago

What is your PostgreSQL version ? Where PostgreSQL came from RHEL or yum.postgresql.org ?

johnrc commented 9 years ago
$ psql --version
psql (PostgreSQL) 8.4.20

I installed it from RHEL's repo using yum.

jconway commented 9 years ago

Modified the spec file to use output from pg_config to determine file locations. This should make it work correctly with whatever postgres RPMs that are installed. Works for me on CentOS 7 with PGDG 9.3 rpms.