Skip to content

Commit

Permalink
Merge 8267c25 into c85ac1a
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Feb 2, 2022
2 parents c85ac1a + 8267c25 commit db2d77c
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 40 deletions.
9 changes: 9 additions & 0 deletions package/yast2-dns-server.changes
@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Feb 2 12:29:59 UTC 2022 - Michal Filka <mfilka@suse.com>

- jsc#SLE-22015
- Master/Slave servers and zones renamed to conform to inclusive
naming. According to RFC8499 primary/secondary names are used
now.
- 4.4.1

-------------------------------------------------------------------
Tue Apr 20 13:51:55 UTC 2021 - Ladislav Slezák <lslezak@suse.cz>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-dns-server.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-dns-server
Version: 4.4.0
Version: 4.4.1
Release: 0
Url: https://github.com/yast/yast-dns-server
Summary: YaST2 - DNS Server Configuration
Expand Down
26 changes: 18 additions & 8 deletions src/include/dns-server/cmdline.rb
Expand Up @@ -65,11 +65,11 @@ def initialize_dns_server_cmdline(include_target)
),
"example" => [
"zones show",
"zones add name=example.org zonetype=master",
"zones add name=example.com zonetype=slave masterserver=192.168.0.1",
"zones add name=example.org zonetype=primary",
"zones add name=example.com zonetype=secondary primaryserver=192.168.0.1",
"zones add name=example.com zonetype=forward forwarders=192.168.0.1,192.168.0.2",
"zones remove name=example.org",
"zones set name=example.com masterserver=192.168.10.1",
"zones set name=example.com primaryserver=192.168.10.1",
"zones set name=example.com forwarders=192.168.0.3"
]
},
Expand Down Expand Up @@ -257,10 +257,18 @@ def initialize_dns_server_cmdline(include_target)
"type" => "string",
# TRANSLATORS: commandline short help for command
"help" => _(
"Zone type, master or slave"
"Zone type, primary or secondary"
)
},
"masterserver" => {
"type" => "ip4",
# TRANSLATORS: commandline short help for command
# TRANSLATORS: obsolete option, primaryserver should be used instead
"help" => _(
"DNS zone master server"
)
},
"primaryserver" => {
"type" => "ip4",
# TRANSLATORS: commandline short help for command
"help" => _(
Expand Down Expand Up @@ -432,6 +440,7 @@ def initialize_dns_server_cmdline(include_target)
"set",
"name",
"masterserver",
"primaryserver",
"zonetype",
"forwarders"
],
Expand Down Expand Up @@ -814,7 +823,7 @@ def DNSHandlerZonesShow
Builtins.foreach(DnsServerAPI.GetZones) do |zone_name, zone|
masterservers = []
forwarders = []
if Ops.get(zone, "type") == "slave"
if ["slave", "secondary"].include?(zone)
masterservers = DnsServerAPI.GetZoneMasterServers(zone_name)
elsif Ops.get(zone, "type") == "forward"
forwarders = DnsServerAPI.GetZoneForwarders(zone_name)
Expand Down Expand Up @@ -859,6 +868,7 @@ def DNSHandlerZones(options)
Builtins.y2milestone("Options: %1", options)

# Show current settings
primaryserver = options["masterserver"] || options["primaryserver"]
if Ops.get(options, "show") != nil
return DNSHandlerZonesShow()

Expand All @@ -872,7 +882,7 @@ def DNSHandlerZones(options)
if DnsServerAPI.AddZone(
Ops.get_string(options, "name"),
Ops.get_string(options, "zonetype"),
{ "masterserver" => Ops.get_string(options, "masterserver") }
{ "masterserver" => primaryserver }
)
if Ops.get_string(options, "zonetype") == "forward"
return DnsServerAPI.SetZoneForwarders(
Expand All @@ -897,10 +907,10 @@ def DNSHandlerZones(options)
# Changing settings
elsif Ops.get(options, "set") != nil
# Zone MasterServers
if Ops.get(options, "masterserver") != nil
if primaryserver != nil
return DnsServerAPI.SetZoneMasterServers(
Ops.get_string(options, "name"),
[Ops.get_string(options, "masterserver")]
[primaryserver]
)
# Zone Forwarders
elsif Ops.get(options, "forwarders") != nil
Expand Down
6 changes: 4 additions & 2 deletions src/include/dns-server/dialog-main.rb
Expand Up @@ -1593,9 +1593,11 @@ def ExpertZonesDialog
_("Type"),
[
# Combobox - DNS adding zone - Type Master
Item(Id("master"), _("Master")),
# TRANSLATORS: Primary is new name for Master (zone)
Item(Id("master"), _("Primary")),
# Combobox - DNS adding zone - Type Slave
Item(Id("slave"), _("Slave")),
# TRANSLATORS: Secondary is new name for Slave (zone)
Item(Id("slave"), _("Secondary")),
# Combobox - DNS adding zone - Type Slave
Item(Id("forward"), _("Forward"))
]
Expand Down
13 changes: 7 additions & 6 deletions src/include/dns-server/dialog-masterzone.rb
Expand Up @@ -1185,7 +1185,7 @@ def ValidateSoaTab(event)
_(
"The expiration time-out is higher than the time period\n" +
"of zone refreshes. The zone will not be reachable\n" +
"from slave name servers all the time.\n" +
"from secondary name servers all the time.\n" +
"Continue?"
)
)
Expand Down Expand Up @@ -2679,7 +2679,7 @@ def runSlaveZoneTabDialog
VSpacing(1),
# TRANSLATORS: Text entry
Left(
InputField(Id("master"), Opt(:hstretch), _("&Master DNS Server IP"))
InputField(Id("master"), Opt(:hstretch), _("&Primary DNS Server IP"))
),
VSpacing(2),
Left(
Expand Down Expand Up @@ -2743,11 +2743,12 @@ def runSlaveZoneTabDialog
if Builtins.size(@current_zone_masters) == 0
if Popup.ContinueCancelHeadline(
# TRANSLATORS: Popup error headline
_("Missing Master Server"),
# TRANSLATORS: Primary is new name for Master (zone)
_("Missing Primary Server"),
# TRANSLATORS: Popup error text
_(
"Every slave zone must have its master server IP defined.\n" +
"Configuration of a DNS server without a master server would fail.\n" +
"Every secondary zone must have its primary server IP defined.\n" +
"Configuration of a DNS server without a primary server would fail.\n" +
"If you continue, the current zone will be removed."
)
)
Expand Down Expand Up @@ -2777,7 +2778,7 @@ def runSlaveZoneTabDialog
UI.SetFocus(Id("master"))
# A popup error message
Popup.Error(
_("The specified master name server is not a valid IP address.")
_("The specified primary name server is not a valid IP address.")
)
next
end
Expand Down
42 changes: 21 additions & 21 deletions src/include/dns-server/helps.rb
Expand Up @@ -66,17 +66,17 @@ def initialize_dns_server_helps(include_target)
),
# help 2/5 alt. 2
"zone_masters" => _(
"<p><b><big>Master Servers</big></b><br>\n" +
"Set the IP addresses of the master name servers for this zone. Use <b>Add</b>\n" +
"to add a new master name server. Select an existing one then click <b>Delete</b>\n" +
"<p><b><big>Primary Servers</big></b><br>\n" +
"Set the IP addresses of the primary name servers for this zone. Use <b>Add</b>\n" +
"to add a new primary name server. Select an existing one then click <b>Delete</b>\n" +
"to remove an existing one.</p>"
),
# help 1/2
"zone_type" => _(
"<p><b><big>Zone Type</big></b><br>\n" +
"To make this name server the primary source of the data of the zone,\n" +
"select <b>Master</b>. To make it the secondary name server, select <b>Slave</b>\n" +
"or <b>Stub</b>, so the data of the zone will be mirrored from the master\n" +
"select <b>Primary</b>. To make it the secondary name server, select <b>Secondary</b>\n" +
"or <b>Stub</b>, so the data of the zone will be mirrored from the primary\n" +
"server.</p>"
),
# help 2/2
Expand Down Expand Up @@ -121,26 +121,26 @@ def initialize_dns_server_helps(include_target)
# help text 5/9 - Serial
_(
"<p><b>Serial</b> number is used for determining if the zone has changed on\n" +
"the master servers (so that slave servers do not always need to synchronize the\n" +
"the primary servers (so that secondary servers do not always need to synchronize the\n" +
"entire zone).</p>\n"
) +
# help text 6/9 - Refresh
_(
"<p><b>Refresh</b> sets how often the zone should be synchronized from\nmaster name server to slave name servers.</p>"
"<p><b>Refresh</b> sets how often the zone should be synchronized from\nprimary name server to secondary name servers.</p>"
) +
# help text 7/9 - Retry
_(
"<p><b>Retry</b> sets how often slave servers try to synchronize\nthe zone from the master server if synchronization fails.</p>"
"<p><b>Retry</b> sets how often secondary servers try to synchronize\nthe zone from the primary server if synchronization fails.</p>"
) +
# help text 8/9 - Expiry
_(
"<p><b>Expiry</b> means the period after which the zone expires on slave\n" +
"servers and slave servers stop answering replies until it is synchronized.\n" +
"<p><b>Expiry</b> means the period after which the zone expires on secondary\n" +
"servers and secondary servers stop answering replies until it is synchronized.\n" +
"</p>"
) +
# help text 9/9 - Minimum
_(
"<p><b>Minimum</b> sets for how long the slave servers should cache\nnegative answers (name resolution failed).</p>"
"<p><b>Minimum</b> sets for how long the secondary servers should cache\nnegative answers (name resolution failed).</p>"
),
# ddns keys dialog
# help text 1/1
Expand Down Expand Up @@ -326,7 +326,7 @@ def initialize_dns_server_helps(include_target)
# Zone Editor - Help
_(
"<p>\n" +
"Reverse zone records can be generated from another master zone.\n" +
"Reverse zone records can be generated from another primary zone.\n" +
"Select the <b>Automatically Generate Records From</b>\n" +
"check-box and choose the zone to generate the records from.</p>\n"
) +
Expand Down Expand Up @@ -359,7 +359,7 @@ def initialize_dns_server_helps(include_target)
_(
"<p><b>Serial</b> is the number used for determining if the zone has \n" +
"changed on\n" +
"the master servers (then slave servers do not always need to synchronize the\n" +
"the primary servers (then secondary servers do not always need to synchronize the\n" +
"entire zone).</p>\n"
) +
# Zone Editor - Help for tab - Zone (SOA) 3/7
Expand All @@ -368,21 +368,21 @@ def initialize_dns_server_helps(include_target)
) +
# Zone Editor - Help for tab - Zone (SOA) 4/7
_(
"<p><b>Refresh</b> sets how often the zone should be synchronized from\nmaster name server to slave name servers.</p>"
"<p><b>Refresh</b> sets how often the zone should be synchronized from\nprimary name server to secondary name servers.</p>"
) +
# Zone Editor - Help for tab - Zone (SOA) 5/7
_(
"<p><b>Retry</b> sets how often slave servers try to synchronize\nthe zone from the master server if synchronization fails.</p>"
"<p><b>Retry</b> sets how often secondary servers try to synchronize\nthe zone from the primary server if synchronization fails.</p>"
) +
# Zone Editor - Help for tab - Zone (SOA) 6/7
_(
"<p><b>Expiration</b> means the period after which the zone expires on slave\n" +
"servers and slave servers stop answering replies until it is synchronized.\n" +
"<p><b>Expiration</b> means the period after which the zone expires on secondary\n" +
"servers and secondary servers stop answering replies until it is synchronized.\n" +
"</p>"
) +
# Zone Editor - Help for tab - Zone (SOA) 7/7
_(
"<p><b>Minimum</b> sets for how long the slave servers should cache\nnegative answers (name resolution failed).</p>"
"<p><b>Minimum</b> sets for how long the secondary servers should cache\nnegative answers (name resolution failed).</p>"
),
# Zone Editor - Help for tab - Records 1/7 or 1/5
"zone_editor_records" => _(
Expand Down Expand Up @@ -482,9 +482,9 @@ def initialize_dns_server_helps(include_target)
),
# slave zone help text 1/2
"slave_zone" => _(
"<p><big><b>Slave DNS Zone</b></big><br>\n" +
"Each slave zone must have the master name server defined. Use\n" +
"<b>Master DNS Server IP</b> to define the master name server.</p>"
"<p><big><b>Secondary DNS Zone</b></big><br>\n" +
"Each slave zone must have the primary name server defined. Use\n" +
"<b>Primary DNS Server IP</b> to define the primary name server.</p>"
) +
# slave zone help text 2/2
_(
Expand Down
6 changes: 4 additions & 2 deletions src/modules/DnsServer.pm
Expand Up @@ -1638,9 +1638,11 @@ sub Summary {

my %zone_types = (
# type of zone to be used in summary
"master" => __("Master"),
# TRANSLATORS: Primary is new name for Master (zone)
"master" => __("Primary"),
# type of zone to be used in summary
"slave" => __("Slave"),
# TRANSLATORS: Secondary is new name for Slave (zone)
"slave" => __("Secondary"),
# type of zone to be used in summary
"stub" => __("Stub"),
# type of zone to be used in summary
Expand Down

0 comments on commit db2d77c

Please sign in to comment.