Import rustc_1.16.0+dfsg1-1.debian.tar.xz
authorXimin Luo <infinity0@debian.org>
Wed, 19 Apr 2017 20:47:18 +0000 (21:47 +0100)
committerXimin Luo <infinity0@debian.org>
Wed, 19 Apr 2017 20:47:18 +0000 (21:47 +0100)
[dgit import tarball rustc 1.16.0+dfsg1-1 rustc_1.16.0+dfsg1-1.debian.tar.xz]

65 files changed:
README.Debian [new file with mode: 0644]
README.source [new file with mode: 0644]
TODO.Debian [new file with mode: 0644]
architecture-test.mk [new file with mode: 0644]
architecture.mk [new file with mode: 0644]
bin/grun [new file with mode: 0755]
build-preview-dsc.sh [new file with mode: 0755]
changelog [new file with mode: 0644]
compat [new file with mode: 0644]
control [new file with mode: 0644]
copyright [new file with mode: 0644]
docs [new file with mode: 0644]
ensure-patch [new file with mode: 0755]
gbp.conf [new file with mode: 0644]
icons/rust-logo-32x32-blk.png [new file with mode: 0644]
libstd-rust-1.16.lintian-overrides [new file with mode: 0644]
libstd-rust-dev.install [new file with mode: 0644]
libstd-rust-dev.lintian-overrides [new file with mode: 0644]
make_orig-dl_tarball.sh [new file with mode: 0755]
patches/d-add-soname.patch [new file with mode: 0644]
patches/d-disable-doc-build-in-all.diff [new file with mode: 0644]
patches/d-dont-download-stage0.patch [new file with mode: 0644]
patches/d-dynamic-link-llvm.patch [new file with mode: 0644]
patches/d-dynamic-link-llvm_1.15.patch [new file with mode: 0644]
patches/d-fill-in-mips-mk-rules.patch [new file with mode: 0644]
patches/d-fix-configure-for-deb-arches.patch [new file with mode: 0644]
patches/d-fix-configure-for-deb-arches_1.15.patch [new file with mode: 0644]
patches/d-missing-ref-dlsym-ppc64el.patch [new file with mode: 0644]
patches/d-rust-gdb-paths [new file with mode: 0644]
patches/d-rust-lldb-paths [new file with mode: 0644]
patches/d-use-system-jquery.patch [new file with mode: 0644]
patches/gcc-4.8-aarch64-ice.diff [new file with mode: 0644]
patches/series [new file with mode: 0644]
patches/u-arm-on-64bit-kernel.diff [new file with mode: 0644]
patches/u-destdir-support.diff [new file with mode: 0644]
patches/u-detect-mips-cpu.patch [new file with mode: 0644]
patches/u-ignoretest-arm64-stdcall.patch [new file with mode: 0644]
patches/u-ignoretest-arm64.patch [new file with mode: 0644]
patches/u-ignoretest-armhf_01.patch [new file with mode: 0644]
patches/u-ignoretest-armhf_02.patch [new file with mode: 0644]
patches/u-ignoretest-armhf_03.patch [new file with mode: 0644]
patches/u-ignoretest-armhf_04.patch [new file with mode: 0644]
patches/u-ignoretest-i386.patch [new file with mode: 0644]
patches/u-ignoretest-powerpc.patch [new file with mode: 0644]
patches/u-reproducible-dl-stage0.patch [new file with mode: 0644]
rules [new file with mode: 0755]
rust-doc.doc-base.book [new file with mode: 0644]
rust-doc.doc-base.intro [new file with mode: 0644]
rust-doc.doc-base.reference [new file with mode: 0644]
rust-doc.docs [new file with mode: 0644]
rust-doc.install [new file with mode: 0644]
rust-doc.links [new file with mode: 0644]
rust-gdb.install [new file with mode: 0644]
rust-gdb.links [new file with mode: 0644]
rust-lldb.install [new file with mode: 0644]
rust-lldb.links [new file with mode: 0644]
rustc.install [new file with mode: 0644]
rustc.lintian-overrides [new file with mode: 0644]
rustc.manpages [new file with mode: 0644]
source/format [new file with mode: 0644]
source/include-binaries [new file with mode: 0644]
source/options [new file with mode: 0644]
update-version.sh [new file with mode: 0644]
upstream/signing-key.asc [new file with mode: 0644]
watch [new file with mode: 0644]

