Skip to content

Commit 08618ed

Browse files
authored
common: adjust build system to versions like 1.4.99-1-g4cff24b (#45)
Note: None of this affects how DAOS builds PMDK. - RPM version does not accept '-'. Replace them with '~'. - pmdk.spec has to force SRCVERSION so generated *.pc files specify the same version string. - fix test so it accepts '~'. Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
1 parent f525924 commit 08618ed

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

utils/docker/test_package/test-packages-installation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def get_incompatible_packages(packages_path, pkgconfig_directory, split_param):
9999
for line in out:
100100
if 'version=' in line:
101101
version = line.split('=')[1].strip(linesep)
102-
if not version in PMDK_VERSION.replace('~', '-'):
102+
if not version in PMDK_VERSION:
103103
incompatibe_packages.append(library)
104104
return incompatibe_packages
105105

utils/pkg-common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function check_tool() {
3737
}
3838

3939
function get_version() {
40-
echo -n $1 | sed "s/-rc/~rc/"
40+
echo -n $1 | sed "s/-/~/g"
4141
}
4242

4343
function get_os() {

utils/pmdk.spec.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ make %{?_smp_mflags} \
415415
%if %{without ndctl}
416416
NDCTL_ENABLE=n \
417417
%endif
418+
SRCVERSION=%{version} \
418419
__MAKE_FLAGS__
419420

420421

@@ -424,6 +425,7 @@ make install DESTDIR=%{buildroot} \
424425
%if %{without ndctl}
425426
NDCTL_ENABLE=n \
426427
%endif
428+
SRCVERSION=%{version} \
427429
LIB_AR= \
428430
prefix=%{_prefix} \
429431
libdir=%{_libdir} \

0 commit comments

Comments
 (0)