Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] vkpurge now deletes initramfs and /lib/modules
@ 2021-08-14 19:32 kingpingu
  2021-08-14 19:41 ` abenson
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: kingpingu @ 2021-08-14 19:32 UTC (permalink / raw)
  To: ml

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

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

https://github.com/kingpingu/void-packages master
https://github.com/void-linux/void-packages/pull/32493

vkpurge now deletes initramfs and /lib/modules
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32493.patch --]
[-- Type: text/x-diff, Size: 898 bytes --]

From eacaf1cc318557ef7ab6ad3f7e87def3f9fd32ea Mon Sep 17 00:00:00 2001
From: kingpingu <kylerjgriffith@gmail.com>
Date: Sat, 14 Aug 2021 12:32:57 -0700
Subject: [PATCH] vkpurge now deletes initramfs and /lib/modules

---
 srcpkgs/base-files/files/vkpurge | 2 ++
 1 file changed, 2 insertions(+)
 mode change 100644 => 100755 srcpkgs/base-files/files/vkpurge

diff --git a/srcpkgs/base-files/files/vkpurge b/srcpkgs/base-files/files/vkpurge
old mode 100644
new mode 100755
index 422dcb65840d..db4d8d54dad5
--- a/srcpkgs/base-files/files/vkpurge
+++ b/srcpkgs/base-files/files/vkpurge
@@ -56,8 +56,10 @@ remove_kernel() {
 
 	for f in \
 		/boot/config-"${rmkver}" \
+		/boot/initramfs-"${rmkver}".img \
 		/boot/System.map-"${rmkver}" \
 		/boot/vmlinu[xz]-"${rmkver}" \
+		/lib/modules/"${rmkver}"; \
 		/usr/lib/modules/"${rmkver}"; do
 		[ -e "$f" ] || continue
 		printf "Removing %s...\n" "$f"

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

* Re: vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
@ 2021-08-14 19:41 ` abenson
  2021-08-14 19:42 ` [PR PATCH] [Updated] " kingpingu
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: abenson @ 2021-08-14 19:41 UTC (permalink / raw)
  To: ml

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

New comment by abenson on void-packages repository

https://github.com/void-linux/void-packages/pull/32493#issuecomment-898950850

Comment:
Change the commit to  `base-files: vkpurge deletes initramfs and /lib/modules`

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

* Re: [PR PATCH] [Updated] vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
  2021-08-14 19:41 ` abenson
@ 2021-08-14 19:42 ` kingpingu
  2021-08-14 19:48 ` kingpingu
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kingpingu @ 2021-08-14 19:42 UTC (permalink / raw)
  To: ml

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

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

https://github.com/kingpingu/void-packages master
https://github.com/void-linux/void-packages/pull/32493

vkpurge now deletes initramfs and /lib/modules
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32493.patch --]
[-- Type: text/x-diff, Size: 1715 bytes --]

From eacaf1cc318557ef7ab6ad3f7e87def3f9fd32ea Mon Sep 17 00:00:00 2001
From: kingpingu <kylerjgriffith@gmail.com>
Date: Sat, 14 Aug 2021 12:32:57 -0700
Subject: [PATCH 1/2] vkpurge now deletes initramfs and /lib/modules

---
 srcpkgs/base-files/files/vkpurge | 2 ++
 1 file changed, 2 insertions(+)
 mode change 100644 => 100755 srcpkgs/base-files/files/vkpurge

