diff options
author | lookshe <github@lookshe.org> | 2021-01-24 22:33:28 +0100 |
---|---|---|
committer | lookshe <github@lookshe.org> | 2021-01-24 22:33:28 +0100 |
commit | c7242e8a4444c771c891a18289d17ff72dfa9762 (patch) | |
tree | ee0269a94a11b52cb83f826483b2ca48905a6ebb /pureftpd | |
parent | dc3bcf0351d362770754ad0a2997d878435e9fb1 (diff) |
add pureftpd to fix issue with mariadb >= 10.2
Diffstat (limited to 'pureftpd')
-rw-r--r-- | pureftpd/.Dockerfile.swp | bin | 0 -> 20480 bytes | |||
-rw-r--r-- | pureftpd/Dockerfile | 75 | ||||
-rw-r--r-- | pureftpd/README.md | 16 | ||||
-rw-r--r-- | pureftpd/out/pure-ftpd-common_1.0.36-1.1_all.deb | bin | 0 -> 185314 bytes | |||
-rw-r--r-- | pureftpd/out/pure-ftpd-ldap_1.0.36-1.1_amd64.deb | bin | 0 -> 226160 bytes | |||
-rw-r--r-- | pureftpd/out/pure-ftpd-mysql_1.0.36-1.1_amd64.deb | bin | 0 -> 229434 bytes | |||
-rw-r--r-- | pureftpd/out/pure-ftpd-postgresql_1.0.36-1.1_amd64.deb | bin | 0 -> 227586 bytes | |||
-rw-r--r-- | pureftpd/out/pure-ftpd_1.0.36-1.1_amd64.deb | bin | 0 -> 208826 bytes |
8 files changed, 91 insertions, 0 deletions
diff --git a/pureftpd/.Dockerfile.swp b/pureftpd/.Dockerfile.swp Binary files differnew file mode 100644 index 0000000..611f4f4 --- /dev/null +++ b/pureftpd/.Dockerfile.swp diff --git a/pureftpd/Dockerfile b/pureftpd/Dockerfile new file mode 100644 index 0000000..d87bf69 --- /dev/null +++ b/pureftpd/Dockerfile @@ -0,0 +1,75 @@ +FROM debian/eol:wheezy AS build-stage + +RUN echo "deb http://archive.debian.org/debian/ wheezy-backports main contrib non-free" >> /etc/apt/sources.list +RUN echo "deb-src http://archive.debian.org/debian/ wheezy-backports main contrib non-free" >> /etc/apt/sources.list +RUN apt-get update \ + && apt-get install -y \ + software-properties-common +RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 CBCB082A1BB943DB +RUN echo "deb http://mirror2.hs-esslingen.de/mariadb/repo/10.3/debian wheezy main" >> /etc/apt/sources.list +RUN echo "deb-src http://mirror2.hs-esslingen.de/mariadb/repo/10.3/debian wheezy main" >> /etc/apt/sources.list +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + fakeroot \ + dpkg-dev \ + autoconf-archive \ + libcap2-dev \ +# libmysqlclient-dev \ + libmariadb-dev-compat \ + po-debconf \ + debhelper \ + wget \ + libpam-dev \ + libldap2-dev \ + libpq-dev \ + libssl-dev +RUN mkdir pure-ftp-1.0.36-1.1 +RUN cd pure-ftp-1.0.36-1.1 +RUN wget http://archive.debian.org/debian/pool/main/p/pure-ftpd/pure-ftpd_1.0.36-1.1.dsc +RUN wget http://archive.debian.org/debian/pool/main/p/pure-ftpd/pure-ftpd_1.0.36.orig.tar.gz +RUN wget http://archive.debian.org/debian/pool/main/p/pure-ftpd/pure-ftpd_1.0.36-1.1.diff.gz +RUN tar zxvf pure-ftpd_1.0.36.orig.tar.gz +RUN mv pure-ftpd-1.0.36.orig/ pure-ftpd-1.0.36 +RUN mkdir pure-ftpd-1.0.36/debian +RUN gunzip pure-ftpd_1.0.36-1.1.diff.gz +RUN patch -p0 < pure-ftpd_1.0.36-1.1.diff +RUN echo "--- pure-ftpd-1.0.36.orig/src/log_mysql.c 2012-03-16 01:01:37.000000000 +0000" >> self_implemented_make_scrambled_password.diff \ + && echo "+++ pure-ftpd-1.0.36/src/log_mysql.c 2021-01-24 20:59:29.749460231 +0000" >> self_implemented_make_scrambled_password.diff \ + && echo "@@ -460,7 +460,25 @@ void pw_mysql_check(AuthResult * const r" >> self_implemented_make_scrambled_password.diff \ + && echo " my_make_scrambled_password(scrambled_password, password," >> self_implemented_make_scrambled_password.diff \ + && echo " strlen(password));" >> self_implemented_make_scrambled_password.diff \ + && echo " # else" >> self_implemented_make_scrambled_password.diff \ + && echo "- make_scrambled_password(scrambled_password, password);" >> self_implemented_make_scrambled_password.diff \ + && echo "+{" >> self_implemented_make_scrambled_password.diff \ + && echo "+ ulong hash_res[2];" >> self_implemented_make_scrambled_password.diff \ + && echo "+ size_t len = strlen(password);" >> self_implemented_make_scrambled_password.diff \ + && echo "+ ulong nr=1345345333L, add=7, nr2=0x12345671L;" >> self_implemented_make_scrambled_password.diff \ + && echo "+ ulong tmp;" >> self_implemented_make_scrambled_password.diff \ + && echo "+ const char *password_end= password + len;" >> self_implemented_make_scrambled_password.diff \ + && echo "+ for (; password < password_end; password++)" >> self_implemented_make_scrambled_password.diff \ + && echo "+ {" >> self_implemented_make_scrambled_password.diff \ + && echo "+ if (*password == ' ' || *password == '\t')" >> self_implemented_make_scrambled_password.diff \ + && echo "+ continue; /* skipp space in password */" >> self_implemented_make_scrambled_password.diff \ + && echo "+ tmp= (ulong) (unsigned char) *password;" >> self_implemented_make_scrambled_password.diff \ + && echo "+ nr^= (((nr & 63)+add)*tmp)+ (nr << 8);" >> self_implemented_make_scrambled_password.diff \ + && echo "+ nr2+=(nr2 << 8) ^ nr;" >> self_implemented_make_scrambled_password.diff \ + && echo "+ add+=tmp;" >> self_implemented_make_scrambled_password.diff \ + && echo "+ }" >> self_implemented_make_scrambled_password.diff \ + && echo "+ hash_res[0]=nr & (((ulong) 1L << 31) -1L); /* Don't use sign bit (str2int) */;" >> self_implemented_make_scrambled_password.diff \ + && echo "+ hash_res[1]=nr2 & (((ulong) 1L << 31) -1L);" >> self_implemented_make_scrambled_password.diff \ + && echo "+ sprintf(scrambled_password,\"%08lx%08lx\",hash_res[0],hash_res[1]);" >> self_implemented_make_scrambled_password.diff \ + && echo "+}" >> self_implemented_make_scrambled_password.diff \ + && echo " # endif" >> self_implemented_make_scrambled_password.diff \ + && echo " # endif" >> self_implemented_make_scrambled_password.diff \ + && echo " #endif" >> self_implemented_make_scrambled_password.diff \ + && echo "" >> self_implemented_make_scrambled_password.diff +RUN patch -p0 < self_implemented_make_scrambled_password.diff +RUN chmod +x pure-ftpd-1.0.36/debian/rules +RUN cd pure-ftpd-1.0.36/ \ + && dpkg-buildpackage -uc -b + +FROM scratch + +COPY --from=build-stage /*.deb . + diff --git a/pureftpd/README.md b/pureftpd/README.md new file mode 100644 index 0000000..7b6bfed --- /dev/null +++ b/pureftpd/README.md @@ -0,0 +1,16 @@ +## Pure-FTPd to run with MariaDB 10.3 on Debian Wheezy + +Rebuild Pure-FTPd due to following error message after using MariaDB 10.3 (should happen also with 10.2) +``` +symbol my_make_scrambled_password, version libmysqlclient_18 not defined in file libmysqlclient.so.18 with link time reference +``` +Implementation of make_scrambled_password is taken from MariaDB connectors. + +### Build and get installation files + +Build is done inside Debian Wheezy docker with +``` +DOCKER_BUILDKIT=1 docker build --output out . +``` +After this command the .deb-files are located in out folder. + diff --git a/pureftpd/out/pure-ftpd-common_1.0.36-1.1_all.deb b/pureftpd/out/pure-ftpd-common_1.0.36-1.1_all.deb Binary files differnew file mode 100644 index 0000000..2df3198 --- /dev/null +++ b/pureftpd/out/pure-ftpd-common_1.0.36-1.1_all.deb diff --git a/pureftpd/out/pure-ftpd-ldap_1.0.36-1.1_amd64.deb b/pureftpd/out/pure-ftpd-ldap_1.0.36-1.1_amd64.deb Binary files differnew file mode 100644 index 0000000..8a7d630 --- /dev/null +++ b/pureftpd/out/pure-ftpd-ldap_1.0.36-1.1_amd64.deb diff --git a/pureftpd/out/pure-ftpd-mysql_1.0.36-1.1_amd64.deb b/pureftpd/out/pure-ftpd-mysql_1.0.36-1.1_amd64.deb Binary files differnew file mode 100644 index 0000000..4a9843c --- /dev/null +++ b/pureftpd/out/pure-ftpd-mysql_1.0.36-1.1_amd64.deb diff --git a/pureftpd/out/pure-ftpd-postgresql_1.0.36-1.1_amd64.deb b/pureftpd/out/pure-ftpd-postgresql_1.0.36-1.1_amd64.deb Binary files differnew file mode 100644 index 0000000..a60f093 --- /dev/null +++ b/pureftpd/out/pure-ftpd-postgresql_1.0.36-1.1_amd64.deb diff --git a/pureftpd/out/pure-ftpd_1.0.36-1.1_amd64.deb b/pureftpd/out/pure-ftpd_1.0.36-1.1_amd64.deb Binary files differnew file mode 100644 index 0000000..14a5638 --- /dev/null +++ b/pureftpd/out/pure-ftpd_1.0.36-1.1_amd64.deb |