]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
Update installation steps, patch OpenBSD compilation again v0.0.2
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Fri, 14 Jun 2019 23:09:20 +0000 (18:09 -0500)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Sat, 15 Jun 2019 00:47:26 +0000 (19:47 -0500)
configure.ac
docs/_config.yml
docs/doc/installation.md
src/output_printer.c

index eb7e4b52fb944fe6edbeae768d37e139fa9d8670..833ad861fb75aa1fba11200420e4b6a63fa798a6 100644 (file)
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.69])
 # TODO change the bug report address
-AC_INIT([fort], [0.0.1-beta], [ydahhrk@gmail.com])
+AC_INIT([fort], [0.0.2], [ydahhrk@gmail.com])
 AC_CONFIG_SRCDIR([src/main.c])
 AM_INIT_AUTOMAKE([subdir-objects])
 
index f4761bc06b299d9e7d11f19049777aa6dcde530a..31f54f7eaa19bbb8c8d3c330010e59063b2fdea5 100644 (file)
@@ -7,5 +7,4 @@ defaults:
     values:
       layout: "default"
 
-fort-latest-version: 0.0.1-beta
-libcmscodec-latest-version: beta2
+fort-latest-version: 0.0.2
index c7634187381268f48a6b0e06bb539da1addc555a..06be678593634273e4c55cbdf31f55566fcb664d 100644 (file)
@@ -15,7 +15,7 @@ title: Compilation and Installation
 3. [Option 2: Compiling and installing the release tarball](#option-2-compiling-and-installing-the-release-tarball)
        1. [Debian version](#debian-version)
        2. [OpenBSD version](#openbsd-version)
-4. [Option 3: Compiling the git repositories](#option-3-compiling-the-git-repositories)
+4. [Option 3: Compiling and installing the git repository](#option-3-compiling-and-installing-the-git-repository)
 
 ## Dependencies
 
@@ -27,21 +27,13 @@ The dependencies are
 2. libcrypto (Either [LibreSSL](http://www.libressl.org/) or [OpenSSL](https://www.openssl.org/))
 3. [rsync](http://rsync.samba.org/)
 
-The build dependencies are
-
-- [autoconf](https://www.gnu.org/software/autoconf/)
-- [automake](https://www.gnu.org/software/automake/)
-- unzip (or [git](https://git-scm.com/))
-
-(Some builds do not need all these dependencies.)
-
 ## Option 1: Installing the Debian package
 
-> TODO Upload to Debian, add more archs and/or host these links on Github releases properly.
+> TODO Upload to Debian, add more archs
 
 {% highlight bash %}
-wget https://www.dropbox.com/s/7c0rs49ewcu6m93/fort_0.0.1-1_amd64.deb
-sudo apt install ./fort_0.0.1-1_amd64.deb
+wget https://github.com/NICMx/FORT-validator/releases/download/v{{ site.fort-latest-version }}/fort_{{ site.fort-latest-version }}-1_amd64.deb
+sudo apt install ./fort_{{ site.fort-latest-version }}-1_amd64.deb
 {% endhighlight %}
 
 Aside from the `fort` binary documented elsewhere in this documentation, the Debian package also ships with a systemd service, which is just the binary ran as a daemon. You can [configure](usage.html#--configuration-file) it at `/etc/fort/config.json`.
@@ -60,52 +52,35 @@ etc.
 ### Debian version
 
 {% highlight bash %}
-sudo apt install autoconf automake build-essential libjansson-dev libssl-dev pkg-config rsync unzip
-
-mkdir fort
-cd fort/
-wget https://github.com/NICMx/FORT-validator/archive/master.zip
-# tar xvzf fort-{{ site.fort-latest-version }}.tar.gz
-unzip master.zip
-cd FORT-validator-master/
-./autogen.sh
+sudo apt install autoconf automake build-essential libjansson-dev libssl-dev pkg-config rsync
+
+wget https://github.com/NICMx/FORT-validator/releases/download/v{{ site.fort-latest-version }}/fort-{{ site.fort-latest-version }}.tar.gz
+tar xvzf fort-{{ site.fort-latest-version }}.tar.gz
+cd fort-{{ site.fort-latest-version }}/
 ./configure
 make
 sudo make install
-cd ../../
 {% endhighlight %}
 
 ### OpenBSD version
 
-> TODO: The autotools are weird in this OS.
-> 
-> They require some global variables the installer doesn't setup on its own for some reason, and then spew error messages encouraging long deprecated macros. WTF?
-> 
-> For now, I'm working around this by running the `autogen.sh`s in Debian. It probably needn't be fixed, since the releases are going to ship with the `autogen.sh`s already executed anyway.
-
 {% highlight bash %}
 su
-# OpenBSD already ships with LibreSSL
-pkg_add jansson libexecinfo rsync unzip
+pkg_add jansson libexecinfo rsync # OpenBSD already ships with LibreSSL
 exit
 
-mkdir fort
-cd fort/
-ftp https://github.com/NICMx/FORT-validator/archive/master.zip
-# tar xvzf fort-{{ site.fort-latest-version }}.tar.gz
-unzip master.zip
-cd FORT-validator-master
-./autogen.sh # Run this elsewhere
+ftp https://github.com/NICMx/FORT-validator/releases/download/v{{ site.fort-latest-version }}/fort-{{ site.fort-latest-version }}.tar.gz
+tar xvzf fort-{{ site.fort-latest-version }}.tar.gz
+cd fort-{{ site.fort-latest-version }}/
 # clang is needed because of gnu11.
 env CC=clang CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure
 make
 su
 make install
 exit
-cd ../../
 {% endhighlight %}
 
-## Option 3: Compiling the git repositories
+## Option 3: Compiling and installing the git repository
 
 {% highlight bash %}
 sudo apt install autoconf automake build-essential git libjansson-dev libssl-dev pkg-config rsync
@@ -116,6 +91,4 @@ cd FORT-validator/
 ./configure
 make
 sudo make install
-cd ../
 {% endhighlight %}
-
index e5761b52bbe6fe7a06b4aaf8708e8dfdc1bc22d4..464ec920f686346bac97a150fcb0f29aee8657d3 100644 (file)
@@ -1,10 +1,12 @@
 #include "output_printer.h"
 
+#include <arpa/inet.h>
+#include <sys/types.h> /* AF_INET, AF_INET6 (needed in OpenBSD) */
+#include <sys/socket.h> /* AF_INET, AF_INET6 (needed in OpenBSD) */
 #include "config.h"
 #include "file.h"
 #include "log.h"
 #include "rtr/db/vrp.h"
-#include <arpa/inet.h>
 
 char addr_buf[INET6_ADDRSTRLEN];