Bug 1795461

Summary: Review Request: practrand - Software package for the Randon number generation & testing
Product: [Fedora] Fedora Reporter: Jiri Hladky <hladky.jiri>
Component: Package ReviewAssignee: Ankur Sinha (FranciscoD) <sanjay.ankur>
Status: ASSIGNED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora, hladky.jiri, package-review, sanjay.ankur
Target Milestone: ---Flags: sanjay.ankur: fedora-review?
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jiri Hladky 2020-01-28 02:45:58 UTC
Spec URL: https://jhladky.fedorapeople.org/practrand.spec
SRPM URL: https://jhladky.fedorapeople.org/practrand-0.95-1.fc29.src.rpm

Software package for the Random number generation & testing.
A suite of statistical tests for fast PRNGs. Multithreaded for speed,
command-line tools for automation, no upper limit on data size.
A variety of C++ pseudo-random number generators with well-designed
interfaces aimed at practical uses, not just research. 

Fedora Account System Username:

Comment 1 Artur Frenszek-Iwicki 2020-01-28 09:58:58 UTC
>Summary:        Software package for the Randon number generation & testing
A typo here - "randon" instead of "random" ("m" replaced with "n").

>Group:          Applications/System
The Group: tag is not used in Fedora.

>Source0:        https://sourceforge.net/projects/pracrand/files/PractRand_%{version}.zip
This URL does not exist - there's only "PractRand-pre0.95.zip".

>BuildRequires:  gcc, help2man, valgrind, dos2unix
>g++ -c src/*.cpp src/RNGs/*.cpp src/RNGs/other/*.cpp -I include -std=c++11 -O3 -g
/usr/bin/g++ is provided by the "gcc-c++" package, not "gcc". 

You should probably also call %set_build_flags at the start of %build so Fedora's CFLAGS and LDFLAGS are applied.

Also, since you're calling g++ directly, it might be good to leave a comment saying that the upstream sources don't contain a Makefile (nor anything similar).

>mkdir -p %{buildroot}%{_defaultdocdir}/%{name}
>cp -p doc/* %{buildroot}%{_defaultdocdir}/%{name}
Reading through the Packaging Guidelines, I think you should use %{_pkgdocdir} here instead of %{_defaultdocdir}.

Comment 2 Ankur Sinha (FranciscoD) 2020-01-29 19:44:33 UTC
I can review this one.

Comment 3 Ankur Sinha (FranciscoD) 2020-01-29 19:51:13 UTC
As Artur pointed out, you need to add g++ to the BuildRequires. The build does not currently succeed in mock because g++ is missing:

+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.sxPUlv
+ umask 022
+ cd /builddir/build/BUILD
+ cd practrand-0.95
+ g++ -c src/math.cpp src/non_uniform.cpp src/platform_specifics.cpp src/rand.cpp src/sha2.cpp src/test_batteries.cpp src/tests.cpp src/RNGs/arbee.cpp src/RNGs/chacha.cpp src/RNGs/efiix.cpp src/RNGs/hc256.cpp src/RNGs/isaac.cpp src/RNGs/jsf.cpp src/RNGs/mt19937.cpp src/RNGs/rarns.cpp src/RNGs/salsa.cpp src/RNGs/sfc.cpp src/RNGs/sha2_based_pool.cpp src/RNGs/trivium.cpp src/RNGs/xsm.cpp src/RNGs/other/fibonacci.cpp src/RNGs/other/indirection.cpp src/RNGs/other/mult.cpp src/RNGs/other/simple.cpp src/RNGs/other/transform.cpp -I include -std=c++11 -O3 -g
/var/tmp/rpm-tmp.sxPUlv: line 33: g++: command not found
error: Bad exit status from /var/tmp/rpm-tmp.sxPUlv (%build)

Can you please correct the sourceurl also as Artur pointed out? Fedora-review gives a warning already.

Could you also please test that your src rpm builds in mock (if it doesn't, it won't build on koji either): https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds

I can continue with a full review once the build succeeds.


Comment 4 Jiri Hladky 2020-02-05 16:40:16 UTC
Thanks a lot for the review! 

I have fixed the issues pointed out in comment #1 and comment #3. I had to do some modifications for s390x as well.  

Modified SPEC and SRPM files are here:

Spec URL: https://jhladky.fedorapeople.org/practrand.spec
SRPM URL: https://jhladky.fedorapeople.org/practrand-0.95-1.fc29.src.rpm

And there is the link to the successful Koji scratch build:

koji build --scratch rawhide practrand-0.95-1.fc29.src.rpm

> Can you please correct the sourceurl also as Artur pointed out? Fedora-review gives a warning already.

This is the last unresolved issue. I got a preliminary version but it's not released yet. There are few minors issues which the author would like to fix before releasing it. 

Let's put this review on hold until 0.95 release is out. I will then let you know and we will finish the process. 

Thanks a lot!

Comment 5 Ankur Sinha (FranciscoD) 2020-04-07 16:43:43 UTC

Any update on this one?

Comment 6 Ankur Sinha (FranciscoD) 2020-04-21 16:34:30 UTC
Hello Jirka,

Any progress here?


Comment 7 Jiri Hladky 2020-04-21 22:27:47 UTC
Hello Ankur,

I'm still waiting for the author to release the new version with some changes needed to package as the rpm. He is working on a new feature. 

Let me ping him if he can estimate a release date. 


Comment 8 Jiri Hladky 2020-04-25 10:45:17 UTC
Hello Ankur,

I have talked to the upstream developer and a new version should be ready in two weeks. Please bear with us.


Comment 9 Ankur Sinha (FranciscoD) 2020-08-03 12:16:09 UTC
Hi Jiri,

Any updates here?


Comment 10 Jiri Hladky 2020-08-03 15:16:15 UTC
Hi Ankur,

the upstream version (which includes the changes necessary to make it a rpm package) is delayed, but it should be released really soon:

Cerian Knight - 2020-07-26
I am nearing the final milestone for release 

Please bear with us! 


Comment 11 Ankur Sinha (FranciscoD) 2020-11-27 13:26:14 UTC
Hi Jirka,

Hope you are doing well.

Just a general check to see if the release was made so this can proceed?


Comment 12 Jiri Hladky 2021-02-24 01:31:48 UTC
Hi Ankur,

I'm really sorry it took so long. 

Finally, everything is ready for the final review. I have fixed all the issues discussed above. 

Spec URL: https://jhladky.fedorapeople.org/practrand.spec
SRPM URL: https://jhladky.fedorapeople.org/practrand-0.951-1.fc32.src.rpm

There is the link to the successful Koji scratch build:

koji build --scratch rawhide practrand-0.951-1.fc32.src.rpm

Could you please help me to finish the review? 

Thanks a lot!

Comment 13 Ankur Sinha (FranciscoD) 2021-02-24 08:24:44 UTC
Hi Jirka,

Thanks very much! I'll try to complete the review in the coming weeks.


Comment 14 Jiri Hladky 2021-02-24 23:57:23 UTC
Awesome. I do appreciate that!