Fix pygrub install.
PATCH 1/1 Fix pygrub install.
The script pygrub is currently installed in the wrong location. Instead of /usr/lib/xen/bin, the script is installed in $destdir/usr/lib/xen/bin. $(DESTDIR) is apply twice.
--- tools/pygrub/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
tools/pygrub/Makefile +1 -1
@@ -12,7 +12,7 @@ build: install: all CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \ $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \ - --install-scripts=$(DESTDIR)/$(PRIVATE_BINDIR) --force + --install-scripts=$(PRIVATE_BINDIR) --force $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(PRIVATE_BINDIR)/pygrub $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR)
Signature · 1 line
Anthony PERARD
Quoted 3 lines · Anthony PERARD
The script pygrub is currently installed in the wrong location. Instead of
/usr/lib/xen/bin, the script is installed in $destdir/usr/lib/xen/bin. $(DESTDIR) is apply twice.
$(DESTDIR) isn't the intended final path (i.e., /usr/lib/xen/bin); it's the subdirectory where you want "make dist" to put the files from this make -- normally in xen-unstable.hg/dist/install/. This change will make it so that simply doing "make tools" (which is expected to compile things and put the output in xen.hg/dist/install) will change the *currently installed* version of pygrub.
-George
Quoted 27 lines
Signed-off-by Anthony PERARD <[email protected]>---
tools/pygrub/Makefile | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)tools/pygrub/Makefile +0
-0@@ -12,7 +12,7 @@ build:install: all
CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON)setup.pyinstall \
$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
- --install-scripts=$(DESTDIR)/$(PRIVATE_BINDIR) --force
+ --install-scripts=$(PRIVATE_BINDIR) --force $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(PRIVATE_BINDIR)/pygrub $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR)
--
Anthony PERARD_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 5 lines · Anthony PERARD
The script pygrub is currently installed in the wrong location. Instead of
/usr/lib/xen/bin, the script is installed in $destdir/usr/lib/xen/bin. $(DESTDIR) is apply twice.Signed-off-by Anthony PERARD <[email protected]>
Hmm -- I'm sure I checked this... but you're right, $(DESTDIR) IS IN THE --root command.
The strange thing is that there *is* a pygrub in the right place, so it appears that thefollowing line ($INSTALL_PYTHON_PROG) is redundant?
Anyway:
Quoted 25 lines
---
tools/pygrub/Makefile | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)tools/pygrub/Makefile +0
-0@@ -12,7 +12,7 @@ build:install: all
CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON)setup.pyinstall \
$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
- --install-scripts=$(DESTDIR)/$(PRIVATE_BINDIR) --force
+ --install-scripts=$(PRIVATE_BINDIR) --force $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(PRIVATE_BINDIR)/pygrub $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR)
--
Anthony PERARD_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 2 lines · George Dunlap
The strange thing is that there *is* a pygrub in the right place, so it appears that thefollowing line ($INSTALL_PYTHON_PROG) is redundant?
It's seems that the right on the script are already set to 755 by the setup.py, so this $INSTALL_PYTHON_PROG line is probably an extra.
Thanks,
Signature · 1 line
Anthony PERARD
Quoted 7 lines · Anthony PERARD
Quoted 2 lines · George Dunlap
The strange thing is that there *is* a pygrub in the right place, so it appears that thefollowing line ($INSTALL_PYTHON_PROG) is redundant?
It's seems that the right on the script are already set to 755 by the
setup.py, so this $INSTALL_PYTHON_PROG line is probably an extra.
What is the conclusion here? Is the original patch correct and/or is there a subsequent additional fix?
My scripts does things like:
make -C tools XEN_TARGET_ARCH=x86_32 DESTDIR=/tmp/tmp0_hnbt LIBXL_TESTIDL_SEED=42 debug=y -j12 install
then tars up /tmp/tmp0_hnbt, copies it to my test box and untars. I've
just noticed on my test box:
# ls -dl /tmp/tmp*
drwxr-xr-x 3 root root 4096 Jun 1 09:26 /tmp/tmp0_hnbt
drwxr-xr-x 3 root root 4096 May 18 11:11 /tmp/tmp8D2Mvc
drwxr-xr-x 3 root root 4096 May 25 10:21 /tmp/tmpAd2OFq
drwxr-xr-x 3 root root 4096 May 18 15:05 /tmp/tmpEqYZpf
[...]
# find /tmp/tmp* -name pygrub | wc -l
19Oops!
Ian.
Quoted 9 lines · Ian Campbell
Quoted 6 lines · Anthony PERARD
Quoted 2 lines · George Dunlap
The strange thing is that there *is* a pygrub in the right place, so it appears that thefollowing line ($INSTALL_PYTHON_PROG) is redundant?
It's seems that the right on the script are already set to 755 by the
setup.py, so this $INSTALL_PYTHON_PROG line is probably an extra.What is the conclusion here? Is the original patch correct and/or is there a subsequent additional fix?
There is a bug (pygrub is installed both in $(DESTDIR)/foo and $(DESTDIR)/$(DESTDIR)/foo), and Anthony's first patch (AFAICT) correctly fixes the bug (only installed in $(DESTDIR).
I think there is a redundant command in the Makefile as well, where pygrub will be copied to $(DESTDIR)/foo twice. That doesn't cause incorrect behavior, but I would probably still consider it a bug.
So the original patch is correct, but there is a subsequent fix.
Quoted 4 lines
My scripts does things like:
make -C tools XEN_TARGET_ARCH=x86_32 DESTDIR=/tmp/tmp0_hnbt LIBXL_TESTIDL_SEED=42 debug=y -j12 install
then tars up/tmp/tmp0_hnbt, copies it to my test box and untars. I've
just noticed on my test box:
Quoted 8 lines
# ls -dl /tmp/tmp*
drwxr-xr-x 3 root root 4096 Jun 1 09:26 /tmp/tmp0_hnbt
drwxr-xr-x 3 root root 4096 May 18 11:11 /tmp/tmp8D2Mvc
drwxr-xr-x 3 root root 4096 May 25 10:21 /tmp/tmpAd2OFq
drwxr-xr-x 3 root root 4096 May 18 15:05 /tmp/tmpEqYZpf
[...]
# find /tmp/tmp* -name pygrub | wc -l
19The "right thing" is to find find 2 files named "pygrub" per directory (a binary at /usr/lib/xen/bin/pygrub and a link to that binary at /usr/bin/pygrub, for compatibility). Without Anthony's patch you would get 3. Not sure how that corresponds to the directories you have there...
-George
Quoted 31 lines · George Dunlap
Quoted 9 lines · Ian Campbell
Quoted 6 lines · Anthony PERARD
Quoted 2 lines · George Dunlap
The strange thing is that there *is* a pygrub in the right place, so it appears that thefollowing line ($INSTALL_PYTHON_PROG) is redundant?
It's seems that the right on the script are already set to 755 by the
setup.py, so this $INSTALL_PYTHON_PROG line is probably an extra.What is the conclusion here? Is the original patch correct and/or is there a subsequent additional fix?
There is a bug (pygrub is installed both in $(DESTDIR)/foo and $(DESTDIR)/$(DESTDIR)/foo), and Anthony's first patch (AFAICT) correctly fixes the bug (only installed in $(DESTDIR).
I think there is a redundant command in the
Makefileas well, where pygrub will be copied to $(DESTDIR)/foo twice. That doesn't cause incorrect behavior, but I would probably still consider it a bug.So the original patch is correct, but there is a subsequent fix.
Quoted 4 lines
My scripts does things like:
make -C tools XEN_TARGET_ARCH=x86_32 DESTDIR=/tmp/tmp0_hnbt LIBXL_TESTIDL_SEED=42 debug=y -j12 install
then tars up/tmp/tmp0_hnbt, copies it to my test box and untars. I've
just noticed on my test box:Quoted 8 lines
# ls -dl /tmp/tmp* drwxr-xr-x 3 root root 4096 Jun 1 09:26 /tmp/tmp0_hnbt drwxr-xr-x 3 root root 4096 May 18 11:11 /tmp/tmp8D2Mvc drwxr-xr-x 3 root root 4096 May 25 10:21 /tmp/tmpAd2OFq drwxr-xr-x 3 root root 4096 May 18 15:05 /tmp/tmpEqYZpf [...] # find /tmp/tmp* -name pygrub | wc -l 19
Quoted 4 lines
The "right thing" is to find find 2 files named "pygrub" per directory (a binary at
/usr/lib/xen/bin/pygruband a link to that binary at/usr/bin/pygrub, for compatibility). Without Anthony's patch you would get 3. Not sure how that corresponds to the directories you have there...
This is the actual installed files on my test machine, not my build machine.
On my build system I would have had:
/tmp/tmpEqYZpf/usr/lib/xen/bin/pygrub /tmp/tmpEqYZpf/usr/bin/pygrub -> /usr/lib/xen/bin/pygrub /tmp/tmpEqYZpf/tmp/tmpEqYZpf/usr/lib/xen/bin/pygrub
I then "tar -C /tmp/tmpEqYZpf cf blah.tar ." and copy+untar blah.tar on the so that on the target I get:
/usr/lib/xen/bin/pygrub
/usr/bin/pygrub -> /usr/lib/xen/bin/pygrub /tmp/tmpEqYZpf/usr/lib/xen/bin/pygrub
Where the last is what I find above via find etc.
Ian.
Quoted 10 lines · George Dunlap
Quoted 9 lines · Ian Campbell
Quoted 6 lines · Anthony PERARD
Quoted 2 lines · George Dunlap
The strange thing is that there *is* a pygrub in the right place, so it appears that thefollowing line ($INSTALL_PYTHON_PROG) is redundant?
It's seems that the right on the script are already set to 755 by the
setup.py, so this $INSTALL_PYTHON_PROG line is probably an extra.What is the conclusion here? Is the original patch correct and/or is there a subsequent additional fix?
Quoted 7 lines
There is a bug (pygrub is installed both in $(DESTDIR)/foo and $(DESTDIR)/$(DESTDIR)/foo), and Anthony's first patch (AFAICT) correctly fixes the bug (only installed in $(DESTDIR).
I think there is a redundant command in the
Makefileas well, where pygrub will be copied to $(DESTDIR)/foo twice. That doesn't cause incorrect behavior, but I would probably still consider it a bug.
I get an error when performing an install-tools on NetBSD:
byte-compiling /usr/xen42/lib/python2.7/site-packages/grub/LiloConf.py to LiloConf.pyc running install_scripts
copying build/scripts-2.7/pygrub -> //usr/xen42/bin
error: //usr/xen42/bin/pygrub: Too many levels of symbolic links gmake[3]: *** [install] Error 1
gmake[3]: Leaving directory `/root/xen/xen-clean/tools/pygrub'
gmake[2]: *** [subdir-install-pygrub] Error 2
gmake[2]: Leaving directory `/root/xen/xen-clean/tools'
gmake[1]: *** [subdirs-install] Error 2
gmake[1]: Leaving directory `/root/xen/xen-clean/tools'
gmake: *** [install-tools] Error 2
Which I'm quite sure is caused by this.
Quoted 19 lines · Roger Pau Monne
Quoted 10 lines · George Dunlap
Quoted 9 lines · Ian Campbell
Quoted 6 lines · Anthony PERARD
Quoted 2 lines · George Dunlap
The strange thing is that there *is* a pygrub in the right place, so it appears that thefollowing line ($INSTALL_PYTHON_PROG) is redundant?
It's seems that the right on the script are already set to 755 by the
setup.py, so this $INSTALL_PYTHON_PROG line is probably an extra.What is the conclusion here? Is the original patch correct and/or is there a subsequent additional fix?
Quoted 7 lines
There is a bug (pygrub is installed both in $(DESTDIR)/foo and $(DESTDIR)/$(DESTDIR)/foo), and Anthony's first patch (AFAICT) correctly fixes the bug (only installed in $(DESTDIR).
I think there is a redundant command in the
Makefileas well, where pygrub will be copied to $(DESTDIR)/foo twice. That doesn't cause incorrect behavior, but I would probably still consider it a bug.
Quoted 7 lines
I get an error when performing an install-tools on NetBSD:
byte-compiling
/usr/xen42/lib/python2.7/site-packages/grub/LiloConf.pyto LiloConf.pyc
runninginstall_scripts
copying build/scripts-2.7/pygrub -> //usr/xen42/bin
error: //usr/xen42/bin/pygrub: Too many levels of symbolic links
OOI what does //usr/xen42/bin/pygrub point to?
Quoted 9 lines
gmake[3]: *** [install] Error 1
gmake[3]: Leaving directory/root/xen/xen-clean/tools/pygrub' gmake[2]: *** [subdir-install-pygrub] Error 2 gmake[2]: Leaving directory/root/xen/xen-clean/tools' gmake[1]: *** [subdirs-install] Error 2
gmake[1]: Leaving directory `/root/xen/xen-clean/tools'
gmake: *** [install-tools] Error 2Which I'm quite sure is caused by this.
"this" == this problem or "this" == this patch?
Quoted 21 lines · Ian Campbell
Quoted 20 lines · Roger Pau Monne
Quoted 10 lines · George Dunlap
Quoted 9 lines · Ian Campbell
Quoted 6 lines · Anthony PERARD
Quoted 2 lines · George Dunlap
The strange thing is that there *is* a pygrub in the right place, so it appears that thefollowing line ($INSTALL_PYTHON_PROG) is redundant?
It's seems that the right on the script are already set to 755 by the
setup.py, so this $INSTALL_PYTHON_PROG line is probably an extra.What is the conclusion here? Is the original patch correct and/or is there a subsequent additional fix?
Quoted 7 lines
There is a bug (pygrub is installed both in $(DESTDIR)/foo and $(DESTDIR)/$(DESTDIR)/foo), and Anthony's first patch (AFAICT) correctly fixes the bug (only installed in $(DESTDIR).
I think there is a redundant command in the
Makefileas well, where pygrub will be copied to $(DESTDIR)/foo twice. That doesn't cause incorrect behavior, but I would probably still consider it a bug.I get an error when performing an install-tools on NetBSD:
Quoted 7 lines
Quoted 5 lines
byte-compiling
/usr/xen42/lib/python2.7/site-packages/grub/LiloConf.pyto LiloConf.pyc
runninginstall_scripts
copying build/scripts-2.7/pygrub -> //usr/xen42/bin
error: //usr/xen42/bin/pygrub: Too many levels of symbolic linksOOI what does //usr/xen42/bin/pygrub point to?
lrwxr-xr-x 1 root wheel 21 May 25 14:32 //usr/xen42/bin/pygrub -> /usr/xen42/bin/pygrub
Quoted 11 lines
Quoted 9 lines
gmake[3]: *** [install] Error 1
gmake[3]: Leaving directory/root/xen/xen-clean/tools/pygrub' gmake[2]: *** [subdir-install-pygrub] Error 2 gmake[2]: Leaving directory/root/xen/xen-clean/tools' gmake[1]: *** [subdirs-install] Error 2
gmake[1]: Leaving directory `/root/xen/xen-clean/tools'
gmake: *** [install-tools] Error 2Which I'm quite sure is caused by this.
"this" == this problem or "this" == this patch?
I haven't tried the patch, I was referring to the current code in the repository, so this == this problem.
Quoted 39 lines · Roger Pau Monne
Quoted 19 lines · Ian Campbell
Quoted 18 lines · Roger Pau Monne
Quoted 17 lines · George Dunlap
Quoted 9 lines · Ian Campbell
Quoted 6 lines · Anthony PERARD
Quoted 2 lines · George Dunlap
The strange thing is that there *is* a pygrub in the right place, so it appears that thefollowing line ($INSTALL_PYTHON_PROG) is redundant?
It's seems that the right on the script are already set to 755 by the
setup.py, so this $INSTALL_PYTHON_PROG line is probably an extra.What is the conclusion here? Is the original patch correct and/or is there a subsequent additional fix?
There is a bug (pygrub is installed both in $(DESTDIR)/foo and $(DESTDIR)/$(DESTDIR)/foo), and Anthony's first patch (AFAICT) correctly fixes the bug (only installed in $(DESTDIR).
I think there is a redundant command in the
Makefileas well, where pygrub will be copied to $(DESTDIR)/foo twice. That doesn't cause incorrect behavior, but I would probably still consider it a bug.Quoted 8 lines
Quoted 7 lines
I get an error when performing an install-tools on NetBSD:
byte-compiling
/usr/xen42/lib/python2.7/site-packages/grub/LiloConf.pyto LiloConf.pyc
runninginstall_scripts
copying build/scripts-2.7/pygrub -> //usr/xen42/bin
error: //usr/xen42/bin/pygrub: Too many levels of symbolic linksOOI what does //usr/xen42/bin/pygrub point to?
lrwxr-xr-x 1 root wheel 21 May 25 14:32 //usr/xen42/bin/pygrub ->
/usr/xen42/bin/pygrubQuoted 8 lines
Quoted 8 lines
gmake[3]: *** [install] Error 1
gmake[3]: Leaving directory/root/xen/xen-clean/tools/pygrub' gmake[2]: *** [subdir-install-pygrub] Error 2 gmake[2]: Leaving directory/root/xen/xen-clean/tools' gmake[1]: *** [subdirs-install] Error 2
gmake[1]: Leaving directory `/root/xen/xen-clean/tools'
gmake: *** [install-tools] Error 2
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
Which I'm quite sure is caused by this.
"this" == this problem or "this" == this patch?
I haven't tried the patch, I was referring to the current code in the repository, so this == this problem.
Ah, but that must be a different problem -- is it perhaps the case that in NetBSD $(PRIVATE_BINDIR) and $(BINDIR) are the same?
-George
Quoted 14 lines · George Dunlap
Quoted 9 lines · Ian Campbell
Quoted 9 lines · Anthony PERARD
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines · George Dunlap
Quoted 2 lines
The strange thing is that there*is* a pygrub in the right place, so it appears that thefollowing line ($INSTALL_PYTHON_PROG) is redundant?
It's seems that the right on the script are already set to 755 by the
setup.py, so this $INSTALL_PYTHON_PROG line is probably an extra.What is the conclusion here? Is the original patch correct and/or is there a subsequent additional fix?
There is a bug (pygrub is installed both in $(DESTDIR)/foo and $(DESTDIR)/$(DESTDIR)/foo), and Anthony's first patch (AFAICT) correctly fixes the bug (only installed in $(DESTDIR).
Quoted 5 lines
I think there is a redundant command in the
Makefileas well, where pygrub will be copied to $(DESTDIR)/foo twice. That doesn't cause incorrect behavior, but I would probably still consider it a bug.So the original patch is correct, but there is a subsequent fix.
I'll send a patch that remove this extra line as the pygrub script is copied by setup.py.
Signature · 1 line
Anthony PERARD
Ian, ping? I think Anthony's original patch (as well as his follow-up) should both be applied.
-George
Quoted 44 lines · Anthony PERARD
Quoted 25 lines · George Dunlap
Quoted 12 lines · Ian Campbell
Quoted 12 lines · Anthony PERARD
Quoted 9 lines
Quoted 9 lines
Quoted 5 lines · George Dunlap
Quoted 5 lines
The strange thing is that there*is* a pygrub in the right place, so
it appears that thefollowing line ($INSTALL_PYTHON_PROG) is redundant?
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
It's seems that the right on the script are already set to 755 by the
setup.py, so this $INSTALL_PYTHON_PROG line is probably an extra.What is the conclusion here? Is the original patch correct and/or is there a subsequent additional fix?
There is a bug (pygrub is installed both in $(DESTDIR)/foo and $(DESTDIR)/$(DESTDIR)/foo), and Anthony's first patch (AFAICT) correctly fixes the bug (only installed in $(DESTDIR).
Quoted 5 lines
I think there is a redundant command in the
Makefileas well, where pygrub will be copied to $(DESTDIR)/foo twice. That doesn't cause incorrect behavior, but I would probably still consider it a bug.So the original patch is correct, but there is a subsequent fix.
I'll send a patch that remove this extra line as the pygrub script is copied by
setup.py.--
Anthony PERARD_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel