Skip to content
Open
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ If you are using CentOS make sure you also have the following package installed:
./configure --with-dovecot=/home/user/workspace/core
make install

## Packages

Packages of the latest tagged versions for different versions of openSUSE, SLES and CentOS 7
can be downloaded from the [Open Build Service](https://download.opensuse.org/repositories/home:/dalgaaf:/dovecot-ceph-plugin/).

## Thanks

<table border="0">
Expand Down
62 changes: 47 additions & 15 deletions rpm/dovecot-ceph-plugin.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# spec file for package dovecot22-rados-plugins
# spec file for package dovecot-ceph-plugin
#
# Copyright (c) 2017-2018 Tallence AG and the authors
#
Expand All @@ -8,8 +8,33 @@
# License version 2.1, as published by the Free Software
# Foundation. See file COPYING.

%{!?dovecot_devel: %define dovecot_devel dovecot22-devel}
%{!?librados_version: %define librados_version 10.2.5}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimum RADOS version is 12.2.0

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really? What is missing in 10.2.5? No objection, I'm fine with the requirement, I would like only to understand it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plugin is not tested with 10.2.5, all our dev, unit and integration tests are running against luminous 12.2.0. Last time i checked, i also ran into some runtime issues with the storage and dictionary plugin using the 10.2.5 on a suse test server with imaptest. However this may already be fixed because we changed a lot since then. I checked the build against 10.2.5 and it builds fine and tests are working also, so i guess it's possible to use the 10.2.5 as minimum now, but i would recommend to set the minimum to 12.2.0 cause this is the minimum version we are working with and supporting in the future.

%{!?dovecot_min_version: %define dovecot_version 2.2.21}

%if 0%{?suse_version} || 0%{?sle_version}
%{!?libjansson_devel: %define libjansson_devel libjansson-devel}
%{!?pkg_config: %define pkg_config pkg-config}
%endif

# openSUSE Tumbleweed
%if 0%{?suse_version} > 1500
%{!?dovecot_devel: %define dovecot_devel dovecot23-devel}
%else
%if 0%{?sle_version}
# openSUSE Leap 42.3 and SLE 12 SP3
%if 0%{?sle_version} == 120300
%{!?dovecot_devel: %define dovecot_devel dovecot22-devel}
%else
%{!?dovecot_devel: %define dovecot_devel dovecot23-devel}
%endif
%else
%if 0%{?centos_version} == 700
%{!?dovecot_devel: %define dovecot_devel dovecot22u-devel}
%{!?libjansson_devel: %define libjansson_devel jansson-devel}
%{!?pkg_config: %define pkg_config pkgconfig}
%endif
%endif
%endif

Name: dovecot-ceph-plugin
Summary: Dovecot Ceph RADOS plugins
Expand All @@ -18,19 +43,21 @@ Release: 0%{?dist}
URL: https://github.com/ceph-dovecot/dovecot-ceph-plugin
Group: Productivity/Networking/Email/Servers
License: LGPL-2.1
Source: %{name}_%{version}-%{release}.tar.gz
Source: %{name}-%{version}.tar.xz
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would break the Deutsche Telekom build we are using. Is it possible to overwrite "Source" from the outside?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"from the outside" means?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point is that make_dist.sh builds by default a %{name}-%{version}.tar.xz

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the DTAG build we have to modify several path names to adhere to their internal standards. These path names are overridden by the script that is executing the build process. To avoid collision with potential OS packages we use %{release}, which a standard field, to mark a custom build. If you don't mind, I would suggest changes to make_dist.sh to support a release or dist, to not break our established build process


Provides: dovecot-ceph-plugin = %{version}-%{release}
Requires: librmb0 >= %{version}-%{release}
Requires: librados2 >= %{librados_version}
Conflicts: otherproviders(dovecot-ceph-plugin)

BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %dovecot_devel
BuildRequires: librados-devel >= %librados_version
BuildRequires: libjansson-devel >= 2.9
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkg-config

BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{dovecot_devel} >= %{dovecot_min_version}
BuildRequires: librados-devel >= %{librados_version}
BuildRequires: %{libjansson_devel} >= 2.9
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: %{pkg_config}

%description
Dovecot is an IMAP and POP3 server for Linux and UNIX-like systems,
Expand Down Expand Up @@ -79,7 +106,10 @@ export LIBS="-pie"
%{__make}

%install
%makeinstall
%{__rm} -rf %{buildroot}
mkdir -p %{buildroot}%{_libdir}/
%make_install
install -m 0644 -D COPYING-LGPL2.1 %{buildroot}%{_docdir}/dovecot-ceph-plugin/COPYING

# clean up unused files
find %{buildroot}%{_libdir}/ -type f -name \*.la -delete
Expand All @@ -95,6 +125,8 @@ find %{buildroot}%{_libdir}/dovecot/ -type f -name \*.a -delete

%files
%defattr(-,root,root)
%dir %{_docdir}/dovecot-ceph-plugin
%doc %{_docdir}/dovecot-ceph-plugin/COPYING
%dir %{_libdir}/dovecot
%{_libdir}/dovecot/lib*.so*

Expand All @@ -108,13 +140,13 @@ find %{buildroot}%{_libdir}/dovecot/ -type f -name \*.a -delete

%files -n librmb-devel
%defattr(-,root,root)
%{_includedir}/*
%dir %{_includedir}/dovecot-ceph-plugin
%{_includedir}/dovecot-ceph-plugin/*.h
%{_libdir}/librmb.so

%files -n rmb-tools
%defattr(-,root,root)
%attr(0755, root, root) %{_bindir}/rmb
%doc %{_mandir}/man1/rmb.1*
%{_bindir}/rmb
/usr/share/man/man1/rmb.1.gz
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, do not use absolute path names. We have to relocate them using the macros.


%changelog