Commit Graph

42 Commits

Author SHA1 Message Date
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
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
Fabian Bläse 8702fdd823 fff-sysupgrade: Keep ed25519 and ecdsa host key on system upgrade
Dropbear supports ed25519 keys since OpenWrt 21.02.
Also, ecdsa is supported since v19.07, but disabled in our firmware.

Keep the generated ed25519 and ecdsa host key accross upgrades.

While at it, remove dss host keys, as they are not supported anymore.

5eb7864aadd5 ("dropbear: rewrite init script startup logic to handle both host key files")
8a7a93947004 ("dropbear: remove generation and configuration of DSS keys")

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-20 20:23:58 +02:00
Adrian Schmutzler 858930547b treewide: use SPDX license identifiers
The SPDX license identifier provides a standardized way for specifying
licenses that is both human- and machine-readable. It is used upstream
both in OpenWrt and the Linux kernel.

Replace licenses in our repository by those identifiers.

The full-text licenses corresponding to these identifiers are
provided in the LICENSES folder.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2021-03-06 18:53:26 +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 776cfe9f86 treewide: add "exit 0" for uci-defaults files
uci-defaults scripts are supposed to be run once after firstboot
and then removed. However, the removal only takes place if the
subshell created for the sourced scripts returns exit code 0.

For some of the files, the last command returned a different exit
code, though, leading to the script remaining in its location and
being executed for every boot.

To prevent cases like the latter, this adds an "exit 0" to all
uci-defaults files in our package store. While at it, remove the
shebang for all these files since they are sourced (and not
executed).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-23 12:00:17 +02:00
Adrian Schmutzler eb784bd0db fff-sysupgrade: replace comma by underscore in image file names
On modern targets in OpenWrt, the board name follows the
"vendor,model" syntax. Since commas in file names are uncommon
and ugly, file names use the same pattern with an underscore,
"vendor_model".

Since this also applies to image file names, this patch
adjusts fff-upgrade.sh to replace the comma from board name
by an underscore for all devices. This should be possible
without harm as OpenWrt images can safely be expected to
either contain a comma in the right place or no comma at all.

It has been discussed whether the same should be applied to
the network.* files as well. However, expecting those to
be removed in the foreseeable future does make this undesirable,
as a lot of code would be inserted now and be removed again a few
months later, only to fix the name for one device.

For the same reason, we won't touch the board name replace
for the TL-WDR4900 v1 for now.

Suggested-by: Fabian Bläse <fabian@blaese.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-02 13:07:26 +02:00
Adrian Schmutzler 6a43b7dfdb fff-sysupgrade: move /etc/sysupgrade.sh to /sbin/fff-upgrade.sh
The old name "sysupgrade.sh" is easy to be confused with OpenWrt's
/sbin/sysupgrade. Rename our script to clearly indicate its
purpose.

While at it, move from /etc to /sbin, as the former is an odd location
for an executable script.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-12-14 12:08:03 +01:00
Fabian Bläse 3e1f6e167d Remove target and subtarget from filename
This simplifies and shortens filenames quite significantly.

A rewrite script will be installed on the update servers
to allow updating routers with older firmwares.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-11-20 20:05:03 +01:00
Adrian Schmutzler 40cad0a9b9 treewide: Force use of busybox wget
In OpenWrt commit 055cdab2bb22 ("uclient: add ALTERNATIVES for wget")
uclient is registered as ALTERNATIVES provider for wget. Since
the priority for busybox as provider is lowest, this overwrites
the link set for /usr/bin/wget, now pointing to uclient wget.

However, uclient wget does not support IPv6 link-local addresses,
as it's not aware of the "%" to separate address from link identifier.

To prevent wget from failing when those addresses are used, this
patch explicitly uses busybox wget.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-11-17 15:45:24 +01: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
Fabian Bläse 4fb9c4c652 fff-sysupgrade: Add gateway config to sysupgrade.conf
User configuration for layer3 firmware is stored in
/etc/config/gateway. To preserve this file across updates it
is added to sysupgrade.conf

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-05-31 18:16:23 +02:00
Adrian Schmutzler 518c0d6fef fff-sysupgrade/fff-web: Free cache before upgrade
This might reduce the chance to break devices with 32 MB RAM
during sysupgrade.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-04-15 15:54:18 +02:00
Adrian Schmutzler e34f5b0119 build: Remove "squashfs" from image names
This is just meant to make image names shorter.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-02-10 22:44:06 +01: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
Christian Dresel 9999b7b2cb fff-sysupgrade: merge SOC and SUBTARGET
This make it easier to use new targets without subtarget.

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-12-09 14:27:30 +01:00
Adrian Schmutzler 3856fff4be fff-sysupgrade: Fix comparison for version in sysupgrade.sh
The previous version seemed to work only for numeric data.

Fixes #113

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-10-25 16:34:20 +02:00
Tim Niemeyer dc18e22a29 fff-sysupgrade: Update sysupgrade.sh to support openwrt-18.06
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[Set PKG_RELEASE back to 1]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-10-24 18:33:41 +02:00
Tim Niemeyer 21dcd57a16 fff-sysupgrade: move config migration to fff-config
Seems like the /etc/config/fff is owned by fff-config.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-08-11 15:48:42 +02:00
Tim Niemeyer c1fc513cef buildscript: remove community config
The community file is not used anymore.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-08-06 15:31:32 +02:00
Fabian Bläse b194e8f8cd Remove sectorfile for first release
To reduce the number of possible corner cases
in the first keyxchangev2 release, this patch
removes the sector file with the intention to
add it back after release.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2018-07-25 14:14:26 +02:00
Adrian Schmutzler 55f6182a75 packages/fff: Split fff-hoods into two packages
Code which is reused by other functionalities is put into the
fff-hoodutils package, so it can be used without including
configurehood.

