From c50614ad5cc9de9aaaab11e4ddd9780e1200066a Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 7 Oct 2019 23:04:30 +0200 Subject: [PATCH] - PostgreSQL 12 is now default in TLD --- postgresql.logrotate | 7 -- postgresql.spec | 193 ++----------------------------------------- 2 files changed, 7 insertions(+), 193 deletions(-) delete mode 100644 postgresql.logrotate diff --git a/postgresql.logrotate b/postgresql.logrotate deleted file mode 100644 index 1001b95..0000000 --- a/postgresql.logrotate +++ /dev/null @@ -1,7 +0,0 @@ -/var/log/postgresql/*.log -{ - olddir /var/log/archive/postgresql - notifempty - missingok - copytruncate -} diff --git a/postgresql.spec b/postgresql.spec index 7bbed52..ef3f6b3 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -29,7 +29,7 @@ Summary(uk.UTF-8): PostgreSQL - система керування базами Summary(zh_CN.UTF-8): PostgreSQL 客户端程序和库文件 Name: postgresql-%{pgsqlversion} Version: %{pgsqlversion}.5 -Release: 1 +Release: 2 License: BSD Group: Applications/Databases Source0: http://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2 @@ -38,7 +38,6 @@ Source1: postgresql.init Source2: pgsql-Database-HOWTO-html.tar.gz # Source2-md5: 5b656ddf1db41965761f85204a14398e Source3: postgresql.sysconfig -Source4: postgresql.logrotate Patch0: postgresql-conf.patch Patch1: postgresql-absolute_dbpaths.patch Patch2: postgresql-ecpg-includedir.patch @@ -198,29 +197,6 @@ Common directories for PostgresSQL %{pgsqlversion} %description dirs -l pl.UTF-8 Wspólne pliki i katalogi dla PostgreSQL %{pgsqlversion} -%package -n postgresql-devel -Summary: PostgreSQL development header files and libraries -Summary(de.UTF-8): PostgreSQL-Entwicklungs-Header-Dateien und Libraries -Summary(es.UTF-8): Archivos de inclusión y bibliotecas PostgreSQL -Summary(fr.UTF-8): En-têtes et bibliothèques de développement PostgreSQL -Summary(pl.UTF-8): PostgreSQL - pliki nagłówkowe i biblioteki -Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas para desenvolvimento com o PostgreSQL -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 -This package contains header files and libraries required to compile -applications that are talking directly to the PostgreSQL backend -server. - -%description -n postgresql-devel -l pl.UTF-8 -Pakiet zawiera nagłówki oraz biblioteki wymagane do kompilacji -aplikacji łączących się bezpośrednio z serwerem PostgreSQL. - %package backend-devel Summary: PostgreSQL backend development header files Summary(pl.UTF-8): PostgreSQL - pliki nagłówkowe dla backendu @@ -276,21 +252,6 @@ etc., in HTML format. Pakiet ten zawiera dokumentację oraz HOWTO m.in. dla programistów, administratorów w formacie HTML. -%package -n postgresql-libs -Summary: PostgreSQL libraries -Summary(es.UTF-8): Biblioteca compartida del PostgreSQL -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. - -%description -n postgresql-libs -l pl.UTF-8 -Biblioteki dzielone programu PostgreSQL. - %package ecpg Summary: Embedded SQL in C interface Summary(pl.UTF-8): Interfejs wbudowanego SQL-a w język C @@ -306,65 +267,6 @@ Embedded SQL in C interface. %description ecpg -l pl.UTF-8 Interfejs wbudowanego SQL-a w język C. -%package -n postgresql-ecpg-libs -Summary: PostgreSQL libraries -Summary(es.UTF-8): Biblioteca compartida del PostgreSQL -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 - -%description -n postgresql-ecpg-libs -PostgreSQL shared libraries. - -%description -n postgresql-ecpg-libs -l pl.UTF-8 -Biblioteki dzielone programu PostgreSQL. - -%package -n postgresql-ecpg-devel -Summary: Embedded SQL in C interface files -Summary(pl.UTF-8): Pliki programistyczne interfejsu wbudowanego SQL-a w język C -Group: Development/Libraries -Requires: postgresql-devel >= %{version}-%{release} -Requires: postgresql-ecpg-devel >= %{version}-%{release} - -%description -n postgresql-ecpg-devel -Embedded SQL in C interface files. - -%description -n postgresql-ecpg-devel -l pl.UTF-8 -Pliki programistyczne interfejsu wbudowanego SQL-a w język C. - -%package -n postgresql-ecpg-static -Summary: PostgreSQL static libraries -Summary(es.UTF-8): Bibliotecas estaticas PostgreSQL -Summary(pl.UTF-8): Biblioteki statyczne programu PostgreSQL -Summary(pt_BR.UTF-8): Bibliotecas estáticas PostgreSQL -Summary(ru.UTF-8): Статические библиотеки для программирования с PostgreSQL -Summary(uk.UTF-8): Статичні бібліотеки для програмування з PostgreSQL -Group: Development/Libraries -Requires: postgresql-devel >= %{version}-%{release} - -%description -n postgresql-ecpg-static -PostgreSQL static libraries. - -%description -n postgresql-ecpg-static -l pl.UTF-8 -Biblioteki statyczne programu PostgreSQL. - -%package -n postgresql-static -Summary: PostgreSQL static libraries -Summary(es.UTF-8): Bibliotecas estaticas PostgreSQL -Summary(pl.UTF-8): Biblioteki statyczne programu PostgreSQL -Summary(pt_BR.UTF-8): Bibliotecas estáticas PostgreSQL -Summary(ru.UTF-8): Статические библиотеки для программирования с PostgreSQL -Summary(uk.UTF-8): Статичні бібліотеки для програмування з PostgreSQL -Group: Development/Libraries -Requires: postgresql-devel >= %{version}-%{release} - -%description -n postgresql-static -PostgreSQL static libraries. - -%description -n postgresql-static -l pl.UTF-8 -Biblioteki statyczne programu PostgreSQL. - %package module-plperl Summary: PL/perl - PostgreSQL procedural language Summary(pl.UTF-8): PL/perl - język proceduralny bazy danych PostgreSQL @@ -660,7 +562,7 @@ done %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{logrotate.d,rc.d/init.d,sysconfig}} \ +install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \ $RPM_BUILD_ROOT/var/{lib/postgresql/%{pgsqlversion},log/{archive,}/postgresql,run/postgresql} \ $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \ $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1} @@ -684,7 +586,6 @@ done sed -e 's,@pgsqlbindir@,%{pgsqllibdir}/bin,g; s,@pgsqlversion@,%{pgsqlversion},g;' %{SOURCE1} >$RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql-%{pgsqlversion} sed -e 's,@pgsqlversion@,%{pgsqlversion},g;' %{SOURCE3} >$RPM_BUILD_ROOT/etc/sysconfig/postgresql-%{pgsqlversion} -cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/postgresql install -d howto tar zxf %{SOURCE2} -C howto @@ -719,12 +620,14 @@ merge_lang psql initdb \ cp -p src/pl/plperl/ppport.h $RPM_BUILD_ROOT%{_includedir}/postgresql/%{pgsqlversion}/server/ -%{__mv} $RPM_BUILD_ROOT{%{pgsqllibdir}/bin,%{_bindir}}/pg_config -%{__mv} $RPM_BUILD_ROOT{%{pgsqldatadir}/man,%{_mandir}}/man1/pg_config.1 - # package it...? nah, why bother. %{__rm} -r $RPM_BUILD_ROOT%{pgsqldatadir}/doc/html +# remove common files provided by PostgreSQL from master branch +%{__rm} -r $RPM_BUILD_ROOT%{_includedir}/{ecpg*,libpq*,pg_config*,postgres_ext.h,postgresql/internal} +%{__rm} -r $RPM_BUILD_ROOT{%{_libdir}/{libecpg*,libpg*,libpq*,pkgconfig},%{pgsqllibdir}/bin/pg_config,%{pgsqldatadir}/man/man1/pg_config.1*} +%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{ecpglib*,libpq*,pg_config*} + %clean rm -rf $RPM_BUILD_ROOT @@ -784,10 +687,6 @@ if [ "$1" = "0" ]; then /sbin/chkconfig --del postgresql-%{pgsqlversion} fi -%pre -n postgresql-common -%groupadd -g 88 -r postgres -%useradd -M -o -r -u 88 -d /var/lib/postgresql -s /bin/sh -g postgres -c "PostgreSQL Server" postgres - %posttrans clients update-alternatives \ --install %{_bindir}/clusterdb clusterdb %{pgsqllibdir}/bin/clusterdb %{pgsqlpriority} \ @@ -846,15 +745,6 @@ if [ $1 -eq 0 ]; then update-alternatives --remove vacuumdb %{pgsqllibdir}/bin/vacuumdb || : fi -%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 - -%post -n postgresql-ecpg-libs -p /sbin/ldconfig -%postun -n postgresql-ecpg-libs -p /sbin/ldconfig - %files -f main.lang %defattr(644,root,root,755) %doc COPYRIGHT README HISTORY doc/{bug.template,KNOWN_BUGS,MISSING_FEATURES,TODO} @@ -923,16 +813,6 @@ 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/postgresql -%attr(750,postgres,postgres) %dir /var/log/postgresql -%attr(750,postgres,postgres) %dir /var/log/archive/postgresql -%attr(700,postgres,postgres) %dir /var/run/postgresql -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/postgresql - %files dirs %defattr(644,root,root,755) %dir %{pgsqllibdir} @@ -950,63 +830,11 @@ fi %doc doc/src/sgml/html howto %{_examplesdir}/%{name}-%{version} -%files -n postgresql-libs -f libpq5-%{pgsqlversion}.lang -%defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/libpq.so.*.* -%attr(755,root,root) %ghost %{_libdir}/libpq.so.5 - %files ecpg -f ecpg-%{pgsqlversion}.lang %defattr(644,root,root,755) %attr(755,root,root) %{pgsqllibdir}/bin/ecpg %{pgsqldatadir}/man/man1/ecpg.1* -%files -n postgresql-ecpg-libs -f ecpglib6-%{pgsqlversion}.lang -%attr(755,root,root) %{_libdir}/libecpg.so.*.* -%attr(755,root,root) %ghost %{_libdir}/libecpg.so.6 -%attr(755,root,root) %{_libdir}/libecpg_compat.so.*.* -%attr(755,root,root) %ghost %{_libdir}/libecpg_compat.so.3 -%attr(755,root,root) %{_libdir}/libpgtypes.so.*.* -%attr(755,root,root) %ghost %{_libdir}/libpgtypes.so.3 - -%files -n postgresql-ecpg-devel -%defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/libecpg.so -%attr(755,root,root) %{_libdir}/libecpg_compat.so -%attr(755,root,root) %{_libdir}/libpgtypes.so -%{_includedir}/ecpg* -%{_libdir}/pkgconfig/libecpg.pc -%{_libdir}/pkgconfig/libecpg_compat.pc -%{_libdir}/pkgconfig/libpgtypes.pc - -%files -n postgresql-ecpg-static -%defattr(644,root,root,755) -%{_libdir}/libecpg.a -%{_libdir}/libecpg_compat.a -%{_libdir}/libpgtypes.a - -%files -n postgresql-devel -f pg_config-%{pgsqlversion}.lang -%defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/pg_config -%attr(755,root,root) %{_libdir}/libpq.so -%dir %{_includedir}/postgresql -%{_includedir}/libpq-events.h -%{_includedir}/libpq-fe.h -%{_includedir}/pg_config.h -%{_includedir}/pg_config_ext.h -%{_includedir}/pg_config_manual.h -%{_includedir}/pg_config_os.h -%{_includedir}/postgres_ext.h -%dir %{_includedir}/postgresql/internal -%{_includedir}/postgresql/internal/c.h -%{_includedir}/postgresql/internal/libpq-int.h -%{_includedir}/postgresql/internal/port.h -%{_includedir}/postgresql/internal/postgres_fe.h -%{_includedir}/postgresql/internal/pqexpbuffer.h -%{_includedir}/postgresql/internal/libpq -%{_includedir}/libpq -%{_libdir}/pkgconfig/libpq.pc -%{_mandir}/man1/pg_config.1* - %files backend-devel %defattr(644,root,root,755) %dir %{_includedir}/postgresql/%{pgsqlversion} @@ -1016,13 +844,6 @@ fi %{moduledir}/pgxs/src %{pgsqldatadir}/man/man3/SPI_*.3* -%files -n postgresql-static -%defattr(644,root,root,755) -%{_libdir}/libpq.a -%{_libdir}/libpgcommon.a -%{_libdir}/libpgfeutils.a -%{_libdir}/libpgport.a - %files clients -f clients.lang %defattr(644,root,root,755) %attr(755,root,root) %{pgsqllibdir}/bin/clusterdb -- 2.46.0