Add PHP via tdrnetworks apt

A stand-alone package has been created which negates the need for this additional repository from Debi/Devuan 11 onwards.

apt-get install systemd-standalone-tmpfiles

EVERYTHING BELOW IS DEPRECATED

With the stupidity that is the sury php repo requiring all of a systemd install to create a fucking directory, anyone running a distro specifically without it is up a creek.

Thankfully, someone has taken the sury repos, fixed the stupid, and provided a new repo. (There is an alternative with a fake systemd package which simply symlinks the one single command line call from sury php in a package called systemd-dummy aliases to systemd)

So with a different key and different repo, here's setting up PHP deb repo for a Devuan system. BUT sury is still needed as not all of the packages have been replaced.

We need two different keys - sury and tdrnetworks:

wget -qO - https://packages.sury.org/php/apt.gpg |\
  gpg --dearmor |\
  sudo dd of=/usr/share/keyrings/php-sury.gpg
 
wget -qO - https://pkgs.tdrnetworks.com/apt/devuan/gpg.key |\
  gpg --dearmor |\
  sudo dd of=/usr/share/keyrings/php-tdrnetworks.gpg

Now we setup both repos:

echo "deb [signed-by=/usr/share/keyrings/php-tdrnetworks.gpg] https://pkgs.tdrnetworks.com/apt/devuan $(lsb_release -sc) main" |\
  sudo tee /etc/apt/sources.list.d/php-tdrnetworks.list

Sury needs to be hard-coded with the debian repo.

echo "deb [signed-by=/usr/share/keyrings/php-sury.gpg] https://packages.sury.org/php bullseye main" |\
  sudo tee /etc/apt/sources.list.d/php-sury.list

Finally, the priority needs to be set such that sury is overridden by tdrnetworks's packages.

sudo tee /etc/apt/preferences.d/55-php-tdrn-sury << EOF
Package: *
Pin: release o=deb.sury.org
Pin-Priority: 200
EOF

Check with apt-cache policy to make sure that sury has a lower number than tdrn:

 500 https://pkgs.tdrnetworks.com/apt/devuan chimaera/main amd64 Packages
     release o=pkgs.tdrnetworks.com,n=chimaera,l=pkgs.tdrnetworks.com,c=main,b=amd64
     origin pkgs.tdrnetworks.com
 200 https://packages.sury.org/php bullseye/main amd64 Packages
     release o=deb.sury.org,a=bullseye,n=bullseye,c=main,b=amd64
     origin packages.sury.org