Accepting request 1081146 from server:database:postgresql
- bsc#1210303: Stop using the obsolete internal %_restart_on_update macro and drop support for sysv init to simplify the scriptlets. - Include -mini in Name: to avoid conflicts in the source package name and OBS internal dependency tracking. OBS-URL: https://build.opensuse.org/request/show/1081146 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql14?expand=0&rev=11
This commit is contained in:
commit
047c2512c3
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 18 09:05:09 UTC 2023 - Reinhard Max <max@suse.com>
|
||||||
|
|
||||||
|
- bsc#1210303: Stop using the obsolete internal %_restart_on_update
|
||||||
|
macro and drop support for sysv init to simplify the scriptlets.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 4 10:57:41 UTC 2023 - Fabian Vogt <fvogt@suse.com>
|
||||||
|
|
||||||
|
- Include -mini in Name: to avoid conflicts in the source package
|
||||||
|
name and OBS internal dependency tracking.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 9 12:00:06 UTC 2023 - Reinhard Max <max@suse.com>
|
Thu Feb 9 12:00:06 UTC 2023 - Reinhard Max <max@suse.com>
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
%define pgversion 14.7
|
%define pgversion 14.7
|
||||||
%define pgmajor 14
|
%define pgmajor 14
|
||||||
%define pgsuffix %pgmajor
|
|
||||||
%define buildlibs 0
|
%define buildlibs 0
|
||||||
%define tarversion %{pgversion}
|
%define tarversion %{pgversion}
|
||||||
%define latest_supported_llvm_ver 15
|
%define latest_supported_llvm_ver 15
|
||||||
@ -42,13 +41,14 @@
|
|||||||
|
|
||||||
%define requires_file() %( readlink -f '%*' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %%{name} >= %%{epoch}:%%{version}\\n' -f | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
|
%define requires_file() %( readlink -f '%*' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %%{name} >= %%{epoch}:%%{version}\\n' -f | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
|
||||||
|
|
||||||
Name: %pgname
|
|
||||||
%if "@BUILD_FLAVOR@" == "mini"
|
%if "@BUILD_FLAVOR@" == "mini"
|
||||||
%define devel devel-mini
|
%define devel devel-mini
|
||||||
%define mini 1
|
%define mini 1
|
||||||
|
Name: %pgname-mini
|
||||||
%else
|
%else
|
||||||
%define devel devel
|
%define devel devel
|
||||||
%define mini 0
|
%define mini 0
|
||||||
|
Name: %pgname
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Use Python 2 for for PostgreSQL 10 on SLE12.
|
# Use Python 2 for for PostgreSQL 10 on SLE12.
|
||||||
@ -95,13 +95,6 @@ BuildRequires: pkgconfig(libzstd)
|
|||||||
BuildRequires: %libecpg
|
BuildRequires: %libecpg
|
||||||
BuildRequires: %libpq
|
BuildRequires: %libpq
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?suse_version} >= 1300
|
|
||||||
%bcond_without systemd
|
|
||||||
%bcond_without systemd_notify
|
|
||||||
%else
|
|
||||||
%bcond_with systemd
|
|
||||||
%bcond_with systemd_notify
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?suse_version} >= 1500 && %pgmajor >= 11
|
%if 0%{?suse_version} >= 1500 && %pgmajor >= 11
|
||||||
%ifarch riscv64
|
%ifarch riscv64
|
||||||
@ -148,10 +141,8 @@ BuildRequires: openldap2-devel
|
|||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
BuildRequires: pkgconfig(krb5)
|
BuildRequires: pkgconfig(krb5)
|
||||||
%if %{with systemd_notify}
|
|
||||||
BuildRequires: pkgconfig(libsystemd)
|
BuildRequires: pkgconfig(libsystemd)
|
||||||
BuildRequires: pkgconfig(systemd)
|
BuildRequires: pkgconfig(systemd)
|
||||||
%endif
|
|
||||||
#!BuildIgnore: postgresql-implementation
|
#!BuildIgnore: postgresql-implementation
|
||||||
#!BuildIgnore: postgresql-server-implementation
|
#!BuildIgnore: postgresql-server-implementation
|
||||||
#!BuildIgnore: postgresql-devel-noarch
|
#!BuildIgnore: postgresql-devel-noarch
|
||||||
@ -240,7 +231,7 @@ and functions.
|
|||||||
This package provides the runtime library of the embedded SQL C
|
This package provides the runtime library of the embedded SQL C
|
||||||
preprocessor for PostgreSQL.
|
preprocessor for PostgreSQL.
|
||||||
|
|
||||||
%package %devel
|
%package -n %pgname-%devel
|
||||||
Summary: PostgreSQL client development header files and libraries
|
Summary: PostgreSQL client development header files and libraries
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Provides: postgresql-devel = %version-%release
|
Provides: postgresql-devel = %version-%release
|
||||||
@ -303,7 +294,7 @@ C extensions that link into the PostgreSQL server. For building client
|
|||||||
applications, see the postgresql%pgmajor-devel package.
|
applications, see the postgresql%pgmajor-devel package.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description %devel
|
%description -n %pgname-%devel
|
||||||
PostgreSQL is an advanced object-relational database management system
|
PostgreSQL is an advanced object-relational database management system
|
||||||
that supports an extended subset of the SQL standard, including
|
that supports an extended subset of the SQL standard, including
|
||||||
transactions, foreign keys, subqueries, triggers, and user-defined
|
transactions, foreign keys, subqueries, triggers, and user-defined
|
||||||
@ -547,9 +538,7 @@ PACKAGE_TARNAME=%pgname %configure \
|
|||||||
%if %{with libzstd}
|
%if %{with libzstd}
|
||||||
--with-zstd \
|
--with-zstd \
|
||||||
%endif
|
%endif
|
||||||
%if %{with systemd_notify}
|
|
||||||
--with-systemd \
|
--with-systemd \
|
||||||
%endif
|
|
||||||
%if %{with selinux}
|
%if %{with selinux}
|
||||||
--with-selinux \
|
--with-selinux \
|
||||||
%endif
|
%endif
|
||||||
@ -791,14 +780,14 @@ awk -v P=%buildroot '/^(%lang|[^%])/{print P $NF}' libpq.files libecpg.files | x
|
|||||||
|
|
||||||
%fdupes %buildroot
|
%fdupes %buildroot
|
||||||
|
|
||||||
%post %devel
|
%post -n %pgname-%devel
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%if %{with server_devel}
|
%if %{with server_devel}
|
||||||
%post server-devel
|
%post server-devel
|
||||||
%endif
|
%endif
|
||||||
/usr/share/postgresql/install-alternatives %pgmajor
|
/usr/share/postgresql/install-alternatives %pgmajor
|
||||||
|
|
||||||
%postun %devel
|
%postun -n %pgname-%devel
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%if %{with server_devel}
|
%if %{with server_devel}
|
||||||
%postun server-devel
|
%postun server-devel
|
||||||
@ -818,45 +807,26 @@ awk -v P=%buildroot '/^(%lang|[^%])/{print P $NF}' libpq.files libecpg.files | x
|
|||||||
|
|
||||||
%preun server
|
%preun server
|
||||||
# Stop only when we are uninstalling the currently running version
|
# Stop only when we are uninstalling the currently running version
|
||||||
test -n "$FIRST_ARG" || FIRST_ARG="$1"
|
test -x /usr/bin/systemctl &&
|
||||||
if [ "$FIRST_ARG" -eq 0 ]; then
|
MAINPID=$(/usr/bin/systemctl show postgresql.service --property=MainPID --value) ||:
|
||||||
%if %{with systemd}
|
if test -n "$MAINPID" && test "$MAINPID" -ne 0; then
|
||||||
%define stop systemctl stop postgresql.service
|
BIN=$(readlink -n /proc/$MAINPID/exe)
|
||||||
eval $(systemctl show postgresql.service --property=MainPID)
|
|
||||||
%else
|
|
||||||
%define stop /sbin/init.d postgresql stop
|
|
||||||
MainPID=$(pidof -s postgres) || :
|
|
||||||
%endif
|
|
||||||
if test -n "$MainPID" && test "$MainPID" -ne 0; then
|
|
||||||
BIN=$(readlink -n /proc/$MainPID/exe)
|
|
||||||
DIR=$(dirname ${BIN% *})
|
DIR=$(dirname ${BIN% *})
|
||||||
if test "$DIR" = "%pgbindir" -o "$DIR" = "%_bindir"; then
|
if test "$DIR" = "%pgbindir" -o "$DIR" = "%_bindir"; then
|
||||||
%stop
|
%service_del_preun postgresql.service
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%postun server
|
%postun server
|
||||||
/usr/share/postgresql/install-alternatives %pgmajor
|
/usr/share/postgresql/install-alternatives %pgmajor
|
||||||
# Restart only when we are updating the currently running version
|
# Restart only when we are updating the currently running version
|
||||||
# or from the old packaging scheme
|
test -x /usr/bin/systemctl &&
|
||||||
test -n "$FIRST_ARG" || FIRST_ARG="$1"
|
MAINPID=$(/usr/bin/systemctl show postgresql.service --property=MainPID --value) ||:
|
||||||
if [ "$FIRST_ARG" -ge 1 ]; then
|
if test -n "$MAINPID" && test "$MAINPID" -ne 0; then
|
||||||
%if %{with systemd}
|
BIN=$(readlink -n /proc/$MAINPID/exe)
|
||||||
%define restart %_restart_on_update postgresql.service
|
|
||||||
eval $(systemctl show postgresql --property=MainPID)
|
|
||||||
%else
|
|
||||||
%define restart /sbin/init.d postgresql restart
|
|
||||||
MainPID=$(pidof -s postgres) || :
|
|
||||||
%endif
|
|
||||||
if test -n "$MainPID" && test "$MainPID" -ne 0 &&
|
|
||||||
readlink -n /proc/$MainPID/exe | grep -Fq " (deleted)"
|
|
||||||
then
|
|
||||||
BIN=$(readlink -n /proc/$MainPID/exe)
|
|
||||||
DIR=$(dirname ${BIN% *})
|
DIR=$(dirname ${BIN% *})
|
||||||
if test "$DIR" = "%pgbindir" -o "$DIR" = "%_bindir"; then
|
if test "$DIR" = "%pgbindir" -o "$DIR" = "%_bindir"; then
|
||||||
%restart
|
%service_del_postun postgresql.service
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -938,6 +908,7 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files llvmjit-devel
|
%files llvmjit-devel
|
||||||
|
%defattr(-,root,root)
|
||||||
%doc README
|
%doc README
|
||||||
|
|
||||||
%files pltcl -f pltcl.lang
|
%files pltcl -f pltcl.lang
|
||||||
@ -964,13 +935,14 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %buildlibs && %mini
|
%if %buildlibs && %mini
|
||||||
%files %devel -f devel.files -f libpq.files -f libecpg.files
|
%files -n %pgname-%devel -f devel.files -f libpq.files -f libecpg.files
|
||||||
|
%defattr(-,root,root)
|
||||||
%else
|
%else
|
||||||
|
|
||||||
%files %devel -f devel.files
|
%files -n %pgname-%devel -f devel.files
|
||||||
|
%defattr(-,root,root)
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%dir %pgbasedir
|
%dir %pgbasedir
|
||||||
%dir %pgbindir
|
%dir %pgbindir
|
||||||
%ghost %_bindir/ecpg
|
%ghost %_bindir/ecpg
|
||||||
|
Loading…
Reference in New Issue
Block a user