diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-05-13 16:38:56 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-05-13 16:38:56 +0100 |
commit | ea31ad0ed5501d0bf92267c35beaf06ac016bad2 (patch) | |
tree | 2fdc433d571e3ead010876d43ce2646b7d783680 /sys-fs/zfs-auto-snapshot | |
parent | 88ebe56470c37b02a044e1091cad6b2df0f3be8f (diff) |
gentoo resync : 13.05.2018
Diffstat (limited to 'sys-fs/zfs-auto-snapshot')
-rw-r--r-- | sys-fs/zfs-auto-snapshot/Manifest | 5 | ||||
-rw-r--r-- | sys-fs/zfs-auto-snapshot/files/README.gentoo | 22 | ||||
-rw-r--r-- | sys-fs/zfs-auto-snapshot/metadata.xml | 28 | ||||
-rw-r--r-- | sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-1.2.4.ebuild | 52 | ||||
-rw-r--r-- | sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-9999.ebuild | 52 |
5 files changed, 159 insertions, 0 deletions
diff --git a/sys-fs/zfs-auto-snapshot/Manifest b/sys-fs/zfs-auto-snapshot/Manifest new file mode 100644 index 000000000000..bae2a5a6d0bc --- /dev/null +++ b/sys-fs/zfs-auto-snapshot/Manifest @@ -0,0 +1,5 @@ +AUX README.gentoo 684 BLAKE2B 7175ddfbb8dd5b209fa4fa5e5a3aeecac3fdd102e240f93b640f91bbf0204f9101801a94087383d7087bec08ae490e9769dfcf4f7f218d6daa4779087a8a0d23 SHA512 e77c3a573c2d4499df902b68909c186e4c80ba8b451b493c7e08e5e96ebe281933ce4b5fc11c201e33f27b14a02a35fd85270baf7ddece42a2fcbc6c3c421146 +DIST zfs-auto-snapshot-upstream-1.2.4.tar.gz 13375 BLAKE2B 2a44cdecb7c4bb432c1804dba9a6674289aced9664ae0fcc6a33b604b128d852fce459367316f11961747594516916da51072ed10f84d0c01ea8cca553ce7eec SHA512 26382303fce8b90dfb40f69fcab92308e88c17c147b4a566c5d32f2e9aa241d64f5da56ad82b4becb824ba01a470037a724460d35676a1d46de9c578c02a57d9 +EBUILD zfs-auto-snapshot-1.2.4.ebuild 1379 BLAKE2B 1471a99fa769c947ce39c433c2f46362a7bae719c9cb07134cfa2e3a1d0aa76f824b02e7af7059206e31a05e0b72f432faa6ac452c01659e4f2ba88ead7e8351 SHA512 19a50df99e5b5716f62b5c2ed5e0dbdd404ed66f3615fa6620cf3e529f0851f6e18d8c440ad50a91c8d003d47d664c78af5965e92ffe93b6c0bd6baa10597db6 +EBUILD zfs-auto-snapshot-9999.ebuild 1379 BLAKE2B 1471a99fa769c947ce39c433c2f46362a7bae719c9cb07134cfa2e3a1d0aa76f824b02e7af7059206e31a05e0b72f432faa6ac452c01659e4f2ba88ead7e8351 SHA512 19a50df99e5b5716f62b5c2ed5e0dbdd404ed66f3615fa6620cf3e529f0851f6e18d8c440ad50a91c8d003d47d664c78af5965e92ffe93b6c0bd6baa10597db6 +MISC metadata.xml 1020 BLAKE2B b25380667a6ae2ad4757dd08d15cd5517104e017dba72b96d94043002041a1c7e743b3089832f6136a18d13e5b54001a12d041bb324e382cec7aa1689fc163ce SHA512 171c0ba73b401b6de8b0547d147a968d2a25378fd79f25754a65ae146a49529c52947ca2dc2b060339d5ae0ff6fc504be2e5c74830cff84d4c27ff7cfacd990b diff --git a/sys-fs/zfs-auto-snapshot/files/README.gentoo b/sys-fs/zfs-auto-snapshot/files/README.gentoo new file mode 100644 index 000000000000..cb712d317ea0 --- /dev/null +++ b/sys-fs/zfs-auto-snapshot/files/README.gentoo @@ -0,0 +1,22 @@ +Use com.sun:auto-snapshot attribute to enable snapshots for datasets +the syntax is: + +zfs set com.sun:auto-snapshot=[true|false] + +or: + +zfs set com.sun:auto-snapshot:<frequent|hourly|daily|weekly|monthly>=[true|false] + +for example: + +# zfs set com.sun:auto-snapshot=false zroot +Will disalbe all snapshots for zroot and all nested datasets will inherit the property. + +# zfs set com.sun:auto-snapshot=true zroot/ROOT/default +Will enable all types of snapshots for given dataset. + +# zfs set com.sun:auto-snapshot:weekly=true pool/var +Will enable only weekly snapshots for given dataset. + +for details please visit: +https://docs.oracle.com/cd/E19120-01/open.solaris/817-2271/ghzuk/index.html diff --git a/sys-fs/zfs-auto-snapshot/metadata.xml b/sys-fs/zfs-auto-snapshot/metadata.xml new file mode 100644 index 000000000000..c89306c4869f --- /dev/null +++ b/sys-fs/zfs-auto-snapshot/metadata.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>ya@sysdump.net</email> + <name>Georgy Yakovlev</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + An alternative implementation of the zfs-auto-snapshot service for Linux + that is compatible with zfs-linux and zfs-fuse. + + Automatically create, rotate, and destroy periodic ZFS snapshots. This is + the utility that creates the @zfs-auto-snap_frequent, @zfs-auto-snap_hourly, + @zfs-auto-snap_daily, @zfs-auto-snap_weekly, and @zfs-auto-snap_monthly + snapshots if it is installed. + </longdescription> + <use> + <flag name="default-exclude">Only take snapshots if dataset has com.sun:auto-snapshot=true property set</flag> + </use> + + <upstream> + <remote-id type="github">zfsonlinux/zfs-auto-snapshot</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-1.2.4.ebuild b/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-1.2.4.ebuild new file mode 100644 index 000000000000..e9006a5b9aac --- /dev/null +++ b/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-1.2.4.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit readme.gentoo-r1 + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git" +else + MY_P="${PN}-upstream-${PV}" + SRC_URI="https://github.com/zfsonlinux/${PN}/archive/upstream/${PV}.tar.gz -> ${MY_P}.tar.gz" + KEYWORDS="~amd64" + S="${WORKDIR}/${MY_P}" +fi + +DESCRIPTION="ZFS Automatic Snapshot Service for Linux" +HOMEPAGE="https://github.com/zfsonlinux/zfs-auto-snapshot" + +LICENSE="GPL-2+" +SLOT="0" +IUSE="+default-exclude" + +RDEPEND="sys-fs/zfs + virtual/cron" + +src_install() { + if use default-exclude; then + for cronfile in etc/"${PN}".cron.{daily,hourly,monthly,weekly}; do + sed -i "s/\(^exec ${PN}\)/\1 --default-exclude/" "${cronfile}" || die + done + sed -i "s/\(; ${PN}\)/\1 --default-exclude/" etc/"${PN}".cron.frequent || die + fi + readme.gentoo_create_doc + emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" install +} + +pkg_postinst() { + readme.gentoo_print_elog + + if ! use default-exclude; then + ewarn "snapshots are enabled by default for ALL zfs datasets" + ewarn "set com.sun:auto-snapshot=false or enable 'default-exclude' flag" + elog + fi + + if has_version sys-process/fcron; then + ewarn "frequent snapshot may not work if you are using fcron" + ewarn "you should add frequent job to crontab manually" + fi +} diff --git a/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-9999.ebuild b/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-9999.ebuild new file mode 100644 index 000000000000..e9006a5b9aac --- /dev/null +++ b/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-9999.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit readme.gentoo-r1 + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git" +else + MY_P="${PN}-upstream-${PV}" + SRC_URI="https://github.com/zfsonlinux/${PN}/archive/upstream/${PV}.tar.gz -> ${MY_P}.tar.gz" + KEYWORDS="~amd64" + S="${WORKDIR}/${MY_P}" +fi + +DESCRIPTION="ZFS Automatic Snapshot Service for Linux" +HOMEPAGE="https://github.com/zfsonlinux/zfs-auto-snapshot" + +LICENSE="GPL-2+" +SLOT="0" +IUSE="+default-exclude" + +RDEPEND="sys-fs/zfs + virtual/cron" + +src_install() { + if use default-exclude; then + for cronfile in etc/"${PN}".cron.{daily,hourly,monthly,weekly}; do + sed -i "s/\(^exec ${PN}\)/\1 --default-exclude/" "${cronfile}" || die + done + sed -i "s/\(; ${PN}\)/\1 --default-exclude/" etc/"${PN}".cron.frequent || die + fi + readme.gentoo_create_doc + emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" install +} + +pkg_postinst() { + readme.gentoo_print_elog + + if ! use default-exclude; then + ewarn "snapshots are enabled by default for ALL zfs datasets" + ewarn "set com.sun:auto-snapshot=false or enable 'default-exclude' flag" + elog + fi + + if has_version sys-process/fcron; then + ewarn "frequent snapshot may not work if you are using fcron" + ewarn "you should add frequent job to crontab manually" + fi +} |