diff --git a/srcpkgs/base-files/files/vkpurge b/srcpkgs/base-files/files/vkpurge
old mode 100644
new mode 100755
index 422dcb65840d..db4d8d54dad5
--- a/srcpkgs/base-files/files/vkpurge
+++ b/srcpkgs/base-files/files/vkpurge
@@ -56,8 +56,10 @@ remove_kernel() {
 
 	for f in \
 		/boot/config-"${rmkver}" \
+		/boot/initramfs-"${rmkver}".img \
 		/boot/System.map-"${rmkver}" \
 		/boot/vmlinu[xz]-"${rmkver}" \
+		/lib/modules/"${rmkver}"; \
 		/usr/lib/modules/"${rmkver}"; do
 		[ -e "$f" ] || continue
 		printf "Removing %s...\n" "$f"

From 321b8791328e9f8e6be3e8d77a29d62147f8a3f1 Mon Sep 17 00:00:00 2001
From: kingpingu <kylerjgriffith@gmail.com>
Date: Sat, 14 Aug 2021 12:32:57 -0700
Subject: [PATCH 2/2] vkpurge now deletes initramfs and /lib/modules

---
 srcpkgs/base-files/files/vkpurge | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/base-files/files/vkpurge b/srcpkgs/base-files/files/vkpurge
index db4d8d54dad5..2eb8f3341000 100755
--- a/srcpkgs/base-files/files/vkpurge
+++ b/srcpkgs/base-files/files/vkpurge
@@ -59,7 +59,7 @@ remove_kernel() {
 		/boot/initramfs-"${rmkver}".img \
 		/boot/System.map-"${rmkver}" \
 		/boot/vmlinu[xz]-"${rmkver}" \
-		/lib/modules/"${rmkver}"; \
+		/lib/modules/"${rmkver}" \
 		/usr/lib/modules/"${rmkver}"; do
 		[ -e "$f" ] || continue
 		printf "Removing %s...\n" "$f"

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

* Re: [PR PATCH] [Updated] vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
  2021-08-14 19:41 ` abenson
  2021-08-14 19:42 ` [PR PATCH] [Updated] " kingpingu
@ 2021-08-14 19:48 ` kingpingu
  2021-08-14 19:51 ` kingpingu
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kingpingu @ 2021-08-14 19:48 UTC (permalink / raw)
  To: ml

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

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

https://github.com/kingpingu/void-packages master
https://github.com/void-linux/void-packages/pull/32493

vkpurge now deletes initramfs and /lib/modules
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32493.patch --]
[-- Type: text/x-diff, Size: 897 bytes --]

From e9e8f846e1c6aa21002427e4146d778f1a67be93 Mon Sep 17 00:00:00 2001
From: kingpingu <kylerjgriffith@gmail.com>
Date: Sat, 14 Aug 2021 12:32:57 -0700
Subject: [PATCH] vkpurge now deletes initramfs and /lib/modules

---
 srcpkgs/base-files/files/vkpurge | 2 ++
 1 file changed, 2 insertions(+)
 mode change 100644 => 100755 srcpkgs/base-files/files/vkpurge

diff --git a/srcpkgs/base-files/files/vkpurge b/srcpkgs/base-files/files/vkpurge
old mode 100644
new mode 100755
index 422dcb65840d..2eb8f3341000
--- a/srcpkgs/base-files/files/vkpurge
+++ b/srcpkgs/base-files/files/vkpurge
@@ -56,8 +56,10 @@ remove_kernel() {
 
 	for f in \
 		/boot/config-"${rmkver}" \
+		/boot/initramfs-"${rmkver}".img \
 		/boot/System.map-"${rmkver}" \
 		/boot/vmlinu[xz]-"${rmkver}" \
+		/lib/modules/"${rmkver}" \
 		/usr/lib/modules/"${rmkver}"; do
 		[ -e "$f" ] || continue
 		printf "Removing %s...\n" "$f"

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

* Re: [PR PATCH] [Updated] vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (2 preceding siblings ...)
  2021-08-14 19:48 ` kingpingu
@ 2021-08-14 19:51 ` kingpingu
  2021-08-14 19:52 ` base-files: " kingpingu
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kingpingu @ 2021-08-14 19:51 UTC (permalink / raw)
  To: ml

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

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

https://github.com/kingpingu/void-packages master
https://github.com/void-linux/void-packages/pull/32493

vkpurge now deletes initramfs and /lib/modules
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32493.patch --]
[-- Type: text/x-diff, Size: 905 bytes --]

From 70c4053bed1de1f5970b8ce6315d632416c4229d Mon Sep 17 00:00:00 2001
From: kingpingu <kylerjgriffith@gmail.com>
Date: Sat, 14 Aug 2021 12:32:57 -0700
Subject: [PATCH] base-files: vkpurge deletes initramfs and /lib/modules

---
 srcpkgs/base-files/files/vkpurge | 2 ++
 1 file changed, 2 insertions(+)
 mode change 100644 => 100755 srcpkgs/base-files/files/vkpurge

diff --git a/srcpkgs/base-files/files/vkpurge b/srcpkgs/base-files/files/vkpurge
old mode 100644
new mode 100755
index 422dcb65840d..2eb8f3341000
--- a/srcpkgs/base-files/files/vkpurge
+++ b/srcpkgs/base-files/files/vkpurge
@@ -56,8 +56,10 @@ remove_kernel() {
 
 	for f in \
 		/boot/config-"${rmkver}" \
+		/boot/initramfs-"${rmkver}".img \
 		/boot/System.map-"${rmkver}" \
 		/boot/vmlinu[xz]-"${rmkver}" \
+		/lib/modules/"${rmkver}" \
 		/usr/lib/modules/"${rmkver}"; do
 		[ -e "$f" ] || continue
 		printf "Removing %s...\n" "$f"

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

* Re: base-files: vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (3 preceding siblings ...)
  2021-08-14 19:51 ` kingpingu
@ 2021-08-14 19:52 ` kingpingu
  2021-08-14 20:24 ` Duncaen
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kingpingu @ 2021-08-14 19:52 UTC (permalink / raw)
  To: ml

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

New comment by kingpingu on void-packages repository

https://github.com/void-linux/void-packages/pull/32493#issuecomment-898952033

Comment:
Changed commit message to: `base-files: vkpurge deletes initramfs and /lib/modules`

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

* Re: base-files: vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (4 preceding siblings ...)
  2021-08-14 19:52 ` base-files: " kingpingu
@ 2021-08-14 20:24 ` Duncaen
  2021-08-14 21:30 ` kingpingu
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Duncaen @ 2021-08-14 20:24 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/32493#issuecomment-898955154

Comment:
Why `/lib/modules`, why does it need to remove the initramfs, isn't that the hooks responsiblity?

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

* Re: base-files: vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (5 preceding siblings ...)
  2021-08-14 20:24 ` Duncaen
@ 2021-08-14 21:30 ` kingpingu
  2021-08-14 21:40 ` Duncaen
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kingpingu @ 2021-08-14 21:30 UTC (permalink / raw)
  To: ml

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

New comment by kingpingu on void-packages repository

https://github.com/void-linux/void-packages/pull/32493#issuecomment-898960980

Comment:
@Duncaen It might make more sense to remove the `/lib/modules/"${rmkver}"` dir in the kernel pre-remove hook, although we already have precedent in vkpurge with `/usr/lib/modules/"${rmkver}"`. I don't believe initramfs is the hook's responsibility, vkpurge already deletes every other resource in `/boot`, why should initramfs be exempt?

I'm not an expert on ownership, I'll defer to your judgement if you disagree strongly. Let me know if you think this is blocking.

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

* Re: base-files: vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (6 preceding siblings ...)
  2021-08-14 21:30 ` kingpingu
@ 2021-08-14 21:40 ` Duncaen
  2021-08-14 21:42 ` Duncaen
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Duncaen @ 2021-08-14 21:40 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/32493#issuecomment-898961775

Comment:
`/lib` is a symlink to `/usr/lib`.

The installed initramfs tool generates the initramfs file and is responsible for it and its name, all other files vkpurge removes come from the kernel packages and have the preserve keyword, they are not generated by a separate mechanism, vkpurge is the tool to cleanup the kernel files and run the kernel hooks, which then remove things the kernel hook generate on install hooks.

dracut already deletes the file in its hook and so does mkinitcpio:
`/etc/kernel.d/post-remove/20-dracut` (https://github.com/void-linux/void-packages/blob/master/srcpkgs/dracut/files/kernel-hook-postrm).

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

* Re: base-files: vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (7 preceding siblings ...)
  2021-08-14 21:40 ` Duncaen
@ 2021-08-14 21:42 ` Duncaen
  2021-08-14 21:44 ` Duncaen
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Duncaen @ 2021-08-14 21:42 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/32493#issuecomment-898961775

Comment:
`/lib` is a symlink to `/usr/lib`.

The installed initramfs tool generates the initramfs file and is responsible for it and its name, all other files vkpurge removes come from the kernel packages and have the preserve keyword, they are not generated by a separate mechanism.

vkpurge is the tool to cleanup the files provided by the kernel and kernel headers packages and run the kernel remove hooks, kernel remove hook delete files they create in kernel install hooks.

dracut already deletes the file in its hook and so does mkinitcpio:
`/etc/kernel.d/post-remove/20-dracut` (https://github.com/void-linux/void-packages/blob/master/srcpkgs/dracut/files/kernel-hook-postrm).

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

* Re: base-files: vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (8 preceding siblings ...)
  2021-08-14 21:42 ` Duncaen
@ 2021-08-14 21:44 ` Duncaen
  2021-08-14 21:45 ` Duncaen
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Duncaen @ 2021-08-14 21:44 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/32493#issuecomment-898961775

Comment:
`/lib` is a symlink to `/usr/lib`.

The installed initramfs tool generates the initramfs file and therefor is responsible for it and its name.
This happens in the kernel.d `{pre,post}-install` hooks, it makes a lot of sense to also use the `{pre,post}-remove` hooks to remove those fails again.

vkpurge is the tool to cleanup the files provided by the kernel and kernel headers packages and run the kernel remove hooks, not guess what files the kernel hooks could have created, for what its worth, they could generate initramfs-${version}.cpio or add a compression suffix or whatever.

dracut already deletes the file in its hook and so does mkinitcpio:
`/etc/kernel.d/post-remove/20-dracut` (https://github.com/void-linux/void-packages/blob/master/srcpkgs/dracut/files/kernel-hook-postrm).

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

* Re: base-files: vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (9 preceding siblings ...)
  2021-08-14 21:44 ` Duncaen
@ 2021-08-14 21:45 ` Duncaen
  2021-08-14 21:47 ` Duncaen
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Duncaen @ 2021-08-14 21:45 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/32493#issuecomment-898961775

Comment:
`/lib` is a symlink to `/usr/lib`.

The installed initramfs tool generates the initramfs file and therefor is responsible for it and its name.
This happens in the kernel.d `{pre,post}-install` hooks, it makes a lot of sense to also use the `{pre,post}-remove` hooks to remove those fails again.

vkpurge is the tool to cleanup the files provided by the kernel and kernel headers packages and run the kernel remove hooks, not guess what files the kernel hooks could have created, for what its worth, they could generate `initramfs-${version}.cpio` or add a compression suffix.

dracut already deletes the file in its hook and so does mkinitcpio:
`/etc/kernel.d/post-remove/20-dracut` (https://github.com/void-linux/void-packages/blob/master/srcpkgs/dracut/files/kernel-hook-postrm).

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

* Re: base-files: vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (10 preceding siblings ...)
  2021-08-14 21:45 ` Duncaen
@ 2021-08-14 21:47 ` Duncaen
  2021-08-14 22:38 ` [PR PATCH] [Updated] " kingpingu
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Duncaen @ 2021-08-14 21:47 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/32493#issuecomment-898961775

Comment:
`/lib` is a symlink to `/usr/lib`.

The installed initramfs tool generates the initramfs file and therefor is responsible for it and its name (they could generate `initramfs-${version}.cpio` or add a compression suffix).
This happens in the kernel.d `{pre,post}-install` hooks, it makes a lot of sense to also use the `{pre,post}-remove` hooks to remove those fails again.

dracut already deletes the file in its hook and so does mkinitcpio:
`/etc/kernel.d/post-remove/20-dracut` (https://github.com/void-linux/void-packages/blob/master/srcpkgs/dracut/files/kernel-hook-postrm).

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

* Re: [PR PATCH] [Updated] base-files: vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (11 preceding siblings ...)
  2021-08-14 21:47 ` Duncaen
@ 2021-08-14 22:38 ` kingpingu
  2021-08-14 22:39 ` kingpingu
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kingpingu @ 2021-08-14 22:38 UTC (permalink / raw)
  To: ml

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

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

https://github.com/kingpingu/void-packages master
https://github.com/void-linux/void-packages/pull/32493

base-files: vkpurge now deletes initramfs and /lib/modules
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32493.patch --]
[-- Type: text/x-diff, Size: 2304 bytes --]

From 70c4053bed1de1f5970b8ce6315d632416c4229d Mon Sep 17 00:00:00 2001
From: kingpingu <kylerjgriffith@gmail.com>
Date: Sat, 14 Aug 2021 12:32:57 -0700
Subject: [PATCH 1/2] base-files: vkpurge deletes initramfs and /lib/modules

---
 srcpkgs/base-files/files/vkpurge | 2 ++
 1 file changed, 2 insertions(+)
 mode change 100644 => 100755 srcpkgs/base-files/files/vkpurge

diff --git a/srcpkgs/base-files/files/vkpurge b/srcpkgs/base-files/files/vkpurge
old mode 100644
new mode 100755
index 422dcb65840d..2eb8f3341000
--- a/srcpkgs/base-files/files/vkpurge
+++ b/srcpkgs/base-files/files/vkpurge
@@ -56,8 +56,10 @@ remove_kernel() {
 
 	for f in \
 		/boot/config-"${rmkver}" \
+		/boot/initramfs-"${rmkver}".img \
 		/boot/System.map-"${rmkver}" \
 		/boot/vmlinu[xz]-"${rmkver}" \
+		/lib/modules/"${rmkver}" \
 		/usr/lib/modules/"${rmkver}"; do
 		[ -e "$f" ] || continue
 		printf "Removing %s...\n" "$f"

From d691361310b0f74df6813e3ee96b05c16f41170e Mon Sep 17 00:00:00 2001
From: kingpingu <kylerjgriffith@gmail.com>
Date: Sat, 14 Aug 2021 15:35:50 -0700
Subject: [PATCH 2/2] kernel.d: preremove dkms hook now deletes /lib/modules

---
 srcpkgs/base-files/files/vkpurge       | 2 --
 srcpkgs/dkms/files/kernel.d/dkms.prerm | 4 +---
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/srcpkgs/base-files/files/vkpurge b/srcpkgs/base-files/files/vkpurge
index 2eb8f3341000..422dcb65840d 100755
--- a/srcpkgs/base-files/files/vkpurge
+++ b/srcpkgs/base-files/files/vkpurge
@@ -56,10 +56,8 @@ remove_kernel() {
 
 	for f in \
 		/boot/config-"${rmkver}" \
-		/boot/initramfs-"${rmkver}".img \
 		/boot/System.map-"${rmkver}" \
 		/boot/vmlinu[xz]-"${rmkver}" \
-		/lib/modules/"${rmkver}" \
 		/usr/lib/modules/"${rmkver}"; do
 		[ -e "$f" ] || continue
 		printf "Removing %s...\n" "$f"
diff --git a/srcpkgs/dkms/files/kernel.d/dkms.prerm b/srcpkgs/dkms/files/kernel.d/dkms.prerm
index 155e9734aee2..4c51713a5647 100644
--- a/srcpkgs/dkms/files/kernel.d/dkms.prerm
+++ b/srcpkgs/dkms/files/kernel.d/dkms.prerm
@@ -14,8 +14,6 @@ while read line; do
 done < <(/usr/bin/dkms status -k ${VERSION} 2>/dev/null | grep ": installed")
 fi
 
-rmdir \
-	"/lib/modules/${VERSION}/updates/dkms" \
-	"/lib/modules/${VERSION}/updates" 2>/dev/null
+rm -rf "/lib/modules/${VERSION}" 2>/dev/null
 
 exit 0

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

* Re: [PR PATCH] [Updated] base-files: vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (12 preceding siblings ...)
  2021-08-14 22:38 ` [PR PATCH] [Updated] " kingpingu
@ 2021-08-14 22:39 ` kingpingu
  2021-08-14 22:40 ` kingpingu
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kingpingu @ 2021-08-14 22:39 UTC (permalink / raw)
  To: ml

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

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

https://github.com/kingpingu/void-packages master
https://github.com/void-linux/void-packages/pull/32493

base-files: vkpurge now deletes initramfs and /lib/modules
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32493.patch --]
[-- Type: text/x-diff, Size: 829 bytes --]

From 3d9ed89bb8dbd6c4d08b76ec4aaf5fed37f506ba Mon Sep 17 00:00:00 2001
From: kingpingu <kylerjgriffith@gmail.com>
Date: Sat, 14 Aug 2021 15:35:50 -0700
Subject: [PATCH] kernel.d: preremove dkms hook now deletes /lib/modules

---
 srcpkgs/dkms/files/kernel.d/dkms.prerm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/srcpkgs/dkms/files/kernel.d/dkms.prerm b/srcpkgs/dkms/files/kernel.d/dkms.prerm
index 155e9734aee2..4c51713a5647 100644
--- a/srcpkgs/dkms/files/kernel.d/dkms.prerm
+++ b/srcpkgs/dkms/files/kernel.d/dkms.prerm
@@ -14,8 +14,6 @@ while read line; do
 done < <(/usr/bin/dkms status -k ${VERSION} 2>/dev/null | grep ": installed")
 fi
 
-rmdir \
-	"/lib/modules/${VERSION}/updates/dkms" \
-	"/lib/modules/${VERSION}/updates" 2>/dev/null
+rm -rf "/lib/modules/${VERSION}" 2>/dev/null
 
 exit 0

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

* Re: base-files: vkpurge now deletes initramfs and /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (13 preceding siblings ...)
  2021-08-14 22:39 ` kingpingu
@ 2021-08-14 22:40 ` kingpingu
  2021-08-14 22:49 ` kernel.d: preremove dkms hook now deletes /lib/modules Duncaen
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kingpingu @ 2021-08-14 22:40 UTC (permalink / raw)
  To: ml

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

New comment by kingpingu on void-packages repository

https://github.com/void-linux/void-packages/pull/32493#issuecomment-898967115

Comment:
Thanks for the clarification! It's a mystery why (some) of my initramfs were not being removed with the dracut postrm hook, I'll monitor the next few months and see if it happens again. 

Updated the commit to rm `/lib/modules` during dkms prerm hook.

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

* Re: kernel.d: preremove dkms hook now deletes /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (14 preceding siblings ...)
  2021-08-14 22:40 ` kingpingu
@ 2021-08-14 22:49 ` Duncaen
  2021-08-14 22:54 ` kingpingu
  2021-08-14 22:54 ` [PR PATCH] [Closed]: " kingpingu
  17 siblings, 0 replies; 19+ messages in thread
From: Duncaen @ 2021-08-14 22:49 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/32493#issuecomment-898967728

Comment:
No why this is also completely unnecessary, vkpurge already deletes the directory, it deletes `/usr/lib/modules/${version}`, `/lib` is a symlink to `/usr/lib`, deleting `/usr/lib/modules/$version` and/or `/lib/modules/$version` deletes exactly the same files. 

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

* Re: kernel.d: preremove dkms hook now deletes /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (15 preceding siblings ...)
  2021-08-14 22:49 ` kernel.d: preremove dkms hook now deletes /lib/modules Duncaen
@ 2021-08-14 22:54 ` kingpingu
  2021-08-14 22:54 ` [PR PATCH] [Closed]: " kingpingu
  17 siblings, 0 replies; 19+ messages in thread
From: kingpingu @ 2021-08-14 22:54 UTC (permalink / raw)
  To: ml

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

New comment by kingpingu on void-packages repository

https://github.com/void-linux/void-packages/pull/32493#issuecomment-898968060

Comment:
Ah I see, strange, will investigate why some of my /lib/modules from past unused uninstalled kernels were not deleted as well.

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

* Re: [PR PATCH] [Closed]: kernel.d: preremove dkms hook now deletes /lib/modules
  2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
                   ` (16 preceding siblings ...)
  2021-08-14 22:54 ` kingpingu
@ 2021-08-14 22:54 ` kingpingu
  17 siblings, 0 replies; 19+ messages in thread
From: kingpingu @ 2021-08-14 22:54 UTC (permalink / raw)
  To: ml

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

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

kernel.d: preremove dkms hook now deletes /lib/modules
https://github.com/void-linux/void-packages/pull/32493

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

end of thread, other threads:[~2021-08-14 22:54 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-14 19:32 [PR PATCH] vkpurge now deletes initramfs and /lib/modules kingpingu
2021-08-14 19:41 ` abenson
2021-08-14 19:42 ` [PR PATCH] [Updated] " kingpingu
2021-08-14 19:48 ` kingpingu
2021-08-14 19:51 ` kingpingu
2021-08-14 19:52 ` base-files: " kingpingu
2021-08-14 20:24 ` Duncaen
2021-08-14 21:30 ` kingpingu
2021-08-14 21:40 ` Duncaen
2021-08-14 21:42 ` Duncaen
2021-08-14 21:44 ` Duncaen
2021-08-14 21:45 ` Duncaen
2021-08-14 21:47 ` Duncaen
2021-08-14 22:38 ` [PR PATCH] [Updated] " kingpingu
2021-08-14 22:39 ` kingpingu
2021-08-14 22:40 ` kingpingu
2021-08-14 22:49 ` kernel.d: preremove dkms hook now deletes /lib/modules Duncaen
2021-08-14 22:54 ` kingpingu
2021-08-14 22:54 ` [PR PATCH] [Closed]: " kingpingu

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).