kexec.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Guilherme G. Piccoli <gpiccoli@igalia.com>
To: kexec@lists.infradead.org
Subject: [PATCH] Makefile: Avoid installing files in /etc
Date: Wed,  4 May 2022 13:57:03 -0300	[thread overview]
Message-ID: <20220504165703.747333-1-gpiccoli@igalia.com> (raw)

Some Linux distros rely on having files in /etc (Debian, et al.),
others in *not* having them in such directory (like Arch Linux).
Fact is that the former distros have no issues in installing files
elsewhere, whereas Arch has issues in installing files on /etc,
specially if such files are present there when user try to reinstall
the packages - it fails. Arch packaging doesn't try to be smart as dpkg
for example (that compares config files to determine if user changed that).

With all of that said, this patch moves the sample conf file to
/usr/share, a move that is well-tolerated in all distros and shouldn't
cause regressions in packaging. Also, if some Linux distribution likes
the idea of adding files in /etc, they can tune it in their packaging
configuration scripts for makedumpfile, but we shouldn't have that
as default in the Makefile. Notice that this patch intentionally skips
the change for the .spec file, which aims specific distros, by creating
RPM packages.

Cc: Coiby Xu <coxu@redhat.com>
Cc: Kazuhito Hagio <k-hagio-ab@nec.com>
Cc: Leonidas Spyropoulos <artafinde@archlinux.org>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index cc6b0120aa7d..014be8110836 100644
--- a/Makefile
+++ b/Makefile
@@ -130,6 +130,6 @@ install:
 	install -m 755 -t ${DESTDIR}/usr/sbin makedumpfile $(VPATH)makedumpfile-R.pl
 	install -m 644 -t ${DESTDIR}/usr/share/man/man8 makedumpfile.8
 	install -m 644 -t ${DESTDIR}/usr/share/man/man5 makedumpfile.conf.5
-	install -m 644 -D $(VPATH)makedumpfile.conf ${DESTDIR}/etc/makedumpfile.conf.sample
 	mkdir -p ${DESTDIR}/usr/share/makedumpfile-${VERSION}/eppic_scripts
+	install -m 644 -D $(VPATH)makedumpfile.conf ${DESTDIR}/usr/share/makedumpfile-${VERSION}/makedumpfile.conf.sample
 	install -m 644 -t ${DESTDIR}/usr/share/makedumpfile-${VERSION}/eppic_scripts/ $(VPATH)eppic_scripts/*
-- 
2.36.0



             reply	other threads:[~2022-05-04 16:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 16:57 Guilherme G. Piccoli [this message]
2022-05-11  1:50 ` [PATCH] Makefile: Avoid installing files in /etc HAGIO KAZUHITO =?unknown-8bit?b?6JCp5bC+IOS4gOS7gQ==?=
2022-05-11 11:40   ` Guilherme G. Piccoli
2022-05-12  0:55     ` HAGIO KAZUHITO =?unknown-8bit?b?6JCp5bC+IOS4gOS7gQ==?=

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220504165703.747333-1-gpiccoli@igalia.com \
    --to=gpiccoli@igalia.com \
    --cc=kexec@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).