This also allows setting missing dependencies of other packages.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-02-11 00:10:41 +01:00
Adrian Schmutzler 568ce35d06 fff-sysupgrade/fff-hoods: Make sectorfile upgradesafe
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-01-20 15:20:52 +01:00
Christian Dresel 9e0952e01e fff-hoods: Make possible to use fixed hoodfile
Add a complete hoodfile to /etc/hoodfile to use only this file

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
- Changed according to Adrian's review
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-01-20 13:06:57 +01:00
Adrian Schmutzler 39d147da8d Rearrange fff config values into their own config file
This moves the FFF configuration from
/etc/config/system to a new file /etc/config/fff. Thus,
this file can be copied as a whole during upgrade (with
compatibility provided) and then resulting values in
other files are re-set later.

This also fixes the bandwidth settings not being persistent
during upgrade. Other settings may join ...

I tried to go through all the code and update all occurrences
of the relevant system variables (looking for "system" both
in GitHub and my local src folder).

Note that a downgrade will result in loss of configuration!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
- Rebased
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2017-11-12 20:28:52 +01:00
Adrian Schmutzler 063baa5edd fff-boardname: Reorganize WR841 boardnames
This patch achieves multiple goals:
- Align WR841 boardnames with image names
- Fix wrong name replace in sysupgrade
- Support sysupgrade of WR841 v12

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
- Rebased
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2017-11-03 22:45:12 +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 6463e2d2cf Remove references to community.cfg
This removes all references to community.cfg except in the
buildscript and except the file itself.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-10-15 17:30:34 +02:00
Adrian Schmutzler 4dbf136a31 fff-network: Make custom port configuration update-safe
This writes CLIENT/BATMAN/WAN port configurations for devices
with switches to a separate file. This file can be changed
based on the desired setup and is then preserved during
firmware upgrade. In case of a future bugfix concerning the
entries of a specific network.* file, this will still be
effective as only the port configurations reside in the
new file, while the other settings could be overwritten by
the upgrade.

For one- and two-port devices, adjustments have been made so
that their relevant settings also reside in the new file now.

This also adds a WebUI interface for setting the two-port
devices (CPE210 and CPE510).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
 - Changed doc in network.mode
2017-09-17 16:09:28 +02:00
Tim Niemeyer 2d3cbdf73a fff-sysupgrade: fixes shellcheck errors and warnings
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-07-28 07:42:10 +02:00
Tim Niemeyer 6865009d56 fff-sysupgrade: Security question with yes/no
Fixes: #31

Changes from Bjoerns ticket. Thanks.

CC: freifunk@bjoernengel.de
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-07-28 07:40:44 +02:00
Jan Kraus 1bfb0b0611 Revert "Added an automatism which will retrive Router-Coordinates from the old Netmon system"
This reverts commit d6f2f18e49.
The Netmon is gone, so this workaround is not needed any longer.

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
- Removed micrond dependency and rebased
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2017-07-02 18:11:38 +02:00
Tim Niemeyer 32df7e55fe bsp/default: remove/update etc/config/system
- This will fix the LEDs on LEDE
- We will lose the power heartbeat trigger on the LED
- We will lose the VPN signaling on the LEDs

While remove the default system config, the LEDE system now
configures wrong ntp service. We fix this by deleting these
entries in the fff-timeserver package.

If the file is already present on the devices, we need to upgrade it.
Therefore the 05-config-system-migration is now part of the fff-sysupgrade
package.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2017-02-18 13:55:38 +01:00
Tim Niemeyer 439fd9e8c7 lede: some images are renamed
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2017-02-18 13:55:22 +01:00
Tim Niemeyer db52740905 fff-sysupgrade: install config via uci-defaults
Unfortunately the sysupgrade.conf is installed by base-files. The installed file
just contains examples and will be overwritten with this.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2017-02-18 13:55:13 +01:00
Jan Kraus 74bc7e7949 Fixed unwanted reboot every 5 Minutes after -n flash
The error only occurs if there isn't any network connection.
Fixes #23
Also added prevention for applying empty coordinates.

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-01-10 19:31:35 +01:00
Tim Niemeyer c1d30140f1 fff-sysupgrade: add wget as dependency
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-09-10 18:43:01 +02:00
Steffen Pankratz 543d786c46 buildscript: shortened firmware image file names
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-08-20 17:03:17 +02:00
Jan Kraus d6f2f18e49 Added an automatism which will retrive Router-Coordinates from the old Netmon system
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2016-08-20 16:14:18 +02:00
Jan Kraus 06e72576d6 Added script parameter to sysupgrade Script
This makes automatic update via cron jobs possible.

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
2016-08-20 14:02:02 +02:00
Tim Niemeyer d901f7c442 fff-sysupgrade: move sysupgrade.sh to package
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
2016-06-10 23:13:46 +02:00