Skip to contentSkip to conversation

0.9.1-beta4 install bug

linux-lvm Steven Lembark 5 participants 9 messages Feb 10, 2001 – Feb 12, 2001

lore
Share & tools
lore
#0 lore raw

tried beta4 since the LVM_DIR_PREFIX replacement may have been fixed.

	./configure --prefix=/opt/lvm/0.9.1 

leaves only the man pages in the prefix dir, exec's still go to /sbin. this is bad news since it will blow off the entire LVM installation the next time i test an install.

checking ./configure --help:

<snip>

Directory and file names:
--prefix=PREFIX install architecture-independent files in
PREFIX

                          [/usr]
  --exec-prefix=EPREFIX   install architecture-dependent files in
EPREFIX
                          [same as prefix]
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  --datadir=DIR           read-only architecture-independent data in DIR

[PREFIX/share]
--sysconfdir=DIR read-only single-machine data in DIR
[PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data in
DIR
[PREFIX/com]
--localstatedir=DIR modifiable single-machine data in DIR
[PREFIX/var]

  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  --includedir=DIR        C header files in DIR [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc in DIR
[/usr/include]
  --infodir=DIR           info documentation in DIR [PREFIX/info]
  --mandir=DIR            man documentation in DIR [PREFIX/man]
  --srcdir=DIR            find the sources in DIR [configure dir or ..]

--program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM
run sed PROGRAM on installed program names

<snip>

so, prefix should set eprefix & friends which should leave the binaries in /opt/lvm/0.9.1/sbin, etc.

any chance this could be fixed for the next beta?

and/or was the LVM_DIR_PREFIX vs. hard-coded "/dev" entrys fixed in this one?

thanx.

Signature · 3 lines
 Steven Lembark                                   2930 W. Palmer St.
                                                 Chicago, IL  60647
 [email protected]                                   800-762-1582
#1 lore raw

Hi,

Quoted 7 lines · * On Sunday, February 11, 2001 at 00:28, Steven Lembark wrote:
        ./configure --prefix=/opt/lvm/0.9.1

leaves only the man pages in the prefix dir, exec's still go to /sbin. this is bad news since it will blow off the entire LVM installation the next time i test an install.

checking ./configure --help:

[..]

Quoted 6 lines

Directory and file names:
--prefix=PREFIX install architecture-independent files in
PREFIX

                          [/usr]

--exec-prefix=EPREFIX install architecture-dependent files in
EPREFIX

[...]

Quoted 2 lines

so, prefix should set eprefix & friends which should leave the binaries in /opt/lvm/0.9.1/sbin, etc.

You have to set --exec-prefix either - --prefix does _not_ modify --exec-prefix as far as i can see.

Adalbert

#2 lore raw
Quoted 8 lines · Adalbert Michelic

Hi,

Quoted 5 lines · * On Sunday, February 11, 2001 at 00:28, Steven Lembark wrote:
        ./configure --prefix=/opt/lvm/0.9.1

leaves only the man pages in the prefix dir, exec's still go to /sbin. this is bad news since it will blow off the entire LVM installation the next time i test an install.

[...]

Quoted 5 lines
Quoted 2 lines

so, prefix should set eprefix & friends which should leave the binaries in /opt/lvm/0.9.1/sbin, etc.

You have to set --exec-prefix either - --prefix does _not_ modify --exec-prefix as far as i can see.

if you want to change the behaviour do this
and rerun autoconf
(NOTE exec_prefix should be set to "", not "/", because it is used as in sbindir=${exec_prefix}/sbin )

	                  ^
configure.in Sun Feb 11 19:22:22 2001 renamed from configure.in.bluca Sat Feb 10 13:00:50 2001 +2 -2
@@ -74,8 +74,8 @@
                           statically.  Default is dynamic linking],  STATIC_LINK=$enableval, STATIC_LINK=no)
 
 dnl Mess with default exec_prefix
-if [[ "x$exec_prefix" = xNONE ]];
- then  exec_prefix="/";
+if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
+ then  exec_prefix="";
 fi;
 
 dnl Checks for library functions.
