From patchwork Mon Mar 2 11:58:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Fitzenreiter X-Patchwork-Id: 2813 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48WJbS5RKcz3wc3 for ; Mon, 2 Mar 2020 11:59:32 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48WJbG58rXzhc; Mon, 2 Mar 2020 11:59:22 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48WJbF5r88z2yRK; Mon, 2 Mar 2020 11:59:21 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48WJbD2YGRz2yPM for ; Mon, 2 Mar 2020 11:59:20 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48WJZn49pVz17S; Mon, 2 Mar 2020 11:58:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1583150359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=92Gi1QeSOozlDIs+2Pk11axP3W7m5iieywRGL2VLqwI=; b=AfajlKbPQcMFBY3QOshM42F8MeJqz1Vmd/AgwbF+eZ0iBrNIljq/GI+t8YFPl29Yt9d8cl OIR8ojuKohlQ1Ga66OAWeI1TZc6FeLv4CXoT4S2lM1l5OypOwMb+ldkH+UM9OUMT5KnBCm OP314VfKiVkCsgGQEHULVJ73+y2RA+v0XO5im9ER9x6wtAknYxVhRFx8dWlDr+gZ9dfdQ0 8R8kvmCK5KqsaZczgMMMDVxDk6JuGc6OjBMpQuD39z2fkgs4hOJAc3/K+0bTQK/4oMaDOm fISdZ0vck56OMDocvW4i94ucI8WCJ11MTjfrb1wk/D3h/Y5R7yYQ64KagZ1lSQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1583150359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=92Gi1QeSOozlDIs+2Pk11axP3W7m5iieywRGL2VLqwI=; b=y9Gt1hJT0peNhW+gNXhfMgS2+5kotQSqIgC2L9pYiV54H4ny+xfp6tGMeR5YHVgmC3R4Ua dzLTf3u+mh0mlwCg== From: Arne Fitzenreiter To: development@lists.ipfire.org Subject: [PATCH] bluetooth: drop outdated bluetooth addon Date: Mon, 2 Mar 2020 12:58:35 +0100 Message-Id: <20200302115835.17639-1-arne_f@ipfire.org> Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=arne_f@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arne Fitzenreiter Errors-To: development-bounces@lists.ipfire.org Sender: "Development" The cgi support only rfcomm modem dialup. This is not used by modern hardware. Also the used bluez stack version is outdated long time. Signed-off-by: Arne Fitzenreiter Acked-by: Michael Tremer --- config/backup/includes/bluetooth | 2 - config/menu/EX-bluetooth.menu | 5 - config/rootfiles/common/web-user-interface | 1 - html/cgi-bin/bluetooth.cgi | 187 --------------------- lfs/bluetooth | 134 --------------- lfs/cups | 6 +- lfs/initscripts | 5 +- make.sh | 1 - 8 files changed, 4 insertions(+), 337 deletions(-) delete mode 100644 config/backup/includes/bluetooth delete mode 100644 config/menu/EX-bluetooth.menu delete mode 100644 html/cgi-bin/bluetooth.cgi delete mode 100644 lfs/bluetooth diff --git a/config/backup/includes/bluetooth b/config/backup/includes/bluetooth deleted file mode 100644 index 342aa6296..000000000 --- a/config/backup/includes/bluetooth +++ /dev/null @@ -1,2 +0,0 @@ -/etc/bluetooth/ -/var/ipfire/bluetooth/ diff --git a/config/menu/EX-bluetooth.menu b/config/menu/EX-bluetooth.menu deleted file mode 100644 index b7f1728a5..000000000 --- a/config/menu/EX-bluetooth.menu +++ /dev/null @@ -1,5 +0,0 @@ - $subipfire->{'55.bluetooth'} = {'caption' => bluetooth, - 'uri' => '/cgi-bin/bluetooth.cgi', - 'title' => bluetooth, - 'enabled' => 1, - }; diff --git a/config/rootfiles/common/web-user-interface b/config/rootfiles/common/web-user-interface index a88dd8770..a3636002e 100644 --- a/config/rootfiles/common/web-user-interface +++ b/config/rootfiles/common/web-user-interface @@ -7,7 +7,6 @@ srv/web/ipfire/cgi-bin/aliases.cgi #srv/web/ipfire/cgi-bin/asterisk/status.cgi srv/web/ipfire/cgi-bin/atm-status.cgi srv/web/ipfire/cgi-bin/backup.cgi -srv/web/ipfire/cgi-bin/bluetooth.cgi #srv/web/ipfire/cgi-bin/captive srv/web/ipfire/cgi-bin/captive.cgi srv/web/ipfire/cgi-bin/captive/index.cgi diff --git a/html/cgi-bin/bluetooth.cgi b/html/cgi-bin/bluetooth.cgi deleted file mode 100644 index 32bd8e8e0..000000000 --- a/html/cgi-bin/bluetooth.cgi +++ /dev/null @@ -1,187 +0,0 @@ -#!/usr/bin/perl -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see . # -# # -############################################################################### -# - -use strict; - -# enable only the following on debugging purpose -use warnings; -use CGI::Carp 'fatalsToBrowser'; - -require '/var/ipfire/general-functions.pl'; -require '/var/ipfire/lang.pl'; -require '/var/ipfire/header.pl'; - -my $debug = 0; -my $i = 0; -my $errormessage = ''; -my $status_started = "$Lang::tr{'running'}"; -my $status_stopped = "$Lang::tr{'stopped'}"; - -# get rid of used only once warnings -my @onlyonce = ( $Header::colourgreen, $Header::colourred ); -undef @onlyonce; - -my %selected=(); -my %checked=(); -my %color = (); -my %mainsettings = (); - -&General::readhash("${General::swroot}/main/settings", \%mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); - -my %bluetoothsettings=(); -$bluetoothsettings{'PASSKEY_AGENT'} = 'on'; -$bluetoothsettings{'PWD'} = '12345'; -$bluetoothsettings{'RFCOMM0_BIND'} = 'off'; -$bluetoothsettings{'RFCOMM0_DEVICE'} = ''; -$bluetoothsettings{'RFCOMM0_CHANNEL'} = '1'; -$bluetoothsettings{'RFCOMM1_BIND'} = 'off'; -$bluetoothsettings{'RFCOMM1_DEVICE'} = ''; -$bluetoothsettings{'RFCOMM1_CHANNEL'} = '1'; - -&General::readhash("/var/ipfire/bluetooth/settings", \%bluetoothsettings); - -my %cgiparams=(); -$cgiparams{'ACTION'} = ''; -$cgiparams{'RUNNING'} = 'off'; -$cgiparams{'PASSKEY_AGENT'} = 'off'; -$cgiparams{'PWD'} = ''; -$cgiparams{'RFCOMM0_BIND'} = 'off'; -$cgiparams{'RFCOMM0_DEVICE'} = ''; -$cgiparams{'RFCOMM0_CHANNEL'} = ''; -$cgiparams{'RFCOMM1_BIND'} = 'off'; -$cgiparams{'RFCOMM1_DEVICE'} = ''; -$cgiparams{'RFCOMM1_CHANNEL'} = ''; - - -&Header::getcgihash(\%cgiparams); - -&Header::showhttpheaders(); - -if ( $cgiparams{'ACTION'} eq "$Lang::tr{'save'}" ){ - $bluetoothsettings{'PASSKEY_AGENT'} = $cgiparams{'PASSKEY_AGENT'}; - $bluetoothsettings{'PWD'} = $cgiparams{'PWD'}; - if ( (length($bluetoothsettings{'PWD'}) < 4) || (length($bluetoothsettings{'PWD'}) > 8) ){ - $errormessage .= "Invalid length in Passphrase. Must be between 4 and 8 characters.
"; - } - $bluetoothsettings{'RFCOMM0_BIND'} = $cgiparams{'RFCOMM0_BIND'}; - $bluetoothsettings{'RFCOMM1_BIND'} = $cgiparams{'RFCOMM1_BIND'}; - $bluetoothsettings{'RFCOMM0_DEVICE'} = $cgiparams{'RFCOMM0_DEVICE'}; - $bluetoothsettings{'RFCOMM1_DEVICE'} = $cgiparams{'RFCOMM1_DEVICE'}; - $bluetoothsettings{'RFCOMM0_CHANNEL'} = $cgiparams{'RFCOMM0_CHANNEL'}; - $bluetoothsettings{'RFCOMM1_CHANNEL'} = $cgiparams{'RFCOMM1_CHANNEL'}; - -# TODO: CHECK RFCOMM DEVICES - - if ( $errormessage eq '' ){ - &WriteConfig(); - system("/usr/local/bin/addonctrl bluetooth restart >/dev/null 2>&1") - } -} - -&Header::openpage('Bluetooth', 1, '', ''); -&Header::openbigbox('100%', 'left', '', $errormessage); -print "
"; - -if ( $errormessage ){ - &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); - print "$errormessage\n"; - print " \n"; - &Header::closebox(); -} - - -# Found this usefull piece of code in BlockOutTraffic AddOn 8-) -# fwrules.cgi -############### -# DEBUG DEBUG -if ( $debug ){ - &Header::openbox('100%', 'left', 'DEBUG'); - my $debugCount = 0; - foreach my $line (sort keys %cgiparams) { - print "$line = '$cgiparams{$line}'
\n"; - $debugCount++; - } - print " Count: $debugCount\n"; - &Header::closebox(); -} -# DEBUG DEBUG -############### - - -my $checked_passkey_agent = ''; -my $checked_rfcomm0_bind = ''; -my $checked_rfcomm1_bind = ''; - -$checked_passkey_agent = "checked='checked'" if ( $bluetoothsettings{'PASSKEY_AGENT'} eq 'on' ); -$checked_rfcomm0_bind = "checked='checked'" if ( $bluetoothsettings{'RFCOMM0_BIND'} eq 'on' ); -$checked_rfcomm1_bind = "checked='checked'" if ( $bluetoothsettings{'RFCOMM1_BIND'} eq 'on' ); - -# -# Devices box -# -&Header::openbox('100%', 'left', "Bluetooth devices in range"); -print < -END -; -my $bluetooth_scan = `hcitool scan | grep -v "Scanning ..." | sed 's|:|-|g'`; - -print "
$bluetooth_scan
"; - -&Header::closebox(); - -# -# Bluetooth settings -# -&Header::openbox('100%', 'left', "Bluetooth Settings"); -print < -Passkey-Agent:  - Password:  -Bind rfcomm0:  - Device:  - Channel:  -Bind rfcomm1:  - Device:  - Channel:  - - -
- - - - -
 
