Bug 1788594

Summary: Review Request: perl-Time-Fake - Simulate different times without changing your system clock
Product: [Fedora] Fedora Reporter: Xavier Bachelot <xavier>
Component: Package ReviewAssignee: Jitka Plesnikova <jplesnik>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: jplesnik, package-review, pasik
Target Milestone: ---Flags: jplesnik: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-19 11:41:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xavier Bachelot 2020-01-07 15:06:30 UTC
Spec URL: https://www.bachelot.org/fedora/SPECS/perl-Time-Fake.spec
SRPM URL: https://www.bachelot.org/fedora/SRPMS/perl-Time-Fake-0.11-1.fc32.src.rpm

Description:
Use this module to achieve the effect of changing your system clock, but
without actually changing your system clock. It overrides the Perl
builtin subs time, localtime, and gmtime, causing them to return a
"faked" time of your choice. From the script's point of view, time still
flows at the normal rate, but it is just offset as if it were executing
in the past or present.

Fedora Account System Username: xavierb

Comment 1 Jitka Plesnikova 2020-01-15 15:18:02 UTC
Source file is ok
Summary is ok
License is ok
Description is ok

URL does not work.
FIX: Please replace it with
  https://metacpan.org/release/Time-Fake

Source0 should not use www.cpan.org
FIX: Please replace Source0 with
  https://cpan.metacpan.org/modules/by-module/Time/Time-Fake-%{version}.tar.gz

All tests passed

BuildRequires 
FIX: Please add build-requires:
     - perl(strict) - lib/Time/Fake.pm:3
     - perl(vars) - lib/Time/Fake.pm:4

TODO: The easier way to remove .packlist is used NO_PACKLIST=1 option, 
      which is part of perl(ExtUtils::MakeMaker) >= 6.76.
      Add the option to 'perl Makefile.PL'

TODO: In spec file, please consider replacing
1)
  perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
by
  perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" NO_PACKLIST=1 NO_PERLLOCAL=1

2)
  make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
  find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
  find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
by
  %make_install

TODO: If you don't want to use previous changes, then please 
      - replace PERL_INSTALL_ROOT with more common DESTDIR.
      - remove deleting empty directories, because it is not needed.
      - add build-requires 'make', 'coreutils', 'findutils'

$ rpm -qp --requires perl-Time-Fake-0.11-1.fc32.noarch.rpm | sort | uniq -c | grep -v rpmlib
      1 perl(Carp)
      1 perl(:MODULE_COMPAT_5.30.1)
      1 perl(strict)
      1 perl(vars)
Binary requires are Ok.

$ rpm -qp --provides perl-Time-Fake-0.11-1.fc32.noarch.rpm | sort | uniq -c
      1 perl(Time::Fake) = 0.11
      1 perl-Time-Fake = 0.11-1.fc32
Binary provides are Ok.

$ rpmlint ./perl-Time-Fake*
perl-Time-Fake.noarch: W: spelling-error %description -l en_US localtime -> local time, local-time, mealtime
perl-Time-Fake.noarch: W: spelling-error %description -l en_US gmtime -> gm time, gm-time, time
perl-Time-Fake.noarch: W: invalid-url URL: https://metacpan.org/pod/Time-Fake/ HTTP Error 404: Not Found
perl-Time-Fake.src: W: spelling-error %description -l en_US localtime -> local time, local-time, mealtime
perl-Time-Fake.src: W: spelling-error %description -l en_US gmtime -> gm time, gm-time, time
perl-Time-Fake.src: W: invalid-url URL: https://metacpan.org/pod/Time-Fake/ HTTP Error 404: Not Found
2 packages and 1 specfiles checked; 0 errors, 6 warnings.
URL has to be fixed.

Please correct all 'FIX' issues and consider fixing 'TODO' items and
provide new spec file.

Resolution:
Not approved

Comment 2 Xavier Bachelot 2020-01-17 08:56:19 UTC
Hi Jitka,

Thanks for the review.
I have fixed URL:, Source0 and BR:s.
I have not fixed the TODO, as I have intentionally left out 'NO_PACKLIST=1 NO_PERLLOCAL=1' to ensure spec compatibility with older EL6 and EL7.
I have instead used the alternative fixes you provided.

Spec URL: https://www.bachelot.org/fedora/SPECS/perl-Time-Fake.spec
SRPM URL: https://www.bachelot.org/fedora/SRPMS/perl-Time-Fake-0.11-2.fc32.src.rpm

Regards,
Xavier

Comment 3 Jitka Plesnikova 2020-01-17 10:04:04 UTC
> URL does not work.
> FIX: Please replace it with
Ok

> FIX: Please replace Source0 with
OK
  
> BuildRequires 
> FIX: Please add build-requires:
>      - perl(strict) - lib/Time/Fake.pm:3
>      - perl(vars) - lib/Time/Fake.pm:4
Ok

> TODO: If you don't want to use previous changes, then please 
>       - replace PERL_INSTALL_ROOT with more common DESTDIR.
>       - remove deleting empty directories, because it is not needed.
>       - add build-requires 'make', 'coreutils', 'findutils'
Ok


Resolution:
Approved

Comment 4 Xavier Bachelot 2020-01-17 10:21:33 UTC
Thanks again Jitka :-)

Repo request:
https://pagure.io/releng/fedora-scm-requests/issue/21444

Comment 5 Gwyn Ciesla 2020-01-17 14:47:28 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/perl-Time-Fake

Comment 6 Xavier Bachelot 2020-01-19 11:41:13 UTC
Built for Rawhide, F31, F30, EL8, EL7, EL6.