Bug 228306 - [NEW PORT] games/genact: Nonsense activity generator
Summary: [NEW PORT] games/genact: Nonsense activity generator
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kirill Ponomarev
URL: https://github.com/svenstaro/genact
Keywords: easy, feature, patch-ready
Depends on:
Blocks:
 
Reported: 2018-05-16 22:15 UTC by Mateusz Piotrowski
Modified: 2018-05-18 06:21 UTC (History)
2 users (show)

See Also:


Attachments
Patch adding a new games/genact port (0.4.0) (16.77 KB, patch)
2018-05-16 22:15 UTC, Mateusz Piotrowski
no flags Details | Diff
Patch adding a new games/genact port (0.4.0, revision: 1) (16.80 KB, patch)
2018-05-17 12:39 UTC, Mateusz Piotrowski
no flags Details | Diff
Patch adding a new games/genact port (0.4.0, revision: 2) (16.86 KB, patch)
2018-05-17 15:01 UTC, Mateusz Piotrowski
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Piotrowski freebsd_committer freebsd_triage 2018-05-16 22:15:52 UTC
Created attachment 193470 [details]
Patch adding a new games/genact port (0.4.0)

From pkg-descr:

genact is a nonsense terminal activity generator.

It is described in the following way by its authors:

> Pretend to be busy or waiting for your computer when you should actually be
> doing real work! Impress people with your insane multitasking skills. Just
> open a few instances of genact and watch the show. genact has multiple scenes
> that pretend to be doing something exciting or useful when in reality nothing
> is happening at all.

-----

Porting details:

 - I am not sure if I should set LICENSE to the license of genact only or all the crates it depends on.
 - I had to patch one crate similarly to how it is done at the moment in textproc/bat. The patch is likely to go away with the new release of Rust libc (0.2.41).

-----

QA:
 - manual installation and testing on 12.0-CURRENT r333659 amd64
 - portlint -AC
Comment 1 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-05-17 12:31:59 UTC
I realized that the install-strip target does not work. I'll submit a fix using STRIP_CMD instead in a moment.
Comment 2 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-05-17 12:39:32 UTC
Created attachment 193480 [details]
Patch adding a new games/genact port (0.4.0, revision: 1)

Now the binary is stripped correctly.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2018-05-17 14:10:04 UTC
Comment on attachment 193480 [details]
Patch adding a new games/genact port (0.4.0, revision: 1)

Looks OK i.e., "Reviewed by:	jbeich"

> +		libc-0.2.36 \

libc < 0.2.38 may not be a good idea to use on 12.0-CURRENT. However, the port appears to work fine as is. See also ports r468993.

https://github.com/rust-lang/libc/commit/969ad2b73cdc
https://github.com/rust-lang/libc/commit/78f93220d70e

(In reply to Mateusz Piotrowski from comment #0)
> - I am not sure if I should set LICENSE to the license of genact
>   only or all the crates it depends on.

Defining LICENSE for bundled libs is a good idea but if they change often it may complicate maintenance. In this case, all crates appear to have one style[1] of MIT license. bindgen has 3-clause BSD and its dependency libloading has different style[1] of MIT but given their code doesn't end up in genact binary FreeBSD package can probably omit their licenses.

[1] https://fedoraproject.org/wiki/Licensing:MIT
Comment 4 Jan Beich freebsd_committer freebsd_triage 2018-05-17 14:21:04 UTC
(In reply to Jan Beich from comment #3)
> libloading has different style[1] of MIT

Sorry, I keep confusing ISC with MIT.

$ rg --no-line-number --no-filename -t toml license | sort -u
license     = "MIT"
license = "Apache-2.0"        <-- clang-sys, used by bindgen
license = "Apache-2.0/MIT"
license = "BSD-3-Clause"      <-- bindgen, used by emscripten-sys
license = "ISC"               <-- libloading, used by clang-sys
license = "MIT / Apache-2.0"
license = "MIT"
license = "MIT/Apache-2.0"
license = "Unlicense/MIT"
Comment 5 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-05-17 15:01:09 UTC
Created attachment 193484 [details]
Patch adding a new games/genact port (0.4.0, revision: 2)

(In reply to Jan Beich from comment #4)

Thanks for the review and notes about libc. I'll keep that in mind in my future Rust ports.

There's also `make cargo-crates-licenses | awk '{$1=""; print $0}' | sort --unique` which yields:

 Apache-2.0"
 Apache-2.0/MIT
 BSD-3-Clause
 ISC
 MIT
 MIT / Apache-2.0
 MIT/Apache-2.0
 Unlicense/MIT

I updated the Makefile accordingly.
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-05-18 06:12:48 UTC
A commit references this bug:

Author: krion
Date: Fri May 18 06:11:50 UTC 2018
New revision: 470270
URL: https://svnweb.freebsd.org/changeset/ports/470270

Log:
  Add games/genact:

  genact is a nonsense terminal activity generator.

  > Pretend to be busy or waiting for your computer when you should actually be
  > doing real work! Impress people with your insane multitasking skills. Just
  > open a few instances of genact and watch the show. genact has multiple scenes
  > that pretend to be doing something exciting or useful when in reality nothing
  > is happening at all.

  genact can load modules, which produce different activity. Currently, it
  comes with the following set of modules: bootlog, cargo, cc, composer,
  cryptomining, simcity, download, memdump, kernel_compile, weblog.

  WWW: https://github.com/svenstaro/genact

  PR:		228306
  Submitted by:	0mp
  Inspired by:	jbeich

Changes:
  head/games/Makefile
  head/games/genact/
  head/games/genact/Makefile
  head/games/genact/distinfo
  head/games/genact/files/
  head/games/genact/files/patch-cargo-crates_pbr-1.0.0_src_tty_unix.rs
  head/games/genact/pkg-descr