Additional Information
- Version of K2HASH being used (k2hlinetool -libversion)
[vagrant@localhost ~]$ k2hlinetool -libversion
K2HASH library Version 1.0.71 (commit: 3813fcd) with NSS
Copyright(C) 2013 Yahoo Japan Corporation.
K2HASH is key-valuew store base libraries. K2HASH is made for
the purpose of the construction of original KVS system and the
offer of the library. The characteristic is this KVS library
which Key can layer. And can support multi-processing and
multi-thread, and is provided safely as available KVS.
FULLOCK Version 1.0.36 (commit: unknown)
Copyright(C) 2015 Yahoo Japan Corporation.
FULLOCK is fast locking library on user level by Yahoo! JAPAN.
FULLOCK is following specifications.
Details about issue
Build failures on each of aarch64, ppc64el and s390x platform. The exis code of test_linetool.sh is the main reason of failures. Here is diff between results and expected ones.
$ diff -c ${LOGSUBFILE} ${MASTERLOGSUBFILE} > /tmp/k2hash_test_linetool.diff 2>&1
$ cat /tmp/k2hash_test_linetool.diff
***************
*** 716,722 ****
> ba mtime history expire=10 enc pass=test_encrypt_keys
> set testkey testvalue
> p testkey
! +"testkey" => value is not found
> rm testkey
> clanallattr
> cleanallattr
--- 716,722 ----
> ba mtime history expire=10 enc pass=test_encrypt_keys
> set testkey testvalue
> p testkey
! +"testkey" => "testvalue"
> rm testkey
> clanallattr
> cleanallattr
***************
*** 1967,1973 ****
> ba mtime history expire=10 enc pass=test_encrypt_keys
> set testkey testvalue
> p testkey
! +"testkey" => value is not found
> rm testkey
> clanallattr
> cleanallattr
--- 1967,1973 ----
> ba mtime history expire=10 enc pass=test_encrypt_keys
> set testkey testvalue
> p testkey
! +"testkey" => "testvalue"
> rm testkey
> clanallattr
> cleanallattr
***************
*** 2667,2673 ****
> ba mtime history expire=10 enc pass=test_encrypt_keys
> set testkey testvalue
> p testkey
! +"testkey" => value is not found
> rm testkey
> clanallattr
> cleanallattr
--- 2667,2673 ----
> ba mtime history expire=10 enc pass=test_encrypt_keys
> set testkey testvalue
> p testkey
! +"testkey" => "testvalue"
> rm testkey
> clanallattr
> cleanallattr
Please see:
http://koji.fedoraproject.org/koji/taskinfo?taskID=37491459
How to Reproduce a Bug
- Requirement:
- Fedora31
- FAS account
- Koji settings
Builds k2hash src.rpm
$ rpmdev-setuptree
$ vi k2hash.spec
k2hash.spec:
#
# K2HASH
#
# Copyright 2013 Yahoo Japan Corporation.
#
# K2HASH is key-valuew store base libraries.
# K2HASH is made for the purpose of the construction of
# original KVS system and the offer of the library.
# The characteristic is this KVS library which Key can
# layer. And can support multi-processing and multi-thread,
# and is provided safely as available KVS.
#
# For the full copyright and license information, please view
# the license file that was distributed with this source code.
#
# AUTHOR: Takeshi Nakatani
# CREATE: Fri 17 Jul 2016
# REVISION:
#
#
# Local macros/define
#
%if %{undefined package_revision}
%global package_revision 1
%endif
%if %{undefined make_build}
%global make_build %{__make} %{?_smp_mflags}
%endif
%if %{undefined autosetup}
%global autosetup %setup -q
%endif
%global gittag v1.0.71
%if %{undefined make_check}
%global make_check 1
%endif
#
# main package
#
Summary: NoSQL Key Value Store(KVS) library
Name: k2hash
Version: 1.0.71
Release: %{package_revision}%{?dist}
License: MIT
URL: https://github.com/yahoojapan/k2hash
Source0: https://github.com/yahoojapan/k2hash/archive/%{gittag}/%{name}-%{version}.tar.gz
Requires: libfullock%{?_isa} >= 1.0.36
BuildRequires: git-core gcc-c++ make libtool libfullock-devel >= 1.0.36 nss-devel
# k2hash does not support 32bit arch.
ExcludeArch: i686 armv7hl
%description
K2HASH is NoSQL(key value store) library and tools for this library.
%prep
%autosetup -n %{name}-%{version}
%build
%configure --disable-static --with-nss
%make_build
%install
%make_install
find %{buildroot} -name '*.la' -exec rm -f {} ';'
%if %{make_check}
%check
%{__make} check
find %{_builddir} -name '*.log' -exec echo {} ';'
find %{_builddir} -name '*.log' -exec cat {} ';'
%endif
%if %{defined ldconfig_scriptlets}
%ldconfig_scriptlets
%else
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%if 0%{?rhel} == 6
%clean
rm -rf %{buildroot}
%endif
%files
%if 0%{?rhel} == 6
%doc COPYING
%defattr(-,root,root)
%else
%license COPYING
%endif
%doc README AUTHORS ChangeLog
%{_libdir}/*.so.1*
%{_mandir}/man1/*
%{_bindir}/*
#
# devel package
#
%package devel
Summary: NoSQL Key Value Store(KVS) library (development)
Requires: %{name}%{?_isa} = %{version}-%{release}, libfullock-devel%{?_isa} >= 1.0.36
%description devel
Development package for building with k2hash shared library.
This package has header files and symbols for it.
%files devel
%if 0%{?rhel} == 6
%defattr(-,root,root)
%endif
%doc README AUTHORS ChangeLog
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%changelog
* Fri Sep 06 2019 Takeshi Nakatani <[email protected]> 1.0.71-1
- First version of Fedora
Code changes are required to print test failure logs.
$ wget https://github.com/yahoojapan/k2hash/archive/v1.0.71/k2hash-1.0.71.tar.gz
$ tar xzf k2hash-1.0.71.tar.gz
$ cd k2hash-1.0.71
$ sh autogen.sh
$ vi tests/test_linetool.sh
$ cd ..
$ diff -r k2hash-1.0.71.orig/tests/test_linetool.sh k2hash-1.0.71/tests/test_linetool.sh
109c109
< diff ${LOGSUBFILE} ${MASTERLOGSUBFILE} >/dev/null 2>&1
---
> diff -c ${LOGSUBFILE} ${MASTERLOGSUBFILE} > /tmp/k2hash_test_linetool.diff 2>&1
118,120c118,120
< rm -f ${LOGFILE}
< rm -f ${LOGSUBFILE}
< rm -f ${MASTERLOGSUBFILE}
---
> #rm -f ${LOGFILE}
> #rm -f ${LOGSUBFILE}
> #rm -f ${MASTERLOGSUBFILE}
Then build a k2hash source rpm.
$ rpmbuild -bs k2hash.spec
Finally run a Koji scratch build.
$ koji build --scratch f31-candidate ~/rpmbuild/SRPMS/k2hash-1.0.71-1.fc31.src.rpm
After buiding a binary package, you will see the same log as the following log in the koji build.log.
$ cat /tmp/k2hash_test_linetool.diff
***************
*** 716,722 ****
> ba mtime history expire=10 enc pass=test_encrypt_keys
> set testkey testvalue
> p testkey
! +"testkey" => value is not found
> rm testkey
> clanallattr
> cleanallattr
--- 716,722 ----
> ba mtime history expire=10 enc pass=test_encrypt_keys
> set testkey testvalue
> p testkey
! +"testkey" => "testvalue"
> rm testkey
> clanallattr
> cleanallattr
***************
*** 1967,1973 ****
> ba mtime history expire=10 enc pass=test_encrypt_keys
> set testkey testvalue
> p testkey
! +"testkey" => value is not found
> rm testkey
> clanallattr
> cleanallattr
--- 1967,1973 ----
> ba mtime history expire=10 enc pass=test_encrypt_keys
> set testkey testvalue
> p testkey
! +"testkey" => "testvalue"
> rm testkey
> clanallattr
> cleanallattr
***************
*** 2667,2673 ****
> ba mtime history expire=10 enc pass=test_encrypt_keys
> set testkey testvalue
> p testkey
! +"testkey" => value is not found
> rm testkey
> clanallattr
> cleanallattr
--- 2667,2673 ----
> ba mtime history expire=10 enc pass=test_encrypt_keys
> set testkey testvalue
> p testkey
! +"testkey" => "testvalue"
> rm testkey
> clanallattr
> cleanallattr