X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=postgresql.spec;h=57c5aad03d11bea2456171d3241c04145b9fdfcc;hb=e3bed88e2502a74b99d20051bd51bf8890677837;hp=3306e812f93e585620d27a5703beb2c64e035a97;hpb=033304e995480cf81544eda98884bd84a4107f5e;p=packages%2Fpostgresql.git diff --git a/postgresql.spec b/postgresql.spec index 3306e81..57c5aad 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -29,7 +29,7 @@ Summary(uk.UTF-8): PostgreSQL - система керування базами Summary(zh_CN.UTF-8): PostgreSQL 客户端程序和库文件 Name: postgresql%{pgver} Version: %{pgver}.%{pgminver} -Release: 1.1 +Release: 2 License: BSD Group: Applications/Databases Source0: http://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2 @@ -45,6 +45,7 @@ Patch3: per-version-dirs.patch Patch4: postgresql-disable_horology_test.patch Patch5: postgresql-heimdal.patch Patch6: postgresql-link.patch +Patch7: socket-dir-fixes.patch URL: http://www.postgresql.org/ BuildRequires: autoconf >= 2.69 BuildRequires: automake @@ -83,14 +84,14 @@ BuildRequires: zlib-devel Requires(post,preun): /sbin/chkconfig Requires(pre): /bin/id Requires(pre): /usr/bin/getgid -Requires(pre): /usr/sbin/groupadd -Requires(pre): /usr/sbin/useradd Requires(triggerpostun): /bin/id Requires(triggerpostun): /usr/sbin/usermod Requires: %{name}-clients >= %{version}-%{release} +Requires: %{name}-dirs = %{version}-%{release} Requires: postgresql-libs = %{version}-%{release} Requires: rc-scripts >= 0.4.3.0 Requires: tzdata +Obsoletes: postgresql Obsoletes: postgresql-module-plpgsql Obsoletes: postgresql-module-tsearch2 Obsoletes: postgresql-server @@ -171,6 +172,30 @@ PostgreSQL. PostgreSQL może być uruchomiony pod następującymi systemami: Solaris, SunOS, HPUX, AIX, Linux, Irix, FreeBSD i innymi systemami uniksowymi. +%package -n postgresql-common +Summary: Common PostgreSQL files and directories +Summary(pl.UTF-8): PostgreSQL - wspólne pliki i katalogi +Group: Applicataion/Databases +Requires(pre): /usr/sbin/groupadd +Requires(pre): /usr/sbin/useradd + +%description -n postgresql-common +Common PostgreSQL files and directories. + +%description -n postgresql-common -l pl.UTF-8 +PostgreSQL - wspólne pliki i katalogi. + +%package dirs +Summary: Common directories for PostgresSQL %{pgver} +Summary(pl.UTF-8): Wspólne pliki i katalogi dla PostgreSQL %{pgver} +Group: Applicataion/Databases + +%description dirs +Common directories for PostgresSQL %{pgver} + +%description dirs -l pl.UTF-8 +Wspólne pliki i katalogi dla PostgreSQL %{pgver} + %package -n postgresql-devel Summary: PostgreSQL development header files and libraries Summary(de.UTF-8): PostgreSQL-Entwicklungs-Header-Dateien und Libraries @@ -182,6 +207,7 @@ Summary(ru.UTF-8): PostgreSQL - хедеры и библиотеки разра Summary(tr.UTF-8): PostgreSQL başlık dosyaları ve kitaplıklar Summary(uk.UTF-8): PostgreSQL - хедери та бібліотеки програміста Group: Development/Libraries +Requires: alternatives Requires: postgresql-libs = %{version}-%{release} %description -n postgresql-devel @@ -199,6 +225,7 @@ Summary(pl.UTF-8): PostgreSQL - pliki nagłówkowe dla backendu Group: Development/Libraries Requires: postgresql-devel = %{version}-%{release} Requires: postgresql-libs = %{version}-%{release} +Obsoletes: postgresql-backend-devel %description backend-devel This package contains header files required to compile functions that @@ -217,7 +244,9 @@ Summary(ru.UTF-8): Клиентские программы, необходимы Summary(uk.UTF-8): Клієнтські програми, необхідні для доступу до сервера PostgreSQL Group: Applications/Databases Requires: alternatives +Requires: %{name}-dirs = %{version}-%{release} Requires: postgresql-libs = %{version}-%{release} +Obsoletes: postgresql-clients %description clients This package includes only the clients needed to access an PostgreSQL @@ -235,6 +264,7 @@ poleceń. Serwer znajduje się w głównym pakiecie. Summary: Documentation for PostgreSQL Summary(pl.UTF-8): Dodatkowa dokumantacja dla PostgreSQL Group: Applications/Databases +Obsoletes: postgresql-doc %description doc This package includes documentation and HOWTO for programmer, admin @@ -251,6 +281,7 @@ Summary(pl.UTF-8): Biblioteki dzielone programu PostgreSQL Summary(pt_BR.UTF-8): Biblioteca compartilhada do PostgreSQL Summary(zh_CN.UTF-8): PostgreSQL 客户所需要的共享库 Group: Libraries +Requires: postgresql-common = %{version}-%{release} %description -n postgresql-libs PostgreSQL shared libraries. @@ -262,8 +293,10 @@ Biblioteki dzielone programu PostgreSQL. Summary: Embedded SQL in C interface Summary(pl.UTF-8): Interfejs wbudowanego SQL-a w język C Group: Libraries +Requires: %{name}-dirs = %{version}-%{release} Requires: postgresql-libs = %{version}-%{release} Requires: postgresql-ecpg-libs = %{version}-%{release} +Obsoletes: postgresql-ecpg %description ecpg Embedded SQL in C interface. @@ -335,6 +368,7 @@ Summary: PL/perl - PostgreSQL procedural language Summary(pl.UTF-8): PL/perl - język proceduralny bazy danych PostgreSQL Group: Applications/Databases Requires: %{name} = %{version}-%{release} +Obsoletes: postgresql-module-plperl %description module-plperl From PostgreSQL documentation: @@ -370,6 +404,7 @@ Summary(pl.UTF-8): PL/Python - język proceduralny bazy danych PostgreSQL Group: Applications/Databases Requires: %{name} = %{version}-%{release} %pyrequires_eq python +Obsoletes: postgresql-module-plpython %description module-plpython From PostgreSQL documentation: @@ -405,6 +440,7 @@ Summary(pl.UTF-8): PL/Tcl - język proceduralny bazy danych PostgreSQL Group: Applications/Databases Requires: %{name} = %{version}-%{release} Requires: tcl(Pgtcl) +Obsoletes: postgresql-module-pltcl %description module-pltcl From PostgreSQL documentation: @@ -439,6 +475,7 @@ Summary: dblink module for PostgreSQL Summary(pl.UTF-8): Moduł dblink dla PostgreSQL-a Group: Applications/Databases Requires: %{name} = %{version}-%{release} +Obsoletes: postgresql-module-dblink %description module-dblink dblink module for PostgreSQL provides functions returning results from @@ -453,6 +490,7 @@ Summary: Large Objects module for PostgreSQL Summary(pl.UTF-8): Moduł Large Objects dla PostgreSQL-a Group: Applications/Databases Requires: %{name} = %{version}-%{release} +Obsoletes: postgresql-module-lo %description module-lo Large Objects module for PostgreSQL adds a new data type 'lo', some @@ -468,6 +506,7 @@ Summary: Trigram matching for PostgreSQL Summary(pl.UTF-8): Dopasowanie trigramowe dla PostgreSQL-a Group: Applications/Databases Requires: %{name} = %{version}-%{release} +Obsoletes: postgresql-module-pg_trgm %description module-pg_trgm This module provides functions and index classes for determining the @@ -482,6 +521,7 @@ Summary: Cryptographic functions for PostgreSQL Summary(pl.UTF-8): Funkcje kryptograficzne dla PostgreSQL-a Group: Applications/Databases Requires: %{name} = %{version}-%{release} +Obsoletes: postgresql-module-pgcrypto %description module-pgcrypto Cryptographic functions for PostgreSQL. @@ -495,6 +535,7 @@ Summary(pl.UTF-8): Zewnętrzny moduł bezpieczeństwa PostgreSQL-a wykorzystują Group: Applications/Databases Requires: %{name} = %{version}-%{release} Requires: libselinux >= 2.1.10 +Obsoletes: postgresql-module-sepgsql %description module-sepgsql PostgreSQL external security provider using SELinux. @@ -507,6 +548,7 @@ Summary: crosstab functions for PostgreSQL Summary(pl.UTF-8): Funkcje crosstab dla PostgreSQL-a Group: Applications/Databases Requires: %{name} = %{version}-%{release} +Obsoletes: postgresql-module-tablefunc %description module-tablefunc crosstab functions for PostgreSQL. @@ -520,6 +562,7 @@ Summary(pl.UTF-8): Funkcje do obsługi XML-a dla PostgreSQL-a Group: Applications/Databases Requires: %{name} = %{version}-%{release} Requires: libxml2 >= 1:2.6.23 +Obsoletes: postgresql-module-xml2 %description module-xml2 Module with XML functions provides both XPath querying and XSLT @@ -536,6 +579,7 @@ Summary: Miscellaneous PostgreSQL contrib modules Summary(pl.UTF-8): Różne moduły dołączone do PostgreSQL-a Group: Applications/Databases Requires: %{name} = %{version}-%{release} +Obsoletes: postgresql-contrib %description contrib Miscellaneous PostgreSQL contrib modules. @@ -552,6 +596,7 @@ Różne moduły dołączone do PostgreSQL-a. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 # force rebuild of bison/flex files find src -name \*.l -o -name \*.y | xargs touch @@ -613,10 +658,9 @@ done %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \ - $RPM_BUILD_ROOT/var/{lib/pgsql,log} \ + $RPM_BUILD_ROOT/var/{lib/pgsql,log,run/postgresql} \ $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \ - $RPM_BUILD_ROOT%{_mandir} \ - $RPM_BUILD_ROOT/home/services/postgres + $RPM_BUILD_ROOT%{_mandir} install src/tutorial/*.sql $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} @@ -708,13 +752,22 @@ if [ "$foundold" = "1" ]; then echo exit 1 fi -%groupadd -g 88 -r postgres -%useradd -M -o -r -u 88 -d /home/services/postgres -s /bin/sh -g postgres -c "PostgreSQL Server" postgres -%triggerpostun -- %{name} < 7.2-2 +%triggerpostun -- postgresql < 10.5-2 if [ -n "`/bin/id -u postgres 2>/dev/null`" ]; then - /usr/sbin/usermod -d /home/services/postgres postgres + /usr/sbin/usermod -d /var/lib/pgsql postgres fi +echo +echo "This version of PostgreSQL uses new default location for database clusters." +echo "Please move your existing clusters before starting PostgreSQL so they follow" +echo "below scheme:" +echo +echo "/var/lib/pgsql//" +echo +echo "where means PostgreSQL version like 9.6 or 10 and name is cluster" +echo "name of your choice. When done, be sure to update /etc/sysconfig/postgresql*" +echo "files so they reflect your changes." +echo %post /sbin/chkconfig --add postgresql10 @@ -726,7 +779,11 @@ if [ "$1" = "0" ]; then /sbin/chkconfig --del postgresql10 fi -%post clients +%pre -n postgresql-common +%groupadd -g 88 -r postgres +%useradd -M -o -r -u 88 -d /var/lib/pgsql -s /bin/sh -g postgres -c "PostgreSQL Server" postgres + +%posttrans clients update-alternatives \ --install %{_bindir}/clusterdb clusterdb %{pgsqllibdir}/bin/clusterdb %{pgver}%{pgminver} \ --slave %{_mandir}/man1/clusterdb.1 clusterdb.1 %{pgsqldatadir}/man/man1/clusterdb.1* || : @@ -767,7 +824,7 @@ update-alternatives \ --install %{_bindir}/vacuumdb vacuumdb %{pgsqllibdir}/bin/vacuumdb %{pgver}%{pgminver} \ --slave %{_mandir}/man1/vacuumdb.1 vacuumdb.1 %{pgsqldatadir}/man/man1/vacuumdb.1* || : -%postun clients +%postun clients if [ $1 -eq 0 ]; then update-alternatives --remove clusterdb %{pgsqllibdir}/bin/clusterdb || : update-alternatives --remove createdb %{pgsqllibdir}/bin/createdb || : @@ -784,6 +841,15 @@ if [ $1 -eq 0 ]; then update-alternatives --remove vacuumdb %{pgsqllibdir}/bin/vacuumdb || : fi +%posttrans -n postgresql-devel +update-alternatives \ + --install %{_bindir}/pg_config pg_config %{pgsqllibdir}/bin/pg_config %{pgver}%{pgminver} \ + --slave %{_mandir}/man1/pg_config.1 pg_config.1 %{pgsqldatadir}/man/man1/pg_config.1* || : + +%postun -n postgresql-devel + update-alternatives --remove pg_config %{pgsqllibdir}/bin/pg_config || : + + %post -n postgresql-libs -p /sbin/ldconfig %postun -n postgresql-libs -p /sbin/ldconfig @@ -829,7 +895,6 @@ fi %{extensiondir}/plpgsql--*.sql %{extensiondir}/plpgsql.control -%dir %{pgsqldatadir} %{pgsqldatadir}/*.bki %{pgsqldatadir}/*.sample %{pgsqldatadir}/*.description @@ -841,8 +906,6 @@ fi %dir %{pgsqldatadir}/contrib -%attr(700,postgres,postgres) /home/services/postgres -%attr(700,postgres,postgres) %dir /var/lib/pgsql %attr(640,postgres,postgres) %config(noreplace) %verify(not md5 mtime size) /var/log/pgsql %{pgsqldatadir}/man/man1/initdb.1* @@ -861,6 +924,24 @@ fi %{pgsqldatadir}/man/man1/postgres.1* %{pgsqldatadir}/man/man1/postmaster.1* +%files -n postgresql-common +%defattr(644,root,root,755) +%dir %{_libdir}/postgresql +%dir %{_datadir}/postgresql +%attr(700,postgres,postgres) %dir /var/lib/pgsql +%attr(700,postgres,postgres) %dir /var/run/postgresql + +%files dirs +%defattr(644,root,root,755) +%dir %{pgsqllibdir} +%dir %{pgsqllibdir}/bin +%dir %{pgsqllibdir}/lib +%dir %{pgsqldatadir} +%dir %{pgsqldatadir}/man +%dir %{pgsqldatadir}/man/man1 +%dir %{pgsqldatadir}/man/man3 +%dir %{pgsqldatadir}/man/man7 + %files doc %defattr(644,root,root,755) %doc doc/src/sgml/html howto