[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - download.lst external/postgresql RepositoryExternal.mk solenv/flatpak-manifest.in

2021-02-24 Thread Michael Stahl (via logerrit)
Rebased ref, commits from common ancestor:
commit 0b86543067019a20c5db1207fa9fd856d6ca529b
Author: Michael Stahl 
AuthorDate: Tue Jan 19 15:38:05 2021 +0100
Commit: Vasily Melenchuk 
CommitDate: Wed Feb 24 16:26:10 2021 +0300

postgresql: upgrade to release 13.1

Fixes CVE-2020-25694, plus a bunch more CVE that don't look relevant.

* --with-krb5 no longer exists, neither does --disable-shared
* remove internal-zlib.patch.1:
  zlib is only used by pg_* tools / contrib/pgcrypto
* remove postgresql-libs-leak.patch:
  some relic from pre-gbuild times, not clear what the point is for
  static libs
* remove postgresql-9.2.1-libreoffice.patch:
  another dmake .mk file relic, and the win32 nmake build system was
  removed
* add postgres-msvc-build.patch.1 to fix Cygwin perl and openssl
* on WNT, libpq.dll is now built, no longer static lib

postgresql: fix mistake in RepositoryExternal.mk

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109640
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 234833f7823a1424b62c93e145f0cfe2c6b6efd5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109698
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 1362bf7fa2957d34a7cef18dd95ede22cc42787f)

 Conflicts:
download.lst

Change-Id: Ic0232a28801b2f604d9f4e33d5621ae3362defaa

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 3d8ce2a880be..6a3b785c3695 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3056,9 +3056,15 @@ endef
 
 else # !SYSTEM_POSTGRESQL
 
+ifeq ($(OS),WNT)
+$(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
+   postgresql \
+))
+endif # WNT
+
 define gb_LinkTarget__use_postgresql
 
-$(call gb_LinkTarget_use_external_project,$(1),postgresql)
+$(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
 
 $(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
@@ -3066,19 +3072,21 @@ $(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
 )
 
+ifeq ($(OS),WNT)
+
 $(call gb_LinkTarget_add_libs,$(1),\
-   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT)
 \
+   $(call gb_UnpackedTarball_get_dir,postgresql)/$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/libpq/libpq.lib \
 )
 
-ifeq ($(OS),WNT)
-$(call gb_LinkTarget_use_external,$(1),openssl)
+else # WNT
 
-$(call gb_LinkTarget_use_system_win32_libs,$(1),\
-   secur32 \
-   ws2_32 \
+$(call gb_LinkTarget_add_libs,$(1),\
+   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT)
 \
+   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT)
 \
+   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT)
 \
 )
 
-endif
+endif # WNT
 
 endef
 
diff --git a/download.lst b/download.lst
index ab52c4e2c1c0..e3f1bb159cd6 100644
--- a/download.lst
+++ b/download.lst
@@ -208,8 +208,8 @@ export LIBPNG_SHA256SUM := 
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201f
 export LIBPNG_TARBALL := libpng-1.6.37.tar.xz
 export POPPLER_SHA256SUM := 
016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3
 export POPPLER_TARBALL := poppler-21.01.0.tar.xz
-export POSTGRESQL_SHA256SUM := 
a754c02f7051c2f21e52f8669a421b50485afcde9a581674d6106326b189d126
-export POSTGRESQL_TARBALL := postgresql-9.2.24.tar.bz2
+export POSTGRESQL_SHA256SUM := 
12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f
+export POSTGRESQL_TARBALL := postgresql-13.1.tar.bz2
 export PYTHON_SHA256SUM := 
c24a37c63a67f53bdd09c5f287b5cff8e8b98f857bf348c577d454d3f74db049
 export PYTHON_TARBALL := Python-3.5.9.tar.xz
 export QXP_SHA256SUM := 
e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c
diff --git a/external/postgresql/ExternalPackage_postgresql.mk 
b/external/postgresql/ExternalPackage_postgresql.mk
new file mode 100644
index ..f6c9a9bb6deb
--- /dev/null
+++ b/external/postgresql/ExternalPackage_postgresql.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalPackage_ExternalPackage,postgresql,postgresql))
+
+$(eval $(call gb_ExternalPackage_use_external_project,postgresql,postgresql))
+
+$(eval $(call 
gb_ExternalPackage_add_file,postgresql,$(LIBO_LIB_FOLDER)/libpq.dll,$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/libpq/libpq.dll))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/postgresql/ExternalProject_postgresql.mk 

