From c5be35b9a271a654775a97484333507909e08fcd Mon Sep 17 00:00:00 2001 From: pgbuilder_pel7ppc64bebuilder0 Date: Wed, 6 Jun 2018 22:34:59 +0200 Subject: [PATCH] postgresql package update Signed-off-by: pgbuilder_pel7ppc64bebuilder0 --- SOURCES/multilib-fix | 170 ++++++++++++++++++++++++++++++++++++++++++ SPECS/postgresql.spec | 9 ++- 2 files changed, 176 insertions(+), 3 deletions(-) create mode 100755 SOURCES/multilib-fix diff --git a/SOURCES/multilib-fix b/SOURCES/multilib-fix new file mode 100755 index 0000000..ff39117 --- /dev/null +++ b/SOURCES/multilib-fix @@ -0,0 +1,170 @@ +#! /bin/sh + +# Replace the multilib-unclean header file with multilib-clean stub, while the +# original file is moved to unique architecture-specific location. +# +# The solution is taken from Fedora PostgreSQL RPM package. +# +# Pavel Raiskup +# +# This file is to be moved into redhat-rpm-config (or something like this). + +progname=$(basename "$0") + +opt_arch=$(uname -i) +# See rhbz#1242873 for more info. +test "$opt_arch" = ppc64p7 && opt_arch=ppc64 + +opt_destdir= +opt_basename= +opt_buildroot=$(pwd) +opt_verbose=: +opt_additional_suffix= + +# TODO: we could pretty easily implement other then 'cpp-header' stubs, if the +# target file type allows some kind of "transparent" file inclusion. For +# example shell scripts might use '. "${opt_destdir}/${opt_basename}_x86_64.sh'. +print_stub () +{ +cat <' are unchanged. + +To allow us to do incompatible changes in this script, packagers should use this +script only through %ml_fix_c_header wrapping macro. + +--destdir absolute path name where the old header file is stored, e.g. + /some/pat +--basename when you deal with '/some/path/test.h', specify 'test' +--buildroot prefix (directory where we play with installed files, usually + after 'make install DESTDIR=buildroot') +--additional-suffix we usually move 'test.h' to 'test_\$ARCH.h'. However + this file could already exit. With this option the multilib + file will be named 'test_\$ARCH\$SUFFIX.h' +--verbose print some useful information +--help show this help +EOF + + $_h_exit && exit "$1" +} + +verbose () +{ + $opt_verbose && echo "INFO: $progname: $*" +} + +die () +{ + echo >&2 " # $*" + print_help 1 +} + +error () +{ + error_occurred=: + echo >&2 " ! $*" +} + +error_occurred=false + +while test $# -gt 0 +do + _opt=$1 ; shift + case $_opt in + --destdir) + opt_destdir=$1 ; shift || die "$_opt requires argument" + ;; + --basename) + opt_basename=$1 ; shift || die "$_opt require argument" + ;; + --buildroot) + opt_buildroot=$1 ; shift || die "$_opt require argument" + ;; + --arch) + opt_arch=$1 ; shift || die "$_opt require argument" + ;; + --additional-suffix) + opt_additional_suffix=$1 ; shift || die "$_opt require argument" + ;; + --help) + print_help 0 + ;; + *) + error "unexpected '$_opt' program argument" + ;; + esac +done +$error_occurred && print_help 1 + +for i in arch buildroot destdir basename +do + eval "test -z \"\$opt_$i\"" && error "--$i needs to be set" +done +$error_occurred && print_help 1 + +original_file="$opt_buildroot$opt_destdir/$opt_basename".h +multilib_file="$opt_buildroot$opt_destdir/$opt_basename${opt_additional_suffix}_$opt_arch".h + +test -f "$original_file" || die "can't find '$original_file'" + +case $opt_arch in + # we only apply this to known Red Hat multilib arches, per bug #177564 + i386|x86_64|ppc|ppc64|s390|s390x|sparc|sparc64) + ;; + *) + verbose "we don't need multilib haeder hack for '$opt_arch' architecture (no-op)" + exit 0 + ;; +esac + +verbose "moving: '$original_file' to '$multilib_file'" + +mv "$original_file" "$multilib_file" || exit 1 +if print_stub > "$original_file" && chmod 644 "$original_file"; then + : +else + die "can't write into '$original_file'" +fi + +: diff --git a/SPECS/postgresql.spec b/SPECS/postgresql.spec index 09e7467..5f0b10c 100644 --- a/SPECS/postgresql.spec +++ b/SPECS/postgresql.spec @@ -58,8 +58,8 @@ Summary: PostgreSQL client programs Name: postgresql %global majorversion 10 -Version: 10.0 -Release: 3%{?dist} +Version: 10.4 +Release: 1%{?dist} # The PostgreSQL license is very similar to other MIT licenses, but the OSI # recognizes it as an independent license, so we do as well. @@ -80,7 +80,8 @@ Url: http://www.postgresql.org/ %global service_name postgresql.service Source0: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2 # The PDF file is generated by generate-pdf.sh, which see for comments -Source1: postgresql-%{version}-US.pdf +#Source1: postgresql-%{version}-US.pdf +Source1: postgresql-10.0-US.pdf # generate-pdf.sh is not used during RPM build, but include for documentation Source2: generate-pdf.sh Source3: https://ftp.postgresql.org/pub/source/v%{prevversion}/postgresql-%{prevversion}.tar.bz2 @@ -396,6 +397,8 @@ find . -type f -name .gitignore | xargs rm cd postgresql-setup-%{setup_version} +sed -i 's|/etc/redhat-release;|/etc/powerel-release;|' configure + %configure \ pgdocdir=%{_pkgdocdir} \ PGVERSION=%{version} \