Skip to content

Commit 85079d2

Browse files
committed
spec: Use vdsm.spec directly rather than generating it
We currently generate vdsm.spec from vdsm.spec.in. This means that whatever we want to do regarding building Vdsm packages, we must run auto* stuff first and having all the necessary tools available before we start with the building process, which is not always convenient or even possible. The only thing that is replaced in vdsm.spec.in when generating vdsm.spec from it is @PACKAGE_RELEASE@. We can set 1 as its default value and use vdsm.spec instead of vdsm.spec.in directly. If the value needs to be different, it can be overridden using ‘rpmbuild --define’. This is what ‘rpm’ target in Makefile.am already does so the release is set as intended as long as ‘make rpm’ is used to build the rpm’s. Tagged releases work fine with the default value.
1 parent b2c35a6 commit 85079d2

File tree

6 files changed

+5
-12
lines changed

6 files changed

+5
-12
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ tests/other.crt
7676
tests/other.csr
7777
tests/other.key
7878
vdsm-*.tar.gz
79-
vdsm.spec
8079
vdsm/vdscli.py
8180
static/usr/share/man/man1/vdsm-tool.1
8281
static/usr/share/man/man8/vdsmd.8

Makefile.am

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2008-2020 Red Hat, Inc.
2+
# Copyright 2008-2022 Red Hat, Inc.
33
#
44
# This program is free software; you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by
@@ -59,12 +59,10 @@ EXTRA_DIST = \
5959
contrib/repostat \
6060
pylintrc \
6161
vdsm.spec \
62-
vdsm.spec.in \
6362
tox.ini \
6463
$(NULL)
6564

6665
CLEANFILES = \
67-
vdsm.spec \
6866
$(DIST_ARCHIVES) \
6967
$(NULL)
7068

@@ -165,9 +163,6 @@ storage:
165163
clean-storage:
166164
python3 tests/storage/userstorage.py teardown
167165

168-
all-local: \
169-
vdsm.spec
170-
171166
clean-local: clean-build
172167

173168
.PHONY: upgrade

build-aux/pkg-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ AWK_SPEC_VERSION='
3636

3737
PKG_VERSION=`cat VERSION 2> /dev/null || git describe --tags --match "v[0-9]*"`
3838
if [ -d .git ]; then
39-
SPEC_VERSION=`awk "$AWK_SPEC_VERSION" vdsm.spec.in`
39+
SPEC_VERSION=`awk "$AWK_SPEC_VERSION" vdsm.spec`
4040
if [ "$PKG_VERSION" != "$SPEC_VERSION" ] && [ "${PKG_VERSION#$SPEC_VERSION-}" = "$PKG_VERSION" ]; then
4141
# New version, not yet tagged.
4242
PKG_VERSION="$SPEC_VERSION"

doc/development.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ For more information about testing see [/tests/README.md](/tests/README.md).
8383
Release process of Vdsm version `VERSION` consists of the following
8484
steps:
8585

86-
- Changing `Version:` field value in `vdsm.spec.in` to `VERSION`.
86+
- Changing `Version:` field value in `vdsm.spec` to `VERSION`.
8787

88-
- Updating `%changelog` line in `vdsm.spec.in` to the current date,
88+
- Updating `%changelog` line in `vdsm.spec` to the current date,
8989
the committer, and `VERSION`.
9090

9191
- Committing these changes, with subject "New release: `VERSION`" and

tests/check_distpkg.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ for i in $(git ls-files \*.in); do
2020
for f in \
2121
static/libexec/vdsm/vdsm-gencerts.sh \
2222
static/usr/share/man/man1/vdsm-tool.1 \
23-
vdsm.spec \
2423
; do
2524
if test "$FILE" = "$f" ; then
2625
KEEP=1

vdsm.spec.in renamed to vdsm.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
# - generated using ./build-aux/make-dist script
5454
# - passed to rpmbuild as
5555
# --define="vdsm_release $(./build-aux/pkg-version --release)"
56-
%{!?vdsm_release: %global vdsm_release @PACKAGE_RELEASE@}
56+
%{!?vdsm_release: %global vdsm_release 1}
5757

5858
Name: %{vdsm_name}
5959
Version: 4.50.2.2

0 commit comments

Comments
 (0)