Bug 258736 - [NEW PORT] sysutils/cpufetch: Simple yet fancy CPU architecture fetching tool
Summary: [NEW PORT] sysutils/cpufetch: Simple yet fancy CPU architecture fetching tool
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Mikael Urankar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-26 17:31 UTC by Joel Bodenmann
Modified: 2021-10-05 10:46 UTC (History)
3 users (show)

See Also:


Attachments
Patch (2.08 KB, patch)
2021-09-26 17:31 UTC, Joel Bodenmann
no flags Details | Diff
Poudriere testport log (13.28 KB, text/plain)
2021-09-26 17:32 UTC, Joel Bodenmann
no flags Details
Patch (2.07 KB, patch)
2021-09-26 18:42 UTC, Joel Bodenmann
no flags Details | Diff
Patch (2.05 KB, patch)
2021-09-26 18:51 UTC, Joel Bodenmann
no flags Details | Diff
Path (1.89 KB, patch)
2021-09-27 12:44 UTC, Joel Bodenmann
no flags Details | Diff
Patch (1.89 KB, patch)
2021-09-27 12:44 UTC, Joel Bodenmann
no flags Details | Diff
Patch (2.00 KB, patch)
2021-09-27 16:55 UTC, Joel Bodenmann
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Bodenmann 2021-09-26 17:31:30 UTC
Created attachment 228197 [details]
Patch

This patch adds a new port sysutils/cpufetch which is a simple CPU architecture fetching tool.
Comment 1 Joel Bodenmann 2021-09-26 17:32:11 UTC
Created attachment 228198 [details]
Poudriere testport log
Comment 2 Daniel Engberg freebsd_committer 2021-09-26 18:03:35 UTC
Hi,

L1 is obsolete (remove)

Please read the Porter's Handbook about ports that uses USE_GITHUB
https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-master_sites-github-description (especially "Example 17. Use of USE_GITHUB with DISTVERSIONPREFIX")

L7 and L15 conflicts (don't invent your own release numbering)

Use portlint to fix ordering within the Makefile
https://docs.freebsd.org/en/books/porters-handbook/quick-porting/#porting-portlint

Is gmake a hard requirement? USES should also be USES= not += unless you set options several times within the Makefile

There's another utility already available that seems to do pretty much the same thing? Is this any different except for the text art? sysutils/cpu-x

Thanks for your contribution!
Comment 3 Joel Bodenmann 2021-09-26 18:42:37 UTC
Created attachment 228202 [details]
Patch
Comment 4 Joel Bodenmann 2021-09-26 18:44:46 UTC
Thank you for your comments. I've updated the patch accordingly.

Yes, gmake is a hard requirement. Upstream's Makefile expects gmake.

I agree that there is already a similar utility available. There are a couple of ports I want to contribute in the very near feature and this served as a first step. I intentionally picked a port that is easy to create with minimum hassles regarding dependencies to get familiar with the environment, tools & workflow.
Comment 5 Joel Bodenmann 2021-09-26 18:51:26 UTC
Created attachment 228203 [details]
Patch
Comment 6 Daniel Engberg freebsd_committer 2021-09-26 19:34:58 UTC
Fair enough =)
What I forgot to mention is that you can also specify PLIST_FILES within the Makefile instead of using pkg-plist although I would recommend against that approach unless there are really few files.

https://docs.freebsd.org/en/books/porters-handbook/book/ --> 3.2.2. pkg-plist

This will probably land some time next week but if you can feel free to convert pkg-plist to PLIST_FILES meanwhile.

Best regards,
Daniel
Comment 7 Joel Bodenmann 2021-09-27 12:44:00 UTC
Created attachment 228211 [details]
Path
Comment 8 Joel Bodenmann 2021-09-27 12:44:26 UTC
Created attachment 228212 [details]
Patch
Comment 9 Joel Bodenmann 2021-09-27 12:46:01 UTC
I've updated the patch to use PLIST_FILES.
Comment 10 Mikael Urankar freebsd_committer 2021-09-27 15:47:27 UTC
Can you add a ONLY_FOR_ARCHS_REASON please? I suppose it doesn't work on arm or ppc? why?
Comment 11 Joel Bodenmann 2021-09-27 15:53:44 UTC
Alright, I'll do that!

The reason is that upstream doesn't support PPC.
Is there a convention for the reason? I.e. "upstream doesn't support" or something like that?
Comment 12 Mikael Urankar freebsd_committer 2021-09-27 16:14:04 UTC
(In reply to Joel Bodenmann from comment #11)
Yes you can add that 'upstream only support x86' or 'uses x86 asm' (I haven't looked at the code tbh)
Comment 13 Joel Bodenmann 2021-09-27 16:55:36 UTC
Created attachment 228217 [details]
Patch
Comment 14 Joel Bodenmann 2021-09-30 14:06:53 UTC
As I am new to this I'm not sure whether you have received a notification when I uploaded the modified patch: I've added a ONLY_FOR_ARCHS_REASON as requested.
Comment 15 Mikael Urankar freebsd_committer 2021-09-30 18:23:55 UTC
(In reply to Joel Bodenmann from comment #14)
Yes I received a notification.
Just to be picky, only_for_archs_reason is wrong, upstream supports also arm and powerpc, it's just that it's not ported to FreeBSD yet.
No need to provide another patch, the committer can modify this information.
Comment 16 commit-hook freebsd_committer 2021-10-01 12:52:00 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6ab6d5d5164263fd838b41c7adc361eafe4d7379

commit 6ab6d5d5164263fd838b41c7adc361eafe4d7379
Author:     Joel Bodenmann <joel@insane.engineer>
AuthorDate: 2021-10-01 12:49:00 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2021-10-01 12:51:04 +0000

    sysutils/cpufetch: Add new port.

    Simple yet fancy CPU architecture fetching tool.

    cpufetch is a command-line tool written in C that displays the CPU information
    in a clean and beautiful way.

    WWW: https://github.com/Dr-Noob/cpufetch

    PR:             258736

 sysutils/Makefile                 |  1 +
 sysutils/cpufetch/Makefile (new)  | 29 +++++++++++++++++++++++++++++
 sysutils/cpufetch/distinfo (new)  |  3 +++
 sysutils/cpufetch/pkg-descr (new) |  6 ++++++
 4 files changed, 39 insertions(+)
Comment 17 Daniel Engberg freebsd_committer 2021-10-01 18:46:01 UTC
GH_PROJECT isn't needed :-)
5.4.3 in Porters Handbook
Comment 18 commit-hook freebsd_committer 2021-10-05 10:46:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=45d06e32d851f9fdcfd4068aa843ba1616de48b8

commit 45d06e32d851f9fdcfd4068aa843ba1616de48b8
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2021-10-04 17:30:42 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2021-10-05 10:46:33 +0000

    sysutils/cpufetch: remove unneeded GH_PROJECT

    PR:             258736
    Reported by:    diizzy

 sysutils/cpufetch/Makefile | 1 -
 1 file changed, 1 deletion(-)