Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1674278 - Review Request: tty-clock - clock using libncurses [NEEDINFO]
Summary: Review Request: tty-clock - clock using libncurses
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-NEEDSPONSOR
TreeView+ depends on / blocked
 
Reported: 2019-02-10 17:46 UTC by idf31
Modified: 2021-07-04 15:09 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
mattia.verga: needinfo? (idf31)


Attachments (Terms of Use)

Description idf31 2019-02-10 17:46:42 UTC
Spec URL: https://gitlab.com/IDF31/tty-clock-spec/blob/master/tty-clock.spec
SRPM URL: https://gitlab.com/IDF31/tty-clock-spec/blob/master/tty-clock-2.3-1.fc29.src.rpm
Description: A simple and cool clock made in ncurses.
Fedora Account System Username: idf31

By the way this is my first package and I need a sponsor, thank you!

Comment 1 Jaroslav Prokop 2019-02-10 18:35:33 UTC
I'll do an unofficial review, just some basic points:
* use macros, e.g. %{_bindir}/tty-clock and %{_mandir}/man1/ ...

* I don't think rm -rf buildroot is a way to go and I think there is macro for it

* Changelog is in an invalid format (or at least not missing a few things)

Please take a look at the guidelines, https://docs.fedoraproject.org/en-US/packaging-guidelines/
and also take a look at Domain Specific guidelines https://docs.fedoraproject.org/en-US/packaging-guidelines/#_domain_specific_guidelines

I'd also recommend running rpmlint on your spec files and rpm packages before submitting

I wish you good luck and looking forward to your future work!

