* [pve-devel] [PATCH cluster] sysctl snippet: move to /usr/lib and prefix with 10-
@ 2021-11-11 15:42 Stoiko Ivanov
2021-11-11 16:18 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Stoiko Ivanov @ 2021-11-11 15:42 UTC (permalink / raw)
To: pve-devel
following best-practices according to `sysctl.d(5)`:
* Packages should install their configuration files in /usr/lib/ ...
* It is recommended to prefix all filenames with a two-digit number
and a dash ...
the conffile removal is inspired by how it was done in `procps` (one
of the few packages in the debian repository, which did this
transition) and by following `dpkg-maintscript-helper(1)` and
`deb-conffiles(5)` (the former recommending the latter)
The choice of 10- as prefix is due to pve-container shipping its
snippet with that prefix already. other packages use higher numbers
(e.g. systemd - 50-)
Tested on 2 VMs (one with modifications, the other without) - worked
as advertised (the modified file was kept as
/etc/sysctl.d/pve.conf.dpkg-old and the upgrade notified me of the
change)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
debian/conffiles | 1 +
debian/pve-cluster.install | 2 +-
debian/sysctl.d/{pve.conf => 10-pve.conf} | 0
3 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 debian/conffiles
rename debian/sysctl.d/{pve.conf => 10-pve.conf} (100%)
diff --git a/debian/conffiles b/debian/conffiles
new file mode 100644
index 0000000..ef0558e
--- /dev/null
+++ b/debian/conffiles
@@ -0,0 +1 @@
+remove-on-upgrade /etc/sysctl.d/pve.conf
diff --git a/debian/pve-cluster.install b/debian/pve-cluster.install
index 407972a..f66cd06 100644
--- a/debian/pve-cluster.install
+++ b/debian/pve-cluster.install
@@ -1,4 +1,4 @@
-debian/sysctl.d/pve.conf etc/sysctl.d
+debian/sysctl.d/10-pve.conf usr/lib/sysctl.d
usr/bin/create_pmxcfs_db
usr/bin/pmxcfs
usr/lib/
diff --git a/debian/sysctl.d/pve.conf b/debian/sysctl.d/10-pve.conf
similarity index 100%
rename from debian/sysctl.d/pve.conf
rename to debian/sysctl.d/10-pve.conf
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH cluster] sysctl snippet: move to /usr/lib and prefix with 10-
2021-11-11 15:42 [pve-devel] [PATCH cluster] sysctl snippet: move to /usr/lib and prefix with 10- Stoiko Ivanov
@ 2021-11-11 16:18 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-11-11 16:18 UTC (permalink / raw)
To: Proxmox VE development discussion, Stoiko Ivanov
On 11.11.21 16:42, Stoiko Ivanov wrote:
> following best-practices according to `sysctl.d(5)`:
> * Packages should install their configuration files in /usr/lib/ ...
> * It is recommended to prefix all filenames with a two-digit number
> and a dash ...
>
> the conffile removal is inspired by how it was done in `procps` (one
> of the few packages in the debian repository, which did this
> transition) and by following `dpkg-maintscript-helper(1)` and
> `deb-conffiles(5)` (the former recommending the latter)
>
> The choice of 10- as prefix is due to pve-container shipping its
> snippet with that prefix already. other packages use higher numbers
> (e.g. systemd - 50-)
>
> Tested on 2 VMs (one with modifications, the other without) - worked
> as advertised (the modified file was kept as
> /etc/sysctl.d/pve.conf.dpkg-old and the upgrade notified me of the
> change)
>
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> debian/conffiles | 1 +
> debian/pve-cluster.install | 2 +-
> debian/sysctl.d/{pve.conf => 10-pve.conf} | 0
> 3 files changed, 2 insertions(+), 1 deletion(-)
> create mode 100644 debian/conffiles
> rename debian/sysctl.d/{pve.conf => 10-pve.conf} (100%)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-11 16:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 15:42 [pve-devel] [PATCH cluster] sysctl snippet: move to /usr/lib and prefix with 10- Stoiko Ivanov
2021-11-11 16:18 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox