mirror of
https://git.proxmox.com/git/rustc
synced 2026-02-05 05:16:18 +00:00
Update packaging for 1.10.0
- update changelog - add some patches to avoid redundant downloads - update add-soname patch for upstream changes <- needs review! - update make_orig-dl_tarball script - activate dlstage0 logic in d/control - run update-version.sh - add myself to uploaders
This commit is contained in:
parent
2aaaeeabcf
commit
ec2b8474f6
10
debian/changelog
vendored
10
debian/changelog
vendored
@ -1,3 +1,13 @@
|
||||
rustc (1.10.0+dfsg1-1) UNRELEASED; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
* Add myself to uploaders
|
||||
* Update our bootstrapping scripts. Now we can build either from upstream's
|
||||
stage0 snapshot (by setting DEB_BUILD_PROFILES=dlstage0) or from the
|
||||
previous Debian rustc stable version (default, when no build profile).
|
||||
|
||||
-- Ximin Luo <infinity0@debian.org> Mon, 04 Jul 2016 15:05:50 +0200
|
||||
|
||||
rustc (1.9.0+dfsg1-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release (Closes: #825752)
|
||||
|
||||
9
debian/control
vendored
9
debian/control
vendored
@ -5,9 +5,11 @@ Maintainer: Rust Maintainers <pkg-rust-maintainers@lists.alioth.debian.org>
|
||||
Uploaders: Jordan Justen <jordan.l.justen@intel.com>,
|
||||
Luca Bruno <lucab@debian.org>,
|
||||
Sylvestre Ledru <sylvestre@debian.org>,
|
||||
Angus Lees <gus@debian.org>
|
||||
Angus Lees <gus@debian.org>,
|
||||
Ximin Luo <infinity0@debian.org>
|
||||
Build-Depends: debhelper (>= 9.20141010),
|
||||
dpkg-dev (>= 1.17.14),
|
||||
rustc (>= 1.9.0+dfsg-1) <!dlstage0>,
|
||||
autotools-dev,
|
||||
curl,
|
||||
python,
|
||||
@ -17,6 +19,7 @@ Build-Depends: debhelper (>= 9.20141010),
|
||||
valgrind,
|
||||
git,
|
||||
procps,
|
||||
cmake,
|
||||
# git, procps are necessary for 'make check'
|
||||
antlr4,
|
||||
bison,
|
||||
@ -59,7 +62,7 @@ Description: Rust systems programming language
|
||||
generic programming and meta-programming, in both static and dynamic
|
||||
styles.
|
||||
|
||||
Package: libstd-rust-1.9
|
||||
Package: libstd-rust-1.10
|
||||
Section: libs
|
||||
Architecture: amd64 i386
|
||||
Multi-Arch: same
|
||||
@ -85,7 +88,7 @@ Section: libdevel
|
||||
Architecture: amd64 i386
|
||||
Multi-Arch: same
|
||||
Pre-Depends: multiarch-support
|
||||
Depends: ${misc:Depends}, libstd-rust-1.9 (= ${binary:Version})
|
||||
Depends: ${misc:Depends}, libstd-rust-1.10 (= ${binary:Version})
|
||||
Description: Rust standard libraries - development files
|
||||
Rust is a curly-brace, block-structured expression language. It
|
||||
visually resembles the C language family, but differs significantly
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
# "libstd" just seemed too generic
|
||||
libstd-rust-1.9 binary: package-name-doesnt-match-sonames
|
||||
libstd-rust-1.10 binary: package-name-doesnt-match-sonames
|
||||
|
||||
# Rust doesn't use dev shlib symlinks.
|
||||
libstd-rust-1.9 binary: dev-pkg-without-shlib-symlink
|
||||
libstd-rust-1.10 binary: dev-pkg-without-shlib-symlink
|
||||
|
||||
# Libraries that use libc symbols (libterm, libstd, etc) *are* linked
|
||||
# to libc. Lintian gets upset that some Rust libraries don't need
|
||||
# libc, boo hoo.
|
||||
libstd-rust-1.9 binary: library-not-linked-against-libc
|
||||
libstd-rust-1.10 binary: library-not-linked-against-libc
|
||||
44
debian/make_orig-dl_tarball.py
vendored
44
debian/make_orig-dl_tarball.py
vendored
@ -1,44 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
deb_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
|
||||
src_root_dir = os.path.realpath(os.path.join(deb_dir, '..'))
|
||||
src_root_parent_dir = os.path.realpath(os.path.join(src_root_dir, '..'))
|
||||
snapshot_dir = os.path.join(src_root_dir, 'src', 'etc')
|
||||
|
||||
os.environ['CFG_SRC_DIR'] = src_root_dir
|
||||
|
||||
os.chdir(src_root_dir)
|
||||
ps = subprocess.Popen(['dpkg-parsechangelog','-SVersion'], stdout=subprocess.PIPE)
|
||||
version = ps.stdout.read()
|
||||
assert version is not None
|
||||
upstream_version = version.split('-')[0]
|
||||
|
||||
sys.path.append(snapshot_dir)
|
||||
from snapshot import determine_curr_snapshot
|
||||
|
||||
snapshots = {}
|
||||
for arch in ('i386', 'x86_64'):
|
||||
snapshots[arch] = determine_curr_snapshot(arch + '-unknown-linux')
|
||||
|
||||
def create_dl_tarball():
|
||||
dl_tarfile = 'rustc_' + upstream_version + '.orig-dl.tar.xz'
|
||||
url_base = 'https://static.rust-lang.org/stage0-snapshots/'
|
||||
out_paths = []
|
||||
for arch, snapshot in snapshots.iteritems():
|
||||
url = url_base + snapshot
|
||||
out_path = os.path.join(src_root_parent_dir, snapshot)
|
||||
subprocess.check_call(["wget", "-N", url], cwd=src_root_parent_dir)
|
||||
out_paths.append(out_path)
|
||||
print "Building %s" % dl_tarfile
|
||||
# extra flags for reproducibility
|
||||
subprocess.check_call([
|
||||
"tar", "--mtime=@%s" % int(time.time()), "--clamp-mtime",
|
||||
"-cJf", dl_tarfile
|
||||
] + snapshots.values(), cwd=src_root_parent_dir)
|
||||
|
||||
create_dl_tarball()
|
||||
22
debian/make_orig-dl_tarball.sh
vendored
Executable file
22
debian/make_orig-dl_tarball.sh
vendored
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
# For versions 1.10 and later.
|
||||
# ONLY FOR BOOTSTRAPPING with DEB_BUILD_PROFILES=dlstage0
|
||||
#
|
||||
# Will create rustc_1.10.0+dfsg1.orig-dl.tar.xz; you should include this
|
||||
# with your source upload.
|
||||
|
||||
set -e
|
||||
|
||||
upstream_version="$(dpkg-parsechangelog -SVersion | sed -e 's/\(.*\)-.*/\1/g')"
|
||||
supported_arch="x86_64 i686"
|
||||
|
||||
rm -rf dl/*.sha256
|
||||
for arch in $supported_arch; do
|
||||
triplet="${arch}-unknown-linux-gnu"
|
||||
python src/etc/get-stage0.py "$triplet"
|
||||
done
|
||||
|
||||
tar --mtime=@"$(date +%s)" --clamp-mtime \
|
||||
-cJf "../rustc_${upstream_version}.orig-dl.tar.xz" \
|
||||
--transform "s/^dl\///" \
|
||||
dl/*
|
||||
10
debian/patches/add-soname
vendored
10
debian/patches/add-soname
vendored
@ -18,15 +18,13 @@ Description: Set DT_SONAME when building dylibs
|
||||
Author: Angus Lees <gus@debian.org>
|
||||
Forwarded: no
|
||||
|
||||
Index: rustc.git/src/librustc_trans/back/link.rs
|
||||
===================================================================
|
||||
--- rustc.git.orig/src/librustc_trans/back/link.rs
|
||||
+++ rustc.git/src/librustc_trans/back/link.rs
|
||||
@@ -1017,6 +1017,12 @@ fn link_args(cmd: &mut Linker,
|
||||
--- a/src/librustc_trans/back/link.rs
|
||||
+++ b/src/librustc_trans/back/link.rs
|
||||
@@ -840,6 +840,12 @@
|
||||
cmd.args(&rpath::get_rpath_flags(&mut rpath_config));
|
||||
}
|
||||
|
||||
+ if dylib && t.options.linker_is_gnu {
|
||||
+ if crate_type == config::CrateTypeDylib && t.options.linker_is_gnu {
|
||||
+ let filename = String::from(out_filename.file_name().unwrap().to_str().unwrap());
|
||||
+ let soname = [String::from("-Wl,-soname=") + &filename];
|
||||
+ cmd.args(&soname);
|
||||
|
||||
36
debian/patches/avoid-redundant-dls.diff
vendored
Normal file
36
debian/patches/avoid-redundant-dls.diff
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
Description: Avoid redundant downloads when bootstrapping
|
||||
If the local file is available, then verify it against the hash we just
|
||||
downloaded, and if it matches then we don't need to download it again.
|
||||
Author: Ximin Luo <infinity0@pwned.gg>
|
||||
Applied-Upstream: commit:a120ae70d08d2eb991c7796e8726debb7ad46dea
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- a/src/bootstrap/bootstrap.py
|
||||
+++ b/src/bootstrap/bootstrap.py
|
||||
@@ -28,6 +28,14 @@
|
||||
|
||||
try:
|
||||
download(sha_path, sha_url, verbose)
|
||||
+ if os.path.exists(path):
|
||||
+ try:
|
||||
+ verify(path, sha_path, verbose)
|
||||
+ print("using already-download file " + path)
|
||||
+ return
|
||||
+ except Exception as e:
|
||||
+ print("failed verification for already-download file " + path)
|
||||
+ os.unlink(path)
|
||||
download(temp_path, url, verbose)
|
||||
verify(temp_path, sha_path, verbose)
|
||||
print("moving " + temp_path + " to " + path)
|
||||
--- a/src/etc/get-stage0.py
|
||||
+++ b/src/etc/get-stage0.py
|
||||
@@ -35,8 +35,7 @@
|
||||
filename = filename_base + '.tar.gz'
|
||||
url = 'https://static.rust-lang.org/dist/' + date + '/' + filename
|
||||
dst = dl_dir + '/' + filename
|
||||
- if not os.path.exists(dst):
|
||||
- bootstrap.get(url, dst)
|
||||
+ bootstrap.get(url, dst)
|
||||
|
||||
stage0_dst = triple + '/stage0'
|
||||
if os.path.exists(stage0_dst):
|
||||
50
debian/patches/dont-download-stage0.diff
vendored
Normal file
50
debian/patches/dont-download-stage0.diff
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
Description: Don't download SHA256 if it's already available locally
|
||||
In Debian we provide the stage0 tarballs as a separate component so that the
|
||||
buildds don't need to access the network during the build.
|
||||
Author: Ximin Luo <infinity0@debian.org>
|
||||
Forwarded: not-needed
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- a/src/bootstrap/bootstrap.py
|
||||
+++ b/src/bootstrap/bootstrap.py
|
||||
@@ -19,15 +19,17 @@
|
||||
import tempfile
|
||||
|
||||
|
||||
-def get(url, path, verbose=False):
|
||||
+def get(url, path, verbose=False, use_local_hash_if_present=False):
|
||||
sha_url = url + ".sha256"
|
||||
with tempfile.NamedTemporaryFile(delete=False) as temp_file:
|
||||
temp_path = temp_file.name
|
||||
- with tempfile.NamedTemporaryFile(suffix=".sha256", delete=False) as sha_file:
|
||||
- sha_path = sha_file.name
|
||||
+ sha_path = path + ".sha256"
|
||||
|
||||
try:
|
||||
- download(sha_path, sha_url, verbose)
|
||||
+ if use_local_hash_if_present and os.path.exists(sha_path):
|
||||
+ print("using already-download file " + sha_path)
|
||||
+ else:
|
||||
+ download(sha_path, sha_url, verbose)
|
||||
if os.path.exists(path):
|
||||
try:
|
||||
verify(path, sha_path, verbose)
|
||||
@@ -41,7 +43,6 @@
|
||||
print("moving " + temp_path + " to " + path)
|
||||
shutil.move(temp_path, path)
|
||||
finally:
|
||||
- delete_if_present(sha_path)
|
||||
delete_if_present(temp_path)
|
||||
|
||||
|
||||
--- a/src/etc/get-stage0.py
|
||||
+++ b/src/etc/get-stage0.py
|
||||
@@ -35,7 +35,7 @@
|
||||
filename = filename_base + '.tar.gz'
|
||||
url = 'https://static.rust-lang.org/dist/' + date + '/' + filename
|
||||
dst = dl_dir + '/' + filename
|
||||
- bootstrap.get(url, dst)
|
||||
+ bootstrap.get(url, dst, use_local_hash_if_present=True)
|
||||
|
||||
stage0_dst = triple + '/stage0'
|
||||
if os.path.exists(stage0_dst):
|
||||
11
debian/patches/fix-debian-cmake-path.diff
vendored
Normal file
11
debian/patches/fix-debian-cmake-path.diff
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/src/compiler-rt/CMakeLists.txt
|
||||
+++ b/src/compiler-rt/CMakeLists.txt
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
# Make use of LLVM CMake modules.
|
||||
file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE)
|
||||
- set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR_CMAKE_STYLE}/share/llvm/cmake")
|
||||
+ set(LLVM_CMAKE_PATH "/usr/share/llvm-3.7/cmake")
|
||||
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
|
||||
# Get some LLVM variables from LLVMConfig.
|
||||
include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
|
||||
4
debian/patches/rust-gdb-paths
vendored
4
debian/patches/rust-gdb-paths
vendored
@ -8,7 +8,7 @@ Forwarded: not-needed
|
||||
+++ b/src/etc/rust-gdb
|
||||
@@ -13,11 +13,13 @@
|
||||
set -e
|
||||
|
||||
|
||||
# Find out where the pretty printer Python module is
|
||||
-RUSTC_SYSROOT=`rustc --print=sysroot`
|
||||
-GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
|
||||
@ -16,7 +16,7 @@ Forwarded: not-needed
|
||||
+#GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
|
||||
+# We can just hardcode this on Debian, and remove the rustc dependency
|
||||
+GDB_PYTHON_MODULE_DIRECTORY="/usr/share/rust-gdb"
|
||||
|
||||
|
||||
# Run GDB with the additional arguments that load the pretty printers
|
||||
-PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" gdb \
|
||||
+PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" exec gdb \
|
||||
|
||||
5
debian/patches/rust-lldb-paths
vendored
5
debian/patches/rust-lldb-paths
vendored
@ -6,10 +6,10 @@ Forwarded: not-needed
|
||||
|
||||
--- a/src/etc/rust-lldb
|
||||
+++ b/src/etc/rust-lldb
|
||||
@@ -18,11 +18,8 @@ TMPFILE=`mktemp /tmp/rust-lldb-commands.XXXXXX`
|
||||
@@ -18,11 +18,8 @@
|
||||
# Make sure to delete the tempfile no matter what
|
||||
trap "rm -f $TMPFILE; exit" INT TERM EXIT
|
||||
|
||||
|
||||
-# Find out where to look for the pretty printer Python module
|
||||
-RUSTC_SYSROOT=`rustc --print sysroot`
|
||||
-
|
||||
@ -18,3 +18,4 @@ Forwarded: not-needed
|
||||
+echo "command script import \"/usr/share/rust-lldb/lldb_rust_formatters.py\"" >> $TMPFILE
|
||||
echo "type summary add --no-value --python-function lldb_rust_formatters.print_val -x \".*\" --category Rust" >> $TMPFILE
|
||||
echo "type category enable Rust" >> $TMPFILE
|
||||
|
||||
|
||||
3
debian/patches/series
vendored
3
debian/patches/series
vendored
@ -2,3 +2,6 @@ rust-gdb-paths
|
||||
rust-lldb-paths
|
||||
add-soname
|
||||
valgrind-workaround.diff
|
||||
fix-debian-cmake-path.diff
|
||||
avoid-redundant-dls.diff
|
||||
dont-download-stage0.diff
|
||||
|
||||
6
debian/patches/valgrind-workaround.diff
vendored
6
debian/patches/valgrind-workaround.diff
vendored
@ -1,7 +1,5 @@
|
||||
Index: rust.c/src/test/run-pass-valgrind/down-with-thread-dtors.rs
|
||||
===================================================================
|
||||
--- rust.c.orig/src/test/run-pass-valgrind/down-with-thread-dtors.rs
|
||||
+++ rust.c/src/test/run-pass-valgrind/down-with-thread-dtors.rs
|
||||
--- a/src/test/run-pass-valgrind/down-with-thread-dtors.rs
|
||||
+++ b/src/test/run-pass-valgrind/down-with-thread-dtors.rs
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
// no-prefer-dynamic
|
||||
|
||||
7
debian/rules
vendored
7
debian/rules
vendored
@ -55,9 +55,10 @@ DEB_CONFIGURE_FLAGS = \
|
||||
DEB_CONFIGURE_FLAGS += --llvm-root=/usr/lib/llvm-3.7
|
||||
|
||||
ifeq (,$(findstring dlstage0,$(DEB_BUILD_PROFILES)))
|
||||
# Without these options, a pre-built stage0 will be downloaded from
|
||||
# rust-lang.org at build time (or looked for in dl/).
|
||||
#DEB_CONFIGURE_FLAGS += --enable-local-rust --local-rust-root=/usr
|
||||
# With the dlstage0 profile, rust build scripts will look for a pre-built
|
||||
# stage0 in dl/. This can either be satisfied by the make_orig-dl_tarball.sh
|
||||
# script, or else the build scripts will download these from rust-lang.org.
|
||||
DEB_CONFIGURE_FLAGS += --enable-local-rust --local-rust-root=/usr
|
||||
endif
|
||||
|
||||
BUILD_DOCS = 1
|
||||
|
||||
4
debian/update-version.sh
vendored
4
debian/update-version.sh
vendored
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
ORIG=1.8
|
||||
NEW=1.9
|
||||
ORIG=1.9
|
||||
NEW=1.10
|
||||
|
||||
sed -i -e "s|libstd-rust-$ORIG|libstd-rust-$NEW|g" control
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user