Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] base-files: vkpurge: fix for empty /boot
@ 2020-04-05  6:42 sgn
  2020-04-05  9:01 ` [PR PATCH] [Updated] " sgn
  2020-04-06  7:33 ` [PR PATCH] [Merged]: " xtraeme
  0 siblings, 2 replies; 3+ messages in thread
From: sgn @ 2020-04-05  6:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 819 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages base-files-vkpurge-empty-boot
https://github.com/void-linux/void-packages/pull/20666

base-files: vkpurge: fix for empty /boot
On system with empty /boot (example: /boot on external device and not
mounted:
* `vkpurge list` reports `*`, which is incorrect, and
* `vkpurge rm all` run `remove_kernel` for all file names in $PWD,
  this will normally harmless except when efibootmgr is used and some
  files with special name, let's say "V" "o" "i" "d" in $PWD, then,
  efibootmgr will remove all boot entries.

Fix it by checking for `vmlinu[xz]-*` explicitly.
A sane system shouldn't have that file.

A patch file from https://github.com/void-linux/void-packages/pull/20666.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-base-files-vkpurge-empty-boot-20666.patch --]
[-- Type: text/x-diff, Size: 1639 bytes --]

From b866dab155e4657b947502b8153ea96e4602afb9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Sun, 5 Apr 2020 13:33:50 +0700
Subject: [PATCH] base-files: vkpurge: fix for empty /boot

On system with empty /boot (example: /boot on external device and not
mounted:
* `vkpurge list` reports `*`, which is incorrect, and
* `vkpurge rm all` run `remove_kernel` for all file names in $PWD,
  this will normally harmless except when efibootmgr is used and some
  files with special name, let's say "V" "o" "i" "d" in $PWD, then,
  efibootmgr will remove all boot entries.

Fix it by checking for `vmlinu[xz]-*` explicitly.
A sane system shouldn't have that file.
---
 srcpkgs/base-files/files/vkpurge | 1 +
 srcpkgs/base-files/template      | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/base-files/files/vkpurge b/srcpkgs/base-files/files/vkpurge
index 97fc88fa635..92098ec736e 100644
--- a/srcpkgs/base-files/files/vkpurge
+++ b/srcpkgs/base-files/files/vkpurge
@@ -29,6 +29,7 @@ list_kernels() {
 			kver=${k##*-}
 			case "$kver" in
 				"$running") ;;
+				"*") ;; # /boot isn't mounted -> no vmlinu[xz]
 				$pattern) printf "%s\n" "$kver" ;;
 			esac
 		done
diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template
index a54f2391c1a..9946595366d 100644
--- a/srcpkgs/base-files/template
+++ b/srcpkgs/base-files/template
@@ -1,7 +1,7 @@
 # Template file for 'base-files'
 pkgname=base-files
 version=0.140
-revision=12
+revision=13
 bootstrap=yes
 depends="xbps-triggers"
 short_desc="Void Linux base system files"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Updated] base-files: vkpurge: fix for empty /boot
  2020-04-05  6:42 [PR PATCH] base-files: vkpurge: fix for empty /boot sgn
@ 2020-04-05  9:01 ` sgn
  2020-04-06  7:33 ` [PR PATCH] [Merged]: " xtraeme
  1 sibling, 0 replies; 3+ messages in thread
From: sgn @ 2020-04-05  9:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 824 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages base-files-vkpurge-empty-boot
https://github.com/void-linux/void-packages/pull/20666

base-files: vkpurge: fix for empty /boot
On system with empty /boot (example: /boot on external device and not
mounted:
* `vkpurge list` reports `*`, which is incorrect, and
* `vkpurge rm all` run `remove_kernel` for all file names in $PWD,
  this will normally harmless except when efibootmgr is used and some
  files with special name, let's say "V" "o" "i" "d" in $PWD, then,
  efibootmgr will remove all boot entries.

Fix it by checking for `vmlinu[xz]-*` explicitly.
A sane system shouldn't have that file.

A patch file from https://github.com/void-linux/void-packages/pull/20666.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-base-files-vkpurge-empty-boot-20666.patch --]
[-- Type: text/x-diff, Size: 1656 bytes --]

From e377a81dfdad5922d4dc6fc4f551b40593e34dd7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Sun, 5 Apr 2020 13:33:50 +0700
Subject: [PATCH] base-files: vkpurge: fix for empty /boot

On system with empty /boot (example: /boot on external device and not
mounted:
* `vkpurge list` reports `*`, which is incorrect, and
* `vkpurge rm all` run `remove_kernel` for all file names in $PWD,
  this will normally harmless except when efibootmgr is used and some
  files with special name, let's say "V" "o" "i" "d" in $PWD, then,
  efibootmgr will remove all boot entries.

Fix it by checking for `vmlinu[xz]-*` explicitly.
A sane system shouldn't have that file.
---
 srcpkgs/base-files/files/vkpurge | 1 +
 srcpkgs/base-files/template      | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/base-files/files/vkpurge b/srcpkgs/base-files/files/vkpurge
index 97fc88fa635..92098ec736e 100644
--- a/srcpkgs/base-files/files/vkpurge
+++ b/srcpkgs/base-files/files/vkpurge
@@ -29,6 +29,7 @@ list_kernels() {
 			kver=${k##*-}
 			case "$kver" in
 				"$running") ;;
+				"*") ;; # /boot isn't mounted -> no vmlinu[xz]
 				$pattern) printf "%s\n" "$kver" ;;
 			esac
 		done
diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template
index a54f2391c1a..d608bc81f57 100644
--- a/srcpkgs/base-files/template
+++ b/srcpkgs/base-files/template
@@ -1,7 +1,7 @@
 # Template file for 'base-files'
 pkgname=base-files
-version=0.140
-revision=12
+version=0.141
+revision=1
 bootstrap=yes
 depends="xbps-triggers"
 short_desc="Void Linux base system files"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Merged]: base-files: vkpurge: fix for empty /boot
  2020-04-05  6:42 [PR PATCH] base-files: vkpurge: fix for empty /boot sgn
  2020-04-05  9:01 ` [PR PATCH] [Updated] " sgn
@ 2020-04-06  7:33 ` xtraeme
  1 sibling, 0 replies; 3+ messages in thread
From: xtraeme @ 2020-04-06  7:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

There's a merged pull request on the void-packages repository

base-files: vkpurge: fix for empty /boot
https://github.com/void-linux/void-packages/pull/20666

Description:
On system with empty /boot (example: /boot on external device and not
mounted:
* `vkpurge list` reports `*`, which is incorrect, and
* `vkpurge rm all` run `remove_kernel` for all file names in $PWD,
  this will normally harmless except when efibootmgr is used and some
  files with special name, let's say "V" "o" "i" "d" in $PWD, then,
  efibootmgr will remove all boot entries.

Fix it by checking for `vmlinu[xz]-*` explicitly.
A sane system shouldn't have that file.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-06  7:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-05  6:42 [PR PATCH] base-files: vkpurge: fix for empty /boot sgn
2020-04-05  9:01 ` [PR PATCH] [Updated] " sgn
2020-04-06  7:33 ` [PR PATCH] [Merged]: " xtraeme

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).