mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-11 05:10:22 +01:00
spec: use versioning scheme with ~dev and ~rc suffixes
In the previous commit meson.build was adapted to use versions with -dev and -rc suffixes, as we create them in the Git tags, instead of versions with micro>90 for RCs as we used to do. The tarball name will contain the version with the new scheme, so adapt the spec file for it. This will enable us to use Packit to do automatic updates.
This commit is contained in:
parent
e422b1c3d9
commit
d975389bcd
2 changed files with 8 additions and 16 deletions
|
|
@ -13,9 +13,7 @@
|
|||
%global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo bad)
|
||||
|
||||
%global epoch_version 1
|
||||
%global real_version __VERSION__
|
||||
%global git_tag_version __GIT_TAG_VERSION__
|
||||
%global rpm_version %{real_version}
|
||||
%global base_version __VERSION__
|
||||
%global release_version __RELEASE_VERSION__
|
||||
%global snapshot __SNAPSHOT__
|
||||
%global git_sha __COMMIT__
|
||||
|
|
@ -29,7 +27,7 @@
|
|||
%global obsoletes_ifcfg_rh 1:1.36.2
|
||||
|
||||
%global nmlibdir %{_prefix}/lib/%{name}
|
||||
%global nmplugindir %{_libdir}/%{name}/%{version}-%{release}
|
||||
%global nmplugindir %{_libdir}/%{name}/%{version_no_tilde}-%{release}
|
||||
|
||||
%global _hardened_build 1
|
||||
|
||||
|
|
@ -42,8 +40,6 @@
|
|||
|
||||
%global snap %{?snapshot_dot}%{?git_sha_dot}
|
||||
|
||||
%global real_version_major %(printf '%s' '%{real_version}' | sed -n 's/^\\([1-9][0-9]*\\.[0-9][0-9]*\\)\\.[0-9][0-9]*$/\\1/p')
|
||||
|
||||
%global systemd_units NetworkManager.service NetworkManager-wait-online.service NetworkManager-dispatcher.service nm-priv-helper.service
|
||||
|
||||
%global systemd_units_cloud_setup nm-cloud-setup.service nm-cloud-setup.timer
|
||||
|
|
@ -169,13 +165,13 @@
|
|||
Name: NetworkManager
|
||||
Summary: Network connection manager and user applications
|
||||
Epoch: %{epoch_version}
|
||||
Version: %{rpm_version}
|
||||
Version: %{base_version}
|
||||
Release: %{release_version}%{?snap}%{?dist}
|
||||
Group: System Environment/Base
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||
URL: https://networkmanager.dev/
|
||||
|
||||
#Source: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/releases/%{git_tag_version}/downloads/%{name}-%{real_version}.tar.xz
|
||||
#Source: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/releases/%{version_no_tilde}/downloads/%{name}-%{version_no_tilde}.tar.xz
|
||||
Source: __SOURCE1__
|
||||
Source1: NetworkManager.conf
|
||||
Source2: 00-server.conf
|
||||
|
|
@ -578,7 +574,7 @@ Preferably use nmcli instead.
|
|||
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n NetworkManager-%{real_version}
|
||||
%autosetup -p1 -n NetworkManager-%{version_no_tilde}
|
||||
|
||||
|
||||
%build
|
||||
|
|
@ -758,8 +754,8 @@ rm -f %{buildroot}%{_unitdir}/NetworkManager-wait-online-initrd.service
|
|||
find %{buildroot}%{_datadir}/gtk-doc -exec touch --reference meson.build '{}' \+
|
||||
|
||||
%if 0%{?__debug_package} && ! 0%{?flatpak}
|
||||
mkdir -p %{buildroot}%{_prefix}/src/debug/NetworkManager-%{real_version}
|
||||
cp valgrind.suppressions %{buildroot}%{_prefix}/src/debug/NetworkManager-%{real_version}
|
||||
mkdir -p %{buildroot}%{_prefix}/src/debug/NetworkManager-%{version_no_tilde}
|
||||
cp valgrind.suppressions %{buildroot}%{_prefix}/src/debug/NetworkManager-%{version_no_tilde}
|
||||
%endif
|
||||
|
||||
%if %{with ifcfg_rh}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ set -o pipefail
|
|||
# RELEASE_VERSION=
|
||||
# SNAPSHOT=
|
||||
# VERSION=
|
||||
# GIT_TAG_VERSION=
|
||||
# COMMIT_FULL=
|
||||
# COMMIT=
|
||||
# USERNAME=
|
||||
|
|
@ -113,7 +112,6 @@ UUID=`uuidgen`
|
|||
RELEASE_VERSION="${RELEASE_VERSION:-$(git rev-list HEAD | wc -l)}"
|
||||
SNAPSHOT="${SNAPSHOT:-%{nil\}}"
|
||||
VERSION="${VERSION:-$(get_version || die "Could not read $VERSION")}"
|
||||
GIT_TAG_VERSION="${GIT_TAG_VERSION:-$VERSION}"
|
||||
COMMIT_FULL="${COMMIT_FULL:-$(git rev-parse --verify HEAD || die "Error reading HEAD revision")}"
|
||||
COMMIT="${COMMIT:-$(printf '%s' "$COMMIT_FULL" | sed 's/^\(.\{10\}\).*/\1/' || die "Error reading HEAD revision")}"
|
||||
BCOND_DEFAULT_DEBUG="${BCOND_DEFAULT_DEBUG:-0}"
|
||||
|
|
@ -157,7 +155,6 @@ if [[ "$SOURCE_FROM_GIT" == "1" ]]; then
|
|||
fi
|
||||
|
||||
LOG "VERSION=$VERSION"
|
||||
LOG "GIT_TAG_VERSION=$GIT_TAG_VERSION"
|
||||
LOG "RELEASE_VERSION=$RELEASE_VERSION"
|
||||
LOG "SNAPSHOT=$SNAPSHOT"
|
||||
LOG "COMMIT_FULL=$COMMIT_FULL"
|
||||
|
|
@ -209,8 +206,7 @@ cp "$SOURCE_README_IFCFG_MIGRATED" "$TEMP/SOURCES/readme-ifcfg-rh-migrated.txt"
|
|||
|
||||
write_changelog
|
||||
|
||||
sed -e "s/__VERSION__/$VERSION/g" \
|
||||
-e "s/__GIT_TAG_VERSION__/$GIT_TAG_VERSION/g" \
|
||||
sed -e "s/__VERSION__/${VERSION/-/\~}/g" \
|
||||
-e "s/__RELEASE_VERSION__/$RELEASE_VERSION/g" \
|
||||
-e "s/__SNAPSHOT__/$SNAPSHOT/g" \
|
||||
-e "s/__COMMIT__/$COMMIT/g" \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue