1 |
commit: 3d12ed1eefcd3243728d7ad24b4b3f4a6d6c1266 |
2 |
Author: Pascal Jäger <pascal.jaeger <AT> leimstift <DOT> de> |
3 |
AuthorDate: Sun Oct 3 20:16:19 2021 +0000 |
4 |
Commit: Pascal Jäger <pascal.jaeger <AT> leimstift <DOT> de> |
5 |
CommitDate: Sun Oct 3 20:16:19 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3d12ed1e |
7 |
|
8 |
app-backup/timeshift-autosnap: new package |
9 |
|
10 |
Automatically make timeshift snapshots every time emerge |
11 |
installs a package |
12 |
|
13 |
Package-Manager: Portage-3.0.23, Repoman-3.0.3 |
14 |
Signed-off-by: Pascal Jäger <pascal.jaeger <AT> leimstift.de> |
15 |
|
16 |
app-backup/timeshift-autosnap/Manifest | 1 + |
17 |
.../timeshift-autosnap-remove-arch-specific.patch | 10 +++++ |
18 |
app-backup/timeshift-autosnap/metadata.xml | 17 +++++++++ |
19 |
.../timeshift-autosnap-0.9.ebuild | 43 ++++++++++++++++++++++ |
20 |
4 files changed, 71 insertions(+) |
21 |
|
22 |
diff --git a/app-backup/timeshift-autosnap/Manifest b/app-backup/timeshift-autosnap/Manifest |
23 |
new file mode 100644 |
24 |
index 000000000..632a41ef2 |
25 |
--- /dev/null |
26 |
+++ b/app-backup/timeshift-autosnap/Manifest |
27 |
@@ -0,0 +1 @@ |
28 |
+DIST timeshift-autosnap-0.9.tar.gz 2876 BLAKE2B 03063b1cedd18eee56681b9af10954f7c26a0dfdd08eb51ba0dc56c5b86eed1dac3024cd5b790ed2f00f30a9c09988d2c2785dad4041e931e3af2301f7159491 SHA512 15dbe97ef26954c33aa0a9dccb62a93da81b98d7194423111536d5ef7c832b8432c75b58b9edbbfaa669a333692bd71624a221928ca8e186cdf833d7ebd63c9c |
29 |
|
30 |
diff --git a/app-backup/timeshift-autosnap/files/timeshift-autosnap-remove-arch-specific.patch b/app-backup/timeshift-autosnap/files/timeshift-autosnap-remove-arch-specific.patch |
31 |
new file mode 100644 |
32 |
index 000000000..a778006bf |
33 |
--- /dev/null |
34 |
+++ b/app-backup/timeshift-autosnap/files/timeshift-autosnap-remove-arch-specific.patch |
35 |
@@ -0,0 +1,10 @@ |
36 |
+--- a/timeshift-autosnap |
37 |
++++ b/timeshift-autosnap |
38 |
+@@ -53,7 +53,7 @@ if $(get_property "deleteSnapshots" "boolean" "true") ; then |
39 |
+ fi |
40 |
+ fi; |
41 |
+ |
42 |
+-if $(get_property "updateGrub" "boolean" "true") && [ "$(pacman -Qs ^grub-btrfs$)" ]; then |
43 |
++if $(get_property "updateGrub" "boolean" "true") ; then |
44 |
+ grub-mkconfig -o /boot/grub/grub.cfg |
45 |
+ fi; |
46 |
|
47 |
diff --git a/app-backup/timeshift-autosnap/metadata.xml b/app-backup/timeshift-autosnap/metadata.xml |
48 |
new file mode 100644 |
49 |
index 000000000..bccd8dadb |
50 |
--- /dev/null |
51 |
+++ b/app-backup/timeshift-autosnap/metadata.xml |
52 |
@@ -0,0 +1,17 @@ |
53 |
+<?xml version="1.0" encoding="UTF-8"?> |
54 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
55 |
+<pkgmetadata> |
56 |
+ <maintainer type="person"> |
57 |
+ <email>pascal.jaeger@×××××××××.de</email> |
58 |
+ <name>Pascal Jäger</name> |
59 |
+ </maintainer> |
60 |
+ <upstream> |
61 |
+ <remote-id type="github">Antynea/grub-btrfs</remote-id> |
62 |
+ </upstream> |
63 |
+ <longdescription lang="en"> |
64 |
+ Improves Grub by adding "btrfs snapshots" to the Grub menu. |
65 |
+ |
66 |
+ You can boot your system on a "snapshot" from the Grub menu. |
67 |
+ Supports manual snapshots, snapper, timeshift ... |
68 |
+ </longdescription> |
69 |
+</pkgmetadata> |
70 |
|
71 |
diff --git a/app-backup/timeshift-autosnap/timeshift-autosnap-0.9.ebuild b/app-backup/timeshift-autosnap/timeshift-autosnap-0.9.ebuild |
72 |
new file mode 100644 |
73 |
index 000000000..2f2de478e |
74 |
--- /dev/null |
75 |
+++ b/app-backup/timeshift-autosnap/timeshift-autosnap-0.9.ebuild |
76 |
@@ -0,0 +1,43 @@ |
77 |
+# Copyright 2019-2021 Gentoo Authors |
78 |
+# Distributed under the terms of the GNU General Public License v2 |
79 |
+ |
80 |
+EAPI=8 |
81 |
+ |
82 |
+DESCRIPTION="Automatically creats a snapshot everytime before portage installs a package" |
83 |
+HOMEPAGE="https://gitlab.com/gobonja/timeshift-autosnap" |
84 |
+SRC_URI="https://gitlab.com/gobonja/timeshift-autosnap/-/archive/${PV}/{$P}.tar.gz -> ${P}.tar.gz" |
85 |
+ |
86 |
+LICENSE="MIT" |
87 |
+SLOT="0" |
88 |
+KEYWORDS="~amd64 ~x86" |
89 |
+IUSE="" |
90 |
+ |
91 |
+DEPEND=" |
92 |
+ app-backup/timeshift |
93 |
+ >=sys-apps/portage-2.1 |
94 |
+" |
95 |
+RDEPEND="${DEPEND}" |
96 |
+BDEPEND="" |
97 |
+ |
98 |
+PATCHES=( "${FILESDIR}/${PN}-remove-arch-specific.patch" ) |
99 |
+ |
100 |
+src_unpack() { |
101 |
+ default |
102 |
+ mv ${WORKDIR}/timeshift-autosnap-${PV}* ${WORKDIR}/timeshift-autosnap-${PV} |
103 |
+} |
104 |
+ |
105 |
+src_compile(){ |
106 |
+ true |
107 |
+} |
108 |
+ |
109 |
+src_install(){ |
110 |
+ dobin timeshift-autosnap |
111 |
+ insinto /etc |
112 |
+ doins timeshift-autosnap.conf |
113 |
+} |
114 |
+ |
115 |
+pkg_postinst() { |
116 |
+ touch /etc/portage/bashrc |
117 |
+ grep -q '#!/bin/' /etc/portage/bashrc || awk -i inplace 'BEGINFILE{print "#!/bin/sh"}{print}' /etc/portage/bashrc |
118 |
+ grep -q 'timeshift-autosnap' /etc/portage/bashrc || echo 'function pre_pkg_setup() { /usr/bin/timeshift-autosnap ; }' >> /etc/portage/bashrc |
119 |
+} |