Skip to content

Commit 317bacf

Browse files
[AUTO-CHERRYPICK] postgresql: update to version14.11 to fix CVE-2024-0985 - branch main (#8161)
1 parent 8bae98a commit 317bacf

3 files changed

Lines changed: 38 additions & 15 deletions

File tree

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Signatures": {
3-
"postgresql-14.10.tar.bz2": "c99431c48e9d470b0d0ab946eb2141a3cd19130c2fb4dc4b3284a7774ecc8399"
2+
"Signatures": {
3+
"postgresql-14.11.tar.bz2": "a670bd7dce22dcad4297b261136b3b1d4a09a6f541719562aa14ca63bf2968a8"
44
}
5-
}
5+
}

SPECS/postgresql/postgresql.spec

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Summary: PostgreSQL database engine
22
Name: postgresql
3-
Version: 14.10
3+
Version: 14.11
44
Release: 1%{?dist}
55
License: PostgreSQL
66
Vendor: Microsoft Corporation
@@ -35,6 +35,12 @@ Requires: zlib
3535
%description
3636
PostgreSQL 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
3945
Summary: Libraries for use with PostgreSQL
4046
Group: Applications/Databases
@@ -64,10 +70,11 @@ The postgresql-devel package contains libraries and header files for
6470
developing 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
9398
ln -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 .
99114
sudo -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

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21454,8 +21454,8 @@
2145421454
"type": "other",
2145521455
"other": {
2145621456
"name": "postgresql",
21457-
"version": "14.10",
21458-
"downloadUrl": "https://ftp.postgresql.org/pub/source/v14.10/postgresql-14.10.tar.bz2"
21457+
"version": "14.11",
21458+
"downloadUrl": "https://ftp.postgresql.org/pub/source/v14.11/postgresql-14.11.tar.bz2"
2145921459
}
2146021460
}
2146121461
},

0 commit comments

Comments
 (0)