Projects
Kolab:Winterfell
guam
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 14
View file
guam.spec
Changed
@@ -29,7 +29,14 @@ # From 3e4a3da61124e9c79b7f7f49516e6e86aa072051 Source0: guam-0.8.tar.gz -Patch01: guam-0.8-relax-dependencies.patch +Patch0001: 0001-introduce-net_iface-for-listeners.patch +Patch0002: 0002-lets-start-keeping-a-changelog.patch +Patch0003: 0003-enable-ipv6-by-default.patch +Patch0004: 0004-update-this-function-for-the-data-structure-change-i.patch +Patch0005: 0005-correct-version-of-eimap-though-this-is-like-to-bump.patch +Patch0006: 0006-fix-typo.patch +Patch0007: 0007-Correct-the-actual-version-back-to-0.8.patch +Patch0008: 0008-Relax-dependency-on-lager.patch BuildRequires: erlang >= 17.4 BuildRequires: erlang-eimap >= 0.1.5 @@ -73,7 +80,14 @@ %prep %setup -q -%patch01 -p1 +%patch0001 -p1 +%patch0002 -p1 +%patch0003 -p1 +%patch0004 -p1 +%patch0005 -p1 +%patch0006 -p1 +%patch0007 -p1 +%patch0008 -p1 %build rebar compile @@ -114,6 +128,13 @@ mv %{buildroot}/opt/%{realname}/log %{buildroot}%{_var}/log/guam ln -s ../..%{_var}/log/guam %{buildroot}/opt/%{realname}/log +pushd %{buildroot}/opt/%{realname}/lib +for dir in $(ls -d */ | grep -v kolab_guam); do + rm -rvf ${dir} + ln -sv ../../..%{_libdir}/erlang/lib/$(basename ${dir}) $(basename ${dir}) +done +popd + %check rebar skip_deps=true eunit -v
View file
0001-introduce-net_iface-for-listeners.patch
Added
@@ -0,0 +1,89 @@ +From f527fde7a659f67314adb161025965b242655b83 Mon Sep 17 00:00:00 2001 +From: Aaron Seigo <aseigo@kde.org> +Date: Tue, 5 Jan 2016 10:49:13 +0100 +Subject: [PATCH 1/8] introduce net_iface for listeners + +--- + apps/kolab_guam/src/kolab_guam_listener.erl | 17 +++++++++++++---- + docs/deployment.md | 16 ++++++++++++++-- + 2 files changed, 27 insertions(+), 6 deletions(-) + +diff --git a/apps/kolab_guam/src/kolab_guam_listener.erl b/apps/kolab_guam/src/kolab_guam_listener.erl +index 7b7a283..c50b4b1 100644 +--- a/apps/kolab_guam/src/kolab_guam_listener.erl ++++ b/apps/kolab_guam/src/kolab_guam_listener.erl +@@ -35,11 +35,12 @@ start_link(Name, Config) -> supervisor:start_link(?MODULE, [Name, Config]). + %% gen_server API + init([Name, Config]) -> + Host = proplists:get_value(host, Config, none), ++ NetIface = proplists:get_value(net_iface, Config, none), + Port = proplists:get_value(port, Config, ?DEFAULT_IMAP_PORT), + ImplicitTLS = proplists:get_value(implicit_tls, Config, false), + TLSConfig = proplists:get_value(tls_config, Config, []), + Rules = proplists:get_value(rules, Config, []), +- Options = listen_options(Host, ImplicitTLS, TLSConfig), ++ Options = listen_options(NetIface, Host, ImplicitTLS, TLSConfig), + lager:info("Starting listener \"~p\" on port ~B (~p) with ~B rules", [Name, Port, Options, length(Rules)]), + { ok, ListenSocket } = listen(ImplicitTLS, Port, Options), + spawn_link(?MODULE, cleanup, [ListenSocket]), +@@ -55,13 +56,21 @@ init([Name, Config]) -> + imap_config(none) -> kolab_guam_sup:default_imap_server_config(); + imap_config(Backend) -> kolab_guam_sup:imap_server_config(Backend). + +-listen_options(none, ImplicitTLS, TLSConfig) -> default_listen_options(ImplicitTLS, TLSConfig); +-listen_options(Hostname, ImplicitTLS, TLSConfig) -> ++listen_options(none, none, ImplicitTLS, TLSConfig) -> default_listen_options(ImplicitTLS, TLSConfig); ++listen_options(none, Hostname, ImplicitTLS, TLSConfig) -> + case inet:gethostbyname(Hostname) of + { ok, { hostent, _HostName, _Unused, inet, _Ver, [IP] } } -> + [ { ip, IP } | default_listen_options(ImplicitTLS, TLSConfig) ]; + _ -> +- listen_options(none, ImplicitTLS, TLSConfig) ++ listen_options(none, none, ImplicitTLS, TLSConfig) ++ end; ++listen_options(Iface, Hostname, ImplicitTLS, TLSConfig) -> ++ { ok, Ifaces } = inet:getifaddrs(), ++ case proplists:get_value(Iface, Ifaces) of ++ undefined -> listen_options(none, Hostname, ImplicitTLS, TLSConfig); ++ Info -> Addr = proplists:get_value(addr, Info, none), ++ lager:info("YEAH! ~p", [Addr]), ++ listen_options(none, Addr, ImplicitTLS, TLSConfig) + end. + + default_listen_options(true, TLSConfig) -> [ { reuseaddr, true }, {active, once } | TLSConfig ]; +diff --git a/docs/deployment.md b/docs/deployment.md +index 33cd450..484d0ed 100644 +--- a/docs/deployment.md ++++ b/docs/deployment.md +@@ -84,14 +84,26 @@ contains the configuration specifics. Example: + { rules, [ { filter_groupware, [] } ] }, + { tls_config, [ { certfile, "/etc/ssl/sample.pem" } ] } + ] ++ }, ++ { default, [ ++ { net_iface, "eth0" }, ++ { port, 1993 }, ++ { imap_server, default }, ++ { implicit_tls, true }, ++ { rules, [ { filter_groupware, [] } ] }, ++ { tls_config, [ { certfile, "/etc/ssl/sample.pem" } ] } ++ ] + } + } + + The host entry is optional, and is used to bind the connection to a specific +-network interface. Leaving it empty will cause Guam to bind to the port accross ++network interface by ip address. Alternatively, the net_iface may be defined and ++guam will attempt to bind to an address on that network device. net_iface overrides ++host, though host will be used as a fallback if net_iface does not produce a network ++interface. Leaving host and net_iface empty will cause Guam to bind to the port accross + all network interfaces available to it. + +-port defines the port it is listening on. ++port defines the port the listener is active on. + + imap_server refers to the entry in the imap_servers block. If not provided, the + default entry in the imap_servers configuration is used. +-- +2.5.5 +
View file
0002-lets-start-keeping-a-changelog.patch
Added
@@ -0,0 +1,44 @@ +From fde09ae6dd5b38642d8712893f39066d8f4f2091 Mon Sep 17 00:00:00 2001 +From: Aaron Seigo <aseigo@kde.org> +Date: Mon, 13 Jun 2016 10:28:02 +0200 +Subject: [PATCH 2/8] lets start keeping a changelog + +--- + CHANGELOG.md | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + create mode 100644 CHANGELOG.md + +diff --git a/CHANGELOG.md b/CHANGELOG.md +new file mode 100644 +index 0000000..5f04931 +--- /dev/null ++++ b/CHANGELOG.md +@@ -0,0 +1,25 @@ ++# Changelog ++All notable changes to this project will be documented in this file. ++ ++This project adheres to [Semantic Versioning](http://semver.org/). ++ ++## [Unreleased] ++### Added ++- bind to a network interface (rather than an IP/host) with net_iface ++### Changed ++- upgraded build to rebar3 ++### Deprecated ++### Removed ++### Fixed ++### Security ++ ++ ++## [0.8.0] - 2016-06-08 ++### Added ++- systemd service module ++- sysv init script ++### Changed ++- Upgraded eimap to 0.2.4 ++### Fixed ++- Support more variations of the LIST command args in the filter_groupware rule ++ +-- +2.5.5 +
View file
0003-enable-ipv6-by-default.patch
Added
@@ -0,0 +1,51 @@ +From 86b9e66beabe4b61e7d091b8df7ad30e293c0cca Mon Sep 17 00:00:00 2001 +From: Aaron Seigo <aseigo@kde.org> +Date: Mon, 20 Jun 2016 12:20:06 +0200 +Subject: [PATCH 3/8] enable ipv6 by default + +Summary: +Set the listen socket to ipv6 mode always + +Tested and works with ipv4 addresses as well + +Reviewers: #guam_developers, vanmeeuwen + +Reviewed By: vanmeeuwen + +Differential Revision: https://git.kolab.org/D185 +--- + apps/kolab_guam/src/kolab_guam_listener.erl | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/apps/kolab_guam/src/kolab_guam_listener.erl b/apps/kolab_guam/src/kolab_guam_listener.erl +index c50b4b1..ebb0c99 100644 +--- a/apps/kolab_guam/src/kolab_guam_listener.erl ++++ b/apps/kolab_guam/src/kolab_guam_listener.erl +@@ -56,6 +56,7 @@ init([Name, Config]) -> + imap_config(none) -> kolab_guam_sup:default_imap_server_config(); + imap_config(Backend) -> kolab_guam_sup:imap_server_config(Backend). + ++-spec listen_options(Iface :: string(), Hostname :: string(), ImplicitTLS :: boolean(), TLSConfig :: list()) -> list(). + listen_options(none, none, ImplicitTLS, TLSConfig) -> default_listen_options(ImplicitTLS, TLSConfig); + listen_options(none, Hostname, ImplicitTLS, TLSConfig) -> + case inet:gethostbyname(Hostname) of +@@ -69,12 +70,13 @@ listen_options(Iface, Hostname, ImplicitTLS, TLSConfig) -> + case proplists:get_value(Iface, Ifaces) of + undefined -> listen_options(none, Hostname, ImplicitTLS, TLSConfig); + Info -> Addr = proplists:get_value(addr, Info, none), +- lager:info("YEAH! ~p", [Addr]), ++ %lager:info("YEAH! ~p", [Addr]), + listen_options(none, Addr, ImplicitTLS, TLSConfig) + end. + +-default_listen_options(true, TLSConfig) -> [ { reuseaddr, true }, {active, once } | TLSConfig ]; +-default_listen_options(_ImplicitTLS, _Config) -> [ { active, once }, { reuseaddr, true } ]. ++default_listen_options(true, TLSConfig) -> default_listen_options() ++ TLSConfig; ++default_listen_options(_ImplicitTLS, _Config) -> default_listen_options(). ++default_listen_options() -> [ { reuseaddr, true }, {active, once }, inet6 ]. + + create_initial_listeners(PID) when is_pid(PID) -> + lager:debug("Creating session pool for listener ~p", [PID]), +-- +2.5.5 +
View file
0004-update-this-function-for-the-data-structure-change-i.patch
Added
@@ -0,0 +1,27 @@ +From 130349adeef36dcbcf65e5435d16e66974f60804 Mon Sep 17 00:00:00 2001 +From: Aaron Seigo <aseigo@kde.org> +Date: Mon, 20 Jun 2016 13:31:59 +0200 +Subject: [PATCH 4/8] update this function for the data structure change in + eimap 0.2 + +--- + apps/kolab_guam/src/kolab_guam_session.erl | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/apps/kolab_guam/src/kolab_guam_session.erl b/apps/kolab_guam/src/kolab_guam_session.erl +index 60a28cb..69e239c 100644 +--- a/apps/kolab_guam/src/kolab_guam_session.erl ++++ b/apps/kolab_guam/src/kolab_guam_session.erl +@@ -303,7 +303,8 @@ add_starttls_to_capabilities(ServerHello) -> + <<Prefix/binary, "STARTTLS ", Suffix/binary>> + end. + +-ensure_hello_does_not_have_starttls(ServerHello) -> ++ensure_hello_does_not_have_starttls(ServerResponse) -> ++ ServerHello = proplists:get_value(capabilities, ServerResponse, <<>>), + case binary:match(ServerHello, <<"STARTTLS">>) of + nomatch -> ServerHello; + { Start, End } -> +-- +2.5.5 +
View file
0005-correct-version-of-eimap-though-this-is-like-to-bump.patch
Added
@@ -0,0 +1,26 @@ +From 1341368e92efcda4d98d0a12a61ce14a102c324b Mon Sep 17 00:00:00 2001 +From: Aaron Seigo <aseigo@kde.org> +Date: Mon, 20 Jun 2016 16:57:34 +0200 +Subject: [PATCH 5/8] correct version of eimap (though this is like to bump + again to 0.2.5) + +--- + rebar.config | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rebar.config b/rebar.config +index bd55f4e..3dafb5a 100644 +--- a/rebar.config ++++ b/rebar.config +@@ -5,7 +5,7 @@ + { deps, [ + { lager, "(2.0|2.1|2.2).*", { git, "git://github.com/basho/lager.git", { tag, "2.2.0" } } }, + { lager_syslog, "2.*", { git, "git://github.com/basho/lager_syslog.git", { tag, "2.1.3" } } }, +- { eimap, ".*", { git, "https://git.kolab.org/diffusion/EI/eimap.git", { tag, "0.2.2" } } } ++ { eimap, ".*", { git, "https://git.kolab.org/diffusion/EI/eimap.git", { tag, "0.2.4" } } } + %% pull in the proper version of meck before jobs 0.3 gets around to pulling in the wrong version + ] + }. +-- +2.5.5 +
View file
0006-fix-typo.patch
Added
@@ -0,0 +1,25 @@ +From 06f22152fbb0daf5b1d5cc471cf5de5c587246f7 Mon Sep 17 00:00:00 2001 +From: Aaron Seigo <aseigo@kde.org> +Date: Mon, 20 Jun 2016 16:57:58 +0200 +Subject: [PATCH 6/8] fix typo + +--- + apps/kolab_guam/src/kolab_guam_session.erl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/apps/kolab_guam/src/kolab_guam_session.erl b/apps/kolab_guam/src/kolab_guam_session.erl +index 69e239c..9439018 100644 +--- a/apps/kolab_guam/src/kolab_guam_session.erl ++++ b/apps/kolab_guam/src/kolab_guam_session.erl +@@ -282,7 +282,7 @@ correct_hello(true, _TLSConfig, ServerHello) -> + correct_hello(_TLSActive, [], ServerHello) -> + % guam does not have a TLS config and so can not provide TLS to the client + ensure_hello_does_not_have_starttls(ServerHello); +-correct_hello(_TLSAcive, _TLSConfig, ServerHello) -> ++correct_hello(_TLSActive, _TLSConfig, ServerHello) -> + % guam has a TLS config, and it is not currently active, so make sure to include + % STARTTLS in our response regardless of what the backend says + ensure_hello_has_starttls(ServerHello). +-- +2.5.5 +
View file
0007-Correct-the-actual-version-back-to-0.8.patch
Added
@@ -0,0 +1,25 @@ +From 1d277e7bf8225600a31413165e9d5ec3cc36a74a Mon Sep 17 00:00:00 2001 +From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> +Date: Mon, 27 Jun 2016 15:14:52 +0200 +Subject: [PATCH 7/8] Correct the actual version back to 0.8 + +--- + rel/reltool.config | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rel/reltool.config b/rel/reltool.config +index 1ece54f..298f1ac 100644 +--- a/rel/reltool.config ++++ b/rel/reltool.config +@@ -4,7 +4,7 @@ + {lib_dirs, ["../deps"]}, + {erts, [{mod_cond, derived}, {app_file, strip}]}, + {app_file, strip}, +- {rel, "kolab_guam", "0.9", ++ {rel, "kolab_guam", "0.8", + [ + kernel, + stdlib, +-- +2.5.5 +
View file
0008-Relax-dependency-on-lager.patch
Added
@@ -0,0 +1,25 @@ +From 02f346fd187169b850be49ba5589234fefe4b548 Mon Sep 17 00:00:00 2001 +From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> +Date: Mon, 27 Jun 2016 15:15:08 +0200 +Subject: [PATCH 8/8] Relax dependency on lager + +--- + rebar.config | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rebar.config b/rebar.config +index 3dafb5a..f08d5ac 100644 +--- a/rebar.config ++++ b/rebar.config +@@ -3,7 +3,7 @@ + + { deps_dir, "deps" }. + { deps, [ +- { lager, "(2.0|2.1|2.2).*", { git, "git://github.com/basho/lager.git", { tag, "2.2.0" } } }, ++ { lager, "3.*", { git, "git://github.com/basho/lager.git" } }, + { lager_syslog, "2.*", { git, "git://github.com/basho/lager_syslog.git", { tag, "2.1.3" } } }, + { eimap, ".*", { git, "https://git.kolab.org/diffusion/EI/eimap.git", { tag, "0.2.4" } } } + %% pull in the proper version of meck before jobs 0.3 gets around to pulling in the wrong version +-- +2.5.5 +
View file
guam-0.8-relax-dependencies.patch
Deleted
@@ -1,12 +0,0 @@ -diff -ur guam-0.8.orig/rebar.config guam-0.8/rebar.config ---- guam-0.8.orig/rebar.config 2016-06-08 14:18:58.000000000 +0200 -+++ guam-0.8/rebar.config 2016-06-10 16:08:23.558138501 +0200 -@@ -3,7 +3,7 @@ - - { deps_dir, "deps" }. - { deps, [ -- { lager, "(2.0|2.1|2.2).*", { git, "git://github.com/basho/lager.git", { tag, "2.2.0" } } }, -+ { lager, ".*", { git, "git://github.com/basho/lager.git" } }, - { lager_syslog, "2.*", { git, "git://github.com/basho/lager_syslog.git", { tag, "2.1.3" } } }, - { eimap, ".*", { git, "https://git.kolab.org/diffusion/EI/eimap.git", { tag, "0.2.2" } } } - %% pull in the proper version of meck before jobs 0.3 gets around to pulling in the wrong version
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.