Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 446680

Summary: sys-fs/snapper - a tool for managing btrfs snapshots
Product: Gentoo Linux Reporter: daktak <daktak>
Component: New packagesAssignee: Default Assignee for New Packages <maintainer-wanted>
Severity: enhancement CC: dlan, holger, kroemmelbein, mike, mlischka, pastas4, rich0
Priority: Normal Keywords: EBUILD, InOverlay
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: [sunrise-overlay]
Package list:
Runtime testing required: ---
Attachments: snapper-9999.ebuild

Description daktak 2012-12-10 02:41:35 UTC
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.

Reproducible: Always
Comment 1 Dainius Masiliūnas 2013-02-11 07:27:14 UTC
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.
Comment 2 Dainius Masiliūnas 2013-02-11 07:31:27 UTC
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:

This patch should be added to the "files" directory.
Comment 3 Dainius Masiliūnas 2013-02-11 07:32:55 UTC
Created attachment 338578 [details]

The metadata file. Includes information about upstream.
Comment 4 Dainius Masiliūnas 2013-02-11 07:35:30 UTC
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.
Comment 5 Dainius Masiliūnas 2013-02-13 15:38:41 UTC
Created attachment 338778 [details]

Updated ebuild, since upstream fixed the portability issue that necessitated the use of a patch.
Comment 6 Dainius Masiliūnas 2013-03-03 08:08:35 UTC
Created attachment 340822 [details]

Updated the ebuild as per suggestions by Sunrise developers.
Comment 7 Dainius Masiliūnas 2013-03-10 13:35:28 UTC
Created attachment 341530 [details]

Another update following suggestions from the developers.
Comment 8 Dainius Masiliūnas 2013-03-10 20:46:45 UTC
Created attachment 341600 [details]

Final update to the ebuild before submitting to the sunrise overlay.
Comment 9 Dainius Masiliūnas 2013-03-22 21:07:13 UTC
Created attachment 342940 [details]

This ebuild is now in the Sunrise overlay. You can find it here:;a=tree;f=app-backup/snapper

Also updated the metadata.xml file here to match the one on the overlay.
Comment 10 Richard Freeman gentoo-dev 2013-08-25 12:16:05 UTC
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.
Comment 11 Dainius Masiliūnas 2013-08-25 12:21:13 UTC
Yes, I noticed that, but haven't had the time to add a patch for it just yet.
Comment 12 Dainius Masiliūnas 2014-02-19 13:53:54 UTC
Created attachment 370768 [details, diff]

Added a patch for enabling the proper functioning of timeline snapshoting and snapshot autoclean.
Comment 13 Dainius Masiliūnas 2014-02-19 13:56:22 UTC
Created attachment 370770 [details]

Attached an update for the live ebuild to make use of the cron file patch.
Comment 14 Dainius Masiliūnas 2014-02-19 13:58:20 UTC
Created attachment 370772 [details]

Updated metadata.xml to conform to the new maintainer tag ordering rules, as suggested by repoman.
Comment 15 Dainius Masiliūnas 2014-02-19 14:01:00 UTC
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.
Comment 16 Yixun Lan archtester gentoo-dev 2014-05-16 02:32:17 UTC
hello, Dainius Masiliūnas..

would you like to become maintainer of this package? I could help to proxy-maint this, see here[1] 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.

Comment 17 Dainius Masiliūnas 2014-05-16 05:27:14 UTC
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.
Comment 18 Yixun Lan archtester gentoo-dev 2014-05-21 02:53:55 UTC
+*snapper-9999 (21 May 2014)
+*snapper-0.2.2 (21 May 2014)
+  21 May 2014; Yixun Lan <> +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