Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 446680 - sys-fs/snapper - a tool for managing btrfs snapshots
Summary: sys-fs/snapper - a tool for managing btrfs snapshots
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Default Assignee for New Packages
URL: http://en.opensuse.org/Portal:Snapper
Whiteboard: [sunrise-overlay]
Keywords: EBUILD, InOverlay
Depends on:
Blocks:
 
Reported: 2012-12-10 02:41 UTC by daktak
Modified: 2014-05-21 02:53 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
snapper-9999.ebuild (snapper-9999.ebuild,1.85 KB, text/plain)
2013-02-11 07:27 UTC, Dainius Masiliūnas
Details
snapper-use-conf-d.patch (snapper-use-conf-d.patch,606 bytes, text/plain)
2013-02-11 07:31 UTC, Dainius Masiliūnas
Details
metadata.xml (metadata.xml,712 bytes, text/plain)
2013-02-11 07:32 UTC, Dainius Masiliūnas
Details
snapper-9999.ebuild (snapper-9999.ebuild,1.88 KB, text/plain)
2013-02-13 15:38 UTC, Dainius Masiliūnas
Details
snapper-9999.ebuild (snapper-9999.ebuild,1.58 KB, text/plain)
2013-03-03 08:08 UTC, Dainius Masiliūnas
Details
snapper-9999.ebuild (snapper-9999.ebuild,1.49 KB, text/plain)
2013-03-10 13:35 UTC, Dainius Masiliūnas
Details
snapper-9999.ebuild (snapper-9999.ebuild,1.39 KB, text/plain)
2013-03-10 20:46 UTC, Dainius Masiliūnas
Details
metadata.xml (metadata.xml,791 bytes, text/xml)
2013-03-22 21:07 UTC, Dainius Masiliūnas
Details
cron-confd.patch (cron-confd.patch,915 bytes, patch)
2014-02-19 13:53 UTC, Dainius Masiliūnas
Details | Diff
snapper-9999.ebuild (snapper-9999.ebuild,1.46 KB, text/plain)
2014-02-19 13:56 UTC, Dainius Masiliūnas
Details
metadata.xml (metadata.xml,711 bytes, text/xml)
2014-02-19 13:58 UTC, Dainius Masiliūnas
Details
snapper-0.2.1.ebuild (snapper-0.2.1.ebuild,1.40 KB, text/plain)
2014-02-19 14:01 UTC, Dainius Masiliūnas
Details

Note You need to log in before you can comment on or make changes to this bug.
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. 

http://en.opensuse.org/Portal:Snapper

https://build.opensuse.org/project/show?project=filesystems%3Asnapper

Reproducible: Always
Comment 1 Dainius Masiliūnas 2013-02-11 07:27:14 UTC
Created attachment 338574 [details]
snapper-9999.ebuild

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]
snapper-use-conf-d.patch

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.
Comment 3 Dainius Masiliūnas 2013-02-11 07:32:55 UTC
Created attachment 338578 [details]
metadata.xml

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]
snapper-9999.ebuild

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]
snapper-9999.ebuild

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]
snapper-9999.ebuild

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

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]
metadata.xml

This ebuild is now in the Sunrise overlay. You can find it here:
http://git.overlays.gentoo.org/gitweb/?p=proj/sunrise-reviewed.git;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]
cron-confd.patch

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]
snapper-9999.ebuild

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]
metadata.xml

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]
snapper-0.2.1.ebuild

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 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.

[1] http://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
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 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 <dlan@gentoo.org> +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