diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
commit | 0f558761aa2dee1017b4751e4017205e015a9560 (patch) | |
tree | 037df795519468a25d9362b4e95cdaeb84eb1cf9 /sys-fs/zfs-auto-snapshot | |
parent | 752d6256e5204b958b0ef7905675a940b5e9172f (diff) |
gentoo resync : 29.12.2022
Diffstat (limited to 'sys-fs/zfs-auto-snapshot')
-rw-r--r-- | sys-fs/zfs-auto-snapshot/Manifest | 6 | ||||
-rw-r--r-- | sys-fs/zfs-auto-snapshot/files/zfs-auto-snapshot-1.2.4-drop-which.patch | 47 | ||||
-rw-r--r-- | sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-1.2.4-r2.ebuild (renamed from sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-1.2.4-r1.ebuild) | 1 | ||||
-rw-r--r-- | sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-1.2.4-r3.ebuild | 92 | ||||
-rw-r--r-- | sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-9999.ebuild | 1 |
5 files changed, 145 insertions, 2 deletions
diff --git a/sys-fs/zfs-auto-snapshot/Manifest b/sys-fs/zfs-auto-snapshot/Manifest index 94dfdbc58c33..6e970047cc92 100644 --- a/sys-fs/zfs-auto-snapshot/Manifest +++ b/sys-fs/zfs-auto-snapshot/Manifest @@ -1,4 +1,5 @@ AUX README.gentoo 684 BLAKE2B 84caaa11b98449d4e07e95cbec241257bd184a9b391c2d3292fc05310bb6e3a355de228a65a3e32e7f3b3d1661bd02b5386f75155f4714f4181651dc6422eeb3 SHA512 15af67ea619225e205577f6b8340f2fbc32ff9988031092cff371817bdbfa0683f23e53976027c5ee5a4444259138969da75323ceecfa027654fae4e44c59ac4 +AUX zfs-auto-snapshot-1.2.4-drop-which.patch 1734 BLAKE2B b6c87107db148fb79784a240e9dd03a10ba38825b3932bfb91639f478a3d736a4c7080a5104fb38e3d61081d809688ee07528a9fd7bfaabf6684dd092052c4b0 SHA512 114bc45fdb5e7c48665c948495141a9562e014eeee3bd8b11df6caf2f3ee11350182abbbc0fe74f40ea3c3e07f33bca938a39939766c694534f38a77e9ff17da AUX zfs-auto-snapshot-daily.service 216 BLAKE2B 7c07eb29b2923cdce50af71f356edcb688a803f36711edd4cef61d89324425f255ba17139f0eb7c9fb75bc5316051b76504e8fe476ea84592a0fa318c2f84711 SHA512 0cd391b026d3f2d2af312bd2c572cff7ee136f1575fb69b9a2fc044105d8fa463b4fb511fd5f17cf773a53894b9fe20691aac11d95f7884cfcf6ef76e0c615bf AUX zfs-auto-snapshot-daily.timer 148 BLAKE2B 2392e77048af08c24cf18b5428706251a292701343d967f61f8fb1aa0cc0b3f0f0fa7ce70556fd46951608b2ebeb16b7ac76e29eda9c19a75b7db98a76768320 SHA512 38b4a48132afe5634934a6064eccb9089f9b32514c1614bc5a28798b67dac5f378f65e7f437d2f2b7f35063460be26df7c663733d719c2e2de7fd4d63fe70c60 AUX zfs-auto-snapshot-frequent.service 221 BLAKE2B 8d7268fbb74fb4193d5e136c86065ad3432e7d25d6875296ea0175ce809d7d8663ff3c8f769643e9d8131a45c3c1912a942308f93680e91b910e47da5a887d5e SHA512 60bb1f59c187388db631da02340102802a22957ed314ab92042e144df38276d741ab5d02b10b200182686b5b4a0f2af54db29e57eaeed5dece3ffca3d1d258f0 @@ -11,6 +12,7 @@ AUX zfs-auto-snapshot-weekly.service 217 BLAKE2B 715f8f8da6272b9ea782dbe77dbafa6 AUX zfs-auto-snapshot-weekly.timer 150 BLAKE2B 655187add790017f8328edae33e88eb0a4b88774999e67a5fb9c990f5bae9a13ac1e64c290c7e0a218cdcf05dd7bbe320369d1741da036c54994371eecfc50d7 SHA512 49357f15660900b344eba04f8d4bab7e153b728b4665e285b2f9320a287c15b62c426d568d2ba9a43daf69c6f1a6fbccff8b68417f8991dd5f8c3368d562b73c AUX zfs-auto-snapshot.target 360 BLAKE2B 17be6ab113a8849d5244fd36140d1165c4e919df2a04f4b16aa591c1c92b29243b1be4f2243bcc6a8ef015b0cc1fb53b183da1c83668e4e7e0b609f7301a3372 SHA512 f607dada27e4be409184152b93e2079eecf12f5eba76f2dbe42bdbf4793603063c23813e752bfd829a081eeb6d09c86bc18ab75d65bff87b2c1d4f998abac516 DIST zfs-auto-snapshot-upstream-1.2.4.tar.gz 13375 BLAKE2B 2a44cdecb7c4bb432c1804dba9a6674289aced9664ae0fcc6a33b604b128d852fce459367316f11961747594516916da51072ed10f84d0c01ea8cca553ce7eec SHA512 26382303fce8b90dfb40f69fcab92308e88c17c147b4a566c5d32f2e9aa241d64f5da56ad82b4becb824ba01a470037a724460d35676a1d46de9c578c02a57d9 -EBUILD zfs-auto-snapshot-1.2.4-r1.ebuild 2573 BLAKE2B d71efca9270300aed57faf477e02013f5f0a171436417fc60e8d05de3f2945e728a797f9f52db10b5c7504989b61177030d5858d390801b7f92514807ef1f449 SHA512 9d20533e843bbe41117c7ce801bb602069a9e369c5bea042348b1f194624865086c3d1392161f076f212cb84eb480c7778f589c27546b98f3e2a7641f082a45c -EBUILD zfs-auto-snapshot-9999.ebuild 2576 BLAKE2B b229742f8c7b9e09be3c2891887d49b5abc3d24f20b75cdb4fa951d383f74e97855bf7b9e68de0291284c018bc8f4239bf62054f1050dbf42a91106a5e141c83 SHA512 3f5dca47d29357e4e12492f3cfad66a5f674599cdb86b6a4817c8622471f4abc8a4be43eb70143c3b7f30f5907759cfc59757d724635d5ae492947f31207d7ef +EBUILD zfs-auto-snapshot-1.2.4-r2.ebuild 2589 BLAKE2B ae75763d83d7919ee78a695be66425cfd97c04036be844fc9582cc7ed49a3dd60ddcf7ce733c8464597f217370c6650cc78afcebafdf1da0bd9f4c4dcbd7a1dc SHA512 be518c8387dc7b4e5142bf094f9556aa05c39bec2c884bf9a3a5edd7f61f6533c743f75ed6cee0fd38a7037622c22f2c2196dd91419aff7ac61cb020cf6d669a +EBUILD zfs-auto-snapshot-1.2.4-r3.ebuild 2633 BLAKE2B 8d6c345b21d2599896ac70a58abd438b3c32869186896a1157cd4b19241c97c3dc0a8b7f3cd08d892eee0e84dae53eb13d0e09b08c4b3507ec3cb964cdbd5342 SHA512 242b6be67f4ae39b811d6758ba81e1ca82147bb85e48879d0c19c1eadff1bae2d3bd1773f0fbe239ac339eb89cc65b5c5788775fd0c8d0cd2ac41cc04c2dde7f +EBUILD zfs-auto-snapshot-9999.ebuild 2592 BLAKE2B 4e1fe442bca545372a3c2c4a7ca7456fa134f3d994975bda29c504cf826063b54f0cdd14d49270a7272e0cd37e1785e59d33a0c5b7b916204797395c8a3f2848 SHA512 c5d895bfa2e784771952e0cbdb233db8baef0bebe6db37afc82e3bdd5f847da92780a0f5a788b275287594e7937c76a3683b228c1c93a5ff260806461e67a6b3 MISC metadata.xml 965 BLAKE2B 4f9cc98f893bcaab842d31a7fe9d3db7d24e34a5cb612137830298bce8450a82636970ba20d69ad31bd36d121cf253deaea7ce3e9435df656a768b9922d2b2ff SHA512 0a816ae56452f48cfc286ae8f0c0ff17ba8e174ec6312ba97c09614568fbad07b4024722e3466406f590579bc614ab85731f6dcd3f873a7256d64f8c7054658e diff --git a/sys-fs/zfs-auto-snapshot/files/zfs-auto-snapshot-1.2.4-drop-which.patch b/sys-fs/zfs-auto-snapshot/files/zfs-auto-snapshot-1.2.4-drop-which.patch new file mode 100644 index 000000000000..125cb3d1fc04 --- /dev/null +++ b/sys-fs/zfs-auto-snapshot/files/zfs-auto-snapshot-1.2.4-drop-which.patch @@ -0,0 +1,47 @@ +--- a/etc/zfs-auto-snapshot.cron.daily ++++ b/etc/zfs-auto-snapshot.cron.daily +@@ -1,6 +1,6 @@ + #!/bin/sh + + # Only call zfs-auto-snapshot if it's available +-which zfs-auto-snapshot > /dev/null || exit 0 ++command -v zfs-auto-snapshot > /dev/null || exit 0 + + exec zfs-auto-snapshot --quiet --syslog --label=daily --keep=31 // +--- a/etc/zfs-auto-snapshot.cron.frequent ++++ b/etc/zfs-auto-snapshot.cron.frequent +@@ -1,3 +1,3 @@ + PATH="/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin" + +-*/15 * * * * root which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 // ++*/15 * * * * root command -v zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 // +--- a/etc/zfs-auto-snapshot.cron.hourly ++++ b/etc/zfs-auto-snapshot.cron.hourly +@@ -1,6 +1,6 @@ + #!/bin/sh + + # Only call zfs-auto-snapshot if it's available +-which zfs-auto-snapshot > /dev/null || exit 0 ++command -v zfs-auto-snapshot > /dev/null || exit 0 + + exec zfs-auto-snapshot --quiet --syslog --label=hourly --keep=24 // +--- a/etc/zfs-auto-snapshot.cron.monthly ++++ b/etc/zfs-auto-snapshot.cron.monthly +@@ -1,6 +1,6 @@ + #!/bin/sh + + # Only call zfs-auto-snapshot if it's available +-which zfs-auto-snapshot > /dev/null || exit 0 ++command -v zfs-auto-snapshot > /dev/null || exit 0 + + exec zfs-auto-snapshot --quiet --syslog --label=monthly --keep=12 // +--- a/etc/zfs-auto-snapshot.cron.weekly ++++ b/etc/zfs-auto-snapshot.cron.weekly +@@ -1,6 +1,6 @@ + #!/bin/sh + + # Only call zfs-auto-snapshot if it's available +-which zfs-auto-snapshot > /dev/null || exit 0 ++command -v zfs-auto-snapshot > /dev/null || exit 0 + + exec zfs-auto-snapshot --quiet --syslog --label=weekly --keep=8 // diff --git a/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-1.2.4-r1.ebuild b/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-1.2.4-r2.ebuild index 30221867b133..2af66eac6680 100644 --- a/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-1.2.4-r1.ebuild +++ b/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-1.2.4-r2.ebuild @@ -23,6 +23,7 @@ SLOT="0" IUSE="+cron +default-exclude systemd" RDEPEND=" + sys-apps/which sys-fs/zfs !systemd? ( virtual/cron ) " diff --git a/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-1.2.4-r3.ebuild b/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-1.2.4-r3.ebuild new file mode 100644 index 000000000000..e503554be28a --- /dev/null +++ b/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-1.2.4-r3.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit prefix readme.gentoo-r1 systemd + +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 ~arm64 ~ppc64 ~riscv" + 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="+cron +default-exclude systemd" + +RDEPEND=" + sys-fs/zfs + !systemd? ( virtual/cron ) +" + +REQUIRED_USE="!systemd? ( cron )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.4-drop-which.patch +) + +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 + + local exclude unit + exclude="$(usev default-exclude)" + for unit in "${PN}"{-daily,-frequent,-hourly,-monthly,-weekly}.service; do + cp "${FILESDIR}/${unit}" "${T}/${unit}" || die + eprefixify "${T}/${unit}" + sed -i "s/@DEFAULT_EXCLUDE@/${exclude:+--default-exclude}/g" "${T}/${unit}" || die + systemd_dounit "${T}/${unit}" + done + for unit in "${PN}"{-daily,-frequent,-hourly,-monthly,-weekly}.timer; do + systemd_dounit "${FILESDIR}/${unit}" + done + systemd_dounit "${FILESDIR}/${PN}.target" + + if ! use cron; then + ebegin "removing cron files from installation image" + rm -rfv "${ED}/etc" || die + eend "$?" + fi +} + +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 use cron && 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 + + if use cron; then + if systemd_is_booted || has_version sys-apps/systemd; then + echo + ewarn "Both 'cron' and 'systemd' flags are enabled." + ewarn "So both ${PN}.target and cron files were installed." + ewarn "Please don't use 2 implementations at the same time." + ewarn "Cronjobs are usually enabled by default via /etc/cron.* jobs" + ewarn "If you want to use systemd ${PN}.target timers" + ewarn "disable 'cron' flag and reinstall ${PN}" + echo + fi + 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 index 18a922257dbc..221028bc21a1 100644 --- a/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-9999.ebuild +++ b/sys-fs/zfs-auto-snapshot/zfs-auto-snapshot-9999.ebuild @@ -23,6 +23,7 @@ SLOT="0" IUSE="+cron +default-exclude systemd" RDEPEND=" + sys-apps/which sys-fs/zfs !systemd? ( virtual/cron ) " |