summaryrefslogtreecommitdiffstats
path: root/debian/patches/build/d-bootstrap-install-symlinks.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:01 +0000
commitc29d7c1ba10d6debd11f9d8aad5d069a6491e60e (patch)
treea2ad46eb513b315f0efd8170af5eb08870165757 /debian/patches/build/d-bootstrap-install-symlinks.patch
parentMerging upstream version 1.76.0+dfsg1. (diff)
downloadrustc-3ad741d612c58a5278259c87956d57f9b5530899.tar.xz
rustc-3ad741d612c58a5278259c87956d57f9b5530899.zip
Adding debian version 1.76.0+dfsg1-1.debian/1.76.0+dfsg1-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/build/d-bootstrap-install-symlinks.patch')
-rw-r--r--debian/patches/build/d-bootstrap-install-symlinks.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/patches/build/d-bootstrap-install-symlinks.patch b/debian/patches/build/d-bootstrap-install-symlinks.patch
new file mode 100644
index 000000000..bb0cc7c9a
--- /dev/null
+++ b/debian/patches/build/d-bootstrap-install-symlinks.patch
@@ -0,0 +1,38 @@
+From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
+Date: Thu, 14 Jul 2022 13:17:38 +0200
+Subject: Install symlinks as-is, don't dereference them
+
+Our patch to mdbook installs symlinks to systems versions of font-awesome,
+highlight, etc. Upstream mdbook otherwise doesn't use symlinks, so this
+doesn't affect anything else that's already generated.
+
+Forwarded: not-needed
+---
+ src/tools/rust-installer/install-template.sh | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/tools/rust-installer/install-template.sh b/src/tools/rust-installer/install-template.sh
+index b477c3e..fd93316 100644
+--- a/src/tools/rust-installer/install-template.sh
++++ b/src/tools/rust-installer/install-template.sh
+@@ -617,7 +617,10 @@ install_components() {
+
+ maybe_backup_path "$_file_install_path"
+
+- if echo "$_file" | grep "^bin/" > /dev/null || test -x "$_src_dir/$_component/$_file"
++ if [ -h "$_src_dir/$_component/$_file" ]
++ then
++ run cp -d "$_src_dir/$_component/$_file" "$_file_install_path"
++ elif echo "$_file" | grep "^bin/" > /dev/null || test -x "$_src_dir/$_component/$_file"
+ then
+ run cp "$_src_dir/$_component/$_file" "$_file_install_path"
+ run chmod 755 "$_file_install_path"
+@@ -639,7 +642,7 @@ install_components() {
+
+ maybe_backup_path "$_file_install_path"
+
+- run cp -R "$_src_dir/$_component/$_file" "$_file_install_path"
++ run cp -dR "$_src_dir/$_component/$_file" "$_file_install_path"
+ critical_need_ok "failed to copy directory"
+
+ # Set permissions. 0755 for dirs, 644 for files