Skip to content

Commit 08df34d

Browse files
authored
[change] Remove unneeded ssl package implementation definitions
Which ssl implementation is used by the openwisp-config agent is decided in the curl package. The openwisp-agent is not compiled servivce. Therefore, the division into different packages is not necessary. This commit removes all ssl package versions. There is now only one openwisp-config package. Other PRs related to this work: - openwrt/luci#5471 - openwisp/openwrt-openwisp-monitoring#78 Signed-off-by: Florian Eckert <fe@dev.tdt.de>
1 parent f08c7df commit 08df34d

5 files changed

Lines changed: 18 additions & 81 deletions

File tree

README.rst

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ Then install one of the `latest builds <http://downloads.openwisp.io/openwisp-co
4545
4646
opkg install <URL>
4747
48-
Where ``<URL>`` is the URL of the image that is suitable for your case
49-
(we suggest ``openssl`` or alternatively ``mbedtls``).
48+
Where ``<URL>`` is the URL of the precompiled openwisp-config package.
5049

5150
For a list of the latest built images, take a look at `downloads.openwisp.io/openwisp-config/
5251
<http://downloads.openwisp.io/openwisp-config/>`_.
@@ -296,20 +295,13 @@ Path to an executable script that will be called after the registration is compl
296295
Compiling openwisp-config
297296
-------------------------
298297
299-
There are 4 variants of *openwisp-config*:
300-
301-
- **openwisp-config-openssl**: depends on *ca-certificates* and *libopenssl*
302-
- **openwisp-config-mbedtls**: depends on *ca-certificates* and *libmbedtls*
303-
- **openwisp-config-wolfssl**: depends on *ca-certificates* and *libwolfssl*
304-
- **openwisp-config-nossl**: doesn't depend on any SSL library and doesn't install trusted CA certificates
305-
306-
The following procedure illustrates how to compile all the *openwisp-config* variants and their dependencies:
298+
The following procedure illustrates how to compile *openwisp-config* and its dependencies:
307299
308300
.. code-block:: shell
309301
310302
git clone https://github.com/openwrt/openwrt.git openwrt
311303
cd openwrt
312-
git checkout openwrt-19.07
304+
git checkout <openwrt-branch>
313305
314306
# configure feeds
315307
echo "src-git openwisp https://github.com/openwisp/openwisp-config.git" > feeds.conf
@@ -319,23 +311,20 @@ The following procedure illustrates how to compile all the *openwisp-config* var
319311
# any arch/target is fine because the package is architecture indipendent
320312
arch="ar71xx"
321313
echo "CONFIG_TARGET_$arch=y" > .config;
322-
echo "CONFIG_PACKAGE_openwisp-config-openssl=y" >> .config
323-
echo "CONFIG_PACKAGE_openwisp-config-mbedtls=y" >> .config
324-
echo "CONFIG_PACKAGE_openwisp-config-wolfssl=y" >> .config
325-
echo "CONFIG_PACKAGE_openwisp-config-nossl=y" >> .config
314+
echo "CONFIG_PACKAGE_openwisp-config=y" >> .config
326315
make defconfig
327316
make tools/install
328317
make toolchain/install
329318
make package/openwisp-config/compile
330319
331320
Alternatively, you can configure your build interactively with ``make menuconfig``, in this case
332-
you will need to select the *openwisp-config* variant by going to ``Administration > openwisp``:
321+
you will need to select *openwisp-config* by going to ``Administration > openwisp``:
333322
334323
.. code-block:: shell
335324
336325
git clone https://github.com/openwrt/openwrt.git openwrt
337326
cd openwrt
338-
git checkout openwrt-19.07
327+
git checkout <openwrt-branch>
339328
340329
# configure feeds
341330
echo "src-git openwisp https://github.com/openwisp/openwisp-config.git" > feeds.conf
@@ -358,14 +347,14 @@ each new device, you should switch to using a custom OpenWRT firmware image that
358347
hence saving extra time and effort to register each device on the controller app
359348
* if you happen to reset the firmware to initial settings, these precompiled settings will be restored as well
360349
361-
The following procedure illustrates how to compile a custom `OpenWRT 19.07 <https://openwrt.org/>`_
350+
The following procedure illustrates how to compile a custom `OpenWRT <https://openwrt.org/>`_
362351
image with a precompiled minimal ``/etc/config/openwisp`` configuration file:
363352
364353
.. code-block:: shell
365354
366355
git clone https://github.com/openwrt/openwrt.git openwrt
367356
cd openwrt
368-
git checkout openwrt-19.07
357+
git checkout <openwrt-branch>
369358
370359
# include precompiled file
371360
mkdir -p files/etc/config
@@ -384,8 +373,7 @@ image with a precompiled minimal ``/etc/config/openwisp`` configuration file:
384373
# replace with your desired arch target
385374
arch="ar71xx"
386375
echo "CONFIG_TARGET_$arch=y" > .config
387-
echo "CONFIG_PACKAGE_openwisp-config-openssl=y" >> .config
388-
echo "CONFIG_LIBCURL_OPENSSL=y" >> .config
376+
echo "CONFIG_PACKAGE_openwisp-config=y" >> .config
389377
make defconfig
390378
# compile with verbose output
391379
make -j1 V=s