diff --git a/README.Debian b/README.Debian
new file mode 100644 (file)
index 0000000..3aeb6a1
--- /dev/null
@@ -0,0 +1,142 @@
+Shared libraries
+================
+
+For now, the shared libraries of Rust are private.
+The rational is the following:
+ * Upstream prefers static linking for now
+   - https://github.com/rust-lang/rust/issues/10209
+ * rust is still under heavy development. As far as we know, there is
+   no commitement from upstream to provide a stable ABI for now.
+   Until we know more, we cannot take the chance to have Rust-built packages
+   failing at each release of the compiler.
+ * Static builds are working out of the box just fine
+ * However, LD_LIBRARY_PATH has to be updated when -C prefer-dynamic is used
+
+ -- Sylvestre Ledru <sylvestre@debian.org>, Fri, 13 Feb 2015 15:08:43 +0100
+
+Building from source
+====================
+
+By default, the Debian rustc package will use the system rustc to bootstrap
+itself from. The system rustc has to be either the previous or the same version
+as the rustc being built; the build will fail if this is not the case.
+
+  apt-get source --compile rustc
+
+Alternatively, you may give the "pkg.rustc.dlstage0" DEB_BUILD_PROFILE to
+instead use the process defined by Rust upstream. This downloads the "official"
+stage0 compiler for the version being built from rust-lang.org. At the time of
+writing "official" means "the previous stable version".
+
+  apt-get source --compile --build-profiles=pkg.rustc.dlstage0 rustc
+
+If neither of these options are acceptable to you, (e.g. because your build
+process cannot access the network), see the below sections on "Bootstrapping"
+for more options.
+
+Bootstrapping a new distro
+==========================
+
+If you want to bootstrap a new distro that does not already have rustc, you
+may run `debian/rules source_orig-dl` to create a .dsc that does not
+Build-Depend on rustc. Instead, it includes an extra orig-dl source tarball
+that contains the official stage0 compiler, pre-downloaded from rust-lang.org
+so that your build daemons don't need to access the network during the build.
+
+  debian/rules source_orig-dl
+  sbuild ../rustc_*.dsc
+
+To only bootstrap specific architectures, run this instead:
+
+  upstream_bootstrap_arch="arm64 armel armhf" debian/rules source_orig-dl
+
+This way, other architectures will be omitted from the orig-dl tarball. You
+might want to do this e.g. if these other architectures are already present in
+your distro, but the $upstream_bootstrap_arch ones are not yet present.
+
+Notes
+-----
+
+The approach here is based on doing a *source-only upload*, where the building
+of the binary packages are done by automatic build daemons. We achieve this, by
+bundling the upstream bootstrapping binaries inside the Debian source package.
+This is a nasty hack that stretches the definition of "source package", but is
+unavoidable if we want to securely bootstrap self-hosted compilers.
+
+This differs from the traditional Debian way of bootstrapping compilers, which
+involves locally building a "stage0" Debian package using upstream binaries
+(instead of Debian build dependencies that don't yet exist), then using this
+stage0 Debian package to do a "standard" build that then forms part of a binary
+upload. This allows the source package to remain binary-free. However, both the
+original stage0 package and upstream binaries are lost, and Debian currently
+does not have any policy nor infrastructure that can try to reproduce what the
+uploader supposedly did.
+
+The advantage of our (non-traditional) approach is that anyone can download
+this source package if they want to build the binaries themselves - they can
+just follow the same automatic build processes that apply to every other Debian
+package. If the build process is reproducible [1] then they can be sure that
+*you* (as the Debian Developer that prepared the source-only upload) didn't
+backdoor the binaries, nor did the automatic build daemons even if they were
+compromised during the build.
+
+(The upstream binaries contained in the orig-dl tarball may still have been
+backdoored. However, this is true in both scenarios - our arrangement is still
+a strict improvement in security, because it reduces the set of "things that
+may have been backdoored". Furthermore, more people use the upstream binaries,
+so presumably any backdoors would be noticed more quickly.)
+
+In the future, both approaches are unifiable into a single secure process, as
+long as:
+
+1. We can trace the binaries that were *actually used* in the original
+   bootstrapping event.
+2. We can optionally *choose* to use a different bootstrapping binary, such as
+   an independently-written rustc.
+3. We have a unified well-defined process for both (1) or (2), that applies to
+   all bootstrapped packages (not just rustc). "Well-defined" means that it can
+   be automated by a program, and it can verify that both options result in the
+   same binary outputs (after the stage2 compilation step).
+
+This is otherwise known as Diverse Double-Compilation.
+
+[1] https://github.com/rust-lang/rust/issues/34902
+[2] http://www.dwheeler.com/trusting-trust/
+
+Bootstrapping a new architecture
+================================
+
+Compiling from upstream releases
+--------------------------------
+
+See the previous section, "Bootstrapping a new distro", specifically the part
+about how to "only bootstrap specific architectures".
+
+For Debian, we should be able to support armhf soon:
+
+Complete: armhf https://github.com/rust-lang/rust/issues/35590
+In-progress: ppc64, ppc64el, s390x: https://github.com/rust-lang/rust/issues/36006
+In-progress: mips, mipsel, mips64el: https://github.com/rust-lang/rust/issues/36015
+
+Cross-compiling from Debian packages
+------------------------------------
+
+WARNING: This does not work yet
+
+0. Start with rust installed on an existing platform
+
+1. Build a rust cross-compiler targeting new architecture
+
+    sudo apt-get build-dep --build-profile=nodoc rustc
+    dpkg-buildpackage -t $new_arch
+
+2. Use cross-compiler to build a compiler that runs on new architecture
+
+    dpkg --add-architecture $new_arch
+    sudo apt-get build-dep --host-architecture=$new_arch rustc
+    dpkg-buildpackage -a $new_arch
+
+    # Perhaps this is sufficient ??
+    #apt-get source --compile --host-architecture=$new_arch rustc
+
+ -- Angus Lees <gus@debian.org>, Sun,  1 Feb 2015 16:16:44 +1100
diff --git a/README.source b/README.source
new file mode 100644 (file)
index 0000000..f628156
--- /dev/null
@@ -0,0 +1,41 @@
+Document by Luca Bruno & Sylvestre Ledru
+
+This source package is unfortunately quite tricky and with
+several cutting edges, due to the complexity of rust-lang
+bootstrapping system and the high rate of language changes
+still ongoing.
+
+We try to describe here inner packaging details and the
+reasons behind them.
+
+
+Embedded libraries
+==================
+
+This source package embeds several external libraries (foeked and managed
+by rust upstream as git submodules).
+In early stages, many more libraries were forked/emebedded but we are steadily
+progressing in splitting them out.
+
+Here below the remaining ones, with the technical reasons.
+
+ * jemalloc from https://github.com/rust-lang/jemalloc
+   -> system-wide one can't be used due to rust using a "je_" prefix.
+
+   This is intentional upstream design and won't change soon, see:
+    - https://github.com/rust-lang/rust/pull/18678
+    - http://smallcultfollowing.com/babysteps/blog/2014/11/14/allocators-in-rust/
+
+ * compiler-rt from https://github.com/rust-lang/compiler-rt
+   -> system-wide compiler-rt fails during linkage
+
+   Bug reported upstream, still to be fixed, see:
+    - https://github.com/rust-lang/rust/issues/15054
+    - https://github.com/rust-lang/rust/issues/15708
+
+As a summary, we plan to:
+ * keep embedding jemalloc (probably forever)
+ * work with upstream to fix compiler-rt linkage soon.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 27 Mar 2015 14:27:12 +0100
+
diff --git a/TODO.Debian b/TODO.Debian
new file mode 100644 (file)
index 0000000..e8361f7
--- /dev/null
@@ -0,0 +1,25 @@
+Later:
+
+ * Try to investigate the 1 hour vs 7 hour build time difference we saw between
+   git diff debian/1.13.0+dfsg1-2..debian/1.14.0+dfsg1-1 -- debian
+
+<eddyb> infinity0: LLVM [in Rust]?
+<eddyb> infinity0: ./configure --enable-debug has this annoying detail that nobody has fixed yet, that it disabled optimizations
+<eddyb> so you always have to add --enable-optimize or something like that to counteract the negative effect
+<eddyb> unoptimized rustc is *very* slow, in fact it's my sole guess for 7 hours, assuming you didn't just simply lose 8x parallelism or something
+
+<eddyb> infinity0: -Z time-passes between two different compilers, on the same test, would also be pretty revealing
+<eddyb> infinity0: also try timing the entire compile-fail test run between stage1/bin/rustc and stage2/bin/rustc (the latter is what running tests uses by default)
+<eddyb> infinity0: in the old thing [pre-rustbuild makefiles] it's... make check-stage1-cfail, I think
+
+Older backlog:
+
+ * Use Compiler-rt package
+ * Improve the bootstrap (do the local build first on our systems, upload
+   to Debian and use the packages)
+ * Port on other archs
+ * Create a runtime package (rust-runtime)
+ * Move the runtime library into a public directory
+ * Package the various editors plugins (emacs, kate & vim)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 20 Jan 2015 08:50:28 +0100
diff --git a/architecture-test.mk b/architecture-test.mk
new file mode 100644 (file)
index 0000000..73e4ddc
--- /dev/null
@@ -0,0 +1,16 @@
+# Used for testing architecture.mk, and for make_orig-dl_tarball.sh.
+# Not for end users.
+#
+# Usage:
+# $ make -s --no-print-directory -f debian/architecture-test.mk rust-for-deb_arm64
+# arm64 aarch64-unknown-linux-gnu
+
+include debian/architecture.mk
+
+deb_arch_setvars = $(foreach var,ARCH ARCH_OS ARCH_CPU ARCH_BITS ARCH_ENDIAN GNU_CPU GNU_SYSTEM GNU_TYPE MULTIARCH,\
+  $(eval DEB_$(1)_$(var) = $(shell dpkg-architecture -a$(1) -qDEB_HOST_$(var) 2>/dev/null)))
+
+rust-for-deb_%:
+       $(eval $(call deb_arch_setvars,$*))
+       $(eval $(call rust_type_setvar,DEB_$*))
+       @echo $(DEB_$(*)_ARCH) $(DEB_$(*)_RUST_TYPE)
diff --git a/architecture.mk b/architecture.mk
new file mode 100644 (file)
index 0000000..daeda01
--- /dev/null
@@ -0,0 +1,14 @@
+# This Makefile snippet defines DEB_*_RUST_TYPE triples based on DEB_*_GNU_TYPE
+
+include /usr/share/dpkg/architecture.mk
+
+rust_cpu = $(subst i586,i686,$(if $(findstring -armhf-,-$(2)-),$(subst arm,armv7,$(1)),$(1)))
+rust_type_setvar = $(1)_RUST_TYPE ?= $(call rust_cpu,$($(1)_GNU_CPU),$($(1)_ARCH))-unknown-$($(1)_GNU_SYSTEM)
+
+$(foreach machine,BUILD HOST TARGET,\
+  $(eval $(call rust_type_setvar,DEB_$(machine))))
+
+# fallback for older dpkg versions
+ifeq ($(DEB_TARGET_RUST_TYPE),-unknown-)
+  DEB_TARGET_RUST_TYPE = $(DEB_HOST_RUST_TYPE)
+endif
diff --git a/bin/grun b/bin/grun
new file mode 100755 (executable)
index 0000000..394adc6
--- /dev/null
+++ b/bin/grun
@@ -0,0 +1,5 @@
+#!/bin/sh
+# TODO(infinity0): this can be removed when antlr4 provide this as a convenience script
+# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814253 for details.
+# Don't forget to update override_dh_auto_configure when you remove it.
+exec java -cp /usr/share/java/antlr4.jar:/usr/share/java/antlr4-runtime.jar org.antlr.v4.gui.TestRig "$@"
diff --git a/build-preview-dsc.sh b/build-preview-dsc.sh
new file mode 100755 (executable)
index 0000000..3d83702
--- /dev/null
@@ -0,0 +1,138 @@
+#!/bin/sh
+# Build a Debian source package out of an existing unpacked rustc deb source,
+# and the official rust preview releases.
+#
+# infinity0 occasionally makes, builds and uploads them here:
+# https://launchpad.net/~infinity0/+archive/ubuntu/rust-nightly
+# https://launchpad.net/~infinity0/+archive/ubuntu/rust-beta
+
+# You can set these env vars to tweak the behaviour of this script.
+CHANNEL="${CHANNEL:-beta}" # either beta or nightly
+DIST="${DIST:-experimental}" # which suite to put in debian/changelog
+DEBDIR="${DEBDIR:-}" # where is the debian/ directory? defaults to this script
+NOREMOTE="${NOREMOTE:-false}" # e.g. if you have already downloaded all necessary files
+# note that we already use "wget -N" to avoid redundant downloads
+NOCLOBBER="${NOCLOBBER:-true}" # don't rebuild if we already have the .dsc
+DPUT_HOST="${DPUT_HOST}" # optional host dput the resulting .dsc to
+ARCHES="amd64 arm64 i386"
+
+do_temporary_fixups() {
+# patches needed to subsequent versions go here
+local verprefix="${1%.0-beta.?}"
+verprefix="${verprefix%.0-nightly}"
+( cd debian/patches
+local f
+for f in *; do
+       fb="${f%.patch}"
+       fb="${fb%.diff}"
+       # if an updated patch exists, use it
+       if test -f "${fb}_${verprefix}"*; then mv "${fb}_${verprefix}"* "$f"; fi
+done )
+case "$1" in
+"1.14."*|"1.15."*)
+       dquilt delete ignore-stdcall-test-on-arm64.patch
+       ;;
+esac
+}
+
+abort() { local x="$1"; shift; echo >&2 "$@"; exit "$x"; }
+
+dquilt() {
+    QUILT_PATCHES="debian/patches" \
+    QUILT_PATCH_OPTS="--reject-format=unified" \
+    QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto" \
+    QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index" \
+    quilt "$@"
+}
+
+HOST="https://static.rust-lang.org"
+BASENAME="rustc-$CHANNEL-src.tar.gz"
+JQUERY="https://code.jquery.com/jquery-2.1.4.js"
+
+SCRIPTDIR="$(dirname "$0")"
+DEBDIR="$(readlink -f ${DEBDIR:-$SCRIPTDIR})"
+echo "using DEBDIR=$DEBDIR as debian tree to copy into upstream tarball"
+test "$PWD" = "${PWD#$DEBDIR}" || abort 1 "must run from outside DEBDIR"
+test -d "$DEBDIR" || abort 1 "DEBDIR not a directory: $DEBDIR"
+
+set -x
+set -e
+
+$NOREMOTE || wget -N "$HOST/dist/$BASENAME"
+$NOREMOTE || wget -N "$HOST/dist/$BASENAME.asc"
+$NOREMOTE || gpg2 -v "$BASENAME.asc"
+$NOREMOTE || wget -N "$HOST/dist/index.txt"
+MODDATE1="$(grep "^/dist/$BASENAME," index.txt \
+  | cut -d, -f3 | sed -e 's/\(.*\)-\(.*\)-\(.*\)T.*/\1\2\3/')"
+MODDATE2="$(TZ=UTC stat "$BASENAME" -c %y | sed -e 's/\(.*\)-\(.*\)-\([0-9]*\) .*$/\1\2\3/')"
+$NOREMOTE || test "$MODDATE1" = "$MODDATE2" || abort 2 "file mod times don't match, try again"
+$NOREMOTE || wget -N "$JQUERY"
+
+rm -rf "rustc-$CHANNEL"
+tar xf "$BASENAME"
+
+cd "rustc-$CHANNEL"
+{
+       echo "CFG_RELEASE_CHANNEL=$CHANNEL"
+       echo "CFG_HASH_COMMAND=md5sum | cut -c1-8"
+       sed -n -e '/^CFG_RELEASE/,/^##/{/^CFG_INFO/d;p}' mk/main.mk
+       echo "all:"
+       echo "  @echo export CFG_RELEASE=\$(CFG_RELEASE)"
+} | make -f - > ./envvars
+. ./envvars
+NEWUPSTR="$(echo "$CFG_RELEASE.$MODDATE2+dfsg1" | sed -e 's/-beta/~beta/' -e 's/-nightly/~~nightly/')"
+if $NOCLOBBER && test -f "../rustc_$NEWUPSTR-1.dsc"; then
+       cd ..
+       rm -rf "rustc-$CHANNEL"
+       abort 0 "already have rustc_$NEWUPSTR-1.dsc; set NOCLOBBER=false if you want to force"
+fi
+cp -a "$DEBDIR" .
+mk-origtargz --repack --compression xz -v "$NEWUPSTR" "../$BASENAME"
+cd ..
+
+rm -rf "rustc-$CHANNEL" "rustc-$NEWUPSTR"
+tar xf "rustc_$NEWUPSTR.orig.tar.xz"
+mv "rustc-$CHANNEL" "rustc-$NEWUPSTR"
+
+libstd_ver() {
+       dpkg-parsechangelog --show-field Version | sed -re 's/([^.]+)\.([^.]+)\..*/\1.\2/'
+}
+
+cd "rustc-$NEWUPSTR"
+cp -a "$DEBDIR" .
+
+OLD_LIBVER="$(libstd_ver)"
+dch -D "$DIST" -v "$NEWUPSTR-1" "Team upload."
+dch -a "Switch to $CHANNEL channel."
+NEW_LIBVER="$(libstd_ver)"
+do_temporary_fixups "$CFG_RELEASE"
+mkdir -p ../"dl_${CFG_RELEASE}"
+ln -sf ../"dl_${CFG_RELEASE}" dl
+# TODO: don't do this if orig-dl already exists
+$NOREMOTE || upstream_bootstrap_arch="$ARCHES" debian/rules source_orig-dl
+rm -f dl
+cp -al ../"dl_${CFG_RELEASE}" dl
+# set build-dep arch exceptions
+deb_bd_arch_ex="$(echo "$ARCHES" | sed -e 's/\S*/!\0/g')"
+sed -e 's/rustc (\(.*\))\( *\[\(.*\)\]\)\?/rustc (\1) ['"$deb_bd_arch_ex"']/g' -i debian/control
+
+rm -f debian/missing-sources/jquery-*
+cp "../$(basename "$JQUERY")" debian/missing-sources
+sed -i -e "s/$OLD_LIBVER/$NEW_LIBVER/" "debian/control"
+sed -i -e 's/\(RELEASE_CHANNEL := \)\(.*\)/\1'"$CHANNEL"'/g' debian/rules
+sed -i -e 's/^update .*/update '"$OLD_LIBVER $NEW_LIBVER"'/' debian/update-version.sh
+( cd debian && bash ./update-version.sh )
+
+while dquilt push; do dquilt refresh; done
+dquilt pop -a
+rm -rf .pc
+dpkg-buildpackage -d -S
+cd ..
+
+if test -n "$DPUT_HOST"; then
+       dput "$DPUT_HOST" "rustc_$NEWUPSTR-1_source.changes"
+else
+       set +x
+       echo "Source package built, but there is NO GUARANTEE THAT IT WORKS!"
+       echo "You should now try to build it with \`sudo cowbuilder --build rustc_$NEWUPSTR-1.dsc\`"
+fi
diff --git a/changelog b/changelog
new file mode 100644 (file)
index 0000000..1d8e9ca
--- /dev/null
+++ b/changelog
@@ -0,0 +1,417 @@
+rustc (1.16.0+dfsg1-1) unstable; urgency=medium
+
+  * Upload to unstable so we have something to build 1.17 with.
+  * Update u-ignoretest-powerpc.patch for 1.16.
+
+ -- Ximin Luo <infinity0@debian.org>  Wed, 19 Apr 2017 22:47:18 +0200
+
+rustc (1.16.0+dfsg1-1~exp2) experimental; urgency=medium
+
+  * Don't ignore test failures on Debian unstable.
+  * Re-fix ignoring armhf test, accidentally reverted in previous version.
+  * Try to fix buildd failure by swapping B-D alternatives.
+
+ -- Ximin Luo <infinity0@debian.org>  Sun, 16 Apr 2017 15:05:47 +0200
+
+rustc (1.16.0+dfsg1-1~exp1) experimental; urgency=medium
+
+  * New upstream release
+  * u-ignoretest-jemalloc.patch removed (applied upstream)
+
+  [ Matthias Klose ]
+  * Bootstrap using the rustc version in the archive, on all architectures.
+  * Work around a GCC 4.8 ICE on AArch64.
+  * Use alternative build dependencies on cmake3 and binutils-2.26 for
+    builds on 14.04 LTS (trusty).
+  * debian/make_orig*dl_tarball.sh: Include all Ubuntu architectures.
+  * debian/rules: Ignore test results for now.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 13 Apr 2017 15:24:03 +0200
+
+rustc (1.15.1+dfsg1-1) unstable; urgency=medium
+
+  * Upload to unstable so we have something to build 1.16 with.
+  * Try to fix ignoring atomic-lock-free tests on armhf.
+
+ -- Ximin Luo <infinity0@debian.org>  Wed, 22 Mar 2017 00:13:27 +0100
+
+rustc (1.15.1+dfsg1-1~exp3) experimental; urgency=medium
+
+  * Ignore atomic-lock-free tests on armhf.
+  * Update ignoretest-armhf_03.patch for newer 1.15.1 behaviour.
+  * Tidy up some other patches to do with ignoring tests.
+
+ -- Ximin Luo <infinity0@debian.org>  Sun, 12 Mar 2017 04:15:33 +0100
+
+rustc (1.15.1+dfsg1-1~exp2) experimental; urgency=medium
+
+  * Update armhf ignoretest patch.
+  * Bootstrap armhf. (Closes: #809316, #834003)
+  * Bootstrap ppc4el. (Closes: #839643)
+  * Fix rust-lldb symlink. (Closes: #850639)
+
+ -- Ximin Luo <infinity0@debian.org>  Thu, 02 Mar 2017 23:01:26 +0100
+
+rustc (1.15.1+dfsg1-1~exp1) experimental; urgency=medium
+
+  * New upstream release (won't probably be in stretch).
+    see the 1.4 git branch for the follow up for stable
+  * Call to the test renamed from check-notidy => check
+  * d/p/u-destdir-support.diff: Apply upstream patch to support
+    destdir in the make install (for rustbuild, in later versions)
+  * Overrides the 'binary-or-shlib-defines-rpath' lintian warnings.
+    We need them for now
+  * Refresh of the patches
+
+  [ Sven Joachim ]
+  * Drop Pre-Depends on multiarch-support. (Closes: #856109)
+
+  [ Erwan Prioul ]
+  * Fix test and build failures for ppc64el. (Closes: #839643)
+
+  [ Ximin Luo ]
+  * Disable rustbuild for the time being (as it was in 1.14) and instead
+    bootstrap two new arches, armhf and ppc64el.
+  * Switch back to debhelper 9 to make backporting easier.
+  * Switch Build-Depends on binutils-multiarch back to binutils, the former is
+    no longer needed by the upstream tests.
+
+  [ Matthias Klose ]
+  * Compatibility fixes and improvements to help work better on Ubuntu.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sun, 26 Feb 2017 21:12:27 +0100
+
+rustc (1.14.0+dfsg1-3) unstable; urgency=medium
+
+  * Fix mips64 Makefile patches.
+  * Don't run arch-dep tests in a arch-indep build.
+
+ -- Ximin Luo <infinity0@debian.org>  Wed, 04 Jan 2017 21:34:56 +0100
+
+rustc (1.14.0+dfsg1-2) unstable; urgency=medium
+
+  * Update README.Debian, the old one was way out of date.
+  * Detect mips CPUs in ./configure and fill in mips Makefile rules.
+  * Work around jemalloc-related problems in the upstream bootstrapping
+    binaries for arm64, ppc64el, s390x.
+  * Disable jemalloc on s390x - upstream already disable it for some other
+    arches.
+  * Disable jemalloc tests for arches where jemalloc is disabled.
+  * We still expect the following failures:
+    * arm64 should be fixed (i.e. no failures) compared to the previous upload.
+    * armhf will FTBFS due to 'Illegal instruction' and this can only be fixed
+      with the next stable rustc release.
+    * mips mipsel mips64el ppc64 ppc64el s390x will FTBFS due to yet other
+      test failures beyond the ones I fixed above; this upload is only to save
+      me manual work in producing nice reports that exhibit these failures.
+
+ -- Ximin Luo <infinity0@debian.org>  Thu, 29 Dec 2016 23:00:47 +0100
+
+rustc (1.14.0+dfsg1-1) unstable; urgency=medium
+
+  [ Sylvestre Ledru ]
+  * New upstream release
+  * Update debian/watch
+
+  [ Ximin Luo ]
+  * Try to bootstrap armhf ppc64 ppc64el s390x mips mipsel mips64el.
+    (Closes: #809316, #834003, #839643)
+  * Make rust-gdb and rust-lldb arch:all packages.
+  * Switch to debhelper 10.
+
+ -- Ximin Luo <infinity0@debian.org>  Sat, 24 Dec 2016 18:03:03 +0100
+
+rustc (1.13.0+dfsg1-2) unstable; urgency=high
+
+  * Skip macro-stepping test on arm64, until
+    https://github.com/rust-lang/rust/issues/37225 is resolved.
+
+ -- Luca Bruno <lucab@debian.org>  Sat, 26 Nov 2016 23:40:14 +0000
+
+rustc (1.13.0+dfsg1-1) unstable; urgency=medium
+
+  [ Sylvestre Ledru ]
+  * New upstream release.
+
+  [ Ximin Luo ]
+  * Use Debian system jquery instead of upstream's embedded copy.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 11 Nov 2016 13:35:23 +0100
+
+rustc (1.12.1+dfsg1-1) unstable; urgency=medium
+
+  [ Sylvestre Ledru ]
+  * New (minor) upstream release
+  * Missing dependency from rust-lldb to python-lldb-3.8 (Closes: #841833)
+  * Switch to llvm 3.9. (Closes: #841834)
+
+  [ Ximin Luo ]
+  * Dynamically apply rust-boot-1.12.1-from-1.12.0.diff.
+    This allows us to bootstrap from either 1.11.0 or 1.12.0.
+  * Bump LLVM Build-Depends version to get the backported patches for LLVM
+    #30402 and #29163.
+  * Install debugger_pretty_printers_common to rust-gdb and rust-lldb.
+    (Closes: #841835)
+
+ -- Ximin Luo <infinity0@debian.org>  Mon, 07 Nov 2016 14:15:14 +0100
+
+rustc (1.12.0+dfsg1-2) unstable; urgency=medium
+
+  * Ignore test run-make/no-duplicate-libs. Fails on i386
+  * Ignore test run-pass-valgrind/down-with-thread-dtors.rs . Fails on arm64
+  * I am not switching to llvm 3.9 now because a test freezes. The plan is
+    to silent the warning breaking the build and upload 1.12.1 after
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 05 Oct 2016 10:48:01 +0200
+
+rustc (1.12.0+dfsg1-1) unstable; urgency=medium
+
+  * new upstream release
+    - Rebase of the patches and removal of deprecated patches
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 29 Sep 2016 20:45:04 +0200
+
+rustc (1.11.0+dfsg1-3) unstable; urgency=medium
+
+  * Fix separate build-arch and build-indep builds.
+
+ -- Ximin Luo <infinity0@debian.org>  Tue, 13 Sep 2016 12:30:41 +0200
+
+rustc (1.11.0+dfsg1-2) unstable; urgency=medium
+
+  * Fix rebuilding against the current version, by backporting a patch I wrote
+    that was already applied upstream. Should fix the FTBFS that was observed
+    by tests.reproducible-builds.org.
+  * Ignore a failing stdcall test on arm64; should fix the FTBFS there.
+  * Backport a doctest fix I wrote, already applied upstream.
+
+ -- Ximin Luo <infinity0@debian.org>  Mon, 12 Sep 2016 17:40:12 +0200
+
+rustc (1.11.0+dfsg1-1) unstable; urgency=medium
+
+  * New upstream release
+  * Add versioned binutils dependency. (Closes: #819475, #823540)
+
+ -- Ximin Luo <infinity0@debian.org>  Wed, 07 Sep 2016 10:31:57 +0200
+
+rustc (1.10.0+dfsg1-3) unstable; urgency=medium
+
+  * Rebuild with LLVM 3.8, same as what upstream are using
+  * Dynamically link against LLVM. (Closes: #832565)
+
+ -- Ximin Luo <infinity0@debian.org>  Sat, 30 Jul 2016 22:36:41 +0200
+
+rustc (1.10.0+dfsg1-2) unstable; urgency=medium
+
+  * Tentatively support ARM architectures
+  * Include upstream arm64,armel,armhf stage0 compilers (i.e. 1.9.0 stable)
+    in a orig-dl tarball, like how we previously did for amd64,i386.
+
+ -- Ximin Luo <infinity0@debian.org>  Fri, 22 Jul 2016 15:54:51 +0200
+
+rustc (1.10.0+dfsg1-1) unstable; urgency=medium
+
+  * New upstream release
+  * Add myself to uploaders
+  * Update our build process to bootstrap from the previous Debian rustc stable
+    version by default. See README.Debian for other options.
+  * Update to latest Standards-Version; no changes required.
+
+ -- Ximin Luo <infinity0@debian.org>  Sun, 17 Jul 2016 03:40:49 +0200
+
+rustc (1.9.0+dfsg1-1) unstable; urgency=medium
+
+  * New upstream release (Closes: #825752)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sun, 29 May 2016 17:57:38 +0200
+
+rustc (1.8.0+dfsg1-1) unstable; urgency=medium
+
+  * New upstream release
+
+  [ Ximin Luo ]
+  * Fix using XZ for the orig tarball: needs explicit --repack in debian/watch
+  * Drop wno-error patch; applied upstream.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 15 Apr 2016 12:01:45 +0200
+
+rustc (1.7.0+dfsg1-1) unstable; urgency=medium
+
+  * New upstream release
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 03 Mar 2016 22:41:24 +0100
+
+rustc (1.6.0+dfsg1-3) unstable; urgency=medium
+
+  * Apply upstream fix to silent a valgrind issue in the test suite
+    (Closes: ##812825)
+  * Add gcc & libc-dev as dependency of rustc to make sure it works
+    out of the box
+
+  [ Ximin Luo ]
+  * Work around rust bug https://github.com/rust-lang/rust/issues/31529
+  * Enable optional tests, and add verbosity/backtraces to tests
+  * Use XZ instead of GZ compression (will apply to the next new upload)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 02 Feb 2016 15:08:11 +0100
+
+rustc (1.6.0+dfsg1-2) unstable; urgency=medium
+
+  * mk/rt.mk: Modify upstream code to append -Wno-error rather than trying
+    to remove the string "-Werror".  (Closes: #812448)
+  * Disable new gcc-6 "-Wmisleading-indentation" warning, which triggers
+    (incorrectly) on src/rt/miniz.c.  (Closes: #811573)
+  * Guard arch-dependent dh_install commands appropriately, fixing
+    arch-indep-only builds.  (Closes: #809124)
+
+ -- Angus Lees <gus@debian.org>  Tue, 26 Jan 2016 05:40:14 +1100
+
+rustc (1.6.0+dfsg1-1) unstable; urgency=medium
+
+  * new upstream release
+
+  [ Ximin Luo ]
+  * Use secure links for Vcs-* fields.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 22 Jan 2016 10:56:08 +0100
+
+rustc (1.5.0+dfsg1-1) unstable; urgency=medium
+
+  * New upstream release
+    - We believe that we should let rust transit to testing
+      (Closes: #786836)
+  * Move away from hash to the same rust naming schema
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 10 Dec 2015 17:23:32 +0100
+
+rustc (1.4.0+dfsg1-1) unstable; urgency=medium
+
+  * New upstream release
+    198068b3 => 1bf6e69c
+  * Update the download url in debian/watch
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 30 Oct 2015 09:36:02 +0100
+
+rustc (1.3.0+dfsg1-1) unstable; urgency=medium
+
+  * New upstream release
+    62abc69f => 198068b3
+  * jquery updated from 2.1.0 to 2.1.4
+
+  [ Ximin Luo ]
+  * Use LLVM 3.7 as upstream does, now that it's released. (Closes: #797626)
+  * Fix debian/copyright syntax mistakes.
+  * Don't Replace/Break previous versions of libstd-rust-*
+  * Check that the libstd-rust-* name in d/control matches upstream.
+  * Several other minor build tweaks.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 19 Sep 2015 14:39:35 +0200
+
+rustc (1.2.0+dfsg1-1) unstable; urgency=medium
+
+  * New upstream release
+    libstd-rust-7d23ff90 => libstd-rust-62abc69f
+  * Add llvm-3.6-tools to the build dep as it is
+    now needed for tests
+  * Fix the Vcs-Browser value
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 08 Aug 2015 23:13:44 +0200
+
+rustc (1.1.0+dfsg1-3) unstable; urgency=medium
+
+  * rust-{gdb,lldb} now Replaces pre-split rustc package.
+    Closes: #793433.
+  * Several minor lintian cleanups.
+
+ -- Angus Lees <gus@debian.org>  Fri, 24 Jul 2015 17:47:48 +1000
+
+rustc (1.1.0+dfsg1-2) unstable; urgency=medium
+
+  [ Angus Lees ]
+  * Replace remote Rust logo with local file in HTML docs.
+  * Symlink rust-{gdb,lldb}.1 to {gdb,lldb}.1 manpages.
+    Note that gdb.1 requires the gdb-doc package, and that lldb.1 doesn't
+    exist yet (see #792908).
+  * Restore "Architecture: amd64 i386" filter, mistakenly removed in
+    previous version.  Unfortunately the toolchain bootstrap isn't ready
+    to support all Debian archs yet.  Closes: #793147.
+
+ -- Angus Lees <gus@debian.org>  Wed, 22 Jul 2015 09:51:08 +1000
+
+rustc (1.1.0+dfsg1-1) unstable; urgency=low
+
+  [ Angus Lees ]
+  * Set SONAME when building dylibs
+  * Split out libstd-rust, libstd-rust-dev, rust-gdb, rust-lldb from rustc
+    - libs are now installed into multiarch-friendly locations
+    - rpath is no longer required to use dylibs (but talk to Debian Rust
+      maintainers before building a package that depends on the dylibs)
+  * Install /usr/share/rustc/architecture.mk, which declares Rust arch
+    triples for Debian archs and is intended to help future Rust packaging
+    efforts.  Warning: it may not be complete/accurate yet.
+  * New upstream release (1.1)
+
+ -- Angus Lees <gus@debian.org>  Thu, 16 Jul 2015 14:23:47 +1000
+
+rustc (1.0.0+dfsg1-1) unstable; urgency=medium
+
+  [ Angus Lees ]
+  * New upstream release (1.0!)
+
+  [ Sylvestre Ledru ]
+  * Fix the watch file
+  * Update of the repack to remove llvm sources
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 16 May 2015 08:24:32 +1000
+
+rustc (1.0.0~beta.4-1~exp1) experimental; urgency=low
+
+  [ Angus Lees ]
+  * New upstream release (beta 3)
+    - Drop manpage patch - now included upstream
+  * Replace duplicated compile-time dylibs with symlinks to run-time libs
+    (reduces installed size by ~68MB)
+
+  [ Sylvestre Ledru ]
+  * New upstream release (beta 4)
+  * Replace two more occurrences of jquery by the package
+  * Repack upstream to remove an LLVM file with a non-DFSG license
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 06 May 2015 11:14:30 +0200
+
+rustc (1.0.0~alpha.2-1~exp1) experimental; urgency=low
+
+  [ Angus Lees ]
+  * Patch upstream manpages to address minor troff issues
+  * Make 'debian/rules clean' also clean LLVM source
+  * Rename primary 'rust' binary package to 'rustc'
+  * Fix potential FTBFS: rust-doc requires texlive-fonts-recommended (for
+    pzdr.tfm)
+  * Build against system LLVM
+
+  [ Sylvestre Ledru ]
+  * New testing release
+  * Renaming of the source package
+  * Set a minimal version for dpkg-dev and debhelper (for profiles)
+  * For now, disable build profiles as they are not supported in Debian
+  * Introduce some changes by Angus Lees
+    - Introduction of build stages
+    - Disable the parallel execution of tests
+    - Improving of the parallel syntax
+    - Use override_dh_auto_build-arch
+    - Use override_dh_auto_build-indep
+    - Better declarations of the doc
+    - Update of the description
+    - Watch file updated (with key check)
+
+  [ Luca Bruno ]
+  * rules: respect 'nocheck' DEB_BUILD_OPTIONS
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 07 Mar 2015 09:25:47 +0100
+
+rust (1.0.0~alpha-0~exp1) experimental; urgency=low
+
+  * Initial package (Closes: #689207)
+    Work done by Luca Bruno, Jordan Justen and Sylvestre Ledru
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 23 Jan 2015 15:47:37 +0100
diff --git a/compat b/compat
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
+++ b/compat
@@ -0,0 +1 @@
+9
diff --git a/control b/control
new file mode 100644 (file)
index 0000000..fc03fbb
--- /dev/null
+++ b/control
@@ -0,0 +1,174 @@
+Source: rustc
+Section: devel
+Priority: extra
+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>,
+ Ximin Luo <infinity0@debian.org>
+Build-Depends: debhelper (>= 9),
+               dpkg-dev (>= 1.17.14),
+               rustc (>= 1.15.0+dfsg) <!pkg.rustc.dlstage0>,
+               rustc (<= 1.16.0++) <!pkg.rustc.dlstage0>,
+               autotools-dev,
+               binutils (>= 2.26) | binutils-2.26,
+               cmake | cmake3,
+               curl,
+               gperf,
+               libedit-dev,
+               llvm-3.9-dev (>= 1:3.9-5),
+               llvm-3.9-tools (>= 1:3.9-5),
+               python,
+               zlib1g-dev,
+               nodejs <!nocheck>,
+               valgrind <!nocheck>,
+               git <!nocheck>,
+               procps <!nocheck>,
+# the tests require the docs to be built, which requires jquery
+               libjs-jquery <!nocheck>,
+# below are optional tools even for 'make check'
+               antlr4 <!nocheck> | antlr <!nocheck>,
+               bison <!nocheck>,
+               flex <!nocheck>,
+# TODO: broken; see https://github.com/rust-lang/rust/issues/39838; re-enable when that is fixed
+#               gdb <!nocheck>,
+               default-jdk-headless <!nocheck> | default-jdk <!nocheck>,
+Build-Depends-Indep: libjs-jquery <!nodoc>,
+                     pandoc (>= 1.9),
+                     po4a,
+                     texlive-xetex,
+                     texlive-latex-base,
+                     texlive-generic-recommended,
+                     texlive-fonts-recommended,
+                     lmodern
+Standards-Version: 3.9.8
+Homepage: http://www.rust-lang.org/
+Vcs-Git: https://anonscm.debian.org/git/pkg-rust/rust.git
+Vcs-Browser: https://anonscm.debian.org/cgit/pkg-rust/rust.git
+
+Package: rustc
+Architecture: any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, libstd-rust-dev (= ${binary:Version}),
+ gcc, libc-dev, libjs-jquery, binutils (>= 2.26)
+Recommends: rust-gdb | rust-lldb
+Suggests: rust-doc
+Description: Rust systems programming language
+ Rust is a curly-brace, block-structured expression language.  It
+ visually resembles the C language family, but differs significantly
+ in syntactic and semantic details.  Its design is oriented toward
+ concerns of "programming in the large", that is, of creating and
+ maintaining boundaries - both abstract and operational - that
+ preserve large-system integrity, availability and concurrency.
+ .
+ It supports a mixture of imperative procedural, concurrent actor,
+ object-oriented and pure functional styles.  Rust also supports
+ generic programming and meta-programming, in both static and dynamic
+ styles.
+
+Package: libstd-rust-1.16
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Rust standard libraries
+ Rust is a curly-brace, block-structured expression language.  It
+ visually resembles the C language family, but differs significantly
+ in syntactic and semantic details.  Its design is oriented toward
+ concerns of "programming in the large", that is, of creating and
+ maintaining boundaries - both abstract and operational - that
+ preserve large-system integrity, availability and concurrency.
+ .
+ It supports a mixture of imperative procedural, concurrent actor,
+ object-oriented and pure functional styles.  Rust also supports
+ generic programming and meta-programming, in both static and dynamic
+ styles.
+ .
+ This package contains the standard Rust libraries, built as dylibs.
+
+Package: libstd-rust-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends: ${misc:Depends}, libstd-rust-1.16 (= ${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
+ in syntactic and semantic details.  Its design is oriented toward
+ concerns of "programming in the large", that is, of creating and
+ maintaining boundaries - both abstract and operational - that
+ preserve large-system integrity, availability and concurrency.
+ .
+ It supports a mixture of imperative procedural, concurrent actor,
+ object-oriented and pure functional styles.  Rust also supports
+ generic programming and meta-programming, in both static and dynamic
+ styles.
+ .
+ This package contains development files necessary to use the standard
+ Rust libraries.
+
+Package: rust-gdb
+Architecture: all
+Depends: gdb, ${misc:Depends}
+Suggests: gdb-doc
+Replaces: rustc (<< 1.1.0+dfsg1-1)
+Description: Rust debugger (gdb)
+ Rust is a curly-brace, block-structured expression language.  It
+ visually resembles the C language family, but differs significantly
+ in syntactic and semantic details.  Its design is oriented toward
+ concerns of "programming in the large", that is, of creating and
+ maintaining boundaries - both abstract and operational - that
+ preserve large-system integrity, availability and concurrency.
+ .
+ It supports a mixture of imperative procedural, concurrent actor,
+ object-oriented and pure functional styles.  Rust also supports
+ generic programming and meta-programming, in both static and dynamic
+ styles.
+ .
+ This package contains pretty printers and a wrapper script for
+ invoking gdb on rust binaries.
+
+Package: rust-lldb
+Architecture: all
+# When updating, also update rust-lldb.links
+Depends: lldb-3.9, ${misc:Depends}, python-lldb-3.9
+Replaces: rustc (<< 1.1.0+dfsg1-1)
+Description: Rust debugger (lldb)
+ Rust is a curly-brace, block-structured expression language.  It
+ visually resembles the C language family, but differs significantly
+ in syntactic and semantic details.  Its design is oriented toward
+ concerns of "programming in the large", that is, of creating and
+ maintaining boundaries - both abstract and operational - that
+ preserve large-system integrity, availability and concurrency.
+ .
+ It supports a mixture of imperative procedural, concurrent actor,
+ object-oriented and pure functional styles.  Rust also supports
+ generic programming and meta-programming, in both static and dynamic
+ styles.
+ .
+ This package contains pretty printers and a wrapper script for
+ invoking lldb on rust binaries.
+
+Package: rust-doc
+Section: doc
+Architecture: all
+Build-Profiles: <!nodoc>
+Depends: ${misc:Depends}, libjs-jquery
+Description: Rust systems programming language - Documentation
+ Rust is a curly-brace, block-structured expression language.  It
+ visually resembles the C language family, but differs significantly
+ in syntactic and semantic details.  Its design is oriented toward
+ concerns of "programming in the large", that is, of creating and
+ maintaining boundaries - both abstract and operational - that
+ preserve large-system integrity, availability and concurrency.
+ .
+ It supports a mixture of imperative procedural, concurrent actor,
+ object-oriented and pure functional styles.  Rust also supports
+ generic programming and meta-programming, in both static and dynamic
+ styles.
+ .
+ This package contains the Rust tutorial, language reference and
+ standard library documentation.
diff --git a/copyright b/copyright
new file mode 100644 (file)
index 0000000..1cf73f1
--- /dev/null
+++ b/copyright
@@ -0,0 +1,744 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: rust
+Source: http://www.rust-lang.org
+Files-Excluded:
+ src/llvm
+ src/librustdoc/html/static/jquery-*.min.js
+ src/rt/hoedown/src/html_blocks.c
+
+Files: *
+Copyright: 2006-2009 Graydon Hoare
+           2009-2012 Mozilla Foundation
+           2012-2015 The Rust Project Developers (see AUTHORS.txt)
+License: Expat or Apache-2.0
+
+Files: src/librustc_trans/cabi_x86_64.rs
+Copyright: 2008-2010 Tachyon Technologies
+License: BSD-2-clause
+
+Files: src/rt/miniz.c
+Copyright: 1996-2012 Rich Geldreich
+License: unlicense
+ This is free and unencumbered software released into the public domain.
+ .
+ Anyone is free to copy, modify, publish, use, compile, sell, or
+ distribute this software, either in source code form or as a compiled
+ binary, for any purpose, commercial or non-commercial, and by any
+ means.
+ .
+ In jurisdictions that recognize copyright laws, the author or authors
+ of this software dedicate any and all copyright interest in the
+ software to the public domain. We make this dedication for the
+ benefit of the public at large and to the detriment of our heirs and
+ successors. We intend this dedication to be an overt act of
+ relinquishment in perpetuity of all present and future rights to this
+ software under copyright law.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ .
+ For more information, please refer to <http://unlicense.org/>
+
+Files: src/jemalloc/*
+Copyright: 2002-2014 Jason Evans <jasone@canonware.com>
+           2007-2012 Mozilla Foundation
+           2009-2014 Facebook, Inc.
+License: BSD-2-clause
+
+Files: src/jemalloc/bin/jeprof.in
+Copyright: 1998-2007, Google Inc.
+License: BSD-3-Clause
+
+Files: src/compiler-rt/*
+Copyright: 2009-2015 Howard Hinnant
+           2009-2015 The CompileRT Developers (see src/compiler-rt/CREDITS.TXT)
+License: BSD-3-clause or Expat
+
+Files: src/compiler-rt/lib/BlocksRuntime/*
+Copyright: 2008-2010 Apple, Inc.
+License: Expat
+
+Files: src/rt/hoedown/*
+Copyright: 2008 Natacha Porté
+           2011 Vicent Martí
+           2013 Devin Torres and the Hoedown authors
+License: ISC
+
+Files: src/libbacktrace/*
+Copyright: 2012-2014 Free Software Foundation, Inc.
+           (written by Ian Lance Taylor, Google.)
+License: BSD-3-Clause
+
+Files:
+ src/libbacktrace/filenames.h
+ src/libbacktrace/ansidecl.h
+ src/libbacktrace/hashtab.h
+ src/libbacktrace/ltmain.sh
+Copyright: 2000, 2001, 2007, 2010 Free Software Foundation, Inc.
+License: GPL-2+
+
+Files: src/libbacktrace/dwarf2.h
+Copyright: 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
+ 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+ Free Software Foundation, Inc.
+License: GPL-3+ with GCC Runtime Library exception
+
+Files: src/librustdoc/html/static/FiraSans*
+Copyright: 2014, Mozilla Foundation, 2014, Telefonica S.A.
+License: SIL-OPEN-FONT
+
+Files: src/librustdoc/html/static/Heuristica*
+Copyright: 1989, 1991 Adobe Systems Incorporated,
+ 2006 Han The Thanh, Vntopia font family,
+ 2008-2012, Andrey V. Panov
+License: SIL-OPEN-FONT
+
+Files: src/librustdoc/html/static/SourceCodePro*
+Copyright: 2010, 2012 Adobe Systems Incorporated
+License: SIL-OPEN-FONT
+
+Files: src/librustdoc/html/static/SourceSerifPro*
+Copyright: 2014 Adobe Systems Incorporated
+License: SIL-OPEN-FONT
+
+Files: src/librustdoc/html/static/main.js
+Copyright: 2014 The Rust Project Developers
+License: Expat or Apache-2.0
+
+Files: src/libstd/memchr.rs
+Copyright: 2015 Andrew Gallant, bluss and Nicolas Koch
+License: Expat or Apache-2.0
+
+Files: src/libstd/sync/mpsc/mpsc_queue.rs
+       src/libstd/sync/mpsc/spsc_queue.rs
+Copyright: 2010-2011 Dmitry Vyukov
+License: BSD-2-Clause
+
+Files: debian/icons/rust-logo-32x32-blk.png
+Copyright: Mozilla Foundation
+License: CC-BY
+Comment:
+ Relevant discussion in https://github.com/rust-lang/rust/issues/11562
+
+License: Apache-2.0
+ On Debian systems, the full text of the Apache License
+ Version 2.0 can be found in the file
+ `/usr/share/common-licenses/Apache-2.0'.
+
+License: BSD-2-clause
+ Redistribution and use in source and binary forms, with
+ or without modification, are permitted provided that the
+ following conditions are met:
+ .
+ 1. Redistributions of source code must retain the above
+    copyright notice, this list of conditions and the
+    following disclaimer.
+ 2. Redistributions in binary form must reproduce the
+    above copyright notice, this list of conditions and
+    the following disclaimer in the documentation and/or
+    other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License: Expat
+ Permission is hereby granted, free of charge, to any
+ person obtaining a copy of this software and associated
+ documentation files (the "Software"), to deal in the
+ Software without restriction, including without
+ limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of
+ the Software, and to permit persons to whom the Software
+ is furnished to do so, subject to the following
+ conditions:
+ .
+ The above copyright notice and this permission notice
+ shall be included in all copies or substantial portions
+ of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the organization nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+License: ISC
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+License: SIL-OPEN-FONT
+ This Font Software is licensed under the SIL Open Font License,
+ Version 1.1.
+ .
+ This license is copied below, and is also available with a FAQ at:
+ http://scripts.sil.org/OFL
+ .
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+ .
+ PREAMBLE The goals of the Open Font License (OFL) are to stimulate
+ worldwide development of collaborative font projects, to support the font
+ creation efforts of academic and linguistic communities, and to provide
+ a free and open framework in which fonts may be shared and improved in
+ partnership with others.
+ .
+ The OFL allows the licensed fonts to be used, studied, modified and
+ redistributed freely as long as they are not sold by themselves.
+ The fonts, including any derivative works, can be bundled, embedded,
+ redistributed and/or sold with any software provided that any reserved
+ names are not used by derivative works.  The fonts and derivatives,
+ however, cannot be released under any other type of license.  The
+ requirement for fonts to remain under this license does not apply to
+ any document created using the fonts or their derivatives.
+ .
+ DEFINITIONS
+ "Font Software" refers to the set of files released by the Copyright
+ Holder(s) under this license and clearly marked as such.
+ This may include source files, build scripts and documentation.
+ .
+ "Reserved Font Name" refers to any names specified as such after the
+ copyright statement(s).
+ .
+ "Original Version" refers to the collection of Font Software components
+ as distributed by the Copyright Holder(s).
+ .
+ "Modified Version" refers to any derivative made by adding to, deleting,
+ or substituting ? in part or in whole ?
+ any of the components of the Original Version, by changing formats or
+ by porting the Font Software to a new environment.
+ .
+ "Author" refers to any designer, engineer, programmer, technical writer
+ or other person who contributed to the Font Software.
+ .
+ PERMISSION & CONDITIONS
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of the Font Software, to use, study, copy, merge, embed, modify,
+ redistribute, and sell modified and unmodified copies of the Font
+ Software, subject to the following conditions:
+ .
+ 1) Neither the Font Software nor any of its individual components,in
+    Original or Modified Versions, may be sold by itself.
+ .
+ 2) Original or Modified Versions of the Font Software may be bundled,
+    redistributed and/or sold with any software, provided that each copy
+    contains the above copyright notice and this license. These can be
+    included either as stand-alone text files, human-readable headers or
+    in the appropriate machine-readable metadata fields within text or
+    binary files as long as those fields can be easily viewed by the user.
+ .
+ 3) No Modified Version of the Font Software may use the Reserved Font
+    Name(s) unless explicit written permission is granted by the
+    corresponding Copyright Holder. This restriction only applies to the
+    primary font name as presented to the users.
+ .
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+    Software shall not be used to promote, endorse or advertise any
+    Modified Version, except to acknowledge the contribution(s) of the
+    Copyright Holder(s) and the Author(s) or with their explicit written
+    permission.
+ 5) The Font Software, modified or unmodified, in part or in whole, must
+    be distributed entirely under this license, and must not be distributed
+    under any other license. The requirement for fonts to remain under
+    this license does not apply to any document created using the Font
+    Software.
+ .
+ TERMINATION
+ This license becomes null and void if any of the above conditions are not met.
+ .
+ DISCLAIMER
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT.  IN NO EVENT SHALL THE
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF THE USE OR INABILITY
+
+License: GPL-2+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+Comment:
+ On Debian systems, see /usr/share/common-licenses/GPL-2 for the full
+ text of the GPL version 2.
+
+License: GPL-3+ with GCC Runtime Library exception
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3, or (at your option) any later
+ version.
+ .
+ GCC is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+ License for more details.
+ .
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+ .
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ <http://www.gnu.org/licenses/>.
+
+License: CC-BY
+ Attribution 4.0 International
+ .
+ =======================================================================
+ .
+ Creative Commons Corporation ("Creative Commons") is not a law firm and
+ does not provide legal services or legal advice. Distribution of
+ Creative Commons public licenses does not create a lawyer-client or
+ other relationship. Creative Commons makes its licenses and related
+ information available on an "as-is" basis. Creative Commons gives no
+ warranties regarding its licenses, any material licensed under their
+ terms and conditions, or any related information. Creative Commons
+ disclaims all liability for damages resulting from their use to the
+ fullest extent possible.
+ .
+ Using Creative Commons Public Licenses
+ .
+ Creative Commons public licenses provide a standard set of terms and
+ conditions that creators and other rights holders may use to share
+ original works of authorship and other material subject to copyright
+ and certain other rights specified in the public license below. The
+ following considerations are for informational purposes only, are not
+ exhaustive, and do not form part of our licenses.
+ .
+      Considerations for licensors: Our public licenses are
+      intended for use by those authorized to give the public
+      permission to use material in ways otherwise restricted by
+      copyright and certain other rights. Our licenses are
+      irrevocable. Licensors should read and understand the terms
+      and conditions of the license they choose before applying it.
+      Licensors should also secure all rights necessary before
+      applying our licenses so that the public can reuse the
+      material as expected. Licensors should clearly mark any
+      material not subject to the license. This includes other CC-
+      licensed material, or material used under an exception or
+      limitation to copyright. More considerations for licensors:
+        wiki.creativecommons.org/Considerations_for_licensors
+ .
+      Considerations for the public: By using one of our public
+      licenses, a licensor grants the public permission to use the
+      licensed material under specified terms and conditions. If
+      the licensor's permission is not necessary for any reason--for
+      example, because of any applicable exception or limitation to
+      copyright--then that use is not regulated by the license. Our
+      licenses grant only permissions under copyright and certain
+      other rights that a licensor has authority to grant. Use of
+      the licensed material may still be restricted for other
+      reasons, including because others have copyright or other
+      rights in the material. A licensor may make special requests,
+      such as asking that all changes be marked or described.
+      Although not required by our licenses, you are encouraged to
+      respect those requests where reasonable. More_considerations
+      for the public:
+        wiki.creativecommons.org/Considerations_for_licensees
+ .
+ =======================================================================
+ .
+ Creative Commons Attribution 4.0 International Public License
+ .
+ By exercising the Licensed Rights (defined below), You accept and agree
+ to be bound by the terms and conditions of this Creative Commons
+ Attribution 4.0 International Public License ("Public License"). To the
+ extent this Public License may be interpreted as a contract, You are
+ granted the Licensed Rights in consideration of Your acceptance of
+ these terms and conditions, and the Licensor grants You such rights in
+ consideration of benefits the Licensor receives from making the
+ Licensed Material available under these terms and conditions.
+ .
+ .
+ Section 1 -- Definitions.
+ .
+   a. Adapted Material means material subject to Copyright and Similar
+      Rights that is derived from or based upon the Licensed Material
+      and in which the Licensed Material is translated, altered,
+      arranged, transformed, or otherwise modified in a manner requiring
+      permission under the Copyright and Similar Rights held by the
+      Licensor. For purposes of this Public License, where the Licensed
+      Material is a musical work, performance, or sound recording,
+      Adapted Material is always produced where the Licensed Material is
+      synched in timed relation with a moving image.
+ .
+   b. Adapter's License means the license You apply to Your Copyright
+      and Similar Rights in Your contributions to Adapted Material in
+      accordance with the terms and conditions of this Public License.
+ .
+   c. Copyright and Similar Rights means copyright and/or similar rights
+      closely related to copyright including, without limitation,
+      performance, broadcast, sound recording, and Sui Generis Database
+      Rights, without regard to how the rights are labeled or
+      categorized. For purposes of this Public License, the rights
+      specified in Section 2(b)(1)-(2) are not Copyright and Similar
+      Rights.
+ .
+   d. Effective Technological Measures means those measures that, in the
+      absence of proper authority, may not be circumvented under laws
+      fulfilling obligations under Article 11 of the WIPO Copyright
+      Treaty adopted on December 20, 1996, and/or similar international
+      agreements.
+ .
+   e. Exceptions and Limitations means fair use, fair dealing, and/or
+      any other exception or limitation to Copyright and Similar Rights
+      that applies to Your use of the Licensed Material.
+ .
+   f. Licensed Material means the artistic or literary work, database,
+      or other material to which the Licensor applied this Public
+      License.
+ .
+   g. Licensed Rights means the rights granted to You subject to the
+      terms and conditions of this Public License, which are limited to
+      all Copyright and Similar Rights that apply to Your use of the
+      Licensed Material and that the Licensor has authority to license.
+ .
+   h. Licensor means the individual(s) or entity(ies) granting rights
+      under this Public License.
+ .
+   i. Share means to provide material to the public by any means or
+      process that requires permission under the Licensed Rights, such
+      as reproduction, public display, public performance, distribution,
+      dissemination, communication, or importation, and to make material
+      available to the public including in ways that members of the
+      public may access the material from a place and at a time
+      individually chosen by them.
+ .
+   j. Sui Generis Database Rights means rights other than copyright
+      resulting from Directive 96/9/EC of the European Parliament and of
+      the Council of 11 March 1996 on the legal protection of databases,
+      as amended and/or succeeded, as well as other essentially
+      equivalent rights anywhere in the world.
+ .
+   k. You means the individual or entity exercising the Licensed Rights
+      under this Public License. Your has a corresponding meaning.
+ .
+ .
+ Section 2 -- Scope.
+ .
+   a. License grant.
+ .
+       1. Subject to the terms and conditions of this Public License,
+          the Licensor hereby grants You a worldwide, royalty-free,
+          non-sublicensable, non-exclusive, irrevocable license to
+          exercise the Licensed Rights in the Licensed Material to:
+ .
+            a. reproduce and Share the Licensed Material, in whole or
+               in part; and
+ .
+            b. produce, reproduce, and Share Adapted Material.
+ .
+       2. Exceptions and Limitations. For the avoidance of doubt, where
+          Exceptions and Limitations apply to Your use, this Public
+          License does not apply, and You do not need to comply with
+          its terms and conditions.
+ .
+       3. Term. The term of this Public License is specified in Section
+          6(a).
+ .
+       4. Media and formats; technical modifications allowed. The
+          Licensor authorizes You to exercise the Licensed Rights in
+          all media and formats whether now known or hereafter created,
+          and to make technical modifications necessary to do so. The
+          Licensor waives and/or agrees not to assert any right or
+          authority to forbid You from making technical modifications
+          necessary to exercise the Licensed Rights, including
+          technical modifications necessary to circumvent Effective
+          Technological Measures. For purposes of this Public License,
+          simply making modifications authorized by this Section 2(a)
+          (4) never produces Adapted Material.
+ .
+       5. Downstream recipients.
+ .
+            a. Offer from the Licensor -- Licensed Material. Every
+               recipient of the Licensed Material automatically
+               receives an offer from the Licensor to exercise the
+               Licensed Rights under the terms and conditions of this
+               Public License.
+ .
+            b. No downstream restrictions. You may not offer or impose
+               any additional or different terms or conditions on, or
+               apply any Effective Technological Measures to, the
+               Licensed Material if doing so restricts exercise of the
+               Licensed Rights by any recipient of the Licensed
+               Material.
+ .
+       6. No endorsement. Nothing in this Public License constitutes or
+          may be construed as permission to assert or imply that You
+          are, or that Your use of the Licensed Material is, connected
+          with, or sponsored, endorsed, or granted official status by,
+          the Licensor or others designated to receive attribution as
+          provided in Section 3(a)(1)(A)(i).
+ .
+   b. Other rights.
+ .
+       1. Moral rights, such as the right of integrity, are not
+          licensed under this Public License, nor are publicity,
+          privacy, and/or other similar personality rights; however, to
+          the extent possible, the Licensor waives and/or agrees not to
+          assert any such rights held by the Licensor to the limited
+          extent necessary to allow You to exercise the Licensed
+          Rights, but not otherwise.
+ .
+       2. Patent and trademark rights are not licensed under this
+          Public License.
+ .
+       3. To the extent possible, the Licensor waives any right to
+          collect royalties from You for the exercise of the Licensed
+          Rights, whether directly or through a collecting society
+          under any voluntary or waivable statutory or compulsory
+          licensing scheme. In all other cases the Licensor expressly
+          reserves any right to collect such royalties.
+ .
+ .
+ Section 3 -- License Conditions.
+ .
+ Your exercise of the Licensed Rights is expressly made subject to the
+ following conditions.
+ .
+   a. Attribution.
+ .
+       1. If You Share the Licensed Material (including in modified
+          form), You must:
+ .
+            a. retain the following if it is supplied by the Licensor
+               with the Licensed Material:
+ .
+                 i. identification of the creator(s) of the Licensed
+                    Material and any others designated to receive
+                    attribution, in any reasonable manner requested by
+                    the Licensor (including by pseudonym if
+                    designated);
+ .
+                ii. a copyright notice;
+ .
+               iii. a notice that refers to this Public License;
+ .
+                iv. a notice that refers to the disclaimer of
+                    warranties;
+ .
+                 v. a URI or hyperlink to the Licensed Material to the
+                    extent reasonably practicable;
+ .
+            b. indicate if You modified the Licensed Material and
+               retain an indication of any previous modifications; and
+ .
+            c. indicate the Licensed Material is licensed under this
+               Public License, and include the text of, or the URI or
+               hyperlink to, this Public License.
+ .
+       2. You may satisfy the conditions in Section 3(a)(1) in any
+          reasonable manner based on the medium, means, and context in
+          which You Share the Licensed Material. For example, it may be
+          reasonable to satisfy the conditions by providing a URI or
+          hyperlink to a resource that includes the required
+          information.
+ .
+       3. If requested by the Licensor, You must remove any of the
+          information required by Section 3(a)(1)(A) to the extent
+          reasonably practicable.
+ .
+       4. If You Share Adapted Material You produce, the Adapter's
+          License You apply must not prevent recipients of the Adapted
+          Material from complying with this Public License.
+ .
+ .
+ Section 4 -- Sui Generis Database Rights.
+ .
+ Where the Licensed Rights include Sui Generis Database Rights that
+ apply to Your use of the Licensed Material:
+ .
+   a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+      to extract, reuse, reproduce, and Share all or a substantial
+      portion of the contents of the database;
+ .
+   b. if You include all or a substantial portion of the database
+      contents in a database in which You have Sui Generis Database
+      Rights, then the database in which You have Sui Generis Database
+      Rights (but not its individual contents) is Adapted Material; and
+ .
+   c. You must comply with the conditions in Section 3(a) if You Share
+      all or a substantial portion of the contents of the database.
+ .
+ For the avoidance of doubt, this Section 4 supplements and does not
+ replace Your obligations under this Public License where the Licensed
+ Rights include other Copyright and Similar Rights.
+ .
+ .
+ Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+ .
+   a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+      EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+      AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+      ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+      IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+      WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+      PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+      ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+      KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+      ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+ .
+   b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+      TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+      NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+      INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+      COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+      USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+      ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+      DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+      IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+ .
+   c. The disclaimer of warranties and limitation of liability provided
+      above shall be interpreted in a manner that, to the extent
+      possible, most closely approximates an absolute disclaimer and
+      waiver of all liability.
+ .
+ .
+ Section 6 -- Term and Termination.
+ .
+   a. This Public License applies for the term of the Copyright and
+      Similar Rights licensed here. However, if You fail to comply with
+      this Public License, then Your rights under this Public License
+      terminate automatically.
+ .
+   b. Where Your right to use the Licensed Material has terminated under
+      Section 6(a), it reinstates:
+ .
+       1. automatically as of the date the violation is cured, provided
+          it is cured within 30 days of Your discovery of the
+          violation; or
+ .
+       2. upon express reinstatement by the Licensor.
+ .
+      For the avoidance of doubt, this Section 6(b) does not affect any
+      right the Licensor may have to seek remedies for Your violations
+      of this Public License.
+ .
+   c. For the avoidance of doubt, the Licensor may also offer the
+      Licensed Material under separate terms or conditions or stop
+      distributing the Licensed Material at any time; however, doing so
+      will not terminate this Public License.
+ .
+   d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+      License.
+ .
+ .
+ Section 7 -- Other Terms and Conditions.
+ .
+   a. The Licensor shall not be bound by any additional or different
+      terms or conditions communicated by You unless expressly agreed.
+ .
+   b. Any arrangements, understandings, or agreements regarding the
+      Licensed Material not stated herein are separate from and
+      independent of the terms and conditions of this Public License.
+ .
+ .
+ Section 8 -- Interpretation.
+ .
+   a. For the avoidance of doubt, this Public License does not, and
+      shall not be interpreted to, reduce, limit, restrict, or impose
+      conditions on any use of the Licensed Material that could lawfully
+      be made without permission under this Public License.
+ .
+   b. To the extent possible, if any provision of this Public License is
+      deemed unenforceable, it shall be automatically reformed to the
+      minimum extent necessary to make it enforceable. If the provision
+      cannot be reformed, it shall be severed from this Public License
+      without affecting the enforceability of the remaining terms and
+      conditions.
+ .
+   c. No term or condition of this Public License will be waived and no
+      failure to comply consented to unless expressly agreed to by the
+      Licensor.
+ .
+   d. Nothing in this Public License constitutes or may be interpreted
+      as a limitation upon, or waiver of, any privileges and immunities
+      that apply to the Licensor or You, including from the legal
+      processes of any jurisdiction or authority.
+ .
+ .
+ =======================================================================
+ .
+ Creative Commons is not a party to its public licenses.
+ Notwithstanding, Creative Commons may elect to apply one of its public
+ licenses to material it publishes and in those instances will be
+ considered the "Licensor." Except for the limited purpose of indicating
+ that material is shared under a Creative Commons public license or as
+ otherwise permitted by the Creative Commons policies published at
+ creativecommons.org/policies, Creative Commons does not authorize the
+ use of the trademark "Creative Commons" or any other trademark or logo
+ of Creative Commons without its prior written consent including,
+ without limitation, in connection with any unauthorized modifications
+ to any of its public licenses or any other arrangements,
+ understandings, or agreements concerning use of licensed material. For
+ the avoidance of doubt, this paragraph does not form part of the public
+ licenses.
+ .
+ Creative Commons may be contacted at creativecommons.org.
diff --git a/docs b/docs
new file mode 100644 (file)
index 0000000..b43bf86
--- /dev/null
+++ b/docs
@@ -0,0 +1 @@
+README.md
diff --git a/ensure-patch b/ensure-patch
new file mode 100755 (executable)
index 0000000..588ab59
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+"-N") fwd=-N; rev=-R; verb="applied";;
+"-R") fwd=-R; rev=-N; verb="reversed";;
+*) echo >&2 "Usage: $0 <-N|-R> <patch-file>"; exit 2;;
+esac
+
+if patch --dry-run -f $rev -p1 < "$2" >/dev/null; then
+       echo >&2 "patch already $verb: $2"
+       exit 0
+fi
+patch --dry-run -f $fwd -p1 < "$2"
+patch -f $fwd -p1 < "$2"
diff --git a/gbp.conf b/gbp.conf
new file mode 100644 (file)
index 0000000..cec628c
--- /dev/null
+++ b/gbp.conf
@@ -0,0 +1,2 @@
+[DEFAULT]
+pristine-tar = True
diff --git a/icons/rust-logo-32x32-blk.png b/icons/rust-logo-32x32-blk.png
new file mode 100644 (file)
index 0000000..9cc1452
Binary files /dev/null and b/icons/rust-logo-32x32-blk.png differ
diff --git a/libstd-rust-1.16.lintian-overrides b/libstd-rust-1.16.lintian-overrides
new file mode 100644 (file)
index 0000000..4d54742
--- /dev/null
@@ -0,0 +1,16 @@
+# "libstd" just seemed too generic
+libstd-rust-1.16 binary: package-name-doesnt-match-sonames
+
+# Rust doesn't use dev shlib symlinks nor any of the other shlib support stuff
+libstd-rust-1.16 binary: dev-pkg-without-shlib-symlink
+libstd-rust-1.16 binary: shlib-without-versioned-soname
+libstd-rust-1.16 binary: pkg-has-shlibs-control-file-but-no-actual-shared-libs
+libstd-rust-1.16 binary: package-must-activate-ldconfig-trigger
+
+# 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.16 binary: library-not-linked-against-libc
+
+# We need it for now
+binary-or-shlib-defines-rpath usr/lib/*/lib*so /usr/lib/rustlib/*lib
diff --git a/libstd-rust-dev.install b/libstd-rust-dev.install
new file mode 100644 (file)
index 0000000..62eeb7e
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/rustlib/*/lib/
diff --git a/libstd-rust-dev.lintian-overrides b/libstd-rust-dev.lintian-overrides
new file mode 100644 (file)
index 0000000..61b3c11
--- /dev/null
@@ -0,0 +1,3 @@
+# I assure you, dear lintian, that "/usr/lib/rustlib/x86_64-unknown-linux-gnu/"
+# is indeed an arch-specific directory.
+libstd-rust-dev binary: arch-dependent-file-not-in-arch-specific-directory
diff --git a/make_orig-dl_tarball.sh b/make_orig-dl_tarball.sh
new file mode 100755 (executable)
index 0000000..153e7d3
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/sh
+# See README.Debian "Bootstrapping a new distro" for details.
+#
+# You may want to use `debian/rules source_orig-dl` instead of calling this
+# directly.
+
+set -e
+
+upstream_version="$(dpkg-parsechangelog -SVersion | sed -e 's/\(.*\)-.*/\1/g')"
+upstream_bootstrap_arch="${upstream_bootstrap_arch:-amd64 arm64 armel armhf i386 powerpc ppc64el s390x}"
+
+rm -f dl/*.sha256
+for deb_host_arch in $upstream_bootstrap_arch; do
+       make -s --no-print-directory -f debian/architecture-test.mk "rust-for-deb_${deb_host_arch}" | {
+       read deb_host_arch rust_triplet
+       python src/etc/get-stage0.py "${rust_triplet}"
+       rm -rf "${rust_triplet}"
+       }
+done
+
+tar --mtime=@"$(date +%s)" --clamp-mtime \
+  --owner=root --group=root \
+  -cJf "../rustc_${upstream_version}.orig-dl.tar.xz" \
+  --transform "s/^dl\///" \
+  dl/*
+
+rm -f src/bootstrap/bootstrap.pyc
+
+cat <<eof
+================================================================================
+orig-dl bootstrapping tarball created in ../rustc_${upstream_version}.orig-dl.tar.xz
+containing the upstream compilers for $upstream_bootstrap_arch
+
+You *probably* now want to do the following steps:
+
+1. Add [$(echo $upstream_bootstrap_arch | sed -e 's/\S*/!\0/g')] to the rustc Build-Depend in d/control
+2. Update d/changelog
+3. Run \`dpkg-source -b .\` to generate a .dsc that includes this tarball.
+================================================================================
+eof
diff --git a/patches/d-add-soname.patch b/patches/d-add-soname.patch
new file mode 100644 (file)
index 0000000..f212671
--- /dev/null
@@ -0,0 +1,38 @@
+Description: Set DT_SONAME when building dylibs
+ In Rust, library filenames include a version-specific hash to help
+ the run-time linker find the correct version.  Unlike in C/C++, the
+ compiler looks for all libraries matching a glob that ignores the
+ hash and reads embedded metadata to work out versions, etc.
+ .
+ The upshot is that there is no need for the usual "libfoo.so ->
+ libfoo-1.2.3.so" symlink common with C/C++ when building with Rust,
+ and no need to communicate an alternate filename to use at run-time
+ vs compile time.  If linking to a Rust dylib from C/C++ however, a
+ "libfoo.so -> libfoo-$hash.so" symlink may well be useful and in
+ this case DT_SONAME=libfoo-$hash.so would be required.  More
+ mundanely, various tools (eg: dpkg-shlibdeps) complain if they don't
+ find DT_SONAME on shared libraries in public directories.
+ .
+ This patch passes -Wl,-soname=$outfile when building dylibs (and
+ using a GNU linker).
+Author: Angus Lees <gus@debian.org>
+Forwarded: no
+
+Index: rust/src/librustc_trans/back/link.rs
+===================================================================
+--- rust.orig/src/librustc_trans/back/link.rs
++++ rust/src/librustc_trans/back/link.rs
+@@ -927,6 +927,13 @@ fn link_args(cmd: &mut Linker,
+         cmd.args(&rpath::get_rpath_flags(&mut rpath_config));
+     }
++    if (crate_type == config::CrateTypeDylib || crate_type == config::CrateTypeCdylib)
++       && 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);
++    }
++
+     // Finally add all the linker arguments provided on the command line along
+     // with any #[link_args] attributes found inside the crate
+     if let Some(ref args) = sess.opts.cg.link_args {
diff --git a/patches/d-disable-doc-build-in-all.diff b/patches/d-disable-doc-build-in-all.diff
new file mode 100644 (file)
index 0000000..ca11e79
--- /dev/null
@@ -0,0 +1,13 @@
+Index: rustc.git/Makefile
+===================================================================
+--- rustc.git.orig/Makefile
++++ rustc.git/Makefile
+@@ -21,7 +21,7 @@ BOOTSTRAP := $(CFG_PYTHON) $(CFG_SRC_DIR
+ all:
+       $(Q)$(BOOTSTRAP) build $(BOOTSTRAP_ARGS)
+-      $(Q)$(BOOTSTRAP) doc $(BOOTSTRAP_ARGS)
++#     $(Q)$(BOOTSTRAP) doc $(BOOTSTRAP_ARGS)
+ help:
+       $(Q)echo 'Welcome to the rustbuild build system!'
diff --git a/patches/d-dont-download-stage0.patch b/patches/d-dont-download-stage0.patch
new file mode 100644 (file)
index 0000000..1ae3592
--- /dev/null
@@ -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
+@@ -22,15 +22,17 @@
+ from time import time
+-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, False, 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, False, verbose)
+         if os.path.exists(path):
+             if verify(path, sha_path, False):
+                 if verbose:
+@@ -47,7 +49,6 @@
+             print("moving {} to {}".format(temp_path, path))
+         shutil.move(temp_path, path)
+     finally:
+-        delete_if_present(sha_path, verbose)
+         delete_if_present(temp_path, verbose)
+--- a/src/etc/get-stage0.py
++++ b/src/etc/get-stage0.py
+@@ -31,7 +31,7 @@
+     filename = 'rustc-{}-{}.tar.gz'.format(channel, triple)
+     url = 'https://static.rust-lang.org/dist/{}/{}'.format(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):
diff --git a/patches/d-dynamic-link-llvm.patch b/patches/d-dynamic-link-llvm.patch
new file mode 100644 (file)
index 0000000..ab69fc8
--- /dev/null
@@ -0,0 +1,123 @@
+Description: Dynamically link with Debian's LLVM
+ Hard-code -lLLVM, instead of using llvm-config to figure out which components
+ to link in. The latter doesn't work properly anyway for dynamic linking - see
+ LLVM bug #3201. If/when this is fixed, then Rust upstream will probably fix
+ their code to allow for this, and after that happens we can rm this patch.
+ .
+ TODO: not sure if we need extra tweaks for cross-compiling
+Author: Ximin Luo <infinity0@debian.org>
+Forwarded: not-needed
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: rust/src/librustc_llvm/build.rs
+===================================================================
+--- rust.orig/src/librustc_llvm/build.rs
++++ rust/src/librustc_llvm/build.rs
+@@ -158,55 +158,10 @@ fn main() {
+     let (llvm_kind, llvm_link_arg) = detect_llvm_link(&llvm_config);
+-    // Link in all LLVM libraries, if we're uwring the "wrong" llvm-config then
+-    // we don't pick up system libs because unfortunately they're for the host
+-    // of llvm-config, not the target that we're attempting to link.
+-    let mut cmd = Command::new(&llvm_config);
+-    cmd.arg("--libs");
+-
+-    if let Some(link_arg) = llvm_link_arg {
+-        cmd.arg(link_arg);
+-    }
+-
+-    if !is_crossed {
+-        cmd.arg("--system-libs");
+-    }
+-    cmd.args(&components[..]);
+-
+-    for lib in output(&mut cmd).split_whitespace() {
+-        let name = if lib.starts_with("-l") {
+-            &lib[2..]
+-        } else if lib.starts_with("-") {
+-            &lib[1..]
+-        } else if Path::new(lib).exists() {
+-            // On MSVC llvm-config will print the full name to libraries, but
+-            // we're only interested in the name part
+-            let name = Path::new(lib).file_name().unwrap().to_str().unwrap();
+-            name.trim_right_matches(".lib")
+-        } else if lib.ends_with(".lib") {
+-            // Some MSVC libraries just come up with `.lib` tacked on, so chop
+-            // that off
+-            lib.trim_right_matches(".lib")
+-        } else {
+-            continue;
+-        };
+-
+-        // Don't need or want this library, but LLVM's CMake build system
+-        // doesn't provide a way to disable it, so filter it here even though we
+-        // may or may not have built it. We don't reference anything from this
+-        // library and it otherwise may just pull in extra dependencies on
+-        // libedit which we don't want
+-        if name == "LLVMLineEditor" {
+-            continue;
+-        }
+-
+-        let kind = if name.starts_with("LLVM") {
+-            llvm_kind
+-        } else {
+-            "dylib"
+-        };
+-        println!("cargo:rustc-link-lib={}={}", kind, name);
+-    }
++     // Link in all LLVM libraries
++     // Link in Debian full LLVM shared library.
++     // FIXME: not sure what to do in the cross-compiling case.
++     println!("cargo:rustc-link-lib={}={}", "dylib", "LLVM-3.9");
+     // LLVM ldflags
+     //
+Index: rust/src/etc/mklldeps.py
+===================================================================
+--- rust.orig/src/etc/mklldeps.py
++++ rust/src/etc/mklldeps.py
+@@ -56,38 +56,13 @@ def runErr(args):
+ f.write("\n")
+-args = [llvm_config, '--shared-mode']
+-args.extend(components)
+-llvm_shared, out = runErr(args)
+-if llvm_shared:
+-    llvm_shared = 'shared' in out
++llvm_shared = True
+ # LLVM libs
+-args = [llvm_config, '--libs', '--system-libs']
+-args.extend(components)
+-out = run(args)
+-for lib in out.strip().replace("\n", ' ').split(' '):
+-    if len(lib) == 0:
+-        continue
+-    # in some cases we get extra spaces in between libs so ignore those
+-    if len(lib) == 1 and lib == ' ':
+-        continue
+-    # not all libs strictly follow -lfoo, on Bitrig, there is -pthread
+-    if lib[0:2] == '-l':
+-        lib = lib.strip()[2:]
+-    elif lib[0] == '-':
+-        lib = lib.strip()[1:]
+-    # If this actually points at a literal file then we're on MSVC which now
+-    # prints full paths, so get just the name of the library and strip off the
+-    # trailing ".lib"
+-    elif os.path.exists(lib):
+-        lib = os.path.basename(lib)[:-4]
+-    elif lib[-4:] == '.lib':
+-        lib = lib[:-4]
+-    f.write("#[link(name = \"" + lib + "\"")
+-    if not llvm_shared and 'LLVM' in lib:
+-        f.write(", kind = \"static\"")
+-    f.write(")]\n")
++# Link in Debian full LLVM shared library.
++# FIXME: not sure what to do in the cross-compiling case.
++f.write("#[link(name = \"LLVM-3.9\")]\n")
++
+ # LLVM ldflags
+ out = run([llvm_config, '--ldflags'])
diff --git a/patches/d-dynamic-link-llvm_1.15.patch b/patches/d-dynamic-link-llvm_1.15.patch
new file mode 100644 (file)
index 0000000..d5696f7
--- /dev/null
@@ -0,0 +1,119 @@
+Description: Dynamically link with Debian's LLVM
+ Hard-code -lLLVM, instead of using llvm-config to figure out which components
+ to link in. The latter doesn't work properly anyway for dynamic linking - see
+ LLVM bug #3201. If/when this is fixed, then Rust upstream will probably fix
+ their code to allow for this, and after that happens we can rm this patch.
+ .
+ TODO: not sure if we need extra tweaks for cross-compiling
+Author: Ximin Luo <infinity0@debian.org>
+Forwarded: not-needed
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/librustc_llvm/build.rs
++++ b/src/librustc_llvm/build.rs
+@@ -157,55 +157,10 @@
+     let (llvm_kind, llvm_link_arg) = detect_llvm_link(&llvm_config);
+-    // Link in all LLVM libraries, if we're uwring the "wrong" llvm-config then
+-    // we don't pick up system libs because unfortunately they're for the host
+-    // of llvm-config, not the target that we're attempting to link.
+-    let mut cmd = Command::new(&llvm_config);
+-    cmd.arg("--libs");
+-
+-    if let Some(link_arg) = llvm_link_arg {
+-        cmd.arg(link_arg);
+-    }
+-
+-    if !is_crossed {
+-        cmd.arg("--system-libs");
+-    }
+-    cmd.args(&components[..]);
+-
+-    for lib in output(&mut cmd).split_whitespace() {
+-        let name = if lib.starts_with("-l") {
+-            &lib[2..]
+-        } else if lib.starts_with("-") {
+-            &lib[1..]
+-        } else if Path::new(lib).exists() {
+-            // On MSVC llvm-config will print the full name to libraries, but
+-            // we're only interested in the name part
+-            let name = Path::new(lib).file_name().unwrap().to_str().unwrap();
+-            name.trim_right_matches(".lib")
+-        } else if lib.ends_with(".lib") {
+-            // Some MSVC libraries just come up with `.lib` tacked on, so chop
+-            // that off
+-            lib.trim_right_matches(".lib")
+-        } else {
+-            continue;
+-        };
+-
+-        // Don't need or want this library, but LLVM's CMake build system
+-        // doesn't provide a way to disable it, so filter it here even though we
+-        // may or may not have built it. We don't reference anything from this
+-        // library and it otherwise may just pull in extra dependencies on
+-        // libedit which we don't want
+-        if name == "LLVMLineEditor" {
+-            continue;
+-        }
+-
+-        let kind = if name.starts_with("LLVM") {
+-            llvm_kind
+-        } else {
+-            "dylib"
+-        };
+-        println!("cargo:rustc-link-lib={}={}", kind, name);
+-    }
++    // Link in all LLVM libraries
++    // Link in Debian full LLVM shared library.
++    // TODO: not sure what to do in the cross-compiling case.
++    println!("cargo:rustc-link-lib={}={}", "dylib", "LLVM-3.9");
+     // LLVM ldflags
+     //
+--- a/src/etc/mklldeps.py
++++ b/src/etc/mklldeps.py
+@@ -56,38 +56,13 @@
+ f.write("\n")
+-args = [llvm_config, '--shared-mode']
+-args.extend(components)
+-llvm_shared, out = runErr(args)
+-if llvm_shared:
+-    llvm_shared = 'shared' in out
++llvm_shared = True
+ # LLVM libs
+-args = [llvm_config, '--libs', '--system-libs']
+-args.extend(components)
+-out = run(args)
+-for lib in out.strip().replace("\n", ' ').split(' '):
+-    if len(lib) == 0:
+-        continue
+-    # in some cases we get extra spaces in between libs so ignore those
+-    if len(lib) == 1 and lib == ' ':
+-        continue
+-    # not all libs strictly follow -lfoo, on Bitrig, there is -pthread
+-    if lib[0:2] == '-l':
+-        lib = lib.strip()[2:]
+-    elif lib[0] == '-':
+-        lib = lib.strip()[1:]
+-    # If this actually points at a literal file then we're on MSVC which now
+-    # prints full paths, so get just the name of the library and strip off the
+-    # trailing ".lib"
+-    elif os.path.exists(lib):
+-        lib = os.path.basename(lib)[:-4]
+-    elif lib[-4:] == '.lib':
+-        lib = lib[:-4]
+-    f.write("#[link(name = \"" + lib + "\"")
+-    if not llvm_shared and 'LLVM' in lib:
+-        f.write(", kind = \"static\"")
+-    f.write(")]\n")
++# Link in Debian full LLVM shared library.
++# TODO: not sure what to do in the cross-compiling case.
++f.write("#[link(name = \"LLVM-3.9\")]\n")
++
+ # LLVM ldflags
+ out = run([llvm_config, '--ldflags'])
diff --git a/patches/d-fill-in-mips-mk-rules.patch b/patches/d-fill-in-mips-mk-rules.patch
new file mode 100644 (file)
index 0000000..1eab99c
--- /dev/null
@@ -0,0 +1,97 @@
+Description: Fill in mips Makefile rules
+ Upstream is about to delete the Makefiles in the next version, so this will
+ remain a Debian-specific patch.
+Author: Ximin Luo <infinity0@debian.org>
+Bug: https://github.com/rust-lang/rust/pull/38650
+Forwarded: not-needed
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/mk/cfg/mips-unknown-linux-gnu.mk
++++ b/mk/cfg/mips-unknown-linux-gnu.mk
+@@ -18,7 +18,7 @@
+ CFG_WINDOWSY_mips-unknown-linux-gnu :=
+ CFG_UNIXY_mips-unknown-linux-gnu := 1
+ CFG_LDPATH_mips-unknown-linux-gnu :=
+-CFG_RUN_mips-unknown-linux-gnu=
+-CFG_RUN_TARG_mips-unknown-linux-gnu=
++CFG_RUN_mips-unknown-linux-gnu=$(2)
++CFG_RUN_TARG_mips-unknown-linux-gnu=$(call CFG_RUN_mips-unknown-linux-gnu,,$(2))
+ RUSTC_FLAGS_mips-unknown-linux-gnu :=
+ CFG_GNU_TRIPLE_mips-unknown-linux-gnu := mips-unknown-linux-gnu
+--- a/mk/cfg/mips64-unknown-linux-gnuabi64.mk
++++ b/mk/cfg/mips64-unknown-linux-gnuabi64.mk
+@@ -1 +1,24 @@
+-# rustbuild-only target
++# mips64-unknown-linux-gnuabi64 configuration
++CC_mips64-unknown-linux-gnuabi64=mips64-linux-gnuabi64-gcc
++CXX_mips64-unknown-linux-gnuabi64=mips64-linux-gnuabi64-g++
++CPP_mips64-unknown-linux-gnuabi64=mips64-linux-gnuabi64-gcc
++AR_mips64-unknown-linux-gnuabi64=mips64-linux-gnuabi64-ar
++CFG_LIB_NAME_mips64-unknown-linux-gnuabi64=lib$(1).so
++CFG_STATIC_LIB_NAME_mips64-unknown-linux-gnuabi64=lib$(1).a
++CFG_LIB_GLOB_mips64-unknown-linux-gnuabi64=lib$(1)-*.so
++CFG_LIB_DSYM_GLOB_mips64-unknown-linux-gnuabi64=lib$(1)-*.dylib.dSYM
++CFG_JEMALLOC_CFLAGS_mips64-unknown-linux-gnuabi64 := -mips64r2 -mabi=64 $(CFLAGS)
++CFG_GCCISH_CFLAGS_mips64-unknown-linux-gnuabi64 := -Wall -g -fPIC -mips64r2 -mabi=64 $(CFLAGS)
++CFG_GCCISH_CXXFLAGS_mips64-unknown-linux-gnuabi64 := -fno-rtti $(CXXFLAGS)
++CFG_GCCISH_LINK_FLAGS_mips64-unknown-linux-gnuabi64 := -shared -fPIC -g -mips64r2
++CFG_GCCISH_DEF_FLAG_mips64-unknown-linux-gnuabi64 := -Wl,--export-dynamic,--dynamic-list=
++CFG_LLC_FLAGS_mips64-unknown-linux-gnuabi64 :=
++CFG_INSTALL_NAME_mips64-unknown-linux-gnuabi64 =
++CFG_EXE_SUFFIX_mips64-unknown-linux-gnuabi64 :=
++CFG_WINDOWSY_mips64-unknown-linux-gnuabi64 :=
++CFG_UNIXY_mips64-unknown-linux-gnuabi64 := 1
++CFG_LDPATH_mips64-unknown-linux-gnuabi64 :=
++CFG_RUN_mips64-unknown-linux-gnuabi64=$(2)
++CFG_RUN_TARG_mips64-unknown-linux-gnuabi64=$(call CFG_RUN_mips64-unknown-linux-gnuabi64,,$(2))
++RUSTC_FLAGS_mips64-unknown-linux-gnuabi64 :=
++CFG_GNU_TRIPLE_mips64-unknown-linux-gnuabi64 := mips64-unknown-linux-gnuabi64
+--- a/mk/cfg/mips64el-unknown-linux-gnuabi64.mk
++++ b/mk/cfg/mips64el-unknown-linux-gnuabi64.mk
+@@ -1 +1,24 @@
+-# rustbuild-only target
++# mips64el-unknown-linux-gnuabi64 configuration
++CC_mips64el-unknown-linux-gnuabi64=mips64el-linux-gnuabi64-gcc
++CXX_mips64el-unknown-linux-gnuabi64=mips64el-linux-gnuabi64-g++
++CPP_mips64el-unknown-linux-gnuabi64=mips64el-linux-gnuabi64-gcc
++AR_mips64el-unknown-linux-gnuabi64=mips64el-linux-gnuabi64-ar
++CFG_LIB_NAME_mips64el-unknown-linux-gnuabi64=lib$(1).so
++CFG_STATIC_LIB_NAME_mips64el-unknown-linux-gnuabi64=lib$(1).a
++CFG_LIB_GLOB_mips64el-unknown-linux-gnuabi64=lib$(1)-*.so
++CFG_LIB_DSYM_GLOB_mips64el-unknown-linux-gnuabi64=lib$(1)-*.dylib.dSYM
++CFG_JEMALLOC_CFLAGS_mips64el-unknown-linux-gnuabi64 := -mips64r2 -mabi=64 $(CFLAGS)
++CFG_GCCISH_CFLAGS_mips64el-unknown-linux-gnuabi64 := -Wall -g -fPIC -mips64r2 -mabi=64 $(CFLAGS)
++CFG_GCCISH_CXXFLAGS_mips64el-unknown-linux-gnuabi64 := -fno-rtti $(CXXFLAGS)
++CFG_GCCISH_LINK_FLAGS_mips64el-unknown-linux-gnuabi64 := -shared -fPIC -g -mips64r2
++CFG_GCCISH_DEF_FLAG_mips64el-unknown-linux-gnuabi64 := -Wl,--export-dynamic,--dynamic-list=
++CFG_LLC_FLAGS_mips64el-unknown-linux-gnuabi64 :=
++CFG_INSTALL_NAME_mips64el-unknown-linux-gnuabi64 =
++CFG_EXE_SUFFIX_mips64el-unknown-linux-gnuabi64 :=
++CFG_WINDOWSY_mips64el-unknown-linux-gnuabi64 :=
++CFG_UNIXY_mips64el-unknown-linux-gnuabi64 := 1
++CFG_LDPATH_mips64el-unknown-linux-gnuabi64 :=
++CFG_RUN_mips64el-unknown-linux-gnuabi64=$(2)
++CFG_RUN_TARG_mips64el-unknown-linux-gnuabi64=$(call CFG_RUN_mips64el-unknown-linux-gnuabi64,,$(2))
++RUSTC_FLAGS_mips64el-unknown-linux-gnuabi64 :=
++CFG_GNU_TRIPLE_mips64el-unknown-linux-gnuabi64 := mips64el-unknown-linux-gnuabi64
+--- a/mk/cfg/mipsel-unknown-linux-gnu.mk
++++ b/mk/cfg/mipsel-unknown-linux-gnu.mk
+@@ -1,7 +1,7 @@
+ # mipsel-unknown-linux-gnu configuration
+ CC_mipsel-unknown-linux-gnu=mipsel-linux-gnu-gcc
+ CXX_mipsel-unknown-linux-gnu=mipsel-linux-gnu-g++
+-CPP_mipsel-unknown-linux-gnu=mipsel-linux-gnu-gcc
++CPP_mipsel-unknown-linux-gnu=mipsel-linux-gnu-gcc -E
+ AR_mipsel-unknown-linux-gnu=mipsel-linux-gnu-ar
+ CFG_LIB_NAME_mipsel-unknown-linux-gnu=lib$(1).so
+ CFG_STATIC_LIB_NAME_mipsel-unknown-linux-gnu=lib$(1).a
+@@ -18,7 +18,7 @@
+ CFG_WINDOWSY_mipsel-unknown-linux-gnu :=
+ CFG_UNIXY_mipsel-unknown-linux-gnu := 1
+ CFG_LDPATH_mipsel-unknown-linux-gnu :=
+-CFG_RUN_mipsel-unknown-linux-gnu=
+-CFG_RUN_TARG_mipsel-unknown-linux-gnu=
++CFG_RUN_mipsel-unknown-linux-gnu=$(2)
++CFG_RUN_TARG_mipsel-unknown-linux-gnu=$(call CFG_RUN_mipsel-unknown-linux-gnu,,$(2))
+ RUSTC_FLAGS_mipsel-unknown-linux-gnu :=
+ CFG_GNU_TRIPLE_mipsel-unknown-linux-gnu := mipsel-unknown-linux-gnu
diff --git a/patches/d-fix-configure-for-deb-arches.patch b/patches/d-fix-configure-for-deb-arches.patch
new file mode 100644 (file)
index 0000000..dc1af76
--- /dev/null
@@ -0,0 +1,36 @@
+Description: Fix configure architecture targets for Debian
+ Rust upstream sometimes builds for multiple triplets depending on the CPU,
+ since it could be valid for multiple triplets. We don't need to do this for
+ Debian; each DEB_HOST_ARCH maps to a single triplet. This patch indirectly
+ achieves this by setting CFG_{OS,CPU}TYPE to more specific values depending
+ on what DEB_HOST_ARCH is, hopefully preventing a multiple build.
+ .
+ Tested on armhf, untested on armel due to missing build-deps.
+Author: Ximin Luo <infinity0@debian.org>
+Forwarded: not-needed
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/configure
++++ b/configure
+@@ -514,8 +514,19 @@
+         ;;
+     armv7l | armv8l)
+-        CFG_CPUTYPE=armv7
+-        CFG_OSTYPE="${CFG_OSTYPE}eabihf"
++        case $DEB_HOST_ARCH in
++        armhf)
++            CFG_CPUTYPE=armv7
++            CFG_OSTYPE="${CFG_OSTYPE}eabihf"
++           ;;
++        armel)
++            CFG_CPUTYPE=arm
++            CFG_OSTYPE="${CFG_OSTYPE}eabi"
++           ;;
++        *)
++            err "unknown DEB_HOST_ARCH $DEB_HOST_ARCH for armv7l/armv8l cpu"
++            ;;
++        esac
+         ;;
+     aarch64)
diff --git a/patches/d-fix-configure-for-deb-arches_1.15.patch b/patches/d-fix-configure-for-deb-arches_1.15.patch
new file mode 100644 (file)
index 0000000..5699a5e
--- /dev/null
@@ -0,0 +1,38 @@
+Description: Fix configure architecture targets for Debian
+ Rust upstream sometimes builds for multiple triplets depending on the CPU,
+ since it could be valid for multiple triplets. We don't need to do this for
+ Debian; each DEB_HOST_ARCH maps to a single triplet. This patch indirectly
+ achieves this by setting CFG_{OS,CPU}TYPE to more specific values depending
+ on what DEB_HOST_ARCH is, hopefully preventing a multiple build.
+ .
+ Tested on armhf, untested on armel due to missing build-deps.
+Author: Ximin Luo <infinity0@debian.org>
+Forwarded: not-needed
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: rustc.git/configure
+===================================================================
+--- rustc.git.orig/configure
++++ rustc.git/configure
+@@ -508,8 +508,19 @@ case $CFG_CPUTYPE in
+         ;;
+     armv7l)
+-        CFG_CPUTYPE=armv7
+-        CFG_OSTYPE="${CFG_OSTYPE}eabihf"
++        case $DEB_HOST_ARCH in
++        armhf)
++            CFG_CPUTYPE=armv7
++            CFG_OSTYPE="${CFG_OSTYPE}eabihf"
++           ;;
++        armel)
++            CFG_CPUTYPE=arm
++            CFG_OSTYPE="${CFG_OSTYPE}eabi"
++           ;;
++        *)
++            err "unknown DEB_HOST_ARCH $DEB_HOST_ARCH for armv7l cpu"
++            ;;
++        esac
+         ;;
+     aarch64)
diff --git a/patches/d-missing-ref-dlsym-ppc64el.patch b/patches/d-missing-ref-dlsym-ppc64el.patch
new file mode 100644 (file)
index 0000000..9c4cfbf
--- /dev/null
@@ -0,0 +1,21 @@
+Description: TODO
+ See https://lists.alioth.debian.org/pipermail/pkg-rust-maintainers/2017-February/000828.html
+ for possible followups
+Author: Erwan Prioul <erwan@linux.vnet.ibm.com>
+Forwarded: TODO
+
+diff -Naur a/src/test/run-make/issue-24445/Makefile b/src/test/run-make/issue-24445/Makefile
+--- a/src/test/run-make/issue-24445/Makefile   2017-02-17 10:21:17.092001151 +0000
++++ b/src/test/run-make/issue-24445/Makefile   2017-02-21 13:07:36.719995153 +0000
+@@ -3,9 +3,9 @@
+ ifeq ($(UNAME),Linux)
+ all:
+       $(RUSTC) foo.rs
+-      $(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -o $(TMPDIR)/foo
++      $(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -ldl -o $(TMPDIR)/foo
+       $(call RUN,foo)
+-      $(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -pie -fPIC -o $(TMPDIR)/foo
++      $(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -ldl -pie -fPIC -o $(TMPDIR)/foo
+       $(call RUN,foo)
+ else
+ all:
diff --git a/patches/d-rust-gdb-paths b/patches/d-rust-gdb-paths
new file mode 100644 (file)
index 0000000..0f434e9
--- /dev/null
@@ -0,0 +1,25 @@
+Description: Hardcode GDB python module directory
+ Debian package installs python modules into a fixed directory, so
+ just hardcode path in wrapper script.
+Author: Angus Lees <gus@debian.org>
+Forwarded: not-needed
+
+--- a/src/etc/rust-gdb
++++ 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"
++#RUSTC_SYSROOT=`rustc --print=sysroot`
++#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 \
+   -d "$GDB_PYTHON_MODULE_DIRECTORY" \
+   -iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \
+   "$@"
diff --git a/patches/d-rust-lldb-paths b/patches/d-rust-lldb-paths
new file mode 100644 (file)
index 0000000..34b8679
--- /dev/null
@@ -0,0 +1,33 @@
+Description: Hardcode LLDB python module directory
+ Debian package installs python modules into a fixed directory, so
+ just hardcode path in wrapper script.
+Author: Angus Lees <gus@debian.org>
+Forwarded: not-needed
+
+--- a/src/etc/rust-lldb
++++ b/src/etc/rust-lldb
+@@ -12,7 +12,7 @@
+ # Exit if anything fails
+ set -e
+-LLDB_VERSION=`lldb --version 2>/dev/null | head -1 | cut -d. -f1`
++LLDB_VERSION=`lldb-3.9 --version 2>/dev/null | head -1 | cut -d. -f1`
+ if [ "$LLDB_VERSION" = "lldb-350" ]
+ then
+@@ -29,13 +29,10 @@
+ # 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`
+-
+ # Write the LLDB script to the tempfile
+-echo "command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_rust_formatters.py\"" >> $TMPFILE
++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
+ # Call LLDB with the script added to the argument list
+-lldb --source-before-file="$TMPFILE" "$@"
++lldb-3.9 --source-before-file="$TMPFILE" "$@"
diff --git a/patches/d-use-system-jquery.patch b/patches/d-use-system-jquery.patch
new file mode 100644 (file)
index 0000000..13fea5f
--- /dev/null
@@ -0,0 +1,23 @@
+Index: rustc.git/src/librustdoc/html/render.rs
+===================================================================
+--- rustc.git.orig/src/librustdoc/html/render.rs
++++ rustc.git/src/librustdoc/html/render.rs
+@@ -656,8 +656,16 @@ fn write_shared(cx: &Context,
+     // Add all the static files. These may already exist, but we just
+     // overwrite them anyway to make sure that they're fresh and up-to-date.
+-    write(cx.dst.join("jquery.js"),
+-          include_bytes!("static/jquery-2.1.4.min.js"))?;
++    {
++        // In Debian, just copy the system jquery instead.
++        // If the file gets installed, we can eventually create something like
++        // dh_rustdoc, similar to dh_sphinxdoc to detect these copies and
++        // convert them into symlinks.
++        let jquery_system_path = "/usr/share/javascript/jquery/jquery.min.js";
++        let jquery = cx.dst.join("jquery.js");
++        let jquery = jquery.as_path();
++        try_err!(fs::copy(jquery_system_path, jquery), &jquery);
++    }
+     write(cx.dst.join("main.js"),
+           include_bytes!("static/main.js"))?;
+     write(cx.dst.join("rustdoc.css"),
diff --git a/patches/gcc-4.8-aarch64-ice.diff b/patches/gcc-4.8-aarch64-ice.diff
new file mode 100644 (file)
index 0000000..bc9f90e
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/src/compiler-rt/lib/builtins/trunctfdf2.c
++++ b/src/compiler-rt/lib/builtins/trunctfdf2.c
+@@ -7,6 +7,12 @@
+ //
+ //===----------------------------------------------------------------------===//
++#if defined(__aarch64__) && (__GNUC__ <= 4) && (__GNUC_MINOR__ <= 8)
++// work around https://launchpad.net/bugs/1667761
++#pragma GCC push_options
++#pragma GCC optimize "O1"
++#endif
++
+ #define QUAD_PRECISION
+ #include "fp_lib.h"
+@@ -20,3 +26,7 @@
+ }
+ #endif
++
++#if defined(__aarch64__) && (__GNUC__ <= 4) && (__GNUC_MINOR__ <= 8)
++#pragma GCC pop_options
++#endif
diff --git a/patches/series b/patches/series
new file mode 100644 (file)
index 0000000..947a5e1
--- /dev/null
@@ -0,0 +1,33 @@
+# Patches for upstream
+# Ideally we would order these as follows:
+# [ applied already ], [ pending ], [ forwarded or to-be-forwarded ]
+u-reproducible-dl-stage0.patch
+u-ignoretest-armhf_01.patch
+u-ignoretest-armhf_02.patch
+u-ignoretest-armhf_03.patch
+u-ignoretest-armhf_04.patch
+u-ignoretest-arm64-stdcall.patch
+#u-ignoretest-i386.patch
+u-ignoretest-arm64.patch
+u-detect-mips-cpu.patch
+u-ignoretest-powerpc.patch
+#u-destdir-support.diff
+u-arm-on-64bit-kernel.diff
+
+# Debian-specific patches, not suitable for upstream
+d-rust-gdb-paths
+d-rust-lldb-paths
+d-add-soname.patch
+d-dont-download-stage0.patch
+d-fix-configure-for-deb-arches.patch
+d-dynamic-link-llvm.patch
+d-use-system-jquery.patch
+d-fill-in-mips-mk-rules.patch
+d-missing-ref-dlsym-ppc64el.patch
+
+# This might be useful for 1.16 when mk/ is deleted; however we need to figure
+# out how to apply the equivalent patch in a different file, as Makefile is a
+# generated file. For 1.15 mk/ still applies and all-no-docs still exists
+#d-disable-doc-build-in-all.diff
+
+gcc-4.8-aarch64-ice.diff
diff --git a/patches/u-arm-on-64bit-kernel.diff b/patches/u-arm-on-64bit-kernel.diff
new file mode 100644 (file)
index 0000000..25bc561
--- /dev/null
@@ -0,0 +1,31 @@
+Description: Support armhf running on a 64-bit kernel
+Author: Matthias Klose <doko@debian.org>
+Applied-Upstream: commit:0a55c8e659f0fc540b740101f7a02ab28e300aa4
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: rust/configure
+===================================================================
+--- rust.orig/configure
++++ rust/configure
+@@ -513,7 +513,7 @@ case $CFG_CPUTYPE in
+         CFG_OSTYPE="${CFG_OSTYPE}eabihf"
+         ;;
+-    armv7l)
++    armv7l | armv8l)
+         CFG_CPUTYPE=armv7
+         CFG_OSTYPE="${CFG_OSTYPE}eabihf"
+         ;;
+Index: rust/src/bootstrap/bootstrap.py
+===================================================================
+--- rust.orig/src/bootstrap/bootstrap.py
++++ rust/src/bootstrap/bootstrap.py
+@@ -374,7 +374,7 @@ class RustBuild(object):
+             cputype = 'i686'
+         elif cputype in {'xscale', 'arm'}:
+             cputype = 'arm'
+-        elif cputype == 'armv7l':
++        elif cputype in {'armv7l', 'armv8l'}:
+             cputype = 'arm'
+             ostype += 'eabihf'
+         elif cputype == 'aarch64':
diff --git a/patches/u-destdir-support.diff b/patches/u-destdir-support.diff
new file mode 100644 (file)
index 0000000..7e8961c
--- /dev/null
@@ -0,0 +1,194 @@
+diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
+index 04d01759a..90f3ae956 100644
+--- a/src/bootstrap/compile.rs
++++ b/src/bootstrap/compile.rs
+@@ -187,7 +187,7 @@ pub fn rustc<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
+     cargo.env("CFG_RELEASE", &build.release)
+          .env("CFG_RELEASE_CHANNEL", &build.config.channel)
+          .env("CFG_VERSION", &build.version)
+-         .env("CFG_PREFIX", build.config.prefix.clone().unwrap_or(String::new()))
++         .env("CFG_PREFIX", build.config.prefix.clone().unwrap_or(PathBuf::new()))
+          .env("CFG_LIBDIR_RELATIVE", "lib");
+     // If we're not building a compiler with debugging information then remove
+diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
+index 1f67b52db..e90d7ed24 100644
+--- a/src/bootstrap/config.rs
++++ b/src/bootstrap/config.rs
+@@ -85,10 +85,10 @@ pub struct Config {
+     pub quiet_tests: bool,
+     // Fallback musl-root for all targets
+     pub musl_root: Option<PathBuf>,
+-    pub prefix: Option<String>,
+-    pub docdir: Option<String>,
+-    pub libdir: Option<String>,
+-    pub mandir: Option<String>,
++    pub prefix: Option<PathBuf>,
++    pub docdir: Option<PathBuf>,
++    pub libdir: Option<PathBuf>,
++    pub mandir: Option<PathBuf>,
+     pub codegen_tests: bool,
+     pub nodejs: Option<PathBuf>,
+     pub gdb: Option<PathBuf>,
+@@ -114,6 +114,7 @@ pub struct Target {
+ #[derive(RustcDecodable, Default)]
+ struct TomlConfig {
+     build: Option<Build>,
++    install: Option<Install>,
+     llvm: Option<Llvm>,
+     rust: Option<Rust>,
+     target: Option<HashMap<String, TomlTarget>>,
+@@ -136,6 +137,15 @@ struct Build {
+     python: Option<String>,
+ }
++/// TOML representation of various global install decisions.
++#[derive(RustcDecodable, Default, Clone)]
++struct Install {
++    prefix: Option<String>,
++    mandir: Option<String>,
++    docdir: Option<String>,
++    libdir: Option<String>,
++}
++
+ /// TOML representation of how the LLVM build is configured.
+ #[derive(RustcDecodable, Default)]
+ struct Llvm {
+@@ -260,6 +270,13 @@ impl Config {
+         set(&mut config.submodules, build.submodules);
+         set(&mut config.vendor, build.vendor);
++        if let Some(ref install) = toml.install {
++            config.prefix = install.prefix.clone().map(PathBuf::from);
++            config.mandir = install.mandir.clone().map(PathBuf::from);
++            config.docdir = install.docdir.clone().map(PathBuf::from);
++            config.libdir = install.libdir.clone().map(PathBuf::from);
++        }
++
+         if let Some(ref llvm) = toml.llvm {
+             match llvm.ccache {
+                 Some(StringOrBool::String(ref s)) => {
+@@ -277,6 +294,7 @@ impl Config {
+             set(&mut config.llvm_version_check, llvm.version_check);
+             set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp);
+         }
++
+         if let Some(ref rust) = toml.rust {
+             set(&mut config.rust_debug_assertions, rust.debug_assertions);
+             set(&mut config.rust_debuginfo, rust.debuginfo);
+@@ -443,16 +461,16 @@ impl Config {
+                     self.channel = value.to_string();
+                 }
+                 "CFG_PREFIX" => {
+-                    self.prefix = Some(value.to_string());
++                    self.prefix = Some(PathBuf::from(value));
+                 }
+                 "CFG_DOCDIR" => {
+-                    self.docdir = Some(value.to_string());
++                    self.docdir = Some(PathBuf::from(value));
+                 }
+                 "CFG_LIBDIR" => {
+-                    self.libdir = Some(value.to_string());
++                    self.libdir = Some(PathBuf::from(value));
+                 }
+                 "CFG_MANDIR" => {
+-                    self.mandir = Some(value.to_string());
++                    self.mandir = Some(PathBuf::from(value));
+                 }
+                 "CFG_LLVM_ROOT" if value.len() > 0 => {
+                     let target = self.target_config.entry(self.build.clone())
+diff --git a/src/bootstrap/config.toml.example b/src/bootstrap/config.toml.example
+index 22542f873..b22d68ea2 100644
+--- a/src/bootstrap/config.toml.example
++++ b/src/bootstrap/config.toml.example
+@@ -72,6 +72,9 @@
+ # specified, use this rustc binary instead as the stage0 snapshot compiler.
+ #rustc = "/path/to/bin/rustc"
++# Instead of installing installing to /usr/local, install to this path instead.
++#prefix = "/path/to/install"
++
+ # Flag to specify whether any documentation is built. If false, rustdoc and
+ # friends will still be compiled but they will not be used to generate any
+ # documentation.
+diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
+index 9bc5a7c00..efc460f35 100644
+--- a/src/bootstrap/install.rs
++++ b/src/bootstrap/install.rs
+@@ -13,9 +13,9 @@
+ //! This module is responsible for installing the standard library,
+ //! compiler, and documentation.
++use std::env;
+ use std::fs;
+-use std::borrow::Cow;
+-use std::path::Path;
++use std::path::{Path, PathBuf, Component};
+ use std::process::Command;
+ use Build;
+@@ -23,23 +23,35 @@ use dist::{package_vers, sanitize_sh, tmpdir};
+ /// Installs everything.
+ pub fn install(build: &Build, stage: u32, host: &str) {
+-    let prefix = build.config.prefix.as_ref().clone().map(|x| Path::new(x))
+-        .unwrap_or(Path::new("/usr/local"));
+-    let docdir = build.config.docdir.as_ref().clone().map(|x| Cow::Borrowed(Path::new(x)))
+-        .unwrap_or(Cow::Owned(prefix.join("share/doc/rust")));
+-    let libdir = build.config.libdir.as_ref().clone().map(|x| Cow::Borrowed(Path::new(x)))
+-        .unwrap_or(Cow::Owned(prefix.join("lib")));
+-    let mandir = build.config.mandir.as_ref().clone().map(|x| Cow::Borrowed(Path::new(x)))
+-        .unwrap_or(Cow::Owned(prefix.join("share/man")));
++    let prefix_default = PathBuf::from("/usr/local");
++    let docdir_default = PathBuf::from("share/doc/rust");
++    let mandir_default = PathBuf::from("share/man");
++    let libdir_default = PathBuf::from("lib");
++    let prefix = build.config.prefix.as_ref().unwrap_or(&prefix_default);
++    let docdir = build.config.docdir.as_ref().unwrap_or(&docdir_default);
++    let libdir = build.config.libdir.as_ref().unwrap_or(&libdir_default);
++    let mandir = build.config.mandir.as_ref().unwrap_or(&mandir_default);
++
++    let docdir = prefix.join(docdir);
++    let libdir = prefix.join(libdir);
++    let mandir = prefix.join(mandir);
++
++    let destdir = env::var_os("DESTDIR").map(PathBuf::from);
++
++    let prefix = add_destdir(&prefix, &destdir);
++    let docdir = add_destdir(&docdir, &destdir);
++    let libdir = add_destdir(&libdir, &destdir);
++    let mandir = add_destdir(&mandir, &destdir);
++
+     let empty_dir = build.out.join("tmp/empty_dir");
+     t!(fs::create_dir_all(&empty_dir));
+     if build.config.docs {
+-        install_sh(&build, "docs", "rust-docs", stage, host, prefix,
++        install_sh(&build, "docs", "rust-docs", stage, host, &prefix,
+                    &docdir, &libdir, &mandir, &empty_dir);
+     }
+-    install_sh(&build, "std", "rust-std", stage, host, prefix,
++    install_sh(&build, "std", "rust-std", stage, host, &prefix,
+                &docdir, &libdir, &mandir, &empty_dir);
+-    install_sh(&build, "rustc", "rustc", stage, host, prefix,
++    install_sh(&build, "rustc", "rustc", stage, host, &prefix,
+                &docdir, &libdir, &mandir, &empty_dir);
+     t!(fs::remove_dir_all(&empty_dir));
+ }
+@@ -59,3 +71,17 @@ fn install_sh(build: &Build, package: &str, name: &str, stage: u32, host: &str,
+        .arg("--disable-ldconfig");
+     build.run(&mut cmd);
+ }
++
++fn add_destdir(path: &Path, destdir: &Option<PathBuf>) -> PathBuf {
++    let mut ret = match *destdir {
++        Some(ref dest) => dest.clone(),
++        None => return path.to_path_buf(),
++    };
++    for part in path.components() {
++        match part {
++            Component::Normal(s) => ret.push(s),
++            _ => {}
++        }
++    }
++    return ret
++}
diff --git a/patches/u-detect-mips-cpu.patch b/patches/u-detect-mips-cpu.patch
new file mode 100644 (file)
index 0000000..47f83f5
--- /dev/null
@@ -0,0 +1,54 @@
+Description: Detect mips CPUs in ./configure
+ This basically recreates the logic that already exists in bootstrap.py
+ Endianness test from https://stackoverflow.com/questions/26859098/testing-endianness-of-system-with-the-unix-shell
+Author: Ximin Luo <infinity0@debian.org>
+Bug: https://github.com/rust-lang/rust/pull/38650
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: rust/configure
+===================================================================
+--- rust.orig/configure
++++ rust/configure
+@@ -388,6 +388,7 @@ msg "inspecting environment"
+ CFG_OSTYPE=$(uname -s)
+ CFG_CPUTYPE=$(uname -m)
++ENDIAN=$(printf '\1' | od -dAn)
+ if [ $CFG_OSTYPE = Darwin -a $CFG_CPUTYPE = i386 ]
+ then
+@@ -549,6 +550,17 @@ case $CFG_CPUTYPE in
+         if [ "$ENDIAN" -eq 1 ]; then
+             CFG_CPUTYPE="${CFG_CPUTYPE}el"
+         elif [ "$ENDIAN" -ne 256 ]; then
++            err "unknown endianness: $ENDIAN (expecting 1 for little or 256 for big)"
++        fi
++        ;;
++
++    mips | mips64)
++        if [ "$CFG_CPUTYPE" = "mips64" ]; then
++            CFG_OSTYPE="${CFG_OSTYPE}abi64"
++        fi
++        if [ "$ENDIAN" -eq 1 ]; then
++            CFG_CPUTYPE="${CFG_CPUTYPE}el"
++        elif [ "$ENDIAN" -ne 256 ]; then
+             err "unknown endianness: $ENDIAN (expecting 1 for little or 256 for big)"
+         fi
+         ;;
+Index: rust/src/test/run-pass/conditional-compile-arch.rs
+===================================================================
+--- rust.orig/src/test/run-pass/conditional-compile-arch.rs
++++ rust/src/test/run-pass/conditional-compile-arch.rs
+@@ -28,6 +28,12 @@ pub fn main() { }
+ #[cfg(target_arch = "mips64")]
+ pub fn main() { }
++#[cfg(target_arch = "mips")]
++pub fn main() { }
++
++#[cfg(target_arch = "mips64")]
++pub fn main() { }
++
+ #[cfg(target_arch = "powerpc64")]
+ pub fn main() { }
diff --git a/patches/u-ignoretest-arm64-stdcall.patch b/patches/u-ignoretest-arm64-stdcall.patch
new file mode 100644 (file)
index 0000000..6232b22
--- /dev/null
@@ -0,0 +1,21 @@
+Description: Ignore failing stdcall test on arm64
+ Disable test that fails on Debian; "stdcall" is a win32 calling convention and
+ not supposed to work here anyway.
+Author: Ximin Luo <infinity0@debian.org>
+Bug: https://github.com/rust-lang/rust/issues/36348
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837533
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: rust/src/test/debuginfo/type-names.rs
+===================================================================
+--- rust.orig/src/test/debuginfo/type-names.rs
++++ rust/src/test/debuginfo/type-names.rs
+@@ -363,7 +363,7 @@ fn main() {
+     let rust_fn_with_return_value = (rust_fn_with_return_value, 0_usize);
+     let extern_c_fn_with_return_value = (extern_c_fn_with_return_value, 0_usize);
+     let unsafe_fn_with_return_value = (unsafe_fn_with_return_value, 0_usize);
+-    let extern_stdcall_fn_with_return_value = (extern_stdcall_fn_with_return_value, 0_usize);
++//    let extern_stdcall_fn_with_return_value = (extern_stdcall_fn_with_return_value, 0_usize);
+     let generic_function_int = (generic_function::<isize>, 0_usize);
+     let generic_function_struct3 = (generic_function::<mod1::mod2::Struct3>, 0_usize);
diff --git a/patches/u-ignoretest-arm64.patch b/patches/u-ignoretest-arm64.patch
new file mode 100644 (file)
index 0000000..6441f86
--- /dev/null
@@ -0,0 +1,12 @@
+Index: rust/src/test/run-pass-valgrind/down-with-thread-dtors.rs
+===================================================================
+--- rust.orig/src/test/run-pass-valgrind/down-with-thread-dtors.rs
++++ rust/src/test/run-pass-valgrind/down-with-thread-dtors.rs
+@@ -8,6 +8,7 @@
+ // option. This file may not be copied, modified, or distributed
+ // except according to those terms.
++// ignore-aarch64
+ // no-prefer-dynamic
+ // ignore-emscripten
diff --git a/patches/u-ignoretest-armhf_01.patch b/patches/u-ignoretest-armhf_01.patch
new file mode 100644 (file)
index 0000000..9f6917b
--- /dev/null
@@ -0,0 +1,20 @@
+Description: Ignore atomic-lock-free tests on armhf
+Author: Ximin Luo <infinity0@debian.org>
+Bug: https://github.com/rust-lang/rust/issues/40238
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/test/run-make/atomic-lock-free/Makefile
++++ b/src/test/run-make/atomic-lock-free/Makefile
+@@ -5,6 +5,7 @@
+ all:
+ ifeq ($(UNAME),Linux)
++ifeq (,$(filter armv7-unknown-linux-gnueabihf,$(TARGET)))
+ ifeq ($(filter x86,$(LLVM_COMPONENTS)),x86)
+       $(RUSTC) --target=i686-unknown-linux-gnu atomic_lock_free.rs
+       nm "$(TMPDIR)/libatomic_lock_free.rlib" | grep -vq __atomic_fetch_add
+@@ -40,3 +41,4 @@
+       nm "$(TMPDIR)/libatomic_lock_free.rlib" | grep -vq __atomic_fetch_add
+ endif
+ endif
++endif
diff --git a/patches/u-ignoretest-armhf_02.patch b/patches/u-ignoretest-armhf_02.patch
new file mode 100644 (file)
index 0000000..86b18d9
--- /dev/null
@@ -0,0 +1,31 @@
+Description: Disable some relocation-model tests for armhf
+Author: Ximin Luo <infinity0@debian.org>
+Bug: https://github.com/rust-lang/rust/issues/40145
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/test/run-make/relocation-model/Makefile
++++ b/src/test/run-make/relocation-model/Makefile
+@@ -1,17 +1,22 @@
+ -include ../tools.mk
+ all: others
++ifneq ($(filter arm,$(LLVM_COMPONENTS)),arm)
++# FIXME(#40145)
+       $(RUSTC) -C relocation-model=dynamic-no-pic foo.rs
+       $(call RUN,foo)
+       $(RUSTC) -C relocation-model=default foo.rs
+       $(call RUN,foo)
+-
++endif
+       $(RUSTC) -C relocation-model=dynamic-no-pic --crate-type=dylib foo.rs --emit=link,obj
+ ifdef IS_MSVC
+ # FIXME(#28026)
+ others:
++else ifeq ($(filter arm,$(LLVM_COMPONENTS)),arm)
++# FIXME(#40145)
++others:
+ else
+ others:
+       $(RUSTC) -C relocation-model=static foo.rs
diff --git a/patches/u-ignoretest-armhf_03.patch b/patches/u-ignoretest-armhf_03.patch
new file mode 100644 (file)
index 0000000..e0bb0b7
--- /dev/null
@@ -0,0 +1,23 @@
+Description: Disable reference.md "Items_and_attributes_15" doctest, failing on armhf
+ This passes on i386 amd64 arm64
+ .
+ See https://gist.github.com/infinity0/2f5452d4ee9deb2f1bacb8b39c987c9c
+ for thread stacktrace from 1.10.0 when it hung instead of failed; eddyb from
+ #rustc suggested this might be an LLVM issue.
+Author: Ximin Luo <infinity0@debian.org>
+Bug: https://github.com/rust-lang/rust/issues/40260
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: rustc.git/src/doc/reference.md
+===================================================================
+--- rustc.git.orig/src/doc/reference.md
++++ rustc.git/src/doc/reference.md
+@@ -1133,7 +1133,7 @@ bodies defined in Rust code _can be call
+ in the same way as any other Rust function, except that they have the `extern`
+ modifier.
+-```
++```{.ignore}
+ // Declares an extern fn, the ABI defaults to "C"
+ extern fn new_i32() -> i32 { 0 }
diff --git a/patches/u-ignoretest-armhf_04.patch b/patches/u-ignoretest-armhf_04.patch
new file mode 100644 (file)
index 0000000..80cb3ea
--- /dev/null
@@ -0,0 +1,16 @@
+Description: Disable failing test on armhf, fails with signal 7
+Author: Ximin Luo <infinity0@debian.org>
+Bug: https://github.com/rust-lang/rust/issues/40444
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/test/run-pass/packed-struct-vec.rs
++++ b/src/test/run-pass/packed-struct-vec.rs
+@@ -8,6 +8,8 @@
+ // option. This file may not be copied, modified, or distributed
+ // except according to those terms.
++// ignore-arm
++
+ use std::mem;
+ #[repr(packed)]
diff --git a/patches/u-ignoretest-i386.patch b/patches/u-ignoretest-i386.patch
new file mode 100644 (file)
index 0000000..6a22b92
--- /dev/null
@@ -0,0 +1,30 @@
+Index: rustc.git/src/test/run-make/no-duplicate-libs/main.rs
+===================================================================
+--- rustc.git.orig/src/test/run-make/no-duplicate-libs/main.rs
++++ rustc.git/src/test/run-make/no-duplicate-libs/main.rs
+@@ -8,6 +8,8 @@
+ // option. This file may not be copied, modified, or distributed
+ // except according to those terms.
++// ignore-test
++
+ #[link(name = "foo")]
+ #[link(name = "bar")]
+ #[link(name = "foo")]
+Index: rustc.git/src/test/run-make/no-duplicate-libs/Makefile
+===================================================================
+--- rustc.git.orig/src/test/run-make/no-duplicate-libs/Makefile
++++ rustc.git/src/test/run-make/no-duplicate-libs/Makefile
+@@ -5,8 +5,8 @@ ifdef IS_MSVC
+ all:
+ else
+ all:
+-      $(RUSTC) foo.rs
+-      $(RUSTC) bar.rs
+-      $(RUSTC) main.rs
+-      $(call RUN,main)
++#     $(RUSTC) foo.rs
++#     $(RUSTC) bar.rs
++#     $(RUSTC) main.rs
++#     $(call RUN,main)
+ endif
diff --git a/patches/u-ignoretest-powerpc.patch b/patches/u-ignoretest-powerpc.patch
new file mode 100644 (file)
index 0000000..32ea651
--- /dev/null
@@ -0,0 +1,76 @@
+Description: Ignore ASM tests on powerpc
+Author: Erwan Prioul <erwan@linux.vnet.ibm.com>
+Applied-Upstream: commit:1572bf104dbf65d58bd6b889fa46229c9b92d6f9
+
+Index: rust/src/test/compile-fail/asm-bad-clobber.rs
+===================================================================
+--- rust.orig/src/test/compile-fail/asm-bad-clobber.rs
++++ rust/src/test/compile-fail/asm-bad-clobber.rs
+@@ -13,6 +13,7 @@
+ // ignore-aarch64
+ // ignore-s390x
+ // ignore-emscripten
++// ignore-powerpc
+ #![feature(asm, rustc_attrs)]
+Index: rust/src/test/compile-fail/asm-in-bad-modifier.rs
+===================================================================
+--- rust.orig/src/test/compile-fail/asm-in-bad-modifier.rs
++++ rust/src/test/compile-fail/asm-in-bad-modifier.rs
+@@ -10,6 +10,7 @@
+ // ignore-s390x
+ // ignore-emscripten
++// ignore-powerpc
+ #![feature(asm)]
+Index: rust/src/test/compile-fail/asm-out-assign-imm.rs
+===================================================================
+--- rust.orig/src/test/compile-fail/asm-out-assign-imm.rs
++++ rust/src/test/compile-fail/asm-out-assign-imm.rs
+@@ -10,6 +10,7 @@
+ // ignore-s390x
+ // ignore-emscripten
++// ignore-powerpc
+ #![feature(asm)]
+Index: rust/src/test/compile-fail/asm-out-no-modifier.rs
+===================================================================
+--- rust.orig/src/test/compile-fail/asm-out-no-modifier.rs
++++ rust/src/test/compile-fail/asm-out-no-modifier.rs
+@@ -10,6 +10,7 @@
+ // ignore-s390x
+ // ignore-emscripten
++// ignore-powerpc
+ #![feature(asm)]
+Index: rust/src/test/compile-fail/asm-out-read-uninit.rs
+===================================================================
+--- rust.orig/src/test/compile-fail/asm-out-read-uninit.rs
++++ rust/src/test/compile-fail/asm-out-read-uninit.rs
+@@ -10,6 +10,7 @@
+ // ignore-s390x
+ // ignore-emscripten
++// ignore-powerpc
+ #![feature(asm)]
+Index: rust/src/test/compile-fail/asm-misplaced-option.rs
+===================================================================
+--- rust.orig/src/test/compile-fail/asm-misplaced-option.rs
++++ rust/src/test/compile-fail/asm-misplaced-option.rs
+@@ -13,6 +13,7 @@
+ // ignore-aarch64
+ // ignore-s390x
+ // ignore-emscripten
++// ignore-powerpc
+ #![feature(asm, rustc_attrs)]
diff --git a/patches/u-reproducible-dl-stage0.patch b/patches/u-reproducible-dl-stage0.patch
new file mode 100644 (file)
index 0000000..e8dc791
--- /dev/null
@@ -0,0 +1,13 @@
+Index: rust/src/bootstrap/bootstrap.py
+===================================================================
+--- rust.orig/src/bootstrap/bootstrap.py
++++ rust/src/bootstrap/bootstrap.py
+@@ -72,7 +72,7 @@ def download(path, url, probably_big, ve
+             option = "-#"
+         else:
+             option = "-s"
+-        run(["curl", option, "--retry", "3", "-Sf", "-o", path, url], verbose=verbose)
++        run(["curl", option, "-R", "--retry", "3", "-Sf", "-o", path, url], verbose=verbose)
+ def verify(path, sha_path, verbose):
diff --git a/rules b/rules
new file mode 100755 (executable)
index 0000000..8a42628
--- /dev/null
+++ b/rules
@@ -0,0 +1,246 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+include /usr/share/dpkg/pkg-info.mk
+include /usr/share/dpkg/architecture.mk
+include /usr/share/dpkg/buildflags.mk
+#RUSTFLAGS = -C link-args="$(LDFLAGS)"
+# temporary workaround for https://github.com/rust-lang/rust/issues/31529
+# this will FAIL if LDFLAGS itself contains shell-interpreted chars beyond
+# unquoted spaces (that addprefix works around the failure of)
+RUSTFLAGS = $(addprefix -C link-args=,$(LDFLAGS))
+export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS RUSTFLAGS
+
+# see https://github.com/rust-lang/rust/issues/37320
+# it should be possible to remove this in the next Debian release
+export MALLOC_CONF = lg_dirty_mult:-1
+
+# Defines DEB_*_RUST_TYPE triples
+include debian/architecture.mk
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# When using sudo pbuilder, this will cause mk/install.mk to run sudo,
+# but we don't need sudo as a build-dep for the package if we unexport
+# the SUDO_USER variable.
+unexport SUDO_USER
+
+# src/rt/miniz.c (incorrectly) triggers -Wmisleading-indentation with
+# gcc-6.  See bug #811573.
+CFLAGS += -Wno-misleading-indentation
+
+# Release type (one of beta, stable or nightly)
+RELEASE_CHANNEL := stable
+# See also ./build-preview-dsc.sh for a script that builds a beta/nightly .dsc
+# out of this packaging. Furthermore, if the build breaks after importing a new
+# upstream stable release, check the do_temporary_fixup function in that file
+# to see if we already know what fix to make.
+
+DEB_DESTDIR := $(CURDIR)/debian/tmp
+
+RUST_VERSION := $(shell dpkg-parsechangelog --show-field Version | sed -re 's/([^.]+)\.([^.]+)\..*/\1.\2/')
+LIBSTD_PKG := libstd-rust-$(RUST_VERSION)
+
+# These are the normal build flags
+DEB_CONFIGURE_FLAGS = \
+               --host=$(DEB_HOST_RUST_TYPE) \
+               --target=$(DEB_TARGET_RUST_TYPE) \
+               --disable-manage-submodules \
+               --disable-rustbuild \
+               --release-channel=$(RELEASE_CHANNEL) \
+               --prefix=/usr
+
+# Use system LLVM (comment out to use vendored LLVM)
+OLD_LLVM_VERSION = 3.8
+DEB_CONFIGURE_FLAGS += --llvm-root=/usr/lib/llvm-3.9
+
+# Below we detect how we're supposed to bootstrap the stage0 compiler. See
+# README.Debian for more details of the cases described below.
+#
+# Sed expression that matches the "rustc" we have in our Build-Depends field
+SED_RUSTC_BUILDDEP := /^Build-Depends:/,/^[^[:space:]\#]/{/\s*rustc.*,/$$action}
+PRECONFIGURE_CHECK = :
+HAVE_BINARY_TARBALL := $(shell ls -1 dl/*$(DEB_HOST_RUST_TYPE)* 2>/dev/null | wc -l)
+# allow not using the binary tarball although it exists
+#ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armhf i386 powerpc ppc64el s390x))
+#  HAVE_BINARY_TARBALL := 0
+#endif
+ifeq (0,$(HAVE_BINARY_TARBALL))
+    # Case A (Building from source): the extracted source tree does not include
+    # a bootstrapping tarball for the current architecture e.g. because the
+    # distro already has a rustc for this arch, or the uploader expects that
+    # this requirement be fulfilled in some other way.
+    #
+    # Case A-1: the builder did not select the "pkg.rustc.dlstage0" build profile.
+    # In this case, we use the distro's rustc - either the previous or current version.
+    ifeq (,$(findstring pkg.rustc.dlstage0,$(DEB_BUILD_PROFILES)))
+        DEB_CONFIGURE_FLAGS += --enable-local-rust --local-rust-root=/usr
+    endif
+    #
+    # Case A-2: the builder selected the "dlstage0" build profile.
+    # In this case, the rust build scripts will download a stage0 into dl/ and use that.
+    # We don't need to do anything specific in this build file, so this case is empty.
+else
+    # Case B (Bootstrapping a new distro): the extracted source tree does
+    # include a bootstrapping tarball for the current architecture; see the
+    # `source_orig-dl` target below on how to build this.
+    #
+    # In this case, we'll bootstrap from the stage0 given in that tarball.
+    # To ensure the uploader of the .dsc didn't make a mistake, we first check
+    # that rustc isn't a Build-Depends for the current architecture.
+    ifneq (,$(shell action=p; sed -ne "$(SED_RUSTC_BUILDDEP)" debian/control))
+    ifeq (,$(shell action=p; sed -ne "$(SED_RUSTC_BUILDDEP)" debian/control | grep '!$(DEB_HOST_ARCH)'))
+        PRECONFIGURE_CHECK = $(error found matches for dl/*$(DEB_HOST_RUST_TYPE)*, \
+          but rustc might be a Build-Depends for $(DEB_HOST_ARCH))
+    endif
+    endif
+endif
+
+BUILD_DOCS = 1
+ifneq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
+  DEB_CONFIGURE_FLAGS += --disable-docs
+  BUILD_DOCS =
+endif
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+  DEB_CONFIGURE_FLAGS += --disable-optimize --disable-optimize-cxx --disable-optimize-llvm
+endif
+
+# Workaround for powerpc64le: no optimization
+# TODO: can remove when https://github.com/rust-lang/rust/issues/39015 is fixed
+ifneq (,$(findstring powerpc64le,$(DEB_TARGET_RUST_TYPE)))
+  DEB_CONFIGURE_FLAGS += --disable-optimize --disable-optimize-cxx --disable-optimize-llvm
+endif
+
+
+%:
+       dh $@ --parallel
+
+# Note: SHELL is not set by dash, but the configure script wants to use it
+override_dh_auto_configure:
+       # fail the build if we have any instances of OLD_LLVM_VERSION in debian, except for debian/changelog
+       ! grep --color=always -i 'll...$(OLD_LLVM_VERSION)' --exclude=changelog -R debian
+       $(PRECONFIGURE_CHECK)
+       SHELL=/bin/sh PATH="$$PWD/debian/bin:$$PATH" DEB_HOST_ARCH="$(DEB_HOST_ARCH)" \
+           ./configure $(DEB_CONFIGURE_FLAGS)
+
+override_dh_auto_clean:
+       set -e; \
+       if [ -f Makefile ]; then \
+         $(MAKE) clean-all; \
+         $(RM) Makefile config.stamp config.mk; \
+       fi
+       $(RM) src/rt/hoedown/src/html_blocks.c # clean up after building this ourselves
+       $(RM) src/bootstrap/bootstrap.pyc
+
+# upstream bundles this in the source, but in Debian we rebuild everything yo
+generate-sources:
+       $(MAKE) -C src/rt/hoedown src/html_blocks.c
+
+override_dh_auto_build-arch: generate-sources
+       dh_auto_build -- all VERBOSE=1
+
+# note: this is only for buildds that want to do a separate arch:all build;
+# there is no point running this yourself "to save time" since it implicitly
+# depends on build-arch anyways.
+override_dh_auto_build-indep: generate-sources
+ifneq (,$(BUILD_DOCS))
+       dh_auto_build -- docs VERBOSE=1
+endif
+
+override_dh_auto_install:
+       dh_auto_install --destdir=$(DEB_DESTDIR)
+
+       mkdir -p $(DEB_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/
+       mv $(DEB_DESTDIR)/usr/lib/lib*.so $(DEB_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/
+
+       # Replace duplicated compile-time/run-time dylibs with symlinks
+       @set -e; \
+       for f in $(DEB_DESTDIR)/usr/lib/rustlib/$(DEB_HOST_RUST_TYPE)/lib/lib*.so; do \
+         name=$${f##*/}; \
+         if [ -f "$(DEB_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/$$name" ]; then \
+           echo "ln -sf ../../../$(DEB_HOST_MULTIARCH)/$$name $$f"; \
+           ln -sf ../../../$(DEB_HOST_MULTIARCH)/$$name $$f; \
+         fi; \
+       done
+
+ifneq (,$(BUILD_DOCS))
+       # Brute force to remove privacy-breach-logo lintian warning.
+       # We could have updated the upstream sources but it would complexify
+       # the rebase
+       @set -e; \
+       find $(DEB_DESTDIR)/usr/share/doc/rust/html -iname '*.html' | \
+       while read file; do \
+         topdir=$$(echo "$$file" | sed 's,^$(DEB_DESTDIR)/usr/share/doc/rust/html/,,; s,/[^/]*$$,/,; s,^[^/]*$$,,; s,[^/]\+/,../,g'); \
+         sed -i -e "s,https://doc.rust-lang.org/\(favicon.ico\|logos/rust-logo-32x32-blk.png\),$${topdir}rust-logo-32x32-blk.png," \
+              -e "s,https://www.rust-lang.org/\(favicon.ico\|logos/rust-logo-32x32-blk.png\),$${topdir}rust-logo-32x32-blk.png," "$$file"; \
+       done
+       find $(DEB_DESTDIR) \( -iname '*.html' -empty -o -name .lock -o -name '*.inc' \) -delete
+endif
+
+override_dh_install-arch:
+       dh_install
+       dh_install -p$(LIBSTD_PKG) usr/lib/$(DEB_HOST_MULTIARCH)/
+
+override_dh_install-indep:
+       dh_install
+       chmod -x \
+         debian/rust-gdb/usr/share/rust-gdb/*.py \
+         debian/rust-lldb/usr/share/rust-lldb/*.py
+
+override_dh_installchangelogs:
+       dh_installchangelogs RELEASES.md
+
+override_dh_installdocs:
+       dh_installdocs -X.tex -X.aux -X.log -X.out -X.toc
+
+override_dh_compress:
+       dh_compress -X.woff
+
+override_dh_auto_test-arch:
+ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS)))
+# Use non-parallel $(MAKE) here instead of dh_auto_test, otherwise the upstream
+# Makefile will try to run N instances of the testrunner each of which will run
+# N instances of rustc (there is also parallel logic in libtest.rs already).
+       if RUST_BACKTRACE=1 $(MAKE) VERBOSE=1 check; then \
+         : ; \
+       elif [ $(DEB_DISTRIBUTION) = "unstable" ]; then \
+         false; \
+       else \
+         echo "====================================================="; \
+         echo "WARNING: Ignoring test failures in the rust testsuite"; \
+         echo "====================================================="; \
+       fi
+endif
+
+# No tests are applicable when only building arch:all packages.
+# More specifically: when we do an arch-all build, some crates are not built.
+# This makes some arch-dependent tests fail, so don't run them here.
+override_dh_auto_test-indep:
+       true
+
+override_dh_makeshlibs:
+       dh_makeshlibs -V
+
+       # dh_makeshlibs doesn't support our "libfoo-version.so" naming
+       # structure, so we have to do this ourselves.
+       install -o 0 -g 0 -d debian/$(LIBSTD_PKG)/DEBIAN
+       LC_ALL=C ls debian/$(LIBSTD_PKG)/usr/lib/$(DEB_HOST_MULTIARCH)/lib*.so | \
+       sed -n 's,^.*/\(lib.*\)-\(.\+\)\.so$$,\1 \2,p' | \
+       while read name version; do \
+         echo "$$name $$version $(LIBSTD_PKG) (>= $(DEB_VERSION_UPSTREAM))"; \
+       done > debian/$(LIBSTD_PKG)/DEBIAN/shlibs
+       chmod 644 debian/$(LIBSTD_PKG)/DEBIAN/shlibs
+       chown 0:0 debian/$(LIBSTD_PKG)/DEBIAN/shlibs
+
+override_dh_shlibdeps:
+       dh_shlibdeps -- -x$(LIBSTD_PKG)
+
+QUILT_SPECIAL_SNOWFLAKE_RETURN_CODE = x=$$?; if [ $$x = 2 ]; then exit 0; else exit $$x; fi
+source_orig-dl:
+       QUILT_PATCHES=debian/patches quilt push -aq; $(QUILT_SPECIAL_SNOWFLAKE_RETURN_CODE)
+       $(MAKE) -f debian/rules clean
+       debian/make_orig-dl_tarball.sh
+       QUILT_PATCHES=debian/patches quilt pop -aq; $(QUILT_SPECIAL_SNOWFLAKE_RETURN_CODE)
+       rm -rf .pc
diff --git a/rust-doc.doc-base.book b/rust-doc.doc-base.book
new file mode 100644 (file)
index 0000000..08ddd4d
--- /dev/null
@@ -0,0 +1,12 @@
+Document: rust-book
+Title: The Rust Programming Language
+Section: Programming/Rust
+Abstract:
+ This book will teach you about the Rust Programming Language. Rust is
+ a modern systems programming language focusing on safety and speed. It
+ accomplishes these goals by being memory safe without using garbage
+ collection.
+
+Format: HTML
+Index: /usr/share/doc/rust-doc/html/book/index.html
+Files: /usr/share/doc/rust-doc/html/book/*.html
diff --git a/rust-doc.doc-base.intro b/rust-doc.doc-base.intro
new file mode 100644 (file)
index 0000000..270cce7
--- /dev/null
@@ -0,0 +1,10 @@
+Document: rust-intro
+Title: The Rust Guide
+Section: Programming/Rust
+Abstract:
+ This introduction will give you a rough idea of what Rust is like,
+ eliding many details.
+
+Format: HTML
+Index: /usr/share/doc/rust-doc/html/intro.html
+Files: /usr/share/doc/rust-doc/html/intro.html
diff --git a/rust-doc.doc-base.reference b/rust-doc.doc-base.reference
new file mode 100644 (file)
index 0000000..e1909c8
--- /dev/null
@@ -0,0 +1,10 @@
+Document: rust-reference
+Title: The Rust Reference
+Section: Programming/Rust
+Abstract:
+ This document is the primary reference for the Rust programming
+ language.
+
+Format: HTML
+Index: /usr/share/doc/rust-doc/html/reference.html
+Files: /usr/share/doc/rust-doc/html/reference.html
diff --git a/rust-doc.docs b/rust-doc.docs
new file mode 100644 (file)
index 0000000..5a0e189
--- /dev/null
@@ -0,0 +1 @@
+debian/tmp/usr/share/doc/rust/html
diff --git a/rust-doc.install b/rust-doc.install
new file mode 100644 (file)
index 0000000..de6024b
--- /dev/null
@@ -0,0 +1 @@
+debian/icons/rust-logo-32x32-blk.png usr/share/doc/rust-doc/html/
diff --git a/rust-doc.links b/rust-doc.links
new file mode 100644 (file)
index 0000000..987a672
--- /dev/null
@@ -0,0 +1,5 @@
+# This should eventually become part of a dh_rustdoc program.
+# Something that does e.g.
+# find $(DESTDIR) -name jquery.js -execdir ln -sf -T \
+#        /usr/share/doc/rust-doc/html/jquery.js '{}' \;
+usr/share/javascript/jquery/jquery.js usr/share/doc/rust-doc/html/jquery.js
diff --git a/rust-gdb.install b/rust-gdb.install
new file mode 100644 (file)
index 0000000..d274b0b
--- /dev/null
@@ -0,0 +1,3 @@
+src/etc/rust-gdb usr/bin/
+src/etc/gdb_*.py usr/share/rust-gdb/
+src/etc/debugger_pretty_printers_common.py usr/share/rust-gdb/
diff --git a/rust-gdb.links b/rust-gdb.links
new file mode 100644 (file)
index 0000000..51b82a4
--- /dev/null
@@ -0,0 +1 @@
+usr/share/man/man1/gdb.1.gz usr/share/man/man1/rust-gdb.1.gz
diff --git a/rust-lldb.install b/rust-lldb.install
new file mode 100644 (file)
index 0000000..a48bbb6
--- /dev/null
@@ -0,0 +1,3 @@
+src/etc/rust-lldb usr/bin/
+src/etc/lldb_rust_formatters.py usr/share/rust-lldb/
+src/etc/debugger_pretty_printers_common.py usr/share/rust-lldb/
diff --git a/rust-lldb.links b/rust-lldb.links
new file mode 100644 (file)
index 0000000..dbed47e
--- /dev/null
@@ -0,0 +1 @@
+usr/share/man/man1/lldb-3.9.1.gz usr/share/man/man1/rust-lldb.1.gz
diff --git a/rustc.install b/rustc.install
new file mode 100644 (file)
index 0000000..c289154
--- /dev/null
@@ -0,0 +1,3 @@
+usr/bin/rustc
+usr/bin/rustdoc
+debian/architecture.mk usr/share/rustc/
diff --git a/rustc.lintian-overrides b/rustc.lintian-overrides
new file mode 100644 (file)
index 0000000..da1e14e
--- /dev/null
@@ -0,0 +1,3 @@
+# We need it for now
+binary-or-shlib-defines-rpath usr/bin/rustc /usr/lib/rustlib/*/lib
+binary-or-shlib-defines-rpath usr/bin/rustdoc /usr/lib/rustlib/*/lib
diff --git a/rustc.manpages b/rustc.manpages
new file mode 100644 (file)
index 0000000..f153792
--- /dev/null
@@ -0,0 +1,3 @@
+debian/tmp/usr/share/man/man1/rustc.1
+debian/tmp/usr/share/man/man1/rustdoc.1
+
diff --git a/source/format b/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/source/include-binaries b/source/include-binaries
new file mode 100644 (file)
index 0000000..aea4c21
--- /dev/null
@@ -0,0 +1,6 @@
+debian/icons/rust-logo-32x32-blk.png
+# if you are here because dpkg-source told you to "add dl/rustc-** in d/source/include-binaries",
+# ignore that instruction and instead:
+# a) if you want to use the orig-dl for your next upload, then extract it into dl/
+# b) if you don't want to use it, then rename "../rustc_${version}.orig-dl.tar.xz" to something else
+# see also d/source/options and d/source/local-options and #577113.
diff --git a/source/options b/source/options
new file mode 100644 (file)
index 0000000..2c56439
--- /dev/null
@@ -0,0 +1,4 @@
+# this helps to prevent accidentally including the orig-dl tarball in a non
+# orig-dl upload, after running `debian/rules source_orig-dl`.
+# we can get rid of this after #577113 is fixed
+include-removal
diff --git a/update-version.sh b/update-version.sh
new file mode 100644 (file)
index 0000000..73e8251
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash
+prev_stable() {
+local V=$1
+python -c 'import sys; k=map(int,sys.argv[1].split(".")); k[1]-=1; print ".".join(map(str,k))' "$V"
+}
+
+update() {
+local ORIG=$1 NEW=$2
+
+ORIG_M1=$(prev_stable $ORIG)
+NEW_M1=$(prev_stable $NEW)
+ORIG_R="${ORIG/./\\.}" # match a literal dot, otherwise this might sometimes match e.g. debhelper (>= 9.20141010)
+
+sed -i -e "s|libstd-rust-${ORIG_R}|libstd-rust-$NEW|g" \
+       -e "s|rustc (<= ${ORIG_R}|rustc (<= $NEW|g" \
+       -e "s|rustc (>= ${ORIG_M1/./\\.}|rustc (>= ${NEW_M1}|g" control
+
+git mv libstd-rust-$ORIG.lintian-overrides libstd-rust-$NEW.lintian-overrides
+sed -i -e "s|libstd-rust-${ORIG_R}|libstd-rust-$NEW|g" libstd-rust-$NEW.lintian-overrides
+}
+
+update 1.15 1.16
diff --git a/upstream/signing-key.asc b/upstream/signing-key.asc
new file mode 100644 (file)
index 0000000..93e2282
--- /dev/null
@@ -0,0 +1,86 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1
+
+mQINBFJEwMkBEADlPACa2K7reD4x5zd8afKx75QYKmxqZwywRbgeICeD4bKiQoJZ
+dUjmn1LgrGaXuBMKXJQhyA34e/1YZel/8et+HPE5XpljBfNYXWbVocE1UMUTnFU9
+CKXa4AhJ33f7we2/QmNRMUifw5adPwGMg4D8cDKXk02NdnqQlmFByv0vSaArR5kn
+gZKnLY6o0zZ9Buyy761Im/ShXqv4ATUgYiFc48z33G4j+BDmn0ryGr1aFdP58tHp
+gjWtLZs0iWeFNRDYDje6ODyu/MjOyuAWb2pYDH47Xu7XedMZzenH2TLM9yt/hyOV
+xReDPhvoGkaO8xqHioJMoPQi1gBjuBeewmFyTSPS4deASukhCFOcTsw/enzJagiS
+ZAq6Imehduke+peAL1z4PuRmzDPO2LPhVS7CDXtuKAYqUV2YakTq8MZUempVhw5n
+LqVaJ5/XiyOcv405PnkT25eIVVVghxAgyz6bOU/UMjGQYlkUxI7YZ9tdreLlFyPR
+OUL30E8q/aCd4PGJV24yJ1uit+yS8xjyUiMKm4J7oMP2XdBN98TUfLGw7SKeAxyU
+92BHlxg7yyPfI4TglsCzoSgEIV6xoGOVRRCYlGzSjUfz0bCMCclhTQRBkegKcjB3
+sMTyG3SPZbjTlCqrFHy13e6hGl37Nhs8/MvXUysq2cluEISn5bivTKEeeQARAQAB
+tERSdXN0IExhbmd1YWdlIChUYWcgYW5kIFJlbGVhc2UgU2lnbmluZyBLZXkpIDxy
+dXN0LWtleUBydXN0LWxhbmcub3JnPokCOAQTAQIAIgUCUkTAyQIbAwYLCQgHAwIG
+FQgCCQoLBBYCAwECHgECF4AACgkQhauW5vob5f5fYQ//b1DWK1NSGx5nZ3zYZeHJ
+9mwGCftIaA2IRghAGrNf4Y8DaPqR+w1OdIegWn8kCoGfPfGAVW5XXJg+Oxk6QIaD
+2hJojBUrq1DALeCZVewzTVw6BN4DGuUexsc53a8DcY2Yk5WE3ll6UKq/YPiWiPNX
+9r8FE2MJwMABB6mWZLqJeg4RCrriBiCG26NZxGE7RTtPHyppoVxWKAFDiWyNdJ+3
+UnjldWrT9xFqjqfXWw9Bhz8/EoaGeSSbMIAQDkQQpp1SWpljpgqvctZlc5fHhsG6
+lmzW5RM4NG8OKvq3UrBihvgzwrIfoEDKpXbk3DXqaSs1o81NH5ftVWWbJp/ywM9Q
+uMC6n0YWiMZMQ1cFBy7tukpMkd+VPbPkiSwBhPkfZIzUAWd74nanN5SKBtcnymgJ
++OJcxfZLiUkXRj0aUT1GLA9/7wnikhJI+RvwRfHBgrssXBKNPOfXGWajtIAmZc2t
+kR1E8zjBVLId7r5M8g52HKk+J+y5fVgJY91nxG0zf782JjtYuz9+knQd55JLFJCO
+hhbv3uRvhvkqgauHagR5X9vCMtcvqDseK7LXrRaOdOUDrK/Zg/abi5d+NIyZfEt/
+ObFsv3idAIe/zpU6xa1nYNe3+Ixlb6mlZm3WCWGxWe+GvNW/kq36jZ/v/8pYMyVO
+p/kJqnf9y4dbufuYBg+RLqC5Ag0EUkTAyQEQANxy2tTSeRspfrpBk9+ju+KZ3zc4
+umaIsEa5DxJ2zIKHywVAR67Um0K1YRG07/F5+tD9TIRkdx2pcmpjmSQzqdk3zqa9
+2Zzeijjz2RNyBY8qYmyE08IncjTsFFB8OnvdXcsAgjCFmI1BKnePxrABL/2k8X18
+aysPb0beWqQVsi5FsSpAHu6k1kaLKc+130x6Hf/YJAjeo+S7HeU5NeOz3zD+h5bA
+Q25qMiVHX3FwH7rFKZtFFog9Ogjzi0TkDKKxoeFKyADfIdteJWFjOlCI9KoIhfXq
+Et9JMnxApGqsJElJtfQjIdhMN4Lnep2WkudHAfwJ/412fe7wiW0rcBMvr/BlBGRY
+vM4sTgN058EwIuY9Qmc8RK4gbBf6GsfGNJjWozJ5XmXElmkQCAvbQFoAfi5TGfVb
+77QQrhrQlSpfIYrvfpvjYoqj618SbU6uBhzh758gLllmMB8LOhxWtq9eyn1rMWyR
+KL1fEkfvvMc78zP+Px6yDMa6UIez8jZXQ87Zou9EriLbzF4QfIYAqR9LUSMnLk6K
+o61tSFmFEDobC3tc1jkSg4zZe/wxskn96KOlmnxgMGO0vJ7ASrynoxEnQE8k3WwA
++/YJDwboIR7zDwTy3Jw3mn1FgnH+c7Rb9h9geOzxKYINBFz5Hd0MKx7kZ1U6WobW
+KiYYxcCmoEeguSPHABEBAAGJAh8EGAECAAkFAlJEwMkCGwwACgkQhauW5vob5f7f
+FA//Ra+itJF4NsEyyhx4xYDOPq4uj0VWVjLdabDvFjQtbBLwIyh2bm8uO3AY4r/r
+rM5WWQ8oIXQ2vvXpAQO9g8iNlFez6OLzbfdSG80AG74pQqVVVyCQxD7FanB/KGge
+tAoOstFxaCAg4nxFlarMctFqOOXCFkylWl504JVIOvgbbbyj6I7qCUmbmqazBSMU
+K8c/Nz+FNu2Uf/lYWOeGogRSBgS0CVBcbmPUpnDHLxZWNXDWQOCxbhA1Uf58hcyu
+036kkiWHh2OGgJqlo2WIraPXx1cGw1Ey+U6exbtrZfE5kM9pZzRG7ZY83CXpYWMp
+kyVXNWmf9JcIWWBrXvJmMi0FDvtgg3Pt1tnoxqdilk6yhieFc8LqBn6CZgFUBk0t
+NSaWk3PsN0N6Ut8VXY6sai7MJ0Gih1gE1xadWj2zfZ9sLGyt2jZ6wK++U881YeXA
+ryaGKJ8sIs182hwQb4qN7eiUHzLtIh8oVBHo8Q4BJSat88E5/gOD6IQIpxc42iRL
+T+oNZw1hdwNyPOT1GMkkn86l3o7klwmQUWCPm6vl1aHp3omo+GHC63PpNFO5RncJ
+Ilo3aBKKmoE5lDSMGE8KFso5awTo9z9QnVPkRsk6qeBYit9xE3x3S+iwjcSg0nie
+aAkc0N00nc9V9jfPvt4z/5A5vjHh+NhFwH5h2vBJVPdsz6m5Ag0EVI9keAEQAL3R
+oVsHncJTmjHfBOV4JJsvCum4DuJDZ/rDdxauGcjMUWZaG338ZehnDqG1Yn/ys7zE
+aKYUmqyT+XP+M2IAQRTyxwlU1RsDlemQfWrESfZQCCmbnFScL0E7cBzy4xvtInQe
+UaFgJZ1BmxbzQrx+eBBdOTDv7RLnNVygRmMzmkDhxO1IGEu1+3ETIg/DxFE7VQY0
+It/Ywz+nHu1o4Hemc/GdKxu9hcYvcRVc/Xhueq/zcIM96l0m+CFbs0HMKCj8dgMe
+Ng6pbbDjNM+cV+5BgpRdIpE2l9W7ImpbLihqcZt47J6oWt/RDRVoKOzRxjhULVyV
+2VP9ESr48HnbvxcpvUAEDCQUhsGpur4EKHFJ9AmQ4zf91gWLrDc6QmlACn9o9ARU
+fOV5aFsZI9ni1MJEInJTP37stz/uDECRie4LTL4O6P4Dkto8ROM2wzZq5CiRNfnT
+PP7ARfxlCkpg+gpLYRlxGUvRn6EeYwDtiMQJUQPfpGHSvThUlgDEsDrpp4SQSmdA
+CB+rvaRqCawWKoXs0In/9wylGorRUupeqGC0I0/rh+f5mayFvORzwy/4KK4QIEV9
+aYTXTvSRl35MevfXU1Cumlaqle6SDkLr3ZnFQgJBqap0Y+Nmmz2HfO/pohsbtHPX
+92SN3dKqaoSBvzNGY5WT3CsqxDtik37kR3f9/DHpABEBAAGJBD4EGAECAAkFAlSP
+ZHgCGwICKQkQhauW5vob5f7BXSAEGQECAAYFAlSPZHgACgkQXLSpNHs7CdwemA/+
+KFoGuFqU0uKT9qblN4ugRyil5itmTRVffl4tm5OoWkW8uDnu7Ue3vzdzy+9NV8X2
+wRG835qjXijWP++AGuxgW6LB9nV5OWiKMCHOWnUjJQ6pNQMAgSN69QzkFXVF/q5f
+bkma9TgSbwjrVMyPzLSRwq7HsT3V02Qfr4cyq39QeILGy/NHW5z6LZnBy3BaVSd0
+lGjCEc3yfH5OaB79na4W86WCV5n4IT7cojFM+LdL6P46RgmEtWSG3/CDjnJl6BLR
+WqatRNBWLIMKMpn+YvOOL9TwuP1xbqWr1vZ66wksm53NIDcWhptpp0KEuzbU0/Dt
+OltBhcX8tOmO36LrSadX9rwckSETCVYklmpAHNxPml011YNDThtBidvsicw1vZwR
+HsXn+txlL6RAIRN+J/Rw3uOiJAqN9Qgedpx2q+E15t8MiTg/FXtB9SysnskFT/BH
+z0USNKJUY0btZBw3eXWzUnZf59D8VW1M/9JwznCHAx0c9wy/gRDiwt9w4RoXryJD
+VAwZg8rwByjldoiThUJhkCYvJ0R3xH3kPnPlGXDW49E9R8C2umRC3cYOL4U9dOQ1
+5hSlYydF5urFGCLIvodtE9q80uhpyt8L/5jj9tbwZWv6JLnfBquZSnCGqFZRfXlb
+Jphk9+CBQWwiZSRLZRzqQ4ffl4xyLuolx01PMaatkQbRaw/+JpgRNlurKQ0PsTrO
+8tztO/tpBBj/huc2DGkSwEWvkfWElS5RLDKdoMVs/j5CLYUJzZVikUJRm7m7b+OA
+P3W1nbDhuID+XV1CSBmGifQwpoPTys21stTIGLgznJrIfE5moFviOLqD/LrcYlsq
+CQg0yleu7SjOs//8dM3mC2FyLaE/dCZ8l2DCLhHw0+ynyRAvSK6aGCmZz6jMjmYF
+MXgiy7zESksMnVFMulIJJhR3eB0wx2GitibjY/ZhQ7tD3i0yy9ILR07dFz4pgkVM
+afxpVR7fmrMZ0t+yENd+9qzyAZs0ksxORoc2ze90SCx2jwEX/3K+m4I0hP2H/w5W
+gqdvuRLiqf+4BGW4zqWkLLlNIe/okt0r82SwHtDN0Ui1asmZTGj6sm8SXtwx+5cE
+38MttWqjDiibQOSthRVcETByRYM8KcjYSUCi4PoBc3NpDONkFbZm6XofR/f5mTcl
+2jDw6fIeVc4Hd1jBGajNzEqtneqqbdAkPQaLsuD2TMkQfTDJfE/IljwjrhDa9Mi+
+odtnMWq8vlwOZZ24/8/BNK5qXuCYL67O7AJB4ZQ6BT+g4z96iRLbupzu/XJyXkQF
+rOY/Ghegvn7fDrnt2KC9MpgeFBXzUp+k5rzUdF8jbCx5apVjA1sWXB9Kh3L+DUwF
+Mve696B5tlHyc1KxjHR6w9GRsh4=
+=5FXw
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/watch b/watch
new file mode 100644 (file)
index 0000000..484170d
--- /dev/null
+++ b/watch
@@ -0,0 +1,12 @@
+version=4
+
+opts="\
+pgpsigurlmangle=s/$/.asc/,\
+uversionmangle=s/(\d)[_.+-]?((beta|alpha)\.?\d*)$/$1~$2/,\
+dversionmangle=s/\+dfsg\d*$//,\
+repack,\
+repacksuffix=+dfsg1,\
+compression=xz,\
+" \
+ https://www.rust-lang.org/en-US/other-installers.html \
+ (?:.*/)rustc?-(\d[\d.]*(?:-[\w.]+)?)-src\.tar\.gz