396089
We should ideally provide '/bin/pg_config' in postgresql-server-devel, and
396089
provide no pg_config binary in libpq package.  But most of the Fedora packages
396089
that use pg_config actually only build against PG libraries (and
396089
postgresql-server-devel isn't needed).  So.., to avoid the initial rush around
396089
rhbz#1618698 change, rather provide pg_server_config binary, which int urn means
396089
that we'll have to fix only a minimal set of packages which really build
396089
PostgreSQL server modules.
396089
396089
diff -up postgresql-13.1/src/bin/pg_config/Makefile.patch9 postgresql-13.1/src/bin/pg_config/Makefile
396089
--- postgresql-13.1/src/bin/pg_config/Makefile.patch9	2020-11-18 09:28:30.885453275 +0100
396089
+++ postgresql-13.1/src/bin/pg_config/Makefile	2020-11-18 09:31:33.926325327 +0100
396089
@@ -11,6 +11,8 @@
396089
 PGFILEDESC = "pg_config - report configuration information"
396089
 PGAPPICON=win32
396089
 
396089
+PG_CONFIG = pg_server_config$(X)
396089
+
396089
 subdir = src/bin/pg_config
396089
 top_builddir = ../../..
396089
 include $(top_builddir)/src/Makefile.global
396089
@@ -19,22 +21,22 @@ OBJS = \
396089
 	$(WIN32RES) \
396089
 	pg_config.o
396089
 
396089
-all: pg_config
396089
+all: $(PG_CONFIG)
396089
 
396089
-pg_config: $(OBJS) | submake-libpgport
396089
-	$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
396089
+$(PG_CONFIG): $(OBJS) | submake-libpgport
396089
+	$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
396089
 
396089
 install: all installdirs
396089
-	$(INSTALL_SCRIPT) pg_config$(X) '$(DESTDIR)$(bindir)/pg_config$(X)'
396089
+	$(INSTALL_SCRIPT) $(PG_CONFIG) '$(DESTDIR)$(bindir)/$(PG_CONFIG)'
396089
 
396089
 installdirs:
396089
 	$(MKDIR_P) '$(DESTDIR)$(bindir)'
396089
 
396089
 uninstall:
396089
-	rm -f '$(DESTDIR)$(bindir)/pg_config$(X)'
396089
+	rm -f '$(DESTDIR)$(bindir)/$(PG_CONFIG)'
396089
 
396089
 clean distclean maintainer-clean:
396089
-	rm -f pg_config$(X) $(OBJS)
396089
+	rm -f $(PG_CONFIG) $(OBJS)
396089
 	rm -rf tmp_check
396089
 
396089
 check:
396089
diff -up postgresql-13.1/src/bin/pg_config/nls.mk.patch9 postgresql-13.1/src/bin/pg_config/nls.mk
396089
--- postgresql-13.1/src/bin/pg_config/nls.mk.patch9	2020-11-18 09:28:30.885453275 +0100
396089
+++ postgresql-13.1/src/bin/pg_config/nls.mk	2020-11-18 09:32:00.735599526 +0100
396089
@@ -1,4 +1,4 @@
396089
 # src/bin/pg_config/nls.mk
396089
-CATALOG_NAME     = pg_config
396089
+CATALOG_NAME     = pg_server_config
396089
 AVAIL_LANGUAGES  = cs de el es fr he it ja ka ko pl pt_BR ru sv tr uk vi zh_CN
396089
 GETTEXT_FILES    = pg_config.c ../../common/config_info.c ../../common/exec.c