diff --git a/postgres91/postgresql-9.1.spec b/postgres91/postgresql-9.1.spec index 75c8b15..59dc569 100644 --- a/postgres91/postgresql-9.1.spec +++ b/postgres91/postgresql-9.1.spec @@ -33,7 +33,7 @@ %{?beta:%global __os_install_post /usr/lib/rpm/brp-compress} %{!?test:%global test 1} -%{!?upgrade:%global upgrade 1} +%{!?upgrade:%global upgrade 0} %{!?plpython:%global plpython 1} %{!?pltcl:%global pltcl 1} %{!?plperl:%global plperl 1} @@ -74,18 +74,18 @@ Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.t # The PDF file is generated by generate-pdf.sh, which see for comments Source1: postgresql-%{majorversion}-A4.pdf # generate-pdf.sh is not used during RPM build, but include for documentation -Source2: generate-pdf.sh -Source3: ftp://ftp.postgresql.org/pub/source/v%{prevversion}/postgresql-%{prevversion}.tar.bz2 -Source4: postgresql-check-db-dir +#Source2: generate-pdf.sh +#Source3: ftp://ftp.postgresql.org/pub/source/v%{prevversion}/postgresql-%{prevversion}.tar.bz2 +#Source4: postgresql-check-db-dir Source5: Makefile.regress Source6: pg_config.h Source7: ecpg_config.h Source8: README.rpm-dist -Source9: postgresql-setup -Source10: postgresql.service +#Source9: postgresql-setup +#Source10: postgresql.service Source11: postgresql.init Source14: postgresql.pam -Source15: postgresql-bashprofile +#Source15: postgresql-bashprofile # Comments for these patches are in the patch files. Patch1: rpm-pgsql.patch @@ -133,9 +133,9 @@ BuildRequires: libxml2-devel libxslt-devel BuildRequires: pam-devel %endif -#%if %sdt -#BuildRequires: systemtap-sdt-devel -#%endif +%if %sdt +BuildRequires: systemtap-sdt-devel +%endif %if %selinux BuildRequires: libselinux-devel @@ -455,21 +455,21 @@ install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/pgsql/tutorial cp -p src/tutorial/* $RPM_BUILD_ROOT%{_libdir}/pgsql/tutorial # prep the setup script, including insertion of some values it needs -sed -e 's|^PGVERSION=.*$|PGVERSION=%{version}|' \ - -e 's|^PGENGINE=.*$|PGENGINE=%{_bindir}|' \ - -e 's|^PREVMAJORVERSION=.*$|PREVMAJORVERSION=%{prevmajorversion}|' \ - -e 's|^PREVPGENGINE=.*$|PREVPGENGINE=%{_libdir}/pgsql/postgresql-%{prevmajorversion}/bin|' \ - <%{SOURCE9} >postgresql-setup -touch -r %{SOURCE9} postgresql-setup -install -m 755 postgresql-setup $RPM_BUILD_ROOT%{_bindir}/postgresql-setup +#sed -e 's|^PGVERSION=.*$|PGVERSION=%{version}|' \ +# -e 's|^PGENGINE=.*$|PGENGINE=%{_bindir}|' \ +# -e 's|^PREVMAJORVERSION=.*$|PREVMAJORVERSION=%{prevmajorversion}|' \ +# -e 's|^PREVPGENGINE=.*$|PREVPGENGINE=%{_libdir}/pgsql/postgresql-%{prevmajorversion}/bin|' \ +# <%{SOURCE9} >postgresql-setup +#touch -r %{SOURCE9} postgresql-setup +#install -m 755 postgresql-setup $RPM_BUILD_ROOT%{_bindir}/postgresql-setup # prep the startup check script, including insertion of some values it needs -sed -e 's|^PGVERSION=.*$|PGVERSION=%{version}|' \ - -e 's|^PREVMAJORVERSION=.*$|PREVMAJORVERSION=%{prevmajorversion}|' \ - -e 's|^PGDOCDIR=.*$|PGDOCDIR=%{_docdir}/%{name}-%{version}|' \ - <%{SOURCE4} >postgresql-check-db-dir -touch -r %{SOURCE4} postgresql-check-db-dir -install -m 755 postgresql-check-db-dir $RPM_BUILD_ROOT%{_bindir}/postgresql-check-db-dir +#sed -e 's|^PGVERSION=.*$|PGVERSION=%{version}|' \ +# -e 's|^PREVMAJORVERSION=.*$|PREVMAJORVERSION=%{prevmajorversion}|' \ +# -e 's|^PGDOCDIR=.*$|PGDOCDIR=%{_docdir}/%{name}-%{version}|' \ +# <%{SOURCE4} >postgresql-check-db-dir +#touch -r %{SOURCE4} postgresql-check-db-dir +#install -m 755 postgresql-check-db-dir $RPM_BUILD_ROOT%{_bindir}/postgresql-check-db-dir #install -d $RPM_BUILD_ROOT%{_unitdir} #install -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_unitdir}/postgresql.service @@ -493,7 +493,7 @@ install -d -m 700 $RPM_BUILD_ROOT/var/lib/pgsql/data install -d -m 700 $RPM_BUILD_ROOT/var/lib/pgsql/backups # postgres' .bash_profile -install -m 644 %{SOURCE15} $RPM_BUILD_ROOT/var/lib/pgsql/.bash_profile +#install -m 644 %{SOURCE15} $RPM_BUILD_ROOT/var/lib/pgsql/.bash_profile %if %upgrade @@ -659,15 +659,15 @@ if [ $1 -eq 0 ] ; then # Package removal, not upgrade #/bin/systemctl --no-reload disable postgresql.service >/dev/null 2>&1 || : #/bin/systemctl stop postgresql.service >/dev/null 2>&1 || : - /sbin/service postgresql condstop >/dev/null 2>&1 + /sbin/service postgresql stop >/dev/null 2>&1 chkconfig --del postgresql fi %postun server /sbin/ldconfig if [ $1 = 0 ] ; then - /sbin/service postgresql condstop >/dev/null 2>&1 - chkconfig --del postgresql + /sbin/service postgresql stop >/dev/null 2>&1 + chkconfig --del postgresql >/dev/null 2>&1 fi %if %plperl @@ -856,8 +856,8 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/pg_resetxlog %{_bindir}/postgres %{_bindir}/postmaster -%{_bindir}/postgresql-setup -%{_bindir}/postgresql-check-db-dir +#%{_bindir}/postgresql-setup +#%{_bindir}/postgresql-check-db-dir %{_mandir}/man1/initdb.* %{_mandir}/man1/pg_basebackup.* %{_mandir}/man1/pg_controldata.* @@ -881,7 +881,7 @@ rm -rf $RPM_BUILD_ROOT %attr(700,postgres,postgres) %dir /var/lib/pgsql %attr(700,postgres,postgres) %dir /var/lib/pgsql/data %attr(700,postgres,postgres) %dir /var/lib/pgsql/backups -%attr(644,postgres,postgres) %config(noreplace) /var/lib/pgsql/.bash_profile +#%attr(644,postgres,postgres) %config(noreplace) /var/lib/pgsql/.bash_profile %{_libdir}/pgsql/libpqwalreceiver.so %{_libdir}/pgsql/*_and_*.so %{_libdir}/pgsql/euc2004_sjis2004.so