Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not require create_archive.py to take a version number #487

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions mockbuild_test/generate_sourcerpms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ fi

DIST_RELEASE=$1

STRATISD_SPEC_VERSION=$(rpmspec -q --srpm --qf "%{version}\n" stratisd.spec)
STRATISCLI_SPEC_VERSION=$(rpmspec -q --srpm --qf "%{version}\n" stratis-cli.spec)

if [ -z "$DIST_RELEASE" ]; then
echo "Usage: $0 centos-stream | fedora-rawhide"
exit 1
Expand Down Expand Up @@ -66,10 +63,10 @@ cd upstream
git clone https://github.com/stratis-storage/stratisd
git clone https://github.com/stratis-storage/stratis-cli
cd stratisd
../../../release_management/create_artifacts.py ../../SOURCES/ --pre-release --specfile-path=../../SPECS/stratisd.spec stratisd "$STRATISD_SPEC_VERSION" --vendor-method=filtered
../../../release_management/create_artifacts.py ../../SOURCES/ --pre-release --specfile-path=../../SPECS/stratisd.spec stratisd --vendor-method=filtered
cd ..
cd stratis-cli
../../../release_management/create_artifacts.py ../../SOURCES/ --pre-release --specfile-path=../../SPECS/stratis-cli.spec stratis-cli "$STRATISCLI_SPEC_VERSION"
../../../release_management/create_artifacts.py ../../SOURCES/ --pre-release --specfile-path=../../SPECS/stratis-cli.spec stratis-cli
cd ../..

# Remove the "Requires: stratisd" line in stratis-cli.spec.
Expand Down
10 changes: 5 additions & 5 deletions mockbuild_test/mockbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ fi

DIST_RELEASE=$1

STRATISD_SPEC_VERSION=$(rpmspec -q --srpm --qf "%{version}\n" stratisd.spec)
STRATISCLI_SPEC_VERSION=$(rpmspec -q --srpm --qf "%{version}\n" stratis-cli.spec)

if [ -z "$DIST_RELEASE" ]; then
echo "Usage: $0 centos-stream | fedora-rawhide"
exit 1
Expand Down Expand Up @@ -79,12 +76,15 @@ cd upstream
git clone https://github.com/stratis-storage/stratisd
git clone https://github.com/stratis-storage/stratis-cli
cd stratisd
../../../release_management/create_artifacts.py ../../SOURCES/ stratisd "$STRATISD_SPEC_VERSION" --vendor-method=filtered
../../../release_management/create_artifacts.py --specfile-path=../../SPECS/stratisd.spec ../../SOURCES/ stratisd --vendor-method=filtered
cd ..
cd stratis-cli
../../../release_management/create_artifacts.py ../../SOURCES/ stratis-cli "$STRATISCLI_SPEC_VERSION"
../../../release_management/create_artifacts.py --specfile-path=../../SPECS/stratis-cli.spec ../../SOURCES/ stratis-cli
cd ../..

STRATISD_SPEC_VERSION=$(rpmspec -q --srpm --qf "%{version}\n" SPECS/stratisd.spec)
STRATISCLI_SPEC_VERSION=$(rpmspec -q --srpm --qf "%{version}\n" SPECS/stratis-cli.spec)

mock --buildsrpm -r $MOCKCONFIG --spec SPECS/stratisd.spec --sources SOURCES/ --resultdir=SRPMS/stratisd/
mock --buildsrpm -r $MOCKCONFIG --spec SPECS/stratis-cli.spec --sources SOURCES/ --resultdir=SRPMS/stratis-cli/
mock --rebuild -r $MOCKCONFIG SRPMS/stratisd/stratisd-"$STRATISD_SPEC_VERSION"-D.$DIST.src.rpm --resultdir=RPMS/stratisd/
Expand Down
4 changes: 2 additions & 2 deletions mockbuild_test/stratis-cli.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: stratis-cli
Version: 3.7.0
Version: V
Release: D%{?dist}
Summary: Command-line tool for interacting with the Stratis daemon

Expand All @@ -21,7 +21,7 @@ BuildRequires: python3-wcwidth
%endif

# Require the version of stratisd that supports a compatible D-Bus interface
Requires: (stratisd >= 3.7.0 with stratisd < 4.0.0)
Requires: (stratisd >= VS with stratisd < 4.0.0)

# Exclude the same arches for stratis-cli as are excluded for stratisd
ExclusiveArch: %{rust_arches} noarch
Expand Down
2 changes: 1 addition & 1 deletion mockbuild_test/stratisd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%global dracutdir %(pkg-config --variable=dracutdir dracut)

Name: stratisd
Version: 3.7.0
Version: V
Release: D%{?dist}
Summary: Daemon that manages block devices to create filesystems

Expand Down
8 changes: 0 additions & 8 deletions release_management/create_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def main():
)

stratisd_parser.set_defaults(func=_stratisd_artifacts)
stratisd_parser.add_argument("version", action="store", help="version")
stratisd_parser.add_argument(
"--vendor-method",
action="store",
Expand All @@ -89,7 +88,6 @@ def main():
)

stratis_cli_parser.set_defaults(func=_stratis_cli_artifacts)
stratis_cli_parser.add_argument("version", action="store", help="version")

parser.set_defaults(func=lambda _: parser.error("missing sub-command"))

Expand All @@ -115,9 +113,6 @@ def _stratisd_artifacts(namespace):

(source_version, _) = get_package_info(manifest_abs_path, "stratisd")

if source_version != namespace.version:
raise RuntimeError("Version mismatch.")

pre_release_suffix = calc_pre_release_suffix() if namespace.pre_release else None

specfile_path = namespace.specfile_path
Expand Down Expand Up @@ -166,9 +161,6 @@ def _stratis_cli_artifacts(namespace):

(source_version, _) = get_python_package_info("stratis-cli")

if source_version != namespace.version:
raise RuntimeError("Version mismatch.")

pre_release_suffix = calc_pre_release_suffix() if namespace.pre_release else None
specfile_path = namespace.specfile_path

Expand Down