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

Update OBS package #145

Open
dalgaaf opened this issue May 23, 2018 · 10 comments
Open

Update OBS package #145

dalgaaf opened this issue May 23, 2018 · 10 comments

Comments

@dalgaaf
Copy link
Collaborator

dalgaaf commented May 23, 2018

TODO:

  • Update OBS package to latest package
  • Check if we can enable CentOS builds
@dalgaaf dalgaaf self-assigned this May 23, 2018
@dalgaaf
Copy link
Collaborator Author

dalgaaf commented May 23, 2018

@giacomd
Copy link

giacomd commented May 23, 2018

Hi Danny, I managed to build the plugin on CentOS 7 by:

  • Adding the IUS repo to the system: https://ius.io/
  • Installing the dovecot22u and dovecot22u-devel packages.

@dalgaaf
Copy link
Collaborator Author

dalgaaf commented May 24, 2018

Hi @giacomd,
great news.

I have managed to update the package for openSUSE and SLES12-SP3/4 and SLES15.
https://download.opensuse.org/repositories/home:/dalgaaf:/dovecot-ceph-plugin/

I also build all dependencies for CentOS, but the build currently fails with an error during "make install":
[ 102s] /bin/sh ../../libtool --mode=install /bin/install -c libdict_rados_plugin.la '/usr/lib64/dovecot'
[ 102s] libtool: install: warning: relinking `libdict_rados_plugin.la'
[ 102s] libtool: install: (cd /home/abuild/rpmbuild/BUILD/dovecot-ceph-plugin-0.0.8/src/dict-rados; /bin/sh /home/abuild/rpmbuild/BUILD/dovecot-ceph-plugin-0.0.8/libtool --tag CXX --mode=relink g++ -std=gnu++11 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wreturn-type -Wno-overloaded-virtual -Wswitch-enum -Wswitch-default -Wno-undef -Wno-redundant-decls -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Wno-error=overloaded-virtual -Wno-error=undef -Wno-error=redundant-decls -fpermissive -std=c++11 -fPIC -DPIC -module -avoid-version -Wl,-z,now -Wl,-z,relro -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o libdict_rados_plugin.la -rpath /usr/lib64/dovecot libdict-rados-plugin.lo dict-rados.lo -L/usr/lib64/dovecot -ldovecot ../../src/librmb/librmb.la -lrados )
[ 102s] libtool: relink: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbeginS.o .libs/libdict-rados-plugin.o .libs/dict-rados.o -L/usr/lib64/dovecot -ldovecot -L/usr/lib64 -lrmb -ljansson -lrados -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o -O2 -m64 -mtune=generic -Wl,-z -Wl,now -Wl,-z -Wl,relro -Wl,-z -Wl,relro -Wl,-soname -
[ 102s] /bin/ld: cannot find -lrmb

I have to check what's wrong, seems to be an issue with substitution of (installation) paths.

@dalgaaf
Copy link
Collaborator Author

dalgaaf commented May 24, 2018

For some reason make install tries to install libdict_rados_plugin.la to /usr/lib64/dovecot instead of /home/abuild/rpmbuild/BUILDROOT/dovecot-ceph-plugin-0.0.8-3.1.x86_64/usr/lib64/dovecot as it would be required in the build system.

@giacomd
Copy link

giacomd commented May 24, 2018

This is because in the %install part you should specify the destination directory. This works for me:

%install
%makeinstall DESTDIR=%{buildroot}

After that I get a problem with the location of librmb, I'm checking.

@dalgaaf
Copy link
Collaborator Author

dalgaaf commented May 24, 2018

I already did some changes to the spec file to fix it (https://build.opensuse.org/package/view_file/home:dalgaaf:dovecot-ceph-plugin/dovecot-ceph-plugin_CentOS/dovecot-ceph-plugin.spec?expand=1), but no luck with the librmb issue. Didn't manage to work on it today.

@giacomd
Copy link

giacomd commented May 25, 2018

OK I managed to build on a CentOS 7.5 by adapting your spec file:
https://github.com/giacomd/dovecot-ceph-plugin/blob/centos7-rpm/rpm/dovecot-ceph-plugin-opensuse.spec

The packages install correctly.

@dalgaaf
Copy link
Collaborator Author

dalgaaf commented May 27, 2018

Thanks, it seems one of the problems is that it does not create the _libdir correctly in the build env. Why this works on SUSE I don't know. The usage of %makeinstall is also problematic, it does only expand correctly on SUSE products.

@richarson
Copy link

Since nobody else mentioned it, there's also an official dovecot 2.3.x repository for CentOS, among other distros:
https://repo.dovecot.org/

@giacomd
Copy link

giacomd commented May 28, 2018

Indeed good point. I was assuming we should stay with 2.2.x and using IUS.
Maybe better to use the official 2.3.x repos instead? Or make it a param / double check on the SPEC file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants