Skip to content

Commit a3b8ebf

Browse files
committed
rpm macros: install macros file
For now, only %postgresql_major macro is defined. * .gitignore: New file. * Makefile.am: Include new makefile snippet. * configure.ac: Define rpm macros dir. This still needs to be fixed for SCLs (or defined explicitly during build), or removed because we don't build external plugins yet? Also bump package major version because this requires non-trivial update in spec files. * lib/rpm/Makefile.inc: New file. * lib/rpm/macros.d/macros.in: New template file.
1 parent 82abbb0 commit a3b8ebf

File tree

6 files changed

+24
-2
lines changed

6 files changed

+24
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ install-sh
1616
Makefile
1717
Makefile.in
1818
missing
19+
macros.postgresql*
1920
package.m4
2021
postgresql*-check-db-dir
2122
postgresql*-ctl

Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ EXTRA_DIST += \
101101
style.dsl
102102

103103
include $(srcdir)/share/postgresql-setup/Makefile.inc
104+
include $(srcdir)/lib/rpm/Makefile.inc
104105

105106
GENERATED_FILES += \
106107
$(bin_SCRIPTS) \

NEWS

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22

3-
Bugfixes in 4.1 version
3+
Bugfixes in 5.0 version
44

55
* postgresql-setup --upgrade now works with "umask & 0004 != 0"
66

77
* fixed semantics of 'redhat_sockets_hack' configuration option
88

9+
* the RPM macros file is installed automatically
10+
911
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1012

1113
New in 4.0 version:

configure.ac

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Use the MAJ.MIN[~SUFF]. Note that X.X > X.X~SUFF!
2-
AC_INIT([postgresql-setup], [4.1], [[email protected]])
2+
AC_INIT([postgresql-setup], [5.0], [[email protected]])
33
AC_CONFIG_AUX_DIR(auxdir)
44
config_aux_dir=auxdir
55
AC_SUBST([config_aux_dir])
@@ -49,6 +49,7 @@ _AX_TEXT_TPL_SUBST([$1])
4949
SED_CALL="\$(SED) \$(SED_RULES)"
5050
m4_pattern_allow(AM_V_GEN)
5151

52+
conf_dir([rpmmacrosdir], ['${prefix}/lib/rpm/macros.d'])
5253
conf_dir([systemdunitsdir], ['${prefix}/lib/systemd/system'])
5354
conf_dir([systemduserunitsdir], ['${prefix}/etc/systemd/system'])
5455
conf_dir([systemdlegacyscriptsdir], ['${libexecdir}/initscripts/legacy-actions'])

lib/rpm/Makefile.inc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
rpm_macros = %D%/macros.d/macros.$(NAME_BINARYBASE)
2+
rpm_macros_in = %D%/macros.d/macros.in
3+
4+
rpmmacros_DATA = $(rpm_macros)
5+
6+
GENERATED_FILES += $(rpmmacros_DATA)
7+
EXTRA_DIST += $(rpm_macros_in)
8+
9+
$(rpm_macros): $(rpm_macros_in) $(c_s)
10+
$(text_tpl_gen)

lib/rpm/macros.d/macros.in

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Macros from this file should exist on system only once, so it package
2+
# maintainer's responsibility to guarantee that all packages which install
3+
# these macros collide, or that (during package-build time) only one such
4+
# package is installed (e.g. similarly to %%scl macro defined installed by
5+
# *-build subpackage).
6+
7+
%postgresql_major @PGMAJORVERSION@

0 commit comments

Comments
 (0)