From 322901735a30f6e06ef085bc424ad0f44be28128 Mon Sep 17 00:00:00 2001 From: openKylinBot Date: Sat, 14 May 2022 02:43:37 +0800 Subject: [PATCH] format patches --- debian/patches/50-per-version-dirs.patch | 16 +++++- .../patches/51-default-sockets-in-var.patch | 14 +++-- debian/patches/52-tutorial-README.patch | 13 ++++- .../53-pg_service.conf_directory_doc.patch | 20 ++++--- ...bian-alternatives-for-external-tools.patch | 19 +++++-- debian/patches/70-history | 15 +++-- debian/patches/filter-debug-prefix-map | 11 +++- debian/patches/initdb-startup-message | 15 +++-- debian/patches/libpgport-pkglibdir | 56 ++++++++++++------- 9 files changed, 129 insertions(+), 50 deletions(-) diff --git a/debian/patches/50-per-version-dirs.patch b/debian/patches/50-per-version-dirs.patch index 2e89b3a..ff012f1 100644 --- a/debian/patches/50-per-version-dirs.patch +++ b/debian/patches/50-per-version-dirs.patch @@ -1,7 +1,9 @@ -Author: Martin Pitt -Description: Use version specific installation directories so that several major versions can be installed in parallel. -Forwarded: No, Debian specific packaging with postgresql-common +From: Martin Pitt +Date: Sat, 14 May 2022 02:43:37 +0800 +Subject: Use version specific installation directories so that several major + versions can be installed in parallel. +Forwarded: No, Debian specific packaging with postgresql-common * Install lib files into /usr/lib/postgresql//lib/ * Install server related header files into /usr/include/postgresql//server/ * Disable PostgreSQL's automagic path mangling and fix libdir for pg_config, @@ -9,7 +11,13 @@ Forwarded: No, Debian specific packaging with postgresql-common identically. Bug-Debian: http://bugs.debian.org/462037 +--- + src/Makefile.global.in | 4 ++-- + src/bin/pg_config/pg_config.c | 8 +++----- + 2 files changed, 5 insertions(+), 7 deletions(-) +diff --git a/src/Makefile.global.in b/src/Makefile.global.in +index 1d60560..a037ac5 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -120,7 +120,7 @@ libdir := @libdir@ @@ -30,6 +38,8 @@ Bug-Debian: http://bugs.debian.org/462037 includedir_internal = $(pkgincludedir)/internal pgxsdir = $(pkglibdir)/pgxs bitcodedir = $(pkglibdir)/bitcode +diff --git a/src/bin/pg_config/pg_config.c b/src/bin/pg_config/pg_config.c +index 5279e7f..b613869 100644 --- a/src/bin/pg_config/pg_config.c +++ b/src/bin/pg_config/pg_config.c @@ -27,6 +27,8 @@ diff --git a/debian/patches/51-default-sockets-in-var.patch b/debian/patches/51-default-sockets-in-var.patch index 311ea51..9877a75 100644 --- a/debian/patches/51-default-sockets-in-var.patch +++ b/debian/patches/51-default-sockets-in-var.patch @@ -1,15 +1,21 @@ -Author: Martin Pitt -Description: Put server Unix sockets into /var/run/postgresql/ by default -Forwarded: No, Debian specific configuration with postgresql-common +From: Martin Pitt +Date: Sat, 14 May 2022 02:43:37 +0800 +Subject: Put server Unix sockets into /var/run/postgresql/ by default +Forwarded: No, Debian specific configuration with postgresql-common Using /tmp for sockets allows everyone to spoof a PostgreSQL server. Thus use /var/run/postgresql/ for "system" clusters which run as 'postgres' (user clusters will still use /tmp). Since system cluster are by far the common case, set it as default. +--- + src/include/pg_config_manual.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h +index 743401c..6b23e7b 100644 --- a/src/include/pg_config_manual.h +++ b/src/include/pg_config_manual.h -@@ -177,7 +177,7 @@ +@@ -179,7 +179,7 @@ * here's where to twiddle it. You can also override this at runtime * with the postmaster's -k switch. */ diff --git a/debian/patches/52-tutorial-README.patch b/debian/patches/52-tutorial-README.patch index 9eb3263..ddac7f0 100644 --- a/debian/patches/52-tutorial-README.patch +++ b/debian/patches/52-tutorial-README.patch @@ -1,7 +1,14 @@ -Author: Martin Pitt -Description: Update tutorial README for required build dependencies. -Forwarded: No, Debian specific +From: Martin Pitt +Date: Sat, 14 May 2022 02:43:37 +0800 +Subject: Update tutorial README for required build dependencies. +Forwarded: No, Debian specific +--- + src/tutorial/README | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/tutorial/README b/src/tutorial/README +index b137cdf..be070c5 100644 --- a/src/tutorial/README +++ b/src/tutorial/README @@ -6,8 +6,7 @@ tutorial diff --git a/debian/patches/53-pg_service.conf_directory_doc.patch b/debian/patches/53-pg_service.conf_directory_doc.patch index 584b41c..7865c38 100644 --- a/debian/patches/53-pg_service.conf_directory_doc.patch +++ b/debian/patches/53-pg_service.conf_directory_doc.patch @@ -1,11 +1,17 @@ -Author: Martin Pitt -Description: Update pg_service.conf example to tell the Debian specific file location. -Forwarded: No, Debian specific +From: Martin Pitt +Date: Sat, 14 May 2022 02:43:37 +0800 +Subject: Update pg_service.conf example to tell the Debian specific file + location. -Index: postgresql-9.2-9.2~beta1/src/interfaces/libpq/pg_service.conf.sample -=================================================================== ---- postgresql-9.2-9.2~beta1.orig/src/interfaces/libpq/pg_service.conf.sample 2011-04-27 23:17:22.000000000 +0200 -+++ postgresql-9.2-9.2~beta1/src/interfaces/libpq/pg_service.conf.sample 2011-05-10 11:25:42.151949794 +0200 +Forwarded: No, Debian specific +--- + src/interfaces/libpq/pg_service.conf.sample | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/interfaces/libpq/pg_service.conf.sample b/src/interfaces/libpq/pg_service.conf.sample +index 5a1c083..7ef2ebd 100644 +--- a/src/interfaces/libpq/pg_service.conf.sample ++++ b/src/interfaces/libpq/pg_service.conf.sample @@ -8,8 +8,8 @@ # to look up such parameters. A sample configuration for postgres is # included in this file. Lines beginning with '#' are comments. diff --git a/debian/patches/54-debian-alternatives-for-external-tools.patch b/debian/patches/54-debian-alternatives-for-external-tools.patch index 13c2741..d65873d 100644 --- a/debian/patches/54-debian-alternatives-for-external-tools.patch +++ b/debian/patches/54-debian-alternatives-for-external-tools.patch @@ -1,10 +1,19 @@ -Author: Martin Pitt -Description: Use Debian alternatives for external tools instead of hardcoded programs -Forwarded: No, Debian specific +From: Martin Pitt +Date: Sat, 14 May 2022 02:43:37 +0800 +Subject: Use Debian alternatives for external tools instead of hardcoded + programs +Forwarded: No, Debian specific +--- + src/bin/psql/settings.h | 4 ++-- + src/include/fe_utils/print.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h +index 5be5091..e4e876a 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h -@@ -19,8 +19,8 @@ +@@ -20,8 +20,8 @@ #define DEFAULT_EDITOR "notepad.exe" /* no DEFAULT_EDITOR_LINENUMBER_ARG for Notepad */ #else @@ -15,6 +24,8 @@ Forwarded: No, Debian specific #endif #define DEFAULT_PROMPT1 "%/%R%# " +diff --git a/src/include/fe_utils/print.h b/src/include/fe_utils/print.h +index f138d96..2356a8e 100644 --- a/src/include/fe_utils/print.h +++ b/src/include/fe_utils/print.h @@ -18,7 +18,7 @@ diff --git a/debian/patches/70-history b/debian/patches/70-history index 34c8683..03c4416 100644 --- a/debian/patches/70-history +++ b/debian/patches/70-history @@ -1,10 +1,17 @@ -Author: Christoph Berg -Description: Document Debian location of release notes files. -Forwarded: No, Debian specific +From: Christoph Berg +Date: Sat, 14 May 2022 02:43:37 +0800 +Subject: Document Debian location of release notes files. +Forwarded: No, Debian specific +--- + HISTORY | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/HISTORY b/HISTORY +index 18d7b1b..c21a79d 100644 --- a/HISTORY +++ b/HISTORY -@@ -3,3 +3,6 @@ +@@ -3,3 +3,6 @@ https://www.postgresql.org/docs/current/static/release.html Distribution file sets include release notes for their version and preceding versions. Visit the file doc/src/sgml/html/release.html in an HTML browser. diff --git a/debian/patches/filter-debug-prefix-map b/debian/patches/filter-debug-prefix-map index 0ce9e0c..fc124ac 100644 --- a/debian/patches/filter-debug-prefix-map +++ b/debian/patches/filter-debug-prefix-map @@ -1,3 +1,7 @@ +From: Debian PostgreSQL Maintainers +Date: Sat, 14 May 2022 02:43:37 +0800 +Subject: filter-debug-prefix-map + To make the PostgreSQL server packages build reproducibly, we need to remove the build path from -fdebug-prefix-map and -ffile-prefix-map in CFLAGS. @@ -10,10 +14,15 @@ the build path from -fdebug-prefix-map and -ffile-prefix-map in CFLAGS. * To make PGXS module builds reproducible, pg_buildext copies the environment CFLAGS to COPT where Makefile.global picks them up, using the prefix maps from dpkg-buildflags. +--- + src/common/Makefile | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) +diff --git a/src/common/Makefile b/src/common/Makefile +index 2f22b9b..01cc2e0 100644 --- a/src/common/Makefile +++ b/src/common/Makefile -@@ -27,10 +27,11 @@ include $(top_builddir)/src/Makefile.glo +@@ -31,10 +31,11 @@ include $(top_builddir)/src/Makefile.global # don't include subdirectory-path-dependent -I and -L switches STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS)) STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS)) diff --git a/debian/patches/initdb-startup-message b/debian/patches/initdb-startup-message index c164ad9..e32def1 100644 --- a/debian/patches/initdb-startup-message +++ b/debian/patches/initdb-startup-message @@ -1,10 +1,17 @@ -Author: Christoph Berg -Description: Debian-specific cluster startup message from initdb -Forwarded: No, Debian specific +From: Christoph Berg +Date: Sat, 14 May 2022 02:43:37 +0800 +Subject: Debian-specific cluster startup message from initdb +Forwarded: No, Debian specific +--- + src/bin/initdb/initdb.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c +index acf6108..ff852f5 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c -@@ -3411,7 +3411,7 @@ main(int argc, char *argv[]) +@@ -3363,7 +3363,7 @@ main(int argc, char *argv[]) printf(_("\nSuccess. You can now start the database server using:\n\n" " %s\n\n"), diff --git a/debian/patches/libpgport-pkglibdir b/debian/patches/libpgport-pkglibdir index 0677f5b..8cdc320 100644 --- a/debian/patches/libpgport-pkglibdir +++ b/debian/patches/libpgport-pkglibdir @@ -1,12 +1,37 @@ -Author: Christoph Berg -Description: Move libpgport/libpgcommon/libpgfeutils from libdir to pkglibdir - This allows client applications to link to version-specific libraries. - Used by pg-checksums. -Forwarded: No, (somewhat) Debian specific +From: Christoph Berg +Date: Sat, 14 May 2022 02:43:37 +0800 +Subject: Move libpgport/libpgcommon/libpgfeutils from libdir to pkglibdir +This allows client applications to link to version-specific libraries. +Used by pg-checksums. +Forwarded: No, (somewhat) Debian specific +--- + src/Makefile.global.in | 4 ++-- + src/common/Makefile | 10 +++++----- + src/fe_utils/Makefile | 6 +++--- + src/port/Makefile | 10 +++++----- + 4 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/src/Makefile.global.in b/src/Makefile.global.in +index a037ac5..17f46f1 100644 +--- a/src/Makefile.global.in ++++ b/src/Makefile.global.in +@@ -562,8 +562,8 @@ libpq = -L$(libpq_builddir) -lpq + # on client link lines, since that also appears in $(LIBS). + # libpq_pgport_shlib is the same idea, but for use in client shared libraries. + ifdef PGXS +-libpq_pgport = -L$(libdir) -lpgcommon -lpgport $(libpq) +-libpq_pgport_shlib = -L$(libdir) -lpgcommon_shlib -lpgport_shlib $(libpq) ++libpq_pgport = -L$(pkglibdir) -lpgcommon -lpgport $(libpq) ++libpq_pgport_shlib = -L$(pkglibdir) -lpgcommon_shlib -lpgport_shlib $(libpq) + else + libpq_pgport = -L$(top_builddir)/src/common -lpgcommon -L$(top_builddir)/src/port -lpgport $(libpq) + libpq_pgport_shlib = -L$(top_builddir)/src/common -lpgcommon_shlib -L$(top_builddir)/src/port -lpgport_shlib $(libpq) +diff --git a/src/common/Makefile b/src/common/Makefile +index 01cc2e0..62ace8c 100644 --- a/src/common/Makefile +++ b/src/common/Makefile -@@ -68,15 +68,15 @@ all: libpgcommon.a libpgcommon_shlib.a l +@@ -79,15 +79,15 @@ distprep: kwlist_d.h # libpgcommon is needed by some contrib install: all installdirs @@ -27,6 +52,8 @@ Forwarded: No, (somewhat) Debian specific libpgcommon.a: $(OBJS_FRONTEND) rm -f $@ +diff --git a/src/fe_utils/Makefile b/src/fe_utils/Makefile +index 7d73800..5dd2360 100644 --- a/src/fe_utils/Makefile +++ b/src/fe_utils/Makefile @@ -35,13 +35,13 @@ distprep: psqlscan.c @@ -46,9 +73,11 @@ Forwarded: No, (somewhat) Debian specific clean distclean: rm -f libpgfeutils.a $(OBJS) lex.backup +diff --git a/src/port/Makefile b/src/port/Makefile +index b9492b7..9f0d1e7 100644 --- a/src/port/Makefile +++ b/src/port/Makefile -@@ -54,15 +54,15 @@ all: libpgport.a libpgport_shlib.a libpg +@@ -50,15 +50,15 @@ all: libpgport.a libpgport_shlib.a libpgport_srv.a # libpgport is needed by some contrib install: all installdirs @@ -69,16 +98,3 @@ Forwarded: No, (somewhat) Debian specific libpgport.a: $(OBJS) rm -f $@ ---- a/src/Makefile.global.in -+++ b/src/Makefile.global.in -@@ -549,8 +549,8 @@ libpq = -L$(libpq_builddir) -lpq - # on client link lines, since that also appears in $(LIBS). - # libpq_pgport_shlib is the same idea, but for use in client shared libraries. - ifdef PGXS --libpq_pgport = -L$(libdir) -lpgcommon -lpgport $(libpq) --libpq_pgport_shlib = -L$(libdir) -lpgcommon_shlib -lpgport_shlib $(libpq) -+libpq_pgport = -L$(pkglibdir) -lpgcommon -lpgport $(libpq) -+libpq_pgport_shlib = -L$(pkglibdir) -lpgcommon_shlib -lpgport_shlib $(libpq) - else - libpq_pgport = -L$(top_builddir)/src/common -lpgcommon -L$(top_builddir)/src/port -lpgport $(libpq) - libpq_pgport_shlib = -L$(top_builddir)/src/common -lpgcommon_shlib -L$(top_builddir)/src/port -lpgport_shlib $(libpq)