From 3dfe8208303d5d4df5eb930c0411e1cdff8d67b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 9 Jul 2015 13:41:11 -0400 Subject: [PATCH] Use github tarballs tar.xz is 800kB smaller than tar.gz, but not having to create the tarball manually is much more convenient. --- make-git-snapshot.sh | 26 -------------------------- systemd.spec | 5 ++--- 2 files changed, 2 insertions(+), 29 deletions(-) delete mode 100755 make-git-snapshot.sh diff --git a/make-git-snapshot.sh b/make-git-snapshot.sh deleted file mode 100755 index 0372688..0000000 --- a/make-git-snapshot.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -set -e - -NAME=systemd -UPSTREAM=git@github.com:systemd/systemd.git - -[ -n "$1" ] && HEAD="$1" || HEAD="HEAD" - -WORKDIR="$(mktemp -d --tmpdir "$NAME.XXXXXXXXXX")" -trap 'rm -rf $WORKDIR' exit - -git clone "$UPSTREAM" "$WORKDIR" - -pushd "$WORKDIR" > /dev/null -git branch to-archive $HEAD -read COMMIT_SHORTID COMMIT_TITLE < /dev/null - -echo "Making git snapshot using commit: $COMMIT_SHORTID $COMMIT_TITLE" - -DIRNAME="$NAME-git$COMMIT_SHORTID" -git archive --remote="$WORKDIR" --format=tar --prefix="$DIRNAME/" to-archive | xz -9 > "$DIRNAME.tar.xz" - -echo "Written $DIRNAME.tar.xz" diff --git a/systemd.spec b/systemd.spec index d662cf1..fb3d949 100644 --- a/systemd.spec +++ b/systemd.spec @@ -22,10 +22,9 @@ License: LGPLv2+ and MIT and GPLv2+ Summary: A System and Service Manager %if %{defined gitcommit} -# Snapshot tarball can be created using: ./make-git-shapshot.sh [gitcommit] -Source0: %{name}-git%{gitcommit}.tar.xz +Source0: https://github.com/systemd/systemd/archive/%{?gitcommit}.tar.gz#/%{name}-%{gitcommit}.tar.gz %else -Source0: %{name}-%{version}.tar.xz +Source0: https://github.com/systemd/systemd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz %endif # Prevent accidental removal of the systemd package