Commit Graph

31 Commits

Author SHA1 Message Date
Robert Langhammer 8e127a3936 fff-vpn-select: do not configure peers on vpn-stop
There are two reasons why there should be no peers.
Meshrouter without wan or no peers in hoodfile for a protocol.
With this patch there is only one condition left for vpn-start-stop.
Peers present or not. And it is less complicated to implement start/stop.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2022-03-23 19:47:22 +01:00
Adrian Schmutzler 27baecaf37 treewide: set PKG_RELEASE automatically
COMMITCOUNT allows to have the PKG_RELEASE calculated automatically
based on the number of commits for the package folder.

AUTORELEASE will count the number of commits since the last upstream
bump. This is relevant for packages with PKG_VERSION or
PKG_SOURCE_DATE set, but will not work for us since it assumes the
use of certain identifiers in commit titles.

COMMITCOUNT works fine for most of our packages, with the following
exceptions:

 * fff-nodewatcher would yield a commit count of 55, while the
   current PKG_RELEASE is 61. Thus, we do not touch it for now.

 * Packages that have been renamed will start counting from 1 after
   the rename, since folder renames are not tracked by git. This
   will result in descreasing PKG_RELEASE after the change for
   these packages.
   However, since moving essentially creates a new package anyway,
   counting from 1 makes sense conceptually, and PKG_RELEASE is
   still replaced for these packages.

 * alfred-json and fff-macnock use upstream code and thus would
   normally require AUTORELEASE. As discussed above, this will
   not work for us, so just leave these two untouched.

Note that all this is quite irrelevant for the way we use packages
currently, as without opkg PKG_RELEASE does not matter to us anyway.
So, let's just be happy about not having to bump PKG_RELEASE
anymore, while keeping the basic functionality intact.

The only package where the PKG_RELEASE is actually used for
something is fff-nodewatcher, where the version will be displayed
in the Monitoring.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[fabian@blaese.de: rebase, add new packages]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-01-09 22:03:09 +01:00
Robert Langhammer 1febd2a9b2 fff-vpn-select: Make vpn-select modular
This rewrite makes vpn-select modular to easely add new vpn-protocols.

The stuff dependent on the vpn-protocol is outsourced to files in /usr/lib/vpn-select.d/ and comes in with the respective vpn package. In this way it is easy to select or deselect vpnprotocols to be build in.

vpn-stop is removed to use the protocol independent start/stop mechanism of vpn-select. Instead, a symlink is used.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-12-30 16:21:29 +01:00
Fabian Bläse 09450bc4b5 Unify package URL in fff-packages
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-11-10 13:42:03 +01:00
Adrian Schmutzler e3954fddf5 packages/fff: drop redundant PKG_BUILD_DIR
PKG_BUILD_DIR has the following default values set in include/package.mk,
in case no BUILD_VARIANT is set:

With PKG_VERSION set: $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
Without PKG_VERSION:  $(BUILD_DIR)/$(PKG_NAME)

Consequently, all PKG_BUILD_DIR definitions in our packages are
redundant. Remove them.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-01-27 20:22:02 +01:00
Adrian Schmutzler b69469a0b9 packages/fff: remove unneeded Build/Prepare and Build/Configure
Build/Prepare and Build/Configure are not required for packages
which only contain local files and do not need any compilation.

Remove them.

Note that Build/Compile needs to be present and empty to overwrite
the defaults, though.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-12-22 13:47:45 +01:00
Adrian Schmutzler 31df0a3779 packages/fff: remove whitespace from package TITLE
Some packages contain a whitespace at the start of TITLE, some
don't. This is completely irrelevant since Make strips leading
and trailing spaces anyway. Nevertheless, make it consistent.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-12-13 14:40:53 +01:00
Adrian Schmutzler a8f7dce6fc vpn-select: indent contents of make_config function
This is a purely cosmetic change to enhance the readability
of the function.

