Hello community,
here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2014-03-06 19:29:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
and /work/SRC/openSUSE:Factory/.yast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2014-03-01 14:38:15.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2014-03-06 19:29:43.000000000 +0100
@@ -1,0 +2,13 @@
+Thu Mar 6 07:48:29 UTC 2014 - vmoravec@suse.com
+
+- Add systemd service support; needed by fate#314946
+- 3.1.22
+
+-------------------------------------------------------------------
+Tue Mar 4 12:20:41 UTC 2014 - vmoravec@suse.com
+
+- Allow the Service module to configure services witout
+ systemd unit files (bnc#864934)
+- 3.1.21
+
+-------------------------------------------------------------------
Old:
----
yast2-3.1.20.tar.bz2
New:
----
yast2-3.1.22.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.sMlKf5/_old 2014-03-06 19:29:44.000000000 +0100
+++ /var/tmp/diff_new_pack.sMlKf5/_new 2014-03-06 19:29:44.000000000 +0100
@@ -17,8 +17,9 @@
Name: yast2
-Version: 3.1.20
+Version: 3.1.22
Release: 0
+Url: https://github.com/yast/yast-yast2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
@@ -225,10 +226,12 @@
%{yast_scrconfdir}/*
%{yast_ybindir}/*
%{yast_agentdir}/ag_*
-%{_sysconfdir}/bash_completion.d/yast2*.sh
-%{_sysconfdir}/YaST2/XVersion
/var/adm/fillup-templates/sysconfig.yast2
+# configuration files
+%config %{_sysconfdir}/bash_completion.d/yast2*.sh
+%config %{_sysconfdir}/YaST2/XVersion
+
# documentation (not included in devel subpackage)
%doc %dir %{yast_docdir}
%doc %{yast_docdir}/COPYING
++++++ yast2-3.1.20.tar.bz2 -> yast2-3.1.22.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/runlevel/src/modules/Service.rb new/yast2-3.1.22/library/runlevel/src/modules/Service.rb
--- old/yast2-3.1.20/library/runlevel/src/modules/Service.rb 2014-02-27 10:56:49.000000000 +0100
+++ new/yast2-3.1.22/library/runlevel/src/modules/Service.rb 2014-03-06 09:38:04.000000000 +0100
@@ -108,8 +108,6 @@
return false
end
- service_exists = false
-
possible_service_locations = Builtins.add(
# all known $service.service locations
Builtins.maplist(@systemd_dirs) do |directory|
@@ -202,8 +200,6 @@
# @param [String] name service name
# @return true if service is set to run in any runlevel
def Enabled(name)
- return false if !checkExists(name)
-
SCR.Execute(
path(".target.bash"),
Builtins.sformat("%1 is-enabled %2.service", @invoker, name)
@@ -234,7 +230,6 @@
# @param [String] name name of the service
# @return init script exit status or -1 if it does not exist
def Status(name)
- return -1 if !checkExists(name)
Convert.to_integer(
SCR.Execute(
path(".target.bash"),
@@ -295,11 +290,6 @@
# defaults.
# @return [Boolean] success state
def Adjust(name, action)
- if !checkExists(name)
- Builtins.y2error("Service %1 does not exist.", name)
- return false
- end
-
is_enabled = Enabled(name)
if action == "disable"
@@ -509,7 +499,6 @@
# @param [String] service service to be enabled
# @return true if operation is successful
def Enable(service)
- return false if !checkExists(service)
Builtins.y2milestone("Enabling service %1", service)
Adjust(service, "enable")
end
@@ -518,7 +507,6 @@
# @param [String] service service to be disabled
# @return true if operation is successful
def Disable(service)
- return false if !checkExists(service)
Builtins.y2milestone("Disabling service %1", service)
Adjust(service, "disable")
end
@@ -527,8 +515,6 @@
# @param [String] service service to be started
# @return true if operation is successful
def Start(service)
- return false if !checkExists(service)
- ret = nil
Builtins.y2milestone("Starting service %1", service)
ret = RunInitScript(service, "start")
Builtins.y2debug("ret=%1", ret)
@@ -539,8 +525,6 @@
# @param [String] service service to be restarted
# @return true if operation is successful
def Restart(service)
- return false if !checkExists(service)
- ret = nil
Builtins.y2milestone("Restarting service %1", service)
ret = RunInitScript(service, "restart")
Builtins.y2debug("ret=%1", ret)
@@ -551,8 +535,6 @@
# @param [String] service service to be reloaded
# @return true if operation is successful
def Reload(service)
- return false if !checkExists(service)
- ret = nil
Builtins.y2milestone("Reloading service %1", service)
ret = RunInitScript(service, "reload")
Builtins.y2debug("ret=%1", ret)
@@ -563,8 +545,6 @@
# @param [String] service service to be stopped
# @return true if operation is successful
def Stop(service)
- return false if !checkExists(service)
- ret = nil
Builtins.y2milestone("Stopping service %1", service)
ret = RunInitScript(service, "stop")
Builtins.y2debug("ret=%1", ret)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/runlevel/testsuite/tests/GetSetServiceStatus.out new/yast2-3.1.22/library/runlevel/testsuite/tests/GetSetServiceStatus.out
--- old/yast2-3.1.20/library/runlevel/testsuite/tests/GetSetServiceStatus.out 2014-02-27 10:56:49.000000000 +0100
+++ new/yast2-3.1.22/library/runlevel/testsuite/tests/GetSetServiceStatus.out 2014-03-06 09:38:04.000000000 +0100
@@ -1,14 +1,7 @@
Read .target.tmpdir "/tmp"
-Read .target.stat "/usr/lib/systemd/system/iscsid.service" $["isreg":true]
Execute .target.bash "/bin/systemctl is-enabled iscsid.service" 0
Return true
-Read .target.stat "/usr/lib/systemd/system/boot.iscsid-early.service" $["isreg":true]
-Read .target.stat "/usr/lib/systemd/system/boot.iscsid-early.service" $["isreg":true]
-Read .target.stat "/usr/lib/systemd/system/boot.iscsid-early.service" $["isreg":true]
Execute .target.bash "/bin/systemctl is-enabled boot.iscsid-early.service" 0
Return true
-Read .target.stat "/usr/lib/systemd/system/iscsid.service" $["isreg":true]
-Read .target.stat "/usr/lib/systemd/system/iscsid.service" $["isreg":true]
-Read .target.stat "/usr/lib/systemd/system/iscsid.service" $["isreg":true]
Execute .target.bash "/bin/systemctl is-enabled iscsid.service" 0
Return true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/runlevel/testsuite/tests/ServiceAdjust.out new/yast2-3.1.22/library/runlevel/testsuite/tests/ServiceAdjust.out
--- old/yast2-3.1.20/library/runlevel/testsuite/tests/ServiceAdjust.out 2014-02-27 10:56:49.000000000 +0100
+++ new/yast2-3.1.22/library/runlevel/testsuite/tests/ServiceAdjust.out 2014-03-06 09:38:04.000000000 +0100
@@ -1,35 +1,20 @@
Read .target.tmpdir "/tmp"
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $[]
-Read .target.stat "/run/systemd/system/aaa.service" $[]
-Read .target.stat "/etc/systemd/system/aaa.service" $[]
-Read .target.stat "/etc/init.d/aaa" $[]
-Log Service aaa does not exist.
-Return false
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
Execute .target.bash "/bin/systemctl is-enabled aaa.service" 0
Execute .target.bash_output "/bin/systemctl disable aaa.service" $["exit":0, "stderr":"", "stdout":""]
Return true
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
Execute .target.bash "/bin/systemctl is-enabled aaa.service" 0
Execute .target.bash_output "/bin/systemctl disable aaa.service" $["exit":0, "stderr":"", "stdout":""]
Return true
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
+Execute .target.bash "/bin/systemctl is-enabled aaa.service" 0
+Execute .target.bash_output "/bin/systemctl disable aaa.service" $["exit":0, "stderr":"", "stdout":""]
+Return true
Execute .target.bash "/bin/systemctl is-enabled aaa.service" 0
Return true
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
Execute .target.bash "/bin/systemctl is-enabled aaa.service" 0
Return true
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
Execute .target.bash "/bin/systemctl is-enabled aaa.service" 0
Execute .target.bash_output "/bin/systemctl enable aaa.service" $["exit":0, "stderr":"", "stdout":""]
Return true
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
Execute .target.bash "/bin/systemctl is-enabled aaa.service" 0
Execute .target.bash_output "/bin/systemctl enable aaa.service" $["exit":0, "stderr":"", "stdout":""]
Return true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/runlevel/testsuite/tests/ServiceFinetune.out new/yast2-3.1.22/library/runlevel/testsuite/tests/ServiceFinetune.out
--- old/yast2-3.1.20/library/runlevel/testsuite/tests/ServiceFinetune.out 2014-02-27 10:56:49.000000000 +0100
+++ new/yast2-3.1.22/library/runlevel/testsuite/tests/ServiceFinetune.out 2014-03-06 09:38:04.000000000 +0100
@@ -1,8 +1,6 @@
Read .target.tmpdir "/tmp"
Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
Log Cannot enable service aaa (just) in selected runlevels, enabling in all default ones
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
Execute .target.bash "/bin/systemctl is-enabled aaa.service" 0
Return true
Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/runlevel/testsuite/tests/ServiceFullInfo.out new/yast2-3.1.22/library/runlevel/testsuite/tests/ServiceFullInfo.out
--- old/yast2-3.1.20/library/runlevel/testsuite/tests/ServiceFullInfo.out 2014-02-27 10:56:49.000000000 +0100
+++ new/yast2-3.1.22/library/runlevel/testsuite/tests/ServiceFullInfo.out 2014-03-06 09:38:04.000000000 +0100
@@ -4,6 +4,5 @@
Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
Read .init.scripts.runlevel "aaa" $["aaa":$["start":["0", "1", "3"], "stop":["4", "5", "6"]]]
Read .init.scripts.comment "aaa" $["aaa":$["defstart":["0", "1", "3"], "defstop":["4", "5", "6"]]]
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
Execute .target.bash "/bin/systemctl status aaa.service" $["TERM":"raw"] 3
Return $["defstart":["0", "1", "3"], "defstop":["4", "5", "6"], "start":["0", "1", "3"], "started":3, "stop":["4", "5", "6"]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/runlevel/testsuite/tests/ServiceStatus.out new/yast2-3.1.22/library/runlevel/testsuite/tests/ServiceStatus.out
--- old/yast2-3.1.20/library/runlevel/testsuite/tests/ServiceStatus.out 2014-02-27 10:56:49.000000000 +0100
+++ new/yast2-3.1.22/library/runlevel/testsuite/tests/ServiceStatus.out 2014-03-06 09:38:04.000000000 +0100
@@ -1,4 +1,3 @@
Read .target.tmpdir "/tmp"
-Read .target.stat "/usr/lib/systemd/system/aaa.service" $["isreg":true]
Execute .target.bash "/bin/systemctl status aaa.service" $["TERM":"raw"] 3
Return 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/systemd/src/lib/yast2/systemctl.rb new/yast2-3.1.22/library/systemd/src/lib/yast2/systemctl.rb
--- old/yast2-3.1.20/library/systemd/src/lib/yast2/systemctl.rb 2014-02-27 10:56:49.000000000 +0100
+++ new/yast2-3.1.22/library/systemd/src/lib/yast2/systemctl.rb 2014-03-06 09:38:04.000000000 +0100
@@ -15,16 +15,28 @@
def socket_units
sockets_from_files = list_unit_files(:type=>:socket).lines.map do |line|
- line[/\S+/]
+ first_column(line)
end
sockets_from_units = list_units(:type=>:socket).lines.map do |line|
- line[/\S+/]
+ first_column(line)
end
( sockets_from_files | sockets_from_units ).compact
end
+ def service_units
+ services_from_files = list_unit_files(:type=>:service).lines.map do |line|
+ first_column(line)
+ end
+
+ services_from_units = list_units(:type=>:service).lines.map do |line|
+ first_column(line)
+ end
+
+ ( services_from_files | services_from_units ).compact
+ end
+
private
def list_unit_files type: nil
@@ -39,6 +51,10 @@
command << " --type=#{type} " if type
execute(command).stdout
end
+
+ def first_column line
+ line[/\S+/]
+ end
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/systemd/src/lib/yast2/systemd_unit.rb new/yast2-3.1.22/library/systemd/src/lib/yast2/systemd_unit.rb
--- old/yast2-3.1.20/library/systemd/src/lib/yast2/systemd_unit.rb 2014-02-27 10:56:49.000000000 +0100
+++ new/yast2-3.1.22/library/systemd/src/lib/yast2/systemd_unit.rb 2014-03-06 09:38:04.000000000 +0100
@@ -51,8 +51,7 @@
extend Forwardable
- def_delegators :@properties, :id, :path,
- :active?, :enabled?, :running?, :loaded?
+ def_delegators :@properties, :id, :path, :description, :active?, :enabled?, :loaded?
attr_reader :unit_name, :unit_type, :input_properties, :errors, :properties
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/systemd/src/modules/systemd_service.rb new/yast2-3.1.22/library/systemd/src/modules/systemd_service.rb
--- old/yast2-3.1.20/library/systemd/src/modules/systemd_service.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.22/library/systemd/src/modules/systemd_service.rb 2014-03-06 09:38:04.000000000 +0100
@@ -0,0 +1,86 @@
+require 'yast2/systemd_unit'
+
+module Yast
+ ###
+ # Systemd.service unit control API
+ #
+ # @example How to use it in other yast libraries
+ #
+ # require 'yast'
+ #
+ # Yast.import 'SystemdService'
+ #
+ # ## Get a service unit by its name
+ #
+ # service = Yast::SystemdService.find('sshd')
+ # # or using the full unit id 'sshd.service'
+ # service = Yast::SystemdService.find('sshd.service')
+ #
+ # ## Get basic unit properties
+ #
+ # service.unit_name # 'sshd'
+ # service.unit_type # 'service'
+ # service.id # 'sshd.service'
+ # service.description # 'OpenSSH Daemon'
+ # service.path # '/usr/lib/systemd/system/sshd.service'
+ # service.loaded? # true if it's loaded, false otherwise
+ # service.running? # true if it's active and running
+ # service.enabled? # true if enabled, false otherwise
+ # service.disabled? # true if disabled, false otherwise
+ # service.status # the same text output you get with `systemctl status sshd.service`
+ # service.show # equivalent of calling `systemctl show sshd.service`
+ #
+ # ## Service unit file commands
+ #
+ # # Unit file commands do modifications on the service unit. Calling them triggers
+ # # service properties reloading. If a command fails, the error message is available
+ # # through the method #errors as a string.
+ #
+ # service.start # true if unit has been activated successfully
+ # service.stop # true if unit has been deactivated successfully
+ # service.enable # true if unit has been enabled successfully
+ # service.disable # true if unit has been disabled successfully
+ # service.errors # error string available if some of the actions above fails
+ #
+ # ## Extended service properties
+ #
+ # # In case you need more details about the service unit than the default ones,
+ # # you can extend the parameters for .find method. Those properties are
+ # # then available on the service unit object under the #properties instance method.
+ # # An extended property is always a string, you must convert it manually,
+ # # no automatical casting is done by yast.
+ # # To get an overview of available service properties, try e.g., `systemctl show sshd.service`
+ #
+ # service = Yast::SystemdService.find('sshd', :type=>'Type')
+ # service.properties.type # 'simple'
+ #
+ ##
+
+ class SystemdServiceClass < Module
+ UNIT_SUFFIX = ".service"
+
+ def find service_name, properties={}
+ service_name << UNIT_SUFFIX unless service_name.end_with?(UNIT_SUFFIX)
+ service = Service.new(service_name, properties)
+ return nil if service.properties.not_found?
+ service
+ end
+
+ def all properties={}
+ services = Systemctl.service_units.map do |service_unit|
+ Service.new(service_unit, properties)
+ end
+ end
+
+ class Service < SystemdUnit
+ def pid
+ properties.pid
+ end
+
+ def running?
+ properties.running?
+ end
+ end
+ end
+ SystemdService = SystemdServiceClass.new
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/systemd/test/data/sshd_service_properties new/yast2-3.1.22/library/systemd/test/data/sshd_service_properties
--- old/yast2-3.1.20/library/systemd/test/data/sshd_service_properties 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.22/library/systemd/test/data/sshd_service_properties 2014-03-06 09:38:04.000000000 +0100
@@ -0,0 +1,120 @@
+Id=sshd.service
+Names=sshd.service
+Requires=basic.target
+Wants=system.slice
+WantedBy=multi-user.target
+Conflicts=shutdown.target
+Before=shutdown.target multi-user.target
+After=network.target systemd-journald.socket basic.target system.slice
+Description=OpenSSH Daemon
+LoadState=loaded
+ActiveState=active
+SubState=running
+FragmentPath=/usr/lib/systemd/system/sshd.service
+UnitFileState=enabled
+InactiveExitTimestamp=St 2014-02-12 15:22:46 CET
+InactiveExitTimestampMonotonic=22172625
+ActiveEnterTimestamp=St 2014-02-12 15:22:46 CET
+ActiveEnterTimestampMonotonic=22184649
+ActiveExitTimestampMonotonic=0
+InactiveEnterTimestampMonotonic=0
+CanStart=yes
+CanStop=yes
+CanReload=yes
+CanIsolate=no
+StopWhenUnneeded=no
+RefuseManualStart=no
+RefuseManualStop=no
+AllowIsolate=no
+DefaultDependencies=yes
+OnFailureIsolate=no
+IgnoreOnIsolate=no
+IgnoreOnSnapshot=no
+NeedDaemonReload=no
+JobTimeoutUSec=0
+ConditionTimestamp=St 2014-02-12 15:22:46 CET
+ConditionTimestampMonotonic=22169870
+ConditionResult=yes
+Transient=no
+Slice=system.slice
+ControlGroup=/system.slice/sshd.service
+Type=simple
+Restart=always
+NotifyAccess=none
+RestartUSec=100ms
+TimeoutStartUSec=1min 30s
+TimeoutStopUSec=1min 30s
+WatchdogUSec=0
+WatchdogTimestampMonotonic=0
+StartLimitInterval=10000000
+StartLimitBurst=5
+StartLimitAction=none
+ExecStartPre={ path=/usr/sbin/sshd-gen-keys-start ; argv[]=/usr/sbin/sshd-gen-keys-start ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }
+ExecStart={ path=/usr/sbin/sshd ; argv[]=/usr/sbin/sshd -D $SSHD_OPTS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }
+ExecReload={ path=/bin/kill ; argv[]=/bin/kill -HUP $MAINPID ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }
+PermissionsStartOnly=no
+RootDirectoryStartOnly=no
+RemainAfterExit=no
+GuessMainPID=yes
+MainPID=2708
+ControlPID=0
+Result=success
+EnvironmentFile=/etc/sysconfig/ssh (ignore_errors=no)
+UMask=0022
+LimitCPU=18446744073709551615
+LimitFSIZE=18446744073709551615
+LimitDATA=18446744073709551615
+LimitSTACK=18446744073709551615
+LimitCORE=18446744073709551615
+LimitRSS=18446744073709551615
+LimitNOFILE=4096
+LimitAS=18446744073709551615
+LimitNPROC=7770
+LimitMEMLOCK=65536
+LimitLOCKS=18446744073709551615
+LimitSIGPENDING=7770
+LimitMSGQUEUE=819200
+LimitNICE=0
+LimitRTPRIO=0
+LimitRTTIME=18446744073709551615
+OOMScoreAdjust=0
+Nice=0
+IOScheduling=0
+CPUSchedulingPolicy=0
+CPUSchedulingPriority=0
+TimerSlackNSec=50000
+CPUSchedulingResetOnFork=no
+NonBlocking=no
+StandardInput=null
+StandardOutput=journal
+StandardError=inherit
+TTYReset=no
+TTYVHangup=no
+TTYVTDisallocate=no
+SyslogPriority=30
+SyslogLevelPrefix=yes
+SecureBits=0
+CapabilityBoundingSet=18446744073709551615
+MountFlags=0
+PrivateTmp=no
+PrivateNetwork=no
+SameProcessGroup=no
+IgnoreSIGPIPE=yes
+NoNewPrivileges=no
+KillMode=process
+KillSignal=15
+SendSIGKILL=yes
+SendSIGHUP=no
+CPUAccounting=no
+CPUShares=1024
+BlockIOAccounting=no
+BlockIOWeight=1000
+MemoryAccounting=no
+MemoryLimit=18446744073709551615
+DevicePolicy=auto
+ExecMainStartTimestamp=St 2014-02-12 15:22:46 CET
+ExecMainStartTimestampMonotonic=22184611
+ExecMainExitTimestampMonotonic=0
+ExecMainPID=2708
+ExecMainCode=0
+ExecMainStatus=0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/systemd/test/data/unknown_service_properties new/yast2-3.1.22/library/systemd/test/data/unknown_service_properties
--- old/yast2-3.1.20/library/systemd/test/data/unknown_service_properties 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.22/library/systemd/test/data/unknown_service_properties 2014-03-06 09:38:04.000000000 +0100
@@ -0,0 +1,102 @@
+Id=unknown.service
+Names=unknown.service
+Description=unknown.service
+LoadState=not-found
+ActiveState=inactive
+SubState=dead
+InactiveExitTimestampMonotonic=0
+ActiveEnterTimestampMonotonic=0
+ActiveExitTimestampMonotonic=0
+InactiveEnterTimestampMonotonic=0
+CanStart=yes
+CanStop=yes
+CanReload=no
+CanIsolate=no
+StopWhenUnneeded=no
+RefuseManualStart=no
+RefuseManualStop=no
+AllowIsolate=no
+DefaultDependencies=yes
+OnFailureIsolate=no
+IgnoreOnIsolate=no
+IgnoreOnSnapshot=no
+NeedDaemonReload=no
+JobTimeoutUSec=0
+ConditionTimestampMonotonic=0
+ConditionResult=no
+LoadError=org.freedesktop.DBus.Error.FileNotFound "No such file or directory"
+Transient=no
+Restart=no
+NotifyAccess=none
+RestartUSec=100ms
+TimeoutStartUSec=1min 30s
+TimeoutStopUSec=1min 30s
+WatchdogUSec=0
+WatchdogTimestampMonotonic=0
+StartLimitInterval=10000000
+StartLimitBurst=5
+StartLimitAction=none
+PermissionsStartOnly=no
+RootDirectoryStartOnly=no
+RemainAfterExit=no
+GuessMainPID=yes
+MainPID=0
+ControlPID=0
+Result=success
+UMask=0022
+LimitCPU=18446744073709551615
+LimitFSIZE=18446744073709551615
+LimitDATA=18446744073709551615
+LimitSTACK=18446744073709551615
+LimitCORE=18446744073709551615
+LimitRSS=18446744073709551615
+LimitNOFILE=65536
+LimitAS=18446744073709551615
+LimitNPROC=7770
+LimitMEMLOCK=65536
+LimitLOCKS=18446744073709551615
+LimitSIGPENDING=7770
+LimitMSGQUEUE=819200
+LimitNICE=0
+LimitRTPRIO=0
+LimitRTTIME=18446744073709551615
+OOMScoreAdjust=0
+Nice=0
+IOScheduling=0
+CPUSchedulingPolicy=0
+CPUSchedulingPriority=0
+TimerSlackNSec=50000
+CPUSchedulingResetOnFork=no
+NonBlocking=no
+StandardInput=null
+StandardOutput=inherit
+StandardError=inherit
+TTYReset=no
+TTYVHangup=no
+TTYVTDisallocate=no
+SyslogPriority=30
+SyslogLevelPrefix=yes
+SecureBits=0
+CapabilityBoundingSet=18446744073709551615
+MountFlags=0
+PrivateTmp=no
+PrivateNetwork=no
+SameProcessGroup=no
+IgnoreSIGPIPE=yes
+NoNewPrivileges=no
+KillMode=control-group
+KillSignal=15
+SendSIGKILL=yes
+SendSIGHUP=no
+CPUAccounting=no
+CPUShares=1024
+BlockIOAccounting=no
+BlockIOWeight=1000
+MemoryAccounting=no
+MemoryLimit=18446744073709551615
+DevicePolicy=auto
+ExecMainStartTimestampMonotonic=0
+ExecMainExitTimestampMonotonic=0
+ExecMainPID=0
+ExecMainCode=0
+ExecMainStatus=0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/systemd/test/systemctl_test.rb new/yast2-3.1.22/library/systemd/test/systemctl_test.rb
--- old/yast2-3.1.20/library/systemd/test/systemctl_test.rb 2014-02-27 10:56:49.000000000 +0100
+++ new/yast2-3.1.22/library/systemd/test/systemctl_test.rb 2014-03-06 09:38:04.000000000 +0100
@@ -7,11 +7,8 @@
describe Systemctl do
include SystemctlStubs
- before do
- stub_systemctl
- end
-
describe ".socket_units" do
+ before { stub_systemctl(:socket) }
it "returns a list of socket unit ids registered with systemd" do
socket_units = Systemctl.socket_units
expect(socket_units).to be_a(Array)
@@ -19,5 +16,15 @@
socket_units.each {|u| expect(u).to match(/.socket$/) }
end
end
+
+ describe ".service_units" do
+ before { stub_systemctl(:service) }
+ it "returns a list of service units" do
+ service_units = Systemctl.service_units
+ expect(service_units).to be_a(Array)
+ expect(service_units).not_to be_empty
+ service_units.each {|u| expect(u).to match(/.service$/) }
+ end
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/systemd/test/systemd_service_test.rb new/yast2-3.1.22/library/systemd/test/systemd_service_test.rb
--- old/yast2-3.1.20/library/systemd/test/systemd_service_test.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.22/library/systemd/test/systemd_service_test.rb 2014-03-06 09:38:04.000000000 +0100
@@ -0,0 +1,57 @@
+#!/usr/bin/env rspec
+
+require_relative "test_helper"
+
+module Yast
+ import 'SystemdService'
+
+ describe SystemdService do
+ include SystemdServiceStubs
+
+ before do
+ stub_services
+ end
+
+ describe ".find" do
+ it "returns the service unit object specified in parameter" do
+ ["sshd", "sshd.service"].each do |service_name|
+ service = SystemdService.find(service_name)
+ expect(service).to be_a(SystemdUnit)
+ expect(service.unit_type).to eq("service")
+ expect(service.unit_name).to eq("sshd")
+ end
+ end
+
+ it "returns nil if the service unit does not exist" do
+ stub_services(:service=>'unknown')
+ service = SystemdService.find('unknown')
+ expect(service).to be_nil
+ end
+ end
+
+ describe ".all" do
+ it "returns all supported services found" do
+ services = SystemdService.all
+ expect(services).to be_a(Array)
+ expect(services).not_to be_empty
+ services.each {|s| expect(s.unit_type).to eq('service')}
+ end
+ end
+
+ describe "#running?" do
+ it "returns true if the service is running" do
+ service = SystemdService.find "sshd"
+ expect(service).to respond_to(:running?)
+ expect(service.running?).to be_true
+ end
+ end
+
+ describe "#pid" do
+ it "returns the pid of the running service" do
+ service = SystemdService.find("sshd")
+ expect(service).to respond_to(:pid)
+ expect(service.pid).not_to be_empty
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/systemd/test/systemd_unit_test.rb new/yast2-3.1.22/library/systemd/test/systemd_unit_test.rb
--- old/yast2-3.1.20/library/systemd/test/systemd_unit_test.rb 2014-02-27 10:56:49.000000000 +0100
+++ new/yast2-3.1.22/library/systemd/test/systemd_unit_test.rb 2014-03-06 09:38:04.000000000 +0100
@@ -28,7 +28,6 @@
unit = SystemdUnit.new("iscsid.socket")
expect(unit.properties[:enabled?]).not_to be_nil
expect(unit.properties[:active?]).not_to be_nil
- expect(unit.properties[:running?]).not_to be_nil
expect(unit.properties[:loaded?]).not_to be_nil
expect(unit.properties[:supported?]).not_to be_nil
expect(unit.properties[:not_found?]).not_to be_nil
@@ -41,7 +40,6 @@
unit = SystemdUnit.new("iscsid.socket")
expect(unit).to respond_to(:enabled?)
expect(unit).to respond_to(:active?)
- expect(unit).to respond_to(:running?)
expect(unit).to respond_to(:loaded?)
expect(unit).to respond_to(:path)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/library/systemd/test/test_helper.rb new/yast2-3.1.22/library/systemd/test/test_helper.rb
--- old/yast2-3.1.20/library/systemd/test/test_helper.rb 2014-02-27 10:56:49.000000000 +0100
+++ new/yast2-3.1.22/library/systemd/test/test_helper.rb 2014-03-06 09:38:04.000000000 +0100
@@ -6,9 +6,15 @@
module SystemctlStubs
- def stub_systemctl
- stub_socket_unit_files
- stub_socket_units
+ def stub_systemctl unit
+ case unit
+ when :socket
+ stub_socket_unit_files
+ stub_socket_units
+ when :service
+ stub_service_unit_files
+ stub_service_units
+ end
stub_execute
end
@@ -33,6 +39,30 @@
)
end
+ def stub_service_unit_files
+ Yast::Systemctl.stub(:list_unit_files).and_return(< File.read(File.join(__dir__, 'data', "#{service_name}_service_properties")),
+ :stderr => '',
+ :exit => 0
+ )
+ end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/package/yast2.changes new/yast2-3.1.22/package/yast2.changes
--- old/yast2-3.1.20/package/yast2.changes 2014-02-27 11:06:54.000000000 +0100
+++ new/yast2-3.1.22/package/yast2.changes 2014-03-06 09:38:04.000000000 +0100
@@ -1,4 +1,17 @@
-------------------------------------------------------------------
+Thu Mar 6 07:48:29 UTC 2014 - vmoravec@suse.com
+
+- Add systemd service support; needed by fate#314946
+- 3.1.22
+
+-------------------------------------------------------------------
+Tue Mar 4 12:20:41 UTC 2014 - vmoravec@suse.com
+
+- Allow the Service module to configure services witout
+ systemd unit files (bnc#864934)
+- 3.1.21
+
+-------------------------------------------------------------------
Thu Feb 27 09:56:16 UTC 2014 - vmoravec@suse.com
- Add systemd socket support (bnc#853300)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.20/package/yast2.spec new/yast2-3.1.22/package/yast2.spec
--- old/yast2-3.1.20/package/yast2.spec 2014-02-27 11:06:54.000000000 +0100
+++ new/yast2-3.1.22/package/yast2.spec 2014-03-06 09:38:04.000000000 +0100
@@ -17,8 +17,9 @@
Name: yast2
-Version: 3.1.20
+Version: 3.1.22
Release: 0
+URL: https://github.com/yast/yast-yast2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
@@ -212,10 +213,12 @@
%{yast_scrconfdir}/*
%{yast_ybindir}/*
%{yast_agentdir}/ag_*
-%{_sysconfdir}/bash_completion.d/yast2*.sh
-%{_sysconfdir}/YaST2/XVersion
/var/adm/fillup-templates/sysconfig.yast2
+# configuration files
+%config %{_sysconfdir}/bash_completion.d/yast2*.sh
+%config %{_sysconfdir}/YaST2/XVersion
+
# documentation (not included in devel subpackage)
%doc %dir %{yast_docdir}
%doc %{yast_docdir}/COPYING
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org