From patchwork Tue Feb 11 14:28:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2768 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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48H4sS0LkFz3xyT for ; Tue, 11 Feb 2020 14:29:16 +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 48H4sP0vXJzxf; Tue, 11 Feb 2020 14:29:13 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48H4sN48Hhz2yww; Tue, 11 Feb 2020 14:29:12 +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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48H4sL2SMvz2yCr for ; Tue, 11 Feb 2020 14:29:10 +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 48H4sK6LN8zvs; Tue, 11 Feb 2020 14:29:09 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1581431349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n8F4TmyJF7q9grO4q983xnQQ+x5TsJt6v+JJSKfXFAE=; b=zudCqyltQtjvn9DBu3xHeYrfom1DM7lIhdQ2I6GZPB+0XVT0p3SOAzQvT7Fokzq4g+emA0 +XlHsXFHBekO0sCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1581431349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n8F4TmyJF7q9grO4q983xnQQ+x5TsJt6v+JJSKfXFAE=; b=UaDUK6FMxLQfg2IMoIsJS2UrbCkSDCy5wQqW+CVKG2R7fnP9mkd77b4btjZaK49dyvLN4P oG9nvAu8ALllOX4D33fRZ0IMfmLajT51ugt89mEGL4XA/CqJm8E1AbloWxx011QozllPLG DN7VjIKmndd8zvGyZLjz6cYOyVNWfUWWkS/uVgoNwygOanJny786rLdcHeEyMKt1YxQ/+z RRl4VwRWci2a9Bx6jpwmWTVdGozxKi77u6j1VAZraTiqo3J0jaMnPS5h9aJ+GWiaETARtL XT/4PdewcbCjf760Yjt6R3T4064GI1WGN5D4rjqQj18w7DPmS2vUTEXUmB7g1w== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 1/8] pakfire: Automatically compose $version Date: Tue, 11 Feb 2020 14:28:46 +0000 Message-Id: <20200211142853.8561-2-michael.tremer@ipfire.org> In-Reply-To: <20200211142853.8561-1-michael.tremer@ipfire.org> References: <20200211142853.8561-1-michael.tremer@ipfire.org> MIME-Version: 1.0 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: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" The tree in which pakfire is looking for packages and Core Updates has been hardcoded into /opt/pakfire/etc/pakfire.conf. This patch adds a new function which reads the system release from /etc/system-release. Signed-off-by: Michael Tremer --- src/pakfire/lib/functions.pl | 41 ++++++++++++++++++++++++++++++++++++ src/pakfire/pakfire.conf | 2 -- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index 61787757e..cda6f00a9 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -70,6 +70,9 @@ my $bfile; my %pakfiresettings = (); &General::readhash("${General::swroot}/pakfire/settings", \%pakfiresettings); +# Make version +$Conf::version = &make_version(); + sub message { my $message = shift; @@ -946,4 +949,42 @@ sub status { exit 1; } +sub get_arch() { + # Append architecture + my ($sysname, $nodename, $release, $version, $machine) = POSIX::uname(); + + # We only support armv5tel for all 32 bit arches + if ($machine =~ m/armv[567]/) { + return "armv5tel"; + + # We only support i586 for 32 bit x86 + } elsif ($machine =~ m/i[0-9]86/) { + return "i586"; + } + + return $machine; +} + +sub make_version() { + my $version = ""; + + # Open /etc/system-release + open(RELEASE, "; + close(RELEASE); + + # Add the main relase + if ($release =~ m/IPFire ([\d\.]+)/) { + $version .= $1; + } + + # Append architecture + my $arch = &get_arch(); + if ($arch ne "i586") { + $version .= "-${arch}"; + } + + return $version; +} + 1; diff --git a/src/pakfire/pakfire.conf b/src/pakfire/pakfire.conf index cfe48f575..9930f3771 100644 --- a/src/pakfire/pakfire.conf +++ b/src/pakfire/pakfire.conf @@ -21,8 +21,6 @@ package Conf; -$version = "@VERSION@"; - $mainserver = "pakfire.ipfire.org"; $cachedir = "/opt/pakfire/cache"; From patchwork Tue Feb 11 14:28:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2767 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 48H4sR0BlZz3xY8 for ; Tue, 11 Feb 2020 14:29:15 +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 48H4sN5F87zxL; Tue, 11 Feb 2020 14:29:12 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48H4sN29Cdz2yxC; Tue, 11 Feb 2020 14:29:12 +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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48H4sL3gLdz2yNV for ; Tue, 11 Feb 2020 14:29:10 +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 48H4sL1pdYzBD; Tue, 11 Feb 2020 14:29:10 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1581431350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+B1bz6lQbJTVtSoZ3TlcnqRFfQV7e6wiQO6M//d0CBo=; b=+mrGhb9HlWPPRHWq7cghjEsge55tQopWJF9esmqqKmuBmzqP486pT6ydkgmvbYmsH1pIZp 5Jr8JhM0I2ulTLCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1581431350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+B1bz6lQbJTVtSoZ3TlcnqRFfQV7e6wiQO6M//d0CBo=; b=o8SClIuaHup+WXIRcH2iY/dNNE4x2P518mrXXFB0Ikq+2ooKpd95ndA7X8o1VxEtt3dENb TDYdpeswFd8jwrE1CpqtioSHyZpWOrCtmXACVWMZu2XBWEUakpCSNiy1KC5vdHQbPzl+25 lo4n+J5hRs84AZAAk4CN/PG8LCii4Pmv7WiyGWWxz1kKj/cnK4Jls7M3QDrqfp83ufmuge 0VJ/qifmDlGAXZqiIkWId/iZplhYgB3MCyPL/crRQtU7GG/182y6ynkTLCd6Y9veX/o9aH bNBDFy1ltjkU02h1/yLaL0egV+V9IJ39555E8pWm71CQYPA6PGRcQhwapdXFQw== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 2/8] pakfire.cgi: Remove some old settings Date: Tue, 11 Feb 2020 14:28:47 +0000 Message-Id: <20200211142853.8561-3-michael.tremer@ipfire.org> In-Reply-To: <20200211142853.8561-1-michael.tremer@ipfire.org> References: <20200211142853.8561-1-michael.tremer@ipfire.org> MIME-Version: 1.0 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: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" These can no longer be modified in the GUI and are used nowhere. Signed-off-by: Michael Tremer --- html/cgi-bin/pakfire.cgi | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index e6f3cda94..7c560bfbf 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -42,8 +42,6 @@ $pakfiresettings{'VALID'} = ''; $pakfiresettings{'INSPAKS'} = ''; $pakfiresettings{'DELPAKS'} = ''; -$pakfiresettings{'AUTOUPDATE'} = 'off'; -$pakfiresettings{'UUID'} = 'on'; sub refreshpage{&Header::openbox( 'Waiting', 1, "" );print "

