From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, master, updated. a26986a3b059beeb3f9c37867575dd932f1aa23e Date: Fri, 09 Jul 2021 13:52:44 +0000 Message-ID: <4GLvk42TLDz2xgh@people01.haj.ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7162645160905091507==" List-Id: --===============7162645160905091507== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree". The branch, master has been updated via a26986a3b059beeb3f9c37867575dd932f1aa23e (commit) via c639ab1d31d51b534539ea27516c672cb9f3ec41 (commit) via b6cad4d231086bb95b47563aac75b6321dd70c8e (commit) via 6f15b0cbe0765cc9be1b133a070325998bf28f77 (commit) via 124926ee86efc861167f07c22f66a42ce4eecb1e (commit) via 75ee0279ecaa8e5a8ee77d99ab466b4333b071a6 (commit) via 0fd28c360e123d770017207b434ff1de0cb7ed38 (commit) from 1d32c50e0306b7b9d304bd0037a99252f9e6eb9a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a26986a3b059beeb3f9c37867575dd932f1aa23e Author: Michael Tremer Date: Fri Jul 9 13:25:41 2021 +0000 core158: Ship pakfire functions.sh =20 Signed-off-by: Michael Tremer commit c639ab1d31d51b534539ea27516c672cb9f3ec41 Author: Michael Tremer Date: Fri Jul 9 13:25:00 2021 +0000 pakfire: Do not delay directory restore =20 https://www.gnu.org/software/tar/manual/tar.html#Directory-Modification-T= imes-and-Permissions =20 Signed-off-by: Michael Tremer commit b6cad4d231086bb95b47563aac75b6321dd70c8e Author: Michael Tremer Date: Fri Jul 9 13:23:56 2021 +0000 pakfire: Put tar options into an array =20 Signed-off-by: Michael Tremer commit 6f15b0cbe0765cc9be1b133a070325998bf28f77 Author: Michael Tremer Date: Fri Jul 9 13:19:08 2021 +0000 pakfire.cgi: Sleep after running a pakfire command =20 This is required to have better chances in the race of showing the log output afterwards. =20 Signed-off-by: Michael Tremer commit 124926ee86efc861167f07c22f66a42ce4eecb1e Author: Michael Tremer Date: Fri Jul 9 13:05:13 2021 +0000 pakfire.cgi: Remove confusing dots in install message =20 Signed-off-by: Michael Tremer commit 75ee0279ecaa8e5a8ee77d99ab466b4333b071a6 Author: Michael Tremer Date: Fri Jul 9 13:04:14 2021 +0000 pakfire.cgi: Pass packages to install/uninstall as array =20 Signed-off-by: Michael Tremer commit 0fd28c360e123d770017207b434ff1de0cb7ed38 Author: Michael Tremer Date: Fri Jul 9 12:56:17 2021 +0000 fireinfo.cgi: Fix kernel version =20 Signed-off-by: Michael Tremer ----------------------------------------------------------------------- Summary of changes: config/rootfiles/core/158/filelists/files | 1 + html/cgi-bin/fireinfo.cgi | 4 ++-- html/cgi-bin/pakfire.cgi | 19 ++++++++++--------- src/pakfire/lib/functions.sh | 15 ++++++++++++--- 4 files changed, 25 insertions(+), 14 deletions(-) Difference in files: diff --git a/config/rootfiles/core/158/filelists/files b/config/rootfiles/cor= e/158/filelists/files index 903ae9450..299ce1e2e 100644 --- a/config/rootfiles/core/158/filelists/files +++ b/config/rootfiles/core/158/filelists/files @@ -1,6 +1,7 @@ etc/rc.d/init.d/firewall etc/ssh/sshd_config opt/pakfire/lib/functions.pl +opt/pakfire/lib/functions.sh opt/pakfire/pakfire usr/lib/firewall/ipsec-policy var/ipfire/backup/bin/backup.pl diff --git a/html/cgi-bin/fireinfo.cgi b/html/cgi-bin/fireinfo.cgi index e0221c5be..04e36faf4 100644 --- a/html/cgi-bin/fireinfo.cgi +++ b/html/cgi-bin/fireinfo.cgi @@ -94,7 +94,7 @@ my $ipfire_version =3D ; close(FILE); =20 my $pakfire_version =3D &Pakfire::make_version(); -my $kernel_version =3D &General::system_output("uname", "-a"); +my @kernel_version =3D &General::system_output("uname", "-a"); =20 &Header::openbox('100%', 'left', $Lang::tr{'fireinfo system version'}); print < $Lang::tr{'fireinf= o kernel version'} - $kernel_version + @kernel_version END diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index 631587ce2..0cf522ba1 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -55,14 +55,15 @@ sub refreshpage{&Header::openbox( 'Waiting', 1, "$Lang::tr{'pakfire install package'}.$cgipara= ms{'INSPAKS'}.$Lang::tr{'pakfire possible dependency'} +
$Lang::tr{'pakfire install package'} @pkgs $L= ang::tr{'pakfire possible dependency'}
 END
 		foreach (@output) {
@@ -92,15 +93,15 @@ END
 		exit;
 	}
 } elsif (($cgiparams{'ACTION'} eq 'remove') && (! -e $Pakfire::lockfile)) {
-
-	$cgiparams{'DELPAKS'} =3D~ s/\|/\ /g;
+	my @pkgs =3D split(/\|/, $cgiparams{'DELPAKS'});
 	if ("$cgiparams{'FORCE'}" eq "on") {
-		&General::system_background("/usr/local/bin/pakfire", "remove", "--non-int=
eractive", "--no-colors", $cgiparams{'DELPAKS'});
+		&General::system_background("/usr/local/bin/pakfire", "remove", "--non-int=
eractive", "--no-colors", @pkgs);
+		sleep(2);
 	} else {
 		&Header::openbox("100%", "center", $Lang::tr{'request'});
-		my @output =3D &General::system_output("/usr/local/bin/pakfire", "resolved=
eps", "--no-colors", $cgiparams{'DELPAKS'});
+		my @output =3D &General::system_output("/usr/local/bin/pakfire", "resolved=
eps", "--no-colors", @pkgs);
 		print <
$Lang::tr{'pakfire uninstall package'}.$cgipa= rams{'DELPAKS'}.$Lang::tr{'pakfire possible dependency'} +
$Lang::tr{'pakfire uninstall package'} @pkgs = $Lang::tr{'pakfire possible dependency'}
 END
 		foreach (@output) {
diff --git a/src/pakfire/lib/functions.sh b/src/pakfire/lib/functions.sh
index 5918649db..f784cf792 100644
--- a/src/pakfire/lib/functions.sh
+++ b/src/pakfire/lib/functions.sh
@@ -22,16 +22,25 @@
 . /etc/sysconfig/rc
 . $rc_functions
=20
+TAR_OPTIONS=3D(
+	--acls
+	--xattrs
+	--xattrs-include=3D'*'
+	--no-overwrite-dir
+	--no-delay-directory-restore
+	--preserve-permissions
+	--numeric-owner
+)
+
 extract_files() {
 	echo "Extracting files..."
-	tar --acls --xattrs --xattrs-include=3D'*' \
-		-xavf /opt/pakfire/tmp/files* --no-overwrite-dir -p --numeric-owner -C /
+	tar -xavf /opt/pakfire/tmp/files* "${TAR_OPTIONS[@]}" -C /
 	echo "...Finished."
 }
=20
 extract_backup_includes() {
 	echo "Extracting backup includes..."
-	tar xavf /opt/pakfire/tmp/files* --no-overwrite-dir -p --numeric-owner -C /=
 \
+	tar xavf /opt/pakfire/tmp/files* "${TAR_OPTIONS[@]}" -C / \
 		var/ipfire/backup/addons/includes
 	echo "...Finished."
 }


hooks/post-receive
--
IPFire 2.x development tree

--===============7162645160905091507==--