openwisp-config/Makefile

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,28 @@ PKG_VERSION:=$(shell cat ../VERSION)
1010
PKG_RELEASE:=1
1111
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
1212
PKG_LICENSE:=GPL-3.0
13+
PKG_MAINTAINER:=Federico Capoano <f.capoano@openwisp.io>
1314

1415
include $(INCLUDE_DIR)/package.mk
1516

16-
define Package/openwisp-config/default
17-
TITLE:=Remote configuration management agent ($(2) variant)
17+
define Package/openwisp-config
18+
TITLE:=Remote configuration management agent
1819
CATEGORY:=Administration
1920
SECTION:=admin
2021
SUBMENU:=openwisp
21-
DEPENDS:=+curl +lua +libuci-lua +luafilesystem +luci-lib-nixio $(3)
22-
VARIANT:=$(1)
22+
DEPENDS:=+curl +lua +libuci-lua +luafilesystem +luci-lib-nixio +ca-certificates
2323
PKGARCH:=all
24-
MAINTAINER:=Federico Capoano <f.capoano@openwisp.io>
2524
URL:=http://openwisp.org
2625
endef
2726

28-
Package/openwisp-config-openssl=$(call Package/openwisp-config/default,openssl,OpenSSL,+ca-certificates +libopenssl)
29-
Package/openwisp-config-mbedtls=$(call Package/openwisp-config/default,mbedtls,mbedTLS,+ca-certificates +libmbedtls)
30-
Package/openwisp-config-wolfssl=$(call Package/openwisp-config/default,wolfssl,WolfSSL,+ca-certificates +libwolfssl)
31-
Package/openwisp-config-nossl=$(call Package/openwisp-config/default,nossl,No SSL)
32-
3327
define Build/Compile
3428
endef
3529

36-
define Package/openwisp-config-$(BUILD_VARIANT)/conffiles
30+
define Package/openwisp-config/conffiles
3731
/etc/config/openwisp
3832
endef
3933

40-
CONFIG_OPENWISP_UCI:=ssl
41-
42-
ifeq ($(BUILD_VARIANT),nossl)
43-
CONFIG_OPENWISP_UCI:=nossl
44-
endif
45-
46-
define Package/openwisp-config-$(BUILD_VARIANT)/install
34+
define Package/openwisp-config/install
4735
$(INSTALL_DIR) \
4836
$(1)/usr/sbin \
4937
$(1)/etc/init.d \
@@ -59,7 +47,7 @@ define Package/openwisp-config-$(BUILD_VARIANT)/install
5947
files/openwisp.init \
6048
$(1)/etc/init.d/openwisp_config
6149

62-
$(INSTALL_CONF) files/openwisp-$(CONFIG_OPENWISP_UCI).config \
50+
$(INSTALL_CONF) files/openwisp.config \
6351
$(1)/etc/config/openwisp
6452

6553
$(INSTALL_BIN) \
@@ -101,7 +89,4 @@ define Package/openwisp-config-$(BUILD_VARIANT)/install
10189
$(CP) ../VERSION $(1)/etc/openwisp/
10290
endef
10391

104-
$(eval $(call BuildPackage,openwisp-config-openssl))
105-
$(eval $(call BuildPackage,openwisp-config-mbedtls))
106-
$(eval $(call BuildPackage,openwisp-config-wolfssl))
107-
$(eval $(call BuildPackage,openwisp-config-nossl))
92+
$(eval $(call BuildPackage,openwisp-config))

openwisp-config/files/openwisp-nossl.config

Lines changed: 0 additions & 30 deletions
This file was deleted.

runbuild

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,7 @@ sed -i '/telephony/d' feeds.conf
4242
sed -i '/routing/d' feeds.conf
4343
./scripts/feeds update -a
4444
./scripts/feeds install -a
45-
46-
{
47-
echo "CONFIG_PACKAGE_openwisp-config-openssl=y"
48-
echo "CONFIG_PACKAGE_openwisp-config-mbedtls=y"
49-
echo "CONFIG_PACKAGE_openwisp-config-wolfssl=y"
50-
echo "CONFIG_PACKAGE_openwisp-config-nossl=y"
51-
} >>.config
45+
echo "CONFIG_PACKAGE_openwisp-config=y" >>.config
5246
make defconfig
5347

5448
if [ ! "$CI_CACHE" ]; then

0 commit comments

Comments
 (0)