From owner-dev-commits-ports-main@freebsd.org Wed May 5 08:50:09 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8CEB063613C; Wed, 5 May 2021 08:50:09 +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 4FZr4x3b1Cz3Lp9; Wed, 5 May 2021 08:50:09 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 6E3A621E96; Wed, 5 May 2021 08:50:09 +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 1458o97v060820; Wed, 5 May 2021 08:50:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1458o9c6060817; Wed, 5 May 2021 08:50:09 GMT (envelope-from git) Date: Wed, 5 May 2021 08:50:09 GMT Message-Id: <202105050850.1458o9c6060817@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Lars Engels Subject: git: e48320e2d8b9 - main - sysutils/bsdstats: make reporting opt-in MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lme X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e48320e2d8b915cad970dcfd01ca48679f07b4f4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2021 08:50:09 -0000 The branch main has been updated by lme: URL: https://cgit.FreeBSD.org/ports/commit/?id=e48320e2d8b915cad970dcfd01ca48679f07b4f4 commit e48320e2d8b915cad970dcfd01ca48679f07b4f4 Author: Andrew Fyfe AuthorDate: 2021-04-16 05:47:31 +0000 Commit: Lars Engels CommitDate: 2021-05-05 08:49:54 +0000 sysutils/bsdstats: make reporting opt-in - disables reporting by default - does not use the pkg-install script to "modify the currently running system" as per the FreeBSD Porters Handbook Chapter 9.2. - does not output noise if monthly_statistics_* variables aren't enabled - add a post-upgrade message informing the user it's now opt-in and may need enabled --- sysutils/bsdstats/Makefile | 1 + sysutils/bsdstats/files/300.statistics.in | 23 ++-------- sysutils/bsdstats/files/pkg-message.in | 12 ++++- sysutils/bsdstats/pkg-install | 73 ------------------------------- 4 files changed, 14 insertions(+), 95 deletions(-) diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile index e676a52b58d1..86d3ab3d15da 100644 --- a/sysutils/bsdstats/Makefile +++ b/sysutils/bsdstats/Makefile @@ -2,6 +2,7 @@ PORTNAME= bsdstats PORTVERSION= 7.0 +PORTREVISION= 1 CATEGORIES= sysutils DISTFILES= diff --git a/sysutils/bsdstats/files/300.statistics.in b/sysutils/bsdstats/files/300.statistics.in index d24ca2ae2076..1ba18493c600 100644 --- a/sysutils/bsdstats/files/300.statistics.in +++ b/sysutils/bsdstats/files/300.statistics.in @@ -67,6 +67,9 @@ fi # # global values # +monthly_statistics_enable=${monthly_statistics_enable:-"NO"} +monthly_statistics_report_devices=${$monthly_statistics_report_devices:-"YES"} +monthly_statistics_report_ports=${monthly_statistics_report_ports:-"YES"} checkin_server=${monthly_statistics_checkin_server:-"rpt.bsdstats.org"} bsdstats_log=${monthly_statistics_logfile:-"/var/log/bsdstats"} id_token_file='/var/db/bsdstats' @@ -531,27 +534,14 @@ report_all() { report_devices report_cpu ;; - [Nn][Oo]) - echo "Posting monthly device/CPU statistics disabled" - echo " set monthly_statistics_report_devices=\"YES\" in $periodic_conf" - ;; *) - # opt-out for devices - report_devices - report_cpu ;; esac case "$monthly_statistics_report_ports" in [Yy][Ee][Ss]) report_ports ;; - [Nn][Oo]) - echo "Posting monthly ports statistics disabled" - echo " set monthly_statistics_report_ports=\"YES\" in $periodic_conf" - ;; *) - # opt-out for ports - report_ports ;; esac # end @@ -569,14 +559,7 @@ case "$monthly_statistics_enable" in # explicitly enabled: report it report_all "$1" ;; - [Nn][Oo]) - echo "Posting monthly OS statistics disabled" - echo " set monthly_statistics_enable=\"YES\" in $periodic_conf" - rc=1 - ;; *) - # opt-out: we report when user has BSDstats installed, and user didn't say "NO" - report_all "$1" ;; esac diff --git a/sysutils/bsdstats/files/pkg-message.in b/sysutils/bsdstats/files/pkg-message.in index 2c504d2252f8..a1e0f6a20c48 100644 --- a/sysutils/bsdstats/files/pkg-message.in +++ b/sysutils/bsdstats/files/pkg-message.in @@ -3,8 +3,8 @@ message: <> /etc/rc.conf - fi - fi -fi