[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - download.lst external/postgresql RepositoryExternal.mk solenv/flatpak-manifest.in

2021-02-18 Thread Michael Stahl (via logerrit)
 RepositoryExternal.mk  |   24 ++-
 download.lst   |4 
 external/postgresql/ExternalPackage_postgresql.mk  |   16 ++
 external/postgresql/ExternalProject_postgresql.mk  |   16 +-
 external/postgresql/Module_postgresql.mk   |6 
 external/postgresql/UnpackedTarball_postgresql.mk  |   11 -
 external/postgresql/config.pl  |1 
 external/postgresql/internal-zlib.patch.1  |   29 
 external/postgresql/postgres-msvc-build.patch.1|  110 +
 external/postgresql/postgresql-9.2.1-libreoffice.patch |   74 ---
 external/postgresql/postgresql-libs-leak.patch |   40 --
 solenv/flatpak-manifest.in |6 
 12 files changed, 166 insertions(+), 171 deletions(-)

New commits:
commit 530535fd12536a83e1c192272c54c43c9ea4c94b
Author: Michael Stahl 
AuthorDate: Tue Jan 19 15:38:05 2021 +0100
Commit: Vasily Melenchuk 
CommitDate: Wed Feb 17 23:57:22 2021 +0300

postgresql: upgrade to release 13.1

Fixes CVE-2020-25694, plus a bunch more CVE that don't look relevant.

* --with-krb5 no longer exists, neither does --disable-shared
* remove internal-zlib.patch.1:
  zlib is only used by pg_* tools / contrib/pgcrypto
* remove postgresql-libs-leak.patch:
  some relic from pre-gbuild times, not clear what the point is for
  static libs
* remove postgresql-9.2.1-libreoffice.patch:
  another dmake .mk file relic, and the win32 nmake build system was
  removed
* add postgres-msvc-build.patch.1 to fix Cygwin perl and openssl
* on WNT, libpq.dll is now built, no longer static lib

postgresql: fix mistake in RepositoryExternal.mk

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109640
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 234833f7823a1424b62c93e145f0cfe2c6b6efd5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109698
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 1362bf7fa2957d34a7cef18dd95ede22cc42787f)

 Conflicts:
download.lst

Change-Id: Ic0232a28801b2f604d9f4e33d5621ae3362defaa

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 3d8ce2a880be..6a3b785c3695 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3056,9 +3056,15 @@ endef
 
 else # !SYSTEM_POSTGRESQL
 
+ifeq ($(OS),WNT)
+$(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
+   postgresql \
+))
+endif # WNT
+
 define gb_LinkTarget__use_postgresql
 
-$(call gb_LinkTarget_use_external_project,$(1),postgresql)
+$(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
 
 $(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
@@ -3066,19 +3072,21 @@ $(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
 )
 
+ifeq ($(OS),WNT)
+
 $(call gb_LinkTarget_add_libs,$(1),\
-   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT)
 \
+   $(call gb_UnpackedTarball_get_dir,postgresql)/$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/libpq/libpq.lib \
 )
 
-ifeq ($(OS),WNT)
-$(call gb_LinkTarget_use_external,$(1),openssl)
+else # WNT
 
-$(call gb_LinkTarget_use_system_win32_libs,$(1),\
-   secur32 \
-   ws2_32 \
+$(call gb_LinkTarget_add_libs,$(1),\
+   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT)
 \
+   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT)
 \
+   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT)
 \
 )
 
-endif
+endif # WNT
 
 endef
 
diff --git a/download.lst b/download.lst
index ab52c4e2c1c0..e3f1bb159cd6 100644
--- a/download.lst
+++ b/download.lst
@@ -208,8 +208,8 @@ export LIBPNG_SHA256SUM := 
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201f
 export LIBPNG_TARBALL := libpng-1.6.37.tar.xz
 export POPPLER_SHA256SUM := 
016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3
 export POPPLER_TARBALL := poppler-21.01.0.tar.xz
-export POSTGRESQL_SHA256SUM := 
a754c02f7051c2f21e52f8669a421b50485afcde9a581674d6106326b189d126
-export POSTGRESQL_TARBALL := postgresql-9.2.24.tar.bz2
+export POSTGRESQL_SHA256SUM := 
12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f
+export POSTGRESQL_TARBALL := postgresql-13.1.tar.bz2
 export PYTHON_SHA256SUM := 
c24a37c63a67f53bdd09c5f287b5cff8e8b98f857bf348c577d454d3f74db049
 export PYTHON_TARBALL := Python-3.5.9.tar.xz
 export QXP_SHA256SUM := 
e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c
diff --git a/external/postgresql/ExternalPackage_postgresql.mk 
b/external/postgresql/ExternalPackage_postgresql.mk
new file mode 100644
index ..f6c9a9bb6deb
---