From 31f35338860c5f296ac2c1677c2f95526d8a6e4c Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Thu, 20 Feb 2020 23:29:47 +0100 Subject: [PATCH] spec: use forgemeta This changes the name of the source tarball, but apart from that has no effect as-is. However, if the `commit` global is set, then the source tarball is expected to be the standard git-archive at that commit, and the release field is set to contain the date and the git sha. This is useful for when we want to build rpms between releases. This works analogously to how osbulid-composer currently works. See for details. Signed-off-by: Tom Gundersen --- Makefile | 2 +- osbuild.spec | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 35eeddb6..777ffb51 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ sdist: find `pwd`/dist -name '*.tar.gz' -printf '%f\n' -exec mv {} . \; tarball: - git archive --prefix=osbuild-$(VERSION)/ --format=tar.gz HEAD > $(VERSION).tar.gz + git archive --prefix=osbuild-$(VERSION)/ --format=tar.gz HEAD > osbuild-$(VERSION).tar.gz srpm: $(PACKAGE_NAME).spec check-working-directory tarball /usr/bin/rpmbuild -bs \ diff --git a/osbuild.spec b/osbuild.spec index 806425dd..1889e94b 100644 --- a/osbuild.spec +++ b/osbuild.spec @@ -1,14 +1,19 @@ +%global forgeurl https://github.com/osbuild/osbuild + +Version: 7 + +%forgemeta + %global pypi_name osbuild %global pkgdir %{_prefix}/lib/%{pypi_name} Name: %{pypi_name} -Version: 7 Release: 1%{?dist} License: ASL 2.0 -URL: https://github.com/osbuild/osbuild +URL: %{forgeurl} -Source0: https://github.com/osbuild/%{pypi_name}/archive/%{version}.tar.gz +Source0: %{forgesource} BuildArch: noarch Summary: A build system for OS images @@ -41,7 +46,7 @@ Summary: %{summary} A build system for OS images %prep -%autosetup -n %{name}-%{version} +%forgesetup %build %py3_build