Signature · 6 lines
Luca Berra -- [email protected]
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \
#3 lore raw

configure.in Sun Feb 11 19:22:22 2001 line 79

Quoted 12 lines
configure.in Sun Feb 11 19:22:22 2001 renamed from configure.in.bluca Sat Feb 10 13:00:50 2001 +2 -2
@@ -74,8 +74,8 @@
                           statically.  Default is dynamic linking],  STATIC_LINK=$enableval, STATIC_LINK=no)
 
 dnl Mess with default exec_prefix
-if [[ "x$exec_prefix" = xNONE ]];
- then  exec_prefix="/";
+if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
+ then  exec_prefix="";
 fi;

configure.in now looks like:

statically. Default is dynamic linking],
STATIC_LINK=$enableval, STATIC_LINK=no)

if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
then exec_prefix="";
fi;

make distclean;
./configure --prefix=/opt/lvm/0.91 --enable-jobs=2; make all install fails w/ errors updating /lib, /sbin, etc.

Done Library parts

make[3]: Leaving directory /scratch/LVM/0.9.1_beta4/tools/lib' make[3]: Entering directory /scratch/LVM/0.9.1_beta4/tools/lib' *** Installing liblvm.a and liblvm-10.so in /opt/lvm/0.91//lib ***
rm: cannot unlink `//lib/liblvm-10.so': Permission denied
rm: cannot unlink `//lib/liblvm-10.so.0.9': Permission denied
rm: cannot unlink `//lib/liblvm-10.so.0': Permission denied
rm: cannot unlink `//lib/liblvm.a': Permission denied make[3]: *** [install_this] Error 1
make[3]: Leaving directory `/scratch/LVM/0.9.1_beta4/tools/lib' make[2]: *** [install] Error 2
make[2]: Leaving directory /scratch/LVM/0.9.1_beta4/tools/lib' make[2]: Entering directory /scratch/LVM/0.9.1_beta4/tools/man8' make[3]: Entering directory /scratch/LVM/0.9.1_beta4/tools/man8' make[3]: Leaving directory /scratch/LVM/0.9.1_beta4/tools/man8'

<snip>

/opt/bin//install: //sbin: Operation not permitted /opt/bin//install: cannot remove old link to `//sbin/vgscan': Permission denied
/opt/bin//install: cannot create regular file `//sbin/vgscan':
Permission denied
rm: cannot unlink //sbin/vgsplit': Permission denied /opt/bin//install: //sbin: Operation not permitted /opt/bin//install: cannot remove old link to //sbin/vgsplit':
Permission denied
/opt/bin//install: cannot create regular file `//sbin/vgsplit':
Permission denied

and /opt/lvm/0.91 contains only the man directory.

still seems stuck on installing in /sbin

Signature · 3 lines
 Steven Lembark                                   2930 W. Palmer St.
                                                 Chicago, IL  60647
 [email protected]                                   800-762-1582
#4 lore raw
Quoted 5 lines

configure.in now looks like:

statically. Default is dynamic linking],
STATIC_LINK=$enableval, STATIC_LINK=no)

Quoted 7 lines

if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
then exec_prefix="";
fi;

make distclean;
./configure --prefix=/opt/lvm/0.91 --enable-jobs=2; make all install fails w/ errors updating /lib, /sbin, etc.

i requote myself:
if you want to change the behaviour do this
and rerun autoconf
^^^^^^^^^^^^^^^^^^

L.

Signature · 6 lines
Luca Berra -- [email protected]
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \
#5 lore raw
Quoted 4 lines

i requote myself:
if you want to change the behaviour do this
and rerun autoconf
^^^^^^^^^^^^^^^^^^

oops.

oddity: install blows up:

