Snapper is a tool for managing btrfs snapshots. Apart from the obvious creation and deletion of snapshots it can compare snapshots and revert differences between snapshots. In simple terms, this allows root and non-root users to view older versions of files and revert changes. Snapper is available as a command line tool and a YaST module.
The first openSUSE distribution to include snapper is 12.1.
Created attachment 338574 [details]
Here is an ebuild I wrote for Snapper. I tested it, and everything worked out fine, although the upstream package is not very friendly to the system in Gentoo. For one, they expect the user to run autoconf and automake themselves, instead of directly providing a generated configure script. That means that for now installing it causes a few QA warnings to be displayed.
This ebuild is for automatically getting the git version. Upstream does not have tags that denote releases, although I suppose that it would be possible to manually pick needed commits (once the VERSION or LIBVERSION files are changed).
Also, for now it does not have any USE flags. It seems that that the generated configure file does allow for some "--disable" calls, although I'm not sure how meaningful they are.
Created attachment 338576 [details]
This is a patch necessary for correct behaviour of Snapper. Unfortunately, in upstream they have "/etc/sysconfig" hardcoded as the configuration directory. In Gentoo and some others, it's "/etc/conf.d". So without this patch, Snapper would immediately fail as it would not be able to find its configuration file.
I have submitted a bug request upstream for this issue, you can track it here: https://bugzilla.novell.com/show_bug.cgi?id=803001
This patch should be added to the "files" directory.
Created attachment 338578 [details]
The metadata file. Includes information about upstream.
Added an ebuild. However, I'm not sure whether sys-fs category is really appropriate for a tool like that. I would suggest using app-backup instead, as it is for all intents and purposes a program for creating backups.
Created attachment 338778 [details]
Updated ebuild, since upstream fixed the portability issue that necessitated the use of a patch.
Created attachment 340822 [details]
Updated the ebuild as per suggestions by Sunrise developers.
Created attachment 341530 [details]
Another update following suggestions from the developers.
Created attachment 341600 [details]
Final update to the ebuild before submitting to the sunrise overlay.
Created attachment 342940 [details]
This ebuild is now in the Sunrise overlay. You can find it here:
Also updated the metadata.xml file here to match the one on the overlay.
Your cron script should source /etc/conf.d/snapper - right now it only points to sysconfig where no config data is stored. This will make timeline snapshots possible.
Yes, I noticed that, but haven't had the time to add a patch for it just yet.
Created attachment 370768 [details, diff]
Added a patch for enabling the proper functioning of timeline snapshoting and snapshot autoclean.
Created attachment 370770 [details]
Attached an update for the live ebuild to make use of the cron file patch.
Created attachment 370772 [details]
Updated metadata.xml to conform to the new maintainer tag ordering rules, as suggested by repoman.
Created attachment 370774 [details]
Attached a new non-live ebuild of Snapper, as upstream is now offering these as well. This is for the latest (at present) version of Snapper.
hello, Dainius Masiliūnas..
would you like to become maintainer of this package? I could help to proxy-maint this, see here for more information. I'm interested in this package too and thinking about moving into portage tree, let me know what's your idea here.
I wouldn't mind becoming a maintainer.
Also note that the latest changes I submitted still don't seem to have hit the Sunrise reviewed tree yet... In fact, the tree hasn't been updated for three months at all. I'll see if I can find out what is going on there.
+*snapper-9999 (21 May 2014)
+*snapper-0.2.2 (21 May 2014)
+ 21 May 2014; Yixun Lan <email@example.com> +snapper-0.2.2.ebuild,
+ +snapper-9999.ebuild, +files/cron-confd.patch, +metadata.xml:
+ initial version, contributed by Dainius Masiliūnas (GreatEmerald), polished
+ by me