Skip to content

Commit 2768315

Browse files
committed
ndctl: fix rpm source url, switch back to v$VERSION tag scheme
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 <[email protected]>
1 parent aa20c52 commit 2768315

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

git-version

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
to_ver() {
44
VN=$1
5-
#drop leading 'ndctl-' out of the version so its a pure number
6-
if [ ${VN:0:6} = "ndctl-" ]; then
7-
VN=${VN:6}
5+
#drop leading 'v' out of the version so its a pure number
6+
if [ ${VN:0:1} = "v" ]; then
7+
VN=${VN:1}
88
fi
99
echo $VN
1010
}
@@ -29,10 +29,10 @@ LF='
2929
if test -f version; then
3030
VN=$(cat version) || VN="$DEF_VER"
3131
elif test -d ${GIT_DIR:-.git} -o -f .git &&
32-
VN=$(git describe --match "ndctl-[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
32+
VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
3333
case "$VN" in
3434
*$LF*) (exit 1) ;;
35-
ndctl-[0-9]*)
35+
v[0-9]*)
3636
VN="$(dirty $VN)"
3737
esac; then
3838
VN=$(echo "$VN" | sed -e 's/-/./g');

ndctl.spec.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
55
License: GPLv2
66
Group: System Environment/Base
77
Url: https://github.com/pmem/ndctl
8-
Source0: https://github.com/pmem/ndctl/archive/ndctl-%{version}.tar.gz
8+
Source0: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
99

1010
BuildRequires: autoconf
1111
BuildRequires: asciidoc

0 commit comments

Comments
 (0)