Re: [PATCH 06/44] kpartx.rules: use @BINDIR@ to locate kpartx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 09, 2024 at 11:38:57PM +0200, Martin Wilck wrote:
> The path for kpartx should match the installed binary.
> 
> Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
> ---
>  .gitignore                               | 1 +
>  kpartx/Makefile                          | 4 ++--
>  kpartx/{kpartx.rules => kpartx.rules.in} | 2 +-
>  3 files changed, 4 insertions(+), 3 deletions(-)
>  rename kpartx/{kpartx.rules => kpartx.rules.in} (96%)
> 
> diff --git a/.gitignore b/.gitignore
> index 049ffe8..355ddbb 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -12,6 +12,7 @@ config.mk
>  cscope.files
>  cscope.out
>  kpartx/kpartx
> +kpartx/kpartx.rules
>  multipath/multipath
>  multipath/multipath.8
>  multipath/multipath.conf.5
> diff --git a/kpartx/Makefile b/kpartx/Makefile
> index 7720a74..0d4c798 100644
> --- a/kpartx/Makefile
> +++ b/kpartx/Makefile

Shouldn't we have

all: $(EXEC) kpartx.rules

so that kpartx.rules gets create when running "make", like happens in the
other makefiles?

-Ben

> @@ -19,7 +19,7 @@ $(EXEC): $(OBJS)
>  	@echo building $@ because of $?
>  	$(Q)$(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS)
>  
> -install: $(EXEC) $(EXEC).8
> +install: $(EXEC) $(EXEC).8 kpartx.rules
>  	$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
>  	$(Q)$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
>  	$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir)
> @@ -41,7 +41,7 @@ uninstall:
>  	$(Q)$(RM) $(DESTDIR)$(libudevdir)/rules.d/68-del-part-nodes.rules
>  
>  clean: dep_clean
> -	$(Q)$(RM) core *.o $(EXEC)
> +	$(Q)$(RM) core *.o $(EXEC) kpartx.rules
>  
>  include $(wildcard $(OBJS:.o=.d))
>  
> diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules.in
> similarity index 96%
> rename from kpartx/kpartx.rules
> rename to kpartx/kpartx.rules.in
> index 8dd3369..9d87960 100644
> --- a/kpartx/kpartx.rules
> +++ b/kpartx/kpartx.rules.in
> @@ -39,6 +39,6 @@ LABEL="mpath_kpartx_end"
>  GOTO="kpartx_end"
>  
>  LABEL="run_kpartx"
> -RUN+="/sbin/kpartx -un -p -part /dev/$name"
> +RUN+="@BINDIR@/kpartx -un -p -part /dev/$name"
>  
>  LABEL="kpartx_end"
> -- 
> 2.45.2





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux