From 126c8b01bf4931afffb461c6a7bd49f74e81516b Mon Sep 17 00:00:00 2001 From: Antonio Leal Date: Fri, 1 Jul 2022 21:52:52 +0100 Subject: system/timeshift: Added (incremental snapshots, backup and restore) Signed-off-by: Dave Woodfall Signed-off-by: Willy Sudiarto Raharjo --- system/timeshift/README | 15 ++++ system/timeshift/doinst.sh | 13 ++++ system/timeshift/slack-desc | 19 +++++ system/timeshift/timeshift-gtk.desktop.patch | 37 ++++++++++ system/timeshift/timeshift.1.gz | Bin 0 -> 1380 bytes system/timeshift/timeshift.SlackBuild | 101 +++++++++++++++++++++++++++ system/timeshift/timeshift.info | 10 +++ 7 files changed, 195 insertions(+) create mode 100644 system/timeshift/README create mode 100644 system/timeshift/doinst.sh create mode 100644 system/timeshift/slack-desc create mode 100644 system/timeshift/timeshift-gtk.desktop.patch create mode 100644 system/timeshift/timeshift.1.gz create mode 100644 system/timeshift/timeshift.SlackBuild create mode 100644 system/timeshift/timeshift.info diff --git a/system/timeshift/README b/system/timeshift/README new file mode 100644 index 0000000000..f0c2550934 --- /dev/null +++ b/system/timeshift/README @@ -0,0 +1,15 @@ +Timeshift for Linux is an application that provides functionality +similar to the System Restore feature in Windows and the Time Machine +tool in Mac OS. Timeshift protects your system by taking incremental +snapshots of the file system at regular intervals. These snapshots +can be restored at a later date to undo all changes to the system. + +In RSYNC mode, snapshots are taken using rsync and hard-links. +Common files are shared between snapshots which saves disk space. +Each snapshot is a full system backup that can be browsed with a +file manager. + +In BTRFS mode, snapshots are taken using the in-built features +of the BTRFS filesystem. BTRFS snapshots are supported only on +BTRFS systems having an Ubuntu-type subvolume layout +(with @ and @home subvolumes). diff --git a/system/timeshift/doinst.sh b/system/timeshift/doinst.sh new file mode 100644 index 0000000000..aea0f894eb --- /dev/null +++ b/system/timeshift/doinst.sh @@ -0,0 +1,13 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/system/timeshift/slack-desc b/system/timeshift/slack-desc new file mode 100644 index 0000000000..e734d874d4 --- /dev/null +++ b/system/timeshift/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +timeshift: timeshift (incremental system snapshots, backup and restore) +timeshift: +timeshift: Timeshift for Linux is an application that provides functionality +timeshift: similar to the System Restore feature in Windows and the Time Machine +timeshift: tool in Mac OS. Timeshift protects your system by taking incremental +timeshift: snapshots of the file system at regular intervals. These snapshots +timeshift: can be restored at a later date to undo all changes to the system. +timeshift: +timeshift: +timeshift: +timeshift: diff --git a/system/timeshift/timeshift-gtk.desktop.patch b/system/timeshift/timeshift-gtk.desktop.patch new file mode 100644 index 0000000000..a455ffe5cc --- /dev/null +++ b/system/timeshift/timeshift-gtk.desktop.patch @@ -0,0 +1,37 @@ +--- timeshift-gtk.desktop 2022-06-19 15:59:11.318649676 +0100 ++++ timeshift-gtk.desktop.new 2022-06-24 21:02:22.164013886 +0100 +@@ -1,8 +1,7 @@ + [Desktop Entry] ++Type=Application + Name=Timeshift +-MimeType= + Exec=timeshift-launcher +-Type=Application + GenericName=System Restore Utility + GenericName[ca]=Utilitat de restauració del sistema + GenericName[cs]=Nástroj pro obnovení systému +@@ -14,15 +13,15 @@ + GenericName[ru]=Программа для восстановления системы + Terminal=false + Icon=timeshift +-Comment=System Restore Utility +-Comment[ca]=Utilitat de restauració del sistema +-Comment[cs]=Nástroj pro obnovení systému +-Comment[da]=Værktøj til systemgendannelse +-Comment[fr]=Utilitaire de restauration système +-Comment[hr]=Alat obnove sustava +-Comment[lt]=Sistemos atkūrimo paslaugų programa +-Comment[nl]=Hulpmiddel voor systeemherstel +-Comment[ru]=Программа для восстановления системы ++Comment=Timeshift restores your system to an earlier backup ++Comment[ca]=Timeshift restaura el sistema a una còpia de seguretat anterior ++Comment[cs]=Timeshift obnoví váš systém do dřívější zálohy ++Comment[da]=Timeshift gendanner dit system til en tidligere sikkerhedskopi ++Comment[fr]=Timeshift restaure votre système à une sauvegarde antérieure ++Comment[hr]=Timeshift vraća vaš sustav na raniju sigurnosnu kopiju ++Comment[lt]=Timeshift atkuria jūsų sistemos ankstesnę atsarginę kopiją ++Comment[nl]=Timeshift herstelt uw systeem naar een eerdere back-up ++Comment[ru]=Timeshift восстанавливает вашу систему до более ранней резервной копии + X-KDE-StartupNotify=false + Categories=System; + X-GNOME-UsesNotifications=true diff --git a/system/timeshift/timeshift.1.gz b/system/timeshift/timeshift.1.gz new file mode 100644 index 0000000000..d6ff866612 Binary files /dev/null and b/system/timeshift/timeshift.1.gz differ diff --git a/system/timeshift/timeshift.SlackBuild b/system/timeshift/timeshift.SlackBuild new file mode 100644 index 0000000000..44f4a91ffb --- /dev/null +++ b/system/timeshift/timeshift.SlackBuild @@ -0,0 +1,101 @@ +#!/bin/bash + +# Slackware build script for notepadqq + +# Copyright 2022 Antonio Leal, Porto Salvo, Oeiras, Portugal +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=timeshift +VERSION=${VERSION:-22.06.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +make +make install DESTDIR=$PKG + +# sbopkglint corrections: +rm -rf $PKG/usr/share/man +mkdir -p $PKG/usr/man/man1 +cp $CWD/timeshift.1.gz $PKG/usr/man/man1 +chmod -x $PKG/usr/share/pixmaps/* +chmod -x $PKG/usr/share/applications/* +patch $PKG/usr/share/applications/timeshift-gtk.desktop $CWD/timeshift-gtk.desktop.patch + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/timeshift/timeshift.info b/system/timeshift/timeshift.info new file mode 100644 index 0000000000..325eae5a13 --- /dev/null +++ b/system/timeshift/timeshift.info @@ -0,0 +1,10 @@ +PRGNAM="timeshift" +VERSION="22.06.1" +HOMEPAGE="https://github.com/teejee2008/timeshift" +DOWNLOAD="https://github.com/teejee2008/timeshift/archive/v22.06.1/timeshift-22.06.1.tar.gz" +MD5SUM="6c1e50946ab89c99e71f66b64f7234dc" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Antonio Leal" +EMAIL="antonioleal@yahoo.com" -- cgit v1.2.3