[Build-System] Add ARM64 support, extend Debian helper scripts.

Co-authored-by: s3rj1k <evasive.gyron@gmail.com>
This commit is contained in:
Andrey Volk 2024-05-11 12:37:32 +03:00 committed by s3rj1k
parent 3e5c58c11c
commit 8224bb8e65
No known key found for this signature in database
3 changed files with 91 additions and 42 deletions

63
debian/bootstrap.sh vendored
View File

@ -65,6 +65,9 @@ avoid_mods=(
avoid_mods_armhf=( avoid_mods_armhf=(
languages/mod_v8 languages/mod_v8
) )
avoid_mods_arm64=(
languages/mod_v8
)
avoid_mods_sid=( avoid_mods_sid=(
directories/mod_ldap directories/mod_ldap
) )
@ -352,7 +355,7 @@ EOF
print_core_control () { print_core_control () {
cat <<EOF cat <<EOF
Package: freeswitch-all Package: freeswitch-all
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: freeswitch-meta-all (= \${binary:Version}), freeswitch-meta-all-dbg (= \${binary:Version}) Depends: freeswitch-meta-all (= \${binary:Version}), freeswitch-meta-all-dbg (= \${binary:Version})
Conflicts: freeswitch-all (<= 1.6.7) Conflicts: freeswitch-all (<= 1.6.7)
Description: Cross-Platform Scalable Multi-Protocol Soft Switch Description: Cross-Platform Scalable Multi-Protocol Soft Switch
@ -361,7 +364,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
This is a package which depends on all packaged FreeSWITCH modules. This is a package which depends on all packaged FreeSWITCH modules.
Package: freeswitch Package: freeswitch
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${shlibs:Depends}, \${perl:Depends}, \${misc:Depends}, Depends: \${shlibs:Depends}, \${perl:Depends}, \${misc:Depends},
libfreeswitch1 (= \${binary:Version}) libfreeswitch1 (= \${binary:Version})
Recommends: Recommends:
@ -373,7 +376,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
This package contains the FreeSWITCH core. This package contains the FreeSWITCH core.
Package: libfreeswitch1 Package: libfreeswitch1
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${shlibs:Depends}, \${misc:Depends}, libsofia-sip-ua0 (>= 1.13.17) Depends: \${shlibs:Depends}, \${misc:Depends}, libsofia-sip-ua0 (>= 1.13.17)
Recommends: Recommends:
Suggests: libfreeswitch1-dbg Suggests: libfreeswitch1-dbg
@ -385,7 +388,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
Package: python-esl Package: python-esl
Section: python Section: python
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${shlibs:Depends}, \${misc:Depends}, \${python:Depends} Depends: \${shlibs:Depends}, \${misc:Depends}, \${python:Depends}
Description: Cross-Platform Scalable Multi-Protocol Soft Switch Description: Cross-Platform Scalable Multi-Protocol Soft Switch
$(debian_wrap "${fs_description}") $(debian_wrap "${fs_description}")
@ -394,7 +397,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
Package: libesl-perl Package: libesl-perl
Section: perl Section: perl
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${shlibs:Depends}, \${misc:Depends}, \${perl:Depends} Depends: \${shlibs:Depends}, \${misc:Depends}, \${perl:Depends}
Description: Cross-Platform Scalable Multi-Protocol Soft Switch Description: Cross-Platform Scalable Multi-Protocol Soft Switch
$(debian_wrap "${fs_description}") $(debian_wrap "${fs_description}")
@ -402,7 +405,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
This package contains the Perl binding for FreeSWITCH Event Socket Library (ESL). This package contains the Perl binding for FreeSWITCH Event Socket Library (ESL).
Package: freeswitch-meta-bare Package: freeswitch-meta-bare
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}) Depends: \${misc:Depends}, freeswitch (= \${binary:Version})
Recommends: Recommends:
freeswitch-doc (= \${binary:Version}), freeswitch-doc (= \${binary:Version}),
@ -420,7 +423,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
bare FreeSWITCH install. bare FreeSWITCH install.
Package: freeswitch-meta-default Package: freeswitch-meta-default
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}), Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
freeswitch-mod-commands (= \${binary:Version}), freeswitch-mod-commands (= \${binary:Version}),
freeswitch-mod-conference (= \${binary:Version}), freeswitch-mod-conference (= \${binary:Version}),
@ -462,7 +465,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
reasonably basic FreeSWITCH install. reasonably basic FreeSWITCH install.
Package: freeswitch-meta-vanilla Package: freeswitch-meta-vanilla
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}), Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
freeswitch-init, freeswitch-init,
freeswitch-mod-console (= \${binary:Version}), freeswitch-mod-console (= \${binary:Version}),
@ -511,7 +514,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
running the FreeSWITCH vanilla example configuration. running the FreeSWITCH vanilla example configuration.
Package: freeswitch-meta-sorbet Package: freeswitch-meta-sorbet
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}), Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
Recommends: Recommends:
freeswitch-init, freeswitch-init,
@ -594,7 +597,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
modules except a few which aren't recommended. modules except a few which aren't recommended.
Package: freeswitch-meta-all Package: freeswitch-meta-all
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}), Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
freeswitch-init, freeswitch-init,
freeswitch-lang (= \${binary:Version}), freeswitch-lang (= \${binary:Version}),
@ -705,7 +708,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
FreeSWITCH modules. FreeSWITCH modules.
Package: freeswitch-meta-codecs Package: freeswitch-meta-codecs
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}), Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
freeswitch-mod-amr (= \${binary:Version}), freeswitch-mod-amr (= \${binary:Version}),
freeswitch-mod-amrwb (= \${binary:Version}), freeswitch-mod-amrwb (= \${binary:Version}),
@ -732,7 +735,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
most FreeSWITCH codecs. most FreeSWITCH codecs.
Package: freeswitch-meta-codecs-dbg Package: freeswitch-meta-codecs-dbg
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}), Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
freeswitch-mod-amr-dbg (= \${binary:Version}), freeswitch-mod-amr-dbg (= \${binary:Version}),
freeswitch-mod-amrwb-dbg (= \${binary:Version}), freeswitch-mod-amrwb-dbg (= \${binary:Version}),
@ -759,7 +762,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
most FreeSWITCH codecs. most FreeSWITCH codecs.
Package: freeswitch-meta-conf Package: freeswitch-meta-conf
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, Depends: \${misc:Depends},
freeswitch-conf-curl (= \${binary:Version}), freeswitch-conf-curl (= \${binary:Version}),
freeswitch-conf-insideout (= \${binary:Version}), freeswitch-conf-insideout (= \${binary:Version}),
@ -773,7 +776,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
examples for FreeSWITCH. examples for FreeSWITCH.
Package: freeswitch-meta-lang Package: freeswitch-meta-lang
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, Depends: \${misc:Depends},
freeswitch-lang-de (= \${binary:Version}), freeswitch-lang-de (= \${binary:Version}),
freeswitch-lang-en (= \${binary:Version}), freeswitch-lang-en (= \${binary:Version}),
@ -789,7 +792,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
FreeSWITCH. FreeSWITCH.
Package: freeswitch-meta-mod-say Package: freeswitch-meta-mod-say
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, Depends: \${misc:Depends},
freeswitch-mod-say-de (= \${binary:Version}), freeswitch-mod-say-de (= \${binary:Version}),
freeswitch-mod-say-en (= \${binary:Version}), freeswitch-mod-say-en (= \${binary:Version}),
@ -814,7 +817,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
FreeSWITCH. FreeSWITCH.
Package: freeswitch-meta-mod-say-dbg Package: freeswitch-meta-mod-say-dbg
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, Depends: \${misc:Depends},
freeswitch-mod-say-de-dbg (= \${binary:Version}), freeswitch-mod-say-de-dbg (= \${binary:Version}),
freeswitch-mod-say-en-dbg (= \${binary:Version}), freeswitch-mod-say-en-dbg (= \${binary:Version}),
@ -839,7 +842,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
FreeSWITCH. FreeSWITCH.
Package: freeswitch-meta-all-dbg Package: freeswitch-meta-all-dbg
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}), Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
freeswitch-meta-codecs-dbg (= \${binary:Version}), freeswitch-meta-codecs-dbg (= \${binary:Version}),
freeswitch-meta-mod-say (= \${binary:Version}), freeswitch-meta-mod-say (= \${binary:Version}),
@ -943,7 +946,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
Package: freeswitch-all-dbg Package: freeswitch-all-dbg
Section: debug Section: debug
Priority: optional Priority: optional
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch-meta-all (= \${binary:Version}), freeswitch-meta-all-dbg (= \${binary:Version}) Depends: \${misc:Depends}, freeswitch-meta-all (= \${binary:Version}), freeswitch-meta-all-dbg (= \${binary:Version})
Description: debugging symbols for FreeSWITCH Description: debugging symbols for FreeSWITCH
$(debian_wrap "${fs_description}") $(debian_wrap "${fs_description}")
@ -953,7 +956,7 @@ Description: debugging symbols for FreeSWITCH
Package: freeswitch-dbg Package: freeswitch-dbg
Section: debug Section: debug
Priority: optional Priority: optional
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}) Depends: \${misc:Depends}, freeswitch (= \${binary:Version})
Description: debugging symbols for FreeSWITCH Description: debugging symbols for FreeSWITCH
$(debian_wrap "${fs_description}") $(debian_wrap "${fs_description}")
@ -963,7 +966,7 @@ Description: debugging symbols for FreeSWITCH
Package: libfreeswitch1-dbg Package: libfreeswitch1-dbg
Section: debug Section: debug
Priority: optional Priority: optional
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, libfreeswitch1 (= \${binary:Version}) Depends: \${misc:Depends}, libfreeswitch1 (= \${binary:Version})
Description: debugging symbols for FreeSWITCH Description: debugging symbols for FreeSWITCH
$(debian_wrap "${fs_description}") $(debian_wrap "${fs_description}")
@ -972,7 +975,7 @@ Description: debugging symbols for FreeSWITCH
Package: libfreeswitch-dev Package: libfreeswitch-dev
Section: libdevel Section: libdevel
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch Depends: \${misc:Depends}, freeswitch
Description: development libraries and header files for FreeSWITCH Description: development libraries and header files for FreeSWITCH
$(debian_wrap "${fs_description}") $(debian_wrap "${fs_description}")
@ -981,7 +984,7 @@ Description: development libraries and header files for FreeSWITCH
Package: freeswitch-doc Package: freeswitch-doc
Section: doc Section: doc
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends} Depends: \${misc:Depends}
Description: documentation for FreeSWITCH Description: documentation for FreeSWITCH
$(debian_wrap "${fs_description}") $(debian_wrap "${fs_description}")
@ -994,7 +997,7 @@ Description: documentation for FreeSWITCH
## languages ## languages
Package: freeswitch-lang Package: freeswitch-lang
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, Depends: \${misc:Depends},
freeswitch-lang-en (= \${binary:Version}) freeswitch-lang-en (= \${binary:Version})
Description: Language files for FreeSWITCH Description: Language files for FreeSWITCH
@ -1006,7 +1009,7 @@ Description: Language files for FreeSWITCH
## timezones ## timezones
Package: freeswitch-timezones Package: freeswitch-timezones
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends} Depends: \${misc:Depends}
Description: Timezone files for FreeSWITCH Description: Timezone files for FreeSWITCH
$(debian_wrap "${fs_description}") $(debian_wrap "${fs_description}")
@ -1020,7 +1023,7 @@ EOF
if [ ${use_sysvinit} = "true" ]; then if [ ${use_sysvinit} = "true" ]; then
cat <<EOF cat <<EOF
Package: freeswitch-sysvinit Package: freeswitch-sysvinit
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, lsb-base (>= 3.0-6), sysvinit | sysvinit-utils Depends: \${misc:Depends}, lsb-base (>= 3.0-6), sysvinit | sysvinit-utils
Conflicts: freeswitch-init Conflicts: freeswitch-init
Provides: freeswitch-init Provides: freeswitch-init
@ -1033,7 +1036,7 @@ EOF
else else
cat <<EOF cat <<EOF
Package: freeswitch-systemd Package: freeswitch-systemd
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, systemd Depends: \${misc:Depends}, systemd
Conflicts: freeswitch-init, freeswitch-all (<= 1.6.7) Conflicts: freeswitch-init, freeswitch-all (<= 1.6.7)
Provides: freeswitch-init Provides: freeswitch-init
@ -1051,7 +1054,7 @@ print_mod_control () {
cat <<EOF cat <<EOF
Package: freeswitch-${module_name//_/-} Package: freeswitch-${module_name//_/-}
Section: ${m_section} Section: ${m_section}
Architecture: amd64 armhf Architecture: amd64 armhf arm64
$(debian_wrap "Depends: \${shlibs:Depends}, \${misc:Depends}, libfreeswitch1 (= \${binary:Version}), ${depends}") $(debian_wrap "Depends: \${shlibs:Depends}, \${misc:Depends}, libfreeswitch1 (= \${binary:Version}), ${depends}")
$(debian_wrap "Recommends: ${recommends}") $(debian_wrap "Recommends: ${recommends}")
$(debian_wrap "Suggests: freeswitch-${module_name//_/-}-dbg, ${suggests}") $(debian_wrap "Suggests: freeswitch-${module_name//_/-}-dbg, ${suggests}")
@ -1066,7 +1069,7 @@ Description: ${description} for FreeSWITCH
Package: freeswitch-${module_name//_/-}-dbg Package: freeswitch-${module_name//_/-}-dbg
Section: debug Section: debug
Priority: optional Priority: optional
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, Depends: \${misc:Depends},
freeswitch-${module_name//_/-} (= \${binary:Version}) freeswitch-${module_name//_/-} (= \${binary:Version})
Description: ${description} for FreeSWITCH (debug) Description: ${description} for FreeSWITCH (debug)
@ -1131,7 +1134,7 @@ print_conf_overrides () {
print_conf_control () { print_conf_control () {
cat <<EOF cat <<EOF
Package: freeswitch-conf-${conf//_/-} Package: freeswitch-conf-${conf//_/-}
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends} Depends: \${misc:Depends}
Conflicts: freeswitch-all (<= 1.6.7) Conflicts: freeswitch-all (<= 1.6.7)
Description: FreeSWITCH ${conf} configuration Description: FreeSWITCH ${conf} configuration
@ -1165,7 +1168,7 @@ print_lang_control () {
esac esac
cat <<EOF cat <<EOF
Package: freeswitch-lang-${lang//_/-} Package: freeswitch-lang-${lang//_/-}
Architecture: amd64 armhf Architecture: amd64 armhf arm64
Depends: \${misc:Depends} Depends: \${misc:Depends}
Recommends: freeswitch-sounds-${lang} Recommends: freeswitch-sounds-${lang}
Conflicts: freeswitch-all (<= 1.6.7) Conflicts: freeswitch-all (<= 1.6.7)

48
debian/util.sh vendored
View File

@ -140,14 +140,16 @@ prep_create_orig () {
set -e set -e
local OPTIND OPTARG local OPTIND OPTARG
local uver="" hrev="" bundle_deps=true local uver="" hrev="" bundle_deps=true soft_reset=false
while getopts 'bm:nv:z:' o "$@"; do while getopts 'bm:nv:V:xz:' o "$@"; do
case "$o" in case "$o" in
b) ;; b) ;;
m) ;; m) ;;
n) uver="nightly";; n) uver="nightly";;
v) uver="$OPTARG";; v) uver="$OPTARG";;
V) uver="$OPTARG";;
x) soft_reset=true;;
z) ;; z) ;;
esac esac
done done
@ -161,8 +163,12 @@ prep_create_orig () {
local treeish="$1" local treeish="$1"
[ -n "$treeish" ] || treeish="HEAD" [ -n "$treeish" ] || treeish="HEAD"
check_repo_clean if $soft_reset; then
git reset --hard "$treeish" git reset --soft "$treeish"
else
check_repo_clean
git reset --hard "$treeish"
fi
if $bundle_deps; then if $bundle_deps; then
(cd libs && getlibs) (cd libs && getlibs)
@ -180,23 +186,29 @@ create_orig () {
set -e set -e
local OPTIND OPTARG local OPTIND OPTARG
local bundle_deps=true modules_list="" zl=9e local bundle_deps=true modules_list="" soft_reset=false auto_orig=false zl=9e
local uver="$(prep_create_orig "$@")" local uver="$(prep_create_orig "$@")"
while getopts 'bm:nv:z:' o "$@"; do while getopts 'bm:nv:V:xz:' o "$@"; do
case "$o" in case "$o" in
b) ;; b) ;;
m) modules_list="$OPTARG";; m) modules_list="$OPTARG";;
n) ;; n) ;;
v) ;; v) ;;
V) auto_orig=true;;
x) soft_reset=true;;
z) zl="$OPTARG";; z) zl="$OPTARG";;
esac esac
done done
shift $(($OPTIND-1)) shift $(($OPTIND-1))
local dver="$(mk_dver "$uver")" local orig
local orig="../freeswitch_$dver~$(lsb_release -sc).orig.tar.xz" if $auto_orig; then
orig="../freeswitch_$(debian/version-omit_revision.pl).orig.tar.xz"
else
orig="../freeswitch_$(mk_dver "$uver")~$(lsb_release -sc).orig.tar.xz"
fi
mv .gitattributes .gitattributes.orig mv .gitattributes .gitattributes.orig
@ -223,7 +235,11 @@ create_orig () {
mv .gitattributes.orig .gitattributes mv .gitattributes.orig .gitattributes
git reset --hard HEAD^ && git clean -fdx if $soft_reset; then
git reset --soft HEAD^
else
git reset --hard HEAD^ && git clean -fdx
fi
} 1>&2 } 1>&2
echo $orig echo $orig
} }
@ -292,9 +308,9 @@ create_dsc () {
prep_create_dsc "$@" prep_create_dsc "$@"
local OPTIND OPTARG suite_postfix="" suite_postfix_p=false zl=9 local OPTIND OPTARG suite_postfix="" suite_postfix_p=false soft_reset=false zl=9
while getopts 'a:f:m:p:s:u:z:' o "$@"; do while getopts 'a:f:m:p:s:u:xz:' o "$@"; do
case "$o" in case "$o" in
a) ;; a) ;;
f) ;; f) ;;
@ -302,6 +318,7 @@ create_dsc () {
p) ;; p) ;;
s) ;; s) ;;
u) suite_postfix="$OPTARG"; suite_postfix_p=true;; u) suite_postfix="$OPTARG"; suite_postfix_p=true;;
x) soft_reset=true;;
z) zl="$OPTARG";; z) zl="$OPTARG";;
esac esac
done done
@ -328,7 +345,11 @@ create_dsc () {
local dsc="../$(dsc_base).dsc" local dsc="../$(dsc_base).dsc"
git reset --hard HEAD^ && git clean -fdx if $soft_reset; then
git reset --soft HEAD^
else
git reset --hard HEAD^ && git clean -fdx
fi
} 1>&2 } 1>&2
echo $dsc echo $dsc
} }
@ -686,6 +707,7 @@ commands:
Set FS bootstrap/build -j flags Set FS bootstrap/build -j flags
-u <suite-postfix> -u <suite-postfix>
Specify a custom suite postfix Specify a custom suite postfix
-x Use git soft reset instead of hard reset
-z Set compression level -z Set compression level
create-orig <treeish> (same for 'prep_create_orig') create-orig <treeish> (same for 'prep_create_orig')
@ -694,6 +716,8 @@ commands:
Choose custom list of modules to build Choose custom list of modules to build
-n Nightly build -n Nightly build
-v Set version -v Set version
-V Set version (without replacing every '-' to '~')
-x Use git soft reset instead of hard reset
-z Set compression level -z Set compression level
EOF EOF

22
debian/version-omit_revision.pl vendored Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/perl
use strict;
use warnings;
use Dpkg::Version;
my $version;
open(my $fh, '-|', 'dpkg-parsechangelog -S version') or die "Failed to execute dpkg-parsechangelog: $!";
{
local $/;
$version = <$fh>;
}
close $fh;
$version =~ s/\s+$//;
die "No version found or empty output from dpkg-parsechangelog" unless defined $version and $version ne '';
my $v = Dpkg::Version->new($version);
my $vs = $v->as_string(omit_epoch => 1, omit_revision => 1);
print "$vs\n";