netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2 v2] Makefile: use /usr/share/iproute2 for config files
@ 2023-11-15 17:25 Andrea Claudi
  2023-11-15 17:39 ` Luca Boccassi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrea Claudi @ 2023-11-15 17:25 UTC (permalink / raw)
  To: netdev; +Cc: Stephen Hemminger, David Ahern, Luca Boccassi

According to FHS:

"/usr/lib includes object files and libraries. On some systems, it may
also include internal binaries that are not intended to be executed
directly by users or shell scripts."

A better directory to store config files is /usr/share:

"The /usr/share hierarchy is for all read-only architecture independent
data files.

This hierarchy is intended to be shareable among all architecture
platforms of a given OS; thus, for example, a site with i386, Alpha, and
PPC platforms might maintain a single /usr/share directory that is
centrally-mounted."

Accordingly, move configuration files to $(DATADIR)/iproute2.

Fixes: 946753a4459b ("Makefile: ensure CONF_USR_DIR honours the libdir config")
Reported-by: Luca Boccassi <luca.boccassi@gmail.com>
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
---

v2:
- Rebased on commit deb66acabe44, changed commit message

 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index a24844cf..8024d45e 100644
--- a/Makefile
+++ b/Makefile
@@ -16,12 +16,12 @@ endif
 
 PREFIX?=/usr
 SBINDIR?=/sbin
-CONF_ETC_DIR?=/etc/iproute2
-CONF_USR_DIR?=$(PREFIX)/lib/iproute2
 NETNS_RUN_DIR?=/var/run/netns
 NETNS_ETC_DIR?=/etc/netns
 DATADIR?=$(PREFIX)/share
 HDRDIR?=$(PREFIX)/include/iproute2
+CONF_ETC_DIR?=/etc/iproute2
+CONF_USR_DIR?=$(DATADIR)/iproute2
 DOCDIR?=$(DATADIR)/doc/iproute2
 MANDIR?=$(DATADIR)/man
 ARPDDIR?=/var/lib/arpd
-- 
2.41.0


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

* Re: [PATCH iproute2 v2] Makefile: use /usr/share/iproute2 for config files
  2023-11-15 17:25 [PATCH iproute2 v2] Makefile: use /usr/share/iproute2 for config files Andrea Claudi
@ 2023-11-15 17:39 ` Luca Boccassi
  2023-11-16 14:14 ` Simon Horman
  2023-11-17 17:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Luca Boccassi @ 2023-11-15 17:39 UTC (permalink / raw)
  To: Andrea Claudi; +Cc: netdev, Stephen Hemminger, David Ahern

On Wed, 15 Nov 2023 at 17:25, Andrea Claudi <aclaudi@redhat.com> wrote:
>
> According to FHS:
>
> "/usr/lib includes object files and libraries. On some systems, it may
> also include internal binaries that are not intended to be executed
> directly by users or shell scripts."
>
> A better directory to store config files is /usr/share:
>
> "The /usr/share hierarchy is for all read-only architecture independent
> data files.
>
> This hierarchy is intended to be shareable among all architecture
> platforms of a given OS; thus, for example, a site with i386, Alpha, and
> PPC platforms might maintain a single /usr/share directory that is
> centrally-mounted."
>
> Accordingly, move configuration files to $(DATADIR)/iproute2.
>
> Fixes: 946753a4459b ("Makefile: ensure CONF_USR_DIR honours the libdir config")
> Reported-by: Luca Boccassi <luca.boccassi@gmail.com>
> Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
> ---
>
> v2:
> - Rebased on commit deb66acabe44, changed commit message
>
>  Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index a24844cf..8024d45e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -16,12 +16,12 @@ endif
>
>  PREFIX?=/usr
>  SBINDIR?=/sbin
> -CONF_ETC_DIR?=/etc/iproute2
> -CONF_USR_DIR?=$(PREFIX)/lib/iproute2
>  NETNS_RUN_DIR?=/var/run/netns
>  NETNS_ETC_DIR?=/etc/netns
>  DATADIR?=$(PREFIX)/share
>  HDRDIR?=$(PREFIX)/include/iproute2
> +CONF_ETC_DIR?=/etc/iproute2
> +CONF_USR_DIR?=$(DATADIR)/iproute2
>  DOCDIR?=$(DATADIR)/doc/iproute2
>  MANDIR?=$(DATADIR)/man
>  ARPDDIR?=/var/lib/arpd

Acked-by: Luca Boccassi <bluca@debian.org>

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

* Re: [PATCH iproute2 v2] Makefile: use /usr/share/iproute2 for config files
  2023-11-15 17:25 [PATCH iproute2 v2] Makefile: use /usr/share/iproute2 for config files Andrea Claudi
  2023-11-15 17:39 ` Luca Boccassi
@ 2023-11-16 14:14 ` Simon Horman
  2023-11-17 17:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2023-11-16 14:14 UTC (permalink / raw)
  To: Andrea Claudi; +Cc: netdev, Stephen Hemminger, David Ahern, Luca Boccassi

On Wed, Nov 15, 2023 at 06:25:35PM +0100, Andrea Claudi wrote:
> According to FHS:
> 
> "/usr/lib includes object files and libraries. On some systems, it may
> also include internal binaries that are not intended to be executed
> directly by users or shell scripts."
> 
> A better directory to store config files is /usr/share:
> 
> "The /usr/share hierarchy is for all read-only architecture independent
> data files.
> 
> This hierarchy is intended to be shareable among all architecture
> platforms of a given OS; thus, for example, a site with i386, Alpha, and
> PPC platforms might maintain a single /usr/share directory that is
> centrally-mounted."
> 
> Accordingly, move configuration files to $(DATADIR)/iproute2.
> 
> Fixes: 946753a4459b ("Makefile: ensure CONF_USR_DIR honours the libdir config")
> Reported-by: Luca Boccassi <luca.boccassi@gmail.com>
> Signed-off-by: Andrea Claudi <aclaudi@redhat.com>

Reviewed-by: Simon Horman <horms@kernel.org>


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

* Re: [PATCH iproute2 v2] Makefile: use /usr/share/iproute2 for config files
  2023-11-15 17:25 [PATCH iproute2 v2] Makefile: use /usr/share/iproute2 for config files Andrea Claudi
  2023-11-15 17:39 ` Luca Boccassi
  2023-11-16 14:14 ` Simon Horman
@ 2023-11-17 17:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-11-17 17:20 UTC (permalink / raw)
  To: Andrea Claudi; +Cc: netdev, stephen, dsahern, luca.boccassi

Hello:

This patch was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:

On Wed, 15 Nov 2023 18:25:35 +0100 you wrote:
> According to FHS:
> 
> "/usr/lib includes object files and libraries. On some systems, it may
> also include internal binaries that are not intended to be executed
> directly by users or shell scripts."
> 
> A better directory to store config files is /usr/share:
> 
> [...]

Here is the summary with links:
  - [iproute2,v2] Makefile: use /usr/share/iproute2 for config files
    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=962692356a1c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2023-11-17 17:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-15 17:25 [PATCH iproute2 v2] Makefile: use /usr/share/iproute2 for config files Andrea Claudi
2023-11-15 17:39 ` Luca Boccassi
2023-11-16 14:14 ` Simon Horman
2023-11-17 17:20 ` patchwork-bot+netdevbpf

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