From ac933234cbd1a391540784756768b26fca249e26 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Tue, 3 Jan 2023 15:19:11 +0100 Subject: [PATCH] Move all compiling hints to one place --- pdns/recursordist/README.md | 87 +------------------ .../docs/appendices/compiling.rst | 60 ++++++++++++- 2 files changed, 61 insertions(+), 86 deletions(-) diff --git a/pdns/recursordist/README.md b/pdns/recursordist/README.md index 199b2de8af..d3661a0b02 100644 --- a/pdns/recursordist/README.md +++ b/pdns/recursordist/README.md @@ -1,89 +1,10 @@ -PowerDNS Recursor +:program:`PowerDNS Recursor` ----------------- -For full details, please read https://doc.powerdns.com/md/recursor/ - -Here follow some brief notes that may be useful to get you going. - -Compiling ---------- -Starting with version 4.0.0, the PowerDNS recursor uses autotools and compiling -[from the tarball](https://downloads.powerdns.com/releases/) can be as simple as - -```sh -./configure -make -``` - -As for dependencies, Boost (http://boost.org/), OpenSSL (https://openssl.org/), -and Lua (https://www.lua.org/) are required. - -On most modern UNIX distributions, you can simply install 'boost' or -'boost-dev' or 'boost-devel'. Otherwise, just download boost, and point the -compiler at the right directory using CPPFLAGS. - -On Debian and Ubuntu, the following will get you the dependencies: - -```sh -apt-get install libboost-dev libboost-filesystem-dev libboost-serialization-dev \ - libboost-system-dev libboost-thread-dev libboost-context-dev libboost-test-dev \ - libssl-dev libboost-test-dev g++ make pkg-config libluajit-5.1-dev -``` - -Compiling from git checkout -=========================== -Source code is available on GitHub: - -```sh -git clone https://github.com/PowerDNS/pdns.git -``` - -This repository contains the sources for the PowerDNS Recursor, the PowerDNS -Authoritative Server, and dnsdist (a powerful DNS loadbalancer). The sources for -the recursor are located in the `pdns/recursordist` subdirectory of the repository. - -To compile from a git checkout, install the dependencies above plus ragel, automake, autoconf, libtool, virtualenv and curl. -Then run - -```sh -cd pdns/pdns/recursordist/ -autoreconf -vi -./configure -make -``` - -macOS Notes ------------ - -If you want to compile yourself, the dependencies can be installed using -Homebrew. You need to tell configure where to find OpenSSL, too. - -```sh -brew install boost lua pkg-config ragel openssl -./configure --with-lua PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig -make -j4 -``` - -Lua scripting -------------- -To benefit from Lua scripting, as described on https://doc.powerdns.com/md/recursor/scripting/ -Install Lua and development headers. PowerDNS supports Lua 5.1, 5.2, 5.3 and LuaJIT. -On Debian/Ubuntu, install e.g. `liblua5.2-dev` to use Lua 5.2. - -The configure script will automatically detect the Lua version. If more than one -version of Lua is installed, the `--with-lua` configure flag can be set to the -desired version. e.g.: - -```sh -./configure --with-lua=lua51 -``` - -(On older versions of Debian/Ubuntu, you'll need to pass `--with-lua=lua5.1` instead.) +For full details on building :program:`PowerDNS Recursor`, please read https://docs.powerdns.com/recursor/appendices/compiling.html Documentation ============= -After compiling, run `pdns\_recursor --config` to view the configuration options -and a short description. The full documentation is online at -https://doc.powerdns.com/recursor/ +The full documentation is online at https://doc.powerdns.com/recursor/ Reporting bugs ============== @@ -93,7 +14,7 @@ reported. License ======= -PowerDNS is copyright © 2001-2019 by PowerDNS.COM BV and lots of +PowerDNS is copyright © 2001-2023 by PowerDNS.COM BV and lots of contributors, using the GNU GPLv2 license (see NOTICE for the exact license and exception used). diff --git a/pdns/recursordist/docs/appendices/compiling.rst b/pdns/recursordist/docs/appendices/compiling.rst index 89e4f2654b..0874680719 100644 --- a/pdns/recursordist/docs/appendices/compiling.rst +++ b/pdns/recursordist/docs/appendices/compiling.rst @@ -40,9 +40,57 @@ By default, the :program:`Recursor` requires the following libraries and headers * `OpenSSL `_ .. note:: - On Debian and Ubuntu, the following will get you the dependencies: `apt-get install libboost-dev libboost-filesystem-dev libboost-serialization-dev \ - libboost-system-dev libboost-thread-dev libboost-context-dev libboost-test-dev \ - libssl-dev libboost-test-dev g++ make pkg-config libluajit-5.1-dev` + On Debian and Ubuntu, the following will get you the dependencies:: + + apt-get install libboost-dev libboost-filesystem-dev libboost-serialization-dev \ + libboost-system-dev libboost-thread-dev libboost-context-dev \ + libboost-test-dev libssl-dev libboost-test-dev g++ make pkg-config \ + libluajit-5.1-dev + +Compiling from a git checkout +----------------------------- +Source code is available on GitHub:: + + git clone https://github.com/PowerDNS/pdns.git + +This repository contains the sources for the PowerDNS Recursor, the PowerDNS +Authoritative Server, and dnsdist (a powerful DNS loadbalancer). The sources for +the recursor are located in the `pdns/recursordist` subdirectory of the repository. + +To compile from a git checkout, install the dependencies above plus ragel, automake, autoconf, libtool, virtualenv and curl. +Then run:: + + cd pdns/pdns/recursordist/ + autoreconf -vi + ./configure + make + + +macOS Notes +----------- + +If you want to compile yourself, the dependencies can be installed using +Homebrew. You need to tell configure where to find OpenSSL, too:: + + brew install boost lua pkg-config ragel openssl + ./configure PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig + make -j4 + + +Lua scripting +^^^^^^^^^^^^^ +To benefit from Lua scripting, as described on https://doc.powerdns.com/md/recursor/scripting/ +Install Lua and development headers. PowerDNS supports Lua 5.1, 5.2, 5.3 and LuaJIT. +On Debian/Ubuntu, install e.g. `liblua5.2-dev` to use Lua 5.2. + +The configure script will automatically detect the Lua version. If more than one +version of Lua is installed, the `--with-lua` configure flag can be set to the +desired version. e.g.:: + + ./configure --with-lua=lua51 + +(On older versions of Debian/Ubuntu, you'll need to pass `--with-lua=lua5.1` instead.) + Optional dependencies --------------------- @@ -84,3 +132,9 @@ To set the directory where the unit files should be installed, use ``--with-syst .. note:: If you want systemd support, you will need to install the corresponding development package. On Debian and Ubuntu, this means `apt install libsystemd-dev`. + +Documentation +============= +After compiling, run `pdns\_recursor --config` to view the configuration options +and a short description. The full documentation is online at +https://doc.powerdns.com/recursor/ -- 2.47.2