Comment 2 idf31 2019-02-10 18:58:05 UTC
(In reply to Jaroslav Prokop from comment #1)
> I'll do an unofficial review, just some basic points:
> * use macros, e.g. %{_bindir}/tty-clock and %{_mandir}/man1/ ...
> 
> * I don't think rm -rf buildroot is a way to go and I think there is macro
> for it
> 
> * Changelog is in an invalid format (or at least not missing a few things)
> 
> Please take a look at the guidelines,
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> and also take a look at Domain Specific guidelines
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> #_domain_specific_guidelines
> 
> I'd also recommend running rpmlint on your spec files and rpm packages
> before submitting
> 
> I wish you good luck and looking forward to your future work!

Hello,
Thank you for your points.
I've manually specified the path because tty-clock would install in /usr/local/bin/ and not /usr/bin/ (the value for ${_bindir}, same for the man pages.
Reading the guidelines seem to forbid installation in /usr/local, so what can I do to make tty-clock install in /usr/bin without modifying the upstream source?
Also I have removed "rm -rf buildroot" from the .spec.

Comment 3 leigh scott 2019-02-10 19:02:03 UTC
The source url is invalid

spectool -g tty-clock.spec 
Getting https://github.com/xorg62/tty-clock/releases/tag/v2.3.tar.gz to ./v2.3.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found



Try using this instead

Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz


I also note the package installs to /usr/local, this is unacceptable.
To fix use.

%install
%make_install PREFIX=%{_prefix}

Comment 4 idf31 2019-02-10 19:03:40 UTC
(In reply to leigh scott from comment #3)
> The source url is invalid
> 
> spectool -g tty-clock.spec 
> Getting https://github.com/xorg62/tty-clock/releases/tag/v2.3.tar.gz to
> ./v2.3.tar.gz
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time 
> Current
>                                  Dload  Upload   Total   Spent    Left  Speed
>   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--    
> 0
> curl: (22) The requested URL returned error: 404 Not Found
> 
> 
> 
> Try using this instead
> 
> Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
> 
> 
> I also note the package installs to /usr/local, this is unacceptable.
> To fix use.
> 
> %install
> %make_install PREFIX=%{_prefix}

I already fixed the broken url link on the local file on my machine.
Thank you for the "%make_install" fix, just what I was looking for!

Comment 5 idf31 2019-02-10 19:39:23 UTC
I updated my .spec file to fix the broken url and the bad paths.

Comment 6 idf31 2019-02-10 19:56:00 UTC
I fixed the wrong license short name and modified the changelog

Comment 7 idf31 2019-02-11 06:34:24 UTC
I fixed a typo in the URL section.

Comment 8 idf31 2019-02-12 19:44:46 UTC
I made Source0 less repetitive by using the url macro.

Comment 9 Elliott Sales de Andrade 2019-02-13 04:18:22 UTC
You should link to raw versions of the files so that tools like fedora-review work.

* Remove lib from summary
* BuildRequires cannot use %{?_isa}
* Requires:ncurses is unnecessary (unless your executable is not linked to ncurses, which would be wrong anyway)
* %changelog doesn't follow the prescribed format

Comment 10 idf31 2019-02-13 09:07:26 UTC
(In reply to Elliott Sales de Andrade from comment #9)
> You should link to raw versions of the files so that tools like
> fedora-review work.
> 
> * Remove lib from summary
> * BuildRequires cannot use %{?_isa}
> * Requires:ncurses is unnecessary (unless your executable is not linked to
> ncurses, which would be wrong anyway)
> * %changelog doesn't follow the prescribed format

Thank you for your review.
I have removed the lib from summary
I have removed %{?_isa} from BuildRequires
I have removed Requires: ncurses
I have modified the changelog according to the prescribed format
The raw .spec is here:
https://gitlab.com/IDF31/tty-clock-spec/raw/master/tty-clock.spec

Comment 11 leigh scott 2019-02-13 09:33:34 UTC
The current srpm fails to build in mock or koji.


$ koji build --scratch f30 tty-clock-2.3-1.fc29.src.rpm
Uploading srpm: tty-clock-2.3-1.fc29.src.rpm
[====================================] 100% 00:00:00  14.34 KiB  38.07 KiB/sec
Created task: 32774225
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=32774225
Watching tasks (this may be safely interrupted)...
32774225 build (f30, tty-clock-2.3-1.fc29.src.rpm): free
32774225 build (f30, tty-clock-2.3-1.fc29.src.rpm): free -> open (buildvm-19.phx2.fedoraproject.org)
  32774231 buildArch (tty-clock-2.3-1.fc29.src.rpm, s390x): free
  32774230 buildArch (tty-clock-2.3-1.fc29.src.rpm, i686): free
  32774232 buildArch (tty-clock-2.3-1.fc29.src.rpm, armv7hl): free
  32774229 buildArch (tty-clock-2.3-1.fc29.src.rpm, aarch64): free
  32774228 buildArch (tty-clock-2.3-1.fc29.src.rpm, ppc64le): free
  32774227 buildArch (tty-clock-2.3-1.fc29.src.rpm, x86_64): free
  32774231 buildArch (tty-clock-2.3-1.fc29.src.rpm, s390x): free -> open (buildvm-s390x-05.s390.fedoraproject.org)
  32774230 buildArch (tty-clock-2.3-1.fc29.src.rpm, i686): free -> open (buildvm-05.phx2.fedoraproject.org)
  32774229 buildArch (tty-clock-2.3-1.fc29.src.rpm, aarch64): free -> open (buildhw-aarch64-06.arm.fedoraproject.org)
  32774228 buildArch (tty-clock-2.3-1.fc29.src.rpm, ppc64le): free -> open (buildvm-ppc64le-17.ppc.fedoraproject.org)
  32774227 buildArch (tty-clock-2.3-1.fc29.src.rpm, x86_64): free -> open (buildvm-04.phx2.fedoraproject.org)
  32774232 buildArch (tty-clock-2.3-1.fc29.src.rpm, armv7hl): free -> open (buildvm-armv7-24.arm.fedoraproject.org)
  32774227 buildArch (tty-clock-2.3-1.fc29.src.rpm, x86_64): open (buildvm-04.phx2.fedoraproject.org) -> FAILED: BuildError: error building package (arch x86_64), mock exited with status 1; see build.log for more information
  0 free  6 open  0 done  1 failed
  32774231 buildArch (tty-clock-2.3-1.fc29.src.rpm, s390x): open (buildvm-s390x-05.s390.fedoraproject.org) -> FAILED: BuildError: error building package (arch s390x), mock exited with status 1; see build.log for more information
  0 free  5 open  0 done  2 failed
  32774230 buildArch (tty-clock-2.3-1.fc29.src.rpm, i686): open (buildvm-05.phx2.fedoraproject.org) -> FAILED: BuildError: error building package (arch i686), mock exited with status 1; see build.log for more information
  0 free  4 open  0 done  3 failed
  32774228 buildArch (tty-clock-2.3-1.fc29.src.rpm, ppc64le): open (buildvm-ppc64le-17.ppc.fedoraproject.org) -> FAILED: BuildError: error building package (arch ppc64le), mock exited with status 1; see build.log for more information
  0 free  3 open  0 done  4 failed
  32774229 buildArch (tty-clock-2.3-1.fc29.src.rpm, aarch64): open (buildhw-aarch64-06.arm.fedoraproject.org) -> FAILED: BuildError: error building package (arch aarch64), mock exited with status 1; see build.log for more information
  0 free  2 open  0 done  5 failed
  32774232 buildArch (tty-clock-2.3-1.fc29.src.rpm, armv7hl): open (buildvm-armv7-24.arm.fedoraproject.org) -> FAILED: BuildError: error building package (arch armv7hl), mock exited with status 1; see build.log for more information
  0 free  1 open  0 done  6 failed
32774225 build (f30, tty-clock-2.3-1.fc29.src.rpm): open (buildvm-19.phx2.fedoraproject.org) -> FAILED: BuildError: error building package (arch x86_64), mock exited with status 1; see build.log for more information
  0 free  0 open  0 done  7 failed

32774225 build (f30, tty-clock-2.3-1.fc29.src.rpm) failed

Comment 12 leigh scott 2019-02-13 09:35:14 UTC
building ttyclock.c
cc -Wall -g $(pkg-config --cflags ncurses) ttyclock.c -o tty-clock $(pkg-config --libs ncurses)
BUILDSTDERR: /bin/sh: cc: command not found
BUILDSTDERR: make: *** [Makefile:26: tty-clock] Error 127
RPM build errors:
BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.tVSsLr (%build)
BUILDSTDERR:     bogus date in %changelog: Mon Feb 12 2019 IDF <idf31> - 0.1-2
BUILDSTDERR:     Bad exit status from /var/tmp/rpm-tmp.tVSsLr (%build)
Child return code was: 1
EXCEPTION: [Error()]

Comment 13 idf31 2019-02-13 09:54:02 UTC
(In reply to leigh scott from comment #11)
> The current srpm fails to build in mock or koji.
> 
> 
> $ koji build --scratch f30 tty-clock-2.3-1.fc29.src.rpm
> Uploading srpm: tty-clock-2.3-1.fc29.src.rpm
> [====================================] 100% 00:00:00  14.34 KiB  38.07
> KiB/sec
> Created task: 32774225
> Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=32774225
> Watching tasks (this may be safely interrupted)...
> 32774225 build (f30, tty-clock-2.3-1.fc29.src.rpm): free
> 32774225 build (f30, tty-clock-2.3-1.fc29.src.rpm): free -> open
> (buildvm-19.phx2.fedoraproject.org)
>   32774231 buildArch (tty-clock-2.3-1.fc29.src.rpm, s390x): free
>   32774230 buildArch (tty-clock-2.3-1.fc29.src.rpm, i686): free
>   32774232 buildArch (tty-clock-2.3-1.fc29.src.rpm, armv7hl): free
>   32774229 buildArch (tty-clock-2.3-1.fc29.src.rpm, aarch64): free
>   32774228 buildArch (tty-clock-2.3-1.fc29.src.rpm, ppc64le): free
>   32774227 buildArch (tty-clock-2.3-1.fc29.src.rpm, x86_64): free
>   32774231 buildArch (tty-clock-2.3-1.fc29.src.rpm, s390x): free -> open
> (buildvm-s390x-05.s390.fedoraproject.org)
>   32774230 buildArch (tty-clock-2.3-1.fc29.src.rpm, i686): free -> open
> (buildvm-05.phx2.fedoraproject.org)
>   32774229 buildArch (tty-clock-2.3-1.fc29.src.rpm, aarch64): free -> open
> (buildhw-aarch64-06.arm.fedoraproject.org)
>   32774228 buildArch (tty-clock-2.3-1.fc29.src.rpm, ppc64le): free -> open
> (buildvm-ppc64le-17.ppc.fedoraproject.org)
>   32774227 buildArch (tty-clock-2.3-1.fc29.src.rpm, x86_64): free -> open
> (buildvm-04.phx2.fedoraproject.org)
>   32774232 buildArch (tty-clock-2.3-1.fc29.src.rpm, armv7hl): free -> open
> (buildvm-armv7-24.arm.fedoraproject.org)
>   32774227 buildArch (tty-clock-2.3-1.fc29.src.rpm, x86_64): open
> (buildvm-04.phx2.fedoraproject.org) -> FAILED: BuildError: error building
> package (arch x86_64), mock exited with status 1; see build.log for more
> information
>   0 free  6 open  0 done  1 failed
>   32774231 buildArch (tty-clock-2.3-1.fc29.src.rpm, s390x): open
> (buildvm-s390x-05.s390.fedoraproject.org) -> FAILED: BuildError: error
> building package (arch s390x), mock exited with status 1; see build.log for
> more information
>   0 free  5 open  0 done  2 failed
>   32774230 buildArch (tty-clock-2.3-1.fc29.src.rpm, i686): open
> (buildvm-05.phx2.fedoraproject.org) -> FAILED: BuildError: error building
> package (arch i686), mock exited with status 1; see build.log for more
> information
>   0 free  4 open  0 done  3 failed
>   32774228 buildArch (tty-clock-2.3-1.fc29.src.rpm, ppc64le): open
> (buildvm-ppc64le-17.ppc.fedoraproject.org) -> FAILED: BuildError: error
> building package (arch ppc64le), mock exited with status 1; see build.log
> for more information
>   0 free  3 open  0 done  4 failed
>   32774229 buildArch (tty-clock-2.3-1.fc29.src.rpm, aarch64): open
> (buildhw-aarch64-06.arm.fedoraproject.org) -> FAILED: BuildError: error
> building package (arch aarch64), mock exited with status 1; see build.log
> for more information
>   0 free  2 open  0 done  5 failed
>   32774232 buildArch (tty-clock-2.3-1.fc29.src.rpm, armv7hl): open
> (buildvm-armv7-24.arm.fedoraproject.org) -> FAILED: BuildError: error
> building package (arch armv7hl), mock exited with status 1; see build.log
> for more information
>   0 free  1 open  0 done  6 failed
> 32774225 build (f30, tty-clock-2.3-1.fc29.src.rpm): open
> (buildvm-19.phx2.fedoraproject.org) -> FAILED: BuildError: error building
> package (arch x86_64), mock exited with status 1; see build.log for more
> information
>   0 free  0 open  0 done  7 failed
> 
> 32774225 build (f30, tty-clock-2.3-1.fc29.src.rpm) failed

(In reply to leigh scott from comment #12)
> building ttyclock.c
> cc -Wall -g $(pkg-config --cflags ncurses) ttyclock.c -o tty-clock
> $(pkg-config --libs ncurses)
> BUILDSTDERR: /bin/sh: cc: command not found
> BUILDSTDERR: make: *** [Makefile:26: tty-clock] Error 127
> RPM build errors:
> BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.tVSsLr (%build)
> BUILDSTDERR:     bogus date in %changelog: Mon Feb 12 2019 IDF
> <idf31> - 0.1-2
> BUILDSTDERR:     Bad exit status from /var/tmp/rpm-tmp.tVSsLr (%build)
> Child return code was: 1
> EXCEPTION: [Error()]

Sorry for this, I think it was caused by a typo in the changelog.
It should work now.

Comment 14 leigh scott 2019-02-13 10:01:34 UTC
> (In reply to leigh scott from comment #12)
> > building ttyclock.c
> > cc -Wall -g $(pkg-config --cflags ncurses) ttyclock.c -o tty-clock
> > $(pkg-config --libs ncurses)
> > BUILDSTDERR: /bin/sh: cc: command not found
> > BUILDSTDERR: make: *** [Makefile:26: tty-clock] Error 127
> > RPM build errors:
> > BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.tVSsLr (%build)
> > BUILDSTDERR:     bogus date in %changelog: Mon Feb 12 2019 IDF
> > <idf31> - 0.1-2
> > BUILDSTDERR:     Bad exit status from /var/tmp/rpm-tmp.tVSsLr (%build)
> > Child return code was: 1
> > EXCEPTION: [Error()]
> 
> Sorry for this, I think it was caused by a typo in the changelog.
> It should work now.


Look at the error above again

BUILDSTDERR: /bin/sh: cc: command not found


So it's looking for cc

$ rpm -qf $(which cc)
gcc-8.2.1-6.fc29.x86_64

Comment 15 idf31 2019-02-13 10:23:52 UTC
(In reply to leigh scott from comment #14)
> > (In reply to leigh scott from comment #12)
> > > building ttyclock.c
> > > cc -Wall -g $(pkg-config --cflags ncurses) ttyclock.c -o tty-clock
> > > $(pkg-config --libs ncurses)
> > > BUILDSTDERR: /bin/sh: cc: command not found
> > > BUILDSTDERR: make: *** [Makefile:26: tty-clock] Error 127
> > > RPM build errors:
> > > BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.tVSsLr (%build)
> > > BUILDSTDERR:     bogus date in %changelog: Mon Feb 12 2019 IDF
> > > <idf31> - 0.1-2
> > > BUILDSTDERR:     Bad exit status from /var/tmp/rpm-tmp.tVSsLr (%build)
> > > Child return code was: 1
> > > EXCEPTION: [Error()]
> > 
> > Sorry for this, I think it was caused by a typo in the changelog.
> > It should work now.
> 
> 
> Look at the error above again
> 
> BUILDSTDERR: /bin/sh: cc: command not found
> 
> 
> So it's looking for cc
> 
> $ rpm -qf $(which cc)
> gcc-8.2.1-6.fc29.x86_64

So if I set CC=gcc it would work?

Comment 16 leigh scott 2019-02-13 10:30:39 UTC
(In reply to idf31 from comment #15)
> (In reply to leigh scott from comment #14)
> > > (In reply to leigh scott from comment #12)
> > > > building ttyclock.c
> > > > cc -Wall -g $(pkg-config --cflags ncurses) ttyclock.c -o tty-clock
> > > > $(pkg-config --libs ncurses)
> > > > BUILDSTDERR: /bin/sh: cc: command not found
> > > > BUILDSTDERR: make: *** [Makefile:26: tty-clock] Error 127
> > > > RPM build errors:
> > > > BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.tVSsLr (%build)
> > > > BUILDSTDERR:     bogus date in %changelog: Mon Feb 12 2019 IDF
> > > > <idf31> - 0.1-2
> > > > BUILDSTDERR:     Bad exit status from /var/tmp/rpm-tmp.tVSsLr (%build)
> > > > Child return code was: 1
> > > > EXCEPTION: [Error()]
> > > 
> > > Sorry for this, I think it was caused by a typo in the changelog.
> > > It should work now.
> > 
> > 
> > Look at the error above again
> > 
> > BUILDSTDERR: /bin/sh: cc: command not found
> > 
> > 
> > So it's looking for cc
> > 
> > $ rpm -qf $(which cc)
> > gcc-8.2.1-6.fc29.x86_64
> 
> So if I set CC=gcc it would work?

No, cc isn't included in the buildroot default packages.
Add

BuildRequires: gcc

Comment 17 idf31 2019-02-13 17:52:47 UTC
(In reply to leigh scott from comment #16)
> (In reply to idf31 from comment #15)
> > (In reply to leigh scott from comment #14)
> > > > (In reply to leigh scott from comment #12)
> > > > > building ttyclock.c
> > > > > cc -Wall -g $(pkg-config --cflags ncurses) ttyclock.c -o tty-clock
> > > > > $(pkg-config --libs ncurses)
> > > > > BUILDSTDERR: /bin/sh: cc: command not found
> > > > > BUILDSTDERR: make: *** [Makefile:26: tty-clock] Error 127
> > > > > RPM build errors:
> > > > > BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.tVSsLr (%build)
> > > > > BUILDSTDERR:     bogus date in %changelog: Mon Feb 12 2019 IDF
> > > > > <idf31> - 0.1-2
> > > > > BUILDSTDERR:     Bad exit status from /var/tmp/rpm-tmp.tVSsLr (%build)
> > > > > Child return code was: 1
> > > > > EXCEPTION: [Error()]
> > > > 
> > > > Sorry for this, I think it was caused by a typo in the changelog.
> > > > It should work now.
> > > 
> > > 
> > > Look at the error above again
> > > 
> > > BUILDSTDERR: /bin/sh: cc: command not found
> > > 
> > > 
> > > So it's looking for cc
> > > 
> > > $ rpm -qf $(which cc)
> > > gcc-8.2.1-6.fc29.x86_64
> > 
> > So if I set CC=gcc it would work?
> 
> No, cc isn't included in the buildroot default packages.
> Add
> 
> BuildRequires: gcc

Ok I have added gcc to BuildRequires

Comment 18 Vít Ondruch 2019-02-14 06:17:41 UTC
You should probably try Mock to build your package:

https://github.com/rpm-software-management/mock/wiki

This would help to catch the dependency issues early.

Comment 19 idf31 2019-02-14 06:56:03 UTC
(In reply to Vít Ondruch from comment #18)
> You should probably try Mock to build your package:
> 
> https://github.com/rpm-software-management/mock/wiki
> 
> This would help to catch the dependency issues early.

I've tested my srpm with mock now and it works.
Thanks!

Comment 20 leigh scott 2019-02-14 07:14:17 UTC
Now you need to make it use the default fedora compiler flags, currently it has none


+ /usr/bin/make -O -j8 CC=gcc
building ttyclock.c
gcc -Wall -g $(pkg-config --cflags ncurses) ttyclock.c -o tty-clock $(pkg-config --libs ncurses)
+ exit 0


https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_flags



also your changelog is wrong still, each new build requires that you bump the release tag


Release:        3%{?dist}

As for the changelog version, it needs to match package version


Version:        2.3



* Wed Feb 13 2019 Dragos Iorga <idf31> - 2.3-4
- Fixed bogus date
- Added gcc to BuildRequire

* Tue Feb 12 2019 Dragos Iorga <idf31> - 2.3-3
- Made Source0 less repetitive

* Mon Feb 11 2019 Dragos Iorga <idf31> - 2.3-2
- Fixed typo

* Sun Feb 10 2019 Dragos Iorga <idf31> - 2.3-1
- Initial Commit
- Fixed broken URL
- Fixed bad paths
- Fixed wrong license name


I also recommend the you use my suggested source tag as it produces a correctly named tarball

Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz


then you can remove -n tty-clock-%{version} from %prep %autosetup

Comment 21 idf31 2019-02-14 07:49:42 UTC
(In reply to leigh scott from comment #20)
> Now you need to make it use the default fedora compiler flags, currently it
> has none
> 
> 
> + /usr/bin/make -O -j8 CC=gcc
> building ttyclock.c
> gcc -Wall -g $(pkg-config --cflags ncurses) ttyclock.c -o tty-clock
> $(pkg-config --libs ncurses)
> + exit 0
> 
> 
> https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_flags
> 
> 
> 
> also your changelog is wrong still, each new build requires that you bump
> the release tag
> 
> 
> Release:        3%{?dist}
> 
> As for the changelog version, it needs to match package version
> 
> 
> Version:        2.3
> 
> 
> 
> * Wed Feb 13 2019 Dragos Iorga <idf31> - 2.3-4
> - Fixed bogus date
> - Added gcc to BuildRequire
> 
> * Tue Feb 12 2019 Dragos Iorga <idf31> - 2.3-3
> - Made Source0 less repetitive
> 
> * Mon Feb 11 2019 Dragos Iorga <idf31> - 2.3-2
> - Fixed typo
> 
> * Sun Feb 10 2019 Dragos Iorga <idf31> - 2.3-1
> - Initial Commit
> - Fixed broken URL
> - Fixed bad paths
> - Fixed wrong license name
> 
> 
> I also recommend the you use my suggested source tag as it produces a
> correctly named tarball
> 
> Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
> 
> 
> then you can remove -n tty-clock-%{version} from %prep %autosetup


I've corrected my changelog and Source0 and I also added the %optflags

Comment 22 Robert-André Mauchin 🐧 2019-02-17 18:42:05 UTC
 - You must install the LICENSE file with %license in %files

%license LICENSE

 - Use %set_build_flags to set Fedora build flags:

%build
%set_build_flags
%make_build

 - Separate your changelog entries by a new line for readability

Comment 23 Michael Schwendt 2019-03-04 11:43:27 UTC
If no license file is included in the source package, there is no requirement for the packager to add one:
https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_license_text


> %{_mandir}/man1/tty-clock.1.*

The only reason to use '*' as to match more than the single installed manual page is to be prepared for the automatic compression of manual pages to get changed or disabled. Currently, it's ".gz", but that may change also due to local customizations. With compression turned off, the package build would fail. Hence it would be more safer to write:

%{_mandir}/man1/tty-clock.1*

Comment 24 idf31 2019-03-16 09:27:05 UTC
Sorry for my absence, I've been busy with school.

(In reply to Michael Schwendt from comment #23)
> If no license file is included in the source package, there is no
> requirement for the packager to add one:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> LicensingGuidelines/#_license_text
> 
> 
> > %{_mandir}/man1/tty-clock.1.*
> 
> The only reason to use '*' as to match more than the single installed manual
> page is to be prepared for the automatic compression of manual pages to get
> changed or disabled. Currently, it's ".gz", but that may change also due to
> local customizations. With compression turned off, the package build would
> fail. Hence it would be more safer to write:
> 
> %{_mandir}/man1/tty-clock.1*

(In reply to Robert-André Mauchin from comment #22)
>  - You must install the LICENSE file with %license in %files
> 
> %license LICENSE
> 
>  - Use %set_build_flags to set Fedora build flags:
> 
> %build
> %set_build_flags
> %make_build
> 
>  - Separate your changelog entries by a new line for readability

I've modified >%{_mandir}/man1/tty-clock.1.* to >%{_mandir}/man1/tty-clock.1* and added >%set_build_flags
Regarding the LICENSE file, the upstream doesn't have a license file in it's release source.

Comment 25 Robert-André Mauchin 🐧 2019-03-18 22:49:28 UTC
Package is upproved.


You still need to find a sponsor:
https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group


Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "BSD 3-clause "New" or "Revised"
     License". 3 files have unknown license. Detailed output of
     licensecheck in /home/bob/packaging/review/tty-clock/review-tty-
     clock/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: No rpmlint messages.
[x]: Package requires other packages for directories it uses.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in tty-
     clock
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: tty-clock-2.3-6.fc31.x86_64.rpm
          tty-clock-debuginfo-2.3-6.fc31.x86_64.rpm
          tty-clock-debugsource-2.3-6.fc31.x86_64.rpm
          tty-clock-2.3-6.fc31.src.rpm
4 packages and 0 specfiles checked; 0 errors, 0 warnings.

Comment 26 Mattia Verga 2021-07-04 15:09:14 UTC
Review stalled


Note You need to log in before you can comment on or make changes to this bug.