From patchwork Sat May 28 20:45:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 9139527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 410536075C for ; Sat, 28 May 2016 20:46:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25BA121BED for ; Sat, 28 May 2016 20:46:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19F6E25D97; Sat, 28 May 2016 20:46:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RDNS_NONE autolearn=no version=3.3.1 Received: from ml01.01.org (unknown [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 22FCE21BED for ; Sat, 28 May 2016 20:46:17 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 057AE1A1E1B; Sat, 28 May 2016 13:46:10 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ml01.01.org (Postfix) with ESMTP id 92CDB1A1DF1 for ; Sat, 28 May 2016 13:46:08 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 28 May 2016 13:45:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,380,1459839600"; d="scan'208";a="976446505" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.14]) by fmsmga001.fm.intel.com with ESMTP; 28 May 2016 13:45:55 -0700 Subject: [ndctl PATCH] ndctl: fix rpm source url, switch back to v$VERSION tag scheme From: Dan Williams To: linux-nvdimm@lists.01.org Date: Sat, 28 May 2016 13:45:10 -0700 Message-ID: <146446831017.33347.13551869494702303909.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-9-g687f MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP The way to have github generate tarballs in ndctl-$VERSION format while maintaining a v$VERSION tag scheme is to use a source url in the following format: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Signed-off-by: Dan Williams --- git-version | 10 +++++----- ndctl.spec.in | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/git-version b/git-version index 03b44a613a57..3823ee29afaf 100755 --- a/git-version +++ b/git-version @@ -2,9 +2,9 @@ to_ver() { VN=$1 - #drop leading 'ndctl-' out of the version so its a pure number - if [ ${VN:0:6} = "ndctl-" ]; then - VN=${VN:6} + #drop leading 'v' out of the version so its a pure number + if [ ${VN:0:1} = "v" ]; then + VN=${VN:1} fi echo $VN } @@ -29,10 +29,10 @@ LF=' if test -f version; then VN=$(cat version) || VN="$DEF_VER" elif test -d ${GIT_DIR:-.git} -o -f .git && - VN=$(git describe --match "ndctl-[0-9]*" --abbrev=7 HEAD 2>/dev/null) && + VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null) && case "$VN" in *$LF*) (exit 1) ;; - ndctl-[0-9]*) + v[0-9]*) VN="$(dirty $VN)" esac; then VN=$(echo "$VN" | sed -e 's/-/./g'); diff --git a/ndctl.spec.in b/ndctl.spec.in index 221cd755e2a6..0aaef03b2e5b 100644 --- a/ndctl.spec.in +++ b/ndctl.spec.in @@ -5,7 +5,7 @@ Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory) License: GPLv2 Group: System Environment/Base Url: https://github.com/pmem/ndctl -Source0: https://github.com/pmem/ndctl/archive/ndctl-%{version}.tar.gz +Source0: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: autoconf BuildRequires: asciidoc