-END -; -&Header::closebox(); - -print ""; -&Header::closebigbox(); -&Header::closepage(); - - -sub WriteConfig{ - &General::writehash("/var/ipfire/bluetooth/settings", \%bluetoothsettings); -} - diff --git a/lfs/bluetooth b/lfs/bluetooth deleted file mode 100644 index 2a0130085..000000000 --- a/lfs/bluetooth +++ /dev/null @@ -1,134 +0,0 @@ -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007-2018 IPFire Team # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see . # -# # -############################################################################### - -############################################################################### -# Definitions -############################################################################### - -include Config - -VER = 3.36 - -THISAPP = bluez-libs-$(VER) -DL_FILE = $(THISAPP).tar.gz -DL_FROM = $(URL_IPFIRE) -DIR_APP = $(DIR_SRC)/$(THISAPP) -TARGET = $(DIR_INFO)/$(THISAPP) -PROG = bluetooth -PAK_VER = 1 - -DEPS = "dbus" - -############################################################################### -# Top-level Rules -############################################################################### - -objects = $(DL_FILE) bluez-utils-$(VER).tar.gz bluez-firmware-1.2.tar.gz bluez-hcidump-1.42.tar.gz - -$(DL_FILE) = $(DL_FROM)/$(DL_FILE) -bluez-utils-$(VER).tar.gz = $(DL_FROM)/bluez-utils-$(VER).tar.gz -bluez-firmware-1.2.tar.gz = $(DL_FROM)/bluez-firmware-1.2.tar.gz -bluez-hcidump-1.42.tar.gz = $(DL_FROM)/bluez-hcidump-1.42.tar.gz - -$(DL_FILE)_MD5 = 8c2ca546c0e7bb73dbd0e906fce7f6b1 -bluez-utils-$(VER).tar.gz_MD5 = 4fc292b635ba7b442c7aaf5680199012 -bluez-firmware-1.2.tar.gz_MD5 = 1cc3cefad872e937e05de5a0a2b390dd -bluez-hcidump-1.42.tar.gz_MD5 = 5704737aaf72104eeaf77335218a1827 - -install : $(TARGET) - -check : $(patsubst %,$(DIR_CHK)/%,$(objects)) - -download :$(patsubst %,$(DIR_DL)/%,$(objects)) - -md5 : $(subst %,%_MD5,$(objects)) - -dist: - @$(PAK) - -############################################################################### -# Downloading, checking, md5sum -############################################################################### - -$(patsubst %,$(DIR_CHK)/%,$(objects)) : - @$(CHECK) - -$(patsubst %,$(DIR_DL)/%,$(objects)) : - @$(LOAD) - -$(subst %,%_MD5,$(objects)) : - @$(MD5) - -############################################################################### -# Installation Details -############################################################################### - -$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) - @$(PREBUILD) - @rm -rf $(DIR_SRC)/bluez* - cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) - cd $(DIR_APP) && tar xzf $(DIR_DL)/bluez-utils-$(VER).tar.gz - cd $(DIR_APP) && tar xzf $(DIR_DL)/bluez-firmware-1.2.tar.gz - cd $(DIR_APP) && tar xzf $(DIR_DL)/bluez-hcidump-1.42.tar.gz - $(UPDATE_AUTOMAKE) - cd $(DIR_APP) && ./configure --prefix=/usr \ - --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib - cd $(DIR_APP) && make $(MAKETUNING) - cd $(DIR_APP) && make install - cd $(DIR_APP)/bluez-utils-$(VER) && ./configure --prefix=/usr \ - --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib \ - --enable-alsa --enable-usb --enable-netlink --enable-tools \ - --enable-bccmd --enable-hid2hci --enable-dfutool --enable-hidd \ - --enable-pand --enable-dund --enable-cups --enable-test \ - --enable-configfiles --enable-pcmciarules - cd $(DIR_APP)/bluez-utils-$(VER) && make $(MAKETUNING) - cd $(DIR_APP)/bluez-utils-$(VER) && make install - cd $(DIR_APP)/bluez-utils-$(VER) && install -m 755 \ - test/passkey-agent /usr/bin/passkey-agent - cd $(DIR_APP)/bluez-firmware-1.2 && ./configure --libdir=/lib - cd $(DIR_APP)/bluez-firmware-1.2 && make $(MAKETUNING) - cd $(DIR_APP)/bluez-firmware-1.2 && make install - cd $(DIR_APP)/bluez-hcidump-1.42 && ./configure --prefix=/usr \ - --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib - cd $(DIR_APP)/bluez-hcidump-1.42 && make $(MAKETUNING) - cd $(DIR_APP)/bluez-hcidump-1.42 && make install - mv -f /etc/udev/bluetooth.rules /lib/udev/rules.d/24-bluetooth.rules - # Patch udev rules for new udev version - sed -i -e "s/SYSFS{/ATTRS{/g" /lib/udev/rules.d/24-bluetooth.rules - sed -i -e "s/BUS==/SUBSYSTEMS==/g" /lib/udev/rules.d/24-bluetooth.rules - # Change bluetooth peername to Hostname-devicenumber - sed -i -e 's|name "BlueZ (%d)";|name "%h-%d";|g' /etc/bluetooth/hcid.conf - # Create empty config files - echo '# Bluetooth audio configuration' > /etc/bluetooth/audio.conf - echo '# Bluetooth main configuration' > /etc/bluetooth/main.conf - echo '# Bluetooth input configuration' > /etc/bluetooth/input.conf - echo '# Bluetooth network configuration' > /etc/bluetooth/network.conf - echo '# Bluetooth rfcomm configuration' > /etc/bluetooth/rfcomm.conf - mkdir -p /var/ipfire/bluetooth - touch /var/ipfire/bluetooth/settings - chown nobody:nobody /var/ipfire/bluetooth/settings - chmod 644 /var/ipfire/bluetooth/settings - install -v -m 644 $(DIR_SRC)/config/backup/includes/bluetooth /var/ipfire/backup/addons/includes/bluetooth - - #install initscripts - $(call INSTALL_INITSCRIPT,bluetooth) - - @rm -rf $(DIR_SRC)/bluez* - @$(POSTBUILD) diff --git a/lfs/cups b/lfs/cups index dfa41188c..2a564ccaa 100644 --- a/lfs/cups +++ b/lfs/cups @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2018 IPFire Team # +# Copyright (C) 2007-2020 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -32,9 +32,9 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/cups-$(VER) TARGET = $(DIR_INFO)/$(THISAPP) PROG = cups -PAK_VER = 18 +PAK_VER = 19 -DEPS = "avahi bluetooth cups-filters dbus ghostscript krb5 libtiff" +DEPS = "avahi cups-filters dbus ghostscript krb5 libtiff" ############################################################################### # Top-level Rules diff --git a/lfs/initscripts b/lfs/initscripts index 3a769bd99..173a0b142 100644 --- a/lfs/initscripts +++ b/lfs/initscripts @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2018 IPFire Team # +# Copyright (C) 2007-2020 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -102,9 +102,6 @@ $(TARGET) : ln -sf ../init.d/messagebus /etc/rc.d/rc3.d/S15messagebus ln -sf ../init.d/messagebus /etc/rc.d/rc0.d/K85messagebus ln -sf ../init.d/messagebus /etc/rc.d/rc6.d/K85messagebus - ln -sf ../init.d/bluetooth /etc/rc.d/rc3.d/S16bluetooth - ln -sf ../init.d/bluetooth /etc/rc.d/rc0.d/K84bluetooth - ln -sf ../init.d/bluetooth /etc/rc.d/rc6.d/K84bluetooth ln -sf ../init.d/cpufreq /etc/rc.d/rc3.d/S18cpufreq ln -sf ../init.d/sysklogd /etc/rc.d/rc6.d/K90sysklogd ln -sf ../init.d/sendsignals /etc/rc.d/rc6.d/S60sendsignals diff --git a/make.sh b/make.sh index 984fc95b2..72603f2cd 100755 --- a/make.sh +++ b/make.sh @@ -1498,7 +1498,6 @@ buildipfire() { lfsmake2 syslinux lfsmake2 tftpd lfsmake2 cpufrequtils - lfsmake2 bluetooth lfsmake2 gutenprint lfsmake2 apcupsd lfsmake2 iperf