]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
licenses: Remove the braindead GPL acception stage
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 6 Aug 2024 14:44:53 +0000 (16:44 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 6 Aug 2024 14:48:27 +0000 (16:48 +0200)
The GPL is not an EULA and so there is no value in having users
accept it.

The UI is very broken and so I believe it is best to drop this entirely.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/cfgroot/header.pl
config/rootfiles/common/aarch64/stage2
config/rootfiles/common/riscv64/stage2
config/rootfiles/common/web-user-interface
config/rootfiles/common/x86_64/stage2
html/cgi-bin/gpl.cgi [deleted file]
html/cgi-bin/index.cgi
html/html/index.cgi
lfs/stage2
src/installer/main.c

index af524af53e3177d7544b671f44a5cad818f9853f..a4b79a6a178380f2c35ab476c5fde8cafe230a24 100644 (file)
@@ -440,8 +440,6 @@ sub genmenu {
     my %sublogshash = ();
     my $sublogs = \%sublogshash;
 
-  if ( -e "/var/ipfire/main/gpl_accepted") {
-
     eval `/bin/cat /var/ipfire/menu.d/*.menu`;
     eval `/bin/cat /var/ipfire/menu.d/*.main`;
 
@@ -472,7 +470,6 @@ sub genmenu {
         $menu->{'03.network'}{'subMenu'}->{'80.macadressmenu'}{'enabled'} = 0;
         $menu->{'03.network'}{'subMenu'}->{'90.wakeonlan'}{'enabled'} = 0;
     }
-  }
 }
 
 sub showhttpheaders($) {
index e8cdeab9f073ea23e7efef4f266add3c29f3ca6c..3ac85638fa2d5e95a65517900c7a4af1d7604ef6 100644 (file)
@@ -132,8 +132,6 @@ usr/local/bin/update-location-database
 usr/sbin/openvpn-metrics
 #usr/share
 #usr/share/doc
-#usr/share/doc/licenses
-usr/share/doc/licenses/GPLv3
 #usr/share/info
 #usr/share/locale
 #usr/share/man
index f70c737140fba86341970a4de164f703deb6c022..fdccf0d3370ed9a75fd6f75057801823770eeb67 100644 (file)
@@ -133,8 +133,6 @@ usr/local/bin/update-location-database
 usr/sbin/openvpn-metrics
 #usr/share
 #usr/share/doc
-#usr/share/doc/licenses
-usr/share/doc/licenses/GPLv3
 #usr/share/info
 #usr/share/locale
 #usr/share/man
index 7ec076d2d89b647548648d30c6d7ed9d5f3f99fc..7678c1e5d0103e97256a87a0ee7cd79439a6e4ba 100644 (file)
@@ -20,7 +20,6 @@ srv/web/ipfire/cgi-bin/fireinfo.cgi
 srv/web/ipfire/cgi-bin/firewall.cgi
 srv/web/ipfire/cgi-bin/fwhosts.cgi
 srv/web/ipfire/cgi-bin/getrrdimage.cgi
-srv/web/ipfire/cgi-bin/gpl.cgi
 #srv/web/ipfire/cgi-bin/guardian.cgi
 srv/web/ipfire/cgi-bin/gui.cgi
 srv/web/ipfire/cgi-bin/hardwaregraphs.cgi
index f6678fc407c5f290ffaf961c828ad8a9b067815e..c0decfc279a81f9af546a785c3d6a6ebf0b3982d 100644 (file)
@@ -132,8 +132,6 @@ usr/local/bin/update-location-database
 usr/sbin/openvpn-metrics
 #usr/share
 #usr/share/doc
-#usr/share/doc/licenses
-usr/share/doc/licenses/GPLv3
 #usr/share/info
 #usr/share/locale
 #usr/share/man
diff --git a/html/cgi-bin/gpl.cgi b/html/cgi-bin/gpl.cgi
deleted file mode 100644 (file)
index 029b048..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/usr/bin/perl
-###############################################################################
-#                                                                             #
-# IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2012  IPFire Team  <info@ipfire.org>                     #
-#                                                                             #
-# 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 <http://www.gnu.org/licenses/>.       #
-#                                                                             #
-###############################################################################
-
-use strict;
-# enable only the following on debugging purpose
-#use warnings;
-#use CGI::Carp 'fatalsToBrowser';
-
-require '/var/ipfire/general-functions.pl';
-require "${General::swroot}/lang.pl";
-require "${General::swroot}/header.pl";
-require "/opt/pakfire/lib/functions.pl";
-
-# If the license has already been accepted.
-if ( -e "/var/ipfire/main/gpl_accepted" ) {
-       &redirect();
-}
-
-my %cgiparams;
-$cgiparams{'ACTION'} = '';
-
-&Header::getcgihash(\%cgiparams);
-
-# Check if the license agreement has been accepted.
-if ($cgiparams{'ACTION'} eq "$Lang::tr{'yes'}" && $cgiparams{'gpl_accepted'} eq '1') {
-       open(FILE, ">/var/ipfire/main/gpl_accepted");
-       close(FILE);
-
-       &redirect();
-}
-
-&Header::showhttpheaders();
-
-&Header::openpage($Lang::tr{'main page'}, 1);
-&Header::openbigbox('', 'center');
-
-&Header::openbox('100%', 'left', $Lang::tr{'gpl license agreement'});
-print <<END;
-       $Lang::tr{'gpl please read carefully the general public license and accept it below'}.
-       <br /><br />
-END
-;
-if ( -e "/usr/share/doc/licenses/GPLv3" ) {
-       print '<textarea rows=\'25\' cols=\'75\' readonly=\'readonly\'>';
-
-       # Open and read-in GPL file content.
-       open(FILE, "/usr/share/doc/licenses/GPLv3");
-
-       # Grab license.
-       my @license = <FILE>;
-
-       # Close filehandle.
-       close(FILE);
-
-       # Print license to textarea.
-       print "@license";
-
-       print '</textarea>';
-}
-else {
-       print '<br /><a href=\'http://www.gnu.org/licenses/gpl-3.0.txt\' target=\'_blank\'>GNU GENERAL PUBLIC LICENSE</a><br />';
-}
-print <<END;
-       <p>
-               <form method='post' action='$ENV{'SCRIPT_NAME'}'>
-                       <input type='checkbox' name='gpl_accepted' value='1'/> $Lang::tr{'gpl i accept these terms and conditions'}.
-                       <br/ >
-                       <input type='submit' name='ACTION' value='$Lang::tr{'yes'}' />
-               </form>
-       </p>
-       <a href='http://www.gnu.org/licenses/translations.html' target='_blank'>$Lang::tr{'gpl unofficial translation of the general public license v3'}</a>
-
-END
-
-&Header::closebox();
-&Header::closebigbox();
-&Header::closepage();
-
-sub redirect {
-       print "Status: 302 Moved Temporarily\n";
-       print "Location: index.cgi\n\n";
-       exit (0);
-}
index 5e32ce038196058e735e32e44ad65e4461316552..0357e225ce28355d9758c39b1614eabe1c4bc399 100644 (file)
@@ -48,12 +48,6 @@ my $showbox=0;
 my $showipsec=0;
 my $showovpn=0;
 
-if ( ! -e "/var/ipfire/main/gpl_accepted" ) {
-       print "Status: 302 Moved Temporarily\n";
-       print "Location: gpl.cgi\n\n";
-       exit (0);
-}
-
 &Header::showhttpheaders();
 
 $cgiparams{'ACTION'} = '';
@@ -74,12 +68,10 @@ my %mainsettings = ();
 
 my $connstate = &Header::connectionstatus();
 
-if ( -e "/var/ipfire/main/gpl_accepted" ) {
-       if ($connstate =~ /$Lang::tr{'connecting'}/ || /$Lang::tr{'connection closed'}/ ){
-               $refresh = "<meta http-equiv='refresh' content='5;'>";
-       }elsif ($connstate =~ /$Lang::tr{'dod waiting'}/ || -e "${General::swroot}/main/refreshindex") {
-               $refresh = "<meta http-equiv='refresh' content='30;'>";
-       }
+if ($connstate =~ /$Lang::tr{'connecting'}/ || /$Lang::tr{'connection closed'}/ ){
+       $refresh = "<meta http-equiv='refresh' content='5;'>";
+} elsif ($connstate =~ /$Lang::tr{'dod waiting'}/ || -e "${General::swroot}/main/refreshindex") {
+       $refresh = "<meta http-equiv='refresh' content='30;'>";
 }
 
 if ($cgiparams{'ACTION'} eq $Lang::tr{'dial profile'})
index f33f7019e8d39a3dbf5afcc3f5d5236c16a40cc9..b7e1012e16ea51852f44c566acd806abc2614733 100644 (file)
 #                                                                             #
 ###############################################################################
 
-if (! -e "/var/ipfire/main/gpl_accepted" ) {
-       print "Status: 302 Moved Temporarily\n";
-       print "Location: /cgi-bin/gpl.cgi\n\n";
-       exit (0);
-}
-
 print "Status: 302 Moved Temporarily\n";
 print "Location: /cgi-bin/index.cgi\n\n";
index b2ae5d0fffa7007563a66a0a052099b32207dce7..64904fad53913cc35a811ef185831b6487972fbf 100644 (file)
@@ -143,10 +143,6 @@ endif
        # A small hack to include /root to the iso but not all of it's files.
        touch /root/ipfire
 
-       # License agreement
-       -mkdir -pv /usr/share/doc/licenses/
-       cp -vf $(DIR_SRC)/doc/COPYING /usr/share/doc/licenses/GPLv3
-
        # System release
        echo "$(SYSTEM_RELEASE)" > /etc/system-release
 
index 70a240ccbc9d579c4983fb50142a058e78394b61..9e3f4af833b5eb58b15277cb5b9f69ddd2baf767 100644 (file)
@@ -24,7 +24,6 @@
 #define _(x) dgettext("installer", x)
 
 #define INST_FILECOUNT 30000
-#define LICENSE_FILE   "/cdrom/COPYING"
 #define SOURCE_TEMPFILE "/tmp/downloads/image.iso"
 
 extern char url[STRING_SIZE];
@@ -162,36 +161,6 @@ static int newtWinOkCancel(const char* title, const char* message, int width, in
        return ret;
 }
 
-static int newtLicenseBox(const char* title, const char* text, int width, int height) {
-       int ret = 1;
-
-       newtCenteredWindow(width, height, title);
-
-       newtComponent form = newtForm(NULL, NULL, 0);
-
-       newtComponent textbox = newtTextbox(1, 1, width - 2, height - 7,
-               NEWT_FLAG_WRAP|NEWT_FLAG_SCROLL);
-       newtTextboxSetText(textbox, text);
-       newtFormAddComponent(form, textbox);
-
-       char choice;
-       newtComponent checkbox = newtCheckbox(3, height - 3, _("I accept this license"),
-               ' ', " *", &choice);
-
-       newtComponent btn = newtButton(width - 15, height - 4, _("OK"));
-
-       newtFormAddComponents(form, checkbox, btn, NULL);
-
-       newtComponent answer = newtRunForm(form);
-       if (answer == btn && choice == '*')
-               ret = 0;
-
-       newtFormDestroy(form);
-       newtPopWindow();
-
-       return ret;
-}
-
 int write_lang_configs(const char* lang) {
        struct keyvalue *kv = initkeyvalues();
 
@@ -365,8 +334,6 @@ int main(int argc, char *argv[]) {
        // Read /etc/system-release
        char* system_release = get_system_release();
 
-       char discl_msg[40000] = "Disclaimer\n";
-
        char* sourcedrive = NULL;
        struct hw_destination* destination = NULL;
        struct hw_disk** selected_disks = NULL;
@@ -376,7 +343,6 @@ int main(int argc, char *argv[]) {
        char message[STRING_SIZE];
        char title[STRING_SIZE];
        int allok = 0;
-       FILE *copying;
 
        setlocale(LC_ALL, "");
        sethostname(DISTRO_SNAME, strlen(DISTRO_SNAME));
@@ -570,23 +536,6 @@ int main(int argc, char *argv[]) {
                goto EXIT;
        }
 
-       if (!config.unattended) {
-               // Read the license file.
-               if (!(copying = fopen(LICENSE_FILE, "r"))) {
-                       sprintf(discl_msg, "Could not open license file: %s\n", LICENSE_FILE);
-                       fprintf(flog, "%s", discl_msg);
-               } else {
-                       fread(discl_msg, 1, 40000, copying);
-                       fclose(copying);
-
-                       if (newtLicenseBox(_("License Agreement"), discl_msg, 75, 20)) {
-                               errorbox(_("License not accepted!"));
-
-                               goto EXIT;
-                       }
-               }
-       }
-
        int part_type = HW_PART_TYPE_NORMAL;
 
        // Scan for disks to install on.
@@ -865,12 +814,6 @@ int main(int argc, char *argv[]) {
 
        newtPopWindow();
 
-       /* Set marker that the user has already accepted the GPL if the license has been shown
-        * in the installation process. In unatteded mode, the user will be presented the
-        * license when he or she logs on to the web user interface for the first time. */
-       if (!config.unattended)
-               mysystem(logfile, "/usr/bin/touch /harddisk/var/ipfire/main/gpl_accepted");
-
        /* Copy restore file from cdrom */
        char* backup_file = hw_find_backup_file(logfile, SOURCE_MOUNT_PATH);
        if (backup_file) {