make[2]: Entering directory `/scratch/LVM/0.9.1_beta4/tools' *** Installing e2fsadm lvchange lvcreate lvdisplay lvextend lvmchange
lvmdisksca n lvmsadc lvmsar lvreduce
lvremove lvrename lvscan pvchange pvcreate pvdata
pvdi splay pvmove pvscan vgcfgbackup
vgcfgrestore vgchange vgck vgcreate vgdisplay
vg export vgextend vgimport vgmerge
vgmknodes vgreduce vgremove vgrename vgscan
vgs plit lvmcreate_initrd in
/opt/lvm/0.91//sbin ***
/opt/bin//install: /opt/lvm/0.91//sbin/e2fsadm: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/lvchange: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/lvcreate: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/lvdisplay: Operation not permitted
/opt/bin//install: /opt/lvm/0.91//sbin/lvextend: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/lvmchange: Operation not permitted
/opt/bin//install: /opt/lvm/0.91//sbin/lvmdiskscan: Operation not permitted
/opt/bin//install: /opt/lvm/0.91//sbin/lvmsadc: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/lvmsar: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/lvreduce: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/lvremove: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/lvrename: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/lvscan: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/pvchange: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/pvcreate: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/pvdata: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/pvdisplay: Operation not permitted
/opt/bin//install: /opt/lvm/0.91//sbin/pvmove: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/pvscan: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/vgcfgbackup: Operation not permitted
/opt/bin//install: /opt/lvm/0.91//sbin/vgcfgrestore: Operation not permitted
/opt/bin//install: /opt/lvm/0.91//sbin/vgchange: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/vgck: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/vgcreate: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/vgdisplay: Operation not permitted
/opt/bin//install: /opt/lvm/0.91//sbin/vgexport: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/vgextend: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/vgimport: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/vgmerge: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/vgmknodes: Operation not permitted
/opt/bin//install: /opt/lvm/0.91//sbin/vgreduce: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/vgremove: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/vgrename: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/vgscan: Operation not permitted /opt/bin//install: /opt/lvm/0.91//sbin/vgsplit: Operation not permitted make[2]: *** [install-bin] Error 1
make[2]: Target install_this' not remade because of errors. make[2]: Leaving directory /scratch/LVM/0.9.1_beta4/tools' make[1]: *** [install] Error 2

installing into a directory that
i own w/ mods 755:

	drwxr-xr-x   2 lembark  bin          4096 Feb 11 16:09

/opt/lvm/0.91//sbin

looks like it's gone out of its way to set the directory mods since /opt is suid bin and so is /opt/lvm/0.91:

drwxrwsr-x 5 lembark bin 4096 Feb 11 16:09 /opt/lvm/0.91

everything got put in the proper place but the ownership and mods are off (obviously i can fix these by hand):

1062 : dizzy : 0.9.1_beta4 $ ls -l /opt/lvm/0.91//sbin total 496

-r-xr-xr-x   1 lembark  bin         14240 Feb 11 16:09 e2fsadm
-r-xr-xr-x   1 lembark  lembark     16812 Feb 11 16:09 lvchange
-r-xr-xr-x   1 lembark  lembark     25380 Feb 11 16:09 lvcreate
-r-xr-xr-x   1 lembark  lembark      9400 Feb 11 16:09 lvdisplay
-r-xr-xr-x   1 lembark  lembark     15632 Feb 11 16:09 lvextend
-r-xr-xr-x   1 lembark  lembark      7020 Feb 11 16:09 lvmchange
-r-xr-xr-x   1 lembark  lembark      9112 Feb 11 16:09 lvmdiskscan
-r-xr-xr-x   1 lembark  lembark      7520 Feb 11 16:09 lvmsadc
-r-xr-xr-x   1 lembark  lembark      6872 Feb 11 16:09 lvmsar
-r-xr-xr-x   1 lembark  lembark     14296 Feb 11 16:09 lvreduce
-r-xr-xr-x   1 lembark  lembark     12868 Feb 11 16:09 lvremove
-r-xr-xr-x   1 lembark  lembark     13728 Feb 11 16:09 lvrename
-r-xr-xr-x   1 lembark  lembark      9876 Feb 11 16:09 lvscan
-r-xr-xr-x   1 lembark  lembark     11652 Feb 11 16:09 pvchange
-r-xr-xr-x   1 lembark  lembark     12092 Feb 11 16:09 pvcreate
-r-xr-xr-x   1 lembark  lembark     11768 Feb 11 16:09 pvdata
-r-xr-xr-x   1 lembark  lembark     10064 Feb 11 16:09 pvdisplay
-r-xr-xr-x   1 lembark  lembark     17736 Feb 11 16:09 pvmove
-r-xr-xr-x   1 lembark  lembark     10216 Feb 11 16:09 pvscan
-r-xr-xr-x   1 lembark  lembark      7620 Feb 11 16:09 vgcfgbackup
-r-xr-xr-x   1 lembark  lembark     13152 Feb 11 16:09 vgcfgrestore
-r-xr-xr-x   1 lembark  lembark     19244 Feb 11 16:09 vgchange
-r-xr-xr-x   1 lembark  lembark      9748 Feb 11 16:09 vgck
-r-xr-xr-x   1 lembark  lembark     17688 Feb 11 16:09 vgcreate
-r-xr-xr-x   1 lembark  lembark     11724 Feb 11 16:09 vgdisplay
-r-xr-xr-x   1 lembark  lembark     10456 Feb 11 16:09 vgexport
-r-xr-xr-x   1 lembark  lembark     12672 Feb 11 16:09 vgextend
-r-xr-xr-x   1 lembark  lembark     15892 Feb 11 16:09 vgimport
-r-xr-xr-x   1 lembark  lembark     13652 Feb 11 16:09 vgmerge
-r-xr-xr-x   1 lembark  lembark      7788 Feb 11 16:09 vgmknodes
-r-xr-xr-x   1 lembark  lembark     13440 Feb 11 16:09 vgreduce
-r-xr-xr-x   1 lembark  lembark     10048 Feb 11 16:09 vgremove
-r-xr-xr-x   1 lembark  lembark     13688 Feb 11 16:09 vgrename
-r-xr-xr-x   1 lembark  lembark     10960 Feb 11 16:09 vgscan
-r-xr-xr-x   1 lembark  lembark     16052 Feb 11 16:09 vgsplit

any reason that the install has to set the ownership & mods? i don't remember anything in the code that explicitly checks file ownership (vs euid of proc execing them), but may have missed something.

Signature · 3 lines
 Steven Lembark                                   2930 W. Palmer St.
                                                 Chicago, IL  60647
 [email protected]                                   800-762-1582
#6 lore raw
Quoted 6 lines · Steven Lembark
Quoted 5 lines

i requote myself:
if you want to change the behaviour do this
and rerun autoconf
^^^^^^^^^^^^^^^^^^

Quoted 7 lines

oops.

any reason that the install has to set the ownership & mods? i don't remember anything in the code that explicitly checks file ownership (vs euid of proc execing them), but may have missed something.

sigh,

kernel/Makefile renamed from kernel/Makefile.bluca.orig +3 -3
@@ -47,7 +47,7 @@
 
 install-module:	lvm.o
 	rm -f $(LVM_DEST)
-	install -o root -g root -m 644 lvm.o $(LVM_DEST)
+	install -m 644 lvm.o $(LVM_DEST)
 	rm -f /dev/lvm; mknod /dev/lvm c $(LVM_MAJOR) 0; chmod 640 /dev/lvm
 
 remove-module:	lvm.o
@@ -88,8 +88,8 @@
 	then \
            cp -p $(KSYMS_DEST) $(KSYMS_DEST).ORG; \
 	fi
-	install -o root -g root -m 555 $(LL_RW_BLK) $(LL_RW_BLK_DEST)
-	install -o root -g root -m 555 $(KSYMS) $(KSYMS_DEST)
+	install -m 755 $(LL_RW_BLK) $(LL_RW_BLK_DEST)
+	install -m 755 $(KSYMS) $(KSYMS_DEST)
 
 install_this:	install-ll_rw_blk install-module
 
tools/man8/Makefile.in renamed from tools/man8/Makefile.in.bluca.orig +1 -1
@@ -40,7 +40,7 @@
 	@for f in $(ALL_MANUALS); \
 	do \
 	   rm -f $(MAN8DIR)/$$f; \
-	   @INSTALL@ -D -o root -g root -m 444 $$f $(MAN8DIR)/$$f; \
+	   @INSTALL@ -D -m 644 $$f $(MAN8DIR)/$$f; \
 	done
 
 remove-man8:
tools/Makefile.in renamed from tools/Makefile.in.bluca.orig +2 -2
@@ -77,13 +77,13 @@
 	do \
   	   rm -f ${sbindir}/$$f; \
 	   @INSTALL@ -d ${sbindir}; \
-	   @INSTALL@ -o root -g root -m 555 -s $$f ${sbindir}/$$f; \
+	   @INSTALL@ -m 755 -s $$f ${sbindir}/$$f; \
 	done
 	@for f in $(ALL_SCRIPTS); \
 	do \
 	   rm -f ${sbindir}/$$f; \
 	   @INSTALL@ -d ${sbindir}; \
-	   @INSTALL@ -o root -g root -m 555 $$f ${sbindir}/$$f; \
+	   @INSTALL@ -m 755 $$f ${sbindir}/$$f; \
 	done
 
 remove-bin:	$(ALL_TARGETS) $(ALL_SCRIPTS)
configure.in renamed from configure.in.bluca.orig +2 -2
@@ -74,8 +74,8 @@
                           statically.  Default is dynamic linking],  STATIC_LINK=$enableval, STATIC_LINK=no)
 
 dnl Mess with default exec_prefix
-if [[ "x$exec_prefix" = xNONE ]];
- then  exec_prefix="/";
+if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
+ then  exec_prefix="";
 fi;
 
 dnl Checks for library functions.
Signature · 6 lines
Luca Berra -- [email protected]
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \
#7 lore raw
In reply to Luca Berra
Quoted 13 lines · Luca Berra
Quoted 8 lines · Adalbert Michelic

Hi,

Quoted 5 lines · * On Sunday, February 11, 2001 at 00:28, Steven Lembark wrote:
        ./configure --prefix=/opt/lvm/0.9.1

leaves only the man pages in the prefix dir, exec's still go to /sbin. this is bad news since it will blow off the entire LVM installation the next time i test an install.

[...]

Quoted 3 lines
Quoted 2 lines

so, prefix should set eprefix & friends which should leave the binaries in /opt/lvm/0.9.1/sbin, etc.

Quoted 7 lines
Quoted 2 lines

You have to set --exec-prefix either - --prefix does _not_ modify --exec-prefix as far as i can see.

if you want to change the behaviour do this
and rerun autoconf
(NOTE exec_prefix should be set to "", not "/", because it is used as in sbindir=${exec_prefix}/sbin )

Hmm...does it matter? It never has for me...

Anywho, thanks for that patch; it's exactly what I was thinking would fix Steven's problem.

Signature · 18 lines
AJ Lewis
Sistina Software Inc.                  Voice:  612-379-3951
1313 5th St SE, Suite 111              Fax:    612-379-3952
Minneapolis, MN 55414                  E-Mail: [email protected]
http://www.sistina.com

Current GPG fingerprint = 3B5F 6011 5216 76A5 2F6B  52A0 941E 1261 0029 2648
Get my key at: http://www.sistina.com/~lewis/gpgkey
 (Unfortunately, the PKS-type keyservers do not work with multiple sub-keys)

-----Begin Obligatory Humorous Quote----------------------------------------
THE LESSER-KNOWN PROGRAMMING LANGUAGES #16:
C- This language was named for the grade received by its creator when he
submitted it as a class project in a graduate programming class.  C- is
best described as a "low-level" programming language.  In fact, the
language generally requires more C- statements than machine-code statements
to execute a given task.  In this respect, it is very similar to COBOL.
-----End Obligatory Humorous Quote------------------------------------------
#8 lore raw
In reply to Steven Lembark
Quoted 2 lines · Steven Lembark

and/or was the LVM_DIR_PREFIX vs. hard-coded "/dev" entrys fixed in this one?

Not yet. I changed this in a few places in the code, but haven't submitted a patch yet.

Cheers, Andreas

Signature · 3 lines
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert