.gitlab-ci.yml
# Defines stages which are to be executed
stages:
- build
# Stage "build"
run-build-centos6:
stage: build
image: centos68:rpmbuild
script:
## - touch /root/rpmbuild/BUILD/centos6
## - yum -y update
# rpm-build
## - yum -y install rpm-build
## - mkdir -pv /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
# BuildRequires
- yum -y install gcc make autoconf
# Epel
## - yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# Source
- yum -y install wget
- wget http://www.dovecot.org/releases/2.2/dovecot-2.2.28.tar.gz -O /root/rpmbuild/SOURCES/dovecot-2.2.28.tar.gz
- wget http://pigeonhole.dovecot.org/releases/2.2/dovecot-2.2-pigeonhole-0.4.17.tar.gz -O /root/rpmbuild/SOURCES/dovecot-2.2-pigeonhole-0.4.17.tar.gz
# Requires
- yum -y install expat-devel libcap-devel mysql-devel openldap-devel openssl-devel pam-devel zlib-devel openssl
# build
- rpmbuild -ba CentOS_6/dovecot-2.2.28.spec
# Stage "build"
run-build-centos5:
stage: build
image: centos5:rpmbuild
script:
## - touch /root/rpmbuild/BUILD/centos5
## - mkdir -pv /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
## - yum -y install gcc make autoconf
# Source
- yum -y install wget
- wget http://www.dovecot.org/releases/2.2/dovecot-2.2.28.tar.gz -O /root/rpmbuild/SOURCES/dovecot-2.2.28.tar.gz --no-check-certificate
- wget http://pigeonhole.dovecot.org/releases/2.2/dovecot-2.2-pigeonhole-0.4.17.tar.gz -O /root/rpmbuild/SOURCES/dovecot-2.2-pigeonhole-0.4.17.tar.gz --no-check-certificate
# Requires
- yum -y install expat-devel libcap-devel mysql-devel openldap-devel openssl-devel pam-devel zlib-devel openssl
# build
- rpmbuild -ba CentOS_5/dovecot-2.2.28.spec
Centos 6
Name: dovecot
Epoch: 1
Version: 2.2.28
Release: 1%{?dist}
Summary: Secure imap and pop3 server
%define pigeonholever 0.4.17
Group: System Environment/Daemons
License: MIT and LGPLv2
URL: http://www.dovecot.org
Source0: http://www.dovecot.org/releases/2.2/%{name}-%{version}%{?prever}.tar.gz
Source1: https://pigeonhole.dovecot.org/releases/2.2/dovecot-2.2-pigeonhole-%{pigeonholever}.tar.gz
BuildRequires: expat-devel libcap-devel mysql-devel openldap-devel openssl-devel pam-devel zlib-devel
Requires: openssl
# Declare custom prefix
%define _prefix /opt/dovecot-%{version}
%define _docdir %{_prefix}/share/doc
# Filter out all files in _docdir from being scanned for requires/provides
%{?perl_default_filter}
%description
Dovecot is an IMAP server for Linux/UNIX-like systems, written with security primarily in mind.
It also contains a small POP3 server. It supports mail in either of maildir or mbox formats.
%package pigeonhole
Requires: %{name} = %{epoch}:%{version}-%{release}
Summary: Sieve and managesieve plug-in for dovecot
Group: System Environment/Daemons
License: MIT and LGPLv2
%description pigeonhole
This package provides sieve and managesieve plug-in for dovecot LDA.
%prep
%setup -q -D -a 1
%build
%{_configure} \
--prefix=%{_prefix} \
INSTALL_DATA="install -c -p -m644" \
--docdir=%{_docdir}/%{name} \
--disable-static \
--disable-rpath \
--with-nss \
--with-shadow \
--with-pam \
--with-gssapi=plugin \
--with-zlib \
--with-libcap \
--with-ssl=openssl \
--with-ldap \
--with-mysql \
--with-solr \
--with-docs
make %{?_smp_mflags}
# pigeonhole
pushd %{name}-2*2-pigeonhole-%{pigeonholever}
%{_configure} \
--prefix=%{_prefix} \
INSTALL_DATA="install -c -p -m644" \
--disable-static \
--with-dovecot=../ \
--without-unfinished-features
make %{?_smp_mflags}
popd
%install
rm -rf $RPM_BUILD_ROOT
%make_install DESTDIR=$RPM_BUILD_ROOT
# pigeonhole
pushd %{name}-2*2-pigeonhole-%{pigeonholever}
%make_install DESTDIR=$RPM_BUILD_ROOT
popd
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc
/opt/dovecot-%{version}
%changelog
* Tue Feb 28 2017 Cloud Services <is@otenet.gr>
- Custom RPM package for dovecot v2.2.28 and pigeonhole v0.4.17
* Tue Feb 21 2017 Cloud Services <is@otenet.gr>
- Custom RPM package for dovecot v2.2.27 and pigeonhole v0.4.16
Centos 5
Name: dovecot
Epoch: 1
Version: 2.2.28
Release: 1%{?dist}
Summary: Secure imap and pop3 server
%define pigeonholever 0.4.17
Group: System Environment/Daemons
License: MIT and LGPLv2
URL: http://www.dovecot.org
Source0: http://www.dovecot.org/releases/2.2/%{name}-%{version}%{?prever}.tar.gz
Source1: https://pigeonhole.dovecot.org/releases/2.2/dovecot-2.2-pigeonhole-%{pigeonholever}.tar.gz
BuildRequires: expat-devel libcap-devel mysql-devel openldap-devel openssl-devel pam-devel zlib-devel
Requires: openssl
# Declare custom prefix
%define _prefix /opt/dovecot-%{version}
%define _docdir %{_prefix}/share/doc
%define _configure ./configure
# Filter out all files in _docdir from being scanned for requires/provides
%{?perl_default_filter}
%description
Dovecot is an IMAP server for Linux/UNIX-like systems, written with security primarily in mind.
It also contains a small POP3 server. It supports mail in either of maildir or mbox formats.
%package pigeonhole
Requires: %{name} = %{epoch}:%{version}-%{release}
Summary: Sieve and managesieve plug-in for dovecot
Group: System Environment/Daemons
License: MIT and LGPLv2
%description pigeonhole
This package provides sieve and managesieve plug-in for dovecot LDA.
%prep
%setup -q -D -a 1
%build
%{_configure} \
--prefix=%{_prefix} \
INSTALL_DATA="install -c -p -m644" \
--docdir=%{_docdir}/%{name} \
--disable-static \
--disable-rpath \
--with-nss \
--with-shadow \
--with-pam \
--with-zlib \
--with-libcap \
--with-ssl=openssl \
--with-ldap \
--with-mysql \
--with-solr \
--with-docs
# kerberos
# --with-gssapi=plugin \
make %{?_smp_mflags}
# pigeonhole
pushd %{name}-2*2-pigeonhole-%{pigeonholever}
%{_configure} \
--prefix=%{_prefix} \
INSTALL_DATA="install -c -p -m644" \
--disable-static \
--with-dovecot=../ \
--without-unfinished-features
make %{?_smp_mflags}
popd
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# %make_install DESTDIR=$RPM_BUILD_ROOT
# pigeonhole
pushd %{name}-2*2-pigeonhole-%{pigeonholever}
make install DESTDIR=$RPM_BUILD_ROOT
# %make_install DESTDIR=$RPM_BUILD_ROOT
popd
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc
/opt/dovecot-%{version}
%changelog
* Thu Mar 30 2017 Cloud Services <is@otenet.gr>
- Remove gssapi on configuration
* Tue Feb 28 2017 Cloud Services <is@otenet.gr>
- Custom RPM package for dovecot v2.2.28 and pigeonhole v0.4.17
* Tue Feb 21 2017 Cloud Services <is@otenet.gr>
- Custom RPM package for dovecot v2.2.27 and pigeonhole v0.4.16
gitlab-runner
/etc/gitlab-runner/config.toml
concurrent = 1
check_interval = 0
[[runners]]
name = "localhost"
url = "https://localhost/ci"
token = "72e10e23bdcf7364a5000c0ddbcd64"
executor = "docker"
[runners.docker]
tls_verify = false
image = "centos:6.8"
privileged = false
#disable_cache = false
disable_cache = true
#volumes = ["/cache"]
volumes = ["/usr/src/rpmbuild:/root/rpmbuild:rw"]
[runners.cache]