Also add some empty lines and comments for overview.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Robert Langhammer 4941d6eff5 fff-vpn-select: remove tunneldigger
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[Rebased, updated PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-06 13:58:13 +02:00
Adrian Schmutzler 0889cf35d8 packages/fff: Tidy up wget dependencies
The symbols BUSYBOX_CONFIG_WGET and
BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT are set in different
packages and do not correlate with where Busybox wget is
actually used.

This updates packages dependencies based on the current
situation.

Note that with current firmware, both two versions of wget
are installed:
/bin/wget
/usr/bin/wget

The latter is from busybox and is used as the default version.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-07-01 23:04:21 +02:00
Adrian Schmutzler e9268539d1 packages/fff: Only use PKG_RELEASE for our own packages
PKG_VERSION is meant to refer to the version of external packages,
as we do e.g. in the tunneldigger package.

For our own packages, we just need the PKG_RELEASE variable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[Rebased onto current state of master]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-07-01 21:54:09 +02:00
Adrian Schmutzler fa2ead9306 packages/fff: Use tabs in Makefiles
Currently, Makefile use a mixture of tabs and spaces with various
indents. This harmonizes all Makefiles to use tab indentation only.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2019-02-05 14:29:31 +01:00
Fabian Bläse 672e7a2f9b fastd: Allow IPv6 remotes for peers
The "ipv4" option is used to enforce using ipv4 when
using dns for fastd remotes.
However this option was incorrectly always set which
makes ipv6 connections impossible.
Because enforcing ipv4 is not necessary, this option
is removed.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Fabian Bläse <fabian@blaese.de>
2018-11-12 11:47:07 +01:00
Adrian Schmutzler 53184f63fb vpn-select: Demand hood file to be provided as argument
By removing the reference to the hood file from vpn-select, we
remove the entire dependency from fff-hoodutils.
vpn-select will now work with any file provided, as long as
it has the correct syntax. At the moment, the only provider
is the configurehood script. Since the various hood file variants
are handled there, it seems logical that configurehood also
chooses and provides the correct hood file for vpn-select, instead
of vpn-select which had no other contact with hood file choice.

This is simple, tidy and effective.

Adjusted some comments.

Fixes #106

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-08-02 18:59:11 +02:00
Robert Langhammer 37c634ba7c Remove double equals.
== is a bash specific alias for = , and
should not be used in #!/bin/sh scripts. Not in #!/usr/bin/haserl scripts
either, where the shell defaults to /bin/sh.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
- rebased
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2018-07-26 21:57:34 +02:00
Adrian Schmutzler 845886d16a hood files: Use more meaningful and concise naming scheme
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-07-25 22:59:40 +02:00
Christian Dresel 9a470994aa Disable VPN if not in use
The simplest and fasted way to
Fixes #72

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-02-13 18:50:31 +01:00
Adrian Schmutzler b88841352c fff-hoods: Use variables for hood file names
Since names may change, this puts the relevant file names for
hood files into variables, so they can be changed at once
without the risk of forgetting some occurrences.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2017-11-02 20:52:51 +01:00
Adrian Schmutzler e7e27c168c Utilize PKG_NAME in Makefiles
Since there is a PKG_NAME variable, there is no need to repeat
the individual package name five times.

This makes editing and particularly copying Makefiles much
easier, as only the PKG_NAME has to be changed.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-10-16 21:20:02 +02:00
Adrian Schmutzler 235644be8d vpn-select: Use keyxchangev2data instead of fastd_fff_output
This is a first consolidation step which gets rid of
/tmp/fastd_fff_output, but still requires /etc/fastd/fff/peers/*

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-10-15 17:30:28 +02:00
Christian Dresel 4cd8b8eac2 Add fff-hoods
This package connects to keyxchangev2

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-10-15 17:30:24 +02:00
Christian Dresel b18bfb193d Reconfigure vpn-select for keyxchangev2
we need some little changes and copy some things to fff-hood later

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-10-15 17:30:21 +02:00
Adrian Schmutzler 2567b53334 vpn-select: Fix case of missing .pid file
Bug: If /tmp/run/fastd.${project}.pid is missing, the directory
/proc/ is checked instead of /proc/{something}.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-09-17 16:16:58 +02:00
Robert Langhammer d8a2b78856 Start fastd only if there are fastd peers left
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-06-03 16:19:54 +02:00
Robert Langhammer 8484f73cf2 Do not write tunneldigger conf on flash
Fixes: #41

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-06-03 16:19:46 +02:00
Steffen Pankratz addeb86c6f Moved wget dependency to correct package.
Dependency was not moved, see commit 1243394e6d

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-09-10 12:22:36 +02:00
Robert Langhammer 9c4fe01e65 fff-vpn-select: add missing "/"
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-08-22 18:54:26 +02:00
Robert Langhammer 571239c78c fff-vpn-select: add fastd start/stop for various situations
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-08-20 17:07:22 +02:00
Robert Langhammer 23203334a4 fff-vpn-select: remove dummy-character
The current broker is no longer cutting off the first character from UUID

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-08-16 18:45:30 +02:00
Jan Kraus 7a89a71be8 fixed typo in package description
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-08-11 21:50:35 +02:00
Robert Langhammer 0abb2e3c6a Add package fff-vpn-select
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Christian Dresel <fff@chrisi01.de>
Tested-by: Jan Kraus <mayosemmel@gmail.com>
2016-07-22 21:01:25 +02:00