$Lang::tr{'pagerefresh'}
";&Header::closebox();} @@ -144,13 +142,6 @@ END system("$command"); system("/bin/sleep 1"); } elsif ($pakfiresettings{'ACTION'} eq "$Lang::tr{'save'}") { - - if ($pakfiresettings{'AUTOUPDATE'} eq 'on') { - system("/usr/local/bin/pakfire enable updates >/dev/null 2>&1"); - } else { - system("/usr/local/bin/pakfire disable updates >/dev/null 2>&1"); - } - &General::writehash("${General::swroot}/pakfire/settings", \%pakfiresettings); } @@ -159,13 +150,6 @@ END my %selected=(); my %checked=(); -$checked{'AUTOUPDATE'}{'off'} = ''; -$checked{'AUTOUPDATE'}{'on'} = ''; -$checked{'AUTOUPDATE'}{$pakfiresettings{'AUTOUPDATE'}} = "checked='checked'"; -$checked{'UUID'}{'off'} = ''; -$checked{'UUID'}{'on'} = ''; -$checked{'UUID'}{$pakfiresettings{'UUID'}} = "checked='checked'"; - # DPC move error message to top so it is seen! if ($errormessage) { &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); From patchwork Tue Feb 11 14:28:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2769 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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48H4sS3vtBz3xyV for ; Tue, 11 Feb 2020 14:29:16 +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 48H4sP4MnYz11h; Tue, 11 Feb 2020 14:29:13 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48H4sN5VyGz2yZj; Tue, 11 Feb 2020 14:29:12 +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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48H4sL4MNZz2yYk for ; Tue, 11 Feb 2020 14:29:10 +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 48H4sL2bdRzwN; Tue, 11 Feb 2020 14:29:10 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1581431350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Fe9mReeBEw0SNkEyO8nMaCuso2WIC14FJh0AnIvXZYE=; b=wzv7bsonBJLpKvLXcfOgxOHtVD+mUZmlClMTL932DDejE9zp1gAQYM7YbbO3cTo/1Aq25n C0WkUCIPRiwAtpBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1581431350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Fe9mReeBEw0SNkEyO8nMaCuso2WIC14FJh0AnIvXZYE=; b=grfv0rAhDsRmn8ZtIMuye7iFTRZdCf4vOwmKNVkRofu7QnnjXJ+JlzvWkZc9kAX8KXOtsM UmFNvDkoiadxK1CGw5Yk5pmIha+3APdOvWz6UUuzs60N9egbWHk07MWzyC8naLopA1bN7C OcSoULwxXPZ1c5hQxfZo1NUSXPkmj2WHo9petindWCkjDJdsvB7NbYNh3J7Azo8LkY3lX9 Yi39IOJqY/pYkIPtfrS1rxwxlKQH9vYqVl7JY2DyH7xFFMAIXQF+MSv6qsgA/zMYFj8y1R vhRkiF6xgNZtCtyAvKfowpZhoo76c+oDoXhxwnn43SDqm0s7s/E7S6HgLUqSZQ== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 3/8] pakfire.cgi: Rename %pakfiresettings to %cgiparams Date: Tue, 11 Feb 2020 14:28:48 +0000 Message-Id: <20200211142853.8561-4-michael.tremer@ipfire.org> In-Reply-To: <20200211142853.8561-1-michael.tremer@ipfire.org> References: <20200211142853.8561-1-michael.tremer@ipfire.org> MIME-Version: 1.0 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: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- html/cgi-bin/pakfire.cgi | 47 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index 7c560bfbf..f785b2594 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -30,22 +30,23 @@ require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; require "/opt/pakfire/lib/functions.pl"; -my %pakfiresettings=(); +my %cgiparams=(); my $errormessage = ''; my %color = (); +my %pakfiresettings = (); my %mainsettings = (); &Header::showhttpheaders(); -$pakfiresettings{'ACTION'} = ''; -$pakfiresettings{'VALID'} = ''; +$cgiparams{'ACTION'} = ''; +$cgiparams{'VALID'} = ''; -$pakfiresettings{'INSPAKS'} = ''; -$pakfiresettings{'DELPAKS'} = ''; +$cgiparams{'INSPAKS'} = ''; +$cgiparams{'DELPAKS'} = ''; sub refreshpage{&Header::openbox( 'Waiting', 1, "" );print "

