Skip to contentSkip to conversation

tools/pygrub: Drop compatibility symlink

PATCH In review Andrew Cooper 4 participants 7 messages Nov 23, 2023 – Dec 11, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/pygrub: Drop compatibility symlink

This was declared deprecated in commit 10c88f1c18b7 ("tools: Install pv bootloaders in libexec rather than /usr/bin") in 2012

Take it out fully now, 11 years later.

---
CC: George Dunlap <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Wei Liu <[email protected]>
CC: Julien Grall <[email protected]>

---
 CHANGELOG.md          | 3 +++
 tools/pygrub/Makefile | 6 ------
 2 files changed, 3 insertions(+), 6 deletions(-)
CHANGELOG.md +3 -0
index 4ecebb9f686a..36a8ef89d8e4 100644
@@ -16,6 +16,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
 ### Removed
 - caml-stubdom.  It hasn't built since 2014, was pinned to Ocaml 4.02, and has
   been superseded by the MirageOS/SOLO5 projects.
+- /usr/bin/pygrub symlink.  This was deprecated in Xen 4.2 (2012) but left for
+  compatibility reasons.  VMs configured with bootloader="/usr/bin/pygrub"
+  should be updated to just bootloader="pygrub".
 
 ## [4.18.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.18.0) - 2023-11-16
 
