Hello community,

here is the log from the commit of package webyast-ntp for openSUSE:Factory 
checked in at 2011-12-01 12:27:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/webyast-ntp (Old)
 and      /work/SRC/openSUSE:Factory/.webyast-ntp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "webyast-ntp", Maintainer is ""

Changes:
--------
New Changes file:

--- /dev/null   2010-08-26 16:28:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.webyast-ntp.new/webyast-ntp.changes     
2011-12-01 12:27:27.000000000 +0100
@@ -0,0 +1,159 @@
+-------------------------------------------------------------------
+Mon Oct 24 15:32:35 UTC 2011 - [email protected]
+
+- Merging client and service
+- 0.3.0 
+
+-------------------------------------------------------------------
+Mon May 16 10:34:32 UTC 2011 - [email protected]
+
+- changed licence to the correct name GPL-2.0
+- 0.2.5 
+
+-------------------------------------------------------------------
+Thu May 12 13:06:46 UTC 2011 - [email protected]
+
+- corrected call of sntp (bnc #685465)
+  handle sntp calls in different versions
+- 0.2.4
+
+-------------------------------------------------------------------
+Mon May  2 12:38:17 UTC 2011 - [email protected]
+
+- adapt caching to the new job handling
+- 0.2.3 
+
+-------------------------------------------------------------------
+Tue Apr 12 13:19:36 UTC 2011 - [email protected]
+
+- new caching
+- 0.2.2 
+
+-------------------------------------------------------------------
+Wed Feb  9 09:35:05 UTC 2011 - [email protected]
+
+- webyast-ntp-ws-rpmlintrc removed
+- 0.2.1 
+
+-------------------------------------------------------------------
+Mon Aug 23 13:20:31 UTC 2010 - [email protected]
+
+- add url to spec file (bnc#625537)
+- 0.2.0
+
+-------------------------------------------------------------------
+Thu Jul  8 10:47:55 UTC 2010 - [email protected]
+
+- increase number of attempts for ntp server (bnc#604629)
+- expect hwclock fail on xen host (bnc#614353)
+- 0.1.7
+
+-------------------------------------------------------------------
+Thu May 20 12:54:36 UTC 2010 - [email protected]
+
+- allow setting of ntp on s390 (bnc#607158) 
+
+-------------------------------------------------------------------
+Fri Apr 30 13:38:19 UTC 2010 - [email protected]
+
+- fix spec file consistency (bnc#560061)
+- 0.1.6
+
+-------------------------------------------------------------------
+Fri Apr 23 11:54:44 UTC 2010 - [email protected]
+
+- add license headers (bnc#586620)
+- 0.1.5
+
+-------------------------------------------------------------------
+Fri Apr  9 09:04:48 UTC 2010 - [email protected]
+
+- allow edit ntp server (bnc#591404)
+- improve package description
+- 0.1.4
+
+-------------------------------------------------------------------
+Mon Mar 29 13:42:15 CEST 2010 - [email protected]
+
+- RPM-Provide WebYaST(org.opensuse.yast.modules.FOO) (bnc#583561)
+- 0.1.3
+
+-------------------------------------------------------------------
+Mon Mar 22 11:40:28 UTC 2010 - [email protected]
+
+- update ntp configuration immediatelly (bnc#589303)
+
+-------------------------------------------------------------------
+Thu Mar 11 12:40:23 UTC 2010 - [email protected]
+
+- allow set ntp server if not defined (bnc#585783)
+- 0.1.2
+
+-------------------------------------------------------------------
+Wed Feb 24 12:43:40 UTC 2010 - [email protected]
+
+- fix syntax errors in ntp YaPI (bnc#582188)
+- 0.1.1
+
+-------------------------------------------------------------------
+Thu Feb 18 15:26:24 UTC 2010 - [email protected]
+
+- fix passing hardware clock settings to ntp (bnc#556467) 
+- use BaseModel and add validations
+- allow synchronize action only if ntp is available (bnc#552071)
+- 0.1.0
+
+-------------------------------------------------------------------
+Mon Jan 25 17:22:19 CET 2010 - [email protected]
+
+- renamed yast2-webservice-ntp to webyast-ntp-ws
+
+-------------------------------------------------------------------
+Fri Nov 20 12:29:33 UTC 2009 - [email protected]
+
+- fix writing ntp to hardware clock (use absolute path) (bnc#553980)
+- 0.0.8
+
+-------------------------------------------------------------------
+Wed Nov 18 10:45:24 UTC 2009 - [email protected]
+
+- write time from ntp to hardware clock (bnc#556467)
+- 0.0.7
+
+-------------------------------------------------------------------
+Wed Nov 18 08:08:02 UTC 2009 - [email protected]
+
+- don't raise exception if dbus timeout due to time move to future
+  or past (bnc#553980)
+- 0.0.6
+
+-------------------------------------------------------------------
+Tue Nov 10 16:19:32 CET 2009 - [email protected]
+
+- remove deprecated provisions in spec file 
+- 0.0.5
+
+-------------------------------------------------------------------
+Thu Nov  5 14:32:36 CET 2009 - [email protected]
+
+- mention in README where is stored predefined NTP servers
+- kkaempf - clarify license
+- 0.0.4
+
+-------------------------------------------------------------------
+Fri Oct 30 08:04:32 CET 2009 - [email protected]
+
+- fixed restdoc packaging
+- 0.0.3
+
+-------------------------------------------------------------------
+Thu Oct 29 17:35:02 CET 2009 - [email protected]
+
+- GPLv2 license
+- 0.0.2
+
+-------------------------------------------------------------------
+Tue Sep 29 10:49:58 CEST 2009 - [email protected]
+
+- initial 0.0.1 
+

New:
----
  NTP.pm
  org.opensuse.yast.modules.yapi.ntp.policy
  webyast-ntp.changes
  webyast-ntp.spec
  www.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ webyast-ntp.spec ++++++
#
# spec file for package webyast-ntp
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           webyast-ntp
Provides:       WebYaST(org.opensuse.yast.modules.yapi.ntp)
Provides:       webyast-ntp-ws = %{version}
Obsoletes:      webyast-ntp-ws < %{version}
#webservice already require yast2-dbus-server which is needed for yapi
PreReq:         webyast-base
#for YaPI needs ntp
Requires:       ntp
#for YaPI hwclock
Requires:       util-linux
License:        GPL-2.0 
Group:          Productivity/Networking/Web/Utilities
URL:            http://en.opensuse.org/Portal:WebYaST
Autoreqprov:    on
Version:        0.3.0
Release:        0
Summary:        WebYaST - NTP 
Source:         www.tar.bz2
Source1:        NTP.pm
Source2:        org.opensuse.yast.modules.yapi.ntp.policy
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  rubygem-webyast-rake-tasks rubygem-restility

BuildRequires:  webyast-base-testsuite
BuildRequires:  rubygem-test-unit rubygem-mocha

#
%define plugin_dir %{webyast_dir}/vendor/plugins/ntp
#

%package testsuite
Group:    Productivity/Networking/Web/Utilities
Requires:  %{name} = %{version}
Requires:  webyast-base-testsuite
Provides:  webyast-ntp-ws-testsuite = %{version}
Obsoletes: webyast-ntp-ws-testsuite < %{version}
Summary:   Testsuite for webyast-ntp package

%description
WebYaST - Plugin providing REST based interface to basic ntp time 
synchronization

Authors:
--------
    Josef Reidinger <[email protected]>

%description testsuite
This package contains complete testsuite for webyast-ntp package.
It's only needed for verifying the functionality of the module and it's not
needed at runtime.

%prep
%setup -q -n www

%build
# build restdoc documentation
mkdir -p public/ntp/restdoc
%webyast_restdoc

# do not package restdoc sources
rm -rf restdoc
#do not package development documentation
rm -rf doc

%check
# run the testsuite
%webyast_check

%install

#
# Install all web and frontend parts.
#
mkdir -p $RPM_BUILD_ROOT%{plugin_dir}
cp -a * $RPM_BUILD_ROOT%{plugin_dir}
rm -f $RPM_BUILD_ROOT%{plugin_dir}/COPYING
#YaPI module
mkdir -p $RPM_BUILD_ROOT/usr/share/YaST2/modules/YaPI/
cp %{SOURCE1} $RPM_BUILD_ROOT/usr/share/YaST2/modules/YaPI/
#policies
mkdir -p $RPM_BUILD_ROOT/usr/share/polkit-1/actions/
cp %{SOURCE2} $RPM_BUILD_ROOT/usr/share/polkit-1/actions/

%clean
rm -rf $RPM_BUILD_ROOT

%post
# granting all permissions for the webservice user and root
/usr/sbin/grantwebyastrights --user root --action grant > /dev/null
/usr/sbin/grantwebyastrights --user %{webyast_user} --action grant > /dev/null

%postun

%files 
%defattr(-,root,root)
%dir %{webyast_dir}
%dir %{webyast_dir}/vendor
%dir %{webyast_dir}/vendor/plugins
%dir %{plugin_dir}
# ntp require only yast2-dbus server, so it must ensure that directory exist
%dir /usr/share/YaST2/
%dir /usr/share/YaST2/modules/
%dir /usr/share/YaST2/modules/YaPI/
%{plugin_dir}/README
%{plugin_dir}/Rakefile
%{plugin_dir}/init.rb
%{plugin_dir}/install.rb
%{plugin_dir}/uninstall.rb
%{plugin_dir}/app
%{plugin_dir}/config
%{plugin_dir}/public
%attr(644,root,root) /usr/share/YaST2/modules/YaPI/NTP.pm
%attr(644,root,root) 
/usr/share/polkit-1/actions/org.opensuse.yast.modules.yapi.ntp.policy
%doc COPYING

%files testsuite
%defattr(-,root,root)
%{plugin_dir}/test

%changelog
++++++ NTP.pm ++++++
#--
# Copyright (c) 2009-2010 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
#++

package YaPI::NTP;

use strict;
use YaPI;
use YaST::YCP qw(:LOGGING);

our %TYPEINFO;

BEGIN{$TYPEINFO{Synchronize} = ["function","string",
    "boolean","string"];
}
sub Synchronize {
  my $self = shift;
  my $use_utc = shift;
  my $new_server = shift;
  my $out = undef;
  my $servers = GetServers();
  if ($new_server ne ""){
    my @srvs = split(',',$new_server);
    $servers = \@srvs;
  }

  foreach my $server (@{$servers}){
    # -r: set the system time
    # -P no: do not ask if time difference is too large
    # -c 3 -d 15: delay 15s, three attempts (bnc#442287)
    $out = `/usr/sbin/sntp -c 3 -d 15 -r -P no '$server' 2>&1`;
    unless ($?==0) {
      # try other parameters ( newer version of ntp )
      # -s:Set (step) the time with settimeofday()
      # -t 15: delay 15s (bnc#442287)
      $out = `/usr/sbin/sntp -t 15 -s '$server' 2>&1`;
      last if ($?==0);
    } else {
      last 
    }
    $out = "Error for server $server: $out";
    y2warning($out);
  }
  return "NOSERVERS" unless (defined ($out));
  return $out unless $?==0;
  my $local = "--utc";
  unless ($use_utc) {
    $local = "--localtime";
  }
  my $ret = `/sbin/hwclock $local --systohc 2>&1`;
  y2milestone("hwclock returns $?: $ret");
  if ( $? == 0 ||
      not -f "/sbin/hwclock" || #on s390x is no hwclock so don't fail in this 
case bnc#607158
      ( -d "/proc/xen" && not -f "/proc/xen/xsd_port" ) #hwclock fail on xen 
host bnc#614353
      ){
    if ($new_server ne "")
    {
      `sed -i 
's|^[:space:]*NETCONFIG_NTP_STATIC_SERVERS=.*\$|NETCONFIG_NTP_STATIC_SERVERS="$new_server"|'
 /etc/sysconfig/network/config `;
      `netconfig update -m ntp`; #update ntp confiration immediatelly bnc#589303
    }
    return "OK";
  }
  return $out.$ret;
}

sub GetServers {
  my $self = shift;
  my $servers = `grep "^[:space:]*NETCONFIG_NTP_STATIC_SERVERS" 
/etc/sysconfig/network/config | sed 's/.*="\\(.*\\)"/\\1/'`;
  my @serv = split(/\s+/,$servers);
  return \@serv;
}

1;
#print join(",",@{GetServers()});
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to