From owner-svn-ports-all@freebsd.org Tue Feb 26 04:51:50 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CE1C1509EE5; Tue, 26 Feb 2019 04:51:50 +0000 (UTC) (envelope-from meta@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3075269CAE; Tue, 26 Feb 2019 04:51:50 +0000 (UTC) (envelope-from meta@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE6FE27F29; Tue, 26 Feb 2019 04:51:49 +0000 (UTC) (envelope-from meta@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1Q4pnvo054666; Tue, 26 Feb 2019 04:51:49 GMT (envelope-from meta@FreeBSD.org) Received: (from meta@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1Q4pniv054664; Tue, 26 Feb 2019 04:51:49 GMT (envelope-from meta@FreeBSD.org) Message-Id: <201902260451.x1Q4pniv054664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: meta set sender to meta@FreeBSD.org using -f From: Koichiro Iwao Date: Tue, 26 Feb 2019 04:51:49 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r493933 - in head/sysutils/freebsd-snapshot: . files X-SVN-Group: ports-head X-SVN-Commit-Author: meta X-SVN-Commit-Paths: in head/sysutils/freebsd-snapshot: . files X-SVN-Commit-Revision: 493933 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3075269CAE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.92)[-0.919,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2019 04:51:50 -0000 Author: meta Date: Tue Feb 26 04:51:49 2019 New Revision: 493933 URL: https://svnweb.freebsd.org/changeset/ports/493933 Log: sysutils/freebsd-snapshot: allows to zfs filesystems to have unlimited snapshots The periodic-snapshot supplied with the sysutils/freebsd-snapshot port limits the total number of snapshots per file system to 20, which is correct for ufs filesystems but does not apply to zfs which can have 2^64. PR: 215828 Submitted by: hostmaster@GTS.NET Approved by: maintainer timeout Added: head/sysutils/freebsd-snapshot/files/patch-allow-unlimited-snapshots-on-zfs (contents, props changed) Modified: head/sysutils/freebsd-snapshot/Makefile Modified: head/sysutils/freebsd-snapshot/Makefile ============================================================================== --- head/sysutils/freebsd-snapshot/Makefile Tue Feb 26 04:50:37 2019 (r493932) +++ head/sysutils/freebsd-snapshot/Makefile Tue Feb 26 04:51:49 2019 (r493933) @@ -3,7 +3,7 @@ PORTNAME= freebsd-snapshot DISTVERSION= 20091208.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= https://people.freebsd.org/~rse/dist/ Added: head/sysutils/freebsd-snapshot/files/patch-allow-unlimited-snapshots-on-zfs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/freebsd-snapshot/files/patch-allow-unlimited-snapshots-on-zfs Tue Feb 26 04:51:49 2019 (r493933) @@ -0,0 +1,45 @@ +PR: 215828 +--- periodic-snapshot.2016122900 2016-12-29 10:31:43.423980000 -0500 ++++ periodic-snapshot 2017-01-05 11:21:16.767572000 -0500 +@@ -47,6 +47,22 @@ + * ) exit 0 ;; + esac + ++# explicitly check whether we should take care of ZFS to ++# prevent us from _implicitly_ loading "zfs.ko" without reason ++zfs_enabled=`( \ ++ if [ -r /etc/defaults/rc.conf ]; then \ ++ . /etc/defaults/rc.conf; \ ++ source_rc_confs; \ ++ fi; \ ++ . /etc/rc.subr; \ ++ load_rc_config zfs; \ ++ if checkyesno zfs_enable; then \ ++ echo 'yes'; \ ++ else \ ++ echo 'no'; \ ++ fi ++) 2>/dev/null || true` ++ + # determine run-time tag and current hour + time_tag="$1" + time_hour=$((0 + `date '+%k'`)) +@@ -87,10 +103,14 @@ + OIFS="$IFS"; IFS="$IFS," + for fs in $fs_list; do + IFS="$OIFS" +- # sanity check filesystem snapshot schedule +- if [ $((0 + $when_weekly + $when_daily + $when_hourly)) -gt 20 ]; then +- logger -p daemon.warning \ +- "snapshot: schedule $schedule on filesystem $fs would require more than maximum number of 20 possible snapshots" ++ if [ ".$zfs_enabled" = .yes ] && (zfs list $fs) >/dev/null 2>&1; then ++ : ++ else ++ # sanity check filesystem snapshot schedule ++ if [ $((0 + $when_weekly + $when_daily + $when_hourly)) -gt 20 ]; then ++ logger -p daemon.warning \ ++ "snapshot: schedule $schedule on ufs filesystem $fs would require more than maximum number of 20 possible snapshots" ++ fi + fi + + # determine whether to make a snapshot