似乎无法弄清楚我在这里做错了什么。
目前,尝试为以下redis postgres外部数据包装器构建rpm。
规范文件位于/rpmbuild/SPECS
,tar文件位于/rpmbuild/SOURCES
。
当我从rpmbuild -ba redis_fdw.spec
目录运行/rpmbuild/SPECS
时,出现以下错误:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.78237
+ umask 022
+ cd /root/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /root/rpmbuild/BUILD
+ rm -rf redis_fdw-0.7
+ /bin/mkdir -p redis_fdw-0.7
+ cd redis_fdw-0.7
+ /usr/bin/gzip -dc /root/rpmbuild/SOURCES/rw_redis_fdw-0.7.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.78237
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd redis_fdw-0.7
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf /var/tmp/redis_fdw94-0.7.0
+ mkdir /var/tmp/redis_fdw94-0.7.0
+ PATH=/usr/pgsql-9.4/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/opt/rh/devtoolset-2/root/usr/bin/:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
+ make install DESTDIR=/var/tmp/redis_fdw94-0.7.0
make: *** No rule to make target `install'. Stop.
error: Bad exit status from /var/tmp/rpm-tmp.78237 (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.78237 (%install)
redis_fdw.spec 文件
#@IgnoreInspection BashAddShebang
%global redis_fdw_major 0
%global redis_fdw_minor 7
%global redis_fdw_build 0
%global postgresql_major 9
%global postgresql_minor 4
%global postgresql_build 15
%global redis_fdw_tag_ver v%{redis_fdw_major}.%{redis_fdw_minor}
%global redis_fdw_ver %{redis_fdw_major}.%{redis_fdw_minor}.%{redis_fdw_build}
%global redis_fdw_ver_short %{redis_fdw_major}.%{redis_fdw_minor}
%global postgresql_ver %{postgresql_major}.%{postgresql_minor}.%{postgresql_build}
%global postgresql_ver_short %{postgresql_major}.%{postgresql_minor}
%global postgresql_ver_major %{postgresql_major}%{postgresql_minor}
%global name redis_fdw%{postgresql_ver_major}
%global repo_name redis_fdw-%{redis_fdw_ver_short}
Summary: Redis FDW
Name: %{name}
Version: %{redis_fdw_ver}
Release: 1.1tl%{?dist}
License: Commercial
Group: Application/Phillip
Source0: rw_redis_fdw-%{redis_fdw_ver_short}.tar.gz
Provides: %{name} = %{pkg_ver}-%{pkg_rel}
BuildRoot: %{_tmppath}/%{name}-%{version}
BuildRequires: hiredis
BuildRequires: postgresql%{postgresql_ver_major}-devel = %{postgresql_ver}
Requires: postgresql%{postgresql_ver_major}-server = %{postgresql_ver}
%description
Redis Foreign Data Wrapper for PostgreSQL
%prep
%setup -q -n %{repo_name}
%install
rm -rf $RPM_BUILD_ROOT
mkdir ${RPM_BUILD_ROOT}
PATH=/usr/pgsql-%{postgresql_ver_short}/bin:$PATH make install DESTDIR=${RPM_BUILD_ROOT}
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%attr(664, postgres, postgres) /usr/pgsql-%{postgresql_ver_short}/share/extension/%{base_name}.control
%attr(664, postgres, postgres) /usr/pgsql-%{postgresql_ver_short}/share/extension/%{base_name}--*
%attr(664, postgres, postgres) /usr/pgsql-%{postgresql_ver_short}/lib/%{base_name}.so
%changelog
* Mon Jan 08 2018 Phillip Phillip <phillip@phillip.com> 0.7.0
- initial RPM