11Summary: PostgreSQL database engine
22Name: postgresql
3- Version: 14.10
3+ Version: 14.11
44Release: 1%{?dist }
55License: PostgreSQL
66Vendor: Microsoft Corporation
@@ -35,6 +35,12 @@ Requires: zlib
3535%description
3636PostgreSQL is an object-relational database management system.
3737
38+ %package docs
39+ Summary: Extra documentation for PostgreSQL
40+
41+ %description docs
42+ The postgresql-docs package includes the documentation.
43+
3844%package libs
3945Summary: Libraries for use with PostgreSQL
4046Group: Applications/Databases
@@ -64,10 +70,11 @@ The postgresql-devel package contains libraries and header files for
6470developing applications that use postgresql.
6571
6672%prep
67- %setup -q
73+ %autosetup -p1
6874
6975%build
70- sed -i ' /DEFAULT_PGSOCKET_DIR/s@/tmp@/run/postgresql@' src/include/pg_config_manual.h &&
76+ sed -i ' /DEFAULT_PGSOCKET_DIR/s@/tmp@/run/postgresql@' src/include/pg_config_manual.h
77+
7178./configure \
7279 --enable-thread-safety \
7380 --prefix= %{_prefix } \
@@ -78,13 +85,11 @@ sed -i '/DEFAULT_PGSOCKET_DIR/s@/tmp@/run/postgresql@' src/include/pg_config_man
7885 --with-readline \
7986 --with-system-tzdata= %{_datadir }/zoneinfo \
8087 --docdir= %{_docdir }/postgresql
81- make -C ./src/backend generated-headers
82- make %{?_smp_mflags }
83- cd contrib && make %{?_smp_mflags }
88+
89+ %make_build world
8490
8591%install
86- make install DESTDIR=%{buildroot }
87- cd contrib && make install DESTDIR=%{buildroot }
92+ %make_install install-world
8893
8994# For postgresql 10+, commands are renamed
9095# Ref: https://wiki.postgresql.org/wiki/New_in_postgres_10
@@ -93,9 +98,19 @@ ln -sf pg_resetwal %{buildroot}%{_bindir}/pg_resetxlog
9398ln -sf pg_waldump %{buildroot }%{_bindir }/pg_xlogdump
9499%{_fixperms } %{buildroot }/*
95100
101+ # Remove anything related to Python 2. These have no need to be
102+ # around as only Python 3 is supported.
103+ rm -f %{buildroot }%{_pgdatadir }/extension/*plpython2u* \
104+ %{buildroot }%{_pgdatadir }/extension/*plpythonu-* \
105+ %{buildroot }%{_pgdatadir }/extension/*_plpythonu.control
106+
107+ # Remove currently unnecessary man pages.
108+ rm -f %{buildroot }%{_mandir }/man1/* \
109+ %{buildroot }%{_mandir }/man3/* \
110+ %{buildroot }%{_mandir }/man7/*
111+
96112%check
97- sed -i ' 2219s/",/ ; EXIT_STATUS=$? ; sleep 5 ; exit $EXIT_STATUS",/g' src/test/regress/pg_regress.c
98- chown -Rv nobody .
113+ chown -Rv nobody:nogroup .
99114sudo -u nobody -s /bin/bash -c " PATH=$PATH make -k check"
100115
101116%ldconfig_scriptlets
@@ -133,6 +148,10 @@ sudo -u nobody -s /bin/bash -c "PATH=$PATH make -k check"
133148%exclude %{_datadir }/postgresql/pg_service.conf.sample
134149%exclude %{_datadir }/postgresql/psqlrc.sample
135150
151+ %files docs
152+ %defattr(-,root,root)
153+ %{_docdir }/postgresql/*
154+
136155%files libs
137156%{_bindir }/clusterdb
138157%{_bindir }/createdb
@@ -172,6 +191,10 @@ sudo -u nobody -s /bin/bash -c "PATH=$PATH make -k check"
172191%{_libdir }/libpgtypes.a
173192
174193%changelog
194+ * Tue Feb 27 2024 Thien Trung Vuong <cblmargh@microsoft.com> - 14.11-1
195+ - Update to version 14.11 to fix CVE-2024-0985
196+ - Added the 'docs' subpackage.
197+
175198* Fri Dec 29 2023 Neha Agarwal <nehaagarwal@microsoft.com> - 14.10-1
176199- Upgrade to 14.10 to fix CVE-2023-5868, CVE-2023-5869 and CVE-2023-5870
177200
0 commit comments