Hello community,
here is the log from the commit of package yast2-dns-server for openSUSE:Factory checked in at 2012-05-03 11:01:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-dns-server (Old)
and /work/SRC/openSUSE:Factory/.yast2-dns-server.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-dns-server", Maintainer is "locilka@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-dns-server/yast2-dns-server.changes 2012-04-17 22:04:42.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-dns-server.new/yast2-dns-server.changes 2012-05-03 11:02:12.000000000 +0200
@@ -1,0 +2,19 @@
+Tue Apr 24 10:38:54 CEST 2012 - locilka@suse.com
+
+- Fixed redrawing records settings UI entries when deleting
+ records (BNC#758745).
+- 2.23.2
+
+------------------------------------------------------------------
+Fri Apr 20 16:16:11 CEST 2012 - locilka@suse.com
+
+- Fixed removing RRs from LDAP when they share the same LDAP
+ object with another non-deleted RRs (BNC#755592).
+
+------------------------------------------------------------------
+Tue Apr 17 16:53:59 CEST 2012 - locilka@suse.com
+
+- Triggering the global "modified" flag while adding/modifying
+ a zone to be correctly stored later (BNC#753038).
+
+------------------------------------------------------------------
Old:
----
yast2-dns-server-2.23.1.tar.bz2
New:
----
yast2-dns-server-2.23.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-dns-server.spec ++++++
--- /var/tmp/diff_new_pack.7OlSyR/_old 2012-05-03 11:02:18.000000000 +0200
+++ /var/tmp/diff_new_pack.7OlSyR/_new 2012-05-03 11:02:18.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-dns-server
-Version: 2.23.1
+Version: 2.23.2
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-dns-server-2.23.1.tar.bz2 -> yast2-dns-server-2.23.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-dns-server-2.23.1/VERSION new/yast2-dns-server-2.23.2/VERSION
--- old/yast2-dns-server-2.23.1/VERSION 2012-04-17 11:17:59.000000000 +0200
+++ new/yast2-dns-server-2.23.2/VERSION 2012-04-24 14:57:14.000000000 +0200
@@ -1 +1 @@
-2.23.1
+2.23.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-dns-server-2.23.1/configure new/yast2-dns-server-2.23.2/configure
--- old/yast2-dns-server-2.23.1/configure 2012-04-17 11:18:07.000000000 +0200
+++ new/yast2-dns-server-2.23.2/configure 2012-04-24 14:57:22.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for yast2-dns-server 2.23.1.
+# Generated by GNU Autoconf 2.68 for yast2-dns-server 2.23.2.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -559,8 +559,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-dns-server'
PACKAGE_TARNAME='yast2-dns-server'
-PACKAGE_VERSION='2.23.1'
-PACKAGE_STRING='yast2-dns-server 2.23.1'
+PACKAGE_VERSION='2.23.2'
+PACKAGE_STRING='yast2-dns-server 2.23.2'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
PACKAGE_URL=''
@@ -1229,7 +1229,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-dns-server 2.23.1 to adapt to many kinds of systems.
+\`configure' configures yast2-dns-server 2.23.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1301,7 +1301,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-dns-server 2.23.1:";;
+ short | recursive ) echo "Configuration of yast2-dns-server 2.23.2:";;
esac
cat <<\_ACEOF
@@ -1381,7 +1381,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-dns-server configure 2.23.1
+yast2-dns-server configure 2.23.2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1398,7 +1398,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-dns-server $as_me 2.23.1, which was
+It was created by yast2-dns-server $as_me 2.23.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2328,7 +2328,7 @@
# Define the identity of the package.
PACKAGE='yast2-dns-server'
- VERSION='2.23.1'
+ VERSION='2.23.2'
cat >>confdefs.h <<_ACEOF
@@ -2450,7 +2450,7 @@
-VERSION="2.23.1"
+VERSION="2.23.2"
RPMNAME="yast2-dns-server"
MAINTAINER="Lukas Ocilka "
@@ -3380,7 +3380,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-dns-server $as_me 2.23.1, which was
+This file was extended by yast2-dns-server $as_me 2.23.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3433,7 +3433,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-yast2-dns-server config.status 2.23.1
+yast2-dns-server config.status 2.23.2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-dns-server-2.23.1/configure.in new/yast2-dns-server-2.23.2/configure.in
--- old/yast2-dns-server-2.23.1/configure.in 2012-04-17 11:18:05.000000000 +0200
+++ new/yast2-dns-server-2.23.2/configure.in 2012-04-24 14:57:19.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.21.8 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-dns-server, 2.23.1, http://bugs.opensuse.org/, yast2-dns-server)
+AC_INIT(yast2-dns-server, 2.23.2, http://bugs.opensuse.org/, yast2-dns-server)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.23.1"
+VERSION="2.23.2"
RPMNAME="yast2-dns-server"
MAINTAINER="Lukas Ocilka "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-dns-server-2.23.1/src/DnsServer.pm new/yast2-dns-server-2.23.2/src/DnsServer.pm
--- old/yast2-dns-server-2.23.1/src/DnsServer.pm 2012-04-17 11:18:00.000000000 +0200
+++ new/yast2-dns-server-2.23.2/src/DnsServer.pm 2012-04-24 14:57:14.000000000 +0200
@@ -532,6 +532,8 @@
$zones[$current_zone_index] = \%tmp_current_zone;
}
+ $self->SetModified ();
+
return 1;
}
@@ -1268,6 +1270,14 @@
my $ok = 1;
+ foreach my $z (@zones) {
+ if (defined $z->{"modified"} and $z->{"modified"} == 1) {
+ y2milestone ("Some zones were modified");
+ $self->SetModified();
+ last;
+ }
+ }
+
if ((! $modified) && (! SuSEFirewall->GetModified()))
{
return $ok;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-dns-server-2.23.1/src/DnsZones.pm new/yast2-dns-server-2.23.2/src/DnsZones.pm
--- old/yast2-dns-server-2.23.1/src/DnsZones.pm 2012-04-17 11:18:00.000000000 +0200
+++ new/yast2-dns-server-2.23.2/src/DnsZones.pm 2012-04-24 14:57:14.000000000 +0200
@@ -5,7 +5,7 @@
# Authors: Jiri Srain
# Lukas Ocilka
#
-# $Id: DnsZones.pm 52897 2008-11-04 18:22:26Z locilka $
+# $Id: DnsZones.pm 67975 2012-04-20 14:19:54Z locilka $
#
# Contains routines for handling zone files (both directly and using nsupdate)
@@ -33,6 +33,7 @@
my $zone_base_config_dn = "";
+my $LDAP_RECORD = 'Record';
YaST::YCP::Import ("SCR");
use DnsTsigKeys;
@@ -470,6 +471,11 @@
# LDAP data
+# @param string record type
+sub LDAPRecordString {
+ return drunkCamelType (shift).$LDAP_RECORD;
+}
+
BEGIN { $TYPEINFO{ZoneReadLdap} = ["function", [ "map", "any", "any" ], "string", "string" ]; }
sub ZoneReadLdap {
my $self = shift;
@@ -506,7 +512,7 @@
my %zonemap = %{$found[0] || {}};
my $serial = $self->UpdateSerial ("");
- my @soa_str_lst = @{$zonemap{"sOARecord"}|| ["@ root $serial 3H 1H 1W 1D"]};
+ my @soa_str_lst = @{$zonemap{LDAPRecordString('SOA')}|| ["@ root $serial 3H 1H 1W 1D"]};
my $soa_str = $soa_str_lst[0];
my @soa_lst = split (" ", $soa_str);
@@ -557,7 +563,7 @@
foreach my $rec_type (@all_rec_types)
{
- my $value_key = $rec_type."Record";
+ my $value_key = $rec_type.$LDAP_RECORD;
my @values = @{$record{$value_key} || []};
foreach my $value (@values)
{
@@ -574,6 +580,41 @@
return \%ret;
}
+sub FillUpTmpLDAPRecords {
+ my $ref_found = shift;
+
+ my ($ldap_key, $record_key);
+ my $ldap_records = {};
+
+ foreach my $l_record (@{$$ref_found}) {
+ $ldap_key = $l_record->{'relativeDomainName'}[0];
+ $ldap_records->{$ldap_key} = [] if not defined $ldap_records->{$ldap_key};
+ foreach $record_key (keys %{$l_record}) {
+ push @{$ldap_records->{$ldap_key}}, $record_key if ($record_key =~ /^.*$LDAP_RECORD$/);
+ }
+ }
+
+ return $ldap_records;
+}
+
+sub MarkRemovedRecords {
+ my $ref_ldap_record = shift;
+ my $ref_relative_domain = shift;
+ my $ref_all_records = shift;
+
+ # Record is currently in LDAP
+ if (defined $$ref_all_records->{$$ref_relative_domain}) {
+ # All record types in relative domain
+ foreach my $recordtype (@{$$ref_all_records->{$$ref_relative_domain}}) {
+ # The new record does not contain such record type (thus it's removed)
+ if (not defined $$ref_ldap_record{$recordtype}) {
+ $$ref_ldap_record{$recordtype} = [];
+ y2milestone ("Record ".$recordtype." has been removed from ".$$ref_relative_domain." object");
+ }
+ }
+ }
+}
+
BEGIN { $TYPEINFO{ZoneFileWriteLdap} = ["function", "boolean", [ "map", "any", "any"]];}
sub ZoneFileWriteLdap {
my $self = shift;
@@ -611,16 +652,16 @@
"relativeDomainName" => ["@"],
"dNSTTL" => [DnsRoutines->NormalizeTime ($zone_map{"ttl"} || "2D")],
"dNSClass" => ["IN"],
- "sOARecord" => $soa_record,
+ LDAPRecordString('SOA') => $soa_record,
);
my @current_records = grep {
my %r = %{$_};
- $r{"key"} eq "@" || $r{"key"} eq $zone . "."
+ $r{"key"} eq "@" || $r{"key"} eq $zone."."
} @records;
foreach my $rec_ref (@current_records) {
- my $type = lc ($rec_ref->{"type"}) . "record";
+ my $type = LDAPRecordString($rec_ref->{"type"});
my @cur_vals = @{$ldap_record{$type} || []};
push @cur_vals, $rec_ref->{"value"};
$ldap_record{$type} = \@cur_vals;
@@ -639,15 +680,24 @@
);
my $found_ref = SCR->Read (".ldap.search", \%ldap_query);
+ y2debug ("Base record: ".Dumper($found_ref));
+
+ my $ldap_records = FillUpTmpLDAPRecords(\$found_ref);
+
+ # Some (sub)records have been removed but the LDAP record have to stay
+ foreach my $r ('@', $zone.'.') {
+ MarkRemovedRecords (\%ldap_record, \$r, \$ldap_records);
+ }
+ y2debug ("New base record: ".Dumper(\%ldap_record));
if (scalar (@{$found_ref || []}) == 0)
{
- y2milestone ("Creating new record");
+ y2milestone ("Creating new zone record");
SCR->Write (".ldap.add", \%ldap_cmd, \%ldap_record);
}
else
{
- y2milestone ("Modifying existing record");
+ y2milestone ("Modifying existing zone record");
delete $ldap_record{"objectClass"}; # objectclass can be changed by mail-server
SCR->Write (".ldap.modify", \%ldap_cmd, \%ldap_record);
}
@@ -656,7 +706,9 @@
my %r = %{$_};
$r{"key"}
} @records;
+ # Never delete the base entry
push @all_records, "@";
+
# the search config map
%ldap_query = (
"base_dn" => $zone_dn,
@@ -668,13 +720,16 @@
$found_ref = SCR->Read (".ldap.search", \%ldap_query) || [];
my @found = @{$found_ref};
-
@found = map {
my @l = @{$_->{"relativeDomainName"}};
$l[0];
} @found;
- #remove removed entries
+ $ldap_records = FillUpTmpLDAPRecords(\$found_ref);
+ y2debug ("Records currently in LDAP: ".Dumper($ldap_records));
+ y2debug ("New state of records: ".Dumper(\@records));
+
+ # Delete removed entries (only fully removed entries will be deleted)
my @deleted = grep {
my $current = $_;
my @equiv = grep {
@@ -716,12 +771,16 @@
} @records;
foreach my $rec_ref (@current_records) {
- my $type = drunkCamelType ($rec_ref->{"type"})."Record";
+ my $type = LDAPRecordString($rec_ref->{"type"});
my @cur_vals = @{$ldap_record{$type} || []};
push @cur_vals, $rec_ref->{"value"};
$ldap_record{$type} = \@cur_vals;
}
+ # Some (sub)records have been removed but the LDAP record have to stay
+ MarkRemovedRecords (\%ldap_record, \$r, \$ldap_records);
+ y2debug ("New record: ".Dumper(\%ldap_record));
+
# the search config map - to choose add or modify
my %ldap_query = (
"base_dn" => $rec_dn,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-dns-server-2.23.1/src/cmdline.ycp new/yast2-dns-server-2.23.2/src/cmdline.ycp
--- old/yast2-dns-server-2.23.1/src/cmdline.ycp 2012-04-17 11:18:00.000000000 +0200
+++ new/yast2-dns-server-2.23.2/src/cmdline.ycp 2012-04-24 14:57:14.000000000 +0200
@@ -6,7 +6,7 @@
* Summary: Command Line for YaST2 DNS Server
* Authors: Lukas Ocilka
*
- * $Id: cmdline.ycp 66820 2011-11-16 10:56:18Z jsuchome $
+ * $Id: cmdline.ycp 67961 2012-04-17 14:58:46Z locilka $
*/
{
@@ -357,8 +357,11 @@
(string) options["name"]:nil,
splitstring((string) options["forwarders"]:"", ",")
);
+ } else {
+ return true;
}
} else {
+ y2error ("Cannot add new zone %1", options);
return false;
}
@@ -366,7 +369,7 @@
} else if (options["remove"]:nil!=nil) {
return DnsServerAPI::RemoveZone((string) options["name"]:nil);
- // Chenging settings
+ // Changing settings
} else if (options["set"]:nil!=nil) {
// Zone MasterServers
if (options["masterserver"]:nil != nil) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-dns-server-2.23.1/src/dialog-masterzone.ycp new/yast2-dns-server-2.23.2/src/dialog-masterzone.ycp
--- old/yast2-dns-server-2.23.1/src/dialog-masterzone.ycp 2012-04-17 11:18:00.000000000 +0200
+++ new/yast2-dns-server-2.23.2/src/dialog-masterzone.ycp 2012-04-24 14:57:14.000000000 +0200
@@ -5,7 +5,7 @@
* Authors: Jiri Srain ,
* Lukas Ocilka
*
- * $Id: dialog-masterzone.ycp 67408 2012-02-10 12:27:51Z locilka $
+ * $Id: dialog-masterzone.ycp 68001 2012-04-24 08:43:58Z locilka $
*/
{
@@ -1196,6 +1196,8 @@
);
}
+void SwitchAndAdjustEditationWidgets (string & type, map current_record, string & decoded_zone, string & zone);
+
void RedrawZonesTable () {
integer index = -1;
string zone_name = current_zone["zone"]:"";
@@ -1270,10 +1272,12 @@
if (size (items) > 0)
{
- r = (integer)
- UI::QueryWidget (`id ("records_list"), `CurrentItem);
+ r = (integer) UI::QueryWidget (`id ("records_list"), `CurrentItem);
+
+ map current_record = current_zone["records", r]:$[];
+ string current_type = current_record["type"]:"A";
- AdjustEditationWidgets (current_zone["records", r]:$[], decoded_zone_name, zone_name);
+ SwitchAndAdjustEditationWidgets (current_type, current_record, decoded_zone_name, zone_name);
}
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org