Hello community,
here is the log from the commit of package yast2-storage for openSUSE:Factory
checked in at 2014-07-18 13:49:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-storage (Old)
and /work/SRC/openSUSE:Factory/.yast2-storage.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-storage"
Changes:
--------
Old:
----
yast2-storage-3.1.37.tar.bz2
New:
----
yast2-storage-3.1.37a.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage.spec ++++++
--- /var/tmp/diff_new_pack.qkrfCH/_old 2014-07-18 13:49:06.000000000 +0200
+++ /var/tmp/diff_new_pack.qkrfCH/_new 2014-07-18 13:49:06.000000000 +0200
@@ -21,7 +21,7 @@
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: %{name}-%{version}.tar.bz2
+Source0: %{name}-%{version}a.tar.bz2
BuildRequires: docbook-xsl-stylesheets
BuildRequires: doxygen
++++++ yast2-storage-3.1.37.tar.bz2 -> yast2-storage-3.1.37a.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-storage-3.1.37/src/modules/StorageUtils.rb
new/yast2-storage-3.1.37/src/modules/StorageUtils.rb
--- old/yast2-storage-3.1.37/src/modules/StorageUtils.rb 2014-07-10
12:59:28.000000000 +0200
+++ new/yast2-storage-3.1.37/src/modules/StorageUtils.rb 2014-07-18
11:56:32.000000000 +0200
@@ -52,11 +52,6 @@
"NUMBER_CLEANUP=yes NUMBER_LIMIT=10
NUMBER_LIMIT_IMPORTANT=10 " <<
"TIMELINE_CREATE=no")
SCR.Write(path(".sysconfig.yast2.USE_SNAPPER"), "yes")
-
- SCR.Execute(path(".target.bash"), "/sbin/btrfs quota enable /")
- SCR.Execute(path(".target.bash"), "/sbin/btrfs qgroup create 1/0
/")
- SCR.Execute(path(".target.bash"), "/usr/bin/snapper --no-dbus
set-config QGROUP=1/0")
-
SCR.Write(path(".sysconfig.yast2"), nil)
else
log.error("configuring snapper for root fs failed")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-3.1.37/src/modules/StorageUtils.rb.orig
new/yast2-storage-3.1.37/src/modules/StorageUtils.rb.orig
--- old/yast2-storage-3.1.37/src/modules/StorageUtils.rb.orig 1970-01-01
01:00:00.000000000 +0100
+++ new/yast2-storage-3.1.37/src/modules/StorageUtils.rb.orig 2014-07-10
12:59:28.000000000 +0200
@@ -0,0 +1,73 @@
+# encoding: utf-8
+
+# Copyright (c) [2012-2014] Novell, Inc.
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact Novell, Inc.
+#
+# To contact Novell about this file by physical or electronic mail, you may
+# find current contact information at www.novell.com.
+
+
+require "yast"
+
+
+module Yast
+
+ class StorageUtilsClass < Module
+
+
+ include Yast::Logger
+
+
+ def main
+
+ textdomain "storage"
+
+ Yast.import "Storage"
+
+ end
+
+
+ def ConfigureSnapper()
+ part = Storage.GetEntryForMountpoint("/")
+ if part.fetch("used_fs", :unknown) == :btrfs
+ userdata = part.fetch("userdata", {})
+ if userdata.fetch("/", "") == "snapshots"
+ log.info("configuring snapper for root fs")
+ if SCR.Execute(path(".target.bash"), "/usr/bin/snapper --no-dbus
create-config " <<
+ "--fstype=btrfs --add-fstab /") == 0
+ SCR.Execute(path(".target.bash"), "/usr/bin/snapper --no-dbus
set-config " <<
+ "NUMBER_CLEANUP=yes NUMBER_LIMIT=10
NUMBER_LIMIT_IMPORTANT=10 " <<
+ "TIMELINE_CREATE=no")
+ SCR.Write(path(".sysconfig.yast2.USE_SNAPPER"), "yes")
+
+ SCR.Execute(path(".target.bash"), "/sbin/btrfs quota enable /")
+ SCR.Execute(path(".target.bash"), "/sbin/btrfs qgroup create 1/0
/")
+ SCR.Execute(path(".target.bash"), "/usr/bin/snapper --no-dbus
set-config QGROUP=1/0")
+
+ SCR.Write(path(".sysconfig.yast2"), nil)
+ else
+ log.error("configuring snapper for root fs failed")
+ end
+ end
+ end
+ end
+
+ end
+
+ StorageUtils = StorageUtilsClass.new
+ StorageUtils.main
+
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-3.1.37/test/storage_utils_configure_snapper_test.rb
new/yast2-storage-3.1.37/test/storage_utils_configure_snapper_test.rb
--- old/yast2-storage-3.1.37/test/storage_utils_configure_snapper_test.rb
2014-07-10 12:59:28.000000000 +0200
+++ new/yast2-storage-3.1.37/test/storage_utils_configure_snapper_test.rb
2014-07-18 11:56:33.000000000 +0200
@@ -22,7 +22,7 @@
Yast::Storage.stub(:GetEntryForMountpoint).with("/").once.and_return(data)
Yast::SCR.stub(:Execute).and_return(1)
- Yast::SCR.should_receive(:Execute).exactly(5).times.and_return(0)
+ Yast::SCR.should_receive(:Execute).exactly(2).times.and_return(0)
Yast::SCR.stub(:Write).and_return(1)
Yast::SCR.should_receive(:Write).exactly(2).times.and_return(0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-3.1.37/test/storage_utils_configure_snapper_test.rb.orig
new/yast2-storage-3.1.37/test/storage_utils_configure_snapper_test.rb.orig
--- old/yast2-storage-3.1.37/test/storage_utils_configure_snapper_test.rb.orig
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-storage-3.1.37/test/storage_utils_configure_snapper_test.rb.orig
2014-07-10 12:59:28.000000000 +0200
@@ -0,0 +1,56 @@
+#!/usr/bin/rspec
+
+ENV["Y2DIR"] = File.expand_path("../../src", __FILE__)
+
+require "yast"
+
+Yast.import "StorageUtils"
+
+
+describe "StorageUtils#ConfigureSnapper" do
+
+
+ it "configures snapper" do
+
+ data = {
+ "device" => "/dev/sda1",
+ "mount" => "/",
+ "used_fs" => :btrfs,
+ "userdata" => { "/" => "snapshots" }
+ }
+
+ Yast::Storage.stub(:GetEntryForMountpoint).with("/").once.and_return(data)
+
+ Yast::SCR.stub(:Execute).and_return(1)
+ Yast::SCR.should_receive(:Execute).exactly(5).times.and_return(0)
+
+ Yast::SCR.stub(:Write).and_return(1)
+ Yast::SCR.should_receive(:Write).exactly(2).times.and_return(0)
+
+ Yast::StorageUtils.ConfigureSnapper()
+
+ end
+
+
+ it "does not configure snapper" do
+
+ data = {
+ "device" => "/dev/sda1",
+ "mount" => "/",
+ "used_fs" => :btrfs
+ }
+
+ Yast::Storage.stub(:GetEntryForMountpoint).with("/").once.and_return(data)
+
+ Yast::SCR.stub(:Execute).and_return(1)
+ Yast::SCR.should_receive(:Execute).exactly(0).times
+
+ Yast::SCR.stub(:Write).and_return(1)
+ Yast::SCR.should_receive(:Write).exactly(0).times
+
+ Yast::StorageUtils.ConfigureSnapper()
+
+ end
+
+
+end
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]