From nobody Thu Jun 16 05:42:53 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4332283DF7E; Thu, 16 Jun 2022 05:42:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LNrg11PVCz4jq3; Thu, 16 Jun 2022 05:42:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655358173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ikB02y4yph832jQUlaiaoLiYpNFh2LdJ58nXSxlPS84=; b=Vj+Iq0qEIbXEdKirn2lE3UJn/zJhK+oMVJFPEfBoNiOKZ2UzfLH+mT393rNvElTl20GXsH sId0blicOgnjiUqobKHAmfWdMf1m+Rj3Zzi70R5IpPinK00jDxcrPmaq6jG7f1ltuC++3b 23pcOOObYkb+SWNQXO31PS3giyweJ+bH+kiGbw1kNRHgUn7VJW5FMaBU9Y1tBq85Bp8QmK nu8p+IMITKsvaZobG9OKKO2lKJ/IaZY0AYFn4E5lNpW+2QjgYU65fmf+aPbb4TFFhD0ZMX fpjRPj3fA5IFR7h0XDeaWVmTasEWoibqXgiiDVt/MVzekalwgLmDECoGD8P3Jw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 100AA2D74B; Thu, 16 Jun 2022 05:42:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25G5grUf033193; Thu, 16 Jun 2022 05:42:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25G5grFc033192; Thu, 16 Jun 2022 05:42:53 GMT (envelope-from git) Date: Thu, 16 Jun 2022 05:42:53 GMT Message-Id: <202206160542.25G5grFc033192@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: =?utf-8?Q?Fernando=20Apestegu=C3=ADa?= Subject: git: 181d184e503a - main - misc/grc: Update to 1.13 and added some FreeBSD command colorization List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 181d184e503a58e0fa8180d83b22ab1df62a7721 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655358173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ikB02y4yph832jQUlaiaoLiYpNFh2LdJ58nXSxlPS84=; b=KQMe4n7kaho6sWV89usPbMEZ26btdQz9Rkze5z+Uxr0E79JKdw2vCj44usK0/VtXMAguWs liQwi5/cfuztpH34WnT+CeqDHnpaX6z6FOXbVY3/sg4w8U3N/rU2X2Uh/LMb67zJcDIcsv tjsfneRhJIlHg5g/vbksgHSFM/j8wXgnWbFl4aT/PovFfwo9iyKqFGtwGv+m9z/7MzSQLs iJOAs2Ko1Ab4FOBwB0lAJx+mUtPCM6e2aGtL/1gE8h2n2eUmubZwl88VofLn8yNwAQAtpN mTnnU2LQz0e6cQL0oRlVFDcDSAacmcZKnpGDz2J3W/FHUJMmXWLjUaQ/4oxP8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655358173; a=rsa-sha256; cv=none; b=QUWILRtQgQRb7THqXpfeV9inyv52XKkV9teToxBgdBm/cLKa8lHD6VbBpjuH/NCpe7stZ1 WYc2gJoE0SD3z+nUmy+Z5V7Sh7tEXuHIwu3MUu+MWIW8dK6agYd749TBiseZb5lH+Ch3l+ zauXF9f8KNsIgx+hm4TeIamJgZcl379F/DfzHzifiagMBmGxuPsw5nAS3Diiix/6+WaBDL 3Too1+8eVTCXl9nv5VyVBMIDX7bEHdvi1EwX3t4Aqwxzfg7/HtQoQL1NIyopHDWI81rIwv 1MNSwqTvbg6HIS/Xq0r4mZxtAGSTCSs9IZZvuSGpUIRJUxGNnotjP0wR4dEj5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/ports/commit/?id=181d184e503a58e0fa8180d83b22ab1df62a7721 commit 181d184e503a58e0fa8180d83b22ab1df62a7721 Author: Fernando ApesteguĂ­a AuthorDate: 2022-06-02 16:10:24 +0000 Commit: Fernando ApesteguĂ­a CommitDate: 2022-06-16 05:40:05 +0000 misc/grc: Update to 1.13 and added some FreeBSD command colorization ChangeLog: https://github.com/garabik/grc/ * do not automatically create command aliases, unless explicitly specified (for bash) * several minor improvements PR: 264401 Reported by: sec.research.2005@gmail.com Approved by: walter@lifeforms.nl (maintainer, timeout > 2 weeks) --- misc/grc/Makefile | 11 +-- misc/grc/distinfo | 6 +- misc/grc/files/colourfiles/conf.drill | 31 ++++++++ misc/grc/files/colourfiles/conf.geli | 40 +++++++++++ misc/grc/files/colourfiles/conf.geom | 56 +++++++++++++++ misc/grc/files/colourfiles/conf.gpart | 56 +++++++++++++++ misc/grc/files/colourfiles/conf.pciconf | 21 ++++++ misc/grc/files/colourfiles/conf.pfctl | 99 +++++++++++++++++++++++++ misc/grc/files/colourfiles/conf.pkg_search | 3 + misc/grc/files/colourfiles/conf.sockstat | 112 +++++++++++++++++++++++++++++ misc/grc/files/colourfiles/conf.top | 93 ++++++++++++++++++++++++ misc/grc/files/colourfiles/conf.usbconfig | 22 ++++++ misc/grc/files/colourfiles/conf.vnstat | 23 ++++++ misc/grc/files/colourfiles/conf.zfs | 55 ++++++++++++++ misc/grc/files/colourfiles/conf.zpool | 55 ++++++++++++++ misc/grc/files/patch-grc.conf | 46 ++++++++++++ misc/grc/pkg-plist | 26 ++++++- 17 files changed, 746 insertions(+), 9 deletions(-) diff --git a/misc/grc/Makefile b/misc/grc/Makefile index ba1334294d03..e77df2b48ee0 100644 --- a/misc/grc/Makefile +++ b/misc/grc/Makefile @@ -1,7 +1,7 @@ # Created by: Ying-Chieh Liao PORTNAME= grc -PORTVERSION= 1.11.1 +PORTVERSION= 1.13 DISTVERSIONPREFIX= v CATEGORIES= misc @@ -11,14 +11,14 @@ COMMENT= Generic Colouriser LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING +USES= python:run shebangfix +SHEBANG_FILES= grc grcat + USE_GITHUB= yes GH_ACCOUNT= garabik -NO_BUILD= yes - NO_ARCH= yes -USES= python:run shebangfix -SHEBANG_FILES= grc grcat +NO_BUILD= yes post-patch: .for i in grc grcat @@ -32,6 +32,7 @@ post-patch: s|/usr/local/share/grc|${DATADIR}|g ; \ s|, /usr/share/grc/||g' ${WRKSRC}/${i}.1 .endfor + (cd ${FILESDIR} && ${CP} colourfiles/conf.* ${WRKSRC}/colourfiles) do-install: .for i in grc grcat diff --git a/misc/grc/distinfo b/misc/grc/distinfo index 6c475185c99a..b4f821e6d0d0 100644 --- a/misc/grc/distinfo +++ b/misc/grc/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1495893307 -SHA256 (garabik-grc-v1.11.1_GH0.tar.gz) = 9ae4bcc9186d6856e861d5b0e29b7b14db3f14e6b643e2df0076c104a94dbcba -SIZE (garabik-grc-v1.11.1_GH0.tar.gz) = 43289 +TIMESTAMP = 1654119308 +SHA256 (garabik-grc-v1.13_GH0.tar.gz) = a7b10d4316b59ca50f6b749f1d080cea0b41cb3b7258099c3eb195659d1f144f +SIZE (garabik-grc-v1.13_GH0.tar.gz) = 49224 diff --git a/misc/grc/files/colourfiles/conf.drill b/misc/grc/files/colourfiles/conf.drill new file mode 100644 index 000000000000..2f682c6b9ef1 --- /dev/null +++ b/misc/grc/files/colourfiles/conf.drill @@ -0,0 +1,31 @@ +#ipv6 +regexp=(([0-9a-fA-F]{1,4})?\:\:?[0-9a-fA-F]{1,4})+ +colours=green +======= +#time +regexp=\s[0-9]{1,6}\s +colours=red +======= +#type +regexp=[A-Z]{1,4} +colours=cyan +======= +#in +regexp=(IN|CH) +colours=yellow +======= +#domain +regexp=[a-z0-9-]+\. +colours=magenta +======= +#ip address +regexp=\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} +colours=green +======= +#comments +regexp=^;;\s\w*\s*\w* +colours=yellow +======= +#Title +regexp=; <<>> DiG (\d+\.\d+\.\d+).*<<>>\s(\S+)$ +colours=default,green,bold magenta diff --git a/misc/grc/files/colourfiles/conf.geli b/misc/grc/files/colourfiles/conf.geli new file mode 100644 index 000000000000..0c788fcbce66 --- /dev/null +++ b/misc/grc/files/colourfiles/conf.geli @@ -0,0 +1,40 @@ +# Disk and Partition +regexp=((?:nvd|ada|da)\d+)(p\d+)?(.eli)? +colors=default,bright_cyan,bright_yellow,"\033[38;5;242m" +====== +# ACTIVE +regexp=(ACTIVE) +colors=default,bright_green +====== +# Disk and Partition +regexp=(\w+\d+)(p\d+)$ +colors=default,bright_cyan,bright_yellow +====== +# Header +regexp=(\w+): +colors=default,"\033[38;5;242m" +====== +# Header +regexp=(Name|Status|Components|State|EncryptionAlgorithm|KeyLength|Crypto|Flags|Mediasize) +colors=default,bright_white +====== +# Providers | Consumers +regexp=(Geom name): +colors=default,bright_blue +====== +# Providers | Consumers +regexp=(Providers|Consumers): +colors=default,bright_magenta +====== +# Size +regexp=\((\d+(?:\.\d+)?G)\) +colors=default,"\033[38;5;214m" +====== +# Size +regexp=\((\d+(?:\.\d+)?M)\) +colors=default,"\033[38;5;221m" +====== +# Size +regexp=\((\d+(?:\.\d+)?K)\) +colors=default,"\033[38;5;223m" +====== diff --git a/misc/grc/files/colourfiles/conf.geom b/misc/grc/files/colourfiles/conf.geom new file mode 100644 index 000000000000..c1f91d3ff612 --- /dev/null +++ b/misc/grc/files/colourfiles/conf.geom @@ -0,0 +1,56 @@ +# Disk and Partition +regexp=((?:nvd|ada|da)\d+)(p\d+)?(.eli)? +colors=default,bright_cyan,bright_yellow,"\033[38;5;242m" +====== +# ACTIVE +regexp=(ACTIVE|OK) +colors=unchanged,bright_green +====== +# CORRUPT +regexp=(CORRUPT) +colors=unchanged,"\033[41m" +====== +# Disk and Partition +regexp=(\w+\d+)(p\d+)$ +colors=default,bright_cyan,bright_yellow +====== +# Header +regexp=(\w+): +colors=default,"\033[38;5;242m" +====== +# Header +regexp=(Name|Status|Components|State|EncryptionAlgorithm|KeyLength|Crypto|Flags|Mediasize|label|type) +colors=default,bright_white +====== +# Providers | Consumers +regexp=(Geom name): +colors=default,bright_blue +====== +# Providers | Consumers +regexp=(Providers|Consumers): +colors=default,bright_magenta +====== +# Size +regexp=\((\d+(?:\.\d+)?G)\) +colors=default,"\033[38;5;214m" +====== +# Size +regexp=\((\d+(?:\.\d+)?M)\) +colors=default,"\033[38;5;221m" +====== +# Size +regexp=\((\d+(?:\.\d+)?K)\) +colors=default,"\033[38;5;223m" +====== +regexp=(GPT|gpt) +colors=default,bright_green +====== +regexp=(efi) +colors=default,bright_blue +====== +regexp=(freebsd)-(?:(boot)|(swap)|(zfs)|(ufs)) +colors=default,bright_cyan,bright_white,"\033[38;5;62m",bright_magenta,bright_green +====== +regexp=(linux)-(?:(data|swap)) +colors=default,yellow,green,red +====== diff --git a/misc/grc/files/colourfiles/conf.gpart b/misc/grc/files/colourfiles/conf.gpart new file mode 100644 index 000000000000..c1f91d3ff612 --- /dev/null +++ b/misc/grc/files/colourfiles/conf.gpart @@ -0,0 +1,56 @@ +# Disk and Partition +regexp=((?:nvd|ada|da)\d+)(p\d+)?(.eli)? +colors=default,bright_cyan,bright_yellow,"\033[38;5;242m" +====== +# ACTIVE +regexp=(ACTIVE|OK) +colors=unchanged,bright_green +====== +# CORRUPT +regexp=(CORRUPT) +colors=unchanged,"\033[41m" +====== +# Disk and Partition +regexp=(\w+\d+)(p\d+)$ +colors=default,bright_cyan,bright_yellow +====== +# Header +regexp=(\w+): +colors=default,"\033[38;5;242m" +====== +# Header +regexp=(Name|Status|Components|State|EncryptionAlgorithm|KeyLength|Crypto|Flags|Mediasize|label|type) +colors=default,bright_white +====== +# Providers | Consumers +regexp=(Geom name): +colors=default,bright_blue +====== +# Providers | Consumers +regexp=(Providers|Consumers): +colors=default,bright_magenta +====== +# Size +regexp=\((\d+(?:\.\d+)?G)\) +colors=default,"\033[38;5;214m" +====== +# Size +regexp=\((\d+(?:\.\d+)?M)\) +colors=default,"\033[38;5;221m" +====== +# Size +regexp=\((\d+(?:\.\d+)?K)\) +colors=default,"\033[38;5;223m" +====== +regexp=(GPT|gpt) +colors=default,bright_green +====== +regexp=(efi) +colors=default,bright_blue +====== +regexp=(freebsd)-(?:(boot)|(swap)|(zfs)|(ufs)) +colors=default,bright_cyan,bright_white,"\033[38;5;62m",bright_magenta,bright_green +====== +regexp=(linux)-(?:(data|swap)) +colors=default,yellow,green,red +====== diff --git a/misc/grc/files/colourfiles/conf.pciconf b/misc/grc/files/colourfiles/conf.pciconf new file mode 100644 index 000000000000..058937f2b02b --- /dev/null +++ b/misc/grc/files/colourfiles/conf.pciconf @@ -0,0 +1,21 @@ +regexp=^(none\d+)(@pci) +colors=default,"\033[41m","\033[38;5;241m" +====== +regexp=^(?:(?!none))(\w+)(@pci) +colors=default,bright_green,"\033[38;5;241m" +====== +regexp=(?<=@pci)(\d+):(\d+):(\d+):(\d+) +colors=default,bright_yellow,bright_cyan,bright_magenta,bright_blue +====== +regexp=: +colors="\033[38;5;241m" +====== +regexp=(\w+)(=0x)(\w+) +colors=default,"\033[38;5;242m","\033[38;5;240m",bright_white +====== +regexp=(\w+)\s+(=)\s+'([^\']+)' +colors=default,underline,"\033[38;5;242m",bright_yellow +====== +regexp=((?:sub)?class)\s+(=)\s+([^\']+) +colors=default,underline,"\033[38;5;242m",cyan + diff --git a/misc/grc/files/colourfiles/conf.pfctl b/misc/grc/files/colourfiles/conf.pfctl new file mode 100644 index 000000000000..506635e1932d --- /dev/null +++ b/misc/grc/files/colourfiles/conf.pfctl @@ -0,0 +1,99 @@ +# IPv4 +regexp=\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,33})(?:\/(\d+))? +colors=unchanged,"\033[38;5;220m",bright_magenta +====== +# IPv4 Loopback +regexp=\s+((?:127\.\d{1,3}\.\d{1,3}\.\d{1,33})|::1) +colors=unchanged,"\033[38;5;245m" +====== +# IP v6 +regexp=(\w+:\w+:\w+:\w+:\w+:\w+:\w+:\w+) +colors=unchanged,"\033[38;5;214m" +====== +# IP v6 +regexp=(\w+:\w+:\w+:\w+)::\/(\d+) +colors=unchanged,"\033[38;5;214m",bright_magenta +====== +# IP v6 +regexp=(\w+:\w+:\w+::\d+) +colors=unchanged,"\033[38;5;214m" +====== +# IP v6 link local +regexp=(\w+::\w+:\w+:\w+:\w+) +colors=unchanged,"\033[38;5;245m",red +====== +# IPv6 Loopback +regexp=(fe80::1%lo0) +colors=unchanged,"\033[38;5;245m" +====== +# Drop/Block, Pass +regexp=(?:(block|drop)|(pass)) +colors=default,bright_green,bright_red +====== +# Drop with Any +regexp=(?:block|drop).*(any) +colors=unchanged,bright_green +====== +# Pass with Any +regexp=(?:pass).*(any) +colors=unchanged,bright_red +====== +regexp=\d(:+|\.)\d +colors=unchanged,"\033[38;5;242m" +====== +# Protocol +regexp=\s(?:(tcp)|(udp)|((?:ipv6-)?icmp))\s +colors=default,bright_magenta,bright_cyan,green +====== +# Ports +regexp=(?:port\s+=\s+|:)(\d+)\s +colors=unchanged,blue +====== +# IPv6 Ports +regexp=\[(\d+)\] +colors=unchanged,blue +======= +# status +regexp=FIN_WAIT.* +colours=red +======= +# status +regexp=SYN.*? +colours=bold red +======= +# status +regexp=LISTEN(ING)? +colours=bold blue +======= +# status +regexp=TIME_WAIT +colours=bold red +======= +# status +regexp=CLOS(E(_WAIT)?|ING) +colours=red +skip=yes +======= +# status +regexp=LAST_ACK +colours=red +======= +# status +regexp=ESTAB.*?\b|CONNECTED +colours=bold yellow +======= +# status +regexp=FREE +colours=bold green +======= +# status +regexp=DISCONNECTING +colours=red +======= +# status +regexp=CONNECTING +colours=green +======= +# status +regexp=UNKNOWN +colours=blink bold red diff --git a/misc/grc/files/colourfiles/conf.pkg_search b/misc/grc/files/colourfiles/conf.pkg_search new file mode 100644 index 000000000000..203a9680db25 --- /dev/null +++ b/misc/grc/files/colourfiles/conf.pkg_search @@ -0,0 +1,3 @@ +# Package +regexp=([^ ]+)-\d[0-9-_\.A-Z-a-z]+\s +colors=unchanged,yellow diff --git a/misc/grc/files/colourfiles/conf.sockstat b/misc/grc/files/colourfiles/conf.sockstat new file mode 100644 index 000000000000..fe43b0b7b602 --- /dev/null +++ b/misc/grc/files/colourfiles/conf.sockstat @@ -0,0 +1,112 @@ +# Root user +regexp=^(root)\s+ +colors=default,"\033[41m" +====== +# Program, PID, FD +regexp=^(?:\w+)\s+([-\w]+)\s+(\d+)\s+(\d+) +colors=unchanged,bright_green,"\033[38;5;245m","\033[38;5;240m" +====== +# TCP 4 +regexp=\s+(tcp)(4)\s+ +colors=unchanged,"\033[38;5;140m","\033[38;5;220m" +====== +# TCP 6 +regexp=\s+(tcp)(6)\s+ +colors=unchanged,"\033[38;5;140m","\033[38;5;39m" +====== +# TCP 46 +regexp=\s+(tcp)(4)(6)\s+ +colors=unchanged,"\033[38;5;140m","\033[38;5;220m","\033[38;5;39m" +====== +# UDP 4 +regexp=\s+(udp)(4)\s+ +colors=unchanged,"\033[38;5;120m","\033[38;5;220m" +====== +# UDP 6 +regexp=\s+(udp)(6)\s+ +colors=unchanged,"\033[38;5;120m","\033[38;5;39m" +====== +# UDP 46 +regexp=\s+(udp)(4)(6)\s+ +colors=unchanged,"\033[38;5;120m","\033[38;5;220m","\033[38;5;39m" +====== +# All Interfaces +regexp=\s+(\*):\d+ +colors=unchanged,bright_red +====== +# Foreign Address for Listen only +regexp=\s+(\*:\*) +colors=unchanged,"\033[38;5;240m" +====== +# Port # +regexp=:(\d+)(?:\s+|$) +colors=unchanged,bright_magenta +====== +# IPv4 +regexp=\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,33}) +colors=unchanged,"\033[38;5;220m" +====== +# IPv4 Loopback +regexp=\s+((?:127\.\d{1,3}\.\d{1,3}\.\d{1,33})|::1) +colors=unchanged,"\033[38;5;238m" +====== +# IP v6 +regexp=\s+(\w+:\w+:\w+:\w+:\w+:\w+:\w+:\w+): +colors=unchanged,"\033[38;5;214m" +====== +# IP v6 link local +regexp=\s+(\w+::\w+:\w+:\w+:\w+)%(\w+): +colors=unchanged,"\033[38;5;238m",red +====== +# IPv6 Loopback +regexp=\s+(fe80::1%lo0): +colors=unchanged,"\033[38;5;238m" +====== +# IPv6 Loopback +regexp=^USER\s+COMMAND\s+PID\s+FD\s+PROTO\s+LOCAL\s+ADDRESS\s+FOREIGN\s+ADDRESS +colors=bright_white +======= +# status +regexp=FIN_WAIT.* +colours=red +======= +# status +regexp=SYN.*? +colours=bold red +======= +# status +regexp=LISTEN(ING)? +colours=bold blue +======= +# status +regexp=TIME_WAIT +colours=bold red +======= +# status +regexp=CLOS(E(_WAIT)?|ING) +colours=red +skip=yes +======= +# status +regexp=LAST_ACK +colours=red +======= +# status +regexp=ESTAB.*?\b|CONNECTED +colours=bold yellow +======= +# status +regexp=FREE +colours=bold green +======= +# status +regexp=DISCONNECTING +colours=red +======= +# status +regexp=CONNECTING +colours=green +======= +# status +regexp=UNKNOWN +colours=blink bold red diff --git a/misc/grc/files/colourfiles/conf.top b/misc/grc/files/colourfiles/conf.top new file mode 100644 index 000000000000..675dd34325ea --- /dev/null +++ b/misc/grc/files/colourfiles/conf.top @@ -0,0 +1,93 @@ +# Disk and Partition +regexp=^\s*(\d+)\s+(\w+) +colors=default,bright_magenta,bright_green +====== +# Size +regexp=\s(\d+G) +colors=unchanged,"\033[38;5;214m" +====== +# Size +regexp=\s(\d{4,}M) +#colors=unchanged,"\033[38;5;214m" +colors=unchanged,bright_red +====== +# Size +regexp=\s(\d{3}?M) +colors=unchanged,"\033[38;5;221m" +====== +# Size +regexp=\s(\d{1,2}M) +colors=unchanged,"\033[38;5;223m" +====== +# Size +regexp=\s(\d+K) +colors=unchanged,"\033[38;5;223m" +====== +# Size +regexp=\s([2-9]\d(?:\.\d+)?%) +colors=unchanged,bright_red +====== +# Size +regexp=\s(1\d(?:\.\d+)?%) +colors=unchanged,"\033[38;5;221m" +====== +# Size +regexp=\s(\d(?:\.\d+)?%) +colors=unchanged,"\033[38;5;223m" +====== +# Size +regexp=\s(\d+(?:\.\d+)H) +colors=unchanged,bright_red +====== +# Size +regexp=\s(\d{3,}(?::\d+)) +colors=unchanged,bright_red +====== +# Size +regexp=\s(\d{2}(?::\d+)) +colors=unchanged,"\033[38;5;221m" +====== +# Size +regexp=\s(\d(?::\d+)) +colors=unchanged,"\033[38;5;223m" +====== +# Size +regexp=\s(\d+(?:K|M|G)\s+Active) +colors=default,bright_blue +====== +# Size +regexp=\s(\d+(?:K|M|G)\s+Inact(?:ive)?) +colors=default,bright_yellow +====== +# Size +regexp=\s(\d+(?:K|M|G)\s+Laundry) +colors=default,bright_magenta +====== +# Size +regexp=\s(\d+(?:K|M|G)\s+Wired) +colors=default,bright_red +====== +# Size +regexp=\s(\d+(?:K|M|G)\s+Free) +colors=default,bright_green +====== +# Size +regexp=\s(\d+(?:\.\d+)%\s+idle) +colors=default,bright_green +====== +# Size +regexp=^(\d+\s+processes) +colors=default,bright_blue +====== +# Size +regexp=\s(\d+\s+running) +colors=default,bright_green +====== +# Size +regexp=\s(\d+\s+sleeping) +colors=default,bright_yellow +====== +# Size +regexp=\s(\d+\s+zombie) +colors=default,bright_red +====== diff --git a/misc/grc/files/colourfiles/conf.usbconfig b/misc/grc/files/colourfiles/conf.usbconfig new file mode 100644 index 000000000000..b168c62e03fb --- /dev/null +++ b/misc/grc/files/colourfiles/conf.usbconfig @@ -0,0 +1,22 @@ +regexp=^(ugen)(\d+)\.(\d+):\s+<([^>]+)>\s+at\s+usbus(\d+).* +colors="\033[38;5;241m","\033[38;5;241m",bright_yellow,bright_cyan,"\033[38;5;213m",bright_yellow +#regexp=^(ugen)(\d+)\.(\d+):\s+<([^>]+)>\s+at\s+usbus(\d+).*spd=(\w+)\s+\(([^\)]+)\)\s+pwr=(\w+)\s+\(([^\)]+)\) +#colors="\033[38;5;241m","\033[38;5;241m",bright_yellow,bright_cyan,bright_green,bright_yellow,bright_blue,bright_magenta,bright_green,bright_cyan +====== +regexp=spd=(FULL) \((12Mbps)\) +colors="\033[38;5;241m","\033[38;5;160m","\033[38;5;160m" +====== +regexp=spd=(HIGH) \((480Mbps)\) +colors="\033[38;5;241m","\033[38;5;222m","\033[38;5;222m" +====== +regexp=spd=(SUPER) \((5.0Gbps)\) +colors="\033[38;5;241m","\033[38;5;112m","\033[38;5;112m" +====== +regexp=pwr=(SAVE)\s+\((\d+mA)\) +colors="\033[38;5;241m",white,white +====== +regexp=pwr=(ON)\s+\((\d+mA)\) +colors="\033[38;5;241m",bright_red,bright_red +====== +regexp=<([^>]+H(?:UB|ub))> +colors="\033[38;5;241m","\033[38;5;247m", diff --git a/misc/grc/files/colourfiles/conf.vnstat b/misc/grc/files/colourfiles/conf.vnstat new file mode 100644 index 000000000000..ba33f38ea0cc --- /dev/null +++ b/misc/grc/files/colourfiles/conf.vnstat @@ -0,0 +1,23 @@ +# Interface Name +regexp=^\s([-\w]+): +colors=default,bright_green +====== +# Dates +regexp=(\d{4}-\d{2}(?:-\d{2})?) +colors=unchanged,bright_magenta +====== +# Numbers +regexp=(\d+\.\d+) +colors=unchanged,bright_cyan +====== +# MiB +regexp=(MiB) +colors=unchanged,bright_yellow +====== +# MiB +regexp=(GiB) +colors=unchanged,bright_red +====== +# No data +regexp=(Not enough data available yet) +colors=unchanged,"\033[38;5;242m" diff --git a/misc/grc/files/colourfiles/conf.zfs b/misc/grc/files/colourfiles/conf.zfs new file mode 100644 index 000000000000..7caf3cb8037e --- /dev/null +++ b/misc/grc/files/colourfiles/conf.zfs @@ -0,0 +1,55 @@ +# Size +regexp=(\d+(?:\.\d+)?G) +colors=default,"\033[38;5;214m" +====== +# Size +regexp=(\d+(?:\.\d+)?M) +colors=default,"\033[38;5;221m" +====== +# Size +regexp=(\d+(?:\.\d+)?K) +colors=default,"\033[38;5;223m" +====== +# Size +regexp=\s(\d%) +colors=default,bright_green +====== +# Size +regexp=\s([123]\d%) +colors=default,bright_yellow +====== +# Size +regexp=\s([4-9]\d%) +colors=default,bright_red +====== +# Headers +regexp=(\w+):\s+(\w+) +colors=default,bright_white, bright_yellow +====== +# Headers +regexp=(errors):\s+(.*) +colors=default,bright_red, white +====== +# Status +regexp=(ONLINE) +colors=default,bright_green +====== +# Headers +regexp=^(NAME.*) +colors=default,bright_white +====== +# Headers +regexp=(-) +colors=default,"\033[38;5;243m" +====== +# History +regexp=^(\d{4}-\d{2}-\d{2})\.(\d{2}:\d{2}:\d{2}) +colors=default,bright_magenta,bright_cyan +====== +# Headers +regexp=(?:(create)|(destroy)|(set)) +colors=default,bright_green,bright_red,bright_yellow +====== +# Headers +regexp=\s+(\w+)=([^\s]+) +colors=default,blue,bright_blue diff --git a/misc/grc/files/colourfiles/conf.zpool b/misc/grc/files/colourfiles/conf.zpool new file mode 100644 index 000000000000..7caf3cb8037e --- /dev/null +++ b/misc/grc/files/colourfiles/conf.zpool @@ -0,0 +1,55 @@ +# Size +regexp=(\d+(?:\.\d+)?G) +colors=default,"\033[38;5;214m" +====== +# Size +regexp=(\d+(?:\.\d+)?M) +colors=default,"\033[38;5;221m" +====== +# Size +regexp=(\d+(?:\.\d+)?K) +colors=default,"\033[38;5;223m" +====== +# Size +regexp=\s(\d%) +colors=default,bright_green +====== +# Size +regexp=\s([123]\d%) +colors=default,bright_yellow +====== +# Size +regexp=\s([4-9]\d%) +colors=default,bright_red +====== +# Headers +regexp=(\w+):\s+(\w+) +colors=default,bright_white, bright_yellow +====== +# Headers +regexp=(errors):\s+(.*) +colors=default,bright_red, white +====== +# Status +regexp=(ONLINE) +colors=default,bright_green +====== +# Headers +regexp=^(NAME.*) +colors=default,bright_white +====== +# Headers +regexp=(-) +colors=default,"\033[38;5;243m" +====== +# History +regexp=^(\d{4}-\d{2}-\d{2})\.(\d{2}:\d{2}:\d{2}) +colors=default,bright_magenta,bright_cyan +====== +# Headers +regexp=(?:(create)|(destroy)|(set)) +colors=default,bright_green,bright_red,bright_yellow +====== +# Headers +regexp=\s+(\w+)=([^\s]+) +colors=default,blue,bright_blue diff --git a/misc/grc/files/patch-grc.conf b/misc/grc/files/patch-grc.conf new file mode 100644 index 000000000000..56f42aee33a8 --- /dev/null +++ b/misc/grc/files/patch-grc.conf @@ -0,0 +1,46 @@ +--- grc.conf.orig 2021-08-07 15:44:43 UTC ++++ grc.conf +@@ -299,3 +299,43 @@ conf.irclog + conf.log + + ++ ++# # pciconf ++(^|[/\w\.]+/)pciconf\s? ++conf.pciconf ++ ++# # usbconfig ++(^|[/\w\.]+/)usbconfig\s? ++conf.usbconfig ++ ++# # vnstat ++(^|[/\w\.]+/)vnstat\s? ++conf.vnstat ++ ++# # geli ++(^|[/\w\.]+/)geli\s? ++conf.geli ++ ++# # geom ++(^|[/\w\.]+/)geom\s? ++conf.geom ++ ++# # gpart ++(^|[/\w\.]+/)gpart\s? ++conf.gpart ++ ++# # pfctl ++(^|[/\w\.]+/)pfctl\s? ++conf.pfctl ++ ++# # zpool ++(^|[/\w\.]+/)zpool\s? ++conf.zpool ++ ++# # zfs ++(^|[/\w\.]+/)zfs\s? ++conf.zfs ++ ++# # drill ++(^|[/\w\.]+/)drill\s? ++conf.drill diff --git a/misc/grc/pkg-plist b/misc/grc/pkg-plist index 37d6a974be0a..91cda1bd17e2 100644 --- a/misc/grc/pkg-plist +++ b/misc/grc/pkg-plist @@ -5,7 +5,9 @@ man/man1/grc.1.gz man/man1/grcat.1.gz %%DATADIR%%/conf.ant %%DATADIR%%/conf.blkid +%%DATADIR%%/conf.common %%DATADIR%%/conf.configure +%%DATADIR%%/conf.curl %%DATADIR%%/conf.cvs %%DATADIR%%/conf.df %%DATADIR%%/conf.diff @@ -19,15 +21,21 @@ man/man1/grcat.1.gz %%DATADIR%%/conf.dockerpull %%DATADIR%%/conf.dockersearch %%DATADIR%%/conf.dockerversion +%%DATADIR%%/conf.drill %%DATADIR%%/conf.du +%%DATADIR%%/conf.dummy %%DATADIR%%/conf.env %%DATADIR%%/conf.esperanto %%DATADIR%%/conf.fdisk %%DATADIR%%/conf.findmnt %%DATADIR%%/conf.free %%DATADIR%%/conf.gcc +%%DATADIR%%/conf.geli +%%DATADIR%%/conf.geom %%DATADIR%%/conf.getfacl %%DATADIR%%/conf.getsebool +%%DATADIR%%/conf.go-test +%%DATADIR%%/conf.gpart %%DATADIR%%/conf.id %%DATADIR%%/conf.ifconfig %%DATADIR%%/conf.iostat_sar @@ -37,9 +45,13 @@ man/man1/grcat.1.gz %%DATADIR%%/conf.iproute %%DATADIR%%/conf.iptables %%DATADIR%%/conf.irclog +%%DATADIR%%/conf.iwconfig +%%DATADIR%%/conf.jobs +%%DATADIR%%/conf.kubectl %%DATADIR%%/conf.last %%DATADIR%%/conf.ldap %%DATADIR%%/conf.log +%%DATADIR%%/conf.lolcat %%DATADIR%%/conf.ls %%DATADIR%%/conf.lsattr %%DATADIR%%/conf.lsblk @@ -47,30 +59,42 @@ man/man1/grcat.1.gz %%DATADIR%%/conf.lsof %%DATADIR%%/conf.lspci %%DATADIR%%/conf.mount -%%DATADIR%%/conf.mount.old %%DATADIR%%/conf.mtr %%DATADIR%%/conf.mvn %%DATADIR%%/conf.netstat %%DATADIR%%/conf.nmap +%%DATADIR%%/conf.ntpdate +%%DATADIR%%/conf.pciconf +%%DATADIR%%/conf.pfctl %%DATADIR%%/conf.php %%DATADIR%%/conf.ping %%DATADIR%%/conf.ping2 +%%DATADIR%%/conf.pkg_search %%DATADIR%%/conf.proftpd %%DATADIR%%/conf.ps %%DATADIR%%/conf.pv %%DATADIR%%/conf.semanageboolean %%DATADIR%%/conf.semanagefcontext %%DATADIR%%/conf.semanageuser +%%DATADIR%%/conf.sensors %%DATADIR%%/conf.showmount +%%DATADIR%%/conf.sockstat %%DATADIR%%/conf.sql %%DATADIR%%/conf.ss %%DATADIR%%/conf.stat %%DATADIR%%/conf.sysctl %%DATADIR%%/conf.systemctl %%DATADIR%%/conf.tcpdump +%%DATADIR%%/conf.top %%DATADIR%%/conf.traceroute %%DATADIR%%/conf.tune2fs %%DATADIR%%/conf.ulimit %%DATADIR%%/conf.uptime +%%DATADIR%%/conf.usbconfig %%DATADIR%%/conf.vmstat +%%DATADIR%%/conf.vnstat %%DATADIR%%/conf.wdiff +%%DATADIR%%/conf.whois +%%DATADIR%%/conf.yaml +%%DATADIR%%/conf.zfs +%%DATADIR%%/conf.zpool