Report and patch from Wes Morgan. The new version of ZFS in head defaults to not listing snapshots with "zfs list", which causes a problem with the "freebsd-snapshot" utility. Fix: The new "zfs list" command requires "-t snapshot" The fix adds the correct zfs list command syntax to the existing /usr/local/sbin/snapshot and is backwards compatible. Fix port by removing existing patch /usr/ports/sysutils/freebsd-snapshot/files/patch-snapshot and creating two separate patch files (patch-snapshot and patch-periodic-snapshot) which are attached: # make sure system tools are used first -PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH" +PATH="/bin:/usr/bin:/sbin:/usr/sbin:%%PREFIX%%/sbin:$PATH" # option defaults fs_subdir=".snap" @@ -271,7 +271,7 @@ i=19 k=`expr $maxgen - 1` while [ $i -gt $k ]; do - if zfs list "$fs_name@$fs_tag.$i" >/dev/null 2>&1; then + if zfs list -t snapshot "$fs_name@$fs_tag.$i" >/dev/null 2>&1; then system zfs destroy "$fs_name@$fs_tag.$i" fi i=`expr $i - 1` @@ -280,12 +280,12 @@ if [ $maxgen -gt 0 ]; then # rotate remaining snapshots i=$k - if zfs list "$fs_name@$fs_tag.$i" >/dev/null 2>&1; then + if zfs list -t snapshot "$fs_name@$fs_tag.$i" >/dev/null 2>&1; then system zfs destroy "$fs_name@$fs_tag.$i" fi i=`expr $i - 1` while [ $i -ge $fs_gen ]; do - if zfs list "$fs_name@$fs_tag.$i" >/dev/null 2>&1; then + if zfs list -t snapshot "$fs_name@$fs_tag.$i" >/dev/null 2>&1; then j=`expr $i + 1` system zfs rename "$fs_name@$fs_tag.$i" "$fs_name@$fs_tag.$j" fi --- patch-snapshot ends here -----AO51mbzm6vDea1LQlYWNkVQ0WHq1RVPtkkeVRQfSUMwuoInr Content-Type: text/plain; name="patch-periodic-snapshot" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-periodic-snapshot" --- periodic-snapshot.orig Thu Sep 15 17:44:57 2005 +++ periodic-snapshot Thu Sep 15 17:46:31 2005 @@ -29,7 +29,7 @@ ## # make sure system tools are used first -PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH" +PATH="/bin:/usr/bin:/sbin:/usr/sbin:%%PREFIX%%/sbin:$PATH" # configuration defaults snapshot_enable="NO" How-To-Repeat: Use snapshot tools with new zfs version in current.
Responsible Changed From-To: freebsd-ports-bugs->wxs I'll take it.
State Changed From-To: open->closed Committed. Thanks!