Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema change #49

Merged
merged 4 commits into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ Makefile.am.common
tmp.*
*.log
.yardoc
/coverage
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ before_install:
script:
# the "yast-travis-ruby" script is included in the base yastdevel/ruby image
# see https://github.com/yast/docker-yast-ruby/blob/master/yast-travis-ruby
- docker run -it --rm -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" -e PERL5LIB=./src/servers_non_y2 yast-mail-image yast-travis-ruby
- docker run -it --privileged --rm -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" -e PERL5LIB=./src/servers_non_y2 yast-mail-image yast-travis-ruby
7 changes: 7 additions & 0 deletions package/yast2-mail.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue May 12 12:51:56 UTC 2020 - Josef Reidinger <jreidinger@suse.com>

- Autoyast schema: Allow optional types for string and map objects
(bsc#1170886)
- 4.3.0

-------------------------------------------------------------------
Tue Aug 27 18:06:21 CEST 2019 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-mail.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

Name: yast2-mail
Version: 4.2.2
Version: 4.3.0
Release: 0
Summary: YaST2 - Mail Configuration
License: GPL-2.0-or-later
Expand Down
96 changes: 55 additions & 41 deletions src/autoyast-rnc/mail.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,49 @@ default namespace = "http://www.suse.com/1.0/yast2ns"
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
namespace config = "http://www.suse.com/1.0/configns"

include "common.rnc"

mail =
element mail {
aliases? &
connection_type &
fetchmail? &
from_header? &
listen_remote? &
local_domains? &
mail_smtp_auth? &
masquerade_other_domains? &
masquerade_users? &
mta &
outgoing_mail_server? &
postfix_mda? &
smtp_use_TLS? &
system_mail_sender? &
use_amavis? &
use_dkim? &
virtual_users?
MAP,
(
aliases? &
connection_type &
fetchmail? &
from_header? &
listen_remote? &
local_domains? &
mail_smtp_auth? &
masquerade_other_domains? &
masquerade_users? &
mta &
outgoing_mail_server? &
postfix_mda? &
smtp_use_TLS? &
system_mail_sender? &
use_amavis? &
use_dkim? &
virtual_users?
)
}

# we have code to accept it as symbol or string
mail_SYMBOL_OR_TEXT =
attribute config:type { "symbol" }?
(
attribute config:type { "symbol" }? |
STRING_ATTR
)

aliases =
element aliases {
LIST,
element alias {
element alias { text } &
element destinations { text } &
element comment { text }?
MAP,
(
element alias { STRING } &
element destinations { STRING } &
element comment { STRING }?
)
}*
}

Expand All @@ -47,37 +58,40 @@ fetchmail =
element fetchmail {
LIST,
element fetchmail_entry {
element server { text } &
element protocol { text } &
element remote_user { text } &
element local_user { text } &
element password { text }
MAP,
(
element server { STRING } &
element protocol { STRING } &
element remote_user { STRING } &
element local_user { STRING } &
element password { STRING }
)
}+
}

from_header = element from_header { text }
from_header = element from_header { STRING }

listen_remote = element listen_remote { BOOLEAN }

local_domains =
element local_domains {
LIST,
element domains { text }*
element domains { STRING }*
}

masquerade_other_domains =
element masquerade_other_domains {
LIST,
element domain { text }*
element domain { STRING }*
}

masquerade_users =
element masquerade_users {
LIST,
element masquerade_user {
element user { text } &
element address { text } &
element comment { text }?
element user { STRING } &
element address { STRING } &
element comment { STRING }?
}*
}

Expand All @@ -87,7 +101,7 @@ mta =
( "sendmail" | "postfix" )
}

outgoing_mail_server = element outgoing_mail_server { text }
outgoing_mail_server = element outgoing_mail_server { STRING }

postfix_mda =
element postfix_mda {
Expand All @@ -96,10 +110,10 @@ postfix_mda =
}

smtp_use_TLS =
element smtp_use_TLS { "yes" | "must" | "no" }
element smtp_use_TLS { STRING_ATTR, ("yes" | "must" | "no") }

system_mail_sender =
element system_mail_sender { text }
element system_mail_sender { STRING }

use_amavis = element use_amavis { BOOLEAN }
use_dkim = element use_dkim { BOOLEAN }
Expand All @@ -108,19 +122,19 @@ virtual_users =
element virtual_users {
LIST,
element virtual_user {
element alias { text } &
element destinations { text } &
element comment { text }?
element alias { STRING } &
element destinations { STRING } &
element comment { STRING }?
}*
}

mail_smtp_auth =
element smtp_auth {
LIST,
element smtp_auth_entry {
element password { text } &
element server { text } &
element user { text }
element password { STRING } &
element server { STRING } &
element user { STRING }
}*
}