$Lang::tr{'pagerefresh'}
";&Header::closebox();} -&Header::getcgihash(\%pakfiresettings); +&Header::getcgihash(\%cgiparams); &General::readhash("${General::swroot}/main/settings", \%mainsettings); &General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); @@ -53,17 +54,17 @@ sub refreshpage{&Header::openbox( 'Waiting', 1, "$Lang::tr{'pakfire install package'}.$pakfiresettings{'INSPAKS'}.$Lang::tr{'pakfire possible dependency'} +
$Lang::tr{'pakfire install package'}.$cgiparams{'INSPAKS'}.$Lang::tr{'pakfire possible dependency'}
 END
 		foreach (@output) {
@@ -75,7 +76,7 @@ END
 		
$Lang::tr{'pakfire accept all'}
 
- + @@ -92,18 +93,18 @@ END &Header::closepage(); exit; } -} elsif ($pakfiresettings{'ACTION'} eq 'remove') { +} elsif ($cgiparams{'ACTION'} eq 'remove') { - $pakfiresettings{'DELPAKS'} =~ s/\|/\ /g; - if ("$pakfiresettings{'FORCE'}" eq "on") { - my $command = "/usr/local/bin/pakfire remove --non-interactive --no-colors $pakfiresettings{'DELPAKS'} &>/dev/null &"; + $cgiparams{'DELPAKS'} =~ s/\|/\ /g; + if ("$cgiparams{'FORCE'}" eq "on") { + my $command = "/usr/local/bin/pakfire remove --non-interactive --no-colors $cgiparams{'DELPAKS'} &>/dev/null &"; system("$command"); system("/bin/sleep 1"); } else { &Header::openbox("100%", "center", $Lang::tr{'request'}); - my @output = `/usr/local/bin/pakfire resolvedeps --no-colors $pakfiresettings{'DELPAKS'}`; + my @output = `/usr/local/bin/pakfire resolvedeps --no-colors $cgiparams{'DELPAKS'}`; print <
$Lang::tr{'pakfire uninstall package'}.$pakfiresettings{'DELPAKS'}.$Lang::tr{'pakfire possible dependency'} +
$Lang::tr{'pakfire uninstall package'}.$cgiparams{'DELPAKS'}.$Lang::tr{'pakfire possible dependency'}
 END
 		foreach (@output) {
@@ -115,7 +116,7 @@ END
 		
$Lang::tr{'pakfire accept all'}
 
- + @@ -133,15 +134,15 @@ END exit; } -} elsif ($pakfiresettings{'ACTION'} eq 'update') { +} elsif ($cgiparams{'ACTION'} eq 'update') { system("/usr/local/bin/pakfire update --force --no-colors &>/dev/null &"); system("/bin/sleep 1"); -} elsif ($pakfiresettings{'ACTION'} eq 'upgrade') { +} elsif ($cgiparams{'ACTION'} eq 'upgrade') { my $command = "/usr/local/bin/pakfire upgrade -y --no-colors &>/dev/null &"; system("$command"); system("/bin/sleep 1"); -} elsif ($pakfiresettings{'ACTION'} eq "$Lang::tr{'save'}") { +} elsif ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}") { &General::writehash("${General::swroot}/pakfire/settings", \%pakfiresettings); } From patchwork Tue Feb 11 14:28:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2770 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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48H4sS5zhWz3xyY for ; Tue, 11 Feb 2020 14:29:16 +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 48H4sP5fjTz11l; Tue, 11 Feb 2020 14:29:13 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48H4sN6sP9z2yyG; Tue, 11 Feb 2020 14:29:12 +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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48H4sL5gNXz2yZn for ; Tue, 11 Feb 2020 14:29:10 +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 48H4sL3cSCzxB; Tue, 11 Feb 2020 14:29:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1581431350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=84vpKAu2/1Cgc/cuXSRKVicGd6mkNcqHdSLzIhOtsEs=; b=kIbe3lzT31yc+w/HY++modaVWn552YhBs91eAVI6T42/86rbOakElJqGj+FFExEfIBRvnz /4Dm+ngbjRDEVPElTuSzrO0c3rLkyjbRZ1H10tl7sJVD5HV7goPNft/U5YCMFLDmNQ7Wye Dwfqp4iKRDrpJKLPj3RG5fa1jJFS9qO5qnO4/U6oOl64aHku9k+4eyx81IXp2DEw/o938l Y0uWFDBetFQe6ssMiiqyRE+CVPW9Kpmeo12hbPYXJLhkXOsZrDLBdVIu4XFJU4aA1ZlQkW /XrwDafcEQMzoWbbqum0XBG/svIH6Z2XGmVc/jnk7/snNpDxNFPBX+yo6hj9DA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1581431350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=84vpKAu2/1Cgc/cuXSRKVicGd6mkNcqHdSLzIhOtsEs=; b=V34nMVNMpGa+VlRHw9oxQ5aKoIt5QWMp7zSBWS7L95IIR4y1FbcJlUwdmhyAA0H4DpB40+ SHA7Q5KNKOV7BMCA== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 4/8] pakfire.cgi: Add UI to select repository Date: Tue, 11 Feb 2020 14:28:49 +0000 Message-Id: <20200211142853.8561-5-michael.tremer@ipfire.org> In-Reply-To: <20200211142853.8561-1-michael.tremer@ipfire.org> References: <20200211142853.8561-1-michael.tremer@ipfire.org> MIME-Version: 1.0 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: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- doc/language_issues.de | 5 +++++ doc/language_issues.en | 5 +++++ doc/language_issues.es | 5 +++++ doc/language_issues.fr | 5 +++++ doc/language_issues.it | 5 +++++ doc/language_issues.nl | 5 +++++ doc/language_issues.pl | 5 +++++ doc/language_issues.ru | 5 +++++ doc/language_issues.tr | 5 +++++ doc/language_missings | 40 +++++++++++++++++++++++++++++++++ html/cgi-bin/pakfire.cgi | 48 +++++++++++++++++++++++++++++++++++++++- langs/en/cgi-bin/en.pl | 5 +++++ 12 files changed, 137 insertions(+), 1 deletion(-) diff --git a/doc/language_issues.de b/doc/language_issues.de index 89a703fcb..361133708 100644 --- a/doc/language_issues.de +++ b/doc/language_issues.de @@ -829,6 +829,11 @@ WARNING: untranslated string: guardian no entries = unknown string WARNING: untranslated string: guardian service = unknown string WARNING: untranslated string: itlb multihit = iTLB MultiHit WARNING: untranslated string: not validating = Not validating +WARNING: untranslated string: pakfire invalid tree = Invalid repository selected +WARNING: untranslated string: pakfire tree = Repository +WARNING: untranslated string: pakfire tree stable = Stable +WARNING: untranslated string: pakfire tree testing = Testing +WARNING: untranslated string: pakfire tree unstable = Unstable WARNING: untranslated string: route config changed = unknown string WARNING: untranslated string: routing config added = unknown string WARNING: untranslated string: routing config changed = unknown string diff --git a/doc/language_issues.en b/doc/language_issues.en index 10c2f87ce..2fd69f430 100644 --- a/doc/language_issues.en +++ b/doc/language_issues.en @@ -1440,12 +1440,17 @@ WARNING: untranslated string: pakfire core update level = Core-Update-Level WARNING: untranslated string: pakfire install description = Please choose one or more items from the list below and
click the plus to install. WARNING: untranslated string: pakfire install package = You want to install the following packages: WARNING: untranslated string: pakfire installed addons = Installed Addons: +WARNING: untranslated string: pakfire invalid tree = Invalid repository selected WARNING: untranslated string: pakfire last core list update = Last core list update made WARNING: untranslated string: pakfire last package update = Last packages list update made WARNING: untranslated string: pakfire last serverlist update = Last server list update made WARNING: untranslated string: pakfire last update = Last update made WARNING: untranslated string: pakfire possible dependency = There may be depending packages, here is a list of packages that need to be installed. WARNING: untranslated string: pakfire system state = System Status +WARNING: untranslated string: pakfire tree = Repository +WARNING: untranslated string: pakfire tree stable = Stable +WARNING: untranslated string: pakfire tree testing = Testing +WARNING: untranslated string: pakfire tree unstable = Unstable WARNING: untranslated string: pakfire uninstall description = Please choose one or more items from the list below and
click the minus to uninstall. WARNING: untranslated string: pakfire uninstall package = You want to uninstall the following packages: WARNING: untranslated string: pakfire working = Pakfire is working ... Please wait until all operations have completed successfully. diff --git a/doc/language_issues.es b/doc/language_issues.es index b97d017c3..af006fcdf 100644 --- a/doc/language_issues.es +++ b/doc/language_issues.es @@ -1233,6 +1233,11 @@ WARNING: untranslated string: ovpn warning rfc3280 = Your host certificate is no WARNING: untranslated string: p2p block = P2P networks WARNING: untranslated string: p2p block save notice = Please reload the firewall ruleset in order to apply your changes. WARNING: untranslated string: pakfire ago = ago. +WARNING: untranslated string: pakfire invalid tree = Invalid repository selected +WARNING: untranslated string: pakfire tree = Repository +WARNING: untranslated string: pakfire tree stable = Stable +WARNING: untranslated string: pakfire tree testing = Testing +WARNING: untranslated string: pakfire tree unstable = Unstable WARNING: untranslated string: please reboot to apply your changes = Please reboot to apply your changes WARNING: untranslated string: pptp netconfig = My Net Config WARNING: untranslated string: pptp peer = Peer diff --git a/doc/language_issues.fr b/doc/language_issues.fr index 8e9d7babb..928c37a46 100644 --- a/doc/language_issues.fr +++ b/doc/language_issues.fr @@ -861,6 +861,11 @@ WARNING: untranslated string: info messages = unknown string WARNING: untranslated string: no data = unknown string WARNING: untranslated string: not validating = Not validating WARNING: untranslated string: pakfire ago = ago. +WARNING: untranslated string: pakfire invalid tree = Invalid repository selected +WARNING: untranslated string: pakfire tree = Repository +WARNING: untranslated string: pakfire tree stable = Stable +WARNING: untranslated string: pakfire tree testing = Testing +WARNING: untranslated string: pakfire tree unstable = Unstable WARNING: untranslated string: route config changed = unknown string WARNING: untranslated string: routing config added = unknown string WARNING: untranslated string: routing config changed = unknown string diff --git a/doc/language_issues.it b/doc/language_issues.it index a4ea5e618..6471e0d41 100644 --- a/doc/language_issues.it +++ b/doc/language_issues.it @@ -1013,6 +1013,11 @@ WARNING: untranslated string: ovpn error dh = The Diffie-Hellman parameter needs WARNING: untranslated string: ovpn error md5 = You host certificate uses MD5 for the signature which is not accepted anymore.
Please update to the latest IPFire version and generate a new root and host certificate.

All OpenVPN clients needs then to be renewed!
WARNING: untranslated string: ovpn tls auth = TLS Channel Protection: WARNING: untranslated string: ovpn warning rfc3280 = Your host certificate is not RFC3280 compliant.
Please update to the latest IPFire version and generate as soon as possible a new root and host certificate.

All OpenVPN clients needs then to be renewed!
+WARNING: untranslated string: pakfire invalid tree = Invalid repository selected +WARNING: untranslated string: pakfire tree = Repository +WARNING: untranslated string: pakfire tree stable = Stable +WARNING: untranslated string: pakfire tree testing = Testing +WARNING: untranslated string: pakfire tree unstable = Unstable WARNING: untranslated string: please reboot to apply your changes = Please reboot to apply your changes WARNING: untranslated string: pptp netconfig = My Net Config WARNING: untranslated string: pptp peer = Peer diff --git a/doc/language_issues.nl b/doc/language_issues.nl index ca1dee9b5..cc6cbe966 100644 --- a/doc/language_issues.nl +++ b/doc/language_issues.nl @@ -1045,6 +1045,11 @@ WARNING: untranslated string: ovpn generating the root and host certificates = G WARNING: untranslated string: ovpn ha = Hash algorithm WARNING: untranslated string: ovpn tls auth = TLS Channel Protection: WARNING: untranslated string: ovpn warning rfc3280 = Your host certificate is not RFC3280 compliant.
Please update to the latest IPFire version and generate as soon as possible a new root and host certificate.

All OpenVPN clients needs then to be renewed!
+WARNING: untranslated string: pakfire invalid tree = Invalid repository selected +WARNING: untranslated string: pakfire tree = Repository +WARNING: untranslated string: pakfire tree stable = Stable +WARNING: untranslated string: pakfire tree testing = Testing +WARNING: untranslated string: pakfire tree unstable = Unstable WARNING: untranslated string: please reboot to apply your changes = Please reboot to apply your changes WARNING: untranslated string: pptp netconfig = My Net Config WARNING: untranslated string: pptp peer = Peer diff --git a/doc/language_issues.pl b/doc/language_issues.pl index b97d017c3..af006fcdf 100644 --- a/doc/language_issues.pl +++ b/doc/language_issues.pl @@ -1233,6 +1233,11 @@ WARNING: untranslated string: ovpn warning rfc3280 = Your host certificate is no WARNING: untranslated string: p2p block = P2P networks WARNING: untranslated string: p2p block save notice = Please reload the firewall ruleset in order to apply your changes. WARNING: untranslated string: pakfire ago = ago. +WARNING: untranslated string: pakfire invalid tree = Invalid repository selected +WARNING: untranslated string: pakfire tree = Repository +WARNING: untranslated string: pakfire tree stable = Stable +WARNING: untranslated string: pakfire tree testing = Testing +WARNING: untranslated string: pakfire tree unstable = Unstable WARNING: untranslated string: please reboot to apply your changes = Please reboot to apply your changes WARNING: untranslated string: pptp netconfig = My Net Config WARNING: untranslated string: pptp peer = Peer diff --git a/doc/language_issues.ru b/doc/language_issues.ru index b76c83e56..a8cdef8b4 100644 --- a/doc/language_issues.ru +++ b/doc/language_issues.ru @@ -1229,6 +1229,11 @@ WARNING: untranslated string: ovpn tls auth = TLS Channel Protection: WARNING: untranslated string: ovpn warning rfc3280 = Your host certificate is not RFC3280 compliant.
Please update to the latest IPFire version and generate as soon as possible a new root and host certificate.

All OpenVPN clients needs then to be renewed!
WARNING: untranslated string: p2p block = P2P networks WARNING: untranslated string: p2p block save notice = Please reload the firewall ruleset in order to apply your changes. +WARNING: untranslated string: pakfire invalid tree = Invalid repository selected +WARNING: untranslated string: pakfire tree = Repository +WARNING: untranslated string: pakfire tree stable = Stable +WARNING: untranslated string: pakfire tree testing = Testing +WARNING: untranslated string: pakfire tree unstable = Unstable WARNING: untranslated string: please reboot to apply your changes = Please reboot to apply your changes WARNING: untranslated string: pptp netconfig = My Net Config WARNING: untranslated string: pptp peer = Peer diff --git a/doc/language_issues.tr b/doc/language_issues.tr index ef28f6ac8..c6c6ad599 100644 --- a/doc/language_issues.tr +++ b/doc/language_issues.tr @@ -923,6 +923,11 @@ WARNING: untranslated string: ovpn error dh = The Diffie-Hellman parameter needs WARNING: untranslated string: ovpn error md5 = You host certificate uses MD5 for the signature which is not accepted anymore.
Please update to the latest IPFire version and generate a new root and host certificate.

All OpenVPN clients needs then to be renewed!
WARNING: untranslated string: ovpn tls auth = TLS Channel Protection: WARNING: untranslated string: ovpn warning rfc3280 = Your host certificate is not RFC3280 compliant.
Please update to the latest IPFire version and generate as soon as possible a new root and host certificate.

All OpenVPN clients needs then to be renewed!
+WARNING: untranslated string: pakfire invalid tree = Invalid repository selected +WARNING: untranslated string: pakfire tree = Repository +WARNING: untranslated string: pakfire tree stable = Stable +WARNING: untranslated string: pakfire tree testing = Testing +WARNING: untranslated string: pakfire tree unstable = Unstable WARNING: untranslated string: please reboot to apply your changes = Please reboot to apply your changes WARNING: untranslated string: processor vulnerability mitigations = Processor Vulnerability Mitigations WARNING: untranslated string: ptr = PTR diff --git a/doc/language_missings b/doc/language_missings index 40724a80b..a427f5706 100644 --- a/doc/language_missings +++ b/doc/language_missings @@ -63,6 +63,11 @@ < notes < not validating < okay +< pakfire invalid tree +< pakfire tree +< pakfire tree stable +< pakfire tree testing +< pakfire tree unstable < quick control < shaping add options < show areas @@ -705,6 +710,11 @@ < ovpn warning rfc3280 < p2p block < p2p block save notice +< pakfire invalid tree +< pakfire tree +< pakfire tree stable +< pakfire tree testing +< pakfire tree unstable < please reboot to apply your changes < pptp netconfig < pptp peer @@ -942,6 +952,11 @@ < dns use protocol for dns queries < not validating < okay +< pakfire invalid tree +< pakfire tree +< pakfire tree stable +< pakfire tree testing +< pakfire tree unstable < standard < strict < working @@ -1182,6 +1197,11 @@ < ovpn error md5 < ovpn tls auth < ovpn warning rfc3280 +< pakfire invalid tree +< pakfire tree +< pakfire tree stable +< pakfire tree testing +< pakfire tree unstable < please reboot to apply your changes < pptp netconfig < pptp peer @@ -1564,6 +1584,11 @@ < ovpn reneg sec < ovpn tls auth < ovpn warning rfc3280 +< pakfire invalid tree +< pakfire tree +< pakfire tree stable +< pakfire tree testing +< pakfire tree unstable < please reboot to apply your changes < pptp netconfig < pptp peer @@ -2285,6 +2310,11 @@ < ovpn warning rfc3280 < p2p block < p2p block save notice +< pakfire invalid tree +< pakfire tree +< pakfire tree stable +< pakfire tree testing +< pakfire tree unstable < please reboot to apply your changes < pptp netconfig < pptp peer @@ -3121,6 +3151,11 @@ < ovpn warning rfc3280 < p2p block < p2p block save notice +< pakfire invalid tree +< pakfire tree +< pakfire tree stable +< pakfire tree testing +< pakfire tree unstable < please reboot to apply your changes < pptp netconfig < pptp peer @@ -3429,6 +3464,11 @@ < ovpn error md5 < ovpn tls auth < ovpn warning rfc3280 +< pakfire invalid tree +< pakfire tree +< pakfire tree stable +< pakfire tree testing +< pakfire tree unstable < please reboot to apply your changes < processor vulnerability mitigations < ptr diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index f785b2594..dacbe11f4 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -143,7 +143,19 @@ END system("$command"); system("/bin/sleep 1"); } elsif ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}") { - &General::writehash("${General::swroot}/pakfire/settings", \%pakfiresettings); + $pakfiresettings{"TREE"} = $cgiparams{"TREE"}; + + # Check for valid input + if ($pakfiresettings{"TREE"} !~ m/^(stable|testing|unstable)$/) { + $errormessage .= $Lang::tr{'pakfire invalid tree'}; + } + + unless ($errormessage) { + &General::writehash("${General::swroot}/pakfire/settings", \%pakfiresettings); + + # Update lists + system("/usr/local/bin/pakfire update --force --no-colors &>/dev/null &"); + } } &General::readhash("${General::swroot}/pakfire/settings", \%pakfiresettings); @@ -151,6 +163,12 @@ END my %selected=(); my %checked=(); +$selected{"TREE"} = (); +$selected{"TREE"}{"stable"} = ""; +$selected{"TREE"}{"testing"} = ""; +$selected{"TREE"}{"unstable"} = ""; +$selected{"TREE"}{$pakfiresettings{"TREE"}} = "selected"; + # DPC move error message to top so it is seen! if ($errormessage) { &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); @@ -263,6 +281,34 @@ print < END +&Header::closebox(); +&Header::openbox("100%", "center", "$Lang::tr{'settings'}"); + +print < + + + + + + + + + + + +
$Lang::tr{'pakfire tree'} + +
 
