From cfcd138a4c07ab80d3e167103e2f26f6dd52567b Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Thu, 7 Nov 2024 17:25:12 +0100 Subject: [PATCH] package created using the webbuild interface [release 24.06.3-1mamba;Wed Nov 06 2024] --- README.md | 4 ++ timeshift-boot.service | 15 ++++++++ timeshift-boot.timer | 10 +++++ timeshift-hourly.service | 15 ++++++++ timeshift-hourly.timer | 10 +++++ timeshift.spec | 82 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 136 insertions(+) create mode 100644 timeshift-boot.service create mode 100644 timeshift-boot.timer create mode 100644 timeshift-hourly.service create mode 100644 timeshift-hourly.timer create mode 100644 timeshift.spec diff --git a/README.md b/README.md index eeae0b2..1d459ee 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # timeshift +System restore tool for Linux. Creates filesystem snapshots using rsync+hardlinks, or BTRFS snapshots. +Supports scheduled snapshots, multiple backup levels, and exclude filters. +Snapshots can be restored while system is running or from Live CD/USB. + diff --git a/timeshift-boot.service b/timeshift-boot.service new file mode 100644 index 0000000..43dd198 --- /dev/null +++ b/timeshift-boot.service @@ -0,0 +1,15 @@ +[Unit] +Description=Timeshift Snapshots for Boot +Documentation=man:timeshift(1) + +[Service] +Type=simple +ExecStart=/usr/bin/timeshift --create --scripted --tags B + +CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_FOWNER CAP_CHOWN CAP_FSETID CAP_SETFCAP CAP_SYS_ADMIN CAP_SYS_MODULE CAP_IPC_LOCK CAP_SYS_NICE +LockPersonality=true +NoNewPrivileges=false +PrivateNetwork=true +ProtectHostname=true +RestrictAddressFamilies=AF_UNIX +RestrictRealtime=true \ No newline at end of file diff --git a/timeshift-boot.timer b/timeshift-boot.timer new file mode 100644 index 0000000..3ea71fb --- /dev/null +++ b/timeshift-boot.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Hourly Timeshift check for snapshots +Documentation=man:timeshift(1) + +[Timer] +OnBootSec=600 +Persistent=true + +[Install] +WantedBy=timers.target \ No newline at end of file diff --git a/timeshift-hourly.service b/timeshift-hourly.service new file mode 100644 index 0000000..376b49d --- /dev/null +++ b/timeshift-hourly.service @@ -0,0 +1,15 @@ +[Unit] +Description=Timeshift Snapshots +Documentation=man:timeshift(1) + +[Service] +Type=simple +ExecStart=/usr/bin/timeshift --check --scripted + +CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_FOWNER CAP_CHOWN CAP_FSETID CAP_SETFCAP CAP_SYS_ADMIN CAP_SYS_MODULE CAP_IPC_LOCK CAP_SYS_NICE +LockPersonality=true +NoNewPrivileges=false +PrivateNetwork=true +ProtectHostname=true +RestrictAddressFamilies=AF_UNIX +RestrictRealtime=true \ No newline at end of file diff --git a/timeshift-hourly.timer b/timeshift-hourly.timer new file mode 100644 index 0000000..99afa9b --- /dev/null +++ b/timeshift-hourly.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Hourly Timeshift check for snapshots +Documentation=man:timeshift(1) + +[Timer] +OnCalendar=hourly +Persistent=true + +[Install] +WantedBy=timers.target \ No newline at end of file diff --git a/timeshift.spec b/timeshift.spec new file mode 100644 index 0000000..d5af8ad --- /dev/null +++ b/timeshift.spec @@ -0,0 +1,82 @@ +Name: timeshift +Version: 24.06.3 +Release: 1mamba +Summary: System restore tool for Linux +Group: System/ +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://github.com/linuxmint/timeshift +Source: https://github.com/linuxmint/timeshift.git/%{version}/timeshift-%{version}.tar.bz2 +Source1: timeshift-boot.service +Source2: timeshift-boot.timer +Source3: timeshift-hourly.service +Source4: timeshift-hourly.timer +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libcairo-devel +BuildRequires: libgdk-pixbuf-devel +BuildRequires: libgee-devel +BuildRequires: libglib-devel +BuildRequires: libgtk3-devel +BuildRequires: libjson-glib-devel +BuildRequires: libvte-devel +BuildRequires: libxapp-devel +## AUTOBUILDREQ-END +BuildRequires: meson +Requires: rsync + +%description +System restore tool for Linux. Creates filesystem snapshots using rsync+hardlinks, or BTRFS snapshots. +Supports scheduled snapshots, multiple backup levels, and exclude filters. +Snapshots can be restored while system is running or from Live CD/USB. + +%debug_package + +%prep +%setup -q + +%build +%meson +%meson_build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%meson_install + +install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/timeshift-boot.service +install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/timeshift-boot.timer +install -D -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/timeshift-hourly.service +install -D -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/timeshift-hourly.timer + +%find_lang %{name} || touch %{name}.lang + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files -f %{name}.lang +%defattr(-,root,root) +%{_sysconfdir}/timeshift/default.json +%{_bindir}/timeshift +%{_bindir}/timeshift-gtk +%{_bindir}/timeshift-launcher +%{_datadir}/applications/timeshift-gtk.desktop +%{_metainfodir}/timeshift.appdata.xml +%{_datadir}/polkit-1/actions/in.teejeetech.pkexec.timeshift.policy +%{_unitdir}/timeshift-boot.service +%{_unitdir}/timeshift-boot.timer +%{_unitdir}/timeshift-hourly.service +%{_unitdir}/timeshift-hourly.timer +%{_datadir}/pixmaps/timeshift.png +%dir %{_datadir}/timeshift +%dir %{_datadir}/timeshift/images +%{_datadir}/timeshift/images/* +%{_datadir}/icons/hicolor/*/apps/timeshift.png +%{_mandir}/man1/timeshift-gtk.1* +%{_mandir}/man1/timeshift.1* +%doc AUTHORS LICENSES + +%changelog +* Wed Nov 06 2024 Silvan Calarco 24.06.3-1mamba +- package created using the webbuild interface