tools/pygrub/Makefile +0 -6
index 4963bc89c6ed..d5e291ea0619 100644
@@ -22,15 +22,9 @@ install: all
 	$(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
 		--root="$(DESTDIR)" --force
 	$(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
-	set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
-	             "`readlink -f $(DESTDIR)/$(bindir)`" != \
-	             "`readlink -f $(LIBEXEC_BIN)`" ]; then \
-	    ln -sf $(LIBEXEC_BIN)/pygrub $(DESTDIR)/$(bindir); \
-	fi
 
 .PHONY: uninstall
 uninstall:
-	rm -f $(DESTDIR)/$(bindir)/pygrub
 	if [ -e $(INSTALL_LOG) ]; then \
 		cat $(INSTALL_LOG) | xargs -i rm -f $(DESTDIR)/{}; \
 	fi

base-commit: f96e2f64576cdbb147391c7cb399d393385719a9

Signature · 1 line
2.30.2
#1 lore raw

Ping.

Quoted 53 lines · Andrew Cooper

This was declared deprecated in commit 10c88f1c18b7 ("tools: Install pv bootloaders in libexec rather than /usr/bin") in 2012

Take it out fully now, 11 years later.

---
CC: George Dunlap <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Wei Liu <[email protected]>
CC: Julien Grall <[email protected]>

---
 CHANGELOG.md          | 3 +++
 tools/pygrub/Makefile | 6 ------
 2 files changed, 3 insertions(+), 6 deletions(-)
CHANGELOG.md +3 -0
index 4ecebb9f686a..36a8ef89d8e4 100644
@@ -16,6 +16,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
 ### Removed
 - caml-stubdom.  It hasn't built since 2014, was pinned to Ocaml 4.02, and has
   been superseded by the MirageOS/SOLO5 projects.
+- /usr/bin/pygrub symlink.  This was deprecated in Xen 4.2 (2012) but left for
+  compatibility reasons.  VMs configured with bootloader="/usr/bin/pygrub"
+  should be updated to just bootloader="pygrub".
 
 ## [4.18.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.18.0) - 2023-11-16
 
tools/pygrub/Makefile +0 -6
index 4963bc89c6ed..d5e291ea0619 100644
@@ -22,15 +22,9 @@ install: all
 	$(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
 		--root="$(DESTDIR)" --force
 	$(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
-	set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
-	             "`readlink -f $(DESTDIR)/$(bindir)`" != \
-	             "`readlink -f $(LIBEXEC_BIN)`" ]; then \
-	    ln -sf $(LIBEXEC_BIN)/pygrub $(DESTDIR)/$(bindir); \
-	fi
 
 .PHONY: uninstall
 uninstall:
-	rm -f $(DESTDIR)/$(bindir)/pygrub
 	if [ -e $(INSTALL_LOG) ]; then \
 		cat $(INSTALL_LOG) | xargs -i rm -f $(DESTDIR)/{}; \
 	fi

base-commit: f96e2f64576cdbb147391c7cb399d393385719a9

#2 lore raw

Hi,

Quoted 1 line · Andrew Cooper

Ping.

I noticed Anthony is not CCed (scripts/get_maintainer.pl reports him and Wei). The same for CHANGELOG. This should have been Henry (and soon Oleksii).

Is this intended?

Quoted 7 lines · Andrew Cooper
Quoted 5 lines

This was declared deprecated in commit 10c88f1c18b7 ("tools: Install pv bootloaders in libexec rather than /usr/bin") in 2012

Take it out fully now, 11 years later.

Quoted 10 lines
Quoted 10 lines

---
CC: George Dunlap <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Wei Liu <[email protected]>
CC: Julien Grall <[email protected]>

---
  CHANGELOG.md          | 3 +++
  tools/pygrub/Makefile | 6 ------

See above, I think this code is under the remit of Anthony. You haven't CCed him so no surprise no-one answered.

It is unclear why "THE REST" was CCed. I called scripts/get_maintainers.pl on the patch and only Henry/Anthony/Wei was listed.

I have CCed Anthony. I can review give a try to review it if you don't get any answer from Anthony by mid-next week.

Quoted 30 lines
Quoted 30 lines
  2 files changed, 3 insertions(+), 6 deletions(-)
CHANGELOG.md +3 -0
index 4ecebb9f686a..36a8ef89d8e4 100644
@@ -16,6 +16,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
  ### Removed
  - caml-stubdom.  It hasn't built since 2014, was pinned to Ocaml 4.02, and has
    been superseded by the MirageOS/SOLO5 projects.
+- /usr/bin/pygrub symlink.  This was deprecated in Xen 4.2 (2012) but left for
+  compatibility reasons.  VMs configured with bootloader="/usr/bin/pygrub"
+  should be updated to just bootloader="pygrub".
 
  ## [4.18.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.18.0) - 2023-11-16
 
tools/pygrub/Makefile +0 -5
index 4963bc89c6ed..d5e291ea0619 100644
@@ -22,15 +22,9 @@ install: all
  	$(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
  		--root="$(DESTDIR)" --force
  	$(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
-	set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
-	             "`readlink -f $(DESTDIR)/$(bindir)`" != \
-	             "`readlink -f $(LIBEXEC_BIN)`" ]; then \
-	    ln -sf $(LIBEXEC_BIN)/pygrub $(DESTDIR)/$(bindir); \
-	fi
 
Quoted 9 lines
Quoted 8 lines
tools/pygrub/Makefile +0 -1
  .PHONY: uninstall
  uninstall:
-	rm -f $(DESTDIR)/$(bindir)/pygrub
  	if [ -e $(INSTALL_LOG) ]; then \
  		cat $(INSTALL_LOG) | xargs -i rm -f $(DESTDIR)/{}; \
  	fi

base-commit: f96e2f64576cdbb147391c7cb399d393385719a9

Cheers,

Signature · 1 line
Julien Grall
#3 lore raw
Quoted 2 lines · Julien Grall

See above, I think this code is under the remit of Anthony. You haven't CCed him so no surprise no-one answered.

Additionally, my old citrix address *was* cc'd, but I only have the 'ping', not the original email in my work mailbox.

I'm tempted to suggest adding a hack to libxl, so that /usr/bin/pygrub automatically falls back to the libexec directory if /usr/bin/pygrub doesn't exist. (I'd be happy to code something up if we decided to go that route.). OTOH, I can see the argument that 11 years and the CHANGELOG entry is enough.

-George

#4 lore raw
Quoted 5 lines · George Dunlap
Quoted 2 lines · Julien Grall

See above, I think this code is under the remit of Anthony. You haven't CCed him so no surprise no-one answered.

Quoted 8 lines

Additionally, my old citrix address *was* cc'd, but I only have the 'ping', not the original email in my work mailbox.

I'm tempted to suggest adding a hack to libxl, so that /usr/bin/pygrub automatically falls back to the libexec directory if /usr/bin/pygrub doesn't exist. (I'd be happy to code something up if we decided to go that route.). OTOH, I can see the argument that 11 years and the CHANGELOG entry is enough.

Well, at least you have printed a warning log message to all of those whom still use the full old path to pygrub, with
c31d6a7ee2ea ("libxl: Warn that /usr/bin/pygrub is deprecated")
So, I don't think more than that is needed. At least, now they would also get an error saying /usr/bin/pygrub wasn't found, I think.

Cheers,

Signature · 1 line
Anthony PERARD
Reviewed-by on v1 1/1
#5 lore raw
In reply to Andrew Cooper
Quoted 2 lines · Andrew Cooper

This was declared deprecated in commit 10c88f1c18b7 ("tools: Install pv bootloaders in libexec rather than /usr/bin") in 2012

This commit only speak about wanting to deprecate the full path to pygrub, and calling something deprecated in a commit message alone isn't very friendly. But there's a better commit calling for the deprecation:
c31d6a7ee2ea ("libxl: Warn that /usr/bin/pygrub is deprecated") even if it's only in a libxl log message at run time.

I hope we have a better schema to deprecate things.

Quoted 3 lines

Take it out fully now, 11 years later.

Beside the commit message that could call for a better commit, patch looks good:

Thanks,

Signature · 1 line
Anthony PERARD
#6 lore raw
Quoted 11 lines · Anthony PERARD
Quoted 2 lines · Andrew Cooper

This was declared deprecated in commit 10c88f1c18b7 ("tools: Install pv bootloaders in libexec rather than /usr/bin") in 2012

This commit only speak about wanting to deprecate the full path to pygrub, and calling something deprecated in a commit message alone isn't very friendly. But there's a better commit calling for the deprecation:
c31d6a7ee2ea ("libxl: Warn that /usr/bin/pygrub is deprecated") even if it's only in a libxl log message at run time.

I hope we have a better schema to deprecate things.

Oh, I'd not even spotted that one.

This patch was actually triggered by newer versions of RPM objecting to absolute symlinks.

Quoted 7 lines
Quoted 4 lines

Take it out fully now, 11 years later.

Beside the commit message that could call for a better commit, patch looks good:

Thanks.  I'll adjust the commit message.

~Andrew