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