linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Thomas Orgis <thomas-forum@orgis.org>
To: linux-lvm@redhat.com
Subject: [linux-lvm] [PATCH] fix link to dmsetup.static when /sbin and /usr/sbin are not the same
Date: Sun, 4 Dec 2016 12:50:40 +0100	[thread overview]
Message-ID: <20161204125040.1fbe0996@sturbolzen> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 913 bytes --]

Hi,

LVM2.2.02.168 (and earlier) has that in Makefile.in

install_dmsetup_dynamic: dmsetup
	$(INSTALL_PROGRAM) -D $< $(sbindir)/$(<F)
	$(LN_S) -f $(<F) $(sbindir)/dmstats

install_dmsetup_static: dmsetup.static
	$(INSTALL_PROGRAM) -D $< $(staticdir)/$(<F)
	$(LN_S) -f $(<F) $(sbindir)/dmstats

This results in

lrwxrwxrwx 1 root root 14  4. Dez 12:33 /sbin/dmstats -> dmsetup.static

… while the target for that link is

-r-xr-xr-x 1 root root 1252120  4. Dez 12:33 /usr/sbin/dmsetup.static

I suppose the second link command should create $(staticdir)/dmstats.
Regardless of whether your /sbin is a link to /usr/sbin or the other
way round, this seems more proper. I am not sure if we want to enforce
the link pointing always to the static binary if they end up in the
same directory.

Anyhow, I attached the trivial patch that avoids a broken symlink.


Alrighty then,

Thomas

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: lvm-static-dmstats.patch --]
[-- Type: text/x-patch, Size: 401 bytes --]

--- LVM2.2.02.168/tools/Makefile.in.orig	2016-12-04 12:37:11.181407587 +0100
+++ LVM2.2.02.168/tools/Makefile.in	2016-12-04 12:37:16.251407927 +0100
@@ -209,7 +209,7 @@
 
 install_dmsetup_static: dmsetup.static
 	$(INSTALL_PROGRAM) -D $< $(staticdir)/$(<F)
-	$(LN_S) -f $(<F) $(sbindir)/dmstats
+	$(LN_S) -f $(<F) $(staticdir)/dmstats
 
 install_device-mapper: $(INSTALL_DMSETUP_TARGETS)
 

[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

                 reply	other threads:[~2016-12-04 13:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20161204125040.1fbe0996@sturbolzen \
    --to=thomas-forum@orgis.org \
    --cc=linux-lvm@redhat.com \
    /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).