]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
winbind build 2034/head
authorAlexander Clouter <aclouter@networkradius.com>
Thu, 3 Aug 2017 16:35:33 +0000 (17:35 +0100)
committerAlexander Clouter <aclouter@networkradius.com>
Thu, 3 Aug 2017 17:55:01 +0000 (18:55 +0100)
redhat/freeradius.spec
scripts/docker/build-centos6/Dockerfile
scripts/docker/build-centos7/Dockerfile

index 8b2d3943fb049c0ac36c31f92bf67e1ce449c05f..dcfd7f4f74d4c17c2809b0d3805ad56946269aae 100644 (file)
@@ -75,6 +75,8 @@ BuildRequires: libpcap-devel
 BuildRequires: libtalloc-devel
 BuildRequires: net-snmp-devel
 BuildRequires: net-snmp-utils
+BuildRequires: libwbclient-devel
+BuildRequires: samba-devel
 %if %{?_unitdir:1}%{!?_unitdir:0}
 BuildRequires: systemd-devel
 %endif
@@ -97,6 +99,8 @@ Requires: readline
 Requires: libtalloc
 Requires: libkqueue
 Requires: net-snmp
+Requires: libwbclient
+Requires: samba-libs
 Requires: zlib
 Requires: pam
 
@@ -417,6 +421,7 @@ export LDFLAGS="-Wl,--build-id"
         --without-rlm_sql_db2 \
         --with-jsonc-lib-dir=%{_libdir} \
         --with-jsonc-include-dir=/usr/include/json \
+        --with-winbind-include-dir=/usr/include/samba-4.0 \
 %if %{?_with_freeradius_openssl:1}%{!?_with_freeradius_openssl:0}
         --with-openssl-lib-dir=/opt/openssl/lib \
         --with-openssl-include-dir=/opt/openssl/include \
index 8ebe9f5289ca77a15d9813b98c1406e03ea73dbc..23ada12a719c383cd9f095f02b2a7f8ae5e59aa8 100644 (file)
@@ -6,6 +6,7 @@ FROM centos:centos6
 RUN yum groupinstall -y "Development Tools"
 RUN yum install -y rpmdevtools
 RUN yum install -y vim emacs nano
+RUN yum install -y openssl
 RUN yum install -y yum-utils
 
 #
@@ -29,27 +30,21 @@ WORKDIR /usr/local/src
 #
 #  Get a modern version of cmake.  We need 3.8.2 or later to build libkqueue rpms
 #
-RUN yum install -y openssl
-
-RUN curl https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.sh > ./cmake.sh
-
-RUN [ "$(cat ./cmake.sh | openssl sha256 | sed 's/^.* //')" = "bb26b1871f9e5c2fb73476186cc94d03b674608f704b48b94d617340b87b4d73" ]
-RUN chmod +x ./cmake.sh
-RUN ./cmake.sh --skip-license --prefix=/usr/local
+RUN curl -f -o cmake.sh https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.sh
+RUN [ "$(cat cmake.sh | openssl sha256 | sed 's/^.* //')" = "bb26b1871f9e5c2fb73476186cc94d03b674608f704b48b94d617340b87b4d73" ]
+RUN sh cmake.sh --skip-license --prefix=/usr/local
 
 #
 #  Grab libkqueue and build
 #
 WORKDIR /usr/local/src/repositories
-RUN git clone --depth=1 https://github.com/arr2036/libkqueue.git
-WORKDIR libkqueue
-
 # Fixme: Change to the main repo when they merge this branch
-RUN git checkout patch-3
+RUN git clone --branch patch-3 --depth=1 https://github.com/arr2036/libkqueue.git
+WORKDIR libkqueue
 RUN cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib ./ && \
     make && \
     cpack -G RPM
-RUN yum localinstall -y ./*.rpm
+RUN yum localinstall -y *.rpm
 
 #
 #  Use LTB's openldap packages intead of the distribution version to avoid linking against NSS
@@ -63,7 +58,6 @@ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LTB-project'\
 > /etc/yum.repos.d/ltb-project.repo
 RUN rpm --import https://ltb-project.org/lib/RPM-GPG-KEY-LTB-project
 
-
 WORKDIR /usr/local/src/repositories
 RUN git clone --depth=1 https://github.com/mattrose/hiredis.git
 WORKDIR hiredis
@@ -81,7 +75,8 @@ RUN yum localinstall -y $HOME/rpmbuild/RPMS/*/hiredis-*.rpm
 #  Shallow clone the FreeRADIUS source
 #
 WORKDIR /usr/local/src/repositories
-RUN git clone --depth=1 https://github.com/mattrose/freeradius-server.git
+ARG source=https://github.com/FreeRADIUS/freeradius-server.git
+RUN git clone --depth 1 --no-single-branch ${source}
 
 WORKDIR freeradius-server
 
@@ -89,7 +84,7 @@ WORKDIR freeradius-server
 RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^v[0-9]*\.[0-9x]*\.x$");\
        do \
                git checkout $i; \
-               [ -e ./redhat/freeradius.spec ] && yum-builddep -y ./redhat/freeradius.spec; \
+               [ -e redhat/freeradius.spec ] && yum-builddep -y redhat/freeradius.spec; \
        done
 
 # Create the build tree
@@ -98,7 +93,7 @@ RUN rpmdev-setuptree
 ### This is necessary for the jenkins server to talk to the docker instance
 RUN yum install -y openssh-server java-1.8.0-openjdk-headless createrepo
 RUN adduser jenkins
-RUN echo -e "jenkins1" | passwd --stdin jenkins
+RUN printf jenkins1 | passwd --stdin jenkins
 RUN mkdir /var/run/sshd
 RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
 RUN sed -i 's|session    required     pam_loginuid.so|session    optional     pam_loginuid.so|g' /etc/pam.d/sshd
index a240fe18c8d72fc515fa21ac3c1a3b84c29b442d..7af22fe3db2028a404a2d25313f6f2c8a80346bd 100644 (file)
@@ -6,6 +6,7 @@ FROM centos:centos7
 RUN yum groupinstall -y "Development Tools"
 RUN yum install -y rpmdevtools
 RUN yum install -y vim emacs nano
+RUN yum install -y openssl
 
 #
 #  Add the EPEL repository for freetds and hiredis
@@ -28,27 +29,21 @@ WORKDIR /usr/local/src
 #
 #  Get a modern version of cmake.  We need 3.8.2 or later to build libkqueue rpms
 #
-RUN yum install -y openssl
-
-RUN curl https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.sh > ./cmake.sh
-
-RUN [ "$(cat ./cmake.sh | openssl sha256 | sed 's/^.* //')" = "bb26b1871f9e5c2fb73476186cc94d03b674608f704b48b94d617340b87b4d73" ]
-RUN chmod +x ./cmake.sh
-RUN ./cmake.sh --skip-license --prefix=/usr/local
+RUN curl -f -o cmake.sh https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.sh
+RUN [ "$(cat cmake.sh | openssl sha256 | sed 's/^.* //')" = "bb26b1871f9e5c2fb73476186cc94d03b674608f704b48b94d617340b87b4d73" ]
+RUN sh cmake.sh --skip-license --prefix=/usr/local
 
 #
 #  Grab libkqueue and build
 #
 WORKDIR /usr/local/src/repositories
-RUN git clone --depth=1 --no-single-branch https://github.com/arr2036/libkqueue.git
-WORKDIR libkqueue
-
 # Fixme: Change to the main repo when they merge this branch
-RUN git checkout patch-3
+RUN git clone --branch patch-3 --depth=1 https://github.com/arr2036/libkqueue.git
+WORKDIR libkqueue
 RUN cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib ./ && \
     make && \
     cpack -G RPM
-RUN yum localinstall -y ./*.rpm
+RUN yum localinstall -y *.rpm
 
 #
 #  Use LTB's openldap packages intead of the distribution version to avoid linking against NSS
@@ -66,14 +61,16 @@ RUN rpm --import https://ltb-project.org/lib/RPM-GPG-KEY-LTB-project
 #  Shallow clone the FreeRADIUS source
 #
 WORKDIR /usr/local/src/repositories
-RUN git clone --depth 1 --no-single-branch https://github.com/FreeRADIUS/freeradius-server.git
+ARG source=https://github.com/FreeRADIUS/freeradius-server.git
+RUN git clone --depth 1 --no-single-branch ${source}
+
 WORKDIR freeradius-server
 
 # Install build dependencies for all branches
 RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^v[0-9]*\.[0-9x]*\.x$");\
        do \
                git checkout $i; \
-               [ -e ./redhat/freeradius.spec ] && yum-builddep -y ./redhat/freeradius.spec; \
+               [ -e redhat/freeradius.spec ] && yum-builddep -y redhat/freeradius.spec; \
        done
 
 # Create the build tree
@@ -82,7 +79,7 @@ RUN rpmdev-setuptree
 ### This is necessary for the jenkins server to talk to the docker instance
 RUN yum install -y openssh-server java-1.8.0-openjdk-headless createrepo
 RUN adduser jenkins
-RUN echo -e "jenkins1" | passwd --stdin jenkins
+RUN printf jenkins1 | passwd --stdin jenkins
 RUN mkdir /var/run/sshd
 RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
 RUN sed -i 's|session    required     pam_loginuid.so|session    optional     pam_loginuid.so|g' /etc/pam.d/sshd