Fix automatic template versioning (#667)

This commit is contained in:
Joanna Rutkowska 2012-11-06 10:43:45 +01:00
parent 82742e6fd6
commit fcf4b4b86f
3 changed files with 8 additions and 5 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
base_rpms base_rpms
keys keys
appmenus appmenus
build_timestamp

View File

@ -3,8 +3,8 @@ $(error "You must set DIST variable, e.g. DIST=fc14")
endif endif
TEMPLATE_NAME := $${DIST/fc/fedora-}-x64 TEMPLATE_NAME := $${DIST/fc/fedora-}-x64
TIMESTAMP := $(shell date -u +%Y%m%d-%H%M) VERSION := $(shell cat version)
VERSION := $(shell cat version)-$(TIMESTAMP) TIMESTAMP := $(shell date -u +%Y%m%d%H%M)
help: help:
@echo "make rpms -- generate template rpm" @echo "make rpms -- generate template rpm"
@ -13,7 +13,8 @@ help:
rpms: rpms:
@export DIST NO_SIGN @echo $(TIMESTAMP) > build_timestamp
export DIST NO_SIGN
@echo "Building template: $(TEMPLATE_NAME)" @echo "Building template: $(TEMPLATE_NAME)"
@./create_symlinks_in_rpms_to_install_dir.sh && \ @./create_symlinks_in_rpms_to_install_dir.sh && \
sudo -E ./fedorize_image fedorized_images/$(TEMPLATE_NAME).img clean_images/packages.list && \ sudo -E ./fedorize_image fedorized_images/$(TEMPLATE_NAME).img clean_images/packages.list && \
@ -21,7 +22,7 @@ rpms:
./build_template_rpm $(TEMPLATE_NAME) || exit 1; \ ./build_template_rpm $(TEMPLATE_NAME) || exit 1; \
update-repo-installer: update-repo-installer:
ln -f rpm/noarch/qubes-template-$(TEMPLATE_NAME)-$(VERSION)-*.noarch.rpm ../installer/yum/qubes-dom0/rpm ln -f rpm/noarch/qubes-template-$(TEMPLATE_NAME)-$(VERSION)-$(shell cat build_timestamp)*.noarch.rpm ../installer/yum/qubes-dom0/rpm
clean: clean:
sudo rm -fr qubeized_images/root.img.* sudo rm -fr qubeized_images/root.img.*

View File

@ -4,10 +4,11 @@
# #
%{!?version: %define version %(cat version)} %{!?version: %define version %(cat version)}
%{!?rel: %define rel %(cat build_timestamp)}
Name: qubes-template-%{template_name} Name: qubes-template-%{template_name}
Version: %{version} Version: %{version}
Release: 1 Release: %{rel}
Summary: Qubes template for %{template_name} Summary: Qubes template for %{template_name}
License: GPL License: GPL