From 9f29675ab825bb6635406980e967b0549afdbad3 Mon Sep 17 00:00:00 2001 From: Ada-Codina Date: Mon, 11 Oct 2021 09:25:01 -0600 Subject: [PATCH 01/16] did not delete in original areas --- libnss-aad/docker/amazon/2018.03/Dockerfile | 45 +++++++++++++ libnss-aad/docker/amazon/Dockerfile | 41 ++++++++++++ libnss-aad/docker/debian/Dockerfile | 39 ++++++++++++ libnss-aad/docker/ubuntu/Dockerfile | 70 +++++++++++++++++++++ openvpn-auth-aad/docker/debian/Dockerfile | 19 ++++++ openvpn-auth-aad/docker/ubuntu/Dockerfile | 19 ++++++ pam_aad/docker/amazon/2018.03/Dockerfile | 40 ++++++++++++ pam_aad/docker/amazon/Dockerfile | 40 ++++++++++++ pam_aad/docker/debian/Dockerfile | 37 +++++++++++ pam_aad/docker/ubuntu/Dockerfile | 32 ++++++++++ 10 files changed, 382 insertions(+) create mode 100644 libnss-aad/docker/amazon/2018.03/Dockerfile create mode 100644 libnss-aad/docker/amazon/Dockerfile create mode 100644 libnss-aad/docker/debian/Dockerfile create mode 100644 libnss-aad/docker/ubuntu/Dockerfile create mode 100644 openvpn-auth-aad/docker/debian/Dockerfile create mode 100644 openvpn-auth-aad/docker/ubuntu/Dockerfile create mode 100644 pam_aad/docker/amazon/2018.03/Dockerfile create mode 100644 pam_aad/docker/amazon/Dockerfile create mode 100644 pam_aad/docker/debian/Dockerfile create mode 100644 pam_aad/docker/ubuntu/Dockerfile diff --git a/libnss-aad/docker/amazon/2018.03/Dockerfile b/libnss-aad/docker/amazon/2018.03/Dockerfile new file mode 100644 index 0000000..3cce687 --- /dev/null +++ b/libnss-aad/docker/amazon/2018.03/Dockerfile @@ -0,0 +1,45 @@ +FROM amazonlinux:2018.03 + +RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \ + && yum update -y && yum group install -y 'Development Tools' \ + && yum install -y \ + autopoint \ + cmake \ + git \ + indent \ + libcurl-devel \ + jansson-devel \ + pam-devel \ + openssl-devel + +WORKDIR /tmp +RUN git clone https://github.com/benmcollins/libjwt && \ + cd libjwt && git checkout tags/v1.10.1 && \ + autoreconf -i && ./configure && make && make install + +# See: https://github.com/antirez/sds/issues/97 +WORKDIR /tmp +RUN git clone https://github.com/antirez/sds libsds && \ + cd libsds && git checkout tags/2.0.0 && \ + echo "typedef int sdsvoid;" >> sdsalloc.h && \ + gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ + -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ + sds.c sds.h sdsalloc.h && \ + cp -a libsds.so.2.0.0 /usr/local/lib/ && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ + mkdir -p /usr/local/include/sds && cp -a sds.h /usr/local/include/sds/ + +WORKDIR /tmp +RUN git clone https://github.com/jedisct1/libsodium && \ + cd libsodium && git checkout tags/1.0.17 && \ + ./autogen.sh && ./configure && make && make check && make install + +WORKDIR /usr/src/libnss_aad +COPY . /usr/src/libnss_aad +RUN git submodule update --init --recursive && \ + cd linux-pam && git checkout tags/Linux-PAM-1_1_8 && \ + ./autogen.sh && ./configure --disable-regenerate-docu && \ + cd .. && patch linux-pam/modules/pam_unix/passverify.c \ + .patches/0001-Remove-static-keyword-from-crypt_make_salt.patch && \ + LIB_DIR=/lib64 make -e install diff --git a/libnss-aad/docker/amazon/Dockerfile b/libnss-aad/docker/amazon/Dockerfile new file mode 100644 index 0000000..407ad43 --- /dev/null +++ b/libnss-aad/docker/amazon/Dockerfile @@ -0,0 +1,41 @@ +FROM amazonlinux:2 + +RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ + && yum update -y && yum group install -y 'Development Tools' \ + && yum install -y \ + autopoint \ + cmake \ + git \ + indent \ + libcurl-devel \ + jansson-devel \ + pam-devel \ + openssl-devel + +WORKDIR /tmp +RUN git clone https://github.com/benmcollins/libjwt && \ + cd libjwt && git checkout tags/v1.10.1 && \ + autoreconf -i && ./configure && make && make install + +# See: https://github.com/antirez/sds/issues/97 +WORKDIR /tmp +RUN git clone https://github.com/antirez/sds libsds && \ + cd libsds && git checkout tags/2.0.0 && \ + echo "typedef int sdsvoid;" >> sdsalloc.h && \ + gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ + -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ + sds.c sds.h sdsalloc.h && \ + cp -a libsds.so.2.0.0 /usr/local/lib/ && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ + mkdir -p /usr/local/include/sds && cp -a sds.h /usr/local/include/sds/ + +WORKDIR /tmp +RUN git clone https://github.com/jedisct1/libsodium && \ + cd libsodium && git checkout tags/1.0.17 && \ + ./autogen.sh && ./configure && make && make check && make install + +WORKDIR /usr/src/libnss_aad +COPY . /usr/src/libnss_aad +RUN make depends && \ + LIB_DIR=/lib64 make -e install diff --git a/libnss-aad/docker/debian/Dockerfile b/libnss-aad/docker/debian/Dockerfile new file mode 100644 index 0000000..badfad2 --- /dev/null +++ b/libnss-aad/docker/debian/Dockerfile @@ -0,0 +1,39 @@ +FROM debian:9.7 +ARG VERSION +ARG DEBVER + +RUN echo "deb http://http.us.debian.org/debian sid main" \ + >> /etc/apt/sources.list && \ + apt update && apt install -y \ + automake \ + autopoint \ + build-essential \ + cmake \ + curl \ + debhelper \ + devscripts \ + git \ + indent \ + libcurl4-openssl-dev \ + libjansson-dev \ + libjwt-dev \ + libsodium-dev \ + libssl-dev \ + libtool \ + libxcrypt-dev \ + pkg-config \ + quilt + +ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ + SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" +WORKDIR /tmp +RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" + +WORKDIR /usr/src/libnss_aad +COPY . /usr/src/libnss_aad +RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -i'.git' && \ + dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb" diff --git a/libnss-aad/docker/ubuntu/Dockerfile b/libnss-aad/docker/ubuntu/Dockerfile new file mode 100644 index 0000000..4475c88 --- /dev/null +++ b/libnss-aad/docker/ubuntu/Dockerfile @@ -0,0 +1,70 @@ +FROM ubuntu:18.04 +ARG VERSION +ARG DEBVER + +RUN echo "deb http://http.us.debian.org/debian sid main" \ + >> /etc/apt/sources.list && \ + apt update && apt install -y \ + automake \ + autopoint \ + build-essential \ + cmake \ + curl \ + debhelper \ + devscripts \ + git \ + indent \ + libcurl4-openssl-dev \ + libjansson-dev \ + libjwt-dev \ + libsodium-dev \ + libssl-dev \ + libtool \ + libxcrypt-dev \ + pkg-config \ + quilt + +ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ + SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" +WORKDIR /tmp +RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" + +WORKDIR /usr/src/libnss_aad +COPY . /usr/src/libnss_aad +RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -i'.git' && \ + dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb" +RUN apt update && apt install -y \ + software-properties-common && \ + add-apt-repository -y ppa:lramage/sds && \ + add-apt-repository -y ppa:jnchi/ppa + +RUN apt update && apt install -y \ + automake \ + autopoint \ + build-essential \ + cmake \ + curl \ + debhelper \ + devscripts \ + git \ + indent \ + libcurl4-openssl-dev \ + libjansson-dev \ + libjwt-dev \ + libsds-dev \ + libsodium-dev \ + libssl-dev \ + libtool \ + libxcrypt-dev \ + pkg-config \ + quilt + +WORKDIR /usr/src/libnss_aad +COPY . /usr/src/libnss_aad +RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -i'.git' && \ + dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb" diff --git a/openvpn-auth-aad/docker/debian/Dockerfile b/openvpn-auth-aad/docker/debian/Dockerfile new file mode 100644 index 0000000..59ececa --- /dev/null +++ b/openvpn-auth-aad/docker/debian/Dockerfile @@ -0,0 +1,19 @@ +FROM aad-for-linux/pam_aad:debian +ARG VERSION +ARG DEBVER + +RUN apt-get update -qq && apt-get install -y \ + liblz4-dev \ + liblzo2-dev \ + openvpn \ + wget + +WORKDIR /usr/src/openvpn-auth-aad +COPY . /usr/src/openvpn-auth-aad +RUN useradd -m dev -s /bin/bash && \ + chown -R dev:dev /usr/src/openvpn-auth-aad + +RUN tar cvzf "../openvpn-auth-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -d -i'(.*)' && \ + dpkg -i "../openvpn-auth-aad_${VERSION}-${DEBVER}_amd64.deb" + diff --git a/openvpn-auth-aad/docker/ubuntu/Dockerfile b/openvpn-auth-aad/docker/ubuntu/Dockerfile new file mode 100644 index 0000000..09cbdf9 --- /dev/null +++ b/openvpn-auth-aad/docker/ubuntu/Dockerfile @@ -0,0 +1,19 @@ +FROM aad-for-linux/pam_aad:ubuntu +ARG VERSION +ARG DEBVER + +RUN apt-get update -qq && apt-get install -y \ + liblz4-dev \ + liblzo2-dev \ + openvpn \ + wget + +WORKDIR /usr/src/openvpn-auth-aad +COPY . /usr/src/openvpn-auth-aad +RUN useradd -m dev -s /bin/bash && \ + chown -R dev:dev /usr/src/openvpn-auth-aad + +RUN tar cvzf "../openvpn-auth-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -d -i'(.*)' && \ + dpkg -i "../openvpn-auth-aad_${VERSION}-${DEBVER}_amd64.deb" + diff --git a/pam_aad/docker/amazon/2018.03/Dockerfile b/pam_aad/docker/amazon/2018.03/Dockerfile new file mode 100644 index 0000000..4781907 --- /dev/null +++ b/pam_aad/docker/amazon/2018.03/Dockerfile @@ -0,0 +1,40 @@ +FROM amazonlinux:2018.03 + +RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \ + && yum update -y && yum group install -y 'Development Tools' \ + && yum install -y \ + git \ + indent \ + libcurl-devel \ + jansson-devel \ + pam-devel \ + openssl-devel \ + libuuid-devel + +WORKDIR /tmp +RUN git clone https://github.com/benmcollins/libjwt && \ + cd libjwt && git checkout tags/v1.10.1 && \ + autoreconf -i && ./configure && make && make install + +# See: https://github.com/antirez/sds/issues/97 +WORKDIR /tmp +RUN git clone https://github.com/antirez/sds libsds && \ + cd libsds && git checkout tags/2.0.0 && \ + echo "typedef int sdsvoid;" >> sdsalloc.h && \ + gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ + -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ + sds.c sds.h sdsalloc.h && \ + cp -a libsds.so.2.0.0 /usr/local/lib/ && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ + ldconfig && mkdir -p /usr/local/include/sds && \ + cp -a sds.h /usr/local/include/sds/ + +WORKDIR /usr/src/pam_aad +COPY . /usr/src/pam_aad + +ENV PAMDIR="/lib64/security" \ + LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64" +RUN ./bootstrap.sh && \ + ./configure --with-pam-dir="${PAMDIR}" && \ + make && make install diff --git a/pam_aad/docker/amazon/Dockerfile b/pam_aad/docker/amazon/Dockerfile new file mode 100644 index 0000000..c0d025e --- /dev/null +++ b/pam_aad/docker/amazon/Dockerfile @@ -0,0 +1,40 @@ +FROM amazonlinux:2 + +RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ + && yum update -y && yum group install -y 'Development Tools' \ + && yum install -y \ + git \ + indent \ + libcurl-devel \ + jansson-devel \ + pam-devel \ + openssl-devel \ + libuuid-devel + +WORKDIR /tmp +RUN git clone https://github.com/benmcollins/libjwt && \ + cd libjwt && git checkout tags/v1.10.1 && \ + autoreconf -i && ./configure && make && make install + +# See: https://github.com/antirez/sds/issues/97 +WORKDIR /tmp +RUN git clone https://github.com/antirez/sds libsds && \ + cd libsds && git checkout tags/2.0.0 && \ + echo "typedef int sdsvoid;" >> sdsalloc.h && \ + gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ + -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ + sds.c sds.h sdsalloc.h && \ + cp -a libsds.so.2.0.0 /usr/local/lib/ && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ + ldconfig && mkdir -p /usr/local/include/sds && \ + cp -a sds.h /usr/local/include/sds/ + +WORKDIR /usr/src/pam_aad +COPY . /usr/src/pam_aad + +ENV PAMDIR="/lib64/security" \ + LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64" +RUN ./bootstrap.sh && \ + ./configure --with-pam-dir="${PAMDIR}" && \ + make && make install diff --git a/pam_aad/docker/debian/Dockerfile b/pam_aad/docker/debian/Dockerfile new file mode 100644 index 0000000..547cd85 --- /dev/null +++ b/pam_aad/docker/debian/Dockerfile @@ -0,0 +1,37 @@ +FROM debian:9.7 +ARG VERSION +ARG DEBVER + +RUN echo "deb http://http.us.debian.org/debian sid main" \ + >> /etc/apt/sources.list && \ + apt update && apt install -y \ + automake \ + build-essential \ + curl \ + debhelper \ + devscripts \ + git \ + indent \ + libcurl4-openssl-dev \ + libjansson-dev \ + libjwt-dev \ + libpam0g-dev \ + libssl-dev \ + libtool \ + pkg-config \ + quilt \ + uuid-dev + +ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ + SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" +WORKDIR /tmp +RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" + +WORKDIR /usr/src/pam_aad +COPY . /usr/src/pam_aad +RUN tar cvzf "../pam-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -d -i'(.*)' && \ + dpkg -i "../libpam-aad_${VERSION}-${DEBVER}_amd64.deb" diff --git a/pam_aad/docker/ubuntu/Dockerfile b/pam_aad/docker/ubuntu/Dockerfile new file mode 100644 index 0000000..e5f5ce8 --- /dev/null +++ b/pam_aad/docker/ubuntu/Dockerfile @@ -0,0 +1,32 @@ +FROM ubuntu:18.04 +ARG VERSION +ARG DEBVER + +RUN apt update && apt install -y \ + software-properties-common && \ + add-apt-repository -y ppa:lramage/sds + +RUN apt update && apt install -y \ + automake \ + build-essential \ + curl \ + debhelper \ + devscripts \ + git \ + indent \ + libcurl4-openssl-dev \ + libjansson-dev \ + libjwt-dev \ + libpam0g-dev \ + libsds-dev \ + libssl-dev \ + libtool \ + pkg-config \ + quilt \ + uuid-dev + +WORKDIR /usr/src/pam_aad +COPY . /usr/src/pam_aad +RUN tar cvzf "../pam-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -d -i'(.*)' && \ + dpkg -i "../libpam-aad_${VERSION}-${DEBVER}_amd64.deb" From 0eb454da7bc44b137c2148f19d8979df65e2ee5c Mon Sep 17 00:00:00 2001 From: Ada-Codina <89468347+Ada-Codina@users.noreply.github.com> Date: Mon, 11 Oct 2021 13:20:43 -0600 Subject: [PATCH 02/16] Update Dockerfile --- libnss-aad/docker/amazon/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/libnss-aad/docker/amazon/Dockerfile b/libnss-aad/docker/amazon/Dockerfile index 407ad43..4e87576 100644 --- a/libnss-aad/docker/amazon/Dockerfile +++ b/libnss-aad/docker/amazon/Dockerfile @@ -1,5 +1,3 @@ -FROM amazonlinux:2 - RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ && yum update -y && yum group install -y 'Development Tools' \ && yum install -y \ From dc80ed5b74dc4311fa008bee2b92ec1781163bdf Mon Sep 17 00:00:00 2001 From: Ada-Codina <89468347+Ada-Codina@users.noreply.github.com> Date: Mon, 11 Oct 2021 13:20:45 -0600 Subject: [PATCH 03/16] Update Dockerfile --- libnss-aad/docker/amazon/2018.03/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/libnss-aad/docker/amazon/2018.03/Dockerfile b/libnss-aad/docker/amazon/2018.03/Dockerfile index 3cce687..338ef8e 100644 --- a/libnss-aad/docker/amazon/2018.03/Dockerfile +++ b/libnss-aad/docker/amazon/2018.03/Dockerfile @@ -1,5 +1,3 @@ -FROM amazonlinux:2018.03 - RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \ && yum update -y && yum group install -y 'Development Tools' \ && yum install -y \ From 1d0d6861beafbe1a075c12f462de89d0e44110cc Mon Sep 17 00:00:00 2001 From: Ada-Codina Date: Mon, 11 Oct 2021 13:27:37 -0600 Subject: [PATCH 04/16] new location --- libnss-aad/amazon/2018.03/Dockerfile | 43 +++++++++++++++++ libnss-aad/amazon/Dockerfile | 39 ++++++++++++++++ libnss-aad/debian/Dockerfile | 39 ++++++++++++++++ libnss-aad/ubuntu/Dockerfile | 70 ++++++++++++++++++++++++++++ openvpn-auth-aad/debian/Dockerfile | 19 ++++++++ openvpn-auth-aad/ubuntu/Dockerfile | 19 ++++++++ pam_aad/amazon/2018.03/Dockerfile | 40 ++++++++++++++++ pam_aad/amazon/Dockerfile | 40 ++++++++++++++++ pam_aad/debian/Dockerfile | 37 +++++++++++++++ pam_aad/ubuntu/Dockerfile | 32 +++++++++++++ 10 files changed, 378 insertions(+) create mode 100644 libnss-aad/amazon/2018.03/Dockerfile create mode 100644 libnss-aad/amazon/Dockerfile create mode 100644 libnss-aad/debian/Dockerfile create mode 100644 libnss-aad/ubuntu/Dockerfile create mode 100644 openvpn-auth-aad/debian/Dockerfile create mode 100644 openvpn-auth-aad/ubuntu/Dockerfile create mode 100644 pam_aad/amazon/2018.03/Dockerfile create mode 100644 pam_aad/amazon/Dockerfile create mode 100644 pam_aad/debian/Dockerfile create mode 100644 pam_aad/ubuntu/Dockerfile diff --git a/libnss-aad/amazon/2018.03/Dockerfile b/libnss-aad/amazon/2018.03/Dockerfile new file mode 100644 index 0000000..338ef8e --- /dev/null +++ b/libnss-aad/amazon/2018.03/Dockerfile @@ -0,0 +1,43 @@ +RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \ + && yum update -y && yum group install -y 'Development Tools' \ + && yum install -y \ + autopoint \ + cmake \ + git \ + indent \ + libcurl-devel \ + jansson-devel \ + pam-devel \ + openssl-devel + +WORKDIR /tmp +RUN git clone https://github.com/benmcollins/libjwt && \ + cd libjwt && git checkout tags/v1.10.1 && \ + autoreconf -i && ./configure && make && make install + +# See: https://github.com/antirez/sds/issues/97 +WORKDIR /tmp +RUN git clone https://github.com/antirez/sds libsds && \ + cd libsds && git checkout tags/2.0.0 && \ + echo "typedef int sdsvoid;" >> sdsalloc.h && \ + gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ + -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ + sds.c sds.h sdsalloc.h && \ + cp -a libsds.so.2.0.0 /usr/local/lib/ && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ + mkdir -p /usr/local/include/sds && cp -a sds.h /usr/local/include/sds/ + +WORKDIR /tmp +RUN git clone https://github.com/jedisct1/libsodium && \ + cd libsodium && git checkout tags/1.0.17 && \ + ./autogen.sh && ./configure && make && make check && make install + +WORKDIR /usr/src/libnss_aad +COPY . /usr/src/libnss_aad +RUN git submodule update --init --recursive && \ + cd linux-pam && git checkout tags/Linux-PAM-1_1_8 && \ + ./autogen.sh && ./configure --disable-regenerate-docu && \ + cd .. && patch linux-pam/modules/pam_unix/passverify.c \ + .patches/0001-Remove-static-keyword-from-crypt_make_salt.patch && \ + LIB_DIR=/lib64 make -e install diff --git a/libnss-aad/amazon/Dockerfile b/libnss-aad/amazon/Dockerfile new file mode 100644 index 0000000..4e87576 --- /dev/null +++ b/libnss-aad/amazon/Dockerfile @@ -0,0 +1,39 @@ +RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ + && yum update -y && yum group install -y 'Development Tools' \ + && yum install -y \ + autopoint \ + cmake \ + git \ + indent \ + libcurl-devel \ + jansson-devel \ + pam-devel \ + openssl-devel + +WORKDIR /tmp +RUN git clone https://github.com/benmcollins/libjwt && \ + cd libjwt && git checkout tags/v1.10.1 && \ + autoreconf -i && ./configure && make && make install + +# See: https://github.com/antirez/sds/issues/97 +WORKDIR /tmp +RUN git clone https://github.com/antirez/sds libsds && \ + cd libsds && git checkout tags/2.0.0 && \ + echo "typedef int sdsvoid;" >> sdsalloc.h && \ + gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ + -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ + sds.c sds.h sdsalloc.h && \ + cp -a libsds.so.2.0.0 /usr/local/lib/ && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ + mkdir -p /usr/local/include/sds && cp -a sds.h /usr/local/include/sds/ + +WORKDIR /tmp +RUN git clone https://github.com/jedisct1/libsodium && \ + cd libsodium && git checkout tags/1.0.17 && \ + ./autogen.sh && ./configure && make && make check && make install + +WORKDIR /usr/src/libnss_aad +COPY . /usr/src/libnss_aad +RUN make depends && \ + LIB_DIR=/lib64 make -e install diff --git a/libnss-aad/debian/Dockerfile b/libnss-aad/debian/Dockerfile new file mode 100644 index 0000000..badfad2 --- /dev/null +++ b/libnss-aad/debian/Dockerfile @@ -0,0 +1,39 @@ +FROM debian:9.7 +ARG VERSION +ARG DEBVER + +RUN echo "deb http://http.us.debian.org/debian sid main" \ + >> /etc/apt/sources.list && \ + apt update && apt install -y \ + automake \ + autopoint \ + build-essential \ + cmake \ + curl \ + debhelper \ + devscripts \ + git \ + indent \ + libcurl4-openssl-dev \ + libjansson-dev \ + libjwt-dev \ + libsodium-dev \ + libssl-dev \ + libtool \ + libxcrypt-dev \ + pkg-config \ + quilt + +ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ + SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" +WORKDIR /tmp +RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" + +WORKDIR /usr/src/libnss_aad +COPY . /usr/src/libnss_aad +RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -i'.git' && \ + dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb" diff --git a/libnss-aad/ubuntu/Dockerfile b/libnss-aad/ubuntu/Dockerfile new file mode 100644 index 0000000..4475c88 --- /dev/null +++ b/libnss-aad/ubuntu/Dockerfile @@ -0,0 +1,70 @@ +FROM ubuntu:18.04 +ARG VERSION +ARG DEBVER + +RUN echo "deb http://http.us.debian.org/debian sid main" \ + >> /etc/apt/sources.list && \ + apt update && apt install -y \ + automake \ + autopoint \ + build-essential \ + cmake \ + curl \ + debhelper \ + devscripts \ + git \ + indent \ + libcurl4-openssl-dev \ + libjansson-dev \ + libjwt-dev \ + libsodium-dev \ + libssl-dev \ + libtool \ + libxcrypt-dev \ + pkg-config \ + quilt + +ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ + SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" +WORKDIR /tmp +RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" + +WORKDIR /usr/src/libnss_aad +COPY . /usr/src/libnss_aad +RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -i'.git' && \ + dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb" +RUN apt update && apt install -y \ + software-properties-common && \ + add-apt-repository -y ppa:lramage/sds && \ + add-apt-repository -y ppa:jnchi/ppa + +RUN apt update && apt install -y \ + automake \ + autopoint \ + build-essential \ + cmake \ + curl \ + debhelper \ + devscripts \ + git \ + indent \ + libcurl4-openssl-dev \ + libjansson-dev \ + libjwt-dev \ + libsds-dev \ + libsodium-dev \ + libssl-dev \ + libtool \ + libxcrypt-dev \ + pkg-config \ + quilt + +WORKDIR /usr/src/libnss_aad +COPY . /usr/src/libnss_aad +RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -i'.git' && \ + dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb" diff --git a/openvpn-auth-aad/debian/Dockerfile b/openvpn-auth-aad/debian/Dockerfile new file mode 100644 index 0000000..59ececa --- /dev/null +++ b/openvpn-auth-aad/debian/Dockerfile @@ -0,0 +1,19 @@ +FROM aad-for-linux/pam_aad:debian +ARG VERSION +ARG DEBVER + +RUN apt-get update -qq && apt-get install -y \ + liblz4-dev \ + liblzo2-dev \ + openvpn \ + wget + +WORKDIR /usr/src/openvpn-auth-aad +COPY . /usr/src/openvpn-auth-aad +RUN useradd -m dev -s /bin/bash && \ + chown -R dev:dev /usr/src/openvpn-auth-aad + +RUN tar cvzf "../openvpn-auth-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -d -i'(.*)' && \ + dpkg -i "../openvpn-auth-aad_${VERSION}-${DEBVER}_amd64.deb" + diff --git a/openvpn-auth-aad/ubuntu/Dockerfile b/openvpn-auth-aad/ubuntu/Dockerfile new file mode 100644 index 0000000..09cbdf9 --- /dev/null +++ b/openvpn-auth-aad/ubuntu/Dockerfile @@ -0,0 +1,19 @@ +FROM aad-for-linux/pam_aad:ubuntu +ARG VERSION +ARG DEBVER + +RUN apt-get update -qq && apt-get install -y \ + liblz4-dev \ + liblzo2-dev \ + openvpn \ + wget + +WORKDIR /usr/src/openvpn-auth-aad +COPY . /usr/src/openvpn-auth-aad +RUN useradd -m dev -s /bin/bash && \ + chown -R dev:dev /usr/src/openvpn-auth-aad + +RUN tar cvzf "../openvpn-auth-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -d -i'(.*)' && \ + dpkg -i "../openvpn-auth-aad_${VERSION}-${DEBVER}_amd64.deb" + diff --git a/pam_aad/amazon/2018.03/Dockerfile b/pam_aad/amazon/2018.03/Dockerfile new file mode 100644 index 0000000..4781907 --- /dev/null +++ b/pam_aad/amazon/2018.03/Dockerfile @@ -0,0 +1,40 @@ +FROM amazonlinux:2018.03 + +RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \ + && yum update -y && yum group install -y 'Development Tools' \ + && yum install -y \ + git \ + indent \ + libcurl-devel \ + jansson-devel \ + pam-devel \ + openssl-devel \ + libuuid-devel + +WORKDIR /tmp +RUN git clone https://github.com/benmcollins/libjwt && \ + cd libjwt && git checkout tags/v1.10.1 && \ + autoreconf -i && ./configure && make && make install + +# See: https://github.com/antirez/sds/issues/97 +WORKDIR /tmp +RUN git clone https://github.com/antirez/sds libsds && \ + cd libsds && git checkout tags/2.0.0 && \ + echo "typedef int sdsvoid;" >> sdsalloc.h && \ + gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ + -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ + sds.c sds.h sdsalloc.h && \ + cp -a libsds.so.2.0.0 /usr/local/lib/ && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ + ldconfig && mkdir -p /usr/local/include/sds && \ + cp -a sds.h /usr/local/include/sds/ + +WORKDIR /usr/src/pam_aad +COPY . /usr/src/pam_aad + +ENV PAMDIR="/lib64/security" \ + LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64" +RUN ./bootstrap.sh && \ + ./configure --with-pam-dir="${PAMDIR}" && \ + make && make install diff --git a/pam_aad/amazon/Dockerfile b/pam_aad/amazon/Dockerfile new file mode 100644 index 0000000..c0d025e --- /dev/null +++ b/pam_aad/amazon/Dockerfile @@ -0,0 +1,40 @@ +FROM amazonlinux:2 + +RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ + && yum update -y && yum group install -y 'Development Tools' \ + && yum install -y \ + git \ + indent \ + libcurl-devel \ + jansson-devel \ + pam-devel \ + openssl-devel \ + libuuid-devel + +WORKDIR /tmp +RUN git clone https://github.com/benmcollins/libjwt && \ + cd libjwt && git checkout tags/v1.10.1 && \ + autoreconf -i && ./configure && make && make install + +# See: https://github.com/antirez/sds/issues/97 +WORKDIR /tmp +RUN git clone https://github.com/antirez/sds libsds && \ + cd libsds && git checkout tags/2.0.0 && \ + echo "typedef int sdsvoid;" >> sdsalloc.h && \ + gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ + -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ + sds.c sds.h sdsalloc.h && \ + cp -a libsds.so.2.0.0 /usr/local/lib/ && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ + ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ + ldconfig && mkdir -p /usr/local/include/sds && \ + cp -a sds.h /usr/local/include/sds/ + +WORKDIR /usr/src/pam_aad +COPY . /usr/src/pam_aad + +ENV PAMDIR="/lib64/security" \ + LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64" +RUN ./bootstrap.sh && \ + ./configure --with-pam-dir="${PAMDIR}" && \ + make && make install diff --git a/pam_aad/debian/Dockerfile b/pam_aad/debian/Dockerfile new file mode 100644 index 0000000..547cd85 --- /dev/null +++ b/pam_aad/debian/Dockerfile @@ -0,0 +1,37 @@ +FROM debian:9.7 +ARG VERSION +ARG DEBVER + +RUN echo "deb http://http.us.debian.org/debian sid main" \ + >> /etc/apt/sources.list && \ + apt update && apt install -y \ + automake \ + build-essential \ + curl \ + debhelper \ + devscripts \ + git \ + indent \ + libcurl4-openssl-dev \ + libjansson-dev \ + libjwt-dev \ + libpam0g-dev \ + libssl-dev \ + libtool \ + pkg-config \ + quilt \ + uuid-dev + +ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ + SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" +WORKDIR /tmp +RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" + +WORKDIR /usr/src/pam_aad +COPY . /usr/src/pam_aad +RUN tar cvzf "../pam-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -d -i'(.*)' && \ + dpkg -i "../libpam-aad_${VERSION}-${DEBVER}_amd64.deb" diff --git a/pam_aad/ubuntu/Dockerfile b/pam_aad/ubuntu/Dockerfile new file mode 100644 index 0000000..e5f5ce8 --- /dev/null +++ b/pam_aad/ubuntu/Dockerfile @@ -0,0 +1,32 @@ +FROM ubuntu:18.04 +ARG VERSION +ARG DEBVER + +RUN apt update && apt install -y \ + software-properties-common && \ + add-apt-repository -y ppa:lramage/sds + +RUN apt update && apt install -y \ + automake \ + build-essential \ + curl \ + debhelper \ + devscripts \ + git \ + indent \ + libcurl4-openssl-dev \ + libjansson-dev \ + libjwt-dev \ + libpam0g-dev \ + libsds-dev \ + libssl-dev \ + libtool \ + pkg-config \ + quilt \ + uuid-dev + +WORKDIR /usr/src/pam_aad +COPY . /usr/src/pam_aad +RUN tar cvzf "../pam-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -d -i'(.*)' && \ + dpkg -i "../libpam-aad_${VERSION}-${DEBVER}_amd64.deb" From d99387008ff94cd91fac572ed8950a037aef0cb5 Mon Sep 17 00:00:00 2001 From: Ada-Codina Date: Mon, 11 Oct 2021 13:36:46 -0600 Subject: [PATCH 05/16] update lines --- libnss-aad/ubuntu/Dockerfile | 2 +- openvpn-auth-aad/debian/Dockerfile | 2 +- pam_aad/debian/Dockerfile | 4 ++-- pam_aad/ubuntu/Dockerfile | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libnss-aad/ubuntu/Dockerfile b/libnss-aad/ubuntu/Dockerfile index 4475c88..946708c 100644 --- a/libnss-aad/ubuntu/Dockerfile +++ b/libnss-aad/ubuntu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 ARG VERSION ARG DEBVER diff --git a/openvpn-auth-aad/debian/Dockerfile b/openvpn-auth-aad/debian/Dockerfile index 59ececa..66be99e 100644 --- a/openvpn-auth-aad/debian/Dockerfile +++ b/openvpn-auth-aad/debian/Dockerfile @@ -1,4 +1,4 @@ -FROM aad-for-linux/pam_aad:debian +FROM openvpn_auth_aad/debian/Dockerfile ARG VERSION ARG DEBVER diff --git a/pam_aad/debian/Dockerfile b/pam_aad/debian/Dockerfile index 547cd85..f63a47a 100644 --- a/pam_aad/debian/Dockerfile +++ b/pam_aad/debian/Dockerfile @@ -1,8 +1,8 @@ -FROM debian:9.7 +FROM pam_aad/debian/Dockerfile ARG VERSION ARG DEBVER -RUN echo "deb http://http.us.debian.org/debian sid main" \ +RUN echo "deb http://http.us.debian.org/debian bullseye main" \ >> /etc/apt/sources.list && \ apt update && apt install -y \ automake \ diff --git a/pam_aad/ubuntu/Dockerfile b/pam_aad/ubuntu/Dockerfile index e5f5ce8..1d4c02b 100644 --- a/pam_aad/ubuntu/Dockerfile +++ b/pam_aad/ubuntu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 ARG VERSION ARG DEBVER From 853ad3c695ebc29137fad2c0060ef4ac07f2a7ad Mon Sep 17 00:00:00 2001 From: Ada-Codina <89468347+Ada-Codina@users.noreply.github.com> Date: Mon, 11 Oct 2021 13:39:58 -0600 Subject: [PATCH 06/16] Delete Dockerfile --- libnss-aad/amazon/2018.03/Dockerfile | 43 ---------------------------- 1 file changed, 43 deletions(-) delete mode 100644 libnss-aad/amazon/2018.03/Dockerfile diff --git a/libnss-aad/amazon/2018.03/Dockerfile b/libnss-aad/amazon/2018.03/Dockerfile deleted file mode 100644 index 338ef8e..0000000 --- a/libnss-aad/amazon/2018.03/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \ - && yum update -y && yum group install -y 'Development Tools' \ - && yum install -y \ - autopoint \ - cmake \ - git \ - indent \ - libcurl-devel \ - jansson-devel \ - pam-devel \ - openssl-devel - -WORKDIR /tmp -RUN git clone https://github.com/benmcollins/libjwt && \ - cd libjwt && git checkout tags/v1.10.1 && \ - autoreconf -i && ./configure && make && make install - -# See: https://github.com/antirez/sds/issues/97 -WORKDIR /tmp -RUN git clone https://github.com/antirez/sds libsds && \ - cd libsds && git checkout tags/2.0.0 && \ - echo "typedef int sdsvoid;" >> sdsalloc.h && \ - gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ - -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ - sds.c sds.h sdsalloc.h && \ - cp -a libsds.so.2.0.0 /usr/local/lib/ && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ - mkdir -p /usr/local/include/sds && cp -a sds.h /usr/local/include/sds/ - -WORKDIR /tmp -RUN git clone https://github.com/jedisct1/libsodium && \ - cd libsodium && git checkout tags/1.0.17 && \ - ./autogen.sh && ./configure && make && make check && make install - -WORKDIR /usr/src/libnss_aad -COPY . /usr/src/libnss_aad -RUN git submodule update --init --recursive && \ - cd linux-pam && git checkout tags/Linux-PAM-1_1_8 && \ - ./autogen.sh && ./configure --disable-regenerate-docu && \ - cd .. && patch linux-pam/modules/pam_unix/passverify.c \ - .patches/0001-Remove-static-keyword-from-crypt_make_salt.patch && \ - LIB_DIR=/lib64 make -e install From cb6fd20fb674a6214df84065516e634e07b1e161 Mon Sep 17 00:00:00 2001 From: Ada-Codina <89468347+Ada-Codina@users.noreply.github.com> Date: Mon, 11 Oct 2021 13:40:37 -0600 Subject: [PATCH 07/16] Delete libnss-aad/amazon directory --- libnss-aad/amazon/Dockerfile | 39 ------------------------------------ 1 file changed, 39 deletions(-) delete mode 100644 libnss-aad/amazon/Dockerfile diff --git a/libnss-aad/amazon/Dockerfile b/libnss-aad/amazon/Dockerfile deleted file mode 100644 index 4e87576..0000000 --- a/libnss-aad/amazon/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ - && yum update -y && yum group install -y 'Development Tools' \ - && yum install -y \ - autopoint \ - cmake \ - git \ - indent \ - libcurl-devel \ - jansson-devel \ - pam-devel \ - openssl-devel - -WORKDIR /tmp -RUN git clone https://github.com/benmcollins/libjwt && \ - cd libjwt && git checkout tags/v1.10.1 && \ - autoreconf -i && ./configure && make && make install - -# See: https://github.com/antirez/sds/issues/97 -WORKDIR /tmp -RUN git clone https://github.com/antirez/sds libsds && \ - cd libsds && git checkout tags/2.0.0 && \ - echo "typedef int sdsvoid;" >> sdsalloc.h && \ - gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ - -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ - sds.c sds.h sdsalloc.h && \ - cp -a libsds.so.2.0.0 /usr/local/lib/ && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ - mkdir -p /usr/local/include/sds && cp -a sds.h /usr/local/include/sds/ - -WORKDIR /tmp -RUN git clone https://github.com/jedisct1/libsodium && \ - cd libsodium && git checkout tags/1.0.17 && \ - ./autogen.sh && ./configure && make && make check && make install - -WORKDIR /usr/src/libnss_aad -COPY . /usr/src/libnss_aad -RUN make depends && \ - LIB_DIR=/lib64 make -e install From 249670cd27b5867b85661da195d20feacc790b4c Mon Sep 17 00:00:00 2001 From: Ada-Codina <89468347+Ada-Codina@users.noreply.github.com> Date: Mon, 11 Oct 2021 13:40:53 -0600 Subject: [PATCH 08/16] Delete pam_aad/amazon directory --- pam_aad/amazon/2018.03/Dockerfile | 40 ------------------------------- pam_aad/amazon/Dockerfile | 40 ------------------------------- 2 files changed, 80 deletions(-) delete mode 100644 pam_aad/amazon/2018.03/Dockerfile delete mode 100644 pam_aad/amazon/Dockerfile diff --git a/pam_aad/amazon/2018.03/Dockerfile b/pam_aad/amazon/2018.03/Dockerfile deleted file mode 100644 index 4781907..0000000 --- a/pam_aad/amazon/2018.03/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -FROM amazonlinux:2018.03 - -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \ - && yum update -y && yum group install -y 'Development Tools' \ - && yum install -y \ - git \ - indent \ - libcurl-devel \ - jansson-devel \ - pam-devel \ - openssl-devel \ - libuuid-devel - -WORKDIR /tmp -RUN git clone https://github.com/benmcollins/libjwt && \ - cd libjwt && git checkout tags/v1.10.1 && \ - autoreconf -i && ./configure && make && make install - -# See: https://github.com/antirez/sds/issues/97 -WORKDIR /tmp -RUN git clone https://github.com/antirez/sds libsds && \ - cd libsds && git checkout tags/2.0.0 && \ - echo "typedef int sdsvoid;" >> sdsalloc.h && \ - gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ - -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ - sds.c sds.h sdsalloc.h && \ - cp -a libsds.so.2.0.0 /usr/local/lib/ && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ - ldconfig && mkdir -p /usr/local/include/sds && \ - cp -a sds.h /usr/local/include/sds/ - -WORKDIR /usr/src/pam_aad -COPY . /usr/src/pam_aad - -ENV PAMDIR="/lib64/security" \ - LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64" -RUN ./bootstrap.sh && \ - ./configure --with-pam-dir="${PAMDIR}" && \ - make && make install diff --git a/pam_aad/amazon/Dockerfile b/pam_aad/amazon/Dockerfile deleted file mode 100644 index c0d025e..0000000 --- a/pam_aad/amazon/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -FROM amazonlinux:2 - -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ - && yum update -y && yum group install -y 'Development Tools' \ - && yum install -y \ - git \ - indent \ - libcurl-devel \ - jansson-devel \ - pam-devel \ - openssl-devel \ - libuuid-devel - -WORKDIR /tmp -RUN git clone https://github.com/benmcollins/libjwt && \ - cd libjwt && git checkout tags/v1.10.1 && \ - autoreconf -i && ./configure && make && make install - -# See: https://github.com/antirez/sds/issues/97 -WORKDIR /tmp -RUN git clone https://github.com/antirez/sds libsds && \ - cd libsds && git checkout tags/2.0.0 && \ - echo "typedef int sdsvoid;" >> sdsalloc.h && \ - gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ - -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ - sds.c sds.h sdsalloc.h && \ - cp -a libsds.so.2.0.0 /usr/local/lib/ && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ - ldconfig && mkdir -p /usr/local/include/sds && \ - cp -a sds.h /usr/local/include/sds/ - -WORKDIR /usr/src/pam_aad -COPY . /usr/src/pam_aad - -ENV PAMDIR="/lib64/security" \ - LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64" -RUN ./bootstrap.sh && \ - ./configure --with-pam-dir="${PAMDIR}" && \ - make && make install From e27678db089f13daf884ee59ed0511d78c868b0f Mon Sep 17 00:00:00 2001 From: Ada-Codina Date: Mon, 11 Oct 2021 13:42:26 -0600 Subject: [PATCH 09/16] deletion --- libnss-aad/amazon/2018.03/Dockerfile | 43 ------------- libnss-aad/amazon/Dockerfile | 39 ------------ libnss-aad/docker/amazon/2018.03/Dockerfile | 43 ------------- libnss-aad/docker/amazon/Dockerfile | 39 ------------ libnss-aad/docker/debian/Dockerfile | 39 ------------ libnss-aad/docker/ubuntu/Dockerfile | 70 --------------------- openvpn-auth-aad/docker/debian/Dockerfile | 19 ------ openvpn-auth-aad/docker/ubuntu/Dockerfile | 19 ------ pam_aad/amazon/2018.03/Dockerfile | 40 ------------ pam_aad/amazon/Dockerfile | 40 ------------ pam_aad/docker/amazon/2018.03/Dockerfile | 40 ------------ pam_aad/docker/amazon/Dockerfile | 40 ------------ pam_aad/docker/debian/Dockerfile | 37 ----------- pam_aad/docker/ubuntu/Dockerfile | 32 ---------- 14 files changed, 540 deletions(-) delete mode 100644 libnss-aad/amazon/2018.03/Dockerfile delete mode 100644 libnss-aad/amazon/Dockerfile delete mode 100644 libnss-aad/docker/amazon/2018.03/Dockerfile delete mode 100644 libnss-aad/docker/amazon/Dockerfile delete mode 100644 libnss-aad/docker/debian/Dockerfile delete mode 100644 libnss-aad/docker/ubuntu/Dockerfile delete mode 100644 openvpn-auth-aad/docker/debian/Dockerfile delete mode 100644 openvpn-auth-aad/docker/ubuntu/Dockerfile delete mode 100644 pam_aad/amazon/2018.03/Dockerfile delete mode 100644 pam_aad/amazon/Dockerfile delete mode 100644 pam_aad/docker/amazon/2018.03/Dockerfile delete mode 100644 pam_aad/docker/amazon/Dockerfile delete mode 100644 pam_aad/docker/debian/Dockerfile delete mode 100644 pam_aad/docker/ubuntu/Dockerfile diff --git a/libnss-aad/amazon/2018.03/Dockerfile b/libnss-aad/amazon/2018.03/Dockerfile deleted file mode 100644 index 338ef8e..0000000 --- a/libnss-aad/amazon/2018.03/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \ - && yum update -y && yum group install -y 'Development Tools' \ - && yum install -y \ - autopoint \ - cmake \ - git \ - indent \ - libcurl-devel \ - jansson-devel \ - pam-devel \ - openssl-devel - -WORKDIR /tmp -RUN git clone https://github.com/benmcollins/libjwt && \ - cd libjwt && git checkout tags/v1.10.1 && \ - autoreconf -i && ./configure && make && make install - -# See: https://github.com/antirez/sds/issues/97 -WORKDIR /tmp -RUN git clone https://github.com/antirez/sds libsds && \ - cd libsds && git checkout tags/2.0.0 && \ - echo "typedef int sdsvoid;" >> sdsalloc.h && \ - gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ - -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ - sds.c sds.h sdsalloc.h && \ - cp -a libsds.so.2.0.0 /usr/local/lib/ && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ - mkdir -p /usr/local/include/sds && cp -a sds.h /usr/local/include/sds/ - -WORKDIR /tmp -RUN git clone https://github.com/jedisct1/libsodium && \ - cd libsodium && git checkout tags/1.0.17 && \ - ./autogen.sh && ./configure && make && make check && make install - -WORKDIR /usr/src/libnss_aad -COPY . /usr/src/libnss_aad -RUN git submodule update --init --recursive && \ - cd linux-pam && git checkout tags/Linux-PAM-1_1_8 && \ - ./autogen.sh && ./configure --disable-regenerate-docu && \ - cd .. && patch linux-pam/modules/pam_unix/passverify.c \ - .patches/0001-Remove-static-keyword-from-crypt_make_salt.patch && \ - LIB_DIR=/lib64 make -e install diff --git a/libnss-aad/amazon/Dockerfile b/libnss-aad/amazon/Dockerfile deleted file mode 100644 index 4e87576..0000000 --- a/libnss-aad/amazon/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ - && yum update -y && yum group install -y 'Development Tools' \ - && yum install -y \ - autopoint \ - cmake \ - git \ - indent \ - libcurl-devel \ - jansson-devel \ - pam-devel \ - openssl-devel - -WORKDIR /tmp -RUN git clone https://github.com/benmcollins/libjwt && \ - cd libjwt && git checkout tags/v1.10.1 && \ - autoreconf -i && ./configure && make && make install - -# See: https://github.com/antirez/sds/issues/97 -WORKDIR /tmp -RUN git clone https://github.com/antirez/sds libsds && \ - cd libsds && git checkout tags/2.0.0 && \ - echo "typedef int sdsvoid;" >> sdsalloc.h && \ - gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ - -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ - sds.c sds.h sdsalloc.h && \ - cp -a libsds.so.2.0.0 /usr/local/lib/ && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ - mkdir -p /usr/local/include/sds && cp -a sds.h /usr/local/include/sds/ - -WORKDIR /tmp -RUN git clone https://github.com/jedisct1/libsodium && \ - cd libsodium && git checkout tags/1.0.17 && \ - ./autogen.sh && ./configure && make && make check && make install - -WORKDIR /usr/src/libnss_aad -COPY . /usr/src/libnss_aad -RUN make depends && \ - LIB_DIR=/lib64 make -e install diff --git a/libnss-aad/docker/amazon/2018.03/Dockerfile b/libnss-aad/docker/amazon/2018.03/Dockerfile deleted file mode 100644 index 338ef8e..0000000 --- a/libnss-aad/docker/amazon/2018.03/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \ - && yum update -y && yum group install -y 'Development Tools' \ - && yum install -y \ - autopoint \ - cmake \ - git \ - indent \ - libcurl-devel \ - jansson-devel \ - pam-devel \ - openssl-devel - -WORKDIR /tmp -RUN git clone https://github.com/benmcollins/libjwt && \ - cd libjwt && git checkout tags/v1.10.1 && \ - autoreconf -i && ./configure && make && make install - -# See: https://github.com/antirez/sds/issues/97 -WORKDIR /tmp -RUN git clone https://github.com/antirez/sds libsds && \ - cd libsds && git checkout tags/2.0.0 && \ - echo "typedef int sdsvoid;" >> sdsalloc.h && \ - gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ - -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ - sds.c sds.h sdsalloc.h && \ - cp -a libsds.so.2.0.0 /usr/local/lib/ && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ - mkdir -p /usr/local/include/sds && cp -a sds.h /usr/local/include/sds/ - -WORKDIR /tmp -RUN git clone https://github.com/jedisct1/libsodium && \ - cd libsodium && git checkout tags/1.0.17 && \ - ./autogen.sh && ./configure && make && make check && make install - -WORKDIR /usr/src/libnss_aad -COPY . /usr/src/libnss_aad -RUN git submodule update --init --recursive && \ - cd linux-pam && git checkout tags/Linux-PAM-1_1_8 && \ - ./autogen.sh && ./configure --disable-regenerate-docu && \ - cd .. && patch linux-pam/modules/pam_unix/passverify.c \ - .patches/0001-Remove-static-keyword-from-crypt_make_salt.patch && \ - LIB_DIR=/lib64 make -e install diff --git a/libnss-aad/docker/amazon/Dockerfile b/libnss-aad/docker/amazon/Dockerfile deleted file mode 100644 index 4e87576..0000000 --- a/libnss-aad/docker/amazon/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ - && yum update -y && yum group install -y 'Development Tools' \ - && yum install -y \ - autopoint \ - cmake \ - git \ - indent \ - libcurl-devel \ - jansson-devel \ - pam-devel \ - openssl-devel - -WORKDIR /tmp -RUN git clone https://github.com/benmcollins/libjwt && \ - cd libjwt && git checkout tags/v1.10.1 && \ - autoreconf -i && ./configure && make && make install - -# See: https://github.com/antirez/sds/issues/97 -WORKDIR /tmp -RUN git clone https://github.com/antirez/sds libsds && \ - cd libsds && git checkout tags/2.0.0 && \ - echo "typedef int sdsvoid;" >> sdsalloc.h && \ - gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ - -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ - sds.c sds.h sdsalloc.h && \ - cp -a libsds.so.2.0.0 /usr/local/lib/ && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ - mkdir -p /usr/local/include/sds && cp -a sds.h /usr/local/include/sds/ - -WORKDIR /tmp -RUN git clone https://github.com/jedisct1/libsodium && \ - cd libsodium && git checkout tags/1.0.17 && \ - ./autogen.sh && ./configure && make && make check && make install - -WORKDIR /usr/src/libnss_aad -COPY . /usr/src/libnss_aad -RUN make depends && \ - LIB_DIR=/lib64 make -e install diff --git a/libnss-aad/docker/debian/Dockerfile b/libnss-aad/docker/debian/Dockerfile deleted file mode 100644 index badfad2..0000000 --- a/libnss-aad/docker/debian/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM debian:9.7 -ARG VERSION -ARG DEBVER - -RUN echo "deb http://http.us.debian.org/debian sid main" \ - >> /etc/apt/sources.list && \ - apt update && apt install -y \ - automake \ - autopoint \ - build-essential \ - cmake \ - curl \ - debhelper \ - devscripts \ - git \ - indent \ - libcurl4-openssl-dev \ - libjansson-dev \ - libjwt-dev \ - libsodium-dev \ - libssl-dev \ - libtool \ - libxcrypt-dev \ - pkg-config \ - quilt - -ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ - SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" -WORKDIR /tmp -RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ - curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ - dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ - dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" - -WORKDIR /usr/src/libnss_aad -COPY . /usr/src/libnss_aad -RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - debuild -us -uc -i'.git' && \ - dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb" diff --git a/libnss-aad/docker/ubuntu/Dockerfile b/libnss-aad/docker/ubuntu/Dockerfile deleted file mode 100644 index 4475c88..0000000 --- a/libnss-aad/docker/ubuntu/Dockerfile +++ /dev/null @@ -1,70 +0,0 @@ -FROM ubuntu:18.04 -ARG VERSION -ARG DEBVER - -RUN echo "deb http://http.us.debian.org/debian sid main" \ - >> /etc/apt/sources.list && \ - apt update && apt install -y \ - automake \ - autopoint \ - build-essential \ - cmake \ - curl \ - debhelper \ - devscripts \ - git \ - indent \ - libcurl4-openssl-dev \ - libjansson-dev \ - libjwt-dev \ - libsodium-dev \ - libssl-dev \ - libtool \ - libxcrypt-dev \ - pkg-config \ - quilt - -ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ - SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" -WORKDIR /tmp -RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ - curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ - dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ - dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" - -WORKDIR /usr/src/libnss_aad -COPY . /usr/src/libnss_aad -RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - debuild -us -uc -i'.git' && \ - dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb" -RUN apt update && apt install -y \ - software-properties-common && \ - add-apt-repository -y ppa:lramage/sds && \ - add-apt-repository -y ppa:jnchi/ppa - -RUN apt update && apt install -y \ - automake \ - autopoint \ - build-essential \ - cmake \ - curl \ - debhelper \ - devscripts \ - git \ - indent \ - libcurl4-openssl-dev \ - libjansson-dev \ - libjwt-dev \ - libsds-dev \ - libsodium-dev \ - libssl-dev \ - libtool \ - libxcrypt-dev \ - pkg-config \ - quilt - -WORKDIR /usr/src/libnss_aad -COPY . /usr/src/libnss_aad -RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - debuild -us -uc -i'.git' && \ - dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb" diff --git a/openvpn-auth-aad/docker/debian/Dockerfile b/openvpn-auth-aad/docker/debian/Dockerfile deleted file mode 100644 index 59ececa..0000000 --- a/openvpn-auth-aad/docker/debian/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM aad-for-linux/pam_aad:debian -ARG VERSION -ARG DEBVER - -RUN apt-get update -qq && apt-get install -y \ - liblz4-dev \ - liblzo2-dev \ - openvpn \ - wget - -WORKDIR /usr/src/openvpn-auth-aad -COPY . /usr/src/openvpn-auth-aad -RUN useradd -m dev -s /bin/bash && \ - chown -R dev:dev /usr/src/openvpn-auth-aad - -RUN tar cvzf "../openvpn-auth-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - debuild -us -uc -d -i'(.*)' && \ - dpkg -i "../openvpn-auth-aad_${VERSION}-${DEBVER}_amd64.deb" - diff --git a/openvpn-auth-aad/docker/ubuntu/Dockerfile b/openvpn-auth-aad/docker/ubuntu/Dockerfile deleted file mode 100644 index 09cbdf9..0000000 --- a/openvpn-auth-aad/docker/ubuntu/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM aad-for-linux/pam_aad:ubuntu -ARG VERSION -ARG DEBVER - -RUN apt-get update -qq && apt-get install -y \ - liblz4-dev \ - liblzo2-dev \ - openvpn \ - wget - -WORKDIR /usr/src/openvpn-auth-aad -COPY . /usr/src/openvpn-auth-aad -RUN useradd -m dev -s /bin/bash && \ - chown -R dev:dev /usr/src/openvpn-auth-aad - -RUN tar cvzf "../openvpn-auth-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - debuild -us -uc -d -i'(.*)' && \ - dpkg -i "../openvpn-auth-aad_${VERSION}-${DEBVER}_amd64.deb" - diff --git a/pam_aad/amazon/2018.03/Dockerfile b/pam_aad/amazon/2018.03/Dockerfile deleted file mode 100644 index 4781907..0000000 --- a/pam_aad/amazon/2018.03/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -FROM amazonlinux:2018.03 - -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \ - && yum update -y && yum group install -y 'Development Tools' \ - && yum install -y \ - git \ - indent \ - libcurl-devel \ - jansson-devel \ - pam-devel \ - openssl-devel \ - libuuid-devel - -WORKDIR /tmp -RUN git clone https://github.com/benmcollins/libjwt && \ - cd libjwt && git checkout tags/v1.10.1 && \ - autoreconf -i && ./configure && make && make install - -# See: https://github.com/antirez/sds/issues/97 -WORKDIR /tmp -RUN git clone https://github.com/antirez/sds libsds && \ - cd libsds && git checkout tags/2.0.0 && \ - echo "typedef int sdsvoid;" >> sdsalloc.h && \ - gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ - -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ - sds.c sds.h sdsalloc.h && \ - cp -a libsds.so.2.0.0 /usr/local/lib/ && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ - ldconfig && mkdir -p /usr/local/include/sds && \ - cp -a sds.h /usr/local/include/sds/ - -WORKDIR /usr/src/pam_aad -COPY . /usr/src/pam_aad - -ENV PAMDIR="/lib64/security" \ - LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64" -RUN ./bootstrap.sh && \ - ./configure --with-pam-dir="${PAMDIR}" && \ - make && make install diff --git a/pam_aad/amazon/Dockerfile b/pam_aad/amazon/Dockerfile deleted file mode 100644 index c0d025e..0000000 --- a/pam_aad/amazon/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -FROM amazonlinux:2 - -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ - && yum update -y && yum group install -y 'Development Tools' \ - && yum install -y \ - git \ - indent \ - libcurl-devel \ - jansson-devel \ - pam-devel \ - openssl-devel \ - libuuid-devel - -WORKDIR /tmp -RUN git clone https://github.com/benmcollins/libjwt && \ - cd libjwt && git checkout tags/v1.10.1 && \ - autoreconf -i && ./configure && make && make install - -# See: https://github.com/antirez/sds/issues/97 -WORKDIR /tmp -RUN git clone https://github.com/antirez/sds libsds && \ - cd libsds && git checkout tags/2.0.0 && \ - echo "typedef int sdsvoid;" >> sdsalloc.h && \ - gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ - -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ - sds.c sds.h sdsalloc.h && \ - cp -a libsds.so.2.0.0 /usr/local/lib/ && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ - ldconfig && mkdir -p /usr/local/include/sds && \ - cp -a sds.h /usr/local/include/sds/ - -WORKDIR /usr/src/pam_aad -COPY . /usr/src/pam_aad - -ENV PAMDIR="/lib64/security" \ - LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64" -RUN ./bootstrap.sh && \ - ./configure --with-pam-dir="${PAMDIR}" && \ - make && make install diff --git a/pam_aad/docker/amazon/2018.03/Dockerfile b/pam_aad/docker/amazon/2018.03/Dockerfile deleted file mode 100644 index 4781907..0000000 --- a/pam_aad/docker/amazon/2018.03/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -FROM amazonlinux:2018.03 - -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \ - && yum update -y && yum group install -y 'Development Tools' \ - && yum install -y \ - git \ - indent \ - libcurl-devel \ - jansson-devel \ - pam-devel \ - openssl-devel \ - libuuid-devel - -WORKDIR /tmp -RUN git clone https://github.com/benmcollins/libjwt && \ - cd libjwt && git checkout tags/v1.10.1 && \ - autoreconf -i && ./configure && make && make install - -# See: https://github.com/antirez/sds/issues/97 -WORKDIR /tmp -RUN git clone https://github.com/antirez/sds libsds && \ - cd libsds && git checkout tags/2.0.0 && \ - echo "typedef int sdsvoid;" >> sdsalloc.h && \ - gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ - -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ - sds.c sds.h sdsalloc.h && \ - cp -a libsds.so.2.0.0 /usr/local/lib/ && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ - ldconfig && mkdir -p /usr/local/include/sds && \ - cp -a sds.h /usr/local/include/sds/ - -WORKDIR /usr/src/pam_aad -COPY . /usr/src/pam_aad - -ENV PAMDIR="/lib64/security" \ - LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64" -RUN ./bootstrap.sh && \ - ./configure --with-pam-dir="${PAMDIR}" && \ - make && make install diff --git a/pam_aad/docker/amazon/Dockerfile b/pam_aad/docker/amazon/Dockerfile deleted file mode 100644 index c0d025e..0000000 --- a/pam_aad/docker/amazon/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -FROM amazonlinux:2 - -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ - && yum update -y && yum group install -y 'Development Tools' \ - && yum install -y \ - git \ - indent \ - libcurl-devel \ - jansson-devel \ - pam-devel \ - openssl-devel \ - libuuid-devel - -WORKDIR /tmp -RUN git clone https://github.com/benmcollins/libjwt && \ - cd libjwt && git checkout tags/v1.10.1 && \ - autoreconf -i && ./configure && make && make install - -# See: https://github.com/antirez/sds/issues/97 -WORKDIR /tmp -RUN git clone https://github.com/antirez/sds libsds && \ - cd libsds && git checkout tags/2.0.0 && \ - echo "typedef int sdsvoid;" >> sdsalloc.h && \ - gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \ - -Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \ - sds.c sds.h sdsalloc.h && \ - cp -a libsds.so.2.0.0 /usr/local/lib/ && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \ - ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \ - ldconfig && mkdir -p /usr/local/include/sds && \ - cp -a sds.h /usr/local/include/sds/ - -WORKDIR /usr/src/pam_aad -COPY . /usr/src/pam_aad - -ENV PAMDIR="/lib64/security" \ - LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64" -RUN ./bootstrap.sh && \ - ./configure --with-pam-dir="${PAMDIR}" && \ - make && make install diff --git a/pam_aad/docker/debian/Dockerfile b/pam_aad/docker/debian/Dockerfile deleted file mode 100644 index 547cd85..0000000 --- a/pam_aad/docker/debian/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM debian:9.7 -ARG VERSION -ARG DEBVER - -RUN echo "deb http://http.us.debian.org/debian sid main" \ - >> /etc/apt/sources.list && \ - apt update && apt install -y \ - automake \ - build-essential \ - curl \ - debhelper \ - devscripts \ - git \ - indent \ - libcurl4-openssl-dev \ - libjansson-dev \ - libjwt-dev \ - libpam0g-dev \ - libssl-dev \ - libtool \ - pkg-config \ - quilt \ - uuid-dev - -ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ - SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" -WORKDIR /tmp -RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ - curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ - dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ - dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" - -WORKDIR /usr/src/pam_aad -COPY . /usr/src/pam_aad -RUN tar cvzf "../pam-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - debuild -us -uc -d -i'(.*)' && \ - dpkg -i "../libpam-aad_${VERSION}-${DEBVER}_amd64.deb" diff --git a/pam_aad/docker/ubuntu/Dockerfile b/pam_aad/docker/ubuntu/Dockerfile deleted file mode 100644 index e5f5ce8..0000000 --- a/pam_aad/docker/ubuntu/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM ubuntu:18.04 -ARG VERSION -ARG DEBVER - -RUN apt update && apt install -y \ - software-properties-common && \ - add-apt-repository -y ppa:lramage/sds - -RUN apt update && apt install -y \ - automake \ - build-essential \ - curl \ - debhelper \ - devscripts \ - git \ - indent \ - libcurl4-openssl-dev \ - libjansson-dev \ - libjwt-dev \ - libpam0g-dev \ - libsds-dev \ - libssl-dev \ - libtool \ - pkg-config \ - quilt \ - uuid-dev - -WORKDIR /usr/src/pam_aad -COPY . /usr/src/pam_aad -RUN tar cvzf "../pam-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - debuild -us -uc -d -i'(.*)' && \ - dpkg -i "../libpam-aad_${VERSION}-${DEBVER}_amd64.deb" From b8a9cb4cf3f7853e19334b0f06b2ec6f8b4180ae Mon Sep 17 00:00:00 2001 From: Ada-Codina Date: Mon, 11 Oct 2021 13:54:03 -0600 Subject: [PATCH 10/16] line update --- libnss-aad/debian/Dockerfile | 4 ++-- libnss-aad/ubuntu/Dockerfile | 2 +- openvpn-auth-aad/ubuntu/Dockerfile | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libnss-aad/debian/Dockerfile b/libnss-aad/debian/Dockerfile index badfad2..a251ba8 100644 --- a/libnss-aad/debian/Dockerfile +++ b/libnss-aad/debian/Dockerfile @@ -1,8 +1,8 @@ -FROM debian:9.7 +FROM debian:11.0 ARG VERSION ARG DEBVER -RUN echo "deb http://http.us.debian.org/debian sid main" \ +RUN echo "deb http://http.us.debian.org/debian bullseye main" \ >> /etc/apt/sources.list && \ apt update && apt install -y \ automake \ diff --git a/libnss-aad/ubuntu/Dockerfile b/libnss-aad/ubuntu/Dockerfile index 946708c..21f0277 100644 --- a/libnss-aad/ubuntu/Dockerfile +++ b/libnss-aad/ubuntu/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:20.04 ARG VERSION ARG DEBVER -RUN echo "deb http://http.us.debian.org/debian sid main" \ +RUN echo "deb http://http.us.debian.org/debian bullseye main" \ >> /etc/apt/sources.list && \ apt update && apt install -y \ automake \ diff --git a/openvpn-auth-aad/ubuntu/Dockerfile b/openvpn-auth-aad/ubuntu/Dockerfile index 09cbdf9..e6a38ae 100644 --- a/openvpn-auth-aad/ubuntu/Dockerfile +++ b/openvpn-auth-aad/ubuntu/Dockerfile @@ -1,4 +1,4 @@ -FROM aad-for-linux/pam_aad:ubuntu +FROM openvpn_auth_aad/ubuntu/Dockerfile ARG VERSION ARG DEBVER From 1c82aae4ff48bf9bad982d8e214061b105edb018 Mon Sep 17 00:00:00 2001 From: Ada-Codina Date: Tue, 12 Oct 2021 07:57:41 -0600 Subject: [PATCH 11/16] dockerfile updates --- openvpn-auth-aad/debian/Dockerfile | 2 +- pam_aad/debian/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openvpn-auth-aad/debian/Dockerfile b/openvpn-auth-aad/debian/Dockerfile index 66be99e..59ececa 100644 --- a/openvpn-auth-aad/debian/Dockerfile +++ b/openvpn-auth-aad/debian/Dockerfile @@ -1,4 +1,4 @@ -FROM openvpn_auth_aad/debian/Dockerfile +FROM aad-for-linux/pam_aad:debian ARG VERSION ARG DEBVER diff --git a/pam_aad/debian/Dockerfile b/pam_aad/debian/Dockerfile index f63a47a..e348767 100644 --- a/pam_aad/debian/Dockerfile +++ b/pam_aad/debian/Dockerfile @@ -1,4 +1,4 @@ -FROM pam_aad/debian/Dockerfile +FROM debian:11.0 ARG VERSION ARG DEBVER From 75e0f622db4d0f3faab60cfc9b40f05cd222c062 Mon Sep 17 00:00:00 2001 From: Ada-Codina Date: Wed, 13 Oct 2021 09:30:04 -0600 Subject: [PATCH 12/16] CHECK openvpn ubuntu, it has the new line --- libnss-aad/alpine/Dockerfile | 39 +++++++++++++++++++++++++++++ libnss-aad/rocky/Dockerfile | 40 ++++++++++++++++++++++++++++++ openvpn-auth-aad/alpine/Dockerfile | 18 ++++++++++++++ openvpn-auth-aad/rocky/Dockerfile | 18 ++++++++++++++ pam_aad/alpine/Dockerfile | 38 ++++++++++++++++++++++++++++ pam_aad/rocky/Dockerfile | 37 +++++++++++++++++++++++++++ 6 files changed, 190 insertions(+) create mode 100644 libnss-aad/alpine/Dockerfile create mode 100644 libnss-aad/rocky/Dockerfile create mode 100644 openvpn-auth-aad/alpine/Dockerfile create mode 100644 openvpn-auth-aad/rocky/Dockerfile create mode 100644 pam_aad/alpine/Dockerfile create mode 100644 pam_aad/rocky/Dockerfile diff --git a/libnss-aad/alpine/Dockerfile b/libnss-aad/alpine/Dockerfile new file mode 100644 index 0000000..ed1378c --- /dev/null +++ b/libnss-aad/alpine/Dockerfile @@ -0,0 +1,39 @@ +FROM alpine:3.14 +ARG VERSION +ARG DEBVER + +RUN echo "deb http://http.us.debian.org/debian bullseye main" \ + >> /etc/apt/sources.list && \ + apt update && apt install -y \ + automake \ + autopoint \ + build-essential \ + cmake \ + curl \ + debhelper \ + devscripts \ + git \ + indent \ + libcurl4-openssl-dev \ + libjansson-dev \ + libjwt-dev \ + libsodium-dev \ + libssl-dev \ + libtool \ + libxcrypt-dev \ + pkg-config \ + quilt + +ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ + SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" +WORKDIR /tmp +RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" + +WORKDIR /usr/src/libnss_aad +COPY . /usr/src/libnss_aad +RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -i'.git' && \ + dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb" diff --git a/libnss-aad/rocky/Dockerfile b/libnss-aad/rocky/Dockerfile new file mode 100644 index 0000000..9029e10 --- /dev/null +++ b/libnss-aad/rocky/Dockerfile @@ -0,0 +1,40 @@ +FROM alpine:8.4 +ARG VERSION +ARG DEBVER + +RUN echo "deb http://http.us.debian.org/debian bullseye main" \ + >> /etc/apt/sources.list && \ + apt update && apt install -y \ + automake \ + autopoint \ + build-essential \ + cmake \ + curl \ + debhelper \ + devscripts \ + git \ + indent \ + libcurl4-openssl-dev \ + libjansson-dev \ + libjwt-dev \ + libsodium-dev \ + libssl-dev \ + libtool \ + libxcrypt-dev \ + pkg-config \ + quilt + +ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ + SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" +WORKDIR /tmp +RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" + +WORKDIR /usr/src/libnss_aad +COPY . /usr/src/libnss_aad +RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -i'.git' && \ + dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb" + diff --git a/openvpn-auth-aad/alpine/Dockerfile b/openvpn-auth-aad/alpine/Dockerfile new file mode 100644 index 0000000..c4482f0 --- /dev/null +++ b/openvpn-auth-aad/alpine/Dockerfile @@ -0,0 +1,18 @@ +FROM aad-for-linux/pam_aad:alpine +ARG VERSION +ARG DEBVER + +RUN apt-get update -qq && apt-get install -y \ + liblz4-dev \ + liblzo2-dev \ + openvpn \ + wget + +WORKDIR /usr/src/openvpn-auth-aad +COPY . /usr/src/openvpn-auth-aad +RUN useradd -m dev -s /bin/bash && \ + chown -R dev:dev /usr/src/openvpn-auth-aad + +RUN tar cvzf "../openvpn-auth-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -d -i'(.*)' && \ + dpkg -i "../openvpn-auth-aad_${VERSION}-${DEBVER}_amd64.deb" diff --git a/openvpn-auth-aad/rocky/Dockerfile b/openvpn-auth-aad/rocky/Dockerfile new file mode 100644 index 0000000..1fc7f4b --- /dev/null +++ b/openvpn-auth-aad/rocky/Dockerfile @@ -0,0 +1,18 @@ +FROM aad-for-linux/pam_aad:rocky +ARG VERSION +ARG DEBVER + +RUN apt-get update -qq && apt-get install -y \ + liblz4-dev \ + liblzo2-dev \ + openvpn \ + wget + +WORKDIR /usr/src/openvpn-auth-aad +COPY . /usr/src/openvpn-auth-aad +RUN useradd -m dev -s /bin/bash && \ + chown -R dev:dev /usr/src/openvpn-auth-aad + +RUN tar cvzf "../openvpn-auth-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -d -i'(.*)' && \ + dpkg -i "../openvpn-auth-aad_${VERSION}-${DEBVER}_amd64.deb" diff --git a/pam_aad/alpine/Dockerfile b/pam_aad/alpine/Dockerfile new file mode 100644 index 0000000..65208e6 --- /dev/null +++ b/pam_aad/alpine/Dockerfile @@ -0,0 +1,38 @@ +FROM alpine:3.14 +ARG VERSION +ARG DEBVER + +RUN echo "deb http://http.us.debian.org/debian bullseye main" \ + >> /etc/apt/sources.list && \ + apt update && apt install -y \ + automake \ + build-essential \ + curl \ + debhelper \ + devscripts \ + git \ + indent \ + libcurl4-openssl-dev \ + libjansson-dev \ + libjwt-dev \ + libpam0g-dev \ + libssl-dev \ + libtool \ + pkg-config \ + quilt \ + uuid-dev + +ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ + SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" +WORKDIR /tmp +RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" + +WORKDIR /usr/src/pam_aad +COPY . /usr/src/pam_aad +RUN tar cvzf "../pam-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -d -i'(.*)' && \ + dpkg -i "../libpam-aad_${VERSION}-${DEBVER}_amd64.deb" + diff --git a/pam_aad/rocky/Dockerfile b/pam_aad/rocky/Dockerfile new file mode 100644 index 0000000..80fa225 --- /dev/null +++ b/pam_aad/rocky/Dockerfile @@ -0,0 +1,37 @@ +FROM rocky:8.4 +ARG VERSION +ARG DEBVER + +RUN echo "deb http://http.us.debian.org/debian bullseye main" \ + >> /etc/apt/sources.list && \ + apt update && apt install -y \ + automake \ + build-essential \ + curl \ + debhelper \ + devscripts \ + git \ + indent \ + libcurl4-openssl-dev \ + libjansson-dev \ + libjwt-dev \ + libpam0g-dev \ + libssl-dev \ + libtool \ + pkg-config \ + quilt \ + uuid-dev + +ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ + SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" +WORKDIR /tmp +RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ + dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" + +WORKDIR /usr/src/pam_aad +COPY . /usr/src/pam_aad +RUN tar cvzf "../pam-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + debuild -us -uc -d -i'(.*)' && \ + dpkg -i "../libpam-aad_${VERSION}-${DEBVER}_amd64.deb" From c70288477c59fc90d314582c50969df93e998efe Mon Sep 17 00:00:00 2001 From: Ada-Codina Date: Wed, 13 Oct 2021 11:27:14 -0600 Subject: [PATCH 13/16] https://pkgs.org/ used for Rocky --- libnss-aad/alpine/Dockerfile | 24 ++++++++++++------------ libnss-aad/rocky/Dockerfile | 28 ++++++++++++++-------------- openvpn-auth-aad/alpine/Dockerfile | 2 +- openvpn-auth-aad/rocky/Dockerfile | 2 +- pam_aad/alpine/Dockerfile | 4 ++-- pam_aad/rocky/Dockerfile | 6 +++--- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/libnss-aad/alpine/Dockerfile b/libnss-aad/alpine/Dockerfile index ed1378c..fb8a07f 100644 --- a/libnss-aad/alpine/Dockerfile +++ b/libnss-aad/alpine/Dockerfile @@ -3,25 +3,25 @@ ARG VERSION ARG DEBVER RUN echo "deb http://http.us.debian.org/debian bullseye main" \ - >> /etc/apt/sources.list && \ - apt update && apt install -y \ + >> /etc/apk/repositories && \ + apk update && apk add -y \ automake \ - autopoint \ - build-essential \ + + cmake \ curl \ - debhelper \ - devscripts \ + + git \ indent \ - libcurl4-openssl-dev \ - libjansson-dev \ - libjwt-dev \ + + jansson-dev \ + libsodium-dev \ - libssl-dev \ + libtool \ - libxcrypt-dev \ - pkg-config \ + + quilt ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ diff --git a/libnss-aad/rocky/Dockerfile b/libnss-aad/rocky/Dockerfile index 9029e10..c1274e2 100644 --- a/libnss-aad/rocky/Dockerfile +++ b/libnss-aad/rocky/Dockerfile @@ -1,27 +1,27 @@ -FROM alpine:8.4 +FROM rockylinux/rockylinux:8.4 ARG VERSION ARG DEBVER RUN echo "deb http://http.us.debian.org/debian bullseye main" \ - >> /etc/apt/sources.list && \ - apt update && apt install -y \ + >> /etc/dnf/dnf.conf && \ + dnf update && dnf install -y \ automake \ - autopoint \ - build-essential \ + + cmake \ curl \ - debhelper \ - devscripts \ + + git \ indent \ - libcurl4-openssl-dev \ - libjansson-dev \ - libjwt-dev \ - libsodium-dev \ - libssl-dev \ + libcurl-devel \ + jansson-devel \ + + + libtool \ - libxcrypt-dev \ - pkg-config \ + libxcrypt-devel \ + quilt ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ diff --git a/openvpn-auth-aad/alpine/Dockerfile b/openvpn-auth-aad/alpine/Dockerfile index c4482f0..b5370d5 100644 --- a/openvpn-auth-aad/alpine/Dockerfile +++ b/openvpn-auth-aad/alpine/Dockerfile @@ -2,7 +2,7 @@ FROM aad-for-linux/pam_aad:alpine ARG VERSION ARG DEBVER -RUN apt-get update -qq && apt-get install -y \ +RUN apk update -qq && apk add -y \ liblz4-dev \ liblzo2-dev \ openvpn \ diff --git a/openvpn-auth-aad/rocky/Dockerfile b/openvpn-auth-aad/rocky/Dockerfile index 1fc7f4b..6d4ea62 100644 --- a/openvpn-auth-aad/rocky/Dockerfile +++ b/openvpn-auth-aad/rocky/Dockerfile @@ -2,7 +2,7 @@ FROM aad-for-linux/pam_aad:rocky ARG VERSION ARG DEBVER -RUN apt-get update -qq && apt-get install -y \ +RUN dnf update -qq && dnf install -y \ liblz4-dev \ liblzo2-dev \ openvpn \ diff --git a/pam_aad/alpine/Dockerfile b/pam_aad/alpine/Dockerfile index 65208e6..33f1328 100644 --- a/pam_aad/alpine/Dockerfile +++ b/pam_aad/alpine/Dockerfile @@ -3,8 +3,8 @@ ARG VERSION ARG DEBVER RUN echo "deb http://http.us.debian.org/debian bullseye main" \ - >> /etc/apt/sources.list && \ - apt update && apt install -y \ + >> /etc/apk/repositories && \ + apk update && apk add -y \ automake \ build-essential \ curl \ diff --git a/pam_aad/rocky/Dockerfile b/pam_aad/rocky/Dockerfile index 80fa225..4951a7d 100644 --- a/pam_aad/rocky/Dockerfile +++ b/pam_aad/rocky/Dockerfile @@ -1,10 +1,10 @@ -FROM rocky:8.4 +FROM rockylinux/rockylinux:8.4 ARG VERSION ARG DEBVER RUN echo "deb http://http.us.debian.org/debian bullseye main" \ - >> /etc/apt/sources.list && \ - apt update && apt install -y \ + >> /etc/dnf/dnf.conf && \ + dnf update && dnf install -y \ automake \ build-essential \ curl \ From e6086a573dab274fe8bbfa475a89d56d7e76074e Mon Sep 17 00:00:00 2001 From: Ada-Codina Date: Wed, 27 Oct 2021 10:57:28 -0600 Subject: [PATCH 14/16] missing packages --- libnss-aad/alpine/Dockerfile | 19 ++++++++++--------- libnss-aad/rocky/Dockerfile | 18 ++++++++++-------- pam_aad/alpine/Dockerfile | 20 +++++++++++--------- pam_aad/rocky/Dockerfile | 20 +++++++++++--------- 4 files changed, 42 insertions(+), 35 deletions(-) diff --git a/libnss-aad/alpine/Dockerfile b/libnss-aad/alpine/Dockerfile index fb8a07f..49c2e18 100644 --- a/libnss-aad/alpine/Dockerfile +++ b/libnss-aad/alpine/Dockerfile @@ -6,23 +6,24 @@ RUN echo "deb http://http.us.debian.org/debian bullseye main" \ >> /etc/apk/repositories && \ apk update && apk add -y \ automake \ - - cmake \ curl \ - - git \ indent \ - jansson-dev \ - libsodium-dev \ - libtool \ - - quilt +#missing packages \ +autopoint \ +build-essential \ +debhelper \ +devscripts \ +libcurl4-openssl-dev \ +libjwt-dev \ +libssl-dev \ +libxcrypt-dev \ +pkg-config ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" diff --git a/libnss-aad/rocky/Dockerfile b/libnss-aad/rocky/Dockerfile index c1274e2..b1d64bd 100644 --- a/libnss-aad/rocky/Dockerfile +++ b/libnss-aad/rocky/Dockerfile @@ -6,24 +6,26 @@ RUN echo "deb http://http.us.debian.org/debian bullseye main" \ >> /etc/dnf/dnf.conf && \ dnf update && dnf install -y \ automake \ - - cmake \ curl \ - - git \ indent \ libcurl-devel \ jansson-devel \ - - - libtool \ libxcrypt-devel \ - quilt +#missing packages \ +autopoint \ +build-essential \ +debhelper \ +devscripts \ +libjwt-dev \ +libsodium-dev \ +libssl-dev \ +pkg-config + ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" WORKDIR /tmp diff --git a/pam_aad/alpine/Dockerfile b/pam_aad/alpine/Dockerfile index 33f1328..5309005 100644 --- a/pam_aad/alpine/Dockerfile +++ b/pam_aad/alpine/Dockerfile @@ -6,22 +6,24 @@ RUN echo "deb http://http.us.debian.org/debian bullseye main" \ >> /etc/apk/repositories && \ apk update && apk add -y \ automake \ - build-essential \ curl \ - debhelper \ - devscripts \ git \ indent \ - libcurl4-openssl-dev \ libjansson-dev \ - libjwt-dev \ libpam0g-dev \ - libssl-dev \ - libtool \ - pkg-config \ quilt \ - uuid-dev +# missing packages \ +build-essential \ +debhelper \ +devscripts \ +libcurl4-openssl-dev \ +libjwt-dev \ +libssl-dev \ +libtool \ +pkg-config \ +uuid-dev + ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" WORKDIR /tmp diff --git a/pam_aad/rocky/Dockerfile b/pam_aad/rocky/Dockerfile index 4951a7d..61753e3 100644 --- a/pam_aad/rocky/Dockerfile +++ b/pam_aad/rocky/Dockerfile @@ -6,21 +6,23 @@ RUN echo "deb http://http.us.debian.org/debian bullseye main" \ >> /etc/dnf/dnf.conf && \ dnf update && dnf install -y \ automake \ - build-essential \ curl \ - debhelper \ - devscripts \ git \ indent \ - libcurl4-openssl-dev \ libjansson-dev \ - libjwt-dev \ - libpam0g-dev \ - libssl-dev \ libtool \ - pkg-config \ quilt \ - uuid-dev + +# missing package \ +build-essential \ +debhelper \ +devscripts \ +libcurl4-openssl-dev \ +libjwt-dev \ +libpam0g-dev \ +libssl-dev \ +pkg-config \ +uuid-dev ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" From c94aad3b6558a7d588e257fb3578132c09733390 Mon Sep 17 00:00:00 2001 From: Ada-Codina Date: Wed, 27 Oct 2021 11:42:03 -0600 Subject: [PATCH 15/16] updates --- libnss-aad/alpine/Dockerfile | 40 -------------------- libnss_aad/alpine/Dockerfile | 19 ++++++++++ {libnss-aad => libnss_aad}/debian/Dockerfile | 0 {libnss-aad => libnss_aad}/rocky/Dockerfile | 16 +------- {libnss-aad => libnss_aad}/ubuntu/Dockerfile | 0 openvpn-auth-aad/alpine/Dockerfile | 5 +-- openvpn-auth-aad/rocky/Dockerfile | 5 +-- pam_aad/alpine/Dockerfile | 28 ++------------ pam_aad/rocky/Dockerfile | 19 +--------- 9 files changed, 27 insertions(+), 105 deletions(-) delete mode 100644 libnss-aad/alpine/Dockerfile create mode 100644 libnss_aad/alpine/Dockerfile rename {libnss-aad => libnss_aad}/debian/Dockerfile (100%) rename {libnss-aad => libnss_aad}/rocky/Dockerfile (78%) rename {libnss-aad => libnss_aad}/ubuntu/Dockerfile (100%) diff --git a/libnss-aad/alpine/Dockerfile b/libnss-aad/alpine/Dockerfile deleted file mode 100644 index 49c2e18..0000000 --- a/libnss-aad/alpine/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -FROM alpine:3.14 -ARG VERSION -ARG DEBVER - -RUN echo "deb http://http.us.debian.org/debian bullseye main" \ - >> /etc/apk/repositories && \ - apk update && apk add -y \ - automake \ - cmake \ - curl \ - git \ - indent \ - jansson-dev \ - libsodium-dev \ - libtool \ - quilt -#missing packages \ -autopoint \ -build-essential \ -debhelper \ -devscripts \ -libcurl4-openssl-dev \ -libjwt-dev \ -libssl-dev \ -libxcrypt-dev \ -pkg-config - -ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ - SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" -WORKDIR /tmp -RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ - curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ - dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ - dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" - -WORKDIR /usr/src/libnss_aad -COPY . /usr/src/libnss_aad -RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - debuild -us -uc -i'.git' && \ - dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb" diff --git a/libnss_aad/alpine/Dockerfile b/libnss_aad/alpine/Dockerfile new file mode 100644 index 0000000..a349aa2 --- /dev/null +++ b/libnss_aad/alpine/Dockerfile @@ -0,0 +1,19 @@ +FROM alpine:3.14 + +RUN >> /etc/apk/repositories && \ + apk update && apk add -y \ + automake \ + cmake \ + curl \ + git \ + indent \ + jansson-dev \ + libsodium-dev \ + libtool \ + quilt \ + libsds + +WORKDIR /usr/src/libnss_aad +COPY . /usr/src/libnss_aad +RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ + make -us -uc -i'.git' && \ diff --git a/libnss-aad/debian/Dockerfile b/libnss_aad/debian/Dockerfile similarity index 100% rename from libnss-aad/debian/Dockerfile rename to libnss_aad/debian/Dockerfile diff --git a/libnss-aad/rocky/Dockerfile b/libnss_aad/rocky/Dockerfile similarity index 78% rename from libnss-aad/rocky/Dockerfile rename to libnss_aad/rocky/Dockerfile index b1d64bd..87a2442 100644 --- a/libnss-aad/rocky/Dockerfile +++ b/libnss_aad/rocky/Dockerfile @@ -1,6 +1,4 @@ FROM rockylinux/rockylinux:8.4 -ARG VERSION -ARG DEBVER RUN echo "deb http://http.us.debian.org/debian bullseye main" \ >> /etc/dnf/dnf.conf && \ @@ -15,16 +13,6 @@ RUN echo "deb http://http.us.debian.org/debian bullseye main" \ libtool \ libxcrypt-devel \ quilt - -#missing packages \ -autopoint \ -build-essential \ -debhelper \ -devscripts \ -libjwt-dev \ -libsodium-dev \ -libssl-dev \ -pkg-config ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" @@ -37,6 +25,4 @@ RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ WORKDIR /usr/src/libnss_aad COPY . /usr/src/libnss_aad RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - debuild -us -uc -i'.git' && \ - dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb" - + make -us -uc -i'.git' && \ diff --git a/libnss-aad/ubuntu/Dockerfile b/libnss_aad/ubuntu/Dockerfile similarity index 100% rename from libnss-aad/ubuntu/Dockerfile rename to libnss_aad/ubuntu/Dockerfile diff --git a/openvpn-auth-aad/alpine/Dockerfile b/openvpn-auth-aad/alpine/Dockerfile index b5370d5..147f413 100644 --- a/openvpn-auth-aad/alpine/Dockerfile +++ b/openvpn-auth-aad/alpine/Dockerfile @@ -1,6 +1,4 @@ FROM aad-for-linux/pam_aad:alpine -ARG VERSION -ARG DEBVER RUN apk update -qq && apk add -y \ liblz4-dev \ @@ -14,5 +12,4 @@ RUN useradd -m dev -s /bin/bash && \ chown -R dev:dev /usr/src/openvpn-auth-aad RUN tar cvzf "../openvpn-auth-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - debuild -us -uc -d -i'(.*)' && \ - dpkg -i "../openvpn-auth-aad_${VERSION}-${DEBVER}_amd64.deb" + make -us -uc -d -i'(.*)' && \ diff --git a/openvpn-auth-aad/rocky/Dockerfile b/openvpn-auth-aad/rocky/Dockerfile index 6d4ea62..11f2fbd 100644 --- a/openvpn-auth-aad/rocky/Dockerfile +++ b/openvpn-auth-aad/rocky/Dockerfile @@ -1,6 +1,4 @@ FROM aad-for-linux/pam_aad:rocky -ARG VERSION -ARG DEBVER RUN dnf update -qq && dnf install -y \ liblz4-dev \ @@ -14,5 +12,4 @@ RUN useradd -m dev -s /bin/bash && \ chown -R dev:dev /usr/src/openvpn-auth-aad RUN tar cvzf "../openvpn-auth-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - debuild -us -uc -d -i'(.*)' && \ - dpkg -i "../openvpn-auth-aad_${VERSION}-${DEBVER}_amd64.deb" + make -us -uc -d -i'(.*)' && \ diff --git a/pam_aad/alpine/Dockerfile b/pam_aad/alpine/Dockerfile index 5309005..34d3a89 100644 --- a/pam_aad/alpine/Dockerfile +++ b/pam_aad/alpine/Dockerfile @@ -1,9 +1,6 @@ FROM alpine:3.14 -ARG VERSION -ARG DEBVER -RUN echo "deb http://http.us.debian.org/debian bullseye main" \ - >> /etc/apk/repositories && \ +RUN >> /etc/apk/repositories && \ apk update && apk add -y \ automake \ curl \ @@ -12,29 +9,10 @@ RUN echo "deb http://http.us.debian.org/debian bullseye main" \ libjansson-dev \ libpam0g-dev \ quilt \ - -# missing packages \ -build-essential \ -debhelper \ -devscripts \ -libcurl4-openssl-dev \ -libjwt-dev \ -libssl-dev \ -libtool \ -pkg-config \ -uuid-dev - -ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ - SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" -WORKDIR /tmp -RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ - curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \ - dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ - dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb" + libsds WORKDIR /usr/src/pam_aad COPY . /usr/src/pam_aad RUN tar cvzf "../pam-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - debuild -us -uc -d -i'(.*)' && \ - dpkg -i "../libpam-aad_${VERSION}-${DEBVER}_amd64.deb" + make -us -uc -d -i'(.*)' && diff --git a/pam_aad/rocky/Dockerfile b/pam_aad/rocky/Dockerfile index 61753e3..3eb3fdc 100644 --- a/pam_aad/rocky/Dockerfile +++ b/pam_aad/rocky/Dockerfile @@ -1,9 +1,6 @@ FROM rockylinux/rockylinux:8.4 -ARG VERSION -ARG DEBVER -RUN echo "deb http://http.us.debian.org/debian bullseye main" \ - >> /etc/dnf/dnf.conf && \ +RUN >> /etc/dnf/dnf.conf && \ dnf update && dnf install -y \ automake \ curl \ @@ -13,17 +10,6 @@ RUN echo "deb http://http.us.debian.org/debian bullseye main" \ libtool \ quilt \ -# missing package \ -build-essential \ -debhelper \ -devscripts \ -libcurl4-openssl-dev \ -libjwt-dev \ -libpam0g-dev \ -libssl-dev \ -pkg-config \ -uuid-dev - ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \ SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1" WORKDIR /tmp @@ -35,5 +21,4 @@ RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ WORKDIR /usr/src/pam_aad COPY . /usr/src/pam_aad RUN tar cvzf "../pam-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - debuild -us -uc -d -i'(.*)' && \ - dpkg -i "../libpam-aad_${VERSION}-${DEBVER}_amd64.deb" + make -us -uc -d -i'(.*)' && \ From 73a50e8fe96e00fb304490becee9af5ddc03af6a Mon Sep 17 00:00:00 2001 From: Ada-Codina Date: Wed, 27 Oct 2021 12:28:25 -0600 Subject: [PATCH 16/16] will it run? --- libnss_aad/rocky/Dockerfile | 5 +++-- pam_aad/rocky/Dockerfile | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/libnss_aad/rocky/Dockerfile b/libnss_aad/rocky/Dockerfile index 87a2442..1c456a7 100644 --- a/libnss_aad/rocky/Dockerfile +++ b/libnss_aad/rocky/Dockerfile @@ -24,5 +24,6 @@ RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ WORKDIR /usr/src/libnss_aad COPY . /usr/src/libnss_aad -RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - make -us -uc -i'.git' && \ + +RUN make depends && \ + LIB_DIR=/lib64 make -e install diff --git a/pam_aad/rocky/Dockerfile b/pam_aad/rocky/Dockerfile index 3eb3fdc..842b606 100644 --- a/pam_aad/rocky/Dockerfile +++ b/pam_aad/rocky/Dockerfile @@ -20,5 +20,9 @@ RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \ WORKDIR /usr/src/pam_aad COPY . /usr/src/pam_aad -RUN tar cvzf "../pam-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \ - make -us -uc -d -i'(.*)' && \ + +ENV PAMROC="/lib64/security" \ + NSS_PATH="$"{NSS_PATH}:/usr/local/lib:/usr/local/lib64" +RUN ./bootstrap.sh && \ + ./configure --with-pam-dir="${PAMROC}" && \ + make && make install