+ +
+ +END + &Header::closebox(); &Header::closebigbox(); &Header::closepage(); diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 1f81108f1..a68c8f411 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1982,6 +1982,7 @@ 'pakfire install description' => 'Please choose one or more items from the list below and
click the plus to install.', 'pakfire install package' => 'You want to install the following packages: ', 'pakfire installed addons' => 'Installed Addons:', +'pakfire invalid tree' => 'Invalid repository selected', 'pakfire last core list update' => 'Last core list update made', 'pakfire last package update' => 'Last packages list update made', 'pakfire last serverlist update' => 'Last server list update made', @@ -1989,6 +1990,10 @@ 'pakfire possible dependency' => ' There may be depending packages, here is a list of packages that need to be installed.', 'pakfire register' => 'Register at pakfire-server:', 'pakfire system state' => 'System Status', +'pakfire tree' => 'Repository', +'pakfire tree stable' => 'Stable', +'pakfire tree testing' => 'Testing', +'pakfire tree unstable' => 'Unstable', 'pakfire uninstall description' => 'Please choose one or more items from the list below and
click the minus to uninstall.', 'pakfire uninstall package' => 'You want to uninstall the following packages: ', 'pakfire update daily' => 'Search for updates daily:', From patchwork Tue Feb 11 14:28:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2773 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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48H4sW0xztz3xyT for ; Tue, 11 Feb 2020 14:29:19 +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 48H4sQ2MJGz12B; Tue, 11 Feb 2020 14:29:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48H4sP1Vjyz2yyg; Tue, 11 Feb 2020 14:29:13 +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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48H4sL67ZPz2ycJ for ; Tue, 11 Feb 2020 14:29:10 +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 48H4sL4dlmzvs; Tue, 11 Feb 2020 14:29:10 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1581431350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L3ZBQkIomC2E747DkjK8lw1wK3np53vCPOdzPpdrwPY=; b=wZR/yX8KSOq91NmetTJGVSIMQWkii+kPQkvR8sXE1tvJt4WwxlbZtI5rK57xGYXrJjrp0K 1WrAcPxkneSgExAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1581431350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L3ZBQkIomC2E747DkjK8lw1wK3np53vCPOdzPpdrwPY=; b=LArcyXWs7g8uaDCu7PFfaFtI1qAbbBn5Tu0kGRQj7YSPc9GItDQ2okHdTNnc4rjrtAF/Zw ClJA4gHsjjsfb9UmVqJmb7+dXUr1f5HLnsajNMj7mG3YlqL/C7DXW15PjI6CW8My0HLXw+ ZlbjC+Z/OBa7qhLYpq+KnNH8EAhHOcfRBFFAxV7pRUSoLoZYuda8p5rrjwxdKM1xzhci+f mYc3CeaGFg1ZzFRyf+HplwFwuq9Wmkw6wWL3hkJ0TJrb2jiQEn8ZkUyIIC6aW2eWRBjIPo cqrSz/0SGLzFSk7NusHu2anKeMGa29RCpWrDRt4VN8scNG0LmzXvPDvFVkzk+Q== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 5/8] pakfire: Add version suffix when in a certain tree Date: Tue, 11 Feb 2020 14:28:50 +0000 Message-Id: <20200211142853.8561-6-michael.tremer@ipfire.org> In-Reply-To: <20200211142853.8561-1-michael.tremer@ipfire.org> References: <20200211142853.8561-1-michael.tremer@ipfire.org> MIME-Version: 1.0 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: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- src/pakfire/lib/functions.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index cda6f00a9..ddb1e9aad 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -965,6 +965,13 @@ sub get_arch() { return $machine; } +sub get_tree() { + # Return stable if nothing is set + return "stable" unless (defined $pakfiresettings{'TREE'}); + + return $pakfiresettings{'TREE'}; +} + sub make_version() { my $version = ""; @@ -978,6 +985,14 @@ sub make_version() { $version .= $1; } + # Append suffix for tree + my $tree = &get_tree(); + if ($tree eq "testing") { + $version .= ".1"; + } elsif ($tree eq "unstable") { + $version .= ".2"; + } + # Append architecture my $arch = &get_arch(); if ($arch ne "i586") { From patchwork Tue Feb 11 14:28:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2771 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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48H4sV4j1bz3xY8 for ; Tue, 11 Feb 2020 14:29:18 +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 48H4sQ5Ccdz12S; Tue, 11 Feb 2020 14:29:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48H4sP3QPlz2yj7; Tue, 11 Feb 2020 14:29:13 +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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48H4sM2PWHz2yCr for ; Tue, 11 Feb 2020 14:29:11 +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 48H4sL5VKXzBD; Tue, 11 Feb 2020 14:29:10 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1581431350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F7H3wl3hsOjv0HXczlLEYIs+n9fvBJNmdVzmxGLF1jI=; b=2hiQ/PLTmGFIJOgqCjM0eDd3vUddQPTuzib/iNze5LWfdo82Jx0Dl3wQqA2IxePu7iVjzK 8+Huv7vRzYV6KfAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1581431350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F7H3wl3hsOjv0HXczlLEYIs+n9fvBJNmdVzmxGLF1jI=; b=cb7OQSgHbN5fhk9BUEwotDLL2RGf93h8RVnmtWSWngSYFuja1HsqPhbOsiWvVK+KVFiFSI pc31tH6MwXJcKAOzT5e5pF1XnBZ9+57M8cPD4jJ3H0QIOfwhm8Sc664ZAGNPMg6MFrzTQU ZOQJjY7Pp8wflqXFYtS270RRIhdwrLh6DHzam1DPO85u2s2ata8v9NzO0yJWbTPs0oO6hN ZZWjozmQIjvTWauk8ib7oTTHQxexgGggupcQUXZWRt06PsEwKihe7ftEtw0051g6FcBK9m yEZaWF3un5oPjzCHeKf9C1mCA8eJWGv2Gt3wtJuKRUuJSOrpSIVvU5AdKmFvTw== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 6/8] make.sh: Tidy up Git commands Date: Tue, 11 Feb 2020 14:28:51 +0000 Message-Id: <20200211142853.8561-7-michael.tremer@ipfire.org> In-Reply-To: <20200211142853.8561-1-michael.tremer@ipfire.org> References: <20200211142853.8561-1-michael.tremer@ipfire.org> MIME-Version: 1.0 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: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" No functional changes. Just making them shorter. Signed-off-by: Michael Tremer --- make.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/make.sh b/make.sh index 34cc35f02..ba393bd65 100755 --- a/make.sh +++ b/make.sh @@ -28,15 +28,17 @@ SNAME="ipfire" # Short name VERSION="2.25" # Version number CORE="142" # Core Level (Filename) PAKFIRE_CORE="141" # Core Level (PAKFIRE) -GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` # Git Branch SLOGAN="www.ipfire.org" # Software slogan CONFIG_ROOT=/var/ipfire # Configuration rootdir NICE=10 # Nice level MAX_RETRIES=1 # prefetch/check loop BUILD_IMAGES=1 # Flash and Xen Downloader KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'` -GIT_TAG=$(git tag | tail -1) # Git Tag -GIT_LASTCOMMIT=$(git log | head -n1 | cut -d" " -f2 |head -c8) # Last commit + +# Information from Git +GIT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" # Git Branch +GIT_TAG="$(git tag | tail -1)" # Git Tag +GIT_LASTCOMMIT="$(git rev-parse --verify HEAD)" # Last commit TOOLCHAINVER=20200108 @@ -518,7 +520,7 @@ prepareenv() { SYSTEM_RELEASE="${SYSTEM_RELEASE} - $GIT_BRANCH$GIT_STATUS" ;; *) - SYSTEM_RELEASE="${SYSTEM_RELEASE} - Development Build: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS" + SYSTEM_RELEASE="${SYSTEM_RELEASE} - Development Build: $GIT_BRANCH/${GIT_LASTCOMMIT:0:8}$GIT_STATUS" ;; esac From patchwork Tue Feb 11 14:28:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2772 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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48H4sV5wq0z3xyQ for ; Tue, 11 Feb 2020 14:29:18 +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 48H4sQ5zhhz12Z; Tue, 11 Feb 2020 14:29:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48H4sP50zVz2yxC; Tue, 11 Feb 2020 14:29:13 +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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48H4sM37zZz2yj8 for ; Tue, 11 Feb 2020 14:29:11 +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 48H4sM1lkRzvs; Tue, 11 Feb 2020 14:29:11 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1581431351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wE9oAD70cfVxTNzjFaDqu2p3w+GC1Kzg4YeVJCCzjIY=; b=qN4SBzDTGM9j1yd9tIM4nFVsXWKq+kwsoG1/QdyzBx3btHLCRb3O9V+z5y5XwXIvDpsaIr jEXbIh4nPkU3U6Cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1581431351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wE9oAD70cfVxTNzjFaDqu2p3w+GC1Kzg4YeVJCCzjIY=; b=RkYDkAfUSRyHfdJvpC5wT77iNh083OK5tLCmoWbjtwanCUrLaNhjlDic41cm5oafp5Gq3N kiqR6HzU3FyxUn2yZpQywFQRLfOC9yJwey7GRowClvndSFVhQMahnv95Dc+SijjyaLaTOf gRr1pw4XoDmDdPGPzNI1jtRme4U8qtZJhSwCjcfAshdEmKV2BvXJYzy4C/d83Bwajxm8iO OihEPIliwIWBnVRqbyWealviCIJuf1wPQhG6lY0+8+RHmSnx9byVvN2rTRNqvbSTmh5BQl JKksfx6PGx29zam6+g/6aQfroSlM97xr9zvSR+/GVopFGbZNg87pYrfGuPe0SQ== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 7/8] make.sh: Cleanup code that builds ${SYSTEM_RELEASE} Date: Tue, 11 Feb 2020 14:28:52 +0000 Message-Id: <20200211142853.8561-8-michael.tremer@ipfire.org> In-Reply-To: <20200211142853.8561-1-michael.tremer@ipfire.org> References: <20200211142853.8561-1-michael.tremer@ipfire.org> MIME-Version: 1.0 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: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- make.sh | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/make.sh b/make.sh index ba393bd65..d46282b8e 100755 --- a/make.sh +++ b/make.sh @@ -509,21 +509,25 @@ prepareenv() { rm -f $BASEDIR/build/usr/src/lsalr 2>/dev/null # Prepare string for /etc/system-release. - SYSTEM_RELEASE="${NAME} ${VERSION} (${BUILD_ARCH})" - if [ "$(git status -s | wc -l)" == "0" ]; then - GIT_STATUS="" - else - GIT_STATUS="-dirty" - fi - case "$GIT_BRANCH" in - core*|beta?|rc?) - SYSTEM_RELEASE="${SYSTEM_RELEASE} - $GIT_BRANCH$GIT_STATUS" - ;; - *) - SYSTEM_RELEASE="${SYSTEM_RELEASE} - Development Build: $GIT_BRANCH/${GIT_LASTCOMMIT:0:8}$GIT_STATUS" - ;; + local system_release="${NAME} ${VERSION} (${BUILD_ARCH})" + + case "${GIT_BRANCH}" in + core*|beta?|rc?) + system_release="${system_release} - ${GIT_BRANCH}" + ;; + *) + system_release="${system_release} - Development Build: ${GIT_BRANCH}/${GIT_LASTCOMMIT:0:8}" + ;; esac + # Append -dirty tag for local changes + if [ "$(git status -s | wc -l)" != "0" ]; then + system_release="${system_release}-dirty" + fi + + # Export variable + SYSTEM_RELEASE="${system_release}" + # Setup ccache cache size enterchroot ccache --max-size="${CCACHE_CACHE_SIZE}" >/dev/null } From patchwork Tue Feb 11 14:28:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2774 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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48H4sW2Mvrz3xyZ for ; Tue, 11 Feb 2020 14:29:19 +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 48H4sR0Q16z12v; Tue, 11 Feb 2020 14:29:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48H4sQ00cbz2yyt; Tue, 11 Feb 2020 14:29:14 +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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48H4sM3xRMz2ymb for ; Tue, 11 Feb 2020 14:29:11 +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 48H4sM2WVkzwN; Tue, 11 Feb 2020 14:29:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1581431351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9nipm84YiodFfOJC4dif2NqGfHQr7XwF0bF+IYlOa+M=; b=oG609P/mG+cLuAL7VvhQBbFC1/HiaotuzI+4JOZt1TBYgL06/3pilvuIRBddqwiBHQGtvS Me9mh2/v4gOokrSFai6im2vpq+FME+aDhW9xDnmsWM/n2IfGYKCqwoS3PnimB0yxyCI3Uh IkfxzYWdlPMujjSP08mZjfThjjBVLVUpurPgEhijxg92Cd9lEcmetkc9Anmq1P4uqoHwjq WvM8NfSNP7whwJ1DJ5IfZDXlDK/Y+8fkmN6x+s7Sry5/V2YR812gUiWxfCpKw+e4DLh1Pp DzIL/bOnySZFWFbWR7GR/3xreN1g//0ao6ZqmpeMTXPF9Lw4Vuv+ezIypxEZWA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1581431351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9nipm84YiodFfOJC4dif2NqGfHQr7XwF0bF+IYlOa+M=; b=T+FOS/q1PbKNUOblABMyvua29OCg05Z/lrx7r2uRgX4SK5VMQdDZYyOz+NUFp5/1nFnegt 7ObXY5mn+LFGxpBA== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 8/8] make.sh: Configure Pakfire to load packages from the correct tree Date: Tue, 11 Feb 2020 14:28:53 +0000 Message-Id: <20200211142853.8561-9-michael.tremer@ipfire.org> In-Reply-To: <20200211142853.8561-1-michael.tremer@ipfire.org> References: <20200211142853.8561-1-michael.tremer@ipfire.org> MIME-Version: 1.0 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: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" This will configure Pakfire that people who install a nightly build will also get the packages for this build, etc. Signed-off-by: Michael Tremer --- lfs/configroot | 1 + make.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/lfs/configroot b/lfs/configroot index 6092f889b..2c9dbe0e3 100644 --- a/lfs/configroot +++ b/lfs/configroot @@ -133,6 +133,7 @@ $(TARGET) : echo "POLICY=MODE2" >> $(CONFIG_ROOT)/firewall/settings echo "POLICY1=MODE2" >> $(CONFIG_ROOT)/firewall/settings echo "USE_ISP_NAMESERVERS=on" >> $(CONFIG_ROOT)/dns/settings + echo "TREE=$(PAKFIRE_TREE)" >> $(CONFIG_ROOT)/pakfire/settings # Install snort to suricata converter. cp $(DIR_SRC)/config/suricata/convert-snort /usr/sbin/convert-snort diff --git a/make.sh b/make.sh index d46282b8e..277ac8633 100755 --- a/make.sh +++ b/make.sh @@ -528,6 +528,19 @@ prepareenv() { # Export variable SYSTEM_RELEASE="${system_release}" + # Decide on PAKFIRE_TREE + case "${GIT_BRANCH}" in + core*) + PAKFIRE_TREE="stable" + ;; + master) + PAKFIRE_TREE="testing" + ;; + *) + PAKFIRE_TREE="unstable" + ;; + esac + # Setup ccache cache size enterchroot ccache --max-size="${CCACHE_CACHE_SIZE}" >/dev/null } @@ -545,6 +558,7 @@ enterchroot() { PATH="${PATH}" \ SYSTEM_RELEASE="${SYSTEM_RELEASE}" \ PAKFIRE_CORE="${PAKFIRE_CORE}" \ + PAKFIRE_TREE="${PAKFIRE_TREE}" \ NAME="${NAME}" \ SNAME="${SNAME}" \ VERSION="${VERSION}" \