From c1dded3ccc4aa823a0cf1cd5fb3bdb791c53a54f Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Wed, 11 Aug 2021 08:55:37 -0500 Subject: [PATCH] Update and reduce SRPM size --- .gitignore | 2 ++ python-azure-sdk-tools.spec | 34 ++++++++++++++++++++-------------- sources | 2 +- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 0813053..e757503 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /azure-sdk-for-python-9d4f5a6d6da6ba453c5553a33177553da9d1ba5f.tar.gz +/azure-sdk-tools-a5a4ef4a7adc8c730dd7da2e9e3bdb43c9376586.tar.gz +/generate-sdk-tools-tarball.sh diff --git a/python-azure-sdk-tools.spec b/python-azure-sdk-tools.spec index b24c129..2808291 100644 --- a/python-azure-sdk-tools.spec +++ b/python-azure-sdk-tools.spec @@ -2,19 +2,24 @@ # frequently in the upstream repository. %global srcname azure-sdk-tools %global forgeurl https://github.com/Azure/azure-sdk-for-python/ -%global commit 9d4f5a6d6da6ba453c5553a33177553da9d1ba5f +%global commit a5a4ef4a7adc8c730dd7da2e9e3bdb43c9376586 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global distprefix %{nil} %global short_version 0.0.0 %forgemeta Name: python-%{srcname} -Version: %{short_version}~git.1.%{shortcommit} +Version: %{short_version}~git.2.%{shortcommit} Release: 1%{?dist} Summary: Specific tools for Azure SDK for Python testing License: MIT and ASL 2.0 URL: %forgeurl -Source0: %forgesource +Source0: azure-sdk-tools-%{commit}.tar.gz +# The azure-sdk-for-python repository is huge at > 160MB, but we only need ~ +# 100KB of source for this package. Use this script to generate a tarball of the +# source code: +# ./generate-devtools-tarball.sh COMMIT_SHA +Source1: generate-sdk-tools-tarball.sh # NOTE(mhayden): The testing tools provided with the package are meant for Azure # SDK's CI processes upstream and are not needed to build this package. This # package contains test framework helpers for other Azure CLI/SDK packages. @@ -44,21 +49,18 @@ Summary: %{summary} %prep -%forgesetup -%patch0 -p0 +%autosetup -p3 -c -n %{srcname}-%{commit} %build -pushd tools/%{srcname} - # Some tools are only used for the Azure SDK CI system and there's no need - # to package those. - rm -rf packaging_tools pypi_tools +# Some tools are only used for the Azure SDK CI system and there's no need +# to package those. +rm -rf packaging_tools pypi_tools - # There's a dangling empty setup.py in the devtools_testutils directory. - rm -f devtools_testutils/setup.py +# There's a dangling empty setup.py in the devtools_testutils directory. +rm -f devtools_testutils/setup.py - %pyproject_wheel -popd +%pyproject_wheel %install @@ -70,9 +72,13 @@ rm -f %{buildroot}/%{_bindir}/{auto_codegen,auto_package,generate_package,genera %files -n python3-%{srcname} -f %{pyproject_files} -%doc README.rst +%doc changelog_generics.md %license LICENSE.txt %changelog +* Wed Aug 11 2021 Major Hayden - 0.0.0~git.2.a5a4ef4 +- Update to latest git checkout from 2021-08-11 +- Reduce SRPM file size + * Tue Jun 01 2021 Major Hayden - 0.0.0~git.1.9d4f5a6 - First package. diff --git a/sources b/sources index 2e1ddd1..c678c0b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (azure-sdk-for-python-9d4f5a6d6da6ba453c5553a33177553da9d1ba5f.tar.gz) = 3b061b500aaa727ca2c9d27d31564bf389f7d7b462b2b1a682a237e20bf4e0547a944487624f502e65bfe0025093a56ccd72bb83ab23b87d308623534245f62e +SHA512 (generate-sdk-tools-tarball.sh) = 0f25818b8ae5915c4ab7bb8ba9bfe03c7ed79ae53b2f70fb897dad61314935c7a8e24ce75569e3c61c13089a9e099d718be4ac6a40b1c7ad613fb89e7646f49f