-
Notifications
You must be signed in to change notification settings - Fork 23
Update SPEC file to build on CentOS #152
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
0e713ee
c91212a
1804ce0
49ea19e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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-plugins | ||
| # | ||
| # Copyright (c) 2017-2018 Tallence AG and the authors | ||
| # | ||
|
|
@@ -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} | ||
| %{!?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 | ||
|
|
@@ -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 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "from the outside" means?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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} | ||
| Provides: dovecot-ceph-plugins = %{version}-%{release} | ||
|
||
| Requires: librmb0 >= %{version}-%{release} | ||
| Conflicts: otherproviders(dovecot-ceph-plugin) | ||
| Requires: librados2 >= %{librados_version} | ||
| Conflicts: otherproviders(dovecot-ceph-plugins) | ||
|
|
||
| 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, | ||
|
|
@@ -75,11 +102,14 @@ export LIBS="-pie" | |
| ./autogen.sh | ||
| %configure \ | ||
| --prefix=%{_prefix} \ | ||
| --with-dovecot=%{_libdir}/dovecot | ||
| --with-dovecot=%{_libdir}dovecot | ||
| %{__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 | ||
|
|
@@ -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* | ||
|
|
||
|
|
@@ -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 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
|
||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.