Pure-FTPD & MariaDB 10.2

Discussion in 'General' started by DRL, Nov 21, 2017.

  1. felan

    felan Member HowtoForge Supporter

    Same issue here. If a solution is found, let me know.
     
  2. DRL

    DRL New Member

    Downgrade 10.2 -> 10.1
     
  3. Spodnet

    Spodnet New Member

    OK, I'll try explain what I did to get the latest pureftpd on wheezy after upgrading to mariadb 10.3 things started to fail, this I would think would apply to later debians too...

    I started off with the wheezy pureftpd source and tried patching manually the changes to remove make_scrambled_password, I struggled to get it to compile and link correctly as it's a while since I tried compiling anything, never mind writing C ;)

    So my next plan was to get the latest debian source and make it compile on wheezy, which I appear to have got working and ftp running.

    Apologies for the order here, this can be reduced down to a couple of apt-get commands probably, but I'm looking though my history of what I did....

    1. I installed the source for the current version on wheezy:

    apt-get source pure-ftpd

    2. I then installed the build dependencies

    apt-get build-dep pure-ftpd

    3. This failed with libmysqlclient-dev : Depends: libmysqlclient18 (= 5.6.39-1~dotdeb+7.1), so I checked for mariadb dev files:

    apt-cache search maria

    This gave me libmariadb-dev libmariadb-dev-compat to install:

    apt-get install libmariadb-dev libmariadb-dev-compat

    4. Re-ran

    apt-get build-dep pure-ftpd

    Which gave me libcap-dev (this was the only thing missing)

    5. After patching several things, and through various compile tests I also had to install (or check I had):

    apt-get install build-essential fakeroot dpkg-dev autoconf-archive

    6. I then continued to complile/patch, I did get it to compile but it was still missing some symbols, so I went looking for the latest debian source.

    Link: packages.debian.org/buster/pure-ftpd

    This gave me from the links on the side the source files.

    7. So I fetched those (insert http:// to the beginning of the urls)

    mkdir pure-ftp-1.0.46-1
    cd pure-ftp-1.0.46-1
    wget http.debian.net/debian/pool/main/p/pure-ftpd/pure-ftpd_1.0.46.orig.tar.gz
    wget http.debian.net/debian/pool/main/p/pure-ftpd/pure-ftpd_1.0.46-1.diff.gz
    wget http.debian.net/debian/pool/main/p/pure-ftpd/pure-ftpd_1.0.46-1.dsc

    8. From there I needed to prepare the files:

    tar zxvf pure-ftpd_1.0.46.orig.tar.gz
    mv pure-ftpd-1.0.46.orig/ pure-ftpd-1.0.46
    mkdir pure-ftpd-1.0.46/debian
    gunzip pure-ftpd_1.0.46-1.diff.gz
    patch -p0 < pure-ftpd_1.0.46-1.diff
    chmod +x pure-ftpd-1.0.46/debian/rules
    cd pure-ftpd-1.0.46/

    9. I then attempted a build of the package

    dpkg-buildpackage -uc -b

    This failed for me with pkg-checkbuilddeps: Unmet build dependencies: default-libmysqlclient-dev, but as I knew I had installed the mariadb libraries I thought, lets try it anyway telling it to skip dependencies:

    dpkg-buildpackage -uc -b -d

    10. This built and created me the .deb packages!

    cd ..
    ls *.deb

    pure-ftpd_1.0.46-1_amd64.deb
    pure-ftpd-common_1.0.46-1_all.deb
    pure-ftpd-ldap_1.0.46-1_amd64.deb
    pure-ftpd-mysql_1.0.46-1_amd64.deb
    pure-ftpd-postgresql_1.0.46-1_amd64.deb

    11. From here I just installed them as usual for a .deb

    dpkg -i pure-ftpd-common_1.0.46-1_all.deb pure-ftpd-mysql_1.0.46-1_amd64.deb

    12. Tested FTP and it's up and running again :)

    As I said, this is a re-cap of my history the commands can be reduced, and it maybe you need to install some other things that I didn't.

    Hope it helps.

    (apologies for the non-links, I'm limited to what I can post)
     
    till likes this.
  4. felan

    felan Member HowtoForge Supporter

    Hey nice! I'll have to take a look at it later this week and test it out :D
     
  5. jisse44

    jisse44 New Member

    Hi, thanks to @Spodnet, hi write a tuto available on my GitHub (type "github jisse44" on Google, as a new user I can't post link )
    Tested and approved with ISPConfig.

    Note that .deb packages on the repo are OK with Mariadb 10.3 only (they need libmariadb.so.3). For 10.2, you must follow the HowTo to rebuild them
     

Share This Page