diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:03:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:03:05 +0000 |
commit | 217d9223a5aa75daf9f286fd1fc06dae379b5dbc (patch) | |
tree | b43bedae234ad56894a82934ee57e3619f3374d5 /debian | |
parent | Adding upstream version 1.64.0+dfsg1. (diff) | |
download | rustc-217d9223a5aa75daf9f286fd1fc06dae379b5dbc.tar.xz rustc-217d9223a5aa75daf9f286fd1fc06dae379b5dbc.zip |
Adding debian version 1.64.0+dfsg1-1.debian/1.64.0+dfsg1-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian')
108 files changed, 10689 insertions, 0 deletions
diff --git a/debian/NEWS b/debian/NEWS new file mode 100644 index 000000000..067259d3d --- /dev/null +++ b/debian/NEWS @@ -0,0 +1,29 @@ +rustc (1.20.0+dfsg1-2) unstable; urgency=medium + + Starting from version 1.20.0+dfsg1-1 (i.e. the previous version) the Debian + packages of rustc no longer fail their build if any tests fail. In other + words, some tests might have failed when building this and future versions of + the package. This is due to lack of maintainer time to investigate failures. + + Many previous test failures were reported to upstream and did not receive a + timely response, suggesting the failures were not important. I was then + forced to patch out the test to make the build proceed, so several tests were + being ignored in practise anyway. + + This brings the Debian package in line with the Fedora package which also + ignores all test failures. (Many other distributions don't run tests at all.) + + If you think that the Debian rustc package is miscompiling your program in a + way that the upstream distributed compiler doesn't, you may check the test + failures here: + + https://buildd.debian.org/status/package.php?p=rustc + + If you can identify a relevant test failure as well as the patches needed to + fix it (either to rustc or LLVM), this will speed up the processing of any + bug reports on the Debian side. + + We will also examine these failures ourselves on a best-effort basis and + attempt to fix the more serious-looking ones. + + -- Ximin Luo <infinity0@debian.org> Mon, 16 Oct 2017 18:02:23 +0200 diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 000000000..960cfa574 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,345 @@ +Architecture-specific notes +=========================== + +This section talks about the rustc compiler on your host architecture. For +cross-compiling to a foreign target architecture, see the next section. + +armhf armel mips mipsel powerpc powerpcspe +------------------------------------------ + +We only ship debuginfo for libstd and not the compiler itself, otherwise builds +run out of memory on the Debian buildds, with non-obvious and random errors. + +See https://github.com/rust-lang/rust/issues/45854 for details. + +If all your armhf build machines have ~8GB memory or more, you can experiment +with disabling this work-around (i.e. revert to normal) in d/rules. + + +Cross-compiling +=============== + +Rust supports cross-compiling to many different architectures, and we expose +this feature as fully as feasible in Debian, including to wasm and windows. + +Introduction and terminology +---------------------------- + +Rust uses LLVM, so cross-compiling works a bit differently from the GNU +toolchain. The most important difference is that there are no "cross" +compilers, every compiler is already a cross compiler. For cross-compiling, all +you need to do (on the rustc / LLVM side) is to install the standard libraries +for each target architecture you want to compile to, i.e. libstd-rust-dev. + +Before we go further, we must clarify some terminology. The rust ecosystem +generally uses the term "host" for the native architecture running the +compiler, equivalent to DEB_BUILD_RUST_TYPE or "build" in GNU terminology, and +"target" for the foreign architecture that the build products run on, +equivalent to DEB_HOST_RUST_TYPE or "host" in GNU terminology. For example, +rustc --version --verbose will output something like: + + rustc 1.16.0 + [..] + host: x86_64-unknown-linux-gnu + +And both rustc and cargo have --target flags: + + $ rustc --help | grep '\-\-target' + --target TARGET Target triple for which the code is compiled + $ cargo build --help | grep '\-\-target' + --target TRIPLE Build for the target triple + +One major exception to this naming scheme is in CERTAIN PARTS OF the build +scripts of cargo and rustc themselves, such as the `./configure` scripts and +SOME PARTS of the `config.toml` files. Here, "build", "host" and "target" mean +the same things they do in GNU toolchain terminology. However, IN OTHER PARTS +OF the build scripts of cargo and rustc, as well as cargo and rustc's own +output and logging messages, the term "host" and "target" mean as they do in +the previous paragraph. Yes, it's a total mind fuck. :( Table for clarity: + +======================================= =============== ======================== + Rust ecosystem, Some parts of the rustc +GNU term / Debian envvar rustc and cargo and cargo build scripts +======================================= =============== ======================== +build DEB_BUILD_{ARCH,RUST_TYPE} host build + the machine running the build +--------------------------------------- --------------- ------------------------ +host DEB_HOST_{ARCH,RUST_TYPE} target host(s) + the machine the build products run on +--------------------------------------- --------------- ------------------------ +only relevant when building a compiler +target DEB_TARGET_{ARCH,RUST_TYPE} N/A target(s) + the one architecture that the built extra architectures + cross-compiler itself builds for to build "std" for +--------------------------------------- --------------- ------------------------ + +General case for other Debian platforms +--------------------------------------- + +To manually use the Debian rustc binary for cross-compiling: + +0. If you haven't done so previously, run: + + dpkg --add-architecture ${DEB_TARGET_ARCH} + apt-get update + + (This is something that you need to do for all Debian crossbuilding or + multi-architecture installing.) + +1. Install crossbuild-essential-${DEB_TARGET_ARCH} e.g. arm64. + + (This is something that you need to do for all Debian crossbuilding.) + + For certain (HOST, TARGET) pairs you can instead install gcc-multilib, e.g. + when compiling from amd64 to i386. + +2. Install libstd-rust-dev:${DEB_TARGET_ARCH}. + +3. Add the following flags to your rustc invocation: + + -C linker=${DEB_TARGET_GNU_TYPE}-gcc # e.g. aarch64-linux-gnu + --target ${DEB_TARGET_RUST_TYPE} # e.g. aarch64-unknown-linux-gnu + + For certain (HOST, TARGET) pairs, namely the same ones as above that are + supported by gcc-multilib, you can omit the linker flag since the default + ``gcc`` linker (with multilib support) will work. + +You can find the right TARGET vars to use in dpkg-architecture(1) and/or +/usr/share/rustc/architecture.mk and/or possibly on the Debian wiki. + +These steps are different when cross-building a Debian package, or preparing +one for cross-compiling. (1) is performed automatically by cross-building tools +such as sbuild, and (3) is performed automatically by our cargo wrapper script. +The details of how to do (2) correctly are explained in the section below +called "Using rustc in a Debian package". + +Foreign non-Debian platforms +---------------------------- + +Targetting a non-Debian platform is not a common Debian crossbuilding pattern, +so we do something ad-hoc for our Debian rust packages. + +Instead of libstd-rust-dev:$arch (for an $arch that is not in Debian), we +provide a libstd-rust-dev-$platform:$arch package. For example, +libstd-rust-dev-windows:i386. For VM platforms such as WASM, $arch is omitted. + +Instead of implicitly relying on crossbuild-essential-$arch (for an $arch that +is not in Debian), we have the libstd-rust-dev-$platform:$arch package +Recommend the appropriate linker. For example, Clang or MinGW. + +To use these for manual crossbuilding: + +1. Install the appropriate library package, as well as the corresponding linker + package from its Recommends if it isn't pulled in automatically. + +2. Pass in the appropriate ``-C linker`` and ``--target`` flags to ``rustc``. + +WASM +~~~~ + +We ship two different wasm32 targets - wasm32-unknown-unknown and wasm32-wasi - +in the libstd-rust-dev-wasm32 package. + +wasm32-unknown-unknown is suitable for web stuff, where you typically will need +to depending on the rust-wasm-bindgen, js-sys, and web-sys crates. Here, calls +to libstd stuff (such as println!()) will silently do nothing, as defined in +``library/std/src/sys/wasm/mod.rs`` and explained in upstream #48564. + +wasm32-wasi is suitable for non-web stuff, and is closer to a "normal" target +where you expect libstd to be available, and for println!() to actually print +to stdout. If you just want to cross-compile a regular non-wasm library or +program to wasm for whatever reason, and only want to run it natively and not +inside a web browser, use this target. + +To run the generated wasm, you can either: + +1. Use /usr/share/rustc/bin/wasi-node, which depends on nodejs. + + Pending #986616, this will be added to the nodejs package directly. + +2. Compile and use one of the following runtimes: + + - https://github.com/bytecodealliance/wasmtime + - https://github.com/bytecodealliance/lucet + - https://github.com/wasmerio/wasmer + +Windows +~~~~~~~ + +We ship the following targets: + +- x86_64-pc-windows-gnu in the libstd-rust-dev-windows:amd64 package +- i686-pc-windows-gnu in the libstd-rust-dev-windows:i386 package + +To run the compiled binaries, you can use wine. You will need to set one of: + +- WINEPATH="/usr/lib/gcc/x86_64-w64-mingw32/10-posix;/usr/lib/rustlib/x86_64-pc-windows-gnu/lib" +- WINEPATH="/usr/lib/gcc/i686-w64-mingw32/10-posix;/usr/lib/rustlib/i686-pc-windows-gnu/lib" + +If you get "import_dll ... not found" errors, check that these paths are mapped +to some windows drive path - run "winecfg $path" for each path in the component +of WINEPATH; if any begin with "\\?\unix\" then you'll need to map them to a +drive in "winecfg" -> Drives. If all begin with some windows drive letter, then +your error is something unrelated and we sadly can't help you here. + + +Using rustc in a Debian package +=============================== + +You are encouraged to support cross-compiling. See the above section for more +details; in summary you need to install rustc for the host architecture and +libstd-rust-dev for the target architecture, so your debian/control would look +something like this: + + Build-Depends: + [..] + rustc:native (>= $version), + libstd-rust-dev (>= $version), + [..] + +You need both, this is important. When Debian build toolchains satisfy the +build-depends of a cross-build, (1) a "rustc:native" Build-Depends selects +rustc for the native architecture, which is possible because it's "Multi-Arch: +allowed", and this will implicitly pull in libstd-rust-dev also for the native +architecture; and (2) a "libstd-rust-dev" Build-Depends implies libstd-rust-dev +for the foreign architecture, since it's "Multi-Arch: same". + +You'll probably also want to add + + include /usr/share/rustc/architecture.mk + +to your debian/rules. This sets some useful variables like DEB_HOST_RUST_TYPE. +See the cargo package for an example. + +If your build uses cargo, you'll want to add: + + Build-Depends: + [..] + cargo:native, + [..] + +and use our cargo wrapper script instead of /usr/bin/cargo directly. See +/usr/share/cargo/bin/cargo for details on how to use it. + + +Porting to new architectures (on the same distro) +================================================= + +As mentioned above, to cross-compile rust packages you need to install the rust +standard library for each relevant foreign architecture. However, this is not +needed when cross-compiling rustc itself; its build system will build any +relevant foreign-architecture standard libraries automatically. + +Cross-build, in a schroot using sbuild +-------------------------------------- + +0. Set up an schroot for your native architecture, for sbuild: + + sudo apt-get install sbuild + sudo sbuild-adduser $LOGNAME + newgrp sbuild # or log out and log back in + sudo sbuild-createchroot --include=eatmydata,ccache,gnupg unstable \ + /srv/chroot/unstable-$(dpkg-architecture -qDEB_BUILD_ARCH)-sbuild \ + http://deb.debian.org/debian + + See https://wiki.debian.org/sbuild for more details. + +1. Build it: + + sudo apt-get source --download-only rustc + sbuild --host=$new_arch rustc_*.dsc + +Cross-build, directly on your own system +---------------------------------------- + +0. Install the build-dependencies of rustc (including cargo and itself): + + sudo dpkg --add-architecture $new_arch + sudo apt-get --no-install-recommends build-dep --host-architecture=$new_arch rustc + +1. Build it: + + apt-get source --compile --host-architecture=$new_arch rustc + +Native-build using bundled upstream binary blobs +------------------------------------------------ + +Use the same instructions as given in "Bootstrapping" in debian/README.source +in the source package, making sure to set the relevant architectures. + +Responsible distribution of cross-built binaries +------------------------------------------------ + +By nature, cross-builds do not run tests. These are important for rustc and +many tests often fail on newly-supported architectures even if builds and +cross-builds work fine. You should find some appropriate way to test your +cross-built packages rather than blindly shipping them to users. + +For example, Debian experimental is an appropriate place to upload them, so +that they can be installed and tested on Debian porter boxes, before being +uploaded to unstable and distributed to users. + + +Test failures +============= + +Starting from version 1.20.0+dfsg1-1 the Debian packages of rustc no longer +fail the overall build if > 0 tests fail. Instead, we allow up to around 5 +tests to fail. In other words, if you're reading this in a binary package, +between 0 and 5 tests might have failed when building this. + +This is due to lack of maintainer time to investigate all failures. Many +previous test failures were reported to upstream and did not receive a timely +response, suggesting the failures were not important. I was then forced to +patch out the test to make the build proceed, so several tests were being +ignored in practise anyway. + +This brings the Debian package in line with the Fedora package which also +ignores all test failures. (Many other distributions don't run tests at all.) + +If you think that the Debian rustc package is miscompiling your program in a +way that the upstream distributed compiler doesn't, you may check the test +failures here: + +https://buildd.debian.org/status/package.php?p=rustc + +If you can identify a relevant test failure, as well as the patches needed to +fix it (either to rustc or LLVM), this will speed up the processing of any bug +reports on the Debian side. + +We will also examine these failures ourselves on a best-effort basis and +attempt to fix the more serious-looking ones. + +Uncommon architectures +---------------------- + +Debian release architectures armel and s390x currently have more test failures, +being tracked by upstream here: + +- https://github.com/rust-lang/rust/issues/52493 armel +- https://github.com/rust-lang/rust/issues/52491 s390x + +Ports architectures +------------------- + +The number of allowed test failures on certain Debian ports architectures +(currently powerpc, powerpcspe, sparc64, x32) is raised greatly to help unblock +progress for porters. Of course, as a user this means you may run into more +bugs than usual; as mentioned above bugs reports and patches are welcome. + + +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 diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 000000000..ef42add62 --- /dev/null +++ b/debian/README.source @@ -0,0 +1,240 @@ +Document by Ximin Luo, 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. + +If you are looking to help maintain this package, be sure to read the "Notes +for package maintainers" section further below. + + +Embedded libraries +================== + +The upstream source package embeds many external libraries. We make a great +effort to remove them and use system versions where possible, but there are a +few more remaining: + + * vendor/dlmalloc, vendor/windows_*_gnu, vendor/windows_*_msvc + + These are small C libraries designed to be statically linked; their upstream + does not support building them as a shared library and they are too small to + justify their own Debian package. + + +Building from source +==================== + +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. + + sudo apt-get build-dep ./ + dpkg-buildpackage + # Or, to directly use what's in the Debian FTP archive + sudo apt-get build-dep rustc + 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". + + sudo apt-get build-dep -P pkg.rustc.dlstage0 ./ + dpkg-buildpackage -P pkg.rustc.dlstage0 + # Or, to directly use what's in the Debian FTP archive + sudo apt-get build-dep -P pkg.rustc.dlstage0 rustc + apt-get source --compile -P pkg.rustc.dlstage0 rustc + +After [1] is fixed, both of these should in theory give identical results. + +If neither of these options are acceptable to you, e.g. because your distro +does not have rustc already and your build process cannot access the network, +see "Bootstrapping" below. + +[1] https://github.com/rust-lang/rust/issues/34902 + + +Bootstrapping +============= + +To bootstrap rustc on a distro that does not have it or cargo available on any +architecture (so cross-compiling is not an option) you can run `debian/rules +source_orig-stage0`. This creates a .dsc that does not Build-Depend on rustc or +cargo. Instead, it includes an extra orig-stage0 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-stage0 + # Follow the final manual instructions that it outputs. Then: + sbuild ../rustc_*.dsc && dput ../rustc_*.dsc + +To only bootstrap specific architectures, run this instead: + + upstream_bootstrap_arch="arm64 armhf" debian/rules source_orig-stage0 + +This way, other architectures will be omitted from the orig-stage0 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 bundles the upstream bootstrapping binaries inside the Debian +source package. This is a nasty hack that stretches the definition of "source +package", but has a few advantages explained below. + +The traditional Debian way of bootstrapping compilers - and other distros have +similar approaches - is some variant of the following: + +1. A developer locally installs some upstream bootstrapping binaries. +2. They locally build a Debian package, using these binaries as undeclared + build dependencies. +3. They upload these binary packages to Debian, which can be used as declared + Build-Depends in the future, including by the same package. + +The problem with this is, Debian does not have any policy nor infrastructure +that can try to reproduce what this developer supposedly did. + +Using bootstrapping binary blobs *at some point of the process* is unavoidable. +Rather than pretending we didn't do this, it is better to record *which blobs* +we used, so it can be audited later. If we bundle non-Debian build-dependencies +inside the source package, then we can do a *source-only upload*, and the +building of the binary packages can be done by the normal build infrastructure. + +If the build process is reproducible [1] then we can be sure that *you* (as the +developer that prepared the source-only upload) didn't backdoor the binaries, +nor did the build daemons even if they were compromised during the build. + +The bootstrapping binaries may still have been backdoored, but this is true in +both scenarios. So our arrangement is still a strict improvement in security, +because it reduces the set of "things that may have been backdoored". Also, +more people use the upstream binaries than the "magical original Debian +package", so backdoors have a greater chance of being detected in the former. + +In the long run, this process is laying the foundations for doing Diverse +Double-Compilation [2], where we use *many independent* bootstrapping binaries +to reproduce bit-for-bit identical output compilers, giving confidence that +nothing was backdoored along the way. + +[1] The build process for rustc is currently *not* reproducible but we're + working towards it. https://github.com/rust-lang/rust/issues/34902 +[2] http://www.dwheeler.com/trusting-trust/ + + +Maintaining this package +======================== + +Import of a new upstream version +-------------------------------- + +$ apt install equivs python3-magic +$ sudo mk-build-deps -irt 'aptitude -R' +$ uscan --verbose # or debian/rules source_orig-beta, for beta +$ ver=UPDATE-ME # whatever it is, probably X.YY.Z or X.YY.Z~beta.N + +$ debian/refresh-early-patches.sh $ver +# This will require an understanding of how git-rebase and git-mergetool works +# We recommend either kdiff3 or p4merge (proprietary) as the git-mergetool. + +$ tar xf ../rustc-${ver/\~/-}-src.tar.xz && ( cd rustc-${ver/*~*/beta}-src/ && pwd && ../debian/prune-unused-deps ) && rm -rf rustc-${ver/*~*/beta}-src/ +$ git diff +# Review the diff. If it removes too much stuff, it could mean that rustc +# pulled in new unnecessary dependencies in this newer version. See if you can +# drop them by amending the patch "d-0000-ignore-removed-submodules.patch". +# Rerun the above "tar ..." commands again and check that your patch works. +# For example, there is absolutely no reason why rustc should need openssl. + +$ git commit -m "Update Files-Excluded for new upstream version ${ver/\~/-}" debian/copyright +$ uscan --verbose # yes, again, to pick up the new Files-Excluded stuff + # or debian/rules source_orig-beta, for beta + +# Keep running this and follow its instructions, until it gives no output: +$ debian/check-orig-suspicious.sh $ver +# When you are satisfied with the above, proceed: + +$ git checkout debian/experimental +$ gbp import-orig ../rustc_$ver+dfsg1.orig.tar.xz +$ dch -v $ver+dfsg1-1~exp1 "New upstream release." +$ debian/rules update-version +# might also need to bump the version of the cargo Build-Depends +# then refresh patches, etc etc +# Use /usr/share/cargo/scripts/guess-crate-copyright to help update d/copyright quickly + +# If you need to repack again, bump the 'repacksuffix' in d/watch then run +$ uscan --verbose --force-download +# This will do a local repack using the new Files-Excluded rules, without +# redownloading the orig tarball (despite the slightly misleading flag). + + +Proceeding after build failure +------------------------------ + +If your build fails, don't run `./x.py` directly as that will detect it's being +run with different settings, and run the build from scratch all over again. +overwriting all intermediate files. Instead, do: + +$ debian/rules run_rustbuild X_CMD="build|test|install" X_FLAGS="whatever" + +Hopefully, this will directly proceed to the step that failed, without +rebuilding everything in between. + + +Comparing Debian rustc vs upstream rustc +---------------------------------------- + +This package does things the Debian way, which differs significantly from +upstream practices. If you find a bug, you might want to check if it is present +in the upstream package. Run "debian/rules debian/config.toml" to generate our +config.toml that you can then use in an upstream directory **unpacked from the +release tarball*. (It is more complex to get this working with their git repo.) + +This will configure it in a "halfway" style between upstream and Debian. +Specifically, it will not build LLVM nor download stuff from crates.io, yet +Debian patches are *not* applied. These specific settings were chosen as a +tradeoff between convenience vs being close to what upstream does - so that the +chances of a bug here being a genuine upstream issue rather than a Debian bug, +is much higher. Also, with the exception of LLVM, these are non-default modes +*supported by* upstream so they would be happy to receive bug reports about it +even if your issue only occurs here. + +OTOH if you need to test a completely clean upstream build, including all the +annoying stuff like building LLVM and downloading dependencies from crates.io, +simply unpack the tarball and run `./configure && ./x.py build` etc as normal. +This can be useful for confirming that an issue is caused by Debian's LLVM. + +If you need to test a LLVM patch, do something like this: + +# build your patched LLVM debs, then: +$ mkdir -p llvm-destdir && cd llvm-destdir +$ ver=4.0; VERSION=FIXME +$ for i in llvm-$ver llvm-$ver-dev llvm-$ver-runtime llvm-$ver-tools libllvm$ver; do \ + dpkg -x ../"$i"_*${VERSION}_*.deb .; done +$ cd ../rustc +$ debian/rules LLVM_DESTDIR=$PWD/../llvm-destdir build + +If you need to test a patch to the stage0 rustc, do something like this: + +# build your patched rustc debs or upstream rustc, then: +$ mkdir -p rust-destdir && cd rust-destdir +$ ver=1.20; VERSION=FIXME; +$ for i in rustc libstd-rust-$ver libstd-rust-dev; do \ + dpkg -x ../"$i"_*${VERSION}_*.deb .; done +$ cd ../rustc +$ debian/rules RUST_DESTDIR=$PWD/../rust-destdir build + + +Useful links +------------ + +The Fedora rust team is more active than the Debian one. Here are their links: + +Source code +https://src.fedoraproject.org/rpms/rust/tree/ + +Binary packages and test logs +https://kojipkgs.fedoraproject.org//packages/rust/ +If the same test fails both on Fedora and Debian it's a good indication that +we're not Doing It Wrong and can file a valid bug upstream. diff --git a/debian/TODO b/debian/TODO new file mode 100644 index 000000000..ed9f05bc1 --- /dev/null +++ b/debian/TODO @@ -0,0 +1,12 @@ +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/debian/architecture-test.mk b/debian/architecture-test.mk new file mode 100644 index 000000000..e7aeabade --- /dev/null +++ b/debian/architecture-test.mk @@ -0,0 +1,16 @@ +# Used for testing architecture.mk, and for make_orig-stage0_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/debian/architecture.mk b/debian/architecture.mk new file mode 100644 index 000000000..dd027a13e --- /dev/null +++ b/debian/architecture.mk @@ -0,0 +1,18 @@ +# 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 -riscv64-,-$(2)-),$(subst riscv64,riscv64gc,$(1)),\ +$(if $(findstring -armhf-,-$(2)-),$(subst arm,armv7,$(1)),\ +$(if $(findstring -armel-,-$(2)-),$(subst arm,armv5te,$(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/debian/bin/rust-lld b/debian/bin/rust-lld new file mode 100755 index 000000000..04aec84b4 --- /dev/null +++ b/debian/bin/rust-lld @@ -0,0 +1,9 @@ +#!/bin/bash +# Wrapper around lld that strips away -Wl, which it doesn't recognise. +# We need this for the wasm32 tests, where we have generic RUSTFLAGS that +# includes LDFLAGS from dpkg-buildflags which assumes a GCC linker. +# +# However the tests fail for other reasons, namely we can't build rustdoc +# (which runs the tests) in wasm32 yet. So this is just WIP at the moment, +# it is not expect to work nor to be installed on user machines. +exec /usr/bin/lld-14 "${@/#-Wl,/}" diff --git a/debian/cargo/.package-cache b/debian/cargo/.package-cache new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/debian/cargo/.package-cache diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..d3049a1b9 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,1771 @@ +rustc (1.64.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable + * Add myself to Uploaders + + -- Fabian Grünbichler <debian@fabian.gruenbichler.email> Mon, 12 Jun 2023 18:36:56 +0200 + +rustc (1.64.0+dfsg1-1~exp4) experimental; urgency=medium + + [ John Paul Adrian Glaubitz ] + * fix sparc64 rustix build (Closes: #1030053) + + -- Fabian Gruenbichler <debian@fabian.gruenbichler.email> Tue, 31 Jan 2023 19:55:48 +0100 + +rustc (1.64.0+dfsg1-1~exp3) experimental; urgency=medium + + [ Simon Chopin ] + * cherry-pick riscv64 fix from ubuntu + + -- Fabian Gruenbichler <debian@fabian.gruenbichler.email> Fri, 20 Jan 2023 20:48:11 +0100 + +rustc (1.64.0+dfsg1-1~exp2) experimental; urgency=medium + + [ Fabian Grünbichler ] + * d/prune-unused-deps: unify cargo update calls + * fix rustix on arches requiring outline building + * fix libstd-rust-dev-windows lintian override + * fix compiler_builtins linkage on arm(el) + * add compiler_builtins sync fallbacks for arm(el) + * fix panicking lldb check on armel + + -- Fabian Gruenbichler <debian@fabian.gruenbichler.email> Wed, 11 Jan 2023 17:22:16 +0100 + +rustc (1.64.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release + * d/rules: auto_clean: preserve .cargo/config.toml + * d/rules: also clear bootstrap/rust-analyzer Cargo.lock + * d/rules: extend privacy-breach removal + * ship rust-analyzer-proc-macro-srv binary + + -- Fabian Gruenbichler <debian@fabian.gruenbichler.email> Thu, 08 Dec 2022 09:17:59 +0100 + +rustc (1.63.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable (Closes: #1018859) + + [ Pietro Albini ] + * clarify the licensing of the mpsc implementation + + -- Fabian Gruenbichler <debian@fabian.gruenbichler.email> Wed, 07 Dec 2022 17:29:00 +0100 + +rustc (1.63.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release + + -- Fabian Gruenbichler <debian@fabian.gruenbichler.email> Tue, 15 Nov 2022 19:47:53 +0100 + +rustc (1.62.1+dfsg1-1) unstable; urgency=medium + + * Upload to unstable + * Fix armhf build + + -- Fabian Gruenbichler <debian@fabian.gruenbichler.email> Mon, 31 Oct 2022 14:19:34 +0100 + +rustc (1.62.1+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release + + -- Fabian Gruenbichler <debian@fabian.gruenbichler.email> Fri, 28 Oct 2022 11:35:48 +0200 + +rustc (1.61.0+dfsg1-2) unstable; urgency=medium + + [ Ximin Luo] + * Improve cross-building documentation + + [ Adrian Bunk ] + * Disable kernel_user_helpers on armel (duplicate symbols) + * Increase allowed failures on armel/mips64el/ppc64 (Closes: #1020860) + + [ Fabian Grünbichler ] + * cherry-pick patches from Ubuntu + * fix rebuild of 1.61 with 1.61 + + -- Fabian Gruenbichler <debian@fabian.gruenbichler.email> Mon, 10 Oct 2022 20:19:05 +0200 + +rustc (1.61.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable (Closes: #1020394) + + -- Sylvestre Ledru <sylvestre@debian.org> Thu, 22 Sep 2022 09:00:21 +0200 + +rustc (1.61.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release + + * Switch to LLVM-14 (Closes: #1017656) + + -- Fabian Gruenbichler <f.gruenbichler@proxmox.com> Wed, 07 Sep 2022 17:33:04 +0200 + +rustc (1.60.0+dfsg1-1) unstable; urgency=medium + + * Ignore more test failures on mips64el for lack of inline assembly support. + + * Add i386 and x32 to list of "low-memory" architectures requiring build + workarounds. + + -- Fabian Gruenbichler <f.gruenbichler@proxmox.com> Mon, 5 Sep 2022 10:03:18 +0200 + +rustc (1.60.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Fabian Gruenbichler <f.gruenbichler@proxmox.com> Thu, 14 Jul 2022 13:08:16 +0200 + +rustc (1.59.0+dfsg1-2) unstable; urgency=medium + + * Backport a patch for riscv64. + * Ignore some test failures on armhf due to regression in GDB 11.2. + + -- Ximin Luo <infinity0@debian.org> Tue, 21 Jun 2022 11:06:16 +0100 + +rustc (1.59.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + + -- Ximin Luo <infinity0@debian.org> Wed, 11 May 2022 14:11:46 +0100 + +rustc (1.59.0+dfsg1-1~exp1) experimental; urgency=medium + + [ Fabian Grünbichler ] + * New upstream release + + -- Ximin Luo <infinity0@debian.org> Tue, 29 Mar 2022 14:32:01 +0100 + +rustc (1.58.1+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + + -- Ximin Luo <infinity0@debian.org> Tue, 29 Mar 2022 12:23:46 +0100 + +rustc (1.58.1+dfsg1-1~exp1) experimental; urgency=medium + + [ Fabian Gruenbichler ] + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Tue, 08 Mar 2022 11:32:29 +0000 + +rustc (1.57.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. (Closes: #1005203) + + -- Ximin Luo <infinity0@debian.org> Tue, 08 Mar 2022 10:51:18 +0000 + +rustc (1.57.0+dfsg1-1~exp1) experimental; urgency=medium + + [ Simon Chopin ] + * d/p/d-bootstrap-rustflags.patch: remove the warnings bit, use the option + "deny-warnings = false" in d/config.toml.in instead + + [ Fabian Grünbichler ] + * Fix CVE-2022-21658 - std::fs::remove_dir_all TOCTOU symlink issue + * New upstream release. (Closes: #1005203) + + -- Fabian Grünbichler <f.gruenbichler@proxmox.com> Thu, 03 Feb 2022 19:14:04 +0100 + +rustc (1.56.0+dfsg1-2) unstable; urgency=medium + + * Update to debhelper 13. + + -- Ximin Luo <infinity0@debian.org> Fri, 22 Oct 2021 23:29:14 +0100 + +rustc (1.56.0+dfsg1-1) unstable; urgency=medium + + * New upstream release. + * Support terse and verbose DEB_BUILD_OPTIONS. + * Support -Z gcc-ld=lld via symlinks. + * Fix RUSTC_SYSROOT in rust-gdb and rust-lldb, thanks James McCoy. + + -- Ximin Luo <infinity0@debian.org> Fri, 22 Oct 2021 18:54:49 +0100 + +rustc (1.56.0~beta.4+dfsg1-1~exp2) experimental; urgency=medium + + * Include upstream patch for x32 support. (Closes: #993855) + * Update to LLVM 13. + + -- Ximin Luo <infinity0@debian.org> Fri, 15 Oct 2021 10:44:35 +0100 + +rustc (1.56.0~beta.4+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Thu, 14 Oct 2021 22:50:58 +0100 + +rustc (1.55.0+dfsg1-2) unstable; urgency=medium + + * Actually work around segfault on ppc64el. + * Fix FTBFS on armhf caused by GCC 11 changes. + + -- Ximin Luo <infinity0@debian.org> Thu, 14 Oct 2021 00:36:15 +0100 + +rustc (1.55.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + * Bump test failures-allowed on s390x to 40. + * Work around a segfault on ppc64el + + -- Ximin Luo <infinity0@debian.org> Wed, 13 Oct 2021 22:06:15 +0100 + +rustc (1.55.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Sat, 09 Oct 2021 03:22:08 +0100 + +rustc (1.54.0+dfsg1-3) unstable; urgency=medium + + * Fix links to cargo-doc. + + -- Ximin Luo <infinity0@debian.org> Sat, 09 Oct 2021 11:46:08 +0100 + +rustc (1.54.0+dfsg1-2) unstable; urgency=medium + + * Fix some more build & test failures. + + -- Ximin Luo <infinity0@debian.org> Sat, 09 Oct 2021 03:12:35 +0100 + +rustc (1.54.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + * Re-enable backported patch for armhf & reset its allowed-failures. + * Add compatibility patch for cargo 0.47. + * Ignore more spurious test failures, and filed upstream. + * Bump powerpc allowed-failures to 180 at the request of ports maintainers. + + -- Ximin Luo <infinity0@debian.org> Sat, 09 Oct 2021 00:24:37 +0100 + +rustc (1.54.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Wed, 06 Oct 2021 10:37:55 +0100 + +rustc (1.53.0+dfsg1-4) unstable; urgency=medium + + * Ignore some hanging test regressions on non-release arches powerpc, ppc64. + + -- Ximin Luo <infinity0@debian.org> Wed, 06 Oct 2021 19:24:11 +0100 + +rustc (1.53.0+dfsg1-3) unstable; urgency=medium + + * Disable patch that was backported incorrectly. + * Temporarily increase armhf allowed-failures to 12. + + -- Ximin Luo <infinity0@debian.org> Wed, 06 Oct 2021 19:01:54 +0100 + +rustc (1.53.0+dfsg1-2) unstable; urgency=medium + + * Fix some test failures. + + -- Ximin Luo <infinity0@debian.org> Wed, 06 Oct 2021 10:29:03 +0100 + +rustc (1.53.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + * Update mips patches, disable a test as our workaround makes it invalid. + * Temporarily ignore some tests that fail on big-endian. + + -- Ximin Luo <infinity0@debian.org> Tue, 05 Oct 2021 23:19:31 +0100 + +rustc (1.53.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. (Closes: #986803) + * Honour parallel option in DEB_BUILD_OPTIONS. (Closes: #993871) + + -- Ximin Luo <infinity0@debian.org> Sat, 02 Oct 2021 12:46:49 +0100 + +rustc (1.52.1+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + * Reorganise dependencies, move optional rustc deps to rust-all. + + -- Ximin Luo <infinity0@debian.org> Wed, 29 Sep 2021 20:05:55 +0100 + +rustc (1.52.1+dfsg1-1~exp3) experimental; urgency=medium + + * Update to LLVM 12. + + -- Ximin Luo <infinity0@debian.org> Wed, 19 May 2021 17:52:44 +0100 + +rustc (1.52.1+dfsg1-1~exp2) experimental; urgency=medium + + * Fix rust-clippy dependency on libstd-rust-* + + -- Ximin Luo <infinity0@debian.org> Sat, 15 May 2021 22:42:38 +0100 + +rustc (1.52.1+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Sat, 15 May 2021 15:21:27 +0100 + +rustc (1.52.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Fri, 07 May 2021 20:38:38 +0100 + +rustc (1.52.0~beta.3+dfsg1-1~exp4) experimental; urgency=medium + + * Fix issue with dh_missing --fail-missing + + -- Ximin Luo <infinity0@debian.org> Thu, 06 May 2021 01:52:30 +0100 + +rustc (1.52.0~beta.3+dfsg1-1~exp3) experimental; urgency=medium + + * Fix Makefile addition syntax. + + -- Ximin Luo <infinity0@debian.org> Wed, 05 May 2021 22:24:22 +0100 + +rustc (1.52.0~beta.3+dfsg1-1~exp2) experimental; urgency=medium + + * Install the rust-llvm-dwp symlink. + + -- Ximin Luo <infinity0@debian.org> Wed, 05 May 2021 22:20:13 +0100 + +rustc (1.52.0~beta.3+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Mon, 26 Apr 2021 12:31:27 +0100 + +rustc (1.51.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + * Install the rust-llvm-dwp symlink. + * Bump ppc64 allowed-failures to 24. + + -- Ximin Luo <infinity0@debian.org> Sun, 19 Sep 2021 19:48:33 +0100 + +rustc (1.51.0+dfsg1-1~exp3) experimental; urgency=medium + + * Restore patch, not actually fixed upstream. + + -- Ximin Luo <infinity0@debian.org> Mon, 26 Apr 2021 16:17:12 +0100 + +rustc (1.51.0+dfsg1-1~exp2) experimental; urgency=medium + + * Drop patch fixed upstream. + * Fix bootstrap with self version. + + -- Ximin Luo <infinity0@debian.org> Mon, 26 Apr 2021 12:26:43 +0100 + +rustc (1.51.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + * Enable 32-bit windows support. + + -- Ximin Luo <infinity0@debian.org> Mon, 12 Apr 2021 11:04:36 +0100 + +rustc (1.50.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + + -- Ximin Luo <infinity0@debian.org> Sat, 18 Sep 2021 11:45:21 +0100 + +rustc (1.50.0+dfsg1-1~exp4) experimental; urgency=medium + + * Fix more tests with a backported upstream PR. + + -- Ximin Luo <infinity0@debian.org> Mon, 12 Apr 2021 01:51:22 +0100 + +rustc (1.50.0+dfsg1-1~exp3) experimental; urgency=medium + + * Fix cross-compile to windows using same-version stage0. + + -- Ximin Luo <infinity0@debian.org> Sun, 11 Apr 2021 13:52:41 +0100 + +rustc (1.50.0+dfsg1-1~exp2) experimental; urgency=medium + + * Fix tests, fix s390x breakage. + + -- Ximin Luo <infinity0@debian.org> Fri, 09 Apr 2021 16:54:20 +0100 + +rustc (1.50.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Mon, 05 Apr 2021 21:30:18 +0100 + +rustc (1.49.0+dfsg1-2) unstable; urgency=medium + + * Backport upstream PR 85807 to fix powerpc test issues. + + -- Ximin Luo <infinity0@debian.org> Sat, 18 Sep 2021 11:33:09 +0100 + +rustc (1.49.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + + -- Ximin Luo <infinity0@debian.org> Sat, 28 Aug 2021 10:48:11 +0100 + +rustc (1.49.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Mon, 05 Apr 2021 14:59:34 +0100 + +rustc (1.49.0~beta.4+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Sun, 20 Dec 2020 23:26:55 +0000 + +rustc (1.48.0+dfsg1-2) unstable; urgency=medium + + * Enable +xgot on mips64*, see upstream #52108 for details. + + -- Ximin Luo <infinity0@debian.org> Sun, 20 Dec 2020 18:52:10 +0000 + +rustc (1.48.0+dfsg1-1) unstable; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Tue, 01 Dec 2020 19:57:48 +0000 + +rustc (1.48.0~beta.8+dfsg1-1~exp3) experimental; urgency=medium + + * Update u-update-version-check.patch + + -- Ximin Luo <infinity0@debian.org> Fri, 13 Nov 2020 01:36:31 +0000 + +rustc (1.48.0~beta.8+dfsg1-1~exp2) experimental; urgency=medium + + * Disable copy_file_range optimisation for now, see upstream #78979. + * Ignore some other minor tests, bugs have been filed upstream. + + -- Ximin Luo <infinity0@debian.org> Thu, 12 Nov 2020 23:51:53 +0000 + +rustc (1.48.0~beta.8+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Wed, 11 Nov 2020 12:31:18 +0000 + +rustc (1.47.0+dfsg1-1) unstable; urgency=medium + + * New upstream release. + * Update to LLVM 11. + * Ignore more tests on big-endian. + + -- Ximin Luo <infinity0@debian.org> Sat, 07 Nov 2020 21:21:03 +0000 + +rustc (1.47.0~beta.2+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Sat, 05 Sep 2020 16:11:16 +0100 + +rustc (1.46.0+dfsg1-1) unstable; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Sat, 29 Aug 2020 16:54:36 +0100 + +rustc (1.46.0~beta.2+dfsg1-1~exp5) experimental; urgency=medium + + * Fix rust-gdb install path. (Closes: #968279) + * Drop powerpc allowed-failures to 12. (Closes: #955774) + * Update d-fix-mips64el-bootstrap.patch for newer LLVM. + + -- Ximin Luo <infinity0@debian.org> Fri, 14 Aug 2020 23:45:25 +0100 + +rustc (1.46.0~beta.2+dfsg1-1~exp4) experimental; urgency=medium + + * Move cross-linker Depends to Recommends - for cross-compiling support + libraries should never hard-depend on toolchains. This also allows us to + add the usual M-A annotations for libraries. + + -- Ximin Luo <infinity0@debian.org> Sun, 09 Aug 2020 18:16:16 +0100 + +rustc (1.46.0~beta.2+dfsg1-1~exp3) experimental; urgency=medium + + * Drop "-cross" suffix from libstd naming, after discussion with Helmut + Grohne. Since libstd-rust-dev-wasm-cross is not yet in stable and only + has 4 installed users, we do not retain a migration package. + + -- Ximin Luo <infinity0@debian.org> Sun, 09 Aug 2020 14:27:54 +0100 + +rustc (1.46.0~beta.2+dfsg1-1~exp2) experimental; urgency=medium + + * Add support for cross-compiling to windows. See README.Debian for details. + Currently only 64-bit works, we are waiting on #540782 for 32-bit. + + -- Ximin Luo <infinity0@debian.org> Sun, 09 Aug 2020 03:52:34 +0100 + +rustc (1.46.0~beta.2+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Fri, 07 Aug 2020 00:15:46 +0100 + +rustc (1.45.0+dfsg1-2) unstable; urgency=medium + + * Add some more big-endian test patches. + * Backport some patches to fix some testsuite ICEs. + + -- Ximin Luo <infinity0@debian.org> Thu, 06 Aug 2020 21:11:39 +0100 + +rustc (1.45.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + + -- Ximin Luo <infinity0@debian.org> Wed, 05 Aug 2020 21:41:39 +0100 + +rustc (1.45.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Mon, 27 Jul 2020 17:45:24 +0100 + +rustc (1.44.1+dfsg1-3) unstable; urgency=medium + + * Fix patch for line numbers on little-endian arches. + + -- Ximin Luo <infinity0@debian.org> Tue, 28 Jul 2020 21:51:36 +0100 + +rustc (1.44.1+dfsg1-2) unstable; urgency=medium + + * Ignore tests that assume little-endian on big-endian arches. + See upstream #74829 for details. + + -- Ximin Luo <infinity0@debian.org> Tue, 28 Jul 2020 21:20:24 +0100 + +rustc (1.44.1+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + * Backport a typenum fix for i386. + * Work around upstream #74786 involving debuginfo maps. + + -- Ximin Luo <infinity0@debian.org> Mon, 27 Jul 2020 13:15:20 +0100 + +rustc (1.44.1+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Sat, 04 Jul 2020 18:04:42 +0100 + +rustc (1.43.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + * Bump LLVM B-D version for some backported fixes affecting rustc. + + -- Ximin Luo <infinity0@debian.org> Sun, 05 Jul 2020 15:06:52 +0100 + +rustc (1.43.0+dfsg1-1~exp1) experimental; urgency=medium + + * Drop sparc64 workaround. (Closes: #956413) + * Drop stack-gap workaround for old kernels and rust versions. + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Mon, 27 Apr 2020 13:09:20 +0100 + +rustc (1.42.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + + -- Ximin Luo <infinity0@debian.org> Fri, 10 Apr 2020 11:33:25 +0100 + +rustc (1.42.0+dfsg1-1~exp1) experimental; urgency=medium + + [ Fabian Grünbichler ] + * Team upload. + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Sat, 04 Apr 2020 16:06:03 +0100 + +rustc (1.41.1+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + + -- Ximin Luo <infinity0@debian.org> Fri, 03 Apr 2020 23:41:11 +0100 + +rustc (1.41.1+dfsg1-1~exp1) experimental; urgency=medium + + [ Ximin Luo ] + * More python 2 -> 3 fixes. + * Enable the wasm32-wasi target for code that needs a "real" libstd. + * Don't strip static rlibs. This sometimes breaks wasm, and more generally + the stripped debuginfo is actually totally lost rather than being moved + into the -dbgsym packages. Shared libraries are unaffected and work. + * Allow 180 failing tests on riscv64, none were actually run last time. + + [ Fabian Grünbichler ] + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Mon, 09 Mar 2020 00:31:34 +0000 + +rustc (1.40.0+dfsg1-5) unstable; urgency=medium + + * More python 2 -> 3 fixes. + * Allow 24 failing tests on riscv64. + * Reenable debuginfo for rustc, not just libstd. + * Reenable backtraces during tests. + + -- Ximin Luo <infinity0@debian.org> Sun, 05 Jan 2020 13:35:46 +0000 + +rustc (1.40.0+dfsg1-4) unstable; urgency=medium + + * Experimental riscv64 support. + + -- Ximin Luo <infinity0@debian.org> Sat, 04 Jan 2020 05:40:11 +0000 + +rustc (1.40.0+dfsg1-3) unstable; urgency=medium + + * Work around upstream #59264 again. :/ + + -- Ximin Luo <infinity0@debian.org> Fri, 03 Jan 2020 22:05:16 +0000 + +rustc (1.40.0+dfsg1-2) unstable; urgency=medium + + * Fix more internal build scripts so they use python3. + * Don't add -L/usr/lib/llvm when cross-compiling. (Closes: #941783) + + -- Ximin Luo <infinity0@debian.org> Fri, 03 Jan 2020 20:18:46 +0000 + +rustc (1.40.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + * Ignore new test failing on arm that also fails in previous versions. + + -- Ximin Luo <infinity0@debian.org> Sun, 29 Dec 2019 22:17:04 +0000 + +rustc (1.40.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Wed, 25 Dec 2019 00:09:24 +0000 + +rustc (1.39.0+dfsg1-4) unstable; urgency=medium + + * Update to LLVM 9. (Closes: #946886) + + -- Ximin Luo <infinity0@debian.org> Mon, 23 Dec 2019 03:21:02 +0000 + +rustc (1.39.0+dfsg1-3) unstable; urgency=medium + + * Fix mips patch involving mxgot for new RUSTFLAGS behaviour. + + -- Ximin Luo <infinity0@debian.org> Fri, 06 Dec 2019 22:18:53 +0000 + +rustc (1.39.0+dfsg1-2) unstable; urgency=medium + + * Include reproducibility patch for compiler-builtins. + * Use python3 instead of python to run rustbuild. (Closes: #938422) + * Expand d-ignore-error-detail-diff.patch for unfixed upstream #53081. + + -- Ximin Luo <infinity0@debian.org> Thu, 05 Dec 2019 22:51:41 +0000 + +rustc (1.39.0+dfsg1-1) unstable; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Sat, 30 Nov 2019 22:20:48 +0000 + +rustc (1.38.0+dfsg1-2) unstable; urgency=medium + + * Fix building with rustc 1.38.0 + * Fix building with cargo 0.40.0 + + -- Ximin Luo <infinity0@debian.org> Fri, 29 Nov 2019 00:05:16 +0000 + +rustc (1.38.0+dfsg1-1) unstable; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Tue, 26 Nov 2019 14:41:46 +0000 + +rustc (1.37.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + * Fix a typo in debian/rules regex causing FTBFS on some arches. + + -- Ximin Luo <infinity0@debian.org> Thu, 05 Sep 2019 00:06:23 -0700 + +rustc (1.37.0+dfsg1-1~exp2) experimental; urgency=medium + + * Support cross-compiling to wasm32. (Closes: #903110) + To do that, install the libstd-rust-dev-wasm32-cross package and give + --target wasm32-unknown-unknown. + * Drop dependency on system compiler-rt, these new versions of rustc + actually don't need it at all. + + -- Ximin Luo <infinity0@debian.org> Thu, 29 Aug 2019 09:00:03 -0700 + +rustc (1.37.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + * Use system compiler-rt. + + -- Ximin Luo <infinity0@debian.org> Sun, 25 Aug 2019 03:06:33 -0700 + +rustc (1.36.0+dfsg1-2) unstable; urgency=medium + + * Set CARGO_HOME to debian/cargo_home (instead of $HOME/.cargo) as newer + versions of cargo must take a file lock that has to exist. + + -- Ximin Luo <infinity0@debian.org> Wed, 17 Jul 2019 18:25:06 -0700 + +rustc (1.36.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + + -- Ximin Luo <infinity0@debian.org> Tue, 16 Jul 2019 20:27:55 -0700 + +rustc (1.36.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Sat, 13 Jul 2019 12:42:05 -0700 + +rustc (1.35.0+dfsg1-1) unstable; urgency=medium + + * Add entry in 1.34.2+dfsg1-1 to note that it uses LLVM 7. + * Add entry in 1.35.0+dfsg1-1~exp2 to note that it uses LLVM 8. + * Fix ICE on sparc64 by including upstream PR #61881. + + -- Ximin Luo <infinity0@debian.org> Sat, 13 Jul 2019 10:30:35 -0700 + +rustc (1.35.0+dfsg1-1~exp1) experimental; urgency=medium + + * Don't use system compiler-rt, it's not ready yet. + * Update to LLVM 8. + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Sun, 09 Jun 2019 23:20:52 -0700 + +rustc (1.34.2+dfsg1-1) unstable; urgency=medium + + * Don't use system compiler-rt, there are issues with that for now. + * Use LLVM 7 for the Debian buster release. + + -- Ximin Luo <infinity0@debian.org> Wed, 29 May 2019 21:52:37 -0700 + +rustc (1.34.2+dfsg1-1~exp2) experimental; urgency=medium + + * Fix doc build, add version 1 compat mode hack for mdBook 2. + * Use system compiler-rt from libclang-common-*-dev. + + -- Ximin Luo <infinity0@debian.org> Fri, 24 May 2019 00:39:59 -0700 + +rustc (1.34.2+dfsg1-1~exp1) experimental; urgency=medium + + * Ensure Cargo.toml is in rust-src. + * New upstream release. + * Update to LLVM 8. + + -- Ximin Luo <infinity0@debian.org> Sun, 19 May 2019 02:40:02 -0700 + +rustc (1.33.0+dfsg1-2) unstable; urgency=medium + + * Add Fedora patches. + * Bump i386 allowed test failures to 12. + + -- Ximin Luo <infinity0@debian.org> Sat, 18 May 2019 12:18:25 -0700 + +rustc (1.33.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + * Fix build on mips, flags needed whitespace massaging. + * Drop obsolete patches. + + -- Ximin Luo <infinity0@debian.org> Fri, 17 May 2019 21:04:20 -0700 + +rustc (1.33.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + [ Hiroaki Nakamura ] + * Delete obsolete patch. + + [ Sylvestre Ledru ] + * Update compiler-rt patch. + * Improve build-related docs a bit. + + -- Ximin Luo <infinity0@debian.org> Mon, 29 Apr 2019 19:50:48 -0700 + +rustc (1.32.0+dfsg1-3) unstable; urgency=medium + + * Conditionally-apply u-compiletest.patch based on stage0 compiler. + * Fix syntax error in d/rules compiletest check. + + -- Ximin Luo <infinity0@debian.org> Sun, 17 Mar 2019 16:40:05 -0700 + +rustc (1.32.0+dfsg1-2) unstable; urgency=medium + + * More verbose logging during builds. + * Fix compiletest compile error, and check log has at least 1 pass. + + -- Ximin Luo <infinity0@debian.org> Sun, 17 Mar 2019 12:52:57 -0700 + +rustc (1.32.0+dfsg1-1) unstable; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Sun, 27 Jan 2019 22:02:48 -0800 + +rustc (1.32.0~beta.2+dfsg1-1~exp2) experimental; urgency=medium + + * Note that this upstream version already Closes: #917191. + * Backport other upstream fixes. (Closes: #916818, #917000, #917192). + + -- Ximin Luo <infinity0@debian.org> Tue, 01 Jan 2019 15:26:57 -0800 + +rustc (1.32.0~beta.2+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + * Drop obsolete d-sparc64-dont-pack-spans.patch + + -- Ximin Luo <infinity0@debian.org> Sun, 16 Dec 2018 13:48:25 -0800 + +rustc (1.31.0+dfsg1-2) unstable; urgency=medium + + * Bump mips mipsel s390x allowed-failures to 24. + + -- Ximin Luo <infinity0@debian.org> Sun, 16 Dec 2018 14:34:44 -0800 + +rustc (1.31.0+dfsg1-1) unstable; urgency=medium + + * Revert debuginfo patches, they're not ready yet. + + -- Ximin Luo <infinity0@debian.org> Sun, 16 Dec 2018 09:58:06 -0800 + +rustc (1.31.0+dfsg1-1~exp2) experimental; urgency=medium + + * Drop redundant patches. + * Fix line numbers in some test-case patches. + * Backport an updated patch for gdb 8.2. + + -- Ximin Luo <infinity0@debian.org> Sat, 15 Dec 2018 13:52:26 -0800 + +rustc (1.31.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Fri, 14 Dec 2018 21:30:56 -0800 + +rustc (1.31.0~beta.19+dfsg1-1~exp2) experimental; urgency=medium + + * Filter LLVM build flags to not be stupid. + + -- Ximin Luo <infinity0@debian.org> Sat, 01 Dec 2018 12:17:52 -0800 + +rustc (1.31.0~beta.19+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Thu, 29 Nov 2018 22:29:16 -0800 + +rustc (1.31.0~beta.4+dfsg1-1~exp2) experimental; urgency=medium + + * Merge changes from Debian unstable. + + -- Ximin Luo <infinity0@debian.org> Tue, 06 Nov 2018 19:45:26 -0800 + +rustc (1.31.0~beta.4+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + * Drop old maintainers from Uploaders. + + -- Ximin Luo <infinity0@debian.org> Sun, 04 Nov 2018 19:00:16 -0800 + +rustc (1.30.0+dfsg1-2) unstable; urgency=medium + + * Increase FAILURES_ALLOWED for mips mipsel to 20. + * Set debuginfo-only-std = false for 32-bit powerpc architectures. + + -- Ximin Luo <infinity0@debian.org> Fri, 02 Nov 2018 01:42:36 -0700 + +rustc (1.30.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. (Closes: #881845) + * Increase FAILURES_ALLOWED for mips architectures. + * Set debuginfo-only-std = false for mips architectures. + + -- Ximin Luo <infinity0@debian.org> Thu, 01 Nov 2018 10:05:52 -0700 + +rustc (1.30.0+dfsg1-1~exp2) experimental; urgency=medium + + * Disable debuginfo-gdb tests relating to enums. These will be fixed in an + upcoming version, see upstream #54614 for details. + + -- Ximin Luo <infinity0@debian.org> Wed, 31 Oct 2018 00:02:25 -0700 + +rustc (1.30.0+dfsg1-1~exp1) experimental; urgency=medium + + * Actually don't build docs in an arch-only build. + * Add mips patch, hopefully closes #881845 but let's see. + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Tue, 30 Oct 2018 22:05:59 -0700 + +rustc (1.30.0~beta.7+dfsg1-1~exp3) experimental; urgency=medium + + * Do the necessary bookkeeping for the LLVM update. + + -- Ximin Luo <infinity0@debian.org> Wed, 26 Sep 2018 23:29:18 -0700 + +rustc (1.30.0~beta.7+dfsg1-1~exp2) experimental; urgency=medium + + * Tweak test failure rules: armel <= 8, ppc64 <= 12. + * Update to LLVM 7. + + -- Ximin Luo <infinity0@debian.org> Wed, 26 Sep 2018 21:43:30 -0700 + +rustc (1.30.0~beta.7+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Sun, 23 Sep 2018 10:40:30 -0700 + +rustc (1.29.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + * Drop d-armel-disable-kernel-helpers.patch as a necessary part of the + fix to #906520, so it is actually fixed. + * Backport a patch to fix the rand crate on powerpc. (Closes: #909400) + * Lower the s390x allowed failures back to 25. + + -- Ximin Luo <infinity0@debian.org> Sun, 23 Sep 2018 10:16:53 -0700 + +rustc (1.29.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + * Include patch for armel atomics. (Closes: #906520) + * Update to latest Standards-Version; no changes required. + + -- Ximin Luo <infinity0@debian.org> Thu, 20 Sep 2018 22:33:20 -0700 + +rustc (1.28.0+dfsg1-3) unstable; urgency=medium + + * Team upload. + + [ Ximin Luo ] + * More sparc64 fixes, and increase allowed-test-failures there to 180. + + [ Julien Cristau ] + * Don't use pentium4 as i686 baseline (closes: #908561) + + -- Julien Cristau <jcristau@debian.org> Tue, 11 Sep 2018 15:54:27 +0200 + +rustc (1.28.0+dfsg1-2) unstable; urgency=medium + + * Switch on verbose-tests to restore the old pre-1.28 behaviour, and restore + old failure-counting logic. + * Allow 50 test failures on s390x, restored failure-counting logic avoids + more double-counts. + + -- Ximin Luo <infinity0@debian.org> Sun, 05 Aug 2018 02:18:10 -0700 + +rustc (1.28.0+dfsg1-1) unstable; urgency=medium + + * New upstream release. + * Add patches from Fedora to fix some test failures. + * Ignore a failure testing specific error output, under investigation. + * Allow 100 test failures on s390x, should be reducible later with LLVM 7. + * Temporary fix for mips64el bootstrap. + * Be even more verbose during the build. + * Update to latest Standards-Version. + + -- Ximin Luo <infinity0@debian.org> Sat, 04 Aug 2018 23:04:41 -0700 + +rustc (1.28.0~beta.14+dfsg1-1~exp2) experimental; urgency=medium + + * Update test-failure counting logic. + * Fix version constraints for Recommends: cargo. + * Add patch to fix sparc64 CABI. + + -- Ximin Luo <infinity0@debian.org> Fri, 27 Jul 2018 04:26:52 -0700 + +rustc (1.28.0~beta.14+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + * Update to latest Standards-Version; no changes required. + + -- Ximin Luo <infinity0@debian.org> Wed, 25 Jul 2018 03:11:11 -0700 + +rustc (1.27.2+dfsg1-1) unstable; urgency=medium + + [ Sylvestre Ledru ] + * Update of the alioth ML address. + + [ Ximin Luo ] + * Fail the build if our version contains ~exp and we are not releasing to + experimental, this has happened by accident a few times already. + * Allow 36 and 44 test failures on armel and s390x respectively. + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Tue, 24 Jul 2018 21:35:56 -0700 + +rustc (1.27.1+dfsg1-1~exp4) experimental; urgency=medium + + * Unconditonally prune crate checksums to avoid having to manually prune them + whenever we patch the vendored crates. + + -- Ximin Luo <infinity0@debian.org> Thu, 19 Jul 2018 14:49:18 -0700 + +rustc (1.27.1+dfsg1-1~exp3) experimental; urgency=medium + + * Add patch from Fedora to fix rebuild against same version. + + -- Ximin Luo <infinity0@debian.org> Thu, 19 Jul 2018 08:52:03 -0700 + +rustc (1.27.1+dfsg1-1~exp2) experimental; urgency=medium + + * Fix some failing tests. + + -- Ximin Luo <infinity0@debian.org> Wed, 18 Jul 2018 09:06:44 -0700 + +rustc (1.27.1+dfsg1-1~exp1) unstable; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Fri, 13 Jul 2018 22:58:02 -0700 + +rustc (1.26.2+dfsg1-1) unstable; urgency=medium + + * New upstream release. + * Stop ignoring tests that now pass. + * Don't ignore tests that still fail, instead raise FAILURES_ALLOWED. + This allows us to see the test failures in the build logs, rather than + hiding them. + + -- Ximin Luo <infinity0@debian.org> Sat, 16 Jun 2018 12:39:59 -0700 + +rustc (1.26.1+dfsg1-3) unstable; urgency=medium + + * Fix build-dep version range to build against myself. + + -- Ximin Luo <infinity0@debian.org> Thu, 31 May 2018 09:25:17 -0700 + +rustc (1.26.1+dfsg1-2) unstable; urgency=medium + + * Also ignore test_loading_cosine on ppc64el. + + -- Ximin Luo <infinity0@debian.org> Wed, 30 May 2018 20:58:46 -0700 + +rustc (1.26.1+dfsg1-1) unstable; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Wed, 30 May 2018 08:18:04 -0700 + +rustc (1.26.0+dfsg1-1~exp4) experimental; urgency=medium + + * Try alternative patch to ignore x86 stdsimd tests suggested by upstream. + * Bump up allowed-test-failures to 8 to account for the fact that we're now + double-counting some failures. + + -- Ximin Luo <infinity0@debian.org> Tue, 29 May 2018 20:36:56 -0700 + +rustc (1.26.0+dfsg1-1~exp3) experimental; urgency=medium + + * Ignore some irrelevant tests on ppc64 and non-x86 platforms. + + -- Ximin Luo <infinity0@debian.org> Tue, 29 May 2018 09:32:38 -0700 + +rustc (1.26.0+dfsg1-1~exp2) experimental; urgency=medium + + * Add Breaks+Replaces for older libstd-rust-dev with codegen-backends. + (Closes: #899180) + * Backport some test and packaging fixes from Ubuntu. + + -- Ximin Luo <infinity0@debian.org> Tue, 22 May 2018 22:00:53 -0700 + +rustc (1.26.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + * Update to latest Standards-Version; no changes required. + * Update doc-base files. (Closes: #876831) + + -- Ximin Luo <infinity0@debian.org> Sun, 20 May 2018 03:11:45 -0700 + +rustc (1.25.0+dfsg1-2) unstable; urgency=medium + + * Add patches for LLVM's compiler-rt to fix bugs on sparc64 and mips64. + (Closes: #898982) + * Install codegen-backends into rustc rather than libstd-rust-dev. + (Closes: #899087) + + -- Ximin Luo <infinity0@debian.org> Sat, 19 May 2018 13:10:33 -0700 + +rustc (1.25.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + * Allow up to 15 test failures on s390x. + * Set CARGO_INCREMENTAL=0 on sparc64. + + -- Ximin Luo <infinity0@debian.org> Fri, 18 May 2018 01:11:15 -0700 + +rustc (1.25.0+dfsg1-1~exp2) experimental; urgency=medium + + * Install missing codegen-backends. + + -- Ximin Luo <infinity0@debian.org> Fri, 06 Apr 2018 14:05:36 -0700 + +rustc (1.25.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + * Update to LLVM 6.0. + + -- Ximin Luo <infinity0@debian.org> Sun, 01 Apr 2018 15:59:47 +0200 + +rustc (1.24.1+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + * Raise allowed-test-failures to 160 on some non-release arches: powerpc, + powerpcspe, sparc64, x32. + + -- Ximin Luo <infinity0@debian.org> Wed, 07 Mar 2018 20:07:27 +0100 + +rustc (1.24.1+dfsg1-1~exp2) experimental; urgency=medium + + * Steal some patches from Fedora to fix some test failures. + * Update debian/patches/u-make-tests-work-without-rpath.patch to try to fix + some more test failures. + + -- Ximin Luo <infinity0@debian.org> Mon, 05 Mar 2018 16:25:26 +0100 + +rustc (1.24.1+dfsg1-1~exp1) experimental; urgency=medium + + * More sparc64 CABI fixes. (Closes: #888757) + * New upstream release. + * Note that s390x baseline was updated in the meantime. (Closes: #851150) + * Include Debian-specific patch to disable kernel helpers on armel. + (Closes: #891902) + * Include missing build-dependencies for pkg.rustc.dlstage0 build profile. + (Closes: #891022) + * Add architecture.mk mapping for armel => armv5te-unknown-linux-gnueabi. + (Closes: #891913) + * Enable debuginfo-only-std on armel as well. (Closes: #891961) + * Backport upstream patch to support powerpcspe. (Closes: #891542) + * Disable full-bootstrap again to work around upstream #48319. + + -- Ximin Luo <infinity0@debian.org> Sat, 03 Mar 2018 14:23:29 +0100 + +rustc (1.23.0+dfsg1-1) unstable; urgency=medium + + * Upload to unstable. + + -- Ximin Luo <infinity0@debian.org> Fri, 19 Jan 2018 11:49:31 +0100 + +rustc (1.23.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + * Update to latest Standards-Version; no changes required. + + -- Ximin Luo <infinity0@debian.org> Sun, 14 Jan 2018 00:08:17 +0100 + +rustc (1.22.1+dfsg1-2) unstable; urgency=medium + + * Fix B-D rustc version so this package can be built using itself. + + -- Ximin Luo <infinity0@debian.org> Mon, 01 Jan 2018 14:27:19 +0100 + +rustc (1.22.1+dfsg1-1) unstable; urgency=medium + + [ Ximin Luo ] + * Remove unimportant files that autoload remote resources from rust-src. + * Fix more symlinks in rust-doc. + * On armhf, only generate debuginfo for libstd and not the compiler itself. + This works around buildds running out of memory, see upstream #45854. + * Update to latest Standards-Version; no changes required. + + [ Chris Coulson ] + * Fix some test failures that occur because we build rust without an rpath. + + -- Ximin Luo <infinity0@debian.org> Mon, 18 Dec 2017 19:46:25 +0100 + +rustc (1.22.1+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release. + * Fix symlink target. (Closes: #877276) + + -- Ximin Luo <infinity0@debian.org> Sat, 25 Nov 2017 22:29:12 +0100 + +rustc (1.21.0+dfsg1-3) unstable; urgency=medium + + * Add/fix detection for sparc64, thanks to John Paul Adrian Glaubitz. + * Workaround FTBFS when building docs. (Closes: #880262) + + -- Ximin Luo <infinity0@debian.org> Mon, 06 Nov 2017 10:03:32 +0100 + +rustc (1.21.0+dfsg1-2) unstable; urgency=medium + + * Upload to unstable. + * Fix bootstrapping using 1.21.0, which is more strict about redundant &mut + previously used in u-output-failed-commands.patch. + * Only allow up to 5 test failures. + + -- Ximin Luo <infinity0@debian.org> Wed, 25 Oct 2017 20:27:30 +0200 + +rustc (1.21.0+dfsg1-1) experimental; urgency=medium + + * New upstream release. + * Fix the "install" target for cross-compilations; cross-compiling with + sbuild --host=$foreign-arch should work again. + * Update to latest Standards-Version; changes: + - Priority changed to optional from extra. + + -- Ximin Luo <infinity0@debian.org> Tue, 17 Oct 2017 00:42:54 +0200 + +rustc (1.20.0+dfsg1-3) unstable; urgency=medium + + * Disable jemalloc to fix FTBFS with 1.21 on armhf. + + -- Ximin Luo <infinity0@debian.org> Wed, 25 Oct 2017 12:01:19 +0200 + +rustc (1.20.0+dfsg1-2) unstable; urgency=medium + + * Update changelog entry for 1.20.0+dfsg1-1 to reflect that it was actually + and accidentally uploaded to unstable. No harm, no foul. + * We are no longer failing the build when tests fail, see NEWS or + README.Debian for details. + * Bump LLVM requirement to fix some failing tests. + + -- Ximin Luo <infinity0@debian.org> Sat, 21 Oct 2017 14:20:17 +0200 + +rustc (1.20.0+dfsg1-1) unstable; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Sun, 15 Oct 2017 23:30:35 +0200 + +rustc (1.19.0+dfsg3-4) unstable; urgency=medium + + * Bump LLVM requirement to pull in a fix for a FTBFS on ppc64el. + + -- Ximin Luo <infinity0@debian.org> Sun, 15 Oct 2017 21:31:03 +0200 + +rustc (1.19.0+dfsg3-3) unstable; urgency=medium + + * Fix a trailing whitespace for tidy. + + -- Ximin Luo <infinity0@debian.org> Tue, 19 Sep 2017 16:09:41 +0200 + +rustc (1.19.0+dfsg3-2) unstable; urgency=medium + + * Upload to unstable. + * Add a patch to print extra information when tests fail. + + -- Ximin Luo <infinity0@debian.org> Tue, 19 Sep 2017 12:32:03 +0200 + +rustc (1.19.0+dfsg3-1) experimental; urgency=medium + + * New upstream release. + * Upgrade to LLVM 4.0. (Closes: #873421) + * rust-src: install Debian patches as well + + -- Ximin Luo <infinity0@debian.org> Fri, 15 Sep 2017 04:02:09 +0200 + +rustc (1.18.0+dfsg1-4) unstable; urgency=medium + + * Support gperf 3.1. (Closes: #869610) + + -- Ximin Luo <infinity0@debian.org> Tue, 25 Jul 2017 23:19:47 +0200 + +rustc (1.18.0+dfsg1-3) unstable; urgency=medium + + * Upload to unstable. + * Disable failing run-make test on armhf. + + -- Ximin Luo <infinity0@debian.org> Sat, 22 Jul 2017 20:30:25 +0200 + +rustc (1.18.0+dfsg1-2) experimental; urgency=medium + + * Update to latest Standards-Version; no changes required. + * Change rustc to Multi-Arch: allowed and update Build-Depends with :native + annotations. Multi-Arch: foreign is typically for arch-indep packages that + might need to satisfy dependency chains of different architectures. Also + update instructions on cross-compiling to match this newer situation. + * Build debugging symbols for non-libstd parts of rustc. + + -- Ximin Luo <infinity0@debian.org> Mon, 17 Jul 2017 23:04:03 +0200 + +rustc (1.18.0+dfsg1-1) experimental; urgency=medium + + * New upstream release. + + -- Ximin Luo <infinity0@debian.org> Tue, 27 Jun 2017 12:51:22 +0200 + +rustc (1.17.0+dfsg2-8) unstable; urgency=medium + + * Workaround for linux #865549, fix FTBFS on ppc64el. + + -- Ximin Luo <infinity0@debian.org> Mon, 17 Jul 2017 13:41:59 +0200 + +rustc (1.17.0+dfsg2-7) unstable; urgency=medium + + * Show exception traceback in bootstrap.py to examine ppc64el build failure. + + -- Ximin Luo <infinity0@debian.org> Wed, 21 Jun 2017 10:46:27 +0200 + +rustc (1.17.0+dfsg2-6) unstable; urgency=medium + + * Upload to unstable. + + -- Ximin Luo <infinity0@debian.org> Wed, 21 Jun 2017 00:24:22 +0200 + +rustc (1.17.0+dfsg2-5) experimental; urgency=medium + + * More work-arounds for armhf test failures. + + -- Ximin Luo <infinity0@debian.org> Fri, 16 Jun 2017 13:27:45 +0200 + +rustc (1.17.0+dfsg2-4) experimental; urgency=medium + + * Fix arch-indep and arch-dep tests. + * Bump the LLVM requirement to fix FTBFS on armhf. + + -- Ximin Luo <infinity0@debian.org> Wed, 14 Jun 2017 21:37:16 +0200 + +rustc (1.17.0+dfsg2-3) experimental; urgency=medium + + * Try to force the real gdb package. Some resolvers like aspcud will select + gdb-minimal under some circumstances, but this causes the debuginfo-gdb + tests to break. + + -- Ximin Luo <infinity0@debian.org> Wed, 14 Jun 2017 00:48:37 +0200 + +rustc (1.17.0+dfsg2-2) experimental; urgency=medium + + * Support and document cross-compiling of rustc itself. + * Document cross-compiling other rust packages such as cargo. + * Work around upstream #39015 by disabling those tests rather than by + disabling optimisation, which causes FTBFS on 1.17.0 ppc64el. See + upstream #42476 and #42532 for details. + + -- Ximin Luo <infinity0@debian.org> Tue, 13 Jun 2017 21:13:31 +0200 + +rustc (1.17.0+dfsg2-1) experimental; urgency=medium + + [ Sylvestre Ledru ] + * New upstream release + + [ Ximin Luo ] + * Adapt packaging for rustbuild, the new upstream cargo-based build system. + + [ Matthijs van Otterdijk ] + * Add a binary package, rust-src. (Closes: #846177) + * Link to local Debian web resources in the docs, instead of remote ones. + + -- Ximin Luo <infinity0@debian.org> Tue, 16 May 2017 18:00:53 +0200 + +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/debian/check-orig-suspicious.sh b/debian/check-orig-suspicious.sh new file mode 100755 index 000000000..b27dbf767 --- /dev/null +++ b/debian/check-orig-suspicious.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -e + +ver="$1" +test -n "$ver" || exit 2 + +SUS_WHITELIST=$(find "${PWD}/debian" -name upstream-tarball-unsuspicious.txt -type f) + +rm -rf rustc-${ver/*~*/beta}-src/ +tar xf ../rustc_$ver+dfsg1.orig.tar.xz && cd rustc-${ver/*~*/beta}-src/ + +# TODO: remove this code snippet after it gets into our cargo +# Strip comments & blank lines before testing rust source code - +# some authors like to write really long comments +find . -name '*.rs' -execdir sed -i -e '\,^\s*//,d' -e '/^\s*$/d' '{}' \; + +/usr/share/cargo/scripts/audit-vendor-source \ + "$SUS_WHITELIST" \ + "Files-Excluded: in debian/copyright and run a repack." \ + -m text/x-script.python \ + -m application/csv + +echo "Artifacts left in rustc-$ver-src, please remove them yourself." diff --git a/debian/config.toml.in b/debian/config.toml.in new file mode 100644 index 000000000..899d8ebeb --- /dev/null +++ b/debian/config.toml.in @@ -0,0 +1,71 @@ +changelog-seen = 2 + +[build] +submodules = false +vendor = true +locked-deps = false +verbose = VERBOSITY + +rustc = "RUST_DESTDIR/usr/bin/rustc" +cargo = "RUST_DESTDIR/usr/bin/cargo" + +build = "DEB_BUILD_RUST_TYPE" +host = ["DEB_HOST_RUST_TYPE"] +target = ["DEB_TARGET_RUST_TYPE"] + +#full-bootstrap = true +# originally needed to work around #45317 but no longer necessary +# currently we have to omit it because it breaks #48319 + +# this might get changed later by override_dh_auto_configure-indep +# we do it this way to avoid spurious rebuilds +docs = false + +extended = true +tools = ["clippy", "rustfmt"] + +[install] +prefix = "/usr" + +[target.DEB_BUILD_RUST_TYPE] +llvm-config = "LLVM_DESTDIR/usr/lib/llvm-LLVM_VERSION/bin/llvm-config" +linker = "DEB_BUILD_GNU_TYPE-gcc" + +ifelse(DEB_BUILD_RUST_TYPE,DEB_HOST_RUST_TYPE,, +[target.DEB_HOST_RUST_TYPE] +llvm-config = "LLVM_DESTDIR/usr/lib/llvm-LLVM_VERSION/bin/llvm-config" +linker = "DEB_HOST_GNU_TYPE-gcc" + +)dnl +ifelse(DEB_BUILD_RUST_TYPE,DEB_TARGET_RUST_TYPE,,DEB_HOST_RUST_TYPE,DEB_TARGET_RUST_TYPE,, +[target.DEB_TARGET_RUST_TYPE] +llvm-config = "LLVM_DESTDIR/usr/lib/llvm-LLVM_VERSION/bin/llvm-config" +linker = "DEB_TARGET_GNU_TYPE-gcc" + +)dnl +[target.wasm32-wasi] +wasi-root = "/usr" + +[llvm] +link-shared = true + +[rust] +jemalloc = false +optimize = MAKE_OPTIMISATIONS +dist-src = false + +channel = "RELEASE_CHANNEL" + +# parallel codegen interferes with reproducibility, see +# https://github.com/rust-lang/rust/issues/34902#issuecomment-319463586 +#codegen-units = 0 +debuginfo-level = 2 +debuginfo-level-std = 2 +rpath = false +# see also d-custom-debuginfo-path.patch +remap-debuginfo = true + +verbose-tests = true +backtrace-on-ice = true + +deny-warnings = false diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..2b059591b --- /dev/null +++ b/debian/control @@ -0,0 +1,345 @@ +Source: rustc +Section: devel +Priority: optional +Maintainer: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Uploaders: + Ximin Luo <infinity0@debian.org>, + Sylvestre Ledru <sylvestre@debian.org>, + Fabian Grünbichler <debian@fabian.gruenbichler.email> +Rules-Requires-Root: no +# :native annotations are to support cross-compiling, see README.Debian +Build-Depends: + debhelper (>= 9), + debhelper-compat (= 13), + dpkg-dev (>= 1.17.14), + python3:native, + cargo:native (>= 0.60.0) <!pkg.rustc.dlstage0>, + rustc:native (>= 1.63.0+dfsg) <!pkg.rustc.dlstage0>, + rustc:native (<= 1.64.0++) <!pkg.rustc.dlstage0>, + llvm-14-dev:native, + llvm-14-tools:native, + gcc-mingw-w64-x86-64-posix:native [amd64] <!nowindows>, + gcc-mingw-w64-i686-posix:native [i386] <!nowindows>, + libllvm14 (>= 1:14.0.0), + cmake (>= 3.0) | cmake3, +# needed by some vendor crates + pkg-config, +# this is sometimes needed by rustc_llvm + zlib1g-dev:native, + zlib1g-dev, +# used by rust-installer + liblzma-dev:native, +# test dependencies: + binutils (>= 2.26) <!nocheck> | binutils-2.26 <!nocheck>, + git <!nocheck>, + procps <!nocheck>, +# below are optional tools even for 'make check' + gdb (>= 7.12) <!nocheck>, +# Extra build-deps needed for x.py to download stuff in pkg.rustc.dlstage0. + curl <pkg.rustc.dlstage0>, + ca-certificates <pkg.rustc.dlstage0>, +Build-Depends-Indep: + wasi-libc (>= 0.0~git20220510.9886d3d~~) <!nowasm>, + wasi-libc (<= 0.0~git20220510.9886d3d++) <!nowasm>, + clang-14:native, +Build-Conflicts: gdb-minimal <!nocheck> +Standards-Version: 4.2.1 +Homepage: http://www.rust-lang.org/ +Vcs-Git: https://salsa.debian.org/rust-team/rust.git +Vcs-Browser: https://salsa.debian.org/rust-team/rust + +Package: rustc +Architecture: any +Multi-Arch: allowed +Pre-Depends: ${misc:Pre-Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, + libstd-rust-dev (= ${binary:Version}), + gcc, libc-dev, binutils (>= 2.26) +Recommends: + cargo (>= 0.65.0~~), cargo (<< 0.66.0~~), +# llvm is needed for llvm-dwp for -C split-debuginfo=packed + llvm-14, +Suggests: +# lld and clang are needed for wasm compilation + lld-14, clang-14, +Replaces: libstd-rust-dev (<< 1.25.0+dfsg1-2~~) +Breaks: libstd-rust-dev (<< 1.25.0+dfsg1-2~~) +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.64 +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, + needed to run dynamically-linked Rust programs (-C prefer-dynamic). + +Package: libstd-rust-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, ${misc:Depends}, + libstd-rust-1.64 (= ${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 for the standard Rust libraries, + needed to compile Rust programs. It may also be installed on a system + of another host architecture, for cross-compiling to this architecture. + +Package: libstd-rust-dev-windows +Section: libdevel +Architecture: amd64 i386 +Multi-Arch: same +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: + gcc-mingw-w64-x86-64-posix [amd64], + gcc-mingw-w64-i686-posix [i386], +Build-Profiles: <!nowindows> +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 the standard Rust libraries including development files, + needed to cross-compile Rust programs to the *-pc-windows-gnu target + corresponding to the architecture of this package. + +Package: libstd-rust-dev-wasm32 +Section: libdevel +Architecture: all +Multi-Arch: foreign +Depends: ${shlibs:Depends}, ${misc:Depends} +# Embeds wasi-libc so doesn't need to depend on it +# None of its licenses require source redistrib, so no need for Built-Using +Recommends: + lld-14, clang-14, +Suggests: +# nodejs contains wasi-node for running the program + nodejs (>= 12.16), +Build-Profiles: <!nowasm> +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 the standard Rust libraries including development files, + needed to cross-compile Rust programs to the wasm32-unknown-unknown and + wasm32-wasi targets. + +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-14, ${misc:Depends}, python3-lldb-14 +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, libjs-highlight.js, libjs-mathjax, + fonts-open-sans, fonts-font-awesome +Recommends: cargo-doc +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. + +Package: rust-src +Architecture: all +Depends: ${misc:Depends} +Description: Rust systems programming language - source code + 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 sources of the Rust compiler and standard + libraries, useful for IDEs and code analysis tools such as Racer. + +Package: rust-clippy +Architecture: any +Multi-Arch: allowed +Depends: ${misc:Depends}, ${shlibs:Depends}, + libstd-rust-1.64 (= ${binary:Version}) +Recommends: cargo +Description: Rust linter + 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 'clippy', a linter to catch common mistakes and improve + your Rust code as well a collection of over 400 compatible lints. + . + Lints are divided into categories, each with a default lint level. You can + choose how much Clippy is supposed to annoy help you by changing the lint + level by category. + . + Clippy is integrated into the 'cargo' build tool, available via 'cargo clippy'. + +Package: rustfmt +Architecture: any +Multi-Arch: allowed +Depends: ${misc:Depends}, ${shlibs:Depends}, +Recommends: cargo +Description: Rust formatting helper + 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 'rustfmt', a tool for formatting Rust code according to + style guidelines, as well as 'cargo-fmt', a helper enabling running rustfmt + directly with 'cargo fmt'. + +Package: rust-all +Architecture: all +Depends: ${misc:Depends}, ${shlibs:Depends}, + rustc (>= ${binary:Version}), + rustfmt (>= ${binary:Version}), + rust-clippy (>= ${binary:Version}), + rust-gdb (>= ${binary:Version}) | rust-lldb (>= ${binary:Version}), + cargo, +Recommends: + cargo (>= 0.65.0~~), cargo (<< 0.66.0~~) +Suggests: + rust-doc (>= ${binary:Version}), + rust-src (>= ${binary:Version}), + libstd-rust-dev-wasm32 (>= ${binary:Version}), + libstd-rust-dev-windows (>= ${binary:Version}), +Description: Rust systems programming language - all developer tools + 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 is an empty metapackage that depends on all developer tools + in the standard rustc distribution that have been packaged for Debian. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..03380c208 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,2378 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: rust +Source: https://www.rust-lang.org +Files-Excluded: + *.min.js + src/llvm-project +# Pre-generated docs + src/tools/rustfmt/docs +# Fonts already in Debian, covered by d-0003-mdbook-strip-embedded-libs.patch + vendor/mdbook/src/theme/fonts + vendor/mdbook/src/theme/FontAwesome + vendor/mdbook/src/theme/highlight.js + vendor/mdbook/src/theme/highlight.css +# Exclude submodules https://github.com/rust-lang/rust/tree/master/src/tools +# We prefer to do them in different Debian packages so they can have their own +# version numbers. If upstream merges them "properly" (i.e. unify the version +# numbers) then we can merge the packages in Debian. Note that cargotest here +# does actually belong to rustc, it is an integration test suite for rustc to +# check that certain popular crates continue to compile. It is not the same as +# cargo's own test suite (in its own package) also called cargotest. +# NB: don't exclude rust-installer, it's needed for "install" functionality + src/tools/cargo + src/tools/rls + src/tools/remote-test-client + src/tools/remote-test-server + src/tools/miri +# rust-analyzer parts we don't need (yet) + src/tools/rust-analyzer/editors + src/tools/rust-analyzer/.github +# Embedded GH pages + src/tools/clippy/util/gh-pages +# Embedded C libraries + vendor/lzma-sys*/xz-* +# Embedded binary blobs + vendor/jsonpath_lib/docs + vendor/mdbook/src/theme/playground_editor + vendor/psm/src/arch/wasm32.o + vendor/rustix/src/imp/linux_raw/arch/outline/*/*.a + vendor/winapi-*/*/*.a +# Embedded submodule used for CI + library/stdarch/crates/intrinsic-test/acle +# unused dependencies, generated by debian/prune-unused-deps +# DO NOT EDIT below, AUTOGENERATED + vendor/ahash-0.7.4 + vendor/anyhow-1.0.56 + vendor/anyhow-1.0.58 + vendor/anymap + vendor/arbitrary + vendor/ar + vendor/arrayvec-0.7.0 + vendor/backtrace-0.3.65 + vendor/bitmaps + vendor/byteorder-1.3.4 + vendor/bytesize + vendor/cc-1.0.69 + vendor/chalk-derive + vendor/chalk-ir + vendor/chalk-recursive + vendor/chalk-solve + vendor/color-eyre + vendor/color-spantrace + vendor/combine + vendor/commoncrypto + vendor/commoncrypto-sys + vendor/concolor + vendor/concolor-query + vendor/content_inspector + vendor/core-foundation + vendor/core-foundation-sys-0.8.0 + vendor/cpufeatures-0.2.1 + vendor/cranelift-bforest + vendor/cranelift-codegen + vendor/cranelift-codegen-meta + vendor/cranelift-codegen-shared + vendor/cranelift-entity + vendor/cranelift-frontend + vendor/cranelift-isle + vendor/cranelift-jit + vendor/cranelift-module + vendor/cranelift-native + vendor/cranelift-object + vendor/crossbeam-channel-0.5.4 + vendor/crossbeam-epoch-0.9.6 + vendor/crossbeam-epoch-0.9.8 + vendor/crossbeam-utils-0.8.8 + vendor/crypto-common-0.1.2 + vendor/crypto-hash + vendor/curl + vendor/curl-sys + vendor/derive_arbitrary + vendor/derive_more + vendor/diff-0.1.12 + vendor/difference + vendor/digest-0.10.2 + vendor/directories + vendor/dot + vendor/dunce + vendor/either-1.6.0 + vendor/either-1.6.1 + vendor/enum-iterator + vendor/enum-iterator-derive + vendor/expect-test-1.0.1 + vendor/eyre + vendor/filetime-0.2.14 + vendor/filetime-0.2.16 + vendor/flate2-1.0.16 + vendor/foreign-types + vendor/foreign-types-shared + vendor/fsevent-sys + vendor/fs_extra-1.1.0 + vendor/fs_extra + vendor/fst-0.4.5 + vendor/fst + vendor/futures-0.1.31 + vendor/fwdansi + vendor/fxhash + vendor/generic-array-0.14.4 + vendor/getrandom-0.2.0 + vendor/getset + vendor/git2 + vendor/git2-curl + vendor/globset-0.4.8 + vendor/hashbrown-0.11.2 + vendor/hashbrown-0.12.1 + vendor/heck-0.3.3 + vendor/hex-0.3.2 + vendor/hex-0.4.2 + vendor/idna-0.1.5 + vendor/idna-0.2.0 + vendor/im-rc + vendor/indenter + vendor/inotify + vendor/inotify-sys + vendor/itertools-0.10.1 + vendor/jemalloc-sys + vendor/jod-thread + vendor/json + vendor/jsonrpc-client-transports + vendor/jsonrpc-core + vendor/jsonrpc-core-client + vendor/jsonrpc-derive + vendor/jsonrpc-ipc-server + vendor/jsonrpc-pubsub + vendor/jsonrpc-server-utils + vendor/kqueue + vendor/kqueue-sys + vendor/kstring + vendor/lazycell + vendor/libgit2-sys + vendor/libloading-0.6.7 + vendor/libloading-0.7.1 + vendor/libmimalloc-sys + vendor/libnghttp2-sys + vendor/libssh2-sys + vendor/libz-sys + vendor/linked-hash-map + vendor/log-0.4.14 + vendor/lsp-codec + vendor/lsp-types-0.60.0 + vendor/lzma-sys-0.1.16 + vendor/mach + vendor/matches-0.1.8 + vendor/memchr-2.4.1 + vendor/mimalloc + vendor/mio-0.7.14 + vendor/mio + vendor/normalize-line-endings + vendor/notify + vendor/ntapi-0.3.6 + vendor/object-0.28.4 + vendor/once_cell-1.10.0 + vendor/once_cell-1.12.0 + vendor/oorandom + vendor/openssl + vendor/openssl-probe + vendor/openssl-src + vendor/openssl-sys + vendor/ordslice + vendor/os_info + vendor/owo-colors + vendor/parity-tokio-ipc + vendor/paste + vendor/percent-encoding-1.0.1 + vendor/pin-project-lite-0.2.8 + vendor/pkg-config-0.3.18 + vendor/pretty_assertions + vendor/pretty_env_logger + vendor/proc-macro2-1.0.37 + vendor/proc-macro2-1.0.39 + vendor/proc-macro-crate + vendor/pulldown-cmark-0.9.1 + vendor/pulldown-cmark-to-cmark + vendor/quote-1.0.18 + vendor/rand_xoshiro-0.4.0 + vendor/redox_syscall-0.2.10 + vendor/regalloc2 + vendor/region + vendor/rls-vfs + vendor/rustc_version + vendor/ryu-1.0.5 + vendor/salsa + vendor/salsa-macros + vendor/schannel + vendor/security-framework + vendor/security-framework-sys + vendor/serde-1.0.137 + vendor/serde-1.0.138 + vendor/serde_derive-1.0.137 + vendor/serde_derive-1.0.138 + vendor/serde_ignored + vendor/serde_json-1.0.81 + vendor/serde_repr-0.1.6 + vendor/sha2-0.10.1 + vendor/sharded-slab-0.1.1 + vendor/signal-hook-registry + vendor/similar + vendor/sized-chunks + vendor/slice-group-by + vendor/smallvec-1.8.1 + vendor/snap-1.0.1 + vendor/snapbox + vendor/snapbox-macros + vendor/socket2 + vendor/static_assertions + vendor/strip-ansi-escapes + vendor/syn-1.0.91 + vendor/syn-1.0.95 + vendor/target-lexicon + vendor/threadpool + vendor/tikv-jemallocator + vendor/tikv-jemalloc-ctl + vendor/tikv-jemalloc-sys + vendor/tinyvec-0.3.4 + vendor/tokio-stream + vendor/tokio-util + vendor/toml-0.5.7 + vendor/toml_edit + vendor/tower-service + vendor/tracing-0.1.29 + vendor/tracing-attributes-0.1.18 + vendor/tracing-core-0.1.21 + vendor/tracing-error + vendor/tracing-log-0.1.2 + vendor/tracing-subscriber-0.3.3 + vendor/tracing-tree-0.2.0 + vendor/typed-arena + vendor/typenum-1.12.0 + vendor/unicode-bidi-0.3.4 + vendor/unicode-ident-1.0.0 + vendor/unicode-normalization-0.1.13 + vendor/unicode-width-0.1.8 + vendor/unicode-xid-0.2.2 + vendor/url-1.7.2 + vendor/utf8parse + vendor/vcpkg + vendor/vergen + vendor/version_check-0.9.3 + vendor/vte + vendor/xattr-0.2.2 + vendor/yaml-merge-keys + vendor/yaml-rust + vendor/yansi +# DO NOT EDIT above, AUTOGENERATED + +Files: C*.md + R*.md + Cargo.lock + Cargo.toml + COPYRIGHT + LICENSE* + compiler/* + configure + config.toml.example + git-commit-hash + library/* + src/README.md + src/bootstrap/* + src/ci/* + src/doc/* + src/etc/* + src/lib* + src/rust* + src/stage0.json + src/tools/* + src/test/* + src/version + version + x.py + .cargo/config.toml +Copyright: 2006-2009 Graydon Hoare + 2009-2012 Mozilla Foundation + 2012-2017 The Rust Project Developers (see AUTHORS.txt) +License: MIT or Apache-2.0 + +Files: src/librustdoc/html/static/fonts/FiraSans* +Copyright: 2014, Mozilla Foundation, 2014, Telefonica S.A. +License: SIL-OPEN-FONT + +Files: src/librustdoc/html/static/fonts/NanumBarun* +Copyright: 2010 NAVER Corporation +License: SIL-OPEN-FONT + +Files: src/librustdoc/html/static/fonts/SourceCodePro* +Copyright: 2010, 2012 Adobe Systems Incorporated +License: SIL-OPEN-FONT + +Files: src/librustdoc/html/static/fonts/SourceSerif4* +Copyright: 2014-2021 Adobe Systems Incorporated +License: SIL-OPEN-FONT + +Files: vendor/compiler_builtins/* +Copyright: 2016-2019 Jorge Aparicio <japaricious@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/rust-lang-nursery/compiler-builtins + +Files: vendor/compiletest_rs/* +Copyright: 2015-2020 The Rust Project Developers + 2015-2020 Thomas Bracht Laumann Jespersen <laumann.thomas@gmail.com> + 2015-2020 Manish Goregaokar <manishsmail@gmail.com> +License: Apache-2.0 or MIT +Comment: see https://github.com/laumann/compiletest-rs + +Files: vendor/ahash/* +Copyright: 2019-2022 Tom Kaitchuck <Tom.Kaitchuck@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/tkaitchuck/ahash + +Files: vendor/askama*/* +Copyright: 2016-2022 Dirkjan Ochtman +License: MIT OR Apache-2.0 +Comment: see https://github.com/djc/askama + +Files: + vendor/bitflags/* + vendor/cc/* + vendor/cmake/* + vendor/env_logger-0*/* + vendor/env_logger/* + vendor/getopts/* + vendor/glob/* + vendor/libc/* + vendor/log/* + vendor/regex/* + vendor/regex-syntax/* + vendor/rustc-hash/* + vendor/time/* +Copyright: 2010-2021 The Rust Project Developers +License: MIT or Apache-2.0 +Comment: + This is a collection of external crates embedded here to bootstrap cargo. + Most of them come from the original upstream Rust project, thus share the + same MIT/Apache-2.0 dual-license. See https://github.com/rust-lang. + Exceptions are noted below. + +Files: vendor/core-foundation-sys/* +Copyright: 2012-2022 The Servo Project Developers +License: MIT or Apache-2.0 +Comment: see https://github.com/servo/core-foundation-rs + +Files: vendor/num-integer/* + vendor/num-traits/* +Copyright: 2014-2018 The Rust Project Developers +License: MIT or Apache-2.0 +Comment: see https://github.com/rust-num/num + +Files: + vendor/string_cache/* + vendor/string_cache_codegen/* + vendor/unicode-bidi/* +Copyright: 2015-2017 Alex Crichton <alex@alexcrichton.com> + 2015-2017 Keegan McAllister <kmcallister@mozilla.com> + 2015-2017 Chris Morgan <me@chrismorgan.info> + 2014-2017 The html5ever Project Developers + 2014-2017 The Servo Project Developers + 2013-2017 Simon Sapin <simon.sapin@exyr.org> +License: MIT or Apache-2.0 +Comment: see https://github.com/servo/ + +Files: + vendor/getrandom/* + vendor/getrandom-0*/* + vendor/rand/* + vendor/rand-0*/* + vendor/rand_chacha/* + vendor/rand_chacha-0*/* + vendor/rand_core/* + vendor/rand_core-0*/* + vendor/rand_hc/* + vendor/rand_xorshift/* + vendor/rand_xoshiro/* +Copyright: 2010-2019 The Rand Project Developers + 2010-2019 The Rust Project Developers +License: MIT or Apache-2.0 +Comment: + see https://github.com/rust-random/getrandom + see https://github.com/rust-random/rand + see https://github.com/rust-random/small-rngs + +Files: + vendor/cfg-if-0*/* + vendor/cfg-if/* + vendor/filetime/* + vendor/flate2/* + vendor/fnv/* + vendor/jobserver/* + vendor/lzma-sys/* + vendor/pkg-config/* + vendor/proc-macro2/* + vendor/rustc-demangle/* + vendor/scoped-tls/* + vendor/tar/* + vendor/toml/* + vendor/xz2/* +Copyright: 2014-2020 Alex Crichton <alex@alexcrichton.com> + 2015-2017 The Rust Project Developers +License: MIT or Apache-2.0 +Comment: see https://github.com/alexcrichton/ + +Files: vendor/dlmalloc/* +Copyright: 2017-2019 Alex Crichton <alex@alexcrichton.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/alexcrichton/dlmalloc-rs + +Files: vendor/dlmalloc/src/dlmalloc.c +Copyright: 2000-2012 Doug Lea <dl@cs.oswego.edu> +License: CC0-1.0 + +Files: vendor/tester/* +Copyright: 2016-2019 The Rust Project Developers +License: MIT OR Apache-2.0 +Comment: see https://github.com/messense/rustc-test + +Files: + vendor/addr2line/* + vendor/addr2line-0*/* +Copyright: + 2016-2021 Nick Fitzgerald <fitzgen@gmail.com> + 2016-2021 Philip Craig <philipjcraig@gmail.com> + 2016-2021 Jon Gjengset <jon@thesquareplanet.com> + 2016-2021 Noah Bergbauer <noah.bergbauer@tum.de> +License: Apache-2.0 or MIT +Comment: see https://github.com/gimli-rs/addr2line + +Files: + vendor/adler/* + vendor/adler-0.2.3/* +Copyright: 2020-2021 Jonas Schievink <jonasschievink@gmail.com> +License: 0BSD or MIT or Apache-2.0 +Comment: see https://github.com/jonas-schievink/adler.git + +Files: vendor/always-assert/* +Copyright: 2021-2021 Aleksey Kladov <aleksey.kladov@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/matklad/always-assert + +Files: vendor/ammonia/* +Copyright: 2015-2018 Michael Howell <michael@notriddle.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/notriddle/ammonia + +Files: + vendor/annotate-snippets/* + vendor/annotate-snippets-0.8.0/* +Copyright: 2018-2020 Zibi Braniecki <gandalf@mozilla.com> +License: Apache-2.0 or MIT +Comment: see https://github.com/zbraniecki/annotate-snippets-rs + +Files: vendor/ansi_term/* +Copyright: + 2014-2020 ogham@bsago.me + 2014-2020 Ryan Scheel (Havvy) <ryan.havvy@gmail.com> + 2014-2020 Josh Triplett <josh@joshtriplett.org> +License: MIT +Comment: see https://github.com/ogham/rust-ansi-term + +Files: vendor/aho-corasick/* + vendor/memchr/* +Copyright: 2015 Andrew Gallant <jamslam@gmail.com> + 2015-2018 bluss +License: MIT or Unlicense +Comment: see upstream projects, + * https://github.com/BurntSushi/aho-corasick + * https://github.com/BurntSushi/rust-memchr + +Files: vendor/array_tool/* +Copyright: 2015-2018 Daniel P. Clark <6ftdan@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/danielpclark/array_tool + +Files: vendor/autocfg/* +Copyright: 2018-2020 Josh Stone <cuviper@gmail.com> +License: Apache-2.0 or MIT + +Files: vendor/atty/* +Copyright: 2015-2017 softprops <d.tangren@gmail.com> +License: MIT +Comment: see https://github.com/softprops/atty + +Files: vendor/backtrace/* +Copyright: 2015-2022 The Rust Project Developers +License: MIT or Apache-2.0 +Comment: see https://github.com/rust-lang/backtrace-rs + +Files: + vendor/block-buffer/* + vendor/block-buffer-0*/* + vendor/block-padding/* + vendor/byte-tools/* + vendor/digest/* + vendor/digest-0*/* + vendor/fake-simd/* + vendor/md-5/* + vendor/opaque-debug/* + vendor/sha-1-0*/* + vendor/sha-1/* + vendor/sha2/* +Copyright: 2016-2020 RustCrypto Developers +License: MIT or Apache-2.0 +Comment: + see https://github.com/RustCrypto/hashes + see https://github.com/RustCrypto/traits + see https://github.com/RustCrypto/utils + +Files: vendor/bstr/* +Copyright: 2018-2020 Andrew Gallant <jamslam@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/BurntSushi/bstr + +Files: vendor/bytecount/* +Copyright: 2016-2020 Andre Bogus <bogusandre@gmail.de> + 2016-2020 Joshua Landau <joshua@landau.ws> +License: Apache-2.0 or MIT +Comment: see https://github.com/llogiq/bytecount + +Files: + vendor/byteorder/* + vendor/globset/* + vendor/ignore/* + vendor/same-file/* + vendor/termcolor/* + vendor/walkdir/* + vendor/winapi-util/* +Copyright: 2015-2020 Andrew Gallant <jamslam@gmail.com> +License: Unlicense or MIT +Comment: + see https://github.com/BurntSushi/byteorder + see https://github.com/BurntSushi/same-file + see https://github.com/BurntSushi/walkdir + see https://github.com/BurntSushi/winapi-util + see https://github.com/BurntSushi/ripgrep/tree/master/globset + see https://github.com/BurntSushi/ripgrep/tree/master/ignore + see https://github.com/BurntSushi/ripgrep/tree/master/termcolor + +Files: vendor/camino/* +Copyright: 2020-2022 Without Boats <saoirse@without.boats> + 2020-2022 Ashley Williams <ashley666ashley@gmail.com> + 2020-2022 Steve Klabnik <steve@steveklabnik.com> + 2020-2022 Rain <rain@sunshowers.io> +License: MIT OR Apache-2.0 +Comment: see https://github.com/withoutboats/camino + +Files: + vendor/cargo_metadata/* + vendor/cargo_metadata-0.14.0/* +Copyright: 2016-2020 Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> +License: MIT +Comment: + see https://github.com/oli-obk/cargo_metadata + +Files: vendor/cargo-platform/* +Copyright: 2019-2022 The Cargo Project Developers +License: MIT OR Apache-2.0 +Comment: see https://github.com/rust-lang/cargo + +Files: vendor/ppv-lite86/* +Copyright: 2019-2019 The CryptoCorrosion Contributors +License: MIT or Apache-2.0 +Comment: see https://github.com/cryptocorrosion/cryptocorrosion + +Files: + vendor/chalk-derive-0.80.0/* + vendor/chalk-engine/* + vendor/chalk-ir-0.80.0/* + vendor/chalk-solve-0.80.0/* +Copyright: + 2015-2022 Rust Compiler Team + 2015-2022 Chalk developers +License: Apache-2.0 or MIT +Comment: see https://github.com/rust-lang/chalk + +Files: vendor/chrono/* +Copyright: 2014-2018 Kang Seonghoon <public+rust@mearie.org> +License: MIT or Apache-2.0 +Comment: see https://github.com/chronotope/chrono + +Files: + vendor/clap/* + vendor/clap_complete/* + vendor/clap_derive/* + vendor/clap_lex/* +Copyright: 2015-2022 Kevin K. <kbknapp@gmail.com> +License: MIT +Comment: see https://github.com/clap-rs/clap + +Files: vendor/colored/* +Copyright: 2016-2020 Thomas Wickham <mackwic@gmail.com> +License: MPL-2.0 +Comment: see https://github.com/mackwic/colored + +Files: vendor/countme/* +Copyright: 2021-2022 Aleksey Kladov <aleksey.kladov@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/matklad/countme + +Files: vendor/cov-mark/* +Copyright: 2020-2021 Aleksey Kladov <aleksey.kladov@gmail.com> + 2020-2021 Simonas Kazlauskas <cov-mark@kazlauskas.me> +License: MIT OR Apache-2.0 +Comment: see https://github.com/matklad/cov-mark + +Files: vendor/crc32fast/* +Copyright: 2018-2019 Sam Rijs <srijs@airpost.net> + 2018-2019 Alex Crichton <alex@alexcrichton.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/srijs/rust-crc32fast + +Files: + vendor/crossbeam/* + vendor/crossbeam-channel/* + vendor/crossbeam-deque/* + vendor/crossbeam-epoch/* + vendor/crossbeam-queue/* + vendor/crossbeam-utils/* +Copyright: 2015-2022 The Crossbeam Project Developers +License: MIT or Apache-2.0 +Comment: see https://github.com/crossbeam-rs + +Files: vendor/cstr/* +Copyright: 2018-2020 Xidorn Quan <me@upsuper.org> +License: MIT +Comment: see https://github.com/upsuper/cstr + +Files: vendor/ctor/* +Copyright: 2018-2020 Matt Mastracci <matthew@mastracci.com> +License: Apache-2.0 OR MIT +Comment: see https://github.com/mmastrac/rust-ctor + +Files: vendor/dashmap/* +Copyright: 2019-2022 Acrimon <joel.wejdenstal@gmail.com> +License: MIT +Comment: see https://github.com/xacrimon/dashmap + +Files: vendor/datafrog/* +Copyright: + 2018 Frank McSherry <fmcsherry@me.com> + 2018 The Rust Project Developers + 2018 Datafrog Developers +License: Apache-2.0 or MIT +Comment: see https://github.com/rust-lang-nursery/datafrog + +Files: vendor/derive-new/* +Copyright: 2016-2020 Nick Cameron <ncameron@mozilla.com> +License: MIT +Comment: see https://github.com/nrc/derive-new + +Files: vendor/diff/* +Copyright: 2015-2017 Utkarsh Kukreti <utkarshkukreti@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/utkarshkukreti/diff.rs + +Files: + vendor/anyhow/* + vendor/dissimilar/* + vendor/itoa/* + vendor/quote/* + vendor/syn/* + vendor/unicode-ident/* +Copyright: 2016-2022 David Tolnay <dtolnay@gmail.com> +License: MIT or Apache-2.0 +Comment: + see https://github.com/dtolnay/anyhow + see https://github.com/dtolnay/dissimilar + see https://github.com/dtolnay/itoa + see https://github.com/dtolnay/quote + see https://github.com/dtolnay/syn + see https://github.com/dtolnay/unicode-ident + +Files: + vendor/arrayvec/* + vendor/either/* + vendor/fixedbitset/* + vendor/itertools/* + vendor/maplit/* + vendor/scopeguard/* +Copyright: 2014-2020 bluss +License: MIT or Apache-2.0 +Comment: + see https://github.com/bluss/rust-itertools + see https://github.com/bluss/either + see https://github.com/bluss/arrayvec + see https://github.com/bluss/fixedbitset + see https://github.com/bluss/maplit + see https://github.com/bluss/scopeguard + +Files: + vendor/dirs/* + vendor/dirs-sys/* +Copyright: 2015-2020 Simon Ochsenreither <simon@ochsenreither.de> + 2015-2020 dirs-rs contributors +License: MIT OR Apache-2.0 +Comment: + see https://github.com/dirs-dev/dirs-rs + see https://github.com/dirs-dev/dirs-sys-rs + +Files: + vendor/dirs-next/* + vendor/dirs-sys-next/* +Copyright: 2017-2021 The @xdg-rs members +License: MIT OR Apache-2.0 +Comment: see https://github.com/xdg-rs/dirs + +Files: vendor/drop_bomb/* +Copyright: 2018-2020 Aleksey Kladov <aleksey.kladov@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/matklad/drop_bomb + +Files: vendor/elasticlunr-rs/* +Copyright: 2017-2018 Matt Ickstadt <mattico8@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/mattico/elasticlunr-rs + +Files: vendor/ena/* +Copyright: 2015-2020 Niko Matsakis <niko@alum.mit.edu> +License: MIT or Apache-2.0 +Comment: see https://github.com/nikomatsakis/ena + +Files: vendor/errno/* +Copyright: 2015-2022 Chris Wong <lambda.fairy@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/lambda-fairy/rust-errno + +Files: vendor/errno-dragonfly/* +Copyright: 2017-2021 Michael Neumann <mneumann@ntecs.de> +License: MIT +Comment: see https://github.com/mneumann/errno-dragonfly-rs + +Files: vendor/expect-test/* +Copyright: 2020-2022 rust-analyzer developers +License: MIT OR Apache-2.0 +Comment: see https://github.com/rust-analyzer/expect-test + +Files: vendor/fallible-iterator/* +Copyright: 2016-2019 Steven Fackler <sfackler@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/sfackler/rust-fallible-iterator + +Files: vendor/fd-lock/* +Copyright: 2019-2022 Yoshua Wuyts <yoshuawuyts@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/yoshuawuyts/fd-lock + +Files: + vendor/fluent-bundle/* + vendor/fluent-syntax/* + vendor/intl-memoizer/* +Copyright: 2016-2022 Zibi Braniecki <gandalf@mozilla.com> + 2016-2022 Staś Małolepszy <stas@mozilla.com> + 2016-2022 Manish Goregaokar <manishsmail@gmail.com> +License: Apache-2.0 or MIT +Comment: see https://github.com/projectfluent/fluent-rs + +Files: vendor/fluent-langneg/* +Copyright: 2017-2021 Zibi Braniecki <gandalf@mozilla.com> +License: Apache-2.0 +Comment: see https://github.com/projectfluent/fluent-langneg-rs + +Files: vendor/fortanix-sgx-abi/* +Copyright: 2015-2019 Jethro Beekman <jethro@fortanix.com> +License: MPL-2.0 +Comment: see https://github.com/fortanix/rust-sgx + +Files: vendor/fs-err/* +Copyright: 2020-2020 Andrew Hickman <andrew.hickman1@sky.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/andrewhickman/fs-err + +Files: vendor/futf/* +Copyright: 2015-2018 Keegan McAllister <kmcallister@mozilla.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/servo/futf + +Files: + vendor/generic-array/* + vendor/generic-array-0*/* +Copyright: + 2015-2020 Bartłomiej Kamiński <fizyk20@gmail.com> + 2015-2020 Aaron Trent <novacrazy@gmail.com> +License: MIT +Comment: see https://github.com/fizyk20/generic-array.git + +Files: + vendor/gimli-0*/* + vendor/gimli/* +Copyright: + 2016-2021 Nick Fitzgerald <fitzgen@gmail.com> + 2016-2021 Philip Craig <philipjcraig@gmail.com> +License: Apache-2.0 or MIT +Comment: see https://github.com/gimli-rs/gimli + +Files: vendor/gsgdt/* +Copyright: 2020 Vishnunarayan K I <appukuttancr@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/vn-ki/gsgdt-rs + +Files: vendor/handlebars/* +Copyright: 2014-2017 Ning Sun <sunng@about.me> +License: MIT +Comment: see https://github.com/sunng87/handlebars-rust + +Files: vendor/heck/* +Copyright: 2017-2018 Without Boats <woboats@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/withoutboats/heck + +Files: + vendor/hermit-abi/* + vendor/hermit-abi-0.1.19/* +Copyright: 2019-2019 Stefan Lankes +License: MIT or Apache-2.0 +Comment: see https://github.com/hermitcore/hermit-abi + +Files: vendor/hex/* +Copyright: 2015-2020 KokaKiwi <kokakiwi@kokakiwi.net> +License: MIT OR Apache-2.0 +Comment: see https://github.com/KokaKiwi/rust-hex + +Files: vendor/home/* +Copyright: 2017-2022 Brian Anderson <andersrb@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/brson/home + +Files: + vendor/html5ever/* + vendor/markup5ever/* +Copyright: 2014-2020 The html5ever Project Developers +License: MIT or Apache-2.0 +Comment: see https://github.com/servo/html5ever + +Files: + vendor/humantime/* + vendor/humantime-*/* +Copyright: + 2016-2018 Paul Colomiets <paul@colomiets.name> + 2016 The humantime Developers + 2016 Pyfisch + 2005-2013 Rich Felker +License: MIT or Apache-2.0 + +Files: vendor/if_chain/* +Copyright: 2016-2020 Chris Wong <lambda.fairy@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/lfairy/if_chain + +Files: + vendor/form_urlencoded/* + vendor/idna/* + vendor/percent-encoding/* + vendor/url/* +Copyright: 2013-2021 The rust-url developers +License: MIT or Apache-2.0 +Comment: see https://github.com/servo/rust-url/ + +Files: vendor/indexmap/* +Copyright: 2016-2019 bluss + 2016-2019 Josh Stone <cuviper@gmail.com> +License: Apache-2.0 or MIT +Comment: see https://github.com/bluss/indexmap + +Files: + vendor/indoc/* +Copyright: 2016-2022 David Tolnay <dtolnay@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/dtolnay/indoc + +Files: vendor/instant/* +Copyright: 2019-2020 sebcrozet <developer@crozet.re> +License: BSD-3-Clause +Comment: see https://github.com/sebcrozet/instant + +Files: vendor/intl_pluralrules/* +Copyright: 2018-2021 Kekoa Riggin <kekoariggin@gmail.com> + 2018-2021 Zibi Braniecki <zbraniecki@mozilla.com> +License: Apache-2.0 or MIT +Comment: see https://github.com/zbraniecki/pluralrules + +Files: vendor/io-lifetimes/* +Copyright: 2021-2022 Dan Gohman <dev@sunfishcode.online> +License: Apache-2.0 with LLVM exception OR Apache-2.0 OR MIT +Comment: see https://github.com/sunfishcode/io-lifetimes + +Files: vendor/jsonpath_lib/* +Copyright: 2018-2021 Changseok Han <freestrings@gmail.com> +License: MIT +Comment: see https://github.com/freestrings/jsonpath + +Files: vendor/lazy_static/* +Copyright: 2014-2018 Marvin Löbel <loebel.marvin@gmail.com> +License: MIT or Apache-2.0 +Comment: + see https://github.com/rust-lang-nursery/lazy-static.rs + see https://github.com/Kimundi/owning-ref-rs + +Files: vendor/libloading/* +Copyright: 2015-2022 Simonas Kazlauskas <libloading@kazlauskas.me> +License: ISC +Comment: see https://github.com/nagisa/rust_libloading/ + +Files: vendor/libm/* +Copyright: 2018-2021 Jorge Aparicio <jorge@japaric.io> +License: MIT OR Apache-2.0 +Comment: see https://github.com/rust-lang-nursery/libm + +Files: vendor/linux-raw-sys/* +Copyright: 2021-2022 Dan Gohman <dev@sunfishcode.online> +License: Apache-2.0 with LLVM exception OR Apache-2.0 OR MIT +Comment: see https://github.com/sunfishcode/linux-raw-sys + +Files: vendor/lsp-types/* +Copyright: 2016-2022 Markus Westerlind <marwes91@gmail.com> + 2016-2022 Bruno Medeiros <bruno.do.medeiros@gmail.com> +License: MIT +Comment: see https://github.com/gluon-lang/lsp-types + +Files: vendor/mac/* +Copyright: 2014-2017 Jonathan Reem <jonathan.reem@gmail.com> +License: MIT +Comment: + see https://github.com/reem/rust-mac.git + +Files: vendor/matchers/* +Copyright: 2019-2019 Eliza Weisman <eliza@buoyant.io> +License: MIT +Comment: see https://github.com/hawkw/matchers + +Files: vendor/matches/* +Copyright: 2014-2017 Simon Sapin <simon.sapin@exyr.org> +License: MIT +Comment: see https://github.com/SimonSapin + +Files: vendor/mdbook/* +Copyright: 2015-2017 Mathieu David <mathieudavid@mathieudavid.org> +License: MPL-2.0 +Comment: see https://github.com/azerupi/mdBook + +Files: vendor/measureme/* +Copyright: 2019-2020 Wesley Wiser <wwiser@gmail.com> + 2019-2020 Michael Woerister <michaelwoerister@posteo> +License: MIT OR Apache-2.0 +Comment: see https://github.com/rust-lang/measureme + +Files: + vendor/memmap2/* + vendor/memmap2-0*/* +Copyright: 2015-2021 Dan Burkert <dan@danburkert.com> + 2015-2021 Evgeniy Reizner <razrfalcon@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/RazrFalcon/memmap2-rs + +Files: vendor/memoffset/* +Copyright: 2017-2019 Gilad Naaman <gilad.naaman@gmail.com> +License: MIT +Comment: see https://github.com/Gilnaa/memoffset + +Files: vendor/minifier/* +Copyright: 2017-2018 Guillaume Gomez <guillaume1.gomez@gmail.com> +License: MIT +Comment: + see https://github.com/GuillaumeGomez/minifier-rs + +Files: + vendor/miniz_oxide/* + vendor/miniz_oxide-0.4.0/* +Copyright: 2017-2020 Frommi <daniil.liferenko@gmail.com> +License: MIT +Comment: see https://github.com/Frommi/miniz_oxide + +Files: + vendor/miow/* + vendor/miow-0.3.7/* +Copyright: 2014-2021 Alex Crichton <alex@alexcrichton.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/yoshuawuyts/miow + +Files: vendor/new_debug_unreachable/* +Copyright: 2014-2018 Matt Brubeck <mbrubeck@limpet.net> + 2014-2018 Jonathan Reem <jonathan.reem@gmail.com> +License: MIT +Comment: see https://github.com/mbrubeck/rust-debug-unreachable + +Files: vendor/ntapi/* +Copyright: 2018-2022 MSxDOS <melcodos@gmail.com> +License: Apache-2.0 OR MIT +Comment: see https://github.com/MSxDOS/ntapi + +Files: vendor/num_cpus/* +Copyright: 2015 Sean McArthur <sean.monstar@gmail.com> +License: MIT +Comment: see https://github.com/seanmonstar/num_cpus + +Files: + vendor/object-0*/* + vendor/object/* +Copyright: + 2016-2020 Nick Fitzgerald <fitzgen@gmail.com> + 2016-2020 Philip Craig <philipjcraig@gmail.com> +License: Apache-2.0 or MIT +Comment: see https://github.com/gimli-rs/object + +Files: vendor/odht/* +Copyright: 2021 Michael Woerister <michaelwoerister@posteo> +License: Apache-2.0 or MIT +Comment: see https://github.com/rust-lang/odht + +Files: vendor/opener/* +Copyright: 2018-2020 Brian Bowman <seeker14491@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/Seeker14491/opener + +Files: vendor/once_cell/* +Copyright: 2018-2019 Aleksey Kladov <aleksey.kladov@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/matklad/once_cell + +Files: vendor/os_str_bytes/* +Copyright: 2019-2022 dylni +License: MIT OR Apache-2.0 +Comment: see https://github.com/dylni/os_str_bytes + +Files: vendor/output_vt100/* +Copyright: 2019-2019 Phuntsok Drak-pa <phundrak@phundrak.fr> +License: MIT +Comment: see https://github.com/Phundrak/output-vt100-rs + +Files: + vendor/hashbrown/* + vendor/lock_api/* + vendor/thread_local/* + vendor/parking_lot/* + vendor/parking_lot-0.11.2/* + vendor/parking_lot_core/* + vendor/parking_lot_core-0.8.5/* +Copyright: 2016-2019 Amanieu d'Antras <amanieu@gmail.com> +License: MIT or Apache-2.0 +Comment: + see https://github.com/rust-lang/hashbrown + see https://github.com/Amanieu/thread_local-rs + see https://github.com/Amanieu/parking_lot + +Files: vendor/packed_simd_2/* +Copyright: 2018-2021 Gonzalo Brito Gadeschi <gonzalobg88@gmail.com> + 2018-2021 Jubilee Young <workingjubilee@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/rust-lang-nursery/packed_simd + +Files: vendor/pathdiff/* +Copyright: 2017-2020 Manish Goregaokar <manishsmail@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/Manishearth/pathdiff + +Files: + vendor/perf-event/* + vendor/perf-event-open-sys/* +Copyright: 2019-2022 Jim Blandy <jimb@red-bean.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/jimblandy/perf-event.git + +Files: + vendor/pest/* + vendor/pest_derive/* + vendor/pest_generator/* + vendor/pest_meta/* +Copyright: 2016-2019 Dragoș Tiselice <dragostiselice@gmail.com> +License: MIT or Apache-2.0 +Comment: + see https://github.com/dragostis/pest + see https://github.com/pest-parser/pest + +Files: vendor/polonius-engine/* +Copyright: 2018-2018 The Rust Project Developers + 2018-2018 Polonius Developers +License: Apache-2.0 or MIT +Comment: see https://github.com/rust-lang-nursery/polonius + +Files: vendor/petgraph/* +Copyright: 2014-2018 bluss + 2014-2018 mitchmindtree +License: MIT or Apache-2.0 +Comment: see https://github.com/bluss/petgraph + +Files: + vendor/phf/* + vendor/phf_codegen/* + vendor/phf_generator/* + vendor/phf_shared/* +Copyright: 2014-2018 Steven Fackler <sfackler@gmail.com> +License: MIT +Comment: see https://github.com/sfackler/rust-phf + +Files: vendor/pin-project-lite/* +Copyright: 2018-2021 Taiki Endo <te316e89@gmail.com> +License: Apache-2.0 or MIT +Comment: + see https://github.com/taiki-e/pin-project-lite + +Files: vendor/precomputed-hash/* +Copyright: 2017-2017 Emilio Cobos Álvarez <emilio@crisal.io> +License: MIT +Comment: see https://github.com/emilio/precomputed-hash + +Files: vendor/pretty_assertions-0.7.2/* +Copyright: 2017-2022 Colin Kiegel <kiegel@gmx.de> + 2017-2022 Florent Fayolle <florent.fayolle69@gmail.com> + 2017-2022 Tom Milligan <code@tommilligan.net> +License: MIT or Apache-2.0 +Comment: see https://github.com/colin-kiegel/rust-pretty-assertions + +Files: + vendor/proc-macro-error/* + vendor/proc-macro-error-attr/* +Copyright: 2019-2020 CreepySkeleton <creepy-skeleton@yandex.ru> +License: MIT OR Apache-2.0 +Comment: see https://gitlab.com/CreepySkeleton/proc-macro-error + +Files: vendor/proc-macro-hack/* +Copyright: 2016-2022 David Tolnay <dtolnay@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/dtolnay/proc-macro-hack + +Files: vendor/psm/* +Copyright: 2015-2020 Simonas Kazlauskas <git@kazlauskas.me> +License: MIT or Apache-2.0 +Comment: see https://github.com/rust-lang/stacker/ + +Files: vendor/pulldown-cmark/* +Copyright: 2015-2017 Raph Levien <raph@google.com> +License: MIT +Comment: see https://github.com/google/pulldown-cmark + +Files: vendor/punycode/* +Copyright: 2015-2019 mcarton <cartonmartin+git@gmail.com> +License: MIT +Comment: see https://github.com/mcarton/rust-punycode.git + +Files: + vendor/quick-error/* + vendor/quick-error-1*/* +Copyright: + 2015-2020 Paul Colomiets <paul@colomiets.name> + 2015-2020 Colin Kiegel <kiegel@gmx.de> +License: MIT or Apache-2.0 +Comment: see http://github.com/tailhook/quick-error + +Files: vendor/quine-mc_cluskey/* +Copyright: 2016-2016 Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> +License: MIT +Comment: see https://github.com/oli-obk/quine-mc_cluskey + +Files: + vendor/rayon/* + vendor/rayon-core/* + vendor/rustc-rayon/* + vendor/rustc-rayon-core/* +Copyright: 2014-2018 Niko Matsakis <niko@alum.mit.edu> + 2014-2018 Josh Stone <cuviper@gmail.com> +License: Apache-2.0 or MIT +Comment: + see https://github.com/rayon-rs/rayon + see https://github.com/Zoxc/rayon/tree/rustc + +Files: vendor/redox_users/* +Copyright: 2017-2021 Jose Narvaez <goyox86@gmail.com> + 2017-2021 Wesley Hershberger <mggmugginsmc@gmail.com> +License: MIT +Comment: see https://gitlab.redox-os.org/redox-os/users + +Files: vendor/redox_syscall/* +Copyright: 2016-2021 Jeremy Soller <jackpot51@gmail.com> +License: MIT +Comment: + see https://github.com/redox-os/syscall + +Files: vendor/regex-automata/* +Copyright: 2018-2020 Andrew Gallant <jamslam@gmail.com> +License: Unlicense or MIT +Comment: see https://github.com/BurntSushi/regex-automata + +Files: vendor/remove_dir_all/* +Copyright: 2017-2018 Aaronepower <theaaronepower@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/Aaronepower/remove_dir_all.git + +Files: vendor/rls-data/* + vendor/rls-span/* +Copyright: 2016-2017 Nick Cameron <ncameron@mozilla.com> +License: Apache-2.0 or MIT +Comment: see https://github.com/nrc/rls-span + see https://github.com/nrc/rls-data + +Files: vendor/rowan/* +Copyright: 2018-2022 Aleksey Kladov <aleksey.kladov@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/rust-analyzer/rowan + +Files: vendor/rustc-ap-rustc_lexer/* +Copyright: 2010-2022 The Rust Project Developers +License: MIT or Apache-2.0 +Comment: see https://github.com/rust-lang/rust + +Files: vendor/rustc-semver/* +Copyright: 2020-2020 flip1995 <hello@philkrones.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/flip1995/rustc-semver + +Files: vendor/rustc_tools_util/* +Copyright: 2014-2021 Matthias Krüger <matthias.krueger@famsik.de> +License: MIT or Apache-2.0 +Comment: see https://github.com/rust-lang/rust-clippy + +Files: vendor/rustfix/* +Copyright: + 2016-2021 Pascal Hertleif <killercup@gmail.com> + 2016-2021 Oliver Schneider <oli-obk@users.noreply.github.com> +License: Apache-2.0 or MIT +Comment: see https://github.com/killercup/rustfix + +Files: vendor/rustix/* +Copyright: 2020-2022 Dan Gohman <dev@sunfishcode.online> + 2020-2022 Jakub Konka <kubkon@jakubkonka.com> +License: Apache-2.0 with LLVM exception OR Apache-2.0 OR MIT +Comment: see https://github.com/bytecodealliance/rustix + +Files: vendor/rustversion/* +Copyright: 2019-2021 David Tolnay <dtolnay@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/dtolnay/rustversion + +Files: vendor/ryu/* +Copyright: 2018-2018 David Tolnay <dtolnay@gmail.com> +License: Apache-2.0 or BSL-1.0 +Comment: see https://github.com/dtolnay/ryu + +Files: vendor/self_cell/* +Copyright: 2020-2021 Lukas Bergdoll <lukas.bergdoll@gmail.com> +License: Apache-2.0 +Comment: see https://github.com/Voultapher/self_cell + +Files: vendor/semver/* +Copyright: + 2014-2020 Steve Klabnik <steve@steveklabnik.com> + 2014-2020 The Rust Project Developers +License: MIT or Apache-2.0 +Comment: + see https://github.com/steveklabnik/semver + see https://github.com/steveklabnik/semver-parser + +Files: vendor/serde/* + vendor/serde_json/* +Copyright: 2014-2017 Erick Tryzelaar <erick.tryzelaar@gmail.com> +License: MIT or Apache-2.0 +Comment: + see https://github.com/serde-rs/serde + see https://github.com/serde-rs/json + +Files: vendor/serde_derive/* +Copyright: 2014-2017 Erick Tryzelaar <erick.tryzelaar@gmail.com> + 2016-2017 David Tolnay <dtolnay@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/serde-rs/serde + +Files: vendor/serde_repr/* +Copyright: 2019-2022 David Tolnay <dtolnay@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/dtolnay/serde-repr + +Files: vendor/sharded-slab/* +Copyright: 2019-2020 Eliza Weisman <eliza@buoyant.io> +License: MIT +Comment: see https://github.com/hawkw/sharded-slab + +Files: vendor/shell-escape/* +Copyright: 2016-2020 Steven Fackler <sfackler@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/sfackler/shell-escape + +Files: vendor/shlex/* +Copyright: 2015-2015 comex <comexk@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/comex/rust-shlex + +Files: vendor/siphasher/* +Copyright: 2016-2018 Frank Denis <github@pureftpd.org> +License: MIT or Apache-2.0 +Comment: see https://github.com/jedisct1/rust-siphash + +Files: vendor/smallvec/* +Copyright: 2015-2020 Simon Sapin <simon.sapin@exyr.org> +License: MPL-2.0 +Comment: see https://github.com/servo/rust-smallvec + +Files: vendor/smol_str/* +Copyright: 2018-2022 Aleksey Kladov <aleksey.kladov@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/rust-analyzer/smol_str + +Files: vendor/snap/* +Copyright: 2016-2020 Andrew Gallant <jamslam@gmail.com> +License: BSD-3-Clause +Comment: see https://github.com/BurntSushi/rust-snappy + +Files: vendor/stable_deref_trait/* +Copyright: 2017-2017 Robert Grosse <n210241048576@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/storyyeller/stable_deref_trait + +Files: vendor/stacker/* +Copyright: 2015-2020 Alex Crichton <alex@alexcrichton.com> + 2015-2020 Simonas Kazlauskas <git@kazlauskas.me> +License: MIT or Apache-2.0 +Comment: see https://github.com/rust-lang/stacker + +Files: vendor/strsim/* +Copyright: 2015-2021 Danny Guo <dannyguo91@gmail.com> +License: MIT +Comment: see https://github.com/dguo/strsim-rs + +Files: vendor/synstructure/* +Copyright: + 2016-2019 Nika Layzell <nika@thelayzells.com> +License: MIT +Comment: see https://github.com/mystor/synstructure + +Files: vendor/sysinfo/* +Copyright: 2015-2022 Guillaume Gomez <guillaume1.gomez@gmail.com> +License: MIT +Comment: see https://github.com/GuillaumeGomez/sysinfo + +Files: vendor/tempfile/* +Copyright: 2015-2018 Steven Allen <steven@stebalien.com> + 2015-2018 The Rust Project Developers + 2015-2018 Ashley Mannix <ashleymannix@live.com.au> + 2015-2018 Jason White <jasonaw0@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/Stebalien/tempfile + +Files: vendor/tendril/* +Copyright: 2015-2017 Keegan McAllister <mcallister.keegan@gmail.com> + 2015-2017 Simon Sapin <simon.sapin@exyr.org> + 2015-2017 Chris Morgan <me@chrismorgan.info> +License: MIT or Apache-2.0 +Comment: see https://github.com/servo/tendril + +Files: vendor/term/* +Copyright: + 2014-2021 The Rust Project Developers + 2014-2021 Steven Allen +License: MIT or Apache-2.0 +Comment: see https://github.com/Stebalien/term + +Files: vendor/termize/* +Copyright: 2016-2020 Yuki Okushi <huyuumi.dev@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/JohnTitor/termize + +Files: vendor/textwrap/* +Copyright: 2016-2022 Martin Geisler <martin@geisler.net> +License: MIT +Comment: see https://github.com/mgeisler/textwrap + +Files: vendor/text-size/* +Copyright: 2018-2021 Aleksey Kladov <aleksey.kladov@gmail.com> + 2018-2021 Christopher Durham (CAD97) <cad97@cad97.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/rust-analyzer/text-size + +Files: + vendor/thiserror/* + vendor/thiserror-impl/* +Copyright: 2019-2020 David Tolnay <dtolnay@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/dtolnay/thiserror + +Files: vendor/thorin-dwp/* +Copyright: 2021-2022 David Wood <david.wood@huawei.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/davidtwco/thorin + +Files: vendor/tinystr/* +Copyright: 2019-2022 Raph Levien <raph.levien@gmail.com> + 2019-2022 Zibi Braniecki <zibi@braniecki.net> +License: Apache-2.0 or MIT +Comment: see https://github.com/zbraniecki/tinystr + +Files: vendor/tinyvec/* +Copyright: 2020 Lokathor <zefria@gmail.com> +License: Zlib +Comment: see https://github.com/Lokathor/tinyvec + +Files: vendor/tinyvec_macros/* +Copyright: 2020 Soveu <marx.tomasz@gmail.com> +License: MIT or Apache-2.0 or Zlib +Comment: see https://github.com/Soveu/tinyvec_macros + +Files: vendor/topological-sort/* +Copyright: 2015-2018 gifnksm <makoto.nksm+github@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/gifnksm/topological-sort-rs + +Files: + vendor/tracing/* + vendor/tracing-attributes/* + vendor/tracing-core/* + vendor/tracing-log/* + vendor/tracing-subscriber/* +Copyright: + 2018-2020 Eliza Weisman <eliza@buoyant.io> + 2018-2020 Tokio Contributors <team@tokio.rs> + 2018-2020 David Barsky <dbarsky@amazon.com> +License: MIT +Comment: see https://github.com/tokio-rs/tracing + +Files: vendor/tracing-tree/* +Copyright: 2020-2020 David Barsky <me@davidbarsky.com> + 2020-2020 Nathan Whitaker +License: MIT OR Apache-2.0 +Comment: see https://github.com/davidbarsky/tracing-tree + +Files: vendor/type-map/* +Copyright: 2019-2022 Jacob Brown <kardeiz@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/kardeiz/type-map + +Files: vendor/typenum/* +Copyright: 2015-2019 Paho Lurie-Gregg <paho@paholg.com> + 2015-2019 Andre Bogus <bogusandre@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/paholg/typenum + +Files: vendor/version_check/* +Copyright: 2017-2019 Sergio Benitez <sb@sergio.bz> +License: MIT or Apache-2.0 +Comment: see https://github.com/SergioBenitez/version_check + +Files: + vendor/ucd-parse/* + vendor/ucd-trie/* +Copyright: 2017-2020 Andrew Gallant <jamslam@gmail.com> +License: MIT or Apache-2.0 +Comment: + see https://github.com/BurntSushi/rucd + see https://github.com/BurntSushi/ucd-generate + +Files: vendor/ungrammar/* +Copyright: 2020-2022 Aleksey Kladov <aleksey.kladov@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/matklad/ungrammar + +Files: vendor/unicase/* +Copyright: 2014-2019 Sean McArthur <sean@seanmonstar.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/seanmonstar/unicase + +Files: vendor/unicode_categories/* +Copyright: 2015-2016 Sean Gillespie <sean@swgillespie.me> +License: MIT OR Apache-2.0 +Comment: see https://github.com/swgillespie/unicode-categories + +Files: vendor/unic-*/* +Copyright: 2017-2022 The UNIC Project Developers +License: MIT or Apache-2.0 +Comment: see https://github.com/open-i18n/rust-unic/ + +Files: + vendor/unicode-normalization/* + vendor/unicode-segmentation/* + vendor/unicode-width/* +Copyright: 2015-2019 kwantam <kwantam@gmail.com> +License: MIT or Apache-2.0 +Comment: + see https://github.com/unicode-rs/unicode-normalization + see https://github.com/unicode-rs/unicode-segmentation + see https://github.com/unicode-rs/unicode-width + +Files: vendor/unicode-xid/* +Copyright: 2015-2017 erick.tryzelaar <erick.tryzelaar@gmail.com> + 2015-2017 kwantam <kwantam@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/unicode-rs/unicode-xid + +Files: vendor/unicode-script/* +Copyright: 2017-2020 Manish Goregaokar <manishsmail@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/unicode-rs/unicode-script + +Files: vendor/unicode-security/* +Copyright: 2020-2020 Charles Lew <crlf0710@gmail.com> + 2020-2020 Manish Goregaokar <manishsmail@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/unicode-rs/unicode-security + +Files: vendor/unified-diff/* +Copyright: 2021-2021 Michael Howell <michael@notriddle.com> + 2021-2021 The Rust Project Developers +License: MIT OR Apache-2.0 +Comment: see https://github.com/notriddle/rust-unified-diff + +Files: vendor/utf-8/* +Copyright: 2015-2018 Simon Sapin <simon.sapin@exyr.org> +License: MIT OR Apache-2.0 +Comment: see https://github.com/SimonSapin/rust-utf8 + +Files: vendor/wasi/* +Copyright: 2019-2020 The Cranelift Project Developers +License: Apache-2.0 with LLVM exception or Apache-2.0 or MIT +Comment: see https://github.com/CraneStation/rust-wasi + +Files: vendor/winapi/* +Copyright: + 2014-2019 Peter Atashian <retep998@gmail.com> + 2014-2019 winapi-rs developers +License: MIT +Comment: see https://github.com/retep998/winapi-rs + +Files: vendor/winapi-*-pc-windows-gnu/* +Copyright: 2014-2018 Peter Atashian <retep998@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/retep998/winapi-rs + +Files: vendor/xattr/* +Copyright: 2015-2017 Steven Allen <steven@stebalien.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/Stebalien/xattr + +Files: vendor/yansi-term/* +Copyright: 2014-2020 ogham@bsago.me + 2014-2020 Ryan Scheel (Havvy) <ryan.havvy@gmail.com> + 2014-2020 Josh Triplett <josh@joshtriplett.org> + 2014-2020 Juan Aguilar Santillana <mhpoin@gmail.com> +License: MIT +Comment: see https://github.com/botika/yansi-term + +Files: vendor/bytes/* +Copyright: 2015-2022 Carl Lerche <me@carllerche.com> + 2015-2022 Sean McArthur <sean@seanmonstar.com> +License: MIT +Comment: see https://github.com/tokio-rs/bytes + +Files: vendor/cpufeatures/* +Copyright: 2016-2022 RustCrypto Developers +License: MIT OR Apache-2.0 +Comment: see https://github.com/RustCrypto/utils + +Files: vendor/crypto-common/* +Copyright: 2017-2022 RustCrypto Developers +License: MIT OR Apache-2.0 +Comment: see https://github.com/RustCrypto/traits + +Files: + vendor/futures/* + vendor/futures-channel/* + vendor/futures-core/* + vendor/futures-executor/* + vendor/futures-io/* + vendor/futures-macro/* + vendor/futures-sink/* + vendor/futures-task/* + vendor/futures-util/* +Copyright: + 2016-2018 Alex Crichton <alex@alexcrichton.com> + 2017 The Tokio Authors + 2018-2022 The Rust Project Developers +License: MIT OR Apache-2.0 +Comment: see https://github.com/rust-lang/futures-rs + +Files: vendor/minimal-lexical/* +Copyright: 2020-2022 Alex Huszagh <ahuszagh@gmail.com> +License: MIT or Apache-2.0 +Comment: see https://github.com/Alexhuszagh/minimal-lexical + +Files: vendor/nom/* +Copyright: 2014-2022 contact@geoffroycouprie.com +License: MIT +Comment: see https://github.com/Geal/nom + +Files: vendor/pin-utils/* +Copyright: 2018-2022 Josef Brandl <mail@josefbrandl.de> +License: MIT OR Apache-2.0 +Comment: see https://github.com/rust-lang-nursery/pin-utils + +Files: vendor/slab/* +Copyright: 2015-2022 Carl Lerche <me@carllerche.com> +License: MIT +Comment: see https://github.com/carllerche/slab + +Files: vendor/tokio/* +Copyright: 2016-2022 Tokio Contributors <team@tokio.rs> +License: MIT +Comment: see https://github.com/tokio-rs/tokio + +Files: vendor/valuable/* +Copyright: + 2021 Valuable Contributors + 2021-2022 Carl Lerche + 2021-2022 Taiki Endo +License: MIT +Comment: see https://github.com/tokio-rs/valuable + +Files: vendor/wasi-0.9.0+wasi-snapshot-preview1/* +Copyright: 2019-2022 The Cranelift Project Developers +License: Apache-2.0 with LLVM exception OR Apache-2.0 OR MIT +Comment: see https://github.com/bytecodealliance/wasi + +Files: vendor/wasi-0.10.2+wasi-snapshot-preview1/* +Copyright: 2019-2022 The Cranelift Project Developers +License: Apache-2.0 with LLVM exception OR Apache-2.0 OR MIT +Comment: see https://github.com/bytecodealliance/wasi + +Files: + vendor/windows_aarch64_msvc/* + vendor/windows_i686_gnu/* + vendor/windows_i686_msvc/* + vendor/windows-sys/* + vendor/windows_x86_64_gnu/* + vendor/windows_x86_64_msvc/* + vendor/windows_aarch64_msvc-0.28.0/* + vendor/windows_i686_gnu-0.28.0/* + vendor/windows_i686_msvc-0.28.0/* + vendor/windows-sys-0.28.0/* + vendor/windows_x86_64_gnu-0.28.0/* + vendor/windows_x86_64_msvc-0.28.0/* +Copyright: 2019-2022 Microsoft Corporation +License: MIT OR Apache-2.0 +Comment: see https://github.com/microsoft/windows-rs + +Files: vendor/write-json/* +Copyright: 2020-2020 Aleksey Kladov <aleksey.kladov@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/matklad/write-json + +Files: + vendor/xflags/* + vendor/xflags-macros/* +Copyright: 2021-2022 Aleksey Kladov <aleksey.kladov@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/matklad/xflags + +Files: + vendor/xshell/* + vendor/xshell-macros/* +Copyright: 2020-2022 Aleksey Kladov <aleksey.kladov@gmail.com> +License: MIT OR Apache-2.0 +Comment: see https://github.com/matklad/xshell + +Files: debian/* +Copyright: 2013-2018 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +License: MIT or Apache-2.0 + +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: 0BSD + Permission to use, copy, modify, and/or distribute this software for + any purpose with or without fee is hereby granted. + . + 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: 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: Apache-2.0 with LLVM exception + 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'. + Additionally, the LLVM exception is as follows: + . + As an exception, if, as a result of your compiling your source code, portions + of this Software are embedded into an Object form of such source code, you + may redistribute such embedded portions in such Object form without complying + with the conditions of Sections 4(a), 4(b) and 4(d) of the License. + . + In addition, if you combine or link compiled forms of this Software with + software that is licensed under the GPLv2 ("Combined Software") and if a + court of competent jurisdiction determines that the patent provision (Section + 3), the indemnity provision (Section 9) or other Section of the License + conflicts with the conditions of the GPLv2, you may retroactively and + prospectively choose to deem waived or otherwise exclude such Section(s) of + the License, but only in their entirety and only with respect to the Combined + Software. + +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: CC0-1.0 + On Debian systems, the full text of the CC0 1.0 Universal + License can be found in the file + `/usr/share/common-licenses/CC0-1.0'. + +License: ISC + Permission to use, copy, modify, and/or 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: MIT + 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: BSL-1.0 + Permission is hereby granted, free of charge, to any person or organization + obtaining a copy of the software and accompanying documentation covered by + this license (the "Software") to use, reproduce, display, distribute, + execute, and transmit the Software, and to prepare derivative works of the + Software, and to permit third-parties to whom the Software is furnished to + do so, all subject to the following: + . + The copyright notices in the Software and this entire statement, including + the above license grant, this restriction and the following disclaimer, + must be included in all copies of the Software, in whole or in part, and + all derivative works of the Software, unless such copies or derivative + works are solely in the form of machine-executable object code generated by + a source language processor. + . + 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT + SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE + FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN 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: 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/> + +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 + . + On Debian systems, see /usr/share/common-licenses/GPL-2 for the full + text of the GPL version 2. + +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. + +License: MPL-2.0 + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + . + On Debian systems, see /usr/share/common-licenses/MPL-2.0 for the full + text of the MPL version 2.0. + +License: Zlib + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + . + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + . + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. diff --git a/debian/docs b/debian/docs new file mode 100644 index 000000000..b43bf86b5 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README.md diff --git a/debian/ensure-patch b/debian/ensure-patch new file mode 100755 index 000000000..b8562f2d9 --- /dev/null +++ b/debian/ensure-patch @@ -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 -F0 -f $rev -p1 < "$2" >/dev/null; then + echo >&2 "patch already $verb: $2" + exit 0 +fi +patch --dry-run -F0 -f $fwd -p1 < "$2" +patch -F0 -f $fwd -p1 < "$2" diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 000000000..d568e69c4 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,7 @@ +[DEFAULT] +pristine-tar = True +ignore-branch = True + +[import-orig] +upstream-branch = upstream/experimental +debian-branch = debian/experimental diff --git a/debian/get-stage0.py b/debian/get-stage0.py new file mode 100755 index 000000000..1f55c53a2 --- /dev/null +++ b/debian/get-stage0.py @@ -0,0 +1,31 @@ +#!/usr/bin/python3 +# Sometimes this might fail due to upstream changes. +# In that case, you probably just need to override the failing step in our +# DownloadOnlyRustBuild class below. + +import sys + +import bootstrap +from bootstrap import RustBuild + +class DownloadOnlyRustBuild(RustBuild): + triple = None + def build_bootstrap(self): + pass + def run(self, *args): + pass + def build_triple(self): + return self.triple + def update_submodules(self): + pass + def bootstrap_binary(self): + return "true" + +def main(argv): + triple = argv.pop(1) + DownloadOnlyRustBuild.triple = triple + bootstrap.RustBuild = DownloadOnlyRustBuild + bootstrap.bootstrap(False) + +if __name__ == '__main__': + main(sys.argv) diff --git a/debian/icons/rust-logo-32x32-blk.png b/debian/icons/rust-logo-32x32-blk.png Binary files differnew file mode 100644 index 000000000..9cc1452e3 --- /dev/null +++ b/debian/icons/rust-logo-32x32-blk.png diff --git a/debian/libstd-rust-1.64.install b/debian/libstd-rust-1.64.install new file mode 100644 index 000000000..cd4545cca --- /dev/null +++ b/debian/libstd-rust-1.64.install @@ -0,0 +1 @@ +usr/lib/${DEB_HOST_MULTIARCH}/ diff --git a/debian/libstd-rust-1.64.lintian-overrides b/debian/libstd-rust-1.64.lintian-overrides new file mode 100644 index 000000000..1a992afe2 --- /dev/null +++ b/debian/libstd-rust-1.64.lintian-overrides @@ -0,0 +1,13 @@ +# "libstd" just seemed too generic +libstd-rust-1.64 binary: package-name-doesnt-match-sonames +libstd-rust-1.64 binary: sharedobject-in-library-directory-missing-soname + +# Rust doesn't use dev shlib symlinks nor any of the other shlib support stuff +libstd-rust-1.64 binary: dev-pkg-without-shlib-symlink +libstd-rust-1.64 binary: shlib-without-versioned-soname +libstd-rust-1.64 binary: unused-shlib-entry-in-control-file + +# 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.64 binary: library-not-linked-against-libc diff --git a/debian/libstd-rust-dev-wasm32.install b/debian/libstd-rust-dev-wasm32.install new file mode 100644 index 000000000..a2949f140 --- /dev/null +++ b/debian/libstd-rust-dev-wasm32.install @@ -0,0 +1 @@ +usr/lib/rustlib/wasm32-*/lib/ diff --git a/debian/libstd-rust-dev-wasm32.lintian-overrides b/debian/libstd-rust-dev-wasm32.lintian-overrides new file mode 100644 index 000000000..2664d9cf3 --- /dev/null +++ b/debian/libstd-rust-dev-wasm32.lintian-overrides @@ -0,0 +1,6 @@ +# wasm object files count as arch-independent for now, +# at least until we starting offering Debian in wasm +libstd-rust-dev-wasm32 binary: arch-independent-package-contains-binary-or-object * + +# lintian doesn't understand rlib files +libstd-rust-dev-wasm32 binary: no-code-sections * diff --git a/debian/libstd-rust-dev-windows.install b/debian/libstd-rust-dev-windows.install new file mode 100644 index 000000000..1a0734fa9 --- /dev/null +++ b/debian/libstd-rust-dev-windows.install @@ -0,0 +1 @@ +usr/lib/rustlib/${env:WINDOWS_ARCH}-pc-windows-gnu/lib/ diff --git a/debian/libstd-rust-dev-windows.lintian-overrides b/debian/libstd-rust-dev-windows.lintian-overrides new file mode 100644 index 000000000..8ab4804c5 --- /dev/null +++ b/debian/libstd-rust-dev-windows.lintian-overrides @@ -0,0 +1,8 @@ +# lintian does not know about rust arch-specific directories +libstd-rust-dev-windows binary: arch-dependent-file-not-in-arch-specific-directory [usr/lib/rustlib/*/lib/lib*.rlib] +libstd-rust-dev-windows binary: arch-dependent-file-not-in-arch-specific-directory [usr/lib/rustlib/*/lib/lib*.a] +libstd-rust-dev-windows binary: executable-not-elf-or-script [usr/lib/rustlib/*/lib/*.dll] + +# lintian doesn't understand these files +libstd-rust-dev-windows binary: no-code-sections [*.rlib] +libstd-rust-dev-windows binary: no-code-sections [usr/lib/rustlib/*-pc-windows-gnu/lib/lib*.dll.a] diff --git a/debian/libstd-rust-dev.install b/debian/libstd-rust-dev.install new file mode 100644 index 000000000..399e4c075 --- /dev/null +++ b/debian/libstd-rust-dev.install @@ -0,0 +1 @@ +usr/lib/rustlib/${env:DEB_HOST_RUST_TYPE}/lib/ diff --git a/debian/libstd-rust-dev.lintian-overrides b/debian/libstd-rust-dev.lintian-overrides new file mode 100644 index 000000000..33ea50b57 --- /dev/null +++ b/debian/libstd-rust-dev.lintian-overrides @@ -0,0 +1,11 @@ +# lintian does not know about rust arch-specific directories +libstd-rust-dev binary: arch-dependent-file-not-in-arch-specific-directory [usr/lib/rustlib/*/lib/lib*.rlib] +libstd-rust-dev binary: breakout-link usr/lib/rustlib/*/lib/lib*.so -> usr/lib/*/lib*.so + +# lintian doesn't understand rlib files +libstd-rust-dev binary: no-code-sections [*.rlib] + +# See debhelper bug #875780. This override is commented out because it's not +# always needed, but we want it here for documentation purposes. Basically, +# if you see it then you probably don't need to worry about it. +#libstd-rust-dev binary: unstripped-static-library usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/lib*.rlib(*) diff --git a/debian/lintian-to-copyright.sh b/debian/lintian-to-copyright.sh new file mode 100755 index 000000000..9a766da35 --- /dev/null +++ b/debian/lintian-to-copyright.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# Pipe the output of lintian into this. +sed -ne 's/.* file-without-copyright-information //p' | cut -d/ -f1-2 | sort -u | while read x; do + /usr/share/cargo/scripts/guess-crate-copyright "$x" +done diff --git a/debian/llvm-upstream-patch.sh b/debian/llvm-upstream-patch.sh new file mode 100755 index 000000000..fc8797136 --- /dev/null +++ b/debian/llvm-upstream-patch.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# Run this on https://github.com/llvm-mirror/llvm +# Or another repo where the above is the "upstream" remote +set -e +head=$(git rev-parse --verify -q remotes/upstream/master || git rev-parse --verify -q remotes/origin/master) +test -n "$head" +for i in "$@"; do + git show $(git rev-list "$head" -n1 --grep='git-svn-id: .*@'"$i") > rL"$i".patch +done diff --git a/debian/make_orig-stage0_tarball.sh b/debian/make_orig-stage0_tarball.sh new file mode 100755 index 000000000..c6593f25b --- /dev/null +++ b/debian/make_orig-stage0_tarball.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# See README.Debian "Bootstrapping" for details. +# +# You may want to use `debian/rules source_orig-stage0` 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 armhf i386 mips64 mips64el powerpc ppc64 ppc64el s390x}" + +rm -f stage0/*/*.sha256 +mkdir -p stage0 build && ln -sf ../stage0 build/cache +if [ -n "$(find stage0/ -type f)" ]; then + echo >&2 "$0: NOTE: extra artifacts in stage0/ will be included:" + find stage0/ -type f +fi +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 + PYTHONPATH=src/bootstrap debian/get-stage0.py "${rust_triplet}" + rm -rf "${rust_triplet}" + } +done + +echo >&2 "building stage0 tar file now, this will take a while..." +stamp=@${SOURCE_DATE_EPOCH:-$(date +%s)} +touch --date="$stamp" stage0/dpkg-source-dont-rename-parent-directory +tar --mtime="$stamp" --clamp-mtime \ + --owner=root --group=root \ + -cJf "../rustc_${upstream_version}.orig-stage0.tar.xz" \ + --transform "s/^stage0\///" \ + stage0/* + +rm -f src/bootstrap/bootstrap.pyc + +cat <<eof +================================================================================ +orig-stage0 bootstrapping tarball created in ../rustc_${upstream_version}.orig-stage0.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/cargo Build-Depends in d/control +2. Update d/changelog +3. Run \`dpkg-source -b .\` to generate a .dsc that includes this tarball. +================================================================================ +eof diff --git a/debian/not-installed b/debian/not-installed new file mode 100644 index 000000000..d36e13ed0 --- /dev/null +++ b/debian/not-installed @@ -0,0 +1,12 @@ +# rust-installer stuff, not relevant for Debian +usr/lib/rustlib/components +usr/lib/rustlib/install.log +usr/lib/rustlib/manifest-* +usr/lib/rustlib/rust-installer-version +usr/lib/rustlib/uninstall.sh + +# redundant copy of llvm-dwp, we already link it in rustc.links +usr/lib/rustlib/*/bin/rust-llvm-dwp + +# docs, we already install into /usr/share/doc/rustc +usr/share/doc/rust/* diff --git a/debian/patches/d-0000-ignore-removed-submodules.patch b/debian/patches/d-0000-ignore-removed-submodules.patch new file mode 100644 index 000000000..3dfaf06cb --- /dev/null +++ b/debian/patches/d-0000-ignore-removed-submodules.patch @@ -0,0 +1,253 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Sat, 2 Oct 2021 01:07:59 +0100 +Subject: d-0000-ignore-removed-submodules + +--- + Cargo.toml | 36 ++++++++---------------------------- + src/bootstrap/bootstrap.py | 4 ---- + src/bootstrap/builder.rs | 7 +------ + src/bootstrap/doc.rs | 1 - + src/bootstrap/test.rs | 12 +----------- + src/tools/clippy/Cargo.toml | 5 ----- + src/tools/rustfmt/Cargo.toml | 5 ----- + src/tools/tidy/src/deps.rs | 2 +- + 8 files changed, 11 insertions(+), 61 deletions(-) + +diff --git a/Cargo.toml b/Cargo.toml +index ffc886d..7231b60 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -16,25 +16,14 @@ members = [ + "src/tools/tidy", + "src/tools/tier-check", + "src/tools/build-manifest", +- "src/tools/remote-test-client", +- "src/tools/remote-test-server", + "src/tools/rust-installer", + "src/tools/rust-demangler", +- "src/tools/cargo", +- "src/tools/cargo/crates/credential/cargo-credential-1password", +- "src/tools/cargo/crates/credential/cargo-credential-macos-keychain", +- "src/tools/cargo/crates/credential/cargo-credential-wincred", + "src/tools/rustdoc", +- "src/tools/rls", + "src/tools/rustfmt", +- "src/tools/miri", +- "src/tools/miri/cargo-miri", + "src/tools/rustdoc-themes", + "src/tools/unicode-table-generator", +- "src/tools/expand-yaml-anchors", + "src/tools/jsondocck", + "src/tools/html-checker", +- "src/tools/bump-stage0", + "src/tools/lld-wrapper", + ] + +@@ -96,25 +85,16 @@ gimli.debug = 0 + miniz_oxide.debug = 0 + object.debug = 0 + +-# We want the RLS to use the version of Cargo that we've got vendored in this +-# repository to ensure that the same exact version of Cargo is used by both the +-# RLS and the Cargo binary itself. The RLS depends on Cargo as a git repository +-# so we use a `[patch]` here to override the github repository with our local +-# vendored copy. +-[patch."https://github.com/rust-lang/cargo"] +-cargo = { path = "src/tools/cargo" } +-cargo-util = { path = "src/tools/cargo/crates/cargo-util" } +- +-[patch."https://github.com/rust-lang/rustfmt"] +-# Similar to Cargo above we want the RLS to use a vendored version of `rustfmt` +-# that we're shipping as well (to ensure that the rustfmt in RLS and the +-# `rustfmt` executable are the same exact version). +-rustfmt-nightly = { path = "src/tools/rustfmt" } ++# The only package that ever uses debug builds is bootstrap. ++# We care a lot about bootstrap's compile times, so don't include debug info for ++# dependencies, only bootstrap itself. ++[profile.dev] ++debug = 0 ++[profile.dev.package] ++# Only use debuginfo=1 to further reduce compile times. ++bootstrap.debug = 1 + + [patch.crates-io] +-# See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on +-# here +-rustc-workspace-hack = { path = 'src/tools/rustc-workspace-hack' } + + # See comments in `library/rustc-std-workspace-core/README.md` for what's going on + # here +diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py +index 03eec02..c40811f 100644 +--- a/src/bootstrap/bootstrap.py ++++ b/src/bootstrap/bootstrap.py +@@ -759,10 +759,6 @@ class RustBuild(object): + os.path.join(self.rust_root, "src/bootstrap/Cargo.toml")] + for _ in range(0, self.verbose): + args.append("--verbose") +- if self.use_locked_deps: +- args.append("--locked") +- if self.use_vendored_sources: +- args.append("--frozen") + if self.get_toml("metrics", "build"): + args.append("--features") + args.append("build-metrics") +diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs +index 0ab4824..629e1bb 100644 +--- a/src/bootstrap/builder.rs ++++ b/src/bootstrap/builder.rs +@@ -600,7 +600,6 @@ impl<'a> Builder<'a> { + tool::RustInstaller, + tool::Cargo, + tool::Rls, +- tool::RustAnalyzer, + tool::RustAnalyzerProcMacroSrv, + tool::RustDemangler, + tool::Rustdoc, +@@ -622,7 +620,6 @@ impl<'a> Builder<'a> { + check::Clippy, + check::Miri, + check::Rls, +- check::RustAnalyzer, + check::Rustfmt, + check::Bootstrap + ), +@@ -650,7 +647,6 @@ impl<'a> Builder<'a> { + test::Cargotest, + test::Cargo, + test::Rls, +- test::RustAnalyzer, + test::ErrorIndex, + test::Distcheck, + test::RunMakeFullDeps, +@@ -698,10 +694,8 @@ impl<'a> Builder<'a> { + doc::RustdocBook, + doc::RustByExample, + doc::RustcBook, +- doc::CargoBook, + doc::Clippy, + doc::ClippyBook, +- doc::Miri, + doc::EmbeddedBook, + doc::EditionGuide, + ), +@@ -723,7 +717,6 @@ impl<'a> Builder<'a> { + dist::Miri, + dist::LlvmTools, + dist::RustDev, +- dist::Extended, + // It seems that PlainSourceTarball somehow changes how some of the tools + // perceive their dependencies (see #93033) which would invalidate fingerprints + // and force us to rebuild tools after vendoring dependencies. +@@ -2054,10 +2047,7 @@ impl<'a> Builder<'a> { + } + } + +- if self.config.locked_deps { +- cargo.arg("--locked"); +- } +- if self.config.vendor || self.is_sudo { ++ if self.is_sudo { + cargo.arg("--frozen"); + } + +diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs +index 2852442..5faa8e5 100644 +--- a/src/bootstrap/doc.rs ++++ b/src/bootstrap/doc.rs +@@ -73,7 +73,6 @@ macro_rules! book { + // FIXME: Make checking for a submodule automatic somehow (maybe by having a list of all submodules + // and checking against it?). + book!( +- CargoBook, "src/tools/cargo/src/doc", "cargo", submodule = "src/tools/cargo"; + ClippyBook, "src/tools/clippy/book", "clippy"; + EditionGuide, "src/doc/edition-guide", "edition-guide", submodule; + EmbeddedBook, "src/doc/embedded-book", "embedded-book", submodule; +diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs +index c0fa8c9..8fbc390 100644 +--- a/src/bootstrap/test.rs ++++ b/src/bootstrap/test.rs +@@ -1910,17 +1910,7 @@ impl Step for RustcGuide { + } + + fn run(self, builder: &Builder<'_>) { +- let relative_path = Path::new("src").join("doc").join("rustc-dev-guide"); +- builder.update_submodule(&relative_path); +- +- let src = builder.src.join(relative_path); +- let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook); +- let toolstate = if try_run(builder, rustbook_cmd.arg("linkcheck").arg(&src)) { +- ToolState::TestPass +- } else { +- ToolState::TestFail +- }; +- builder.save_toolstate("rustc-dev-guide", toolstate); ++ builder.save_toolstate("rustc-dev-guide", ToolState::TestPass); + } + } + +diff --git a/src/tools/clippy/Cargo.toml b/src/tools/clippy/Cargo.toml +index 1c875c3..1aad7cf 100644 +--- a/src/tools/clippy/Cargo.toml ++++ b/src/tools/clippy/Cargo.toml +@@ -36,11 +36,6 @@ walkdir = "2.3" + # This is used by the `collect-metadata` alias. + filetime = "0.2" + +-# A noop dependency that changes in the Rust repository, it's a bit of a hack. +-# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust` +-# for more information. +-rustc-workspace-hack = "1.0" +- + # UI test dependencies + clippy_utils = { path = "clippy_utils" } + derive-new = "0.5" +diff --git a/src/tools/rustfmt/Cargo.toml b/src/tools/rustfmt/Cargo.toml +index 7a4e02d..27b91f2 100644 +--- a/src/tools/rustfmt/Cargo.toml ++++ b/src/tools/rustfmt/Cargo.toml +@@ -59,11 +59,6 @@ unicode_categories = "0.1" + + rustfmt-config_proc_macro = { version = "0.2", path = "config_proc_macro" } + +-# A noop dependency that changes in the Rust repository, it's a bit of a hack. +-# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust` +-# for more information. +-rustc-workspace-hack = "1.0.0" +- + # Rustc dependencies are loaded from the sysroot, Cargo doesn't know about them. + + [package.metadata.rust-analyzer] +diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs +index 333f85f..4df2b54 100644 +--- a/src/tools/tidy/src/deps.rs ++++ b/src/tools/tidy/src/deps.rs +@@ -306,7 +306,7 @@ const FORBIDDEN_TO_HAVE_DUPLICATES: &[&str] = &[ + // These two crates take quite a long time to build, so don't allow two versions of them + // to accidentally sneak into our dependency graph, in order to ensure we keep our CI times + // under control. +- "cargo", ++ //"cargo", + ]; + + /// Dependency checks. +diff --git a/src/tools/rust-analyzer/Cargo.toml b/src.tools/rust-analyzer/Cargo.toml +index 6b68ca82389..7bc5d1bc5a0 100644 +--- a/src/tools/rust-analyzer/Cargo.toml ++++ b/src/tools/rust-analyzer/Cargo.toml +@@ -1,5 +1,14 @@ + [workspace] +-members = ["xtask/", "lib/*", "crates/*"] ++members = [ ++ "xtask/", ++ "lib/*", ++ "crates/proc-macro-srv", ++ "crates/proc-macro-srv-cli", ++ "crates/tt", ++ "crates/mbe", ++ "crates/paths", ++ "crates/proc-macro-api", ++] + exclude = ["crates/proc-macro-test/imp"] + + [profile.dev] diff --git a/debian/patches/d-0001-pkg-config-no-special-snowflake.patch b/debian/patches/d-0001-pkg-config-no-special-snowflake.patch new file mode 100644 index 000000000..db66e2c34 --- /dev/null +++ b/debian/patches/d-0001-pkg-config-no-special-snowflake.patch @@ -0,0 +1,93 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Sat, 2 Oct 2021 01:08:00 +0100 +Subject: d-0001-pkg-config-no-special-snowflake + +--- + vendor/pkg-config/src/lib.rs | 25 ++++++++++--------------- + vendor/pkg-config/tests/test.rs | 2 -- + 2 files changed, 10 insertions(+), 17 deletions(-) + +diff --git a/vendor/pkg-config/src/lib.rs b/vendor/pkg-config/src/lib.rs +index a28304e..11f9460 100644 +--- a/vendor/pkg-config/src/lib.rs ++++ b/vendor/pkg-config/src/lib.rs +@@ -111,11 +111,8 @@ pub enum Error { + /// Contains the name of the responsible environment variable. + EnvNoPkgConfig(String), + +- /// Detected cross compilation without a custom sysroot. +- /// +- /// Ignore the error with `PKG_CONFIG_ALLOW_CROSS=1`, +- /// which may let `pkg-config` select libraries +- /// for the host's architecture instead of the target's. ++ /// Cross compilation detected. Kept for compatibility; ++ /// the Debian package never emits this. + CrossCompilation, + + /// Failed to run `pkg-config`. +@@ -155,14 +152,6 @@ impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + Error::EnvNoPkgConfig(ref name) => write!(f, "Aborted because {} is set", name), +- Error::CrossCompilation => f.write_str( +- "pkg-config has not been configured to support cross-compilation.\n\ +- \n\ +- Install a sysroot for the target platform and configure it via\n\ +- PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a\n\ +- cross-compiling wrapper for pkg-config and set it via\n\ +- PKG_CONFIG environment variable.", +- ), + Error::Command { + ref command, + ref cause, +@@ -219,7 +208,7 @@ impl fmt::Display for Error { + )?; + format_output(output, f) + } +- Error::__Nonexhaustive => panic!(), ++ Error::CrossCompilation | Error::__Nonexhaustive => panic!(), + } + } + } +@@ -411,6 +400,8 @@ impl Config { + if host == target { + return true; + } ++ // always enable PKG_CONFIG_ALLOW_CROSS override in Debian ++ return true; + + // pkg-config may not be aware of cross-compilation, and require + // a wrapper script that sets up platform-specific prefixes. +@@ -470,7 +461,11 @@ impl Config { + fn command(&self, name: &str, args: &[&str]) -> Command { + let exe = self + .targetted_env_var("PKG_CONFIG") +- .unwrap_or_else(|| OsString::from("pkg-config")); ++ .unwrap_or_else(|| { ++ self.env_var_os("DEB_HOST_GNU_TYPE") ++ .map(|mut t| { t.push(OsString::from("-pkg-config")); t }) ++ .unwrap_or_else(|| OsString::from("pkg-config")) ++ }); + let mut cmd = Command::new(exe); + if self.is_static(name) { + cmd.arg("--static"); +diff --git a/vendor/pkg-config/tests/test.rs b/vendor/pkg-config/tests/test.rs +index 4e04ac0..f884e46 100644 +--- a/vendor/pkg-config/tests/test.rs ++++ b/vendor/pkg-config/tests/test.rs +@@ -34,7 +34,6 @@ fn find(name: &str) -> Result<pkg_config::Library, Error> { + pkg_config::probe_library(name) + } + +-#[test] + fn cross_disabled() { + let _g = LOCK.lock(); + reset(); +@@ -46,7 +45,6 @@ fn cross_disabled() { + } + } + +-#[test] + fn cross_enabled() { + let _g = LOCK.lock(); + reset(); diff --git a/debian/patches/d-0002-mdbook-strip-embedded-libs.patch b/debian/patches/d-0002-mdbook-strip-embedded-libs.patch new file mode 100644 index 000000000..3916871a2 --- /dev/null +++ b/debian/patches/d-0002-mdbook-strip-embedded-libs.patch @@ -0,0 +1,420 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Sat, 2 Oct 2021 01:08:00 +0100 +Subject: d-0002-mdbook-strip-embedded-libs + +Comment: Use https://github.com/infinity0/mdBook/tree/debian to help you rebase the patch on top of a newer version. . Make sure the paths here match the ones in debian/rust-doc.links +--- + src/tools/linkchecker/main.rs | 28 ++++++- + vendor/mdbook/src/book/init.rs | 6 -- + .../src/renderer/html_handlebars/hbs_renderer.rs | 80 ++----------------- + .../mdbook/src/renderer/html_handlebars/search.rs | 2 - + vendor/mdbook/src/theme/index.hbs | 93 +--------------------- + vendor/mdbook/src/theme/mod.rs | 27 ------- + vendor/mdbook/src/theme/searcher/mod.rs | 2 - + 7 files changed, 35 insertions(+), 203 deletions(-) + +diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs +index a7c78d8..22927f8 100644 +--- a/src/tools/linkchecker/main.rs ++++ b/src/tools/linkchecker/main.rs +@@ -183,7 +183,17 @@ impl Checker { + for entry in t!(dir.read_dir()).map(|e| t!(e)) { + let path = entry.path(); + // Goes through symlinks +- let metadata = t!(fs::metadata(&path)); ++ let metadata = fs::metadata(&path); ++ if let Err(err) = metadata { ++ if let Ok(target) = fs::read_link(&path) { ++ if target.starts_with("/usr/share") { ++ // broken symlink to /usr/share, ok for our Debian build ++ return; ++ } ++ } ++ panic!("error at file {:?} while walking - {:?}", path, err) ++ } ++ let metadata = t!(metadata); + if metadata.is_dir() { + self.walk(&path, report); + } else { +@@ -196,7 +206,15 @@ impl Checker { + fn check(&mut self, file: &Path, report: &mut Report) { + let (pretty_path, entry) = self.load_file(file, report); + let source = match entry { +- FileEntry::Missing => panic!("missing file {:?} while walking", file), ++ FileEntry::Missing => { ++ if let Ok(target) = fs::read_link(&file) { ++ if target.starts_with("/usr/share") { ++ // broken symlink to /usr/share, ok for our Debian build ++ return; ++ } ++ } ++ panic!("missing file {:?} while walking", file) ++ } + FileEntry::Dir => unreachable!("never with `check` path"), + FileEntry::OtherFile => return, + FileEntry::Redirect { .. } => return, +@@ -261,6 +279,12 @@ impl Checker { + let (target_pretty_path, target_entry) = self.load_file(&path, report); + let (target_source, target_ids) = match target_entry { + FileEntry::Missing => { ++ if let Ok(target) = fs::read_link(&path) { ++ if target.starts_with("/usr/share") { ++ // broken symlink to /usr/share, ok for our Debian build ++ return; ++ } ++ } + if is_exception(file, &target_pretty_path) { + report.links_ignored_exception += 1; + } else { +diff --git a/vendor/mdbook/src/book/init.rs b/vendor/mdbook/src/book/init.rs +index 264c113..2b0ff3a 100644 +--- a/vendor/mdbook/src/book/init.rs ++++ b/vendor/mdbook/src/book/init.rs +@@ -151,12 +151,6 @@ impl BookBuilder { + let mut js = File::create(themedir.join("book.js"))?; + js.write_all(theme::JS)?; + +- let mut highlight_css = File::create(themedir.join("highlight.css"))?; +- highlight_css.write_all(theme::HIGHLIGHT_CSS)?; +- +- let mut highlight_js = File::create(themedir.join("highlight.js"))?; +- highlight_js.write_all(theme::HIGHLIGHT_JS)?; +- + Ok(()) + } + +diff --git a/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs b/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs +index b933a35..09b4a7a 100644 +--- a/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs ++++ b/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs +@@ -3,7 +3,7 @@ use crate::config::{BookConfig, Config, HtmlConfig, Playground, RustEdition}; + use crate::errors::*; + use crate::renderer::html_handlebars::helpers; + use crate::renderer::{RenderContext, Renderer}; +-use crate::theme::{self, playground_editor, Theme}; ++use crate::theme::{self, Theme}; + use crate::utils; + + use std::borrow::Cow; +@@ -11,6 +11,7 @@ use std::collections::BTreeMap; + use std::collections::HashMap; + use std::fs::{self, File}; + use std::path::{Path, PathBuf}; ++use std::os::unix::fs::symlink; + + use crate::utils::fs::get_404_output_file; + use handlebars::Handlebars; +@@ -232,80 +233,13 @@ impl HtmlHandlebars { + if let Some(contents) = &theme.favicon_svg { + write_file(destination, "favicon.svg", contents)?; + } +- write_file(destination, "highlight.css", &theme.highlight_css)?; + write_file(destination, "tomorrow-night.css", &theme.tomorrow_night_css)?; + write_file(destination, "ayu-highlight.css", &theme.ayu_highlight_css)?; +- write_file(destination, "highlight.js", &theme.highlight_js)?; +- write_file(destination, "clipboard.min.js", &theme.clipboard_js)?; +- write_file( +- destination, +- "FontAwesome/css/font-awesome.css", +- theme::FONT_AWESOME, +- )?; +- write_file( +- destination, +- "FontAwesome/fonts/fontawesome-webfont.eot", +- theme::FONT_AWESOME_EOT, +- )?; +- write_file( +- destination, +- "FontAwesome/fonts/fontawesome-webfont.svg", +- theme::FONT_AWESOME_SVG, +- )?; +- write_file( +- destination, +- "FontAwesome/fonts/fontawesome-webfont.ttf", +- theme::FONT_AWESOME_TTF, +- )?; +- write_file( +- destination, +- "FontAwesome/fonts/fontawesome-webfont.woff", +- theme::FONT_AWESOME_WOFF, +- )?; +- write_file( +- destination, +- "FontAwesome/fonts/fontawesome-webfont.woff2", +- theme::FONT_AWESOME_WOFF2, +- )?; +- write_file( +- destination, +- "FontAwesome/fonts/FontAwesome.ttf", +- theme::FONT_AWESOME_TTF, +- )?; +- if html_config.copy_fonts { +- write_file(destination, "fonts/fonts.css", theme::fonts::CSS)?; +- for (file_name, contents) in theme::fonts::LICENSES.iter() { +- write_file(destination, file_name, contents)?; +- } +- for (file_name, contents) in theme::fonts::OPEN_SANS.iter() { +- write_file(destination, file_name, contents)?; +- } +- write_file( +- destination, +- theme::fonts::SOURCE_CODE_PRO.0, +- theme::fonts::SOURCE_CODE_PRO.1, +- )?; +- } +- +- let playground_config = &html_config.playground; +- +- // Ace is a very large dependency, so only load it when requested +- if playground_config.editable && playground_config.copy_js { +- // Load the editor +- write_file(destination, "editor.js", playground_editor::JS)?; +- write_file(destination, "ace.js", playground_editor::ACE_JS)?; +- write_file(destination, "mode-rust.js", playground_editor::MODE_RUST_JS)?; +- write_file( +- destination, +- "theme-dawn.js", +- playground_editor::THEME_DAWN_JS, +- )?; +- write_file( +- destination, +- "theme-tomorrow_night.js", +- playground_editor::THEME_TOMORROW_NIGHT_JS, +- )?; +- } ++ symlink("/usr/share/fonts-font-awesome/css/font-awesome.min.css", destination.join("css/font-awesome.min.css"))?; ++ symlink("/usr/share/fonts-font-awesome/fonts", destination.join("fonts"))?; ++ symlink("/usr/share/javascript/highlight.js/styles/atelier-dune-light.css", destination.join("highlight.css"))?; ++ symlink("/usr/share/javascript/highlight.js/highlight.js", destination.join("highlight.js"))?; ++ symlink("/usr/share/javascript/mathjax/MathJax.js", destination.join("MathJax.js"))?; + + Ok(()) + } +diff --git a/vendor/mdbook/src/renderer/html_handlebars/search.rs b/vendor/mdbook/src/renderer/html_handlebars/search.rs +index c3b944c..d4bbe35 100644 +--- a/vendor/mdbook/src/renderer/html_handlebars/search.rs ++++ b/vendor/mdbook/src/renderer/html_handlebars/search.rs +@@ -52,8 +52,6 @@ pub fn create_files(search_config: &Search, destination: &Path, book: &Book) -> + format!("Object.assign(window.search, {});", index).as_bytes(), + )?; + utils::fs::write_file(destination, "searcher.js", searcher::JS)?; +- utils::fs::write_file(destination, "mark.min.js", searcher::MARK_JS)?; +- utils::fs::write_file(destination, "elasticlunr.min.js", searcher::ELASTICLUNR_JS)?; + debug!("Copying search files ✓"); + } + +diff --git a/vendor/mdbook/src/theme/index.hbs b/vendor/mdbook/src/theme/index.hbs +index 18d984a..4a0e2d1 100644 +--- a/vendor/mdbook/src/theme/index.hbs ++++ b/vendor/mdbook/src/theme/index.hbs +@@ -34,10 +34,7 @@ + {{/if}} + + <!-- Fonts --> +- <link rel="stylesheet" href="{{ path_to_root }}FontAwesome/css/font-awesome.css"> +- {{#if copy_fonts}} +- <link rel="stylesheet" href="{{ path_to_root }}fonts/fonts.css"> +- {{/if}} ++ <link rel="stylesheet" href="{{ path_to_root }}css/font-awesome.min.css"> + + <!-- Highlight.js Stylesheets --> + <link rel="stylesheet" href="{{ path_to_root }}highlight.css"> +@@ -51,7 +48,7 @@ + + {{#if mathjax_support}} + <!-- MathJax --> +- <script async type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> ++ <script async type="text/javascript" src="MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + {{/if}} + </head> + <body> +@@ -61,46 +58,6 @@ + var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}"; + </script> + +- <!-- Work around some values being stored in localStorage wrapped in quotes --> +- <script type="text/javascript"> +- try { +- var theme = localStorage.getItem('mdbook-theme'); +- var sidebar = localStorage.getItem('mdbook-sidebar'); +- +- if (theme.startsWith('"') && theme.endsWith('"')) { +- localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1)); +- } +- +- if (sidebar.startsWith('"') && sidebar.endsWith('"')) { +- localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1)); +- } +- } catch (e) { } +- </script> +- +- <!-- Set the theme before any content is loaded, prevents flash --> +- <script type="text/javascript"> +- var theme; +- try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } +- if (theme === null || theme === undefined) { theme = default_theme; } +- var html = document.querySelector('html'); +- html.classList.remove('no-js') +- html.classList.remove('{{ default_theme }}') +- html.classList.add(theme); +- html.classList.add('js'); +- </script> +- +- <!-- Hide / unhide sidebar before it is displayed --> +- <script type="text/javascript"> +- var html = document.querySelector('html'); +- var sidebar = 'hidden'; +- if (document.body.clientWidth >= 1080) { +- try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { } +- sidebar = sidebar || 'visible'; +- } +- html.classList.remove('sidebar-visible'); +- html.classList.add("sidebar-" + sidebar); +- </script> +- + <nav id="sidebar" class="sidebar" aria-label="Table of contents"> + <div class="sidebar-scrollbox"> + {{#toc}}{{/toc}} +@@ -238,52 +195,6 @@ + </script> + {{/if}} + +- {{#if google_analytics}} +- <!-- Google Analytics Tag --> +- <script type="text/javascript"> +- var localAddrs = ["localhost", "127.0.0.1", ""]; +- +- // make sure we don't activate google analytics if the developer is +- // inspecting the book locally... +- if (localAddrs.indexOf(document.location.hostname) === -1) { +- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ +- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), +- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) +- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); +- +- ga('create', '{{google_analytics}}', 'auto'); +- ga('send', 'pageview'); +- } +- </script> +- {{/if}} +- +- {{#if playground_line_numbers}} +- <script type="text/javascript"> +- window.playground_line_numbers = true; +- </script> +- {{/if}} +- +- {{#if playground_copyable}} +- <script type="text/javascript"> +- window.playground_copyable = true; +- </script> +- {{/if}} +- +- {{#if playground_js}} +- <script src="{{ path_to_root }}ace.js" type="text/javascript" charset="utf-8"></script> +- <script src="{{ path_to_root }}editor.js" type="text/javascript" charset="utf-8"></script> +- <script src="{{ path_to_root }}mode-rust.js" type="text/javascript" charset="utf-8"></script> +- <script src="{{ path_to_root }}theme-dawn.js" type="text/javascript" charset="utf-8"></script> +- <script src="{{ path_to_root }}theme-tomorrow_night.js" type="text/javascript" charset="utf-8"></script> +- {{/if}} +- +- {{#if search_js}} +- <script src="{{ path_to_root }}elasticlunr.min.js" type="text/javascript" charset="utf-8"></script> +- <script src="{{ path_to_root }}mark.min.js" type="text/javascript" charset="utf-8"></script> +- <script src="{{ path_to_root }}searcher.js" type="text/javascript" charset="utf-8"></script> +- {{/if}} +- +- <script src="{{ path_to_root }}clipboard.min.js" type="text/javascript" charset="utf-8"></script> + <script src="{{ path_to_root }}highlight.js" type="text/javascript" charset="utf-8"></script> + <script src="{{ path_to_root }}book.js" type="text/javascript" charset="utf-8"></script> + +diff --git a/vendor/mdbook/src/theme/mod.rs b/vendor/mdbook/src/theme/mod.rs +index a1ee18a..d059f01 100644 +--- a/vendor/mdbook/src/theme/mod.rs ++++ b/vendor/mdbook/src/theme/mod.rs +@@ -1,9 +1,5 @@ + #![allow(missing_docs)] + +-pub mod playground_editor; +- +-pub mod fonts; +- + #[cfg(feature = "search")] + pub mod searcher; + +@@ -24,19 +20,8 @@ pub static VARIABLES_CSS: &[u8] = include_bytes!("css/variables.css"); + pub static FAVICON_PNG: &[u8] = include_bytes!("favicon.png"); + pub static FAVICON_SVG: &[u8] = include_bytes!("favicon.svg"); + pub static JS: &[u8] = include_bytes!("book.js"); +-pub static HIGHLIGHT_JS: &[u8] = include_bytes!("highlight.js"); + pub static TOMORROW_NIGHT_CSS: &[u8] = include_bytes!("tomorrow-night.css"); +-pub static HIGHLIGHT_CSS: &[u8] = include_bytes!("highlight.css"); + pub static AYU_HIGHLIGHT_CSS: &[u8] = include_bytes!("ayu-highlight.css"); +-pub static CLIPBOARD_JS: &[u8] = include_bytes!("clipboard.min.js"); +-pub static FONT_AWESOME: &[u8] = include_bytes!("FontAwesome/css/font-awesome.min.css"); +-pub static FONT_AWESOME_EOT: &[u8] = include_bytes!("FontAwesome/fonts/fontawesome-webfont.eot"); +-pub static FONT_AWESOME_SVG: &[u8] = include_bytes!("FontAwesome/fonts/fontawesome-webfont.svg"); +-pub static FONT_AWESOME_TTF: &[u8] = include_bytes!("FontAwesome/fonts/fontawesome-webfont.ttf"); +-pub static FONT_AWESOME_WOFF: &[u8] = include_bytes!("FontAwesome/fonts/fontawesome-webfont.woff"); +-pub static FONT_AWESOME_WOFF2: &[u8] = +- include_bytes!("FontAwesome/fonts/fontawesome-webfont.woff2"); +-pub static FONT_AWESOME_OTF: &[u8] = include_bytes!("FontAwesome/fonts/FontAwesome.otf"); + + /// The `Theme` struct should be used instead of the static variables because + /// the `new()` method will look if the user has a theme directory in their +@@ -57,11 +42,8 @@ pub struct Theme { + pub favicon_png: Option<Vec<u8>>, + pub favicon_svg: Option<Vec<u8>>, + pub js: Vec<u8>, +- pub highlight_css: Vec<u8>, + pub tomorrow_night_css: Vec<u8>, + pub ayu_highlight_css: Vec<u8>, +- pub highlight_js: Vec<u8>, +- pub clipboard_js: Vec<u8>, + } + + impl Theme { +@@ -91,9 +73,6 @@ impl Theme { + theme_dir.join("css/variables.css"), + &mut theme.variables_css, + ), +- (theme_dir.join("highlight.js"), &mut theme.highlight_js), +- (theme_dir.join("clipboard.min.js"), &mut theme.clipboard_js), +- (theme_dir.join("highlight.css"), &mut theme.highlight_css), + ( + theme_dir.join("tomorrow-night.css"), + &mut theme.tomorrow_night_css, +@@ -156,11 +135,8 @@ impl Default for Theme { + favicon_png: Some(FAVICON_PNG.to_owned()), + favicon_svg: Some(FAVICON_SVG.to_owned()), + js: JS.to_owned(), +- highlight_css: HIGHLIGHT_CSS.to_owned(), + tomorrow_night_css: TOMORROW_NIGHT_CSS.to_owned(), + ayu_highlight_css: AYU_HIGHLIGHT_CSS.to_owned(), +- highlight_js: HIGHLIGHT_JS.to_owned(), +- clipboard_js: CLIPBOARD_JS.to_owned(), + } + } + } +@@ -243,11 +219,8 @@ mod tests { + favicon_png: Some(Vec::new()), + favicon_svg: Some(Vec::new()), + js: Vec::new(), +- highlight_css: Vec::new(), + tomorrow_night_css: Vec::new(), + ayu_highlight_css: Vec::new(), +- highlight_js: Vec::new(), +- clipboard_js: Vec::new(), + }; + + assert_eq!(got, empty); +diff --git a/vendor/mdbook/src/theme/searcher/mod.rs b/vendor/mdbook/src/theme/searcher/mod.rs +index d5029db..59eda8a 100644 +--- a/vendor/mdbook/src/theme/searcher/mod.rs ++++ b/vendor/mdbook/src/theme/searcher/mod.rs +@@ -2,5 +2,3 @@ + //! the "search" cargo feature is disabled. + + pub static JS: &[u8] = include_bytes!("searcher.js"); +-pub static MARK_JS: &[u8] = include_bytes!("mark.min.js"); +-pub static ELASTICLUNR_JS: &[u8] = include_bytes!("elasticlunr.min.js"); diff --git a/debian/patches/d-0003-cc-psm-rebuild-wasm32.patch b/debian/patches/d-0003-cc-psm-rebuild-wasm32.patch new file mode 100644 index 000000000..4d793cb81 --- /dev/null +++ b/debian/patches/d-0003-cc-psm-rebuild-wasm32.patch @@ -0,0 +1,48 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Sat, 2 Oct 2021 01:08:00 +0100 +Subject: d-0003-cc-psm-rebuild-wasm32 + +--- + vendor/cc/src/lib.rs | 2 +- + vendor/psm/build.rs | 7 ++----- + 2 files changed, 3 insertions(+), 6 deletions(-) + +diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs +index e3a2b98..9312931 100644 +--- a/vendor/cc/src/lib.rs ++++ b/vendor/cc/src/lib.rs +@@ -2238,7 +2238,7 @@ impl Build { + || target == "wasm32-unknown-wasi" + || target == "wasm32-unknown-unknown" + { +- "clang".to_string() ++ "rust-clang".to_string() + } else if target.contains("vxworks") { + if self.cpp { + "wr-c++".to_string() +diff --git a/vendor/psm/build.rs b/vendor/psm/build.rs +index 01a13bf..30bd68d 100644 +--- a/vendor/psm/build.rs ++++ b/vendor/psm/build.rs +@@ -50,7 +50,7 @@ fn find_assembly( + ("sparc", _, _, _) => Some(("src/arch/sparc_sysv.s", true)), + ("riscv32", _, _, _) => Some(("src/arch/riscv.s", true)), + ("riscv64", _, _, _) => Some(("src/arch/riscv64.s", true)), +- ("wasm32", _, _, _) => Some(("src/arch/wasm32.o", true)), ++ ("wasm32", _, _, _) => Some(("src/arch/wasm32.s", true)), + _ => None, + } + } +@@ -94,11 +94,8 @@ fn main() { + cfg.define(&*format!("CFG_TARGET_ENV_{}", env), None); + } + +- // For wasm targets we ship a precompiled `*.o` file so we just pass that +- // directly to `ar` to assemble an archive. Otherwise we're actually +- // compiling the source assembly file. + if asm.ends_with(".o") { +- cfg.object(asm); ++ panic!("Debian does not allow embedded object files in source code") + } else { + cfg.file(asm); + } diff --git a/debian/patches/d-0004-clippy-feature-sync.patch b/debian/patches/d-0004-clippy-feature-sync.patch new file mode 100644 index 000000000..8c0c0fb97 --- /dev/null +++ b/debian/patches/d-0004-clippy-feature-sync.patch @@ -0,0 +1,37 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Sat, 2 Oct 2021 01:08:00 +0100 +Subject: d-0004-clippy-feature-sync + +enable features needed by rustfmt to make build system happy and speedup build. +this is what rustc_workspace_hack does in the upstream build. +--- + src/tools/clippy/Cargo.toml | 3 ++- + src/tools/rustfmt/Cargo.toml | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/tools/clippy/Cargo.toml b/src/tools/clippy/Cargo.toml +index 1aad7cf..705a880 100644 +--- a/src/tools/clippy/Cargo.toml ++++ b/src/tools/clippy/Cargo.toml +@@ -42,7 +43,7 @@ if_chain = "1.0" + itertools = "0.10.1" + quote = "1.0" + serde = { version = "1.0.125", features = ["derive"] } +-syn = { version = "1.0", features = ["full"] } ++syn = { version = "1.0", features = ["full", "visit"] } + futures = "0.3" + parking_lot = "0.12" + tokio = { version = "1", features = ["io-util"] } +diff --git a/src/tools/rustfmt/Cargo.toml b/src/tools/rustfmt/Cargo.toml +index 27b91f2..12d1567 100644 +--- a/src/tools/rustfmt/Cargo.toml ++++ b/src/tools/rustfmt/Cargo.toml +@@ -49,7 +49,7 @@ lazy_static = "1.4" + log = "0.4" + regex = "1.5" + serde = { version = "1.0", features = ["derive"] } +-serde_json = "1.0" ++serde_json = { version = "1.0", features = ["unbounded_depth"] } + term = "0.7" + thiserror = "1.0" + toml = "0.5" diff --git a/debian/patches/d-0005-no-jemalloc.patch b/debian/patches/d-0005-no-jemalloc.patch new file mode 100644 index 000000000..6d8620a01 --- /dev/null +++ b/debian/patches/d-0005-no-jemalloc.patch @@ -0,0 +1,46 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Sat, 2 Oct 2021 01:08:00 +0100 +Subject: d-0005-no-jemalloc + +--- + compiler/rustc/Cargo.toml | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/compiler/rustc/Cargo.toml b/compiler/rustc/Cargo.toml +index 27ee3dd..87fb29f 100644 +--- a/compiler/rustc/Cargo.toml ++++ b/compiler/rustc/Cargo.toml +@@ -13,13 +13,7 @@ rustc_codegen_ssa = { path = "../rustc_codegen_ssa" } + # crate is intended to be used by stable MIR consumers, which are not in-tree + rustc_smir = { path = "../rustc_smir" } + +-[dependencies.jemalloc-sys] +-version = "0.5.0" +-optional = true +-features = ['unprefixed_malloc_on_supported_platforms'] +- + [features] +-jemalloc = ['jemalloc-sys'] + llvm = ['rustc_driver/llvm'] + max_level_info = ['rustc_driver/max_level_info'] + rustc_use_parallel_compiler = ['rustc_driver/rustc_use_parallel_compiler'] +diff --git a/src/tools/rust-analyzer/crates/profile/Cargo.toml b/src/tools/rust-analyzer/crates/profile/Cargo.toml +index 99d4179dc20..0b78a45a24b 100644 +--- a/src/tools/rust-analyzer/crates/profile/Cargo.toml ++++ b/src/tools/rust-analyzer/crates/profile/Cargo.toml +@@ -15,7 +15,6 @@ cfg-if = "1.0.0" + libc = "0.2.126" + la-arena = { version = "0.3.0", path = "../../lib/la-arena" } + countme = { version = "3.0.1", features = ["enable"] } +-jemalloc-ctl = { version = "0.5.0", package = "tikv-jemalloc-ctl", optional = true } + + [target.'cfg(target_os = "linux")'.dependencies] + perf-event = "0.4.7" +@@ -24,7 +25,6 @@ winapi = { version = "0.3.9", features = ["processthreadsapi", "psapi"] } + + [features] + cpu_profiler = [] +-jemalloc = ["jemalloc-ctl"] + + # Uncomment to enable for the whole crate graph + # default = [ "cpu_profiler" ] diff --git a/debian/patches/d-armel-fix-lldb.patch b/debian/patches/d-armel-fix-lldb.patch new file mode 100644 index 000000000..12d64570b --- /dev/null +++ b/debian/patches/d-armel-fix-lldb.patch @@ -0,0 +1,19 @@ +run panics if lldb is not installed and no output is produced.. + +diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs +index c0fa8c9acb..2b5559efc7 100644 +--- a/src/bootstrap/test.rs ++++ b/src/bootstrap/test.rs +@@ -1476,7 +1476,11 @@ note: if you're sure you want to do this, please open an issue as to why. In the + .ok(); + if let Some(ref vers) = lldb_version { + cmd.arg("--lldb-version").arg(vers); +- let lldb_python_dir = run(Command::new(lldb_exe).arg("-P")).ok(); ++ let lldb_python_dir = Command::new(lldb_exe) ++ .arg("-P") ++ .output() ++ .map(|output| String::from_utf8_lossy(&output.stdout).to_string()) ++ .ok(); + if let Some(ref dir) = lldb_python_dir { + cmd.arg("--lldb-python-dir").arg(dir); + } diff --git a/debian/patches/d-bootstrap-cargo-check-cfg.patch b/debian/patches/d-bootstrap-cargo-check-cfg.patch new file mode 100644 index 000000000..e15707199 --- /dev/null +++ b/debian/patches/d-bootstrap-cargo-check-cfg.patch @@ -0,0 +1,19 @@ +our cargo doesn't know about the 'output' part yet, this patch can be dropped +with cargo >= 0.64 + +diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs +index 0ab4824ac0a..76c476f449b 100644 +--- a/src/bootstrap/builder.rs ++++ b/src/bootstrap/builder.rs +@@ -1480,9 +1480,9 @@ impl<'a> Builder<'a> { + // complete list of features, so for that reason we don't enable checking of + // features for std crates. + cargo.arg(if mode != Mode::Std { +- "-Zcheck-cfg=names,values,output,features" ++ "-Zcheck-cfg=names,values,features" + } else { +- "-Zcheck-cfg=names,values,output" ++ "-Zcheck-cfg=names,values" + }); + + // Add extra cfg not defined in/by rustc diff --git a/debian/patches/d-bootstrap-cargo-doc-paths.patch b/debian/patches/d-bootstrap-cargo-doc-paths.patch new file mode 100644 index 000000000..17c284f8b --- /dev/null +++ b/debian/patches/d-bootstrap-cargo-doc-paths.patch @@ -0,0 +1,243 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: Fix links to cargo-doc + +We package cargo docs in a slightly different location; also tweak linkchecker +to not fail these links. +--- + .../edition-guide/src/editions/advanced-migrations.md | 14 +++++++------- + ...ansitioning-an-existing-project-to-a-new-edition.md | 4 ++-- + .../src/rust-2021/default-cargo-resolver.md | 10 +++++----- + src/doc/index.md | 2 +- + src/doc/reference/src/conditional-compilation.md | 2 +- + src/doc/reference/src/introduction.md | 4 ++-- + src/doc/reference/src/linkage.md | 2 +- + src/doc/reference/src/procedural-macros.md | 2 +- + src/doc/rustc/src/tests/index.md | 4 ++-- + src/doc/rustc/src/what-is-rustc.md | 2 +- + src/doc/edition-guide/book.toml | 18 +++++++++--------- + src/tools/linkchecker/main.rs | 6 ++++++ + 12 files changed, 38 insertions(+), 32 deletions(-) + +diff --git a/src/doc/edition-guide/src/editions/advanced-migrations.md b/src/doc/edition-guide/src/editions/advanced-migrations.md +index b804ae6..b8136d7 100644 +--- a/src/doc/edition-guide/src/editions/advanced-migrations.md ++++ b/src/doc/edition-guide/src/editions/advanced-migrations.md +@@ -186,18 +186,18 @@ Afterwards, the line with `extern crate rand;` in `src/lib.rs` will be removed. + + We're now more idiomatic, and we didn't have to fix our code manually! + +-[`cargo check`]: ../../cargo/commands/cargo-check.html +-[`cargo fix`]: ../../cargo/commands/cargo-fix.html ++[`cargo check`]: ../../../cargo-doc/doc/commands/cargo-check.html ++[`cargo fix`]: ../../../cargo-doc/doc/commands/cargo-fix.html + [`explicit-outlives-requirements`]: ../../rustc/lints/listing/allowed-by-default.html#explicit-outlives-requirements + [`keyword-idents`]: ../../rustc/lints/listing/allowed-by-default.html#keyword-idents + [`rustfix`]: https://github.com/rust-lang/rustfix + [`unused-extern-crates`]: ../../rustc/lints/listing/allowed-by-default.html#unused-extern-crates +-[Cargo features]: ../../cargo/reference/features.html +-[Cargo package]: ../../cargo/reference/manifest.html#the-package-section +-[Cargo targets]: ../../cargo/reference/cargo-targets.html +-[Cargo workspace]: ../../cargo/reference/workspaces.html ++[Cargo features]: ../../../cargo-doc/doc/reference/features.html ++[Cargo package]: ../../../cargo-doc/doc/reference/manifest.html#the-package-section ++[Cargo targets]: ../../../cargo-doc/doc/reference/cargo-targets.html ++[Cargo workspace]: ../../../cargo-doc/doc/reference/workspaces.html + [CLI flag]: ../../rustc/lints/levels.html#via-compiler-flag +-[Code generation]: ../../cargo/reference/build-script-examples.html#code-generation ++[Code generation]: ../../../cargo-doc/doc/reference/build-script-examples.html#code-generation + [conditional compilation]: ../../reference/conditional-compilation.html + [documentation tests]: ../../rustdoc/documentation-tests.html + [JSON messages]: ../../rustc/json.html +diff --git a/src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md b/src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md +index 4343529..7f7f0b6 100644 +--- a/src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md ++++ b/src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md +@@ -83,7 +83,7 @@ If new warnings are issued, you may want to consider running `cargo fix` again ( + + Congrats! Your code is now valid in both Rust 2015 and Rust 2018! + +-[`cargo fix`]: ../../cargo/commands/cargo-fix.html +-[`cargo test`]: ../../cargo/commands/cargo-test.html ++[`cargo fix`]: ../../../cargo-doc/doc/commands/cargo-fix.html ++[`cargo test`]: ../../../cargo-doc/doc/commands/cargo-test.html + [Advanced migration strategies]: advanced-migrations.md + [nightly channel]: ../../book/appendix-07-nightly-rust.html +diff --git a/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md b/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md +index 9abc5a6..dff04a4 100644 +--- a/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md ++++ b/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md +@@ -21,11 +21,11 @@ The new feature resolver no longer merges all requested features for + crates that are depended on in multiple ways. + See [the announcement of Rust 1.51][5] for details. + +-[4]: ../../cargo/reference/resolver.html#feature-resolver-version-2 ++[4]: ../../../cargo-doc/doc/reference/resolver.html#feature-resolver-version-2 + [5]: https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver +-[workspace]: ../../cargo/reference/workspaces.html +-[virtual workspace]: ../../cargo/reference/workspaces.html#virtual-manifest +-[`resolver` field]: ../../cargo/reference/resolver.html#resolver-versions ++[workspace]: ../../../cargo-doc/doc/reference/workspaces.html ++[virtual workspace]: ../../../cargo-doc/doc/reference/workspaces.html#virtual-manifest ++[`resolver` field]: ../../../cargo-doc/doc/reference/resolver.html#resolver-versions + + ## Migration + +@@ -176,4 +176,4 @@ This snippet of output shows that the project `foo` depends on `bar` with the "d + Then, `bar` depends on `bstr` as a build-dependency with the "default" feature. + We can further see that `bstr`'s "default" feature enables "unicode" (among other features). + +-[`cargo tree`]: ../../cargo/commands/cargo-tree.html ++[`cargo tree`]: ../../../cargo-doc/doc/commands/cargo-tree.html +diff --git a/src/doc/index.md b/src/doc/index.md +index 2c92d5e..9be58d5 100644 +--- a/src/doc/index.md ++++ b/src/doc/index.md +@@ -87,7 +87,7 @@ accomplishing various tasks. + + ## The Cargo Book + +-[The Cargo Book](cargo/index.html) is a guide to Cargo, Rust's build tool and dependency manager. ++[The Cargo Book](../../cargo-doc/doc/index.html) is a guide to Cargo, Rust's build tool and dependency manager. + + ## The Rustdoc Book + +diff --git a/src/doc/reference/src/conditional-compilation.md b/src/doc/reference/src/conditional-compilation.md +index 6966cec..0ca3589 100644 +--- a/src/doc/reference/src/conditional-compilation.md ++++ b/src/doc/reference/src/conditional-compilation.md +@@ -351,6 +351,6 @@ println!("I'm running on a {} machine!", machine_kind); + [`target_feature` attribute]: attributes/codegen.md#the-target_feature-attribute + [attribute]: attributes.md + [attributes]: attributes.md +-[cargo-feature]: ../cargo/reference/features.html ++[cargo-feature]: ../../cargo-doc/doc/reference/features.html + [crate type]: linkage.md + [static C runtime]: linkage.md#static-and-dynamic-c-runtimes +diff --git a/src/doc/reference/src/introduction.md b/src/doc/reference/src/introduction.md +index 9038efd..dbfbd39 100644 +--- a/src/doc/reference/src/introduction.md ++++ b/src/doc/reference/src/introduction.md +@@ -135,8 +135,8 @@ We also want the reference to be as normative as possible, so if you see anythin + [the Rust Reference repository]: https://github.com/rust-lang/reference/ + [Unstable Book]: https://doc.rust-lang.org/nightly/unstable-book/ + [_Expression_]: expressions.md +-[cargo book]: ../cargo/index.html +-[cargo reference]: ../cargo/reference/index.html ++[cargo book]: ../../cargo-doc/doc/index.html ++[cargo reference]: ../../cargo-doc/doc/reference/index.html + [expressions chapter]: expressions.html + [file an issue]: https://github.com/rust-lang/reference/issues + [lifetime of temporaries]: expressions.html#temporaries +diff --git a/src/doc/reference/src/linkage.md b/src/doc/reference/src/linkage.md +index b152005..14277bf 100644 +--- a/src/doc/reference/src/linkage.md ++++ b/src/doc/reference/src/linkage.md +@@ -201,7 +201,7 @@ fn main() { + } + ``` + +-[cargo]: ../cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts ++[cargo]: ../../cargo-doc/doc/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts + + To use this feature locally, you typically will use the `RUSTFLAGS` environment + variable to specify flags to the compiler through Cargo. For example to compile +diff --git a/src/doc/reference/src/procedural-macros.md b/src/doc/reference/src/procedural-macros.md +index d983394..6f363f6 100644 +--- a/src/doc/reference/src/procedural-macros.md ++++ b/src/doc/reference/src/procedural-macros.md +@@ -331,7 +331,7 @@ Note that neither declarative nor proced + their equivalent `#[doc = r"str"]` attributes when passed to macros. + + [Attribute macros]: #attribute-macros +-[Cargo's build scripts]: ../cargo/reference/build-scripts.html ++[Cargo's build scripts]: ../../cargo-doc/doc/reference/build-scripts.html + [Derive macros]: #derive-macros + [Function-like macros]: #function-like-procedural-macros + [`Delimiter::None`]: ../proc_macro/enum.Delimiter.html#variant.None +diff --git a/src/doc/rustc/src/tests/index.md b/src/doc/rustc/src/tests/index.md +index 32baed9..53c97f8 100644 +--- a/src/doc/rustc/src/tests/index.md ++++ b/src/doc/rustc/src/tests/index.md +@@ -301,7 +301,7 @@ Experimental support for using custom test harnesses is available on the + [`--test` option]: ../command-line-arguments.md#option-test + [`-Z panic-abort-tests`]: https://github.com/rust-lang/rust/issues/67650 + [`available_parallelism`]: ../../std/thread/fn.available_parallelism.html +-[`cargo test`]: ../../cargo/commands/cargo-test.html ++[`cargo test`]: ../../../cargo-doc/doc/commands/cargo-test.html + [`libtest`]: ../../test/index.html + [`main` function]: ../../reference/crates-and-source-files.html#main-functions + [`Result`]: ../../std/result/index.html +@@ -311,7 +311,7 @@ Experimental support for using custom test harnesses is available on the + [attribute-should_panic]: ../../reference/attributes/testing.html#the-should_panic-attribute + [attribute-test]: ../../reference/attributes/testing.html#the-test-attribute + [bench-docs]: ../../unstable-book/library-features/test.html +-[Cargo]: ../../cargo/index.html ++[Cargo]: ../../../cargo-doc/doc/index.html + [crate type]: ../../reference/linkage.html + [custom_test_frameworks documentation]: ../../unstable-book/language-features/custom-test-frameworks.html + [nightly channel]: ../../book/appendix-07-nightly-rust.html +diff --git a/src/doc/rustc/src/what-is-rustc.md b/src/doc/rustc/src/what-is-rustc.md +index 39a05cf..d106986 100644 +--- a/src/doc/rustc/src/what-is-rustc.md ++++ b/src/doc/rustc/src/what-is-rustc.md +@@ -5,7 +5,7 @@ language, provided by the project itself. Compilers take your source code and + produce binary code, either as a library or executable. + + Most Rust programmers don't invoke `rustc` directly, but instead do it through +-[Cargo](../cargo/index.html). It's all in service of `rustc` though! If you ++[Cargo](../../cargo-doc/doc/index.html). It's all in service of `rustc` though! If you + want to see how Cargo calls `rustc`, you can + + ```bash +diff --git a/src/doc/edition-guide/book.toml b/src/doc/edition-guide/book.toml +index 8d8b263..8d31dfe 100644 +--- a/src/doc/edition-guide/book.toml ++++ b/src/doc/edition-guide/book.toml +@@ -53,15 +53,15 @@ git-repository-url = "https://github.com/rust-lang/edition-guide" + "/rust-2018/the-compiler/incremental-compilation-for-faster-compiles.html" = "https://blog.rust-lang.org/2018/02/15/Rust-1.24.html#incremental-compilation" + "/rust-2018/the-compiler/an-attribute-for-deprecation.html" = "../../../reference/attributes/diagnostics.html#the-deprecated-attribute" + "/rust-2018/rustup-for-managing-rust-versions.html" = "https://rust-lang.github.io/rustup/" +-"/rust-2018/cargo-and-crates-io/index.html" = "../../../cargo/index.html" +-"/rust-2018/cargo-and-crates-io/cargo-check-for-faster-checking.html" = "../../../cargo/commands/cargo-check.html" +-"/rust-2018/cargo-and-crates-io/cargo-install-for-easy-installation-of-tools.html" = "../../../cargo/commands/cargo-install.html" ++"/rust-2018/cargo-and-crates-io/index.html" = "../../../../cargo-doc/doc/index.html" ++"/rust-2018/cargo-and-crates-io/cargo-check-for-faster-checking.html" = "../../../../cargo-doc/doc/commands/cargo-check.html" ++"/rust-2018/cargo-and-crates-io/cargo-install-for-easy-installation-of-tools.html" = "../../../../cargo-doc/doc/commands/cargo-install.html" + "/rust-2018/cargo-and-crates-io/cargo-new-defaults-to-a-binary-project.html" = "https://blog.rust-lang.org/2018/03/29/Rust-1.25.html#cargo-features" +-"/rust-2018/cargo-and-crates-io/cargo-rustc-for-passing-arbitrary-flags-to-rustc.html" = "../../../cargo/commands/cargo-rustc.html" +-"/rust-2018/cargo-and-crates-io/cargo-workspaces-for-multi-package-projects.html" = "../../../cargo/reference/workspaces.html" +-"/rust-2018/cargo-and-crates-io/multi-file-examples.html" = "../../../cargo/guide/project-layout.html" +-"/rust-2018/cargo-and-crates-io/replacing-dependencies-with-patch.html" = "../../../cargo/reference/overriding-dependencies.html#the-patch-section" +-"/rust-2018/cargo-and-crates-io/cargo-can-use-a-local-registry-replacement.html" = "../../../cargo/reference/source-replacement.html" ++"/rust-2018/cargo-and-crates-io/cargo-rustc-for-passing-arbitrary-flags-to-rustc.html" = "../../../../cargo-doc/doc/commands/cargo-rustc.html" ++"/rust-2018/cargo-and-crates-io/cargo-workspaces-for-multi-package-projects.html" = "../../../../cargo-doc/doc/reference/workspaces.html" ++"/rust-2018/cargo-and-crates-io/multi-file-examples.html" = "../../../../cargo-doc/doc/guide/project-layout.html" ++"/rust-2018/cargo-and-crates-io/replacing-dependencies-with-patch.html" = "../../../../cargo-doc/doc/reference/overriding-dependencies.html#the-patch-section" ++"/rust-2018/cargo-and-crates-io/cargo-can-use-a-local-registry-replacement.html" = "../../../../cargo-doc/doc/reference/source-replacement.html" + "/rust-2018/cargo-and-crates-io/crates-io-disallows-wildcard-dependencies.html" = "https://blog.rust-lang.org/2016/01/21/Rust-1.6.html#cratesio-disallows-wildcards" + "/rust-2018/documentation/index.html" = "../../../index.html" + "/rust-2018/documentation/new-editions-of-the-book.html" = "../../../book/index.html" +@@ -93,4 +93,4 @@ git-repository-url = "https://github.com/rust-lang/edition-guide" + "/rust-next/future.html" = "../../std/future/trait.Future.html" + "/rust-next/alloc.html" = "https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#the-alloc-crate-is-stable" + "/rust-next/maybe-uninit.html" = "https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#maybeuninitt-instead-of-memuninitialized" +-"/rust-next/cargo-vendor.html" = "../../cargo/commands/cargo-vendor.html" ++"/rust-next/cargo-vendor.html" = "../../../cargo-doc/doc/commands/cargo-vendor.html" +diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs +index a22dc5f..c8d521a 100644 +--- a/src/tools/linkchecker/main.rs ++++ b/src/tools/linkchecker/main.rs +@@ -285,6 +285,12 @@ impl Checker { + return; + } + } ++ if let Some(path_str) = path.to_str() { ++ if path_str.contains("/cargo-doc/doc/") { ++ // link to related cargo-doc, ok for our Debian build ++ return; ++ } ++ } + if is_exception(file, &target_pretty_path) { + report.links_ignored_exception += 1; + } else { diff --git a/debian/patches/d-bootstrap-custom-debuginfo-path.patch b/debian/patches/d-bootstrap-custom-debuginfo-path.patch new file mode 100644 index 000000000..f955cffbf --- /dev/null +++ b/debian/patches/d-bootstrap-custom-debuginfo-path.patch @@ -0,0 +1,40 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: d-bootstrap-custom-debuginfo-path + +=================================================================== +--- + src/bootstrap/lib.rs | 5 ++--- + src/test/codegen/remap_path_prefix/issue-73167-remap-std.rs | 2 +- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs +index ddc92ba..259b56e 100644 +--- a/src/bootstrap/lib.rs ++++ b/src/bootstrap/lib.rs +@@ -1023,10 +1023,9 @@ impl Build { + + match which { + GitRepo::Rustc => { +- let sha = self.rust_sha().unwrap_or(&self.version); +- Some(format!("/rustc/{}", sha)) ++ Some(format!("/usr/src/rustc-{}", &self.version)) + } +- GitRepo::Llvm => Some(String::from("/rustc/llvm")), ++ GitRepo::Llvm => panic!("GitRepo::Llvm unsupported on Debian"), + } + } + +diff --git a/src/test/codegen/remap_path_prefix/issue-73167-remap-std.rs b/src/test/codegen/remap_path_prefix/issue-73167-remap-std.rs +index b66abc6..f6efe1e 100644 +--- a/src/test/codegen/remap_path_prefix/issue-73167-remap-std.rs ++++ b/src/test/codegen/remap_path_prefix/issue-73167-remap-std.rs +@@ -7,7 +7,7 @@ + // true automatically. If paths to std library hasn't been remapped, we use the + // above simulate-remapped-rust-src-base option to do it temporarily + +-// CHECK: !DIFile(filename: "{{/rustc/.*/library/std/src/panic.rs}}" ++// CHECK: !DIFile(filename: "{{/usr/src/rustc-.*/library/std/src/panic.rs}}" + fn main() { + std::thread::spawn(|| { + println!("hello"); diff --git a/debian/patches/d-bootstrap-disable-git.patch b/debian/patches/d-bootstrap-disable-git.patch new file mode 100644 index 000000000..ce02d60b3 --- /dev/null +++ b/debian/patches/d-bootstrap-disable-git.patch @@ -0,0 +1,45 @@ +From: Matthijs van Otterdijk <matthijs@wirevirt.net> +Date: Thu, 14 Jul 2022 13:17:38 +0200 +Subject: Don't check for cargo-vendor when building from (Debian's) git + +Forwarded: not-needed + +Forwarded: not-needed +--- + src/bootstrap/channel.rs | 6 +++++- + src/bootstrap/dist.rs | 5 ++++- + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/src/bootstrap/channel.rs b/src/bootstrap/channel.rs +index 1932a00..7974630 100644 +--- a/src/bootstrap/channel.rs ++++ b/src/bootstrap/channel.rs +@@ -29,7 +29,11 @@ pub struct Info { + impl GitInfo { + pub fn new(ignore_git: bool, dir: &Path) -> GitInfo { + // See if this even begins to look like a git dir +- if !dir.join(".git").exists() { ++ // ++ // Debian: force-enabling this block because the debian package is also in a git ++ // repository, but we don't want to parse gitinfo. This is needed for the ++ // bootstrap tests to work which running for Debian git. ++ if true || !dir.join(".git").exists() { + return GitInfo::Absent; + } + +diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs +index 6181a61..5fe3600 100644 +--- a/src/bootstrap/dist.rs ++++ b/src/bootstrap/dist.rs +@@ -899,7 +899,10 @@ impl Step for PlainSourceTarball { + } + + // If we're building from git sources, we need to vendor a complete distribution. +- if builder.rust_info.is_git() { ++ // ++ // Debian: disabling this block because the debian package is also in a git ++ // repository, but cargo-vendor should not be installed or run. ++ if false && builder.rust_info.is_git() { + // Ensure we have the submodules checked out. + builder.update_submodule(Path::new("src/tools/rust-analyzer")); + diff --git a/debian/patches/d-bootstrap-install-symlinks.patch b/debian/patches/d-bootstrap-install-symlinks.patch new file mode 100644 index 000000000..dbd902d9e --- /dev/null +++ b/debian/patches/d-bootstrap-install-symlinks.patch @@ -0,0 +1,36 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:38 +0200 +Subject: Install symlinks as-is, don't dereference them + +Our patch to mdbook installs symlinks to systems versions of font-awesome, +highlight, etc. Upstream mdbook otherwise doesn't use symlinks, so this +doesn't affect anything else that's already generated. +--- + src/tools/rust-installer/install-template.sh | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/tools/rust-installer/install-template.sh b/src/tools/rust-installer/install-template.sh +index e68be89..a19997b 100644 +--- a/src/tools/rust-installer/install-template.sh ++++ b/src/tools/rust-installer/install-template.sh +@@ -625,7 +625,10 @@ install_components() { + + maybe_backup_path "$_file_install_path" + +- if echo "$_file" | grep "^bin/" > /dev/null || test -x "$_src_dir/$_component/$_file" ++ if [ -h "$_src_dir/$_component/$_file" ] ++ then ++ run cp -d "$_src_dir/$_component/$_file" "$_file_install_path" ++ elif echo "$_file" | grep "^bin/" > /dev/null || test -x "$_src_dir/$_component/$_file" + then + run cp "$_src_dir/$_component/$_file" "$_file_install_path" + run chmod 755 "$_file_install_path" +@@ -647,7 +650,7 @@ install_components() { + + maybe_backup_path "$_file_install_path" + +- run cp -R "$_src_dir/$_component/$_file" "$_file_install_path" ++ run cp -dR "$_src_dir/$_component/$_file" "$_file_install_path" + critical_need_ok "failed to copy directory" + + # Set permissions. 0755 for dirs, 644 for files diff --git a/debian/patches/d-bootstrap-no-assume-tools.patch b/debian/patches/d-bootstrap-no-assume-tools.patch new file mode 100644 index 000000000..c72ec4d7f --- /dev/null +++ b/debian/patches/d-bootstrap-no-assume-tools.patch @@ -0,0 +1,27 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: d-bootstrap-no-assume-tools + +=================================================================== +--- + src/bootstrap/builder/tests.rs | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/bootstrap/builder/tests.rs b/src/bootstrap/builder/tests.rs +index 4ab502e..5ce7fc8 100644 +--- a/src/bootstrap/builder/tests.rs ++++ b/src/bootstrap/builder/tests.rs +@@ -364,9 +364,13 @@ mod dist { + #[test] + fn dist_only_cross_host() { + let b = TargetSelection::from_user("B"); ++ let mut tools = std::collections::HashSet::new(); ++ tools.insert("clippy".to_string()); ++ tools.insert("rustfmt".to_string()); + let mut config = configure(&["A", "B"], &["A", "B"]); + config.docs = false; + config.extended = true; ++ config.tools = Some(tools); + config.hosts = vec![b]; + let mut cache = run_build(&[], config); + diff --git a/debian/patches/d-bootstrap-old-cargo-compat.patch b/debian/patches/d-bootstrap-old-cargo-compat.patch new file mode 100644 index 000000000..e30d4a245 --- /dev/null +++ b/debian/patches/d-bootstrap-old-cargo-compat.patch @@ -0,0 +1,45 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: Backwards-compat for cargo 0.47 + + The flag being removed here was added in + https://github.com/rust-lang/cargo/pull/9404 released in cargo 0.54 + + This works around a feature introduced in this PR + https://github.com/rust-lang/cargo/pull/8640 released in cargo 0.53 + + Therefore it is not needed for Debian's current cargo 0.47. + + We can drop this patch when updating to cargo 0.54 and later. +--- + src/bootstrap/doc.rs | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs +index fb5395d..72eac7c 100644 +--- a/src/bootstrap/doc.rs ++++ b/src/bootstrap/doc.rs +@@ -446,7 +446,6 @@ impl Step for Std { + cargo + .arg("-p") + .arg(package) +- .arg("-Zskip-rustdoc-fingerprint") + .arg("--") + .arg("--markdown-css") + .arg("rust.css") +@@ -590,7 +589,6 @@ impl Step for Rustc { + cargo.rustdocflag("--generate-link-to-definition"); + compile::rustc_cargo(builder, &mut cargo, target); + cargo.arg("-Zunstable-options"); +- cargo.arg("-Zskip-rustdoc-fingerprint"); + + // Only include compiler crates, no dependencies of those, such as `libc`. + // Do link to dependencies on `docs.rs` however using `rustdoc-map`. +@@ -712,7 +710,6 @@ macro_rules! tool_doc { + &[], + ); + +- cargo.arg("-Zskip-rustdoc-fingerprint"); + // Only include compiler crates, no dependencies of those, such as `libc`. + cargo.arg("--no-deps"); + $( diff --git a/debian/patches/d-bootstrap-permit-symlink-in-docs.patch b/debian/patches/d-bootstrap-permit-symlink-in-docs.patch new file mode 100644 index 000000000..635e2e786 --- /dev/null +++ b/debian/patches/d-bootstrap-permit-symlink-in-docs.patch @@ -0,0 +1,14 @@ +partial revert of b9eedea4b0368fd1f00f204db75109ff444fab5b upstream + +diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs +index b1fae356d89..10ed8ffb714 100644 +--- a/src/bootstrap/dist.rs ++++ b/src/bootstrap/dist.rs +@@ -83,6 +83,7 @@ impl Step for Docs { + tarball.set_product_name("Rust Documentation"); + tarball.add_bulk_dir(&builder.doc_out(host), dest); + tarball.add_file(&builder.src.join("src/doc/robots.txt"), dest, 0o644); ++ tarball.permit_symlinks(true); + Some(tarball.generate()) + } + } diff --git a/debian/patches/d-bootstrap-read-beta-version-from-file.patch b/debian/patches/d-bootstrap-read-beta-version-from-file.patch new file mode 100644 index 000000000..a5b385d13 --- /dev/null +++ b/debian/patches/d-bootstrap-read-beta-version-from-file.patch @@ -0,0 +1,37 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:38 +0200 +Subject: d-bootstrap-read-beta-version-from-file + +=================================================================== +--- + src/bootstrap/lib.rs | 14 ++++++-------- + 1 file changed, 6 insertions(+), 8 deletions(-) + +diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs +index 68d387b..ddc92ba 100644 +--- a/src/bootstrap/lib.rs ++++ b/src/bootstrap/lib.rs +@@ -1266,14 +1266,15 @@ impl Build { + return s; + } + +- // Figure out how many merge commits happened since we branched off master. +- // That's our beta number! +- // (Note that we use a `..` range, not the `...` symmetric difference.) +- let count = +- output(self.config.git().arg("rev-list").arg("--count").arg("--merges").arg(format!( +- "refs/remotes/origin/{}..HEAD", +- self.config.stage0_metadata.config.nightly_branch +- ))); ++ // Debian: read beta number from "version" file, this is only available ++ // in the rustc upstream tarballs and not their git ++ let count = output( ++ Command::new("sed") ++ .arg("-re") ++ .arg(r"s/[0-9]+.[0-9]+.[0-9]+-beta.([0-9]+) \(.*\)/\1/g") ++ .arg("version") ++ .current_dir(&self.src), ++ ); + let n = count.trim().parse().unwrap(); + self.prerelease_version.set(Some(n)); + n diff --git a/debian/patches/d-bootstrap-rustflags.patch b/debian/patches/d-bootstrap-rustflags.patch new file mode 100644 index 000000000..a28810e89 --- /dev/null +++ b/debian/patches/d-bootstrap-rustflags.patch @@ -0,0 +1,32 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:38 +0200 +Subject: d-bootstrap-rustflags + +=================================================================== +--- + src/bootstrap/builder.rs | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs +index 23ea2fe..b2b1c54 100644 +--- a/src/bootstrap/builder.rs ++++ b/src/bootstrap/builder.rs +@@ -1505,6 +1505,18 @@ impl<'a> Builder<'a> { + } + } + ++ // Debian-specific stuff here ++ // set linker flags from LDFLAGS ++ if let Ok(ldflags) = env::var("LDFLAGS") { ++ for flag in ldflags.split_whitespace() { ++ if target.contains("windows") && flag.contains("relro") { ++ // relro is ELF-specific ++ continue; ++ } ++ rustflags.arg(&format!("-Clink-args={}", flag)); ++ } ++ } ++ + // FIXME: It might be better to use the same value for both `RUSTFLAGS` and `RUSTDOCFLAGS`, + // but this breaks CI. At the very least, stage0 `rustdoc` needs `--cfg bootstrap`. See + // #71458. diff --git a/debian/patches/d-bootstrap-use-local-css.patch b/debian/patches/d-bootstrap-use-local-css.patch new file mode 100644 index 000000000..7aadf5f21 --- /dev/null +++ b/debian/patches/d-bootstrap-use-local-css.patch @@ -0,0 +1,42 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: d-bootstrap-use-local-css + +=================================================================== +--- + src/bootstrap/doc.rs | 15 ++++----------- + 1 file changed, 4 insertions(+), 11 deletions(-) + +diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs +index f8ba05c..fb5395d 100644 +--- a/src/bootstrap/doc.rs ++++ b/src/bootstrap/doc.rs +@@ -373,6 +373,10 @@ impl Step for Standalone { + .arg(&builder.src.join("src/doc/index.md")) + .arg("--markdown-playground-url") + .arg("https://play.rust-lang.org/") ++ .arg("--markdown-css") ++ .arg(format!("rustdoc{}.css", &builder.version)) ++ .arg("--markdown-css") ++ .arg("rust.css") + .arg("-o") + .arg(&out) + .arg(&path); +@@ -381,17 +385,6 @@ impl Step for Standalone { + cmd.arg("--disable-minification"); + } + +- if filename == "not_found.md" { +- cmd.arg("--markdown-css") +- .arg(format!("https://doc.rust-lang.org/rustdoc{}.css", &builder.version)) +- .arg("--markdown-css") +- .arg("https://doc.rust-lang.org/rust.css"); +- } else { +- cmd.arg("--markdown-css") +- .arg(format!("rustdoc{}.css", &builder.version)) +- .arg("--markdown-css") +- .arg("rust.css"); +- } + builder.run(&mut cmd); + } + diff --git a/debian/patches/d-bootstrap-use-system-compiler-rt.patch b/debian/patches/d-bootstrap-use-system-compiler-rt.patch new file mode 100644 index 000000000..22843aeb1 --- /dev/null +++ b/debian/patches/d-bootstrap-use-system-compiler-rt.patch @@ -0,0 +1,40 @@ +Description: Use system compiler-rt from clang +Forwarded: not-needed +--- a/src/bootstrap/compile.rs ++++ b/src/bootstrap/compile.rs +@@ -200,6 +200,12 @@ + let mut features = builder.std_features(); + features.push_str(&compiler_builtins_c_feature); + ++ // In Debian this is always available ++ let llvm_config = builder.ensure(native::Llvm { ++ target: builder.config.build, ++ emscripten: false, ++ }); ++ cargo.env("LLVM_CONFIG", llvm_config); + if compiler.stage != 0 && builder.config.sanitizers { + // This variable is used by the sanitizer runtime crates, e.g. + // rustc_lsan, to build the sanitizer runtime from C code +@@ -208,11 +214,6 @@ + // missing + // We also only build the runtimes when --enable-sanitizers (or its + // config.toml equivalent) is used +- let llvm_config = builder.ensure(native::Llvm { +- target: builder.config.build, +- emscripten: false, +- }); +- cargo.env("LLVM_CONFIG", llvm_config); + cargo.env("RUSTC_BUILD_SANITIZERS", "1"); + } + +--- a/vendor/compiler_builtins/Cargo.toml ++++ b/vendor/compiler_builtins/Cargo.toml +@@ -49,7 +49,7 @@ + # LLVM_CONFIG or CLANG (more reliable) must be set. + c-system = [] + +-c = ["c-vendor"] ++c = ["c-system"] + compiler-builtins = [] + default = ["compiler-builtins"] + mangled-names = [] diff --git a/debian/patches/d-fix-rustix-outline.patch b/debian/patches/d-fix-rustix-outline.patch new file mode 100644 index 000000000..1800de9e3 --- /dev/null +++ b/debian/patches/d-fix-rustix-outline.patch @@ -0,0 +1,60 @@ +Always enable cc even if the feature is not enabled. + +Some Debian architectures need outline asm, and Debian does not ship pre-built +outline asm. + +Index: rust/vendor/rustix/Cargo.toml +=================================================================== +--- rust.orig/vendor/rustix/Cargo.toml ++++ rust/vendor/rustix/Cargo.toml +@@ -103,9 +103,9 @@ version = "0.6" + [dev-dependencies.tempfile] + version = "3.2.0" + +-[build-dependencies.cc] ++[build-dependencies.cc_dep] + version = "1.0.68" +-optional = true ++package = "cc" + + [features] + all-apis = [ +@@ -168,6 +168,7 @@ use-libc = [ + "libc_errno", + "libc", + ] ++cc = [] + + [target."cfg(all(any(target_os = \"android\", target_os = \"linux\"), any(rustix_use_libc, miri, not(all(target_os = \"linux\", any(target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"), all(target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"powerpc64\", target_arch = \"riscv64\", target_arch = \"mips\", target_arch = \"mips64\"))))))))".dependencies.linux-raw-sys] + version = "0.0.46" +Index: rust/vendor/rustix/build.rs +=================================================================== +--- rust.orig/vendor/rustix/build.rs ++++ rust/vendor/rustix/build.rs +@@ -1,5 +1,4 @@ +-#[cfg(feature = "cc")] +-use cc::Build; ++use cc_dep::Build; + use std::env::var; + use std::io::Write; + +@@ -113,16 +112,16 @@ fn link_in_librustix_outline(arch: &str, + println!("cargo:rerun-if-changed={}", to); + + // If "cc" is not enabled, use a pre-built library. +- #[cfg(not(feature = "cc"))] ++ /*#[cfg(not(feature = "cc"))] + { + let _ = asm_name; + println!("cargo:rustc-link-search={}/{}", OUTLINE_PATH, profile); + println!("cargo:rustc-link-lib=static={}", name); +- } ++ }*/ + + // If "cc" is enabled, build the library from source, update the pre-built + // version, and assert that the pre-built version is checked in. +- #[cfg(feature = "cc")] ++ //#[cfg(feature = "cc")] + { + let out_dir = var("OUT_DIR").unwrap(); + Build::new().file(&asm_name).compile(&name); diff --git a/debian/patches/d-remove-arm-privacy-breaches.patch b/debian/patches/d-remove-arm-privacy-breaches.patch new file mode 100644 index 000000000..b1cf63a09 --- /dev/null +++ b/debian/patches/d-remove-arm-privacy-breaches.patch @@ -0,0 +1,195 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:38 +0200 +Subject: d-remove-arm-privacy-breaches + +=================================================================== +--- + .../crates/stdarch-verify/arm-intrinsics.html | 134 --------------------- + 1 file changed, 134 deletions(-) + +diff --git a/library/stdarch/crates/stdarch-verify/arm-intrinsics.html b/library/stdarch/crates/stdarch-verify/arm-intrinsics.html +index ac246c6..f945431 100644 +--- a/library/stdarch/crates/stdarch-verify/arm-intrinsics.html ++++ b/library/stdarch/crates/stdarch-verify/arm-intrinsics.html +@@ -20,17 +20,12 @@ + <meta name="keywords" content="">
+ <meta content="Copyright © 1995-2018 Arm Limited (or its affiliates). All rights reserved." name="copyright">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+-<meta name="msapplication-config" content="https://developer.arm.com:443/shared/common/img/favicon/browserconfig.xml">
+-<meta name="msapplication-TileColor" content="#2b5797">
+-<meta name="msapplication-TileImage" content="https://developer.arm.com:443/shared/common/img/favicon/mstile-144x144.png">
+ <meta name="theme-color" content="#ffffff">
+ <meta name="server" content="ARMGPCD2" />
+
+ <meta property="og:title" content="Technologies | NEON Intrinsics Reference – Arm Developer">
+ <meta property="og:description" content="All the NEON intrinsics reference in an interactive page.">
+-<meta property="og:image" content="https://developer.arm.com:443">
+ <meta property="og:site_name" content="ARM Developer">
+-<meta property="og:url" content="https://developer.arm.com/technologies/neon/intrinsics">
+ <meta property="og:type" content="website">
+ <meta property="og:locale" content="en">
+
+@@ -41,64 +36,14 @@ + <meta name="twitter:site" content="ARM Developer">
+ <meta name="twitter:title" content="Technologies | NEON Intrinsics Reference – Arm Developer">
+ <meta name="twitter:description" content="All the NEON intrinsics reference in an interactive page.">
+-<meta name="twitter:image" content="https://developer.arm.com:443">
+-<meta name="twitter:url" content="https://developer.arm.com/technologies/neon/intrinsics">
+
+ <meta itemprop="name" content="Technologies | NEON Intrinsics Reference – Arm Developer">
+ <meta itemprop="description" content="All the NEON intrinsics reference in an interactive page.">
+-<meta itemprop="image" content="https://developer.arm.com:443">
+-
+-
+-
+-
+- <link rel="stylesheet" type="text/css" href="/shared/developer.arm.com/css/app.css?v=D41D8CD98F00B204E9800998ECF8427E" />
+-
+-
+-
+-<link rel="apple-touch-icon" sizes="57x57" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
+-<link rel="apple-touch-icon" sizes="60x60" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
+-<link rel="apple-touch-icon" sizes="72x72" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
+-<link rel="apple-touch-icon" sizes="76x76" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
+-<link rel="apple-touch-icon" sizes="114x114" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
+-<link rel="apple-touch-icon" sizes="120x120" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
+-<link rel="apple-touch-icon" sizes="144x144" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
+-<link rel="apple-touch-icon" sizes="152x152" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
+-<link rel="apple-touch-icon" sizes="180x180" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
+-<link rel="icon" type="image/png" href="https://developer.arm.com/shared/common/img/favicon/favicon-32x32.png?v=2.29.0.0" sizes="32x32" />
+-<link rel="icon" type="image/png" href="https://developer.arm.com/shared/common/img/favicon/favicon-48x48.png?v=2.29.0.0" sizes="48x48" />
+-<link rel="icon" type="image/png" href="https://developer.arm.com/shared/common/img/favicon/android-chrome-192x192.png?v=2.29.0.0" sizes="192x192" />
+-<link rel="icon" type="image/png" href="https://developer.arm.com/shared/common/img/favicon/android-chrome-256x256.png?v=2.29.0.0" sizes="256x256" />
+-<link rel="icon" type="image/png" href="https://developer.arm.com/shared/common/img/favicon/favicon-16x16.png?v=2.29.0.0" sizes="16x16" />
+-<link rel="shortcut icon" type="image/ico" href="https://developer.arm.com/shared/common/img/favicon/favicon.ico?v=2.29.0.0" />
+-<link rel="manifest" href="https://developer.arm.com/shared/common/img/favicon/manifest.json?v=2.29.0.0" />
+-
+- <link rel="search" type="application/opensearchdescription+xml" title="ARM Developer" href="/opensearch.xml"/>
+-
+-
+-
+-
+-
+-<!-- Google Tag Manager -->
+-<script>
+-(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
+-new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
+-j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
+-'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
+- })(window, document, 'script', 'dataLayer', 'GTM-K25LQR');
+-</script>
+-<!-- End Google Tag Manager -->
+-
+-
+ </head>
+ <body id="">
+
+
+
+-<noscript>
+- <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-K25LQR" height="0" width="0" style="display:none;visibility:hidden"></iframe>
+-</noscript>
+-
+-
+
+ <div class="c-feedback-message-container u-no-print"><style> + /* Docs top margin fix */ +@@ -245,7 +190,6 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= + <span class="navigation-dropdown-label">
+ <a href="/">
+ <span>
+- <img src="/shared/developer.arm.com/img/arm-developer.svg" alt="ARM Developer" />
+ </span>
+ <i class="fa fa-caret-down"></i>
+ </a>
+@@ -437,7 +381,6 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= +
+ </div>
+
+-<link rel="stylesheet" href="https://developer.arm.com/shared/arm-account/css/modules/user-menu.css?v=2.29.0.0" />
+
+ </li>
+ </ul>
+@@ -93318,82 +93261,5 @@ names are the property of their respective holders. <a href="http://www.arm.com/ +
+ </div>
+
+-<script type="text/javascript" src="https://nebula-cdn.kampyle.com/we/8144/onsite/embed.js"></script>
+-
+-
+-
+-
+-<script src="/bundles/modernizr?v=inCVuEFe6J4Q07A0AcRsbJic_UE5MwpRMNGcOtk94TE1"></script>
+-
+-
+-
+-<script type="text/javascript">
+- if (Modernizr && !Modernizr.svg) {
+- var imgs = document.getElementsByTagName('img');
+- var svgExtension = /.*\.svg$/;
+- var l = imgs.length;
+- for (var i = 0; i < l; i++) {
+- if (imgs[i].src.match(svgExtension)) {
+- imgs[i].src = imgs[i].src.slice(0, -3) + 'png';
+- }
+- }
+- }
+-</script>
+-
+-
+-<script src="/shared/vendor/jquery-1.12.4.min.js"></script>
+-<script src="/shared/vendor/foundation.min.js"></script>
+-<script src="/shared/vendor/moment.min.js"></script>
+-<script src="/shared/vendor/js/jquery-rss/src/jquery.rss.js"></script>
+-
+-<script src="/bundles/clipboard?v=IPc2U7tMxf_2TKh6_qbfzIsYI3pmBbWZxHb5M8V-fhg1"></script>
+-
+-<script src="/bundles/placeholder?v=Aw-bm4sJPSuBeTzPpRw_GfXYXI4wKmH607vgMic22c01"></script>
+-
+-<script src="/bundles/waypoints?v=E5Sm2NPVxzLqGyd5lIz-NjBvArn4w7w7IvCs35wz6dA1"></script>
+-
+-
+-
+-<script src="/shared/developer.arm.com/js/common.js?v=09142182FF441DC932039AB1D8CD216F"></script>
+-<script src="/shared/developer.arm.com/js/app.bundle.js?v=09142182FF441DC932039AB1D8CD216F"></script>
+-
+-
+-<script src="/shared/arm.com-new/js/app.constants.js?v=09142182FF441DC932039AB1D8CD216F"></script>
+-<script src="/shared/arm.com-new/js/app.navigation.js?v=09142182FF441DC932039AB1D8CD216F"></script>
+-<script type="text/javascript">
+- (function() {
+- var $userMenu = $('.c-user-menu__root');
+- if ($userMenu) {
+- $userMenu.navigation();
+- }
+- })();
+-</script>
+-
+-
+-
+-<script src="/bundles/jquery-ui?v=atr-jO-t-9RdxuVusckf7yNy0MEEBlVW5TaJCAetR6A1"></script>
+-
+-<script src="/bundles/jqueryval?v=shBfM8gvrYJt6eNs9xKMaOYfzyGdVGLhvPUMJ92MwmM1"></script>
+-
+-<script src="/sitecore%20modules/Web/Web%20Forms%20for%20Marketers/mvc/wffm.min.js"></script>
+-<script>
+- $(document).ready(function() {
+- $("form[data-wffm]").each(function() { $(this).wffmForm(); });
+- });
+-</script>
+-
+-<link rel="stylesheet" type="text/css" href="//fast.fonts.net/t/1.css?apiType=css&projectid=5616bfa5-8ba9-4061-8e15-3a2d29551ced" />
+-
+-
+-<script src="//munchkin.marketo.net/munchkin.js" type="text/javascript"></script>
+-<script type="text/javascript">
+- Munchkin.init('312-SAX-488', {'asyncOnly': true});
+-</script>
+-
+-
+-
+-
+-
+-
+ </body>
+ </html>
diff --git a/debian/patches/d-rust-gdb-paths b/debian/patches/d-rust-gdb-paths new file mode 100644 index 000000000..4be3024ea --- /dev/null +++ b/debian/patches/d-rust-gdb-paths @@ -0,0 +1,39 @@ +From: Angus Lees <gus@debian.org> +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: Hardcode GDB python module directory + +Forwarded: not-needed + +Debian package installs python modules into a fixed directory, so +just hardcode path in wrapper script. +--- + src/etc/rust-gdb | 2 +- + src/etc/rust-gdbgui | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb +index b950cea..5ec8752 100755 +--- a/src/etc/rust-gdb ++++ b/src/etc/rust-gdb +@@ -11,7 +11,7 @@ else + fi + + # Find out where the pretty printer Python module is +-RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)" ++RUSTC_SYSROOT="$(if type "$RUSTC" >/dev/null 2>&1; then "$RUSTC" --print=sysroot; else echo /usr; fi)" + GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc" + + # Run GDB with the additional arguments that load the pretty printers +diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui +index 9744913..613737d 100755 +--- a/src/etc/rust-gdbgui ++++ b/src/etc/rust-gdbgui +@@ -40,7 +40,7 @@ else + fi + + # Find out where the pretty printer Python module is +-RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)" ++RUSTC_SYSROOT="$(if type "$RUSTC" >/dev/null 2>&1; then "$RUSTC" --print=sysroot; else echo /usr; fi)" + GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc" + + # Set the environment variable `RUST_GDB` to overwrite the call to a diff --git a/debian/patches/d-rust-lldb-paths b/debian/patches/d-rust-lldb-paths new file mode 100644 index 000000000..15028a68f --- /dev/null +++ b/debian/patches/d-rust-lldb-paths @@ -0,0 +1,29 @@ +From: Angus Lees <gus@debian.org> +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: Hardcode LLDB python module directory + +Forwarded: not-needed + +Debian package installs python modules into a fixed directory, so +just hardcode path in wrapper script. +--- + src/etc/rust-lldb | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb +index bce72f1..793f593 100755 +--- a/src/etc/rust-lldb ++++ b/src/etc/rust-lldb +@@ -7,10 +7,10 @@ set -e + host=$(rustc -vV | sed -n -e 's/^host: //p') + + # Find out where to look for the pretty printer Python module +-RUSTC_SYSROOT=$(rustc --print sysroot) ++RUSTC_SYSROOT="$(if type "$RUSTC" >/dev/null 2>&1; then "$RUSTC" --print=sysroot; else echo /usr; fi)" + RUST_LLDB="$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb" + +-lldb=lldb ++lldb=lldb-14 + if [ -f "$RUST_LLDB" ]; then + lldb="$RUST_LLDB" + else diff --git a/debian/patches/d-rustc-add-soname.patch b/debian/patches/d-rustc-add-soname.patch new file mode 100644 index 000000000..70fdf26b8 --- /dev/null +++ b/debian/patches/d-rustc-add-soname.patch @@ -0,0 +1,44 @@ +From: Angus Lees <gus@debian.org> +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: Set DT_SONAME when building dylibs + +Forwarded: no + +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). +--- + compiler/rustc_codegen_ssa/src/back/link.rs | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs +index 04ec1e7..67296ca 100644 +--- a/compiler/rustc_codegen_ssa/src/back/link.rs ++++ b/compiler/rustc_codegen_ssa/src/back/link.rs +@@ -2175,6 +2175,13 @@ fn add_order_independent_options( + } + + add_rpath_args(cmd, sess, codegen_results, out_filename); ++ ++ if (crate_type == config::CrateType::Dylib || crate_type == config::CrateType::Cdylib) ++ && sess.target.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); ++ } + } + + // Write the NatVis debugger visualizer files for each crate to the temp directory and gather the file paths. diff --git a/debian/patches/d-rustc-fix-mips64el-bootstrap.patch b/debian/patches/d-rustc-fix-mips64el-bootstrap.patch new file mode 100644 index 000000000..06d73098a --- /dev/null +++ b/debian/patches/d-rustc-fix-mips64el-bootstrap.patch @@ -0,0 +1,62 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: d-rustc-fix-mips64el-bootstrap + +Bug: https://github.com/rust-lang/rust/issues/52108 + +=================================================================== +--- + compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs | 2 +- + compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs | 2 +- + src/bootstrap/bootstrap.py | 2 ++ + src/test/assembly/asm/mips-types.rs | 1 + + 4 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs +index fc5dbd1..b9df004 100644 +--- a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs ++++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs +@@ -12,7 +12,7 @@ pub fn target() -> Target { + endian: Endian::Big, + // NOTE(mips64r2) matches C toolchain + cpu: "mips64r2".into(), +- features: "+mips64r2".into(), ++ features: "+mips64r2,+xgot".into(), + max_atomic_width: Some(64), + mcount: "_mcount".into(), + +diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs +index e0d5f6f..57ad8c4 100644 +--- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs ++++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs +@@ -10,7 +10,7 @@ pub fn target() -> Target { + abi: "abi64".into(), + // NOTE(mips64r2) matches C toolchain + cpu: "mips64r2".into(), +- features: "+mips64r2".into(), ++ features: "+mips64r2,+xgot".into(), + max_atomic_width: Some(64), + mcount: "_mcount".into(), + +diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py +index 92d29d6..23c0764 100644 +--- a/src/bootstrap/bootstrap.py ++++ b/src/bootstrap/bootstrap.py +@@ -734,6 +734,8 @@ class RustBuild(object): + + # preserve existing RUSTFLAGS + env.setdefault("RUSTFLAGS", "") ++ if self.build_triple().startswith('mips'): ++ env["RUSTFLAGS"] += " -Ctarget-feature=+xgot" + build_section = "target.{}".format(self.build) + target_features = [] + if self.get_toml("crt-static", build_section) == "true": +diff --git a/src/test/assembly/asm/mips-types.rs b/src/test/assembly/asm/mips-types.rs +index 04bf49a..a7c6056 100644 +--- a/src/test/assembly/asm/mips-types.rs ++++ b/src/test/assembly/asm/mips-types.rs +@@ -1,3 +1,4 @@ ++// ignore-test + // revisions: mips32 mips64 + // assembly-output: emit-asm + //[mips32] compile-flags: --target mips-unknown-linux-gnu diff --git a/debian/patches/d-rustc-i686-baseline.patch b/debian/patches/d-rustc-i686-baseline.patch new file mode 100644 index 000000000..127997334 --- /dev/null +++ b/debian/patches/d-rustc-i686-baseline.patch @@ -0,0 +1,22 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: d-rustc-i686-baseline + +=================================================================== +--- + compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: rust/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs +=================================================================== +--- rust.orig/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs ++++ rust/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs +@@ -2,7 +2,7 @@ use crate::spec::{LinkerFlavor, StackPro + + pub fn target() -> Target { + let mut base = super::linux_gnu_base::opts(); +- base.cpu = "pentium4".into(); ++ base.cpu = "pentiumpro".into(); + base.max_atomic_width = Some(64); + base.add_pre_link_args(LinkerFlavor::Gcc, &["-m32"]); + // don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved diff --git a/debian/patches/d-rustc-prefer-dynamic.patch b/debian/patches/d-rustc-prefer-dynamic.patch new file mode 100644 index 000000000..13bb42922 --- /dev/null +++ b/debian/patches/d-rustc-prefer-dynamic.patch @@ -0,0 +1,18 @@ +Description: Prefer dynamic linking (currently disabled, not applied) + As per Debian policy, we basically revert + https://github.com/rust-lang/rfcs/blob/master/text/0404-change-prefer-dynamic.md + TODO: this does not yet work: https://github.com/rust-lang/rust/issues/43289 + Perhaps a better method would be to modify dh-cargo instead of rustc +Author: Ximin Luo <infinity0@debian.org> +Forwarded: not-needed +--- a/src/librustc/session/config.rs ++++ b/src/librustc/session/config.rs +@@ -846,7 +846,7 @@ + "don't run LLVM's SLP vectorization pass"), + soft_float: bool = (false, parse_bool, [TRACKED], + "use soft float ABI (*eabihf targets only)"), +- prefer_dynamic: bool = (false, parse_bool, [TRACKED], ++ prefer_dynamic: bool = (true, parse_bool, [TRACKED], + "prefer dynamic linking to static linking"), + no_integrated_as: bool = (false, parse_bool, [TRACKED], + "use an external assembler rather than LLVM's integrated one"), diff --git a/debian/patches/d-rustc-windows-ssp.patch b/debian/patches/d-rustc-windows-ssp.patch new file mode 100644 index 000000000..5d8ba4785 --- /dev/null +++ b/debian/patches/d-rustc-windows-ssp.patch @@ -0,0 +1,22 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: d-rustc-windows-ssp + +Bug: https://github.com/rust-lang/rust/issues/68973 +--- + compiler/rustc_target/src/spec/windows_gnu_base.rs | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/compiler/rustc_target/src/spec/windows_gnu_base.rs b/compiler/rustc_target/src/spec/windows_gnu_base.rs +index d11f1f7..137f8eb 100644 +--- a/compiler/rustc_target/src/spec/windows_gnu_base.rs ++++ b/compiler/rustc_target/src/spec/windows_gnu_base.rs +@@ -40,6 +40,8 @@ pub fn opts() -> TargetOptions { + "-lmsvcrt", + "-luser32", + "-lkernel32", ++ "-lssp_nonshared", ++ "-lssp", + ]; + let mut late_link_args = TargetOptions::link_args(LinkerFlavor::Ld, mingw_libs); + super::add_link_args(&mut late_link_args, LinkerFlavor::Gcc, mingw_libs); diff --git a/debian/patches/d-rustdoc-disable-embedded-fonts.patch b/debian/patches/d-rustdoc-disable-embedded-fonts.patch new file mode 100644 index 000000000..49337108c --- /dev/null +++ b/debian/patches/d-rustdoc-disable-embedded-fonts.patch @@ -0,0 +1,77 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: d-rustdoc-disable-embedded-fonts + +=================================================================== +--- + src/librustdoc/html/render/write_shared.rs | 2 -- + src/librustdoc/html/static/css/rustdoc.css | 8 -------- + src/librustdoc/html/static_files.rs | 23 ----------------------- + 3 files changed, 33 deletions(-) + +diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs +index 68f2a54..86f7487 100644 +--- a/src/librustdoc/html/render/write_shared.rs ++++ b/src/librustdoc/html/render/write_shared.rs +@@ -33,8 +33,6 @@ static FILES_UNVERSIONED: Lazy<FxHashMap + "SourceCodePro-Semibold.ttf.woff2" => static_files::source_code_pro::SEMIBOLD, + "SourceCodePro-It.ttf.woff2" => static_files::source_code_pro::ITALIC, + "SourceCodePro-LICENSE.txt" => static_files::source_code_pro::LICENSE, +- "NanumBarunGothic.ttf.woff2" => static_files::nanum_barun_gothic::REGULAR, +- "NanumBarunGothic-LICENSE.txt" => static_files::nanum_barun_gothic::LICENSE, + "LICENSE-MIT.txt" => static_files::LICENSE_MIT, + "LICENSE-APACHE.txt" => static_files::LICENSE_APACHE, + "COPYRIGHT.txt" => static_files::COPYRIGHT, +diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css +index 0f4d842..9aec0d6 100644 +--- a/src/librustdoc/html/static/css/rustdoc.css ++++ b/src/librustdoc/html/static/css/rustdoc.css +@@ -67,14 +67,6 @@ + font-display: swap; + } + +-/* Avoid using legacy CJK serif fonts in Windows like Batang. */ +-@font-face { +- font-family: 'NanumBarunGothic'; +- src: url("NanumBarunGothic.ttf.woff2") format("woff2"); +- font-display: swap; +- unicode-range: U+AC00-D7AF, U+1100-11FF, U+3130-318F, U+A960-A97F, U+D7B0-D7FF; +-} +- + * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; +diff --git a/src/librustdoc/html/static_files.rs b/src/librustdoc/html/static_files.rs +index bec5c08..1f6ccf2 100644 +--- a/src/librustdoc/html/static_files.rs ++++ b/src/librustdoc/html/static_files.rs +@@ -138,29 +138,6 @@ crate mod source_code_pro { + pub(crate) static LICENSE: &[u8] = include_bytes!("static/fonts/SourceCodePro-LICENSE.txt"); + } + +-/// Files related to the Nanum Barun Gothic font. +-/// +-/// These files are used to avoid some legacy CJK serif fonts in Windows. +-/// +-/// Note that the Noto Sans KR font, which was used previously but was not very readable on Windows, +-/// has been replaced by the Nanum Barun Gothic font. This is due to Windows' implementation of font +-/// rendering that distorts OpenType fonts too much. +-/// +-/// The font files were generated with these commands: +-/// +-/// ```sh +-/// pyftsubset NanumBarunGothic.ttf \ +-/// --unicodes=U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF \ +-/// --output-file=NanumBarunGothic.ttf.woff2 --flavor=woff2 +-/// ``` +-pub(crate) mod nanum_barun_gothic { +- /// The file `NanumBarunGothic.ttf.woff2`, the Regular variant of the Nanum Barun Gothic font. +- pub(crate) static REGULAR: &[u8] = include_bytes!("static/fonts/NanumBarunGothic.ttf.woff2"); +- +- /// The file `NanumBarunGothic-LICENSE.txt`, the license text of the Nanum Barun Gothic font. +- pub(crate) static LICENSE: &[u8] = include_bytes!("static/fonts/NanumBarunGothic-LICENSE.txt"); +-} +- + /// Files related to the sidebar in rustdoc sources. + pub(crate) mod sidebar { + /// File script to handle sidebar. diff --git a/debian/patches/d-test-host-duplicates.patch b/debian/patches/d-test-host-duplicates.patch new file mode 100644 index 000000000..50c39adf9 --- /dev/null +++ b/debian/patches/d-test-host-duplicates.patch @@ -0,0 +1,20 @@ +Description: Work around #842634 on some machines, e.g. Debian porterboxes + This should remain commented-out in debian/patches/series, it's not needed everywhere +Author: Ximin Luo <infinity0@debian.org> +Forwarded: not-needed +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/library/std/src/sys_common/net/tests.rs ++++ b/library/std/src/sys_common/net/tests.rs +@@ -11,8 +11,10 @@ + for sa in lh { + *addrs.entry(sa).or_insert(0) += 1; + } ++ let mut v = addrs.iter().filter(|&(_, &v)| v > 1).collect::<Vec<_>>(); ++ v.clear(); + assert_eq!( +- addrs.iter().filter(|&(_, &v)| v > 1).collect::<Vec<_>>(), ++ v, + vec![], + "There should be no duplicate localhost entries" + ); diff --git a/debian/patches/d-test-ignore-avx-44056.patch b/debian/patches/d-test-ignore-avx-44056.patch new file mode 100644 index 000000000..c399e32f6 --- /dev/null +++ b/debian/patches/d-test-ignore-avx-44056.patch @@ -0,0 +1,22 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: d-test-ignore-avx-44056 + +Bug: https://github.com/rust-lang/rust/pull/55667 + +=================================================================== +--- + src/test/ui/issues/issue-44056.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/test/ui/issues/issue-44056.rs b/src/test/ui/issues/issue-44056.rs +index a4903ed..ebe8402 100644 +--- a/src/test/ui/issues/issue-44056.rs ++++ b/src/test/ui/issues/issue-44056.rs +@@ -1,5 +1,5 @@ + // build-pass (FIXME(55996): should be run on targets supporting avx) +-// only-x86_64 ++// ignore-test + // no-prefer-dynamic + // compile-flags: -Ctarget-feature=+avx -Clto + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 000000000..c918b658a --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,70 @@ +# Patches for upstream + +# pending, or forwarded +u-ignore-reproducible-failure.patch +u-reproducible-build.patch +u-ignore-endian-big-diff.patch + +# can be dropped once upstream updates compiler_builtins +u-arm-compiler-builtins-weak-linkage-arm.patch +u-arm-compiler-builtins-add-sync-builtin-fallbacks.patch + +# can be dropped once upstream updates rustix +u-fix-rustix-for-sparc64.patch + +# not forwarded, or forwarded but unlikely to be merged +u-ignore-ppc-hangs.patch +u-ignore-bpf-test.patch +u-rustc-llvm-cross-flags.patch +u-reproducible-dl-stage0.patch +u-make-tests-work-without-rpath.patch +#u-allow-system-compiler-rt.patch + +# Debian-specific patches, not suitable for upstream +d-fix-rustix-outline.patch + +## Patches needed by debian/prune-unused-deps, for building bootstrap +d-0000-ignore-removed-submodules.patch +d-0001-pkg-config-no-special-snowflake.patch +d-0002-mdbook-strip-embedded-libs.patch +d-0003-cc-psm-rebuild-wasm32.patch +d-0004-clippy-feature-sync.patch +d-0005-no-jemalloc.patch + +## Patches to the build process, including doc path tweaks +## Should not change resulting rustc behaviour +d-bootstrap-rustflags.patch +d-remove-arm-privacy-breaches.patch +d-bootstrap-install-symlinks.patch +d-bootstrap-disable-git.patch +d-bootstrap-read-beta-version-from-file.patch +d-bootstrap-no-assume-tools.patch +d-bootstrap-cargo-doc-paths.patch +d-bootstrap-use-local-css.patch +d-bootstrap-old-cargo-compat.patch +d-bootstrap-custom-debuginfo-path.patch +d-bootstrap-permit-symlink-in-docs.patch +d-test-ignore-avx-44056.patch +d-bootstrap-cargo-check-cfg.patch +d-armel-fix-lldb.patch + +# Work around for some porterboxes, keep this commented +#d-test-host-duplicates.patch +# Experimental patch not yet working +#d-bootstrap-use-system-compiler-rt.patch + +## Patches to rustc behaviour, including path lookup tweaks +d-rust-gdb-paths +d-rust-lldb-paths +d-rustc-add-soname.patch +d-rustc-fix-mips64el-bootstrap.patch +d-rustc-windows-ssp.patch +d-rustc-i686-baseline.patch +# Experimental patch not yet working +#d-rustc-prefer-dynamic.patch +d-rustdoc-disable-embedded-fonts.patch + +# cherry-picked from ubuntu +ubuntu-disable-ppc64el-asm-tests.patch +ubuntu-ignore-arm-doctest.patch +ubuntu-Revert-Use-constant-eval-to-do-strict-validity-check.patch diff --git a/debian/patches/u-allow-system-compiler-rt.patch b/debian/patches/u-allow-system-compiler-rt.patch new file mode 100644 index 000000000..3bd874a5c --- /dev/null +++ b/debian/patches/u-allow-system-compiler-rt.patch @@ -0,0 +1,327 @@ +Description: Support linking against system clang libs + Note: the above PR only covers the compiler_builtins crate, rustc itself also + needs patching as per below once that is accepted. +Forwarded: https://github.com/rust-lang-nursery/compiler-builtins/pull/296 +--- a/vendor/compiler_builtins/Cargo.toml ++++ b/vendor/compiler_builtins/Cargo.toml +@@ -43,7 +43,13 @@ + optional = true + + [features] +-c = ["cc"] ++c-vendor = ["cc"] ++ ++# Link against system clang_rt.* libraries. ++# LLVM_CONFIG or CLANG (more reliable) must be set. ++c-system = [] ++ ++c = ["c-vendor"] + compiler-builtins = [] + default = ["compiler-builtins"] + mangled-names = [] +--- a/vendor/compiler_builtins/build.rs ++++ b/vendor/compiler_builtins/build.rs +@@ -37,7 +37,7 @@ + // mangling names though we assume that we're also in test mode so we don't + // build anything and we rely on the upstream implementation of compiler-rt + // functions +- if !cfg!(feature = "mangled-names") && cfg!(feature = "c") { ++ if !cfg!(feature = "mangled-names") && cfg!(any(feature = "c-vendor", feature = "c-system")) { + // Don't use a C compiler for these targets: + // + // * wasm32 - clang 8 for wasm is somewhat hard to come by and it's +@@ -47,8 +47,10 @@ + // compiler nor is cc-rs ready for compilation to riscv (at this + // time). This can probably be removed in the future + if !target.contains("wasm32") && !target.contains("nvptx") && !target.starts_with("riscv") { +- #[cfg(feature = "c")] +- c::compile(&llvm_target); ++ #[cfg(feature = "c-vendor")] ++ c_vendor::compile(&llvm_target); ++ #[cfg(feature = "c-system")] ++ c_system::compile(&llvm_target); + } + } + +@@ -70,17 +72,14 @@ + } + } + +-#[cfg(feature = "c")] +-mod c { +- extern crate cc; +- ++#[cfg(any(feature = "c-vendor", feature = "c-system"))] ++mod sources { + use std::collections::BTreeMap; + use std::env; +- use std::path::PathBuf; + +- struct Sources { ++ pub struct Sources { + // SYMBOL -> PATH TO SOURCE +- map: BTreeMap<&'static str, &'static str>, ++ pub map: BTreeMap<&'static str, &'static str>, + } + + impl Sources { +@@ -117,39 +116,11 @@ + } + } + +- /// Compile intrinsics from the compiler-rt C source code +- pub fn compile(llvm_target: &[&str]) { ++ pub fn get_sources(llvm_target: &[&str]) -> Sources { + let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap(); + let target_env = env::var("CARGO_CFG_TARGET_ENV").unwrap(); + let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap(); + let target_vendor = env::var("CARGO_CFG_TARGET_VENDOR").unwrap(); +- let cfg = &mut cc::Build::new(); +- +- cfg.warnings(false); +- +- if target_env == "msvc" { +- // Don't pull in extra libraries on MSVC +- cfg.flag("/Zl"); +- +- // Emulate C99 and C++11's __func__ for MSVC prior to 2013 CTP +- cfg.define("__func__", Some("__FUNCTION__")); +- } else { +- // Turn off various features of gcc and such, mostly copying +- // compiler-rt's build system already +- cfg.flag("-fno-builtin"); +- cfg.flag("-fvisibility=hidden"); +- cfg.flag("-ffreestanding"); +- // Avoid the following warning appearing once **per file**: +- // clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument] +- // +- // Note that compiler-rt's build system also checks +- // +- // `check_cxx_compiler_flag(-fomit-frame-pointer COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG)` +- // +- // in https://github.com/rust-lang/compiler-rt/blob/c8fbcb3/cmake/config-ix.cmake#L19. +- cfg.flag_if_supported("-fomit-frame-pointer"); +- cfg.define("VISIBILITY_HIDDEN", None); +- } + + let mut sources = Sources::new(); + sources.extend(&[ +@@ -411,6 +382,48 @@ + sources.remove(&["__aeabi_cdcmp", "__aeabi_cfcmp"]); + } + ++ sources ++ } ++} ++ ++#[cfg(feature = "c-vendor")] ++mod c_vendor { ++ extern crate cc; ++ ++ use std::env; ++ use std::path::PathBuf; ++ use sources; ++ ++ /// Compile intrinsics from the compiler-rt C source code ++ pub fn compile(llvm_target: &[&str]) { ++ let target_env = env::var("CARGO_CFG_TARGET_ENV").unwrap(); ++ let cfg = &mut cc::Build::new(); ++ cfg.warnings(false); ++ ++ if target_env == "msvc" { ++ // Don't pull in extra libraries on MSVC ++ cfg.flag("/Zl"); ++ ++ // Emulate C99 and C++11's __func__ for MSVC prior to 2013 CTP ++ cfg.define("__func__", Some("__FUNCTION__")); ++ } else { ++ // Turn off various features of gcc and such, mostly copying ++ // compiler-rt's build system already ++ cfg.flag("-fno-builtin"); ++ cfg.flag("-fvisibility=hidden"); ++ cfg.flag("-ffreestanding"); ++ // Avoid the following warning appearing once **per file**: ++ // clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument] ++ // ++ // Note that compiler-rt's build system also checks ++ // ++ // `check_cxx_compiler_flag(-fomit-frame-pointer COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG)` ++ // ++ // in https://github.com/rust-lang/compiler-rt/blob/c8fbcb3/cmake/config-ix.cmake#L19. ++ cfg.flag_if_supported("-fomit-frame-pointer"); ++ cfg.define("VISIBILITY_HIDDEN", None); ++ } ++ + // When compiling the C code we require the user to tell us where the + // source code is, and this is largely done so when we're compiling as + // part of rust-lang/rust we can use the same llvm-project repository as +@@ -423,6 +436,7 @@ + panic!("RUST_COMPILER_RT_ROOT={} does not exist", root.display()); + } + ++ let sources = sources::get_sources(llvm_target); + let src_dir = root.join("lib/builtins"); + for (sym, src) in sources.map.iter() { + let src = src_dir.join(src); +@@ -434,3 +448,103 @@ + cfg.compile("libcompiler-rt.a"); + } + } ++ ++#[cfg(feature = "c-system")] ++mod c_system { ++ use std::env; ++ use std::process::{Command, Output}; ++ use std::str; ++ use std::path::Path; ++ use sources; ++ ++ fn success_output(err: &str, cmd: &mut Command) -> Output { ++ let output = cmd.output().expect(err); ++ let status = output.status; ++ if !status.success() { ++ panic!("{}: {:?}", err, status.code()); ++ } ++ output ++ } ++ ++ // This can be obtained by adding the line: ++ // message(STATUS "All builtin supported architectures: ${ALL_BUILTIN_SUPPORTED_ARCH}") ++ // to the bottom of compiler-rt/cmake/builtin-config-ix.cmake, then running ++ // cmake and looking at the output. ++ const ALL_SUPPORTED_ARCHES : &'static str = "i386;x86_64;arm;armhf;armv6m;armv7m;armv7em;armv7;armv7s;armv7k;aarch64;hexagon;mips;mipsel;mips64;mips64el;powerpc64;powerpc64le;riscv32;riscv64;wasm32;wasm64"; ++ ++ // This function recreates the logic of getArchNameForCompilerRTLib, ++ // defined in clang/lib/Driver/ToolChain.cpp. ++ fn get_arch_name_for_compiler_rtlib() -> String { ++ let target = env::var("TARGET").unwrap(); ++ let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap(); ++ let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap(); ++ let r = match target_arch.as_str() { ++ "arm" => if target.ends_with("eabihf") && target_os != "windows" { ++ "armhf" ++ } else { ++ "arm" ++ }, ++ "x86" => if target_os == "android" { ++ "i686" ++ } else { ++ "i386" ++ }, ++ _ => target_arch.as_str(), ++ }; ++ r.to_string() ++ } ++ ++ /// Link against system clang runtime libraries ++ pub fn compile(llvm_target: &[&str]) { ++ let target = env::var("TARGET").unwrap(); ++ let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap(); ++ let compiler_rt_arch = get_arch_name_for_compiler_rtlib(); ++ ++ if ALL_SUPPORTED_ARCHES.split(";").find(|x| *x == compiler_rt_arch) == None { ++ return; ++ } ++ ++ if let Ok(clang) = env::var("CLANG") { ++ let output = success_output( ++ "failed to find clang's compiler-rt", ++ Command::new(clang) ++ .arg(format!("--target={}", target)) ++ .arg("--rtlib=compiler-rt") ++ .arg("--print-libgcc-file-name"), ++ ); ++ let fullpath = Path::new(str::from_utf8(&output.stdout).unwrap()); ++ let libpath = fullpath.parent().unwrap().display(); ++ let libname = fullpath ++ .file_stem() ++ .unwrap() ++ .to_str() ++ .unwrap() ++ .trim_start_matches("lib"); ++ println!("cargo:rustc-link-search=native={}", libpath); ++ println!("cargo:rustc-link-lib=static={}", libname); ++ } else if let Ok(llvm_config) = env::var("LLVM_CONFIG") { ++ // fallback if clang is not installed ++ let (subpath, libname) = match target_os.as_str() { ++ "linux" => ("linux", format!("clang_rt.builtins-{}", &compiler_rt_arch)), ++ "macos" => ("darwin", "clang_rt.builtins_osx_dynamic".to_string()), ++ _ => panic!("unsupported target os: {}", target_os), ++ }; ++ let cmd = format!("ls -1d $({} --libdir)/clang/*/lib/{}", llvm_config, subpath); ++ let output = success_output( ++ "failed to find clang's lib dir", ++ Command::new("sh").args(&["-ec", &cmd]), ++ ); ++ for search_dir in str::from_utf8(&output.stdout).unwrap().lines() { ++ println!("cargo:rustc-link-search=native={}", search_dir); ++ } ++ println!("cargo:rustc-link-lib=static={}", libname); ++ } else { ++ panic!("neither CLANG nor LLVM_CONFIG could be read"); ++ } ++ ++ let sources = sources::get_sources(llvm_target); ++ for (sym, _src) in sources.map.iter() { ++ println!("cargo:rustc-cfg={}=\"optimized-c\"", sym); ++ } ++ } ++} +--- a/src/bootstrap/compile.rs ++++ b/src/bootstrap/compile.rs +@@ -213,6 +213,7 @@ + emscripten: false, + }); + cargo.env("LLVM_CONFIG", llvm_config); ++ cargo.env("RUSTC_BUILD_SANITIZERS", "1"); + } + + cargo.arg("--features").arg(features) +--- a/src/librustc_asan/build.rs ++++ b/src/librustc_asan/build.rs +@@ -4,6 +4,9 @@ + use cmake::Config; + + fn main() { ++ if env::var("RUSTC_BUILD_SANITIZERS") != Ok("1".to_string()) { ++ return; ++ } + if let Some(llvm_config) = env::var_os("LLVM_CONFIG") { + build_helper::restore_library_path(); + +--- a/src/librustc_lsan/build.rs ++++ b/src/librustc_lsan/build.rs +@@ -4,6 +4,9 @@ + use cmake::Config; + + fn main() { ++ if env::var("RUSTC_BUILD_SANITIZERS") != Ok("1".to_string()) { ++ return; ++ } + if let Some(llvm_config) = env::var_os("LLVM_CONFIG") { + build_helper::restore_library_path(); + +--- a/src/librustc_msan/build.rs ++++ b/src/librustc_msan/build.rs +@@ -4,6 +4,9 @@ + use cmake::Config; + + fn main() { ++ if env::var("RUSTC_BUILD_SANITIZERS") != Ok("1".to_string()) { ++ return; ++ } + if let Some(llvm_config) = env::var_os("LLVM_CONFIG") { + build_helper::restore_library_path(); + +--- a/src/librustc_tsan/build.rs ++++ b/src/librustc_tsan/build.rs +@@ -4,6 +4,9 @@ + use cmake::Config; + + fn main() { ++ if env::var("RUSTC_BUILD_SANITIZERS") != Ok("1".to_string()) { ++ return; ++ } + if let Some(llvm_config) = env::var_os("LLVM_CONFIG") { + build_helper::restore_library_path(); + diff --git a/debian/patches/u-arm-compiler-builtins-add-sync-builtin-fallbacks.patch b/debian/patches/u-arm-compiler-builtins-add-sync-builtin-fallbacks.patch new file mode 100644 index 000000000..796c17cef --- /dev/null +++ b/debian/patches/u-arm-compiler-builtins-add-sync-builtin-fallbacks.patch @@ -0,0 +1,223 @@ +From 56172fcd8bd045e38bbdf76697d1fcca1e965d6d Mon Sep 17 00:00:00 2001 +From: Alex Huszagh <ahuszagh@gmail.com> +Date: Fri, 29 Jul 2022 16:58:05 -0500 +Subject: [PATCH] Add compiler-rt fallbacks for sync builtins on armv5te-musl. + +--- +https://github.com/rust-lang/compiler-builtins/pull/484 + + src/arm_linux.rs | 110 +++++++++++++++++++++++++++++++---------------- + 1 file changed, 73 insertions(+), 37 deletions(-) + +diff --git a/vendor/compiler_builtins/src/arm_linux.rs b/vendor/compiler_builtins/src/arm_linux.rs +index 8fe0948..8f22eb6 100644 +--- a/vendor/compiler_builtins/src/arm_linux.rs ++++ b/vendor/compiler_builtins/src/arm_linux.rs +@@ -55,7 +55,7 @@ fn insert_aligned(aligned: u32, val: u32, shift: u32, mask: u32) -> u32 { + } + + // Generic atomic read-modify-write operation +-unsafe fn atomic_rmw<T, F: Fn(u32) -> u32>(ptr: *mut T, f: F) -> u32 { ++unsafe fn atomic_rmw<T, F: Fn(u32) -> u32, G: Fn(u32, u32) -> u32>(ptr: *mut T, f: F, g: G) -> u32 { + let aligned_ptr = align_ptr(ptr); + let (shift, mask) = get_shift_mask(ptr); + +@@ -65,7 +65,7 @@ unsafe fn atomic_rmw<T, F: Fn(u32) -> u32>(ptr: *mut T, f: F) -> u32 { + let newval = f(curval); + let newval_aligned = insert_aligned(curval_aligned, newval, shift, mask); + if __kuser_cmpxchg(curval_aligned, newval_aligned, aligned_ptr) { +- return curval; ++ return g(curval, newval); + } + } + } +@@ -89,13 +89,21 @@ unsafe fn atomic_cmpxchg<T>(ptr: *mut T, oldval: u32, newval: u32) -> u32 { + } + + macro_rules! atomic_rmw { +- ($name:ident, $ty:ty, $op:expr) => { ++ ($name:ident, $ty:ty, $op:expr, $fetch:expr) => { + intrinsics! { + pub unsafe extern "C" fn $name(ptr: *mut $ty, val: $ty) -> $ty { +- atomic_rmw(ptr, |x| $op(x as $ty, val) as u32) as $ty ++ atomic_rmw(ptr, |x| $op(x as $ty, val) as u32, |old, new| $fetch(old, new)) as $ty + } + } + }; ++ ++ (@old $name:ident, $ty:ty, $op:expr) => { ++ atomic_rmw!($name, $ty, $op, |old, _| old); ++ }; ++ ++ (@new $name:ident, $ty:ty, $op:expr) => { ++ atomic_rmw!($name, $ty, $op, |_, new| new); ++ }; + } + macro_rules! atomic_cmpxchg { + ($name:ident, $ty:ty) => { +@@ -107,101 +115,129 @@ macro_rules! atomic_cmpxchg { + }; + } + +-atomic_rmw!(__sync_fetch_and_add_1, u8, |a: u8, b: u8| a.wrapping_add(b)); +-atomic_rmw!(__sync_fetch_and_add_2, u16, |a: u16, b: u16| a ++atomic_rmw!(@old __sync_fetch_and_add_1, u8, |a: u8, b: u8| a.wrapping_add(b)); ++atomic_rmw!(@old __sync_fetch_and_add_2, u16, |a: u16, b: u16| a ++ .wrapping_add(b)); ++atomic_rmw!(@old __sync_fetch_and_add_4, u32, |a: u32, b: u32| a ++ .wrapping_add(b)); ++ ++atomic_rmw!(@new __sync_add_and_fetch_1, u8, |a: u8, b: u8| a.wrapping_add(b)); ++atomic_rmw!(@new __sync_add_and_fetch_2, u16, |a: u16, b: u16| a + .wrapping_add(b)); +-atomic_rmw!(__sync_fetch_and_add_4, u32, |a: u32, b: u32| a ++atomic_rmw!(@new __sync_add_and_fetch_4, u32, |a: u32, b: u32| a + .wrapping_add(b)); + +-atomic_rmw!(__sync_fetch_and_sub_1, u8, |a: u8, b: u8| a.wrapping_sub(b)); +-atomic_rmw!(__sync_fetch_and_sub_2, u16, |a: u16, b: u16| a ++atomic_rmw!(@old __sync_fetch_and_sub_1, u8, |a: u8, b: u8| a.wrapping_sub(b)); ++atomic_rmw!(@old __sync_fetch_and_sub_2, u16, |a: u16, b: u16| a + .wrapping_sub(b)); +-atomic_rmw!(__sync_fetch_and_sub_4, u32, |a: u32, b: u32| a ++atomic_rmw!(@old __sync_fetch_and_sub_4, u32, |a: u32, b: u32| a + .wrapping_sub(b)); + +-atomic_rmw!(__sync_fetch_and_and_1, u8, |a: u8, b: u8| a & b); +-atomic_rmw!(__sync_fetch_and_and_2, u16, |a: u16, b: u16| a & b); +-atomic_rmw!(__sync_fetch_and_and_4, u32, |a: u32, b: u32| a & b); ++atomic_rmw!(@new __sync_sub_and_fetch_1, u8, |a: u8, b: u8| a.wrapping_sub(b)); ++atomic_rmw!(@new __sync_sub_and_fetch_2, u16, |a: u16, b: u16| a ++ .wrapping_sub(b)); ++atomic_rmw!(@new __sync_sub_and_fetch_4, u32, |a: u32, b: u32| a ++ .wrapping_sub(b)); ++ ++atomic_rmw!(@old __sync_fetch_and_and_1, u8, |a: u8, b: u8| a & b); ++atomic_rmw!(@old __sync_fetch_and_and_2, u16, |a: u16, b: u16| a & b); ++atomic_rmw!(@old __sync_fetch_and_and_4, u32, |a: u32, b: u32| a & b); ++ ++atomic_rmw!(@new __sync_and_and_fetch_1, u8, |a: u8, b: u8| a & b); ++atomic_rmw!(@new __sync_and_and_fetch_2, u16, |a: u16, b: u16| a & b); ++atomic_rmw!(@new __sync_and_and_fetch_4, u32, |a: u32, b: u32| a & b); ++ ++atomic_rmw!(@old __sync_fetch_and_or_1, u8, |a: u8, b: u8| a | b); ++atomic_rmw!(@old __sync_fetch_and_or_2, u16, |a: u16, b: u16| a | b); ++atomic_rmw!(@old __sync_fetch_and_or_4, u32, |a: u32, b: u32| a | b); ++ ++atomic_rmw!(@new __sync_or_and_fetch_1, u8, |a: u8, b: u8| a | b); ++atomic_rmw!(@new __sync_or_and_fetch_2, u16, |a: u16, b: u16| a | b); ++atomic_rmw!(@new __sync_or_and_fetch_4, u32, |a: u32, b: u32| a | b); ++ ++atomic_rmw!(@old __sync_fetch_and_xor_1, u8, |a: u8, b: u8| a ^ b); ++atomic_rmw!(@old __sync_fetch_and_xor_2, u16, |a: u16, b: u16| a ^ b); ++atomic_rmw!(@old __sync_fetch_and_xor_4, u32, |a: u32, b: u32| a ^ b); + +-atomic_rmw!(__sync_fetch_and_or_1, u8, |a: u8, b: u8| a | b); +-atomic_rmw!(__sync_fetch_and_or_2, u16, |a: u16, b: u16| a | b); +-atomic_rmw!(__sync_fetch_and_or_4, u32, |a: u32, b: u32| a | b); ++atomic_rmw!(@new __sync_xor_and_fetch_1, u8, |a: u8, b: u8| a ^ b); ++atomic_rmw!(@new __sync_xor_and_fetch_2, u16, |a: u16, b: u16| a ^ b); ++atomic_rmw!(@new __sync_xor_and_fetch_4, u32, |a: u32, b: u32| a ^ b); + +-atomic_rmw!(__sync_fetch_and_xor_1, u8, |a: u8, b: u8| a ^ b); +-atomic_rmw!(__sync_fetch_and_xor_2, u16, |a: u16, b: u16| a ^ b); +-atomic_rmw!(__sync_fetch_and_xor_4, u32, |a: u32, b: u32| a ^ b); ++atomic_rmw!(@old __sync_fetch_and_nand_1, u8, |a: u8, b: u8| !(a & b)); ++atomic_rmw!(@old __sync_fetch_and_nand_2, u16, |a: u16, b: u16| !(a & b)); ++atomic_rmw!(@old __sync_fetch_and_nand_4, u32, |a: u32, b: u32| !(a & b)); + +-atomic_rmw!(__sync_fetch_and_nand_1, u8, |a: u8, b: u8| !(a & b)); +-atomic_rmw!(__sync_fetch_and_nand_2, u16, |a: u16, b: u16| !(a & b)); +-atomic_rmw!(__sync_fetch_and_nand_4, u32, |a: u32, b: u32| !(a & b)); ++atomic_rmw!(@new __sync_nand_and_fetch_1, u8, |a: u8, b: u8| !(a & b)); ++atomic_rmw!(@new __sync_nand_and_fetch_2, u16, |a: u16, b: u16| !(a & b)); ++atomic_rmw!(@new __sync_nand_and_fetch_4, u32, |a: u32, b: u32| !(a & b)); + +-atomic_rmw!(__sync_fetch_and_max_1, i8, |a: i8, b: i8| if a > b { ++atomic_rmw!(@old __sync_fetch_and_max_1, i8, |a: i8, b: i8| if a > b { + a + } else { + b + }); +-atomic_rmw!(__sync_fetch_and_max_2, i16, |a: i16, b: i16| if a > b { ++atomic_rmw!(@old __sync_fetch_and_max_2, i16, |a: i16, b: i16| if a > b { + a + } else { + b + }); +-atomic_rmw!(__sync_fetch_and_max_4, i32, |a: i32, b: i32| if a > b { ++atomic_rmw!(@old __sync_fetch_and_max_4, i32, |a: i32, b: i32| if a > b { + a + } else { + b + }); + +-atomic_rmw!(__sync_fetch_and_umax_1, u8, |a: u8, b: u8| if a > b { ++atomic_rmw!(@old __sync_fetch_and_umax_1, u8, |a: u8, b: u8| if a > b { + a + } else { + b + }); +-atomic_rmw!(__sync_fetch_and_umax_2, u16, |a: u16, b: u16| if a > b { ++atomic_rmw!(@old __sync_fetch_and_umax_2, u16, |a: u16, b: u16| if a > b { + a + } else { + b + }); +-atomic_rmw!(__sync_fetch_and_umax_4, u32, |a: u32, b: u32| if a > b { ++atomic_rmw!(@old __sync_fetch_and_umax_4, u32, |a: u32, b: u32| if a > b { + a + } else { + b + }); + +-atomic_rmw!(__sync_fetch_and_min_1, i8, |a: i8, b: i8| if a < b { ++atomic_rmw!(@old __sync_fetch_and_min_1, i8, |a: i8, b: i8| if a < b { + a + } else { + b + }); +-atomic_rmw!(__sync_fetch_and_min_2, i16, |a: i16, b: i16| if a < b { ++atomic_rmw!(@old __sync_fetch_and_min_2, i16, |a: i16, b: i16| if a < b { + a + } else { + b + }); +-atomic_rmw!(__sync_fetch_and_min_4, i32, |a: i32, b: i32| if a < b { ++atomic_rmw!(@old __sync_fetch_and_min_4, i32, |a: i32, b: i32| if a < b { + a + } else { + b + }); + +-atomic_rmw!(__sync_fetch_and_umin_1, u8, |a: u8, b: u8| if a < b { ++atomic_rmw!(@old __sync_fetch_and_umin_1, u8, |a: u8, b: u8| if a < b { + a + } else { + b + }); +-atomic_rmw!(__sync_fetch_and_umin_2, u16, |a: u16, b: u16| if a < b { ++atomic_rmw!(@old __sync_fetch_and_umin_2, u16, |a: u16, b: u16| if a < b { + a + } else { + b + }); +-atomic_rmw!(__sync_fetch_and_umin_4, u32, |a: u32, b: u32| if a < b { ++atomic_rmw!(@old __sync_fetch_and_umin_4, u32, |a: u32, b: u32| if a < b { + a + } else { + b + }); + +-atomic_rmw!(__sync_lock_test_and_set_1, u8, |_: u8, b: u8| b); +-atomic_rmw!(__sync_lock_test_and_set_2, u16, |_: u16, b: u16| b); +-atomic_rmw!(__sync_lock_test_and_set_4, u32, |_: u32, b: u32| b); ++atomic_rmw!(@old __sync_lock_test_and_set_1, u8, |_: u8, b: u8| b); ++atomic_rmw!(@old __sync_lock_test_and_set_2, u16, |_: u16, b: u16| b); ++atomic_rmw!(@old __sync_lock_test_and_set_4, u32, |_: u32, b: u32| b); + + atomic_cmpxchg!(__sync_val_compare_and_swap_1, u8); + atomic_cmpxchg!(__sync_val_compare_and_swap_2, u16); +-- +2.39.0 + diff --git a/debian/patches/u-arm-compiler-builtins-weak-linkage-arm.patch b/debian/patches/u-arm-compiler-builtins-weak-linkage-arm.patch new file mode 100644 index 000000000..530efcebe --- /dev/null +++ b/debian/patches/u-arm-compiler-builtins-weak-linkage-arm.patch @@ -0,0 +1,23 @@ +From 72c872147679096c53cbb49ca670662d05d43110 Mon Sep 17 00:00:00 2001 +From: Lokathor <zefria@gmail.com> +Date: Tue, 27 Sep 2022 13:22:45 -0600 +Subject: [PATCH] Update macros.rs + +--- +https://github.com/rust-lang/compiler-builtins/pull/495 + + src/macros.rs | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/vendor/compiler_builtins/src/macros.rs b/vendor/compiler_builtins/src/macros.rs +index 7d90b7aa..477c2568 100644 +--- a/vendor/compiler_builtins/src/macros.rs ++++ b/vendor/compiler_builtins/src/macros.rs +@@ -266,6 +266,7 @@ macro_rules! intrinsics { + #[cfg(target_arch = "arm")] + pub mod $alias { + #[cfg_attr(not(feature = "mangled-names"), no_mangle)] ++ #[cfg_attr(all(not(windows), not(target_vendor="apple")), linkage = "weak")] + pub extern "aapcs" fn $alias( $($argname: $ty),* ) $(-> $ret)? { + super::$name($($argname),*) + } diff --git a/debian/patches/u-fix-rustix-for-sparc64.patch b/debian/patches/u-fix-rustix-for-sparc64.patch new file mode 100644 index 000000000..88995cd5b --- /dev/null +++ b/debian/patches/u-fix-rustix-for-sparc64.patch @@ -0,0 +1,203 @@ +--- rustc-1.64.0+dfsg1.orig/vendor/rustix/src/imp/libc/process/types.rs ++++ rustc-1.64.0+dfsg1/vendor/rustix/src/imp/libc/process/types.rs +@@ -199,7 +199,12 @@ pub enum Signal { + target_os = "openbsd", + all( + any(target_os = "android", target_os = "linux"), +- any(target_arch = "mips", target_arch = "mips64"), ++ any( ++ target_arch = "mips", ++ target_arch = "mips64", ++ target_arch = "sparc", ++ target_arch = "sparc64" ++ ), + ) + )))] + Stkflt = c::SIGSTKFLT, +@@ -276,7 +281,12 @@ impl Signal { + target_os = "openbsd", + all( + any(target_os = "android", target_os = "linux"), +- any(target_arch = "mips", target_arch = "mips64"), ++ any( ++ target_arch = "mips", ++ target_arch = "mips64", ++ target_arch = "sparc", ++ target_arch = "sparc64" ++ ), + ) + )))] + c::SIGSTKFLT => Some(Self::Stkflt), +--- rustc-1.64.0+dfsg1.orig/vendor/rustix/src/imp/libc/termios/types.rs ++++ rustc-1.64.0+dfsg1/vendor/rustix/src/imp/libc/termios/types.rs +@@ -704,6 +704,8 @@ pub const B2000000: Speed = c::B2000000; + + /// `B2500000` + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", +@@ -715,6 +717,8 @@ pub const B2500000: Speed = c::B2500000; + + /// `B3000000` + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", +@@ -726,6 +730,8 @@ pub const B3000000: Speed = c::B3000000; + + /// `B3500000` + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", +@@ -737,6 +743,8 @@ pub const B3500000: Speed = c::B3500000; + + /// `B4000000` + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", +--- rustc-1.64.0+dfsg1.orig/vendor/rustix/src/imp/linux_raw/termios/types.rs ++++ rustc-1.64.0+dfsg1/vendor/rustix/src/imp/linux_raw/termios/types.rs +@@ -338,15 +338,19 @@ pub const B1500000: Speed = linux_raw_sy + pub const B2000000: Speed = linux_raw_sys::general::B2000000; + + /// `B2500000` ++#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))] + pub const B2500000: Speed = linux_raw_sys::general::B2500000; + + /// `B3000000` ++#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))] + pub const B3000000: Speed = linux_raw_sys::general::B3000000; + + /// `B3500000` ++#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))] + pub const B3500000: Speed = linux_raw_sys::general::B3500000; + + /// `B4000000` ++#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))] + pub const B4000000: Speed = linux_raw_sys::general::B4000000; + + /// `CSIZE` +--- rustc-1.64.0+dfsg1.orig/vendor/rustix/src/termios/constants.rs ++++ rustc-1.64.0+dfsg1/vendor/rustix/src/termios/constants.rs +@@ -45,6 +45,8 @@ pub use imp::termios::types::B2000000; + )))] + pub use imp::termios::types::B2500000; + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", +@@ -54,6 +56,8 @@ pub use imp::termios::types::B2500000; + )))] + pub use imp::termios::types::B3000000; + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", +@@ -63,6 +67,8 @@ pub use imp::termios::types::B3000000; + )))] + pub use imp::termios::types::B3500000; + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", +@@ -74,6 +80,8 @@ pub use imp::termios::types::B4000000; + #[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "openbsd")))] + pub use imp::termios::types::B460800; + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "illumos", +@@ -688,6 +696,8 @@ pub fn speed_value(speed: imp::termios:: + )))] + imp::termios::types::B2500000 => Some(2_500_000), + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", +@@ -697,6 +707,8 @@ pub fn speed_value(speed: imp::termios:: + )))] + imp::termios::types::B3000000 => Some(3_000_000), + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", +@@ -706,6 +718,8 @@ pub fn speed_value(speed: imp::termios:: + )))] + imp::termios::types::B3500000 => Some(3_500_000), + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", +--- rustc-1.64.0+dfsg1.orig/vendor/rustix/src/termios/mod.rs ++++ rustc-1.64.0+dfsg1/vendor/rustix/src/termios/mod.rs +@@ -44,6 +44,8 @@ pub use constants::B1500000; + )))] + pub use constants::B2000000; + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", +@@ -53,6 +55,8 @@ pub use constants::B2000000; + )))] + pub use constants::B2500000; + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", +@@ -62,6 +66,8 @@ pub use constants::B2500000; + )))] + pub use constants::B3000000; + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", +@@ -71,6 +77,8 @@ pub use constants::B3000000; + )))] + pub use constants::B3500000; + #[cfg(not(any( ++ target_arch = "sparc", ++ target_arch = "sparc64", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", +--- rustc-1.64.0+dfsg1.orig/vendor/rustix/tests/time/y2038.rs ++++ rustc-1.64.0+dfsg1/vendor/rustix/tests/time/y2038.rs +@@ -14,6 +14,7 @@ + #[cfg(not(all(target_env = "musl", target_pointer_width = "32")))] + #[cfg(not(all(target_os = "android", target_pointer_width = "32")))] + #[cfg(not(all(target_os = "emscripten", target_pointer_width = "32")))] ++#[cfg(not(all(target_os = "linux", target_arch = "sparc")))] + #[test] + fn test_y2038() { + use rustix::time::{Secs, Timespec}; diff --git a/debian/patches/u-ignore-bpf-test.patch b/debian/patches/u-ignore-bpf-test.patch new file mode 100644 index 000000000..5fa3464ee --- /dev/null +++ b/debian/patches/u-ignore-bpf-test.patch @@ -0,0 +1,18 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:37 +0200 +Subject: u-ignore-bpf-test + +Bug: https://github.com/rust-lang/rust/issues/89689 +--- + src/test/assembly/asm/bpf-types.rs | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/test/assembly/asm/bpf-types.rs b/src/test/assembly/asm/bpf-types.rs +index 3428d93..0e129a7 100644 +--- a/src/test/assembly/asm/bpf-types.rs ++++ b/src/test/assembly/asm/bpf-types.rs +@@ -1,3 +1,4 @@ ++// ignore-test + // min-llvm-version: 13.0 + // assembly-output: emit-asm + // compile-flags: --target bpfel-unknown-none -C target_feature=+alu32 diff --git a/debian/patches/u-ignore-endian-big-diff.patch b/debian/patches/u-ignore-endian-big-diff.patch new file mode 100644 index 000000000..e02960fd9 --- /dev/null +++ b/debian/patches/u-ignore-endian-big-diff.patch @@ -0,0 +1,70 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:37 +0200 +Subject: u-ignore-endian-big-diff + +Bug: https://github.com/rust-lang/rust/issues/89577 + +=================================================================== +--- + src/test/ui/consts/const-eval/ub-enum.rs | 1 + + src/test/ui/consts/const-eval/ub-int-array.rs | 1 + + src/test/ui/consts/const-eval/ub-nonnull.rs | 1 + + src/test/ui/consts/const-eval/ub-ref-ptr.rs | 1 + + src/test/ui/consts/const-eval/ub-uninhabit.rs | 1 + + src/test/ui/consts/const-eval/ub-wide-ptr.rs | 1 + + 6 files changed, 6 insertions(+) + +diff --git a/src/test/ui/consts/const-eval/ub-enum.rs b/src/test/ui/consts/const-eval/ub-enum.rs +index 8628868..13d22ac 100644 +--- a/src/test/ui/consts/const-eval/ub-enum.rs ++++ b/src/test/ui/consts/const-eval/ub-enum.rs +@@ -1,3 +1,4 @@ ++// ignore-test + // stderr-per-bitwidth + #![feature(never_type)] + +diff --git a/src/test/ui/consts/const-eval/ub-int-array.rs b/src/test/ui/consts/const-eval/ub-int-array.rs +index 7e0fb33..a54f618 100644 +--- a/src/test/ui/consts/const-eval/ub-int-array.rs ++++ b/src/test/ui/consts/const-eval/ub-int-array.rs +@@ -1,3 +1,4 @@ ++// ignore-test + #![allow(const_err)] // make sure we cannot allow away the errors tested here + // stderr-per-bitwidth + //! Test the "array of int" fast path in validity checking, and in particular whether it +diff --git a/src/test/ui/consts/const-eval/ub-nonnull.rs b/src/test/ui/consts/const-eval/ub-nonnull.rs +index 259707b..145c7df 100644 +--- a/src/test/ui/consts/const-eval/ub-nonnull.rs ++++ b/src/test/ui/consts/const-eval/ub-nonnull.rs +@@ -1,3 +1,4 @@ ++// ignore-test + // stderr-per-bitwidth + #![feature(rustc_attrs)] + #![allow(const_err, invalid_value)] // make sure we cannot allow away the errors tested here +diff --git a/src/test/ui/consts/const-eval/ub-ref-ptr.rs b/src/test/ui/consts/const-eval/ub-ref-ptr.rs +index 1887cb2..14b15f6 100644 +--- a/src/test/ui/consts/const-eval/ub-ref-ptr.rs ++++ b/src/test/ui/consts/const-eval/ub-ref-ptr.rs +@@ -1,3 +1,4 @@ ++// ignore-test + // ignore-tidy-linelength + // stderr-per-bitwidth + #![allow(invalid_value)] +diff --git a/src/test/ui/consts/const-eval/ub-uninhabit.rs b/src/test/ui/consts/const-eval/ub-uninhabit.rs +index 33fbd14..022192f 100644 +--- a/src/test/ui/consts/const-eval/ub-uninhabit.rs ++++ b/src/test/ui/consts/const-eval/ub-uninhabit.rs +@@ -1,3 +1,4 @@ ++// ignore-test + // stderr-per-bitwidth + #![allow(const_err)] // make sure we cannot allow away the errors tested here + +diff --git a/src/test/ui/consts/const-eval/ub-wide-ptr.rs b/src/test/ui/consts/const-eval/ub-wide-ptr.rs +index ea48a09..4d9cbe1 100644 +--- a/src/test/ui/consts/const-eval/ub-wide-ptr.rs ++++ b/src/test/ui/consts/const-eval/ub-wide-ptr.rs +@@ -1,3 +1,4 @@ ++// ignore-test + // stderr-per-bitwidth + // ignore-tidy-linelength + #![allow(unused)] diff --git a/debian/patches/u-ignore-ppc-hangs.patch b/debian/patches/u-ignore-ppc-hangs.patch new file mode 100644 index 000000000..4e35cebb0 --- /dev/null +++ b/debian/patches/u-ignore-ppc-hangs.patch @@ -0,0 +1,34 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:37 +0200 +Subject: u-ignore-ppc-hangs + +Bug: https://github.com/rust-lang/rust/issues/89607 +--- + library/alloc/tests/arc.rs | 1 + + library/alloc/tests/rc.rs | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/library/alloc/tests/arc.rs b/library/alloc/tests/arc.rs +index ce40b5c..e99ebf5 100644 +--- a/library/alloc/tests/arc.rs ++++ b/library/alloc/tests/arc.rs +@@ -96,6 +96,7 @@ const SHARED_ITER_MAX: u16 = 100; + + fn assert_trusted_len<I: TrustedLen>(_: &I) {} + ++#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))] + #[test] + fn shared_from_iter_normal() { + // Exercise the base implementation for non-`TrustedLen` iterators. +diff --git a/library/alloc/tests/rc.rs b/library/alloc/tests/rc.rs +index efb39a6..b2f0e04 100644 +--- a/library/alloc/tests/rc.rs ++++ b/library/alloc/tests/rc.rs +@@ -92,6 +92,7 @@ const SHARED_ITER_MAX: u16 = 100; + + fn assert_trusted_len<I: TrustedLen>(_: &I) {} + ++#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))] + #[test] + fn shared_from_iter_normal() { + // Exercise the base implementation for non-`TrustedLen` iterators. diff --git a/debian/patches/u-ignore-reproducible-failure.patch b/debian/patches/u-ignore-reproducible-failure.patch new file mode 100644 index 000000000..e0f9688b3 --- /dev/null +++ b/debian/patches/u-ignore-reproducible-failure.patch @@ -0,0 +1,22 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:37 +0200 +Subject: u-ignore-reproducible-failure + +Bug: https://github.com/rust-lang/rust/issues/89911 +--- + src/test/run-make-fulldeps/reproducible-build-2/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/test/run-make-fulldeps/reproducible-build-2/Makefile b/src/test/run-make-fulldeps/reproducible-build-2/Makefile +index fd94516..957e1f4 100644 +--- a/src/test/run-make-fulldeps/reproducible-build-2/Makefile ++++ b/src/test/run-make-fulldeps/reproducible-build-2/Makefile +@@ -14,7 +14,7 @@ fat_lto: + $(RUSTC) reproducible-build.rs -C lto=fat + cp $(TMPDIR)/reproducible-build $(TMPDIR)/reproducible-build-a + $(RUSTC) reproducible-build.rs -C lto=fat +- cmp "$(TMPDIR)/reproducible-build-a" "$(TMPDIR)/reproducible-build" || exit 1 ++ cmp "$(TMPDIR)/reproducible-build-a" "$(TMPDIR)/reproducible-build" || exit 0 + + sysroot: + rm -rf $(TMPDIR) && mkdir $(TMPDIR) diff --git a/debian/patches/u-make-tests-work-without-rpath.patch b/debian/patches/u-make-tests-work-without-rpath.patch new file mode 100644 index 000000000..97cd89233 --- /dev/null +++ b/debian/patches/u-make-tests-work-without-rpath.patch @@ -0,0 +1,23 @@ +From: Chris Coulson <chris.coulson@canonical.com> +Date: Thu, 14 Jul 2022 13:17:38 +0200 +Subject: u-make-tests-work-without-rpath + +Forwarded: TODO + +=================================================================== +--- + src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile +index 1e267fb..ac46c24 100644 +--- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile ++++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile +@@ -1,2 +1,6 @@ ++include ../tools.mk ++ ++RUSTC := $(RUSTC_ORIGINAL) ++ + all: +- '$(PYTHON)' test.py ++ $(HOST_RPATH_ENV) '$(PYTHON)' test.py diff --git a/debian/patches/u-reproducible-build.patch b/debian/patches/u-reproducible-build.patch new file mode 100644 index 000000000..1167d1f08 --- /dev/null +++ b/debian/patches/u-reproducible-build.patch @@ -0,0 +1,25 @@ +From: Ximin Luo <infinity0@debian.org> +Date: Thu, 14 Jul 2022 13:17:37 +0200 +Subject: Don't split dwarf debug for a fully-reproducible build + +Bug: https://github.com/rust-lang/rust/issues/34902 +--- + compiler/rustc_llvm/build.rs | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs +index 7729ec6..b8f67ee 100644 +--- a/compiler/rustc_llvm/build.rs ++++ b/compiler/rustc_llvm/build.rs +@@ -179,6 +179,11 @@ fn main() { + let mut cfg = cc::Build::new(); + cfg.warnings(false); + for flag in cxxflags.split_whitespace() { ++ // Split-dwarf gives unreproducible DW_AT_GNU_dwo_id so don't do it ++ if flag == "-gsplit-dwarf" { ++ continue; ++ } ++ + // Ignore flags like `-m64` when we're doing a cross build + if is_crossed && flag.starts_with("-m") { + continue; diff --git a/debian/patches/u-reproducible-dl-stage0.patch b/debian/patches/u-reproducible-dl-stage0.patch new file mode 100644 index 000000000..b6ba259ec --- /dev/null +++ b/debian/patches/u-reproducible-dl-stage0.patch @@ -0,0 +1,22 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:37 +0200 +Subject: u-reproducible-dl-stage0 + +=================================================================== +--- + src/bootstrap/bootstrap.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py +index ab4338e..0227735 100644 +--- a/src/bootstrap/bootstrap.py ++++ b/src/bootstrap/bootstrap.py +@@ -92,7 +92,7 @@ def _download(path, url, probably_big, v + "-L", # Follow redirect. + "-y", "30", "-Y", "10", # timeout if speed is < 10 bytes/sec for > 30 seconds + "--connect-timeout", "30", # timeout if cannot connect within 30 seconds +- "--retry", "3", "-Sf", "-o", path, url], ++ "--retry", "3", "-Sf", "-o", path, "-R", url], + verbose=verbose, + exception=True, # Will raise RuntimeError on failure + ) diff --git a/debian/patches/u-rustc-llvm-cross-flags.patch b/debian/patches/u-rustc-llvm-cross-flags.patch new file mode 100644 index 000000000..95988249e --- /dev/null +++ b/debian/patches/u-rustc-llvm-cross-flags.patch @@ -0,0 +1,22 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:37 +0200 +Subject: u-rustc-llvm-cross-flags + +=================================================================== +--- + compiler/rustc_llvm/build.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs +index b8f67ee..e9b1d0a 100644 +--- a/compiler/rustc_llvm/build.rs ++++ b/compiler/rustc_llvm/build.rs +@@ -294,7 +294,7 @@ fn main() { + if let Some(stripped) = lib.strip_prefix("-LIBPATH:") { + println!("cargo:rustc-link-search=native={}", stripped.replace(&host, &target)); + } else if let Some(stripped) = lib.strip_prefix("-L") { +- println!("cargo:rustc-link-search=native={}", stripped.replace(&host, &target)); ++ if stripped.contains(&host) { println!("cargo:rustc-link-search=native={}", stripped.replace(&host, &target)); } + } + } else if let Some(stripped) = lib.strip_prefix("-LIBPATH:") { + println!("cargo:rustc-link-search=native={}", stripped); diff --git a/debian/patches/ubuntu-Revert-Use-constant-eval-to-do-strict-validity-check.patch b/debian/patches/ubuntu-Revert-Use-constant-eval-to-do-strict-validity-check.patch new file mode 100644 index 000000000..c9b50d71f --- /dev/null +++ b/debian/patches/ubuntu-Revert-Use-constant-eval-to-do-strict-validity-check.patch @@ -0,0 +1,569 @@ +From b9e588dfeecca821a4508166027afb6bda721ed6 Mon Sep 17 00:00:00 2001 +From: Simon Chopin <simon.chopin@canonical.com> +Date: Wed, 18 Jan 2023 17:03:04 +0100 +Subject: [PATCH] Revert "Use constant eval to do strict validity checks" + +This reverts commit 27412d1e3e128349bc515c16ce882860e20f037d. + +This is likely a LLVM mis-optimization, but we're not really sure. It +leads to ICE on riscv64. + +Bug: https://github.com/rust-lang/rust/issues/102155 + +--- + Cargo.lock | 1 - + .../src/intrinsics/mod.rs | 15 ++++- + compiler/rustc_codegen_ssa/Cargo.toml | 1 - + compiler/rustc_codegen_ssa/src/mir/block.rs | 9 +-- + .../src/const_eval/machine.rs | 2 +- + .../src/interpret/intrinsics.rs | 56 ++++++++-------- + compiler/rustc_const_eval/src/lib.rs | 6 -- + .../src/might_permit_raw_init.rs | 40 ----------- + compiler/rustc_middle/src/query/mod.rs | 8 --- + compiler/rustc_middle/src/ty/query.rs | 1 - + compiler/rustc_query_impl/src/keys.rs | 12 +--- + compiler/rustc_target/src/abi/mod.rs | 38 ++++++----- + .../intrinsics/panic-uninitialized-zeroed.rs | 66 +++++++------------ + 13 files changed, 94 insertions(+), 161 deletions(-) + delete mode 100644 compiler/rustc_const_eval/src/might_permit_raw_init.rs + +diff --git a/Cargo.lock b/Cargo.lock +index 2569b3e1976..b88158f9ff8 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -3731,7 +3731,6 @@ dependencies = [ + "rustc_arena", + "rustc_ast", + "rustc_attr", +- "rustc_const_eval", + "rustc_data_structures", + "rustc_errors", + "rustc_fs_util", +diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs +index b2a83e1d4eb..4f9ced001d4 100644 +--- a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs ++++ b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs +@@ -22,6 +22,7 @@ macro_rules! intrinsic_args { + use rustc_middle::ty::print::with_no_trimmed_paths; + use rustc_middle::ty::subst::SubstsRef; + use rustc_span::symbol::{kw, sym, Symbol}; ++use rustc_target::abi::InitKind; + + use crate::prelude::*; + use cranelift_codegen::ir::AtomicRmwOp; +@@ -693,7 +694,12 @@ fn swap(bcx: &mut FunctionBuilder<'_>, v: Value) -> Value { + return; + } + +- if intrinsic == sym::assert_zero_valid && !fx.tcx.permits_zero_init(layout) { ++ if intrinsic == sym::assert_zero_valid ++ && !layout.might_permit_raw_init( ++ fx, ++ InitKind::Zero, ++ fx.tcx.sess.opts.unstable_opts.strict_init_checks) { ++ + with_no_trimmed_paths!({ + crate::base::codegen_panic( + fx, +@@ -707,7 +713,12 @@ fn swap(bcx: &mut FunctionBuilder<'_>, v: Value) -> Value { + return; + } + +- if intrinsic == sym::assert_uninit_valid && !fx.tcx.permits_uninit_init(layout) { ++ if intrinsic == sym::assert_uninit_valid ++ && !layout.might_permit_raw_init( ++ fx, ++ InitKind::Uninit, ++ fx.tcx.sess.opts.unstable_opts.strict_init_checks) { ++ + with_no_trimmed_paths!({ + crate::base::codegen_panic( + fx, +diff --git a/compiler/rustc_codegen_ssa/Cargo.toml b/compiler/rustc_codegen_ssa/Cargo.toml +index 46d6344dbb2..e7ee424668b 100644 +--- a/compiler/rustc_codegen_ssa/Cargo.toml ++++ b/compiler/rustc_codegen_ssa/Cargo.toml +@@ -40,7 +40,6 @@ rustc_metadata = { path = "../rustc_metadata" } + rustc_query_system = { path = "../rustc_query_system" } + rustc_target = { path = "../rustc_target" } + rustc_session = { path = "../rustc_session" } +-rustc_const_eval = { path = "../rustc_const_eval" } + + [dependencies.object] + version = "0.29.0" +diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs +index 3eee58d9d1c..a9eb4ec6439 100644 +--- a/compiler/rustc_codegen_ssa/src/mir/block.rs ++++ b/compiler/rustc_codegen_ssa/src/mir/block.rs +@@ -22,7 +22,7 @@ + use rustc_span::{sym, Symbol}; + use rustc_symbol_mangling::typeid::typeid_for_fnabi; + use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode}; +-use rustc_target::abi::{self, HasDataLayout, WrappingRange}; ++use rustc_target::abi::{self, HasDataLayout, InitKind, WrappingRange}; + use rustc_target::spec::abi::Abi; + + /// Used by `FunctionCx::codegen_terminator` for emitting common patterns +@@ -528,6 +528,7 @@ fn codegen_panic_intrinsic( + source_info: mir::SourceInfo, + target: Option<mir::BasicBlock>, + cleanup: Option<mir::BasicBlock>, ++ strict_validity: bool, + ) -> bool { + // Emit a panic or a no-op for `assert_*` intrinsics. + // These are intrinsics that compile to panics so that we can get a message +@@ -546,13 +547,12 @@ enum AssertIntrinsic { + }); + if let Some(intrinsic) = panic_intrinsic { + use AssertIntrinsic::*; +- + let ty = instance.unwrap().substs.type_at(0); + let layout = bx.layout_of(ty); + let do_panic = match intrinsic { + Inhabited => layout.abi.is_uninhabited(), +- ZeroValid => !bx.tcx().permits_zero_init(layout), +- UninitValid => !bx.tcx().permits_uninit_init(layout), ++ ZeroValid => !layout.might_permit_raw_init(bx, InitKind::Zero, strict_validity), ++ UninitValid => !layout.might_permit_raw_init(bx, InitKind::Uninit, strict_validity), + }; + if do_panic { + let msg_str = with_no_visible_paths!({ +@@ -687,6 +687,7 @@ fn codegen_call_terminator( + source_info, + target, + cleanup, ++ self.cx.tcx().sess.opts.unstable_opts.strict_init_checks, + ) { + return; + } +diff --git a/compiler/rustc_const_eval/src/const_eval/machine.rs b/compiler/rustc_const_eval/src/const_eval/machine.rs +index fc2e6652a3d..ef6cff42ad9 100644 +--- a/compiler/rustc_const_eval/src/const_eval/machine.rs ++++ b/compiler/rustc_const_eval/src/const_eval/machine.rs +@@ -104,7 +104,7 @@ pub struct CompileTimeInterpreter<'mir, 'tcx> { + } + + impl<'mir, 'tcx> CompileTimeInterpreter<'mir, 'tcx> { +- pub(crate) fn new(const_eval_limit: Limit, can_access_statics: bool) -> Self { ++ pub(super) fn new(const_eval_limit: Limit, can_access_statics: bool) -> Self { + CompileTimeInterpreter { + steps_remaining: const_eval_limit.0, + stack: Vec::new(), +diff --git a/compiler/rustc_const_eval/src/interpret/intrinsics.rs b/compiler/rustc_const_eval/src/interpret/intrinsics.rs +index 08209eb7932..e0ce6d9acc8 100644 +--- a/compiler/rustc_const_eval/src/interpret/intrinsics.rs ++++ b/compiler/rustc_const_eval/src/interpret/intrinsics.rs +@@ -15,7 +15,7 @@ + use rustc_middle::ty::subst::SubstsRef; + use rustc_middle::ty::{Ty, TyCtxt}; + use rustc_span::symbol::{sym, Symbol}; +-use rustc_target::abi::{Abi, Align, Primitive, Size}; ++use rustc_target::abi::{Abi, Align, InitKind, Primitive, Size}; + + use super::{ + util::ensure_monomorphic_enough, CheckInAllocMsg, ImmTy, InterpCx, Machine, OpTy, PlaceTy, +@@ -435,33 +435,35 @@ pub fn emulate_intrinsic( + ), + )?; + } +- +- if intrinsic_name == sym::assert_zero_valid { +- let should_panic = !self.tcx.permits_zero_init(layout); +- +- if should_panic { +- M::abort( +- self, +- format!( +- "aborted execution: attempted to zero-initialize type `{}`, which is invalid", +- ty +- ), +- )?; +- } ++ if intrinsic_name == sym::assert_zero_valid ++ && !layout.might_permit_raw_init( ++ self, ++ InitKind::Zero, ++ self.tcx.sess.opts.unstable_opts.strict_init_checks, ++ ) ++ { ++ M::abort( ++ self, ++ format!( ++ "aborted execution: attempted to zero-initialize type `{}`, which is invalid", ++ ty ++ ), ++ )?; + } +- +- if intrinsic_name == sym::assert_uninit_valid { +- let should_panic = !self.tcx.permits_uninit_init(layout); +- +- if should_panic { +- M::abort( +- self, +- format!( +- "aborted execution: attempted to leave type `{}` uninitialized, which is invalid", +- ty +- ), +- )?; +- } ++ if intrinsic_name == sym::assert_uninit_valid ++ && !layout.might_permit_raw_init( ++ self, ++ InitKind::Uninit, ++ self.tcx.sess.opts.unstable_opts.strict_init_checks, ++ ) ++ { ++ M::abort( ++ self, ++ format!( ++ "aborted execution: attempted to leave type `{}` uninitialized, which is invalid", ++ ty ++ ), ++ )?; + } + } + sym::simd_insert => { +diff --git a/compiler/rustc_const_eval/src/lib.rs b/compiler/rustc_const_eval/src/lib.rs +index 72ac6af685d..d65d4f7eb72 100644 +--- a/compiler/rustc_const_eval/src/lib.rs ++++ b/compiler/rustc_const_eval/src/lib.rs +@@ -33,13 +33,11 @@ + pub mod const_eval; + mod errors; + pub mod interpret; +-mod might_permit_raw_init; + pub mod transform; + pub mod util; + + use rustc_middle::ty; + use rustc_middle::ty::query::Providers; +-use rustc_target::abi::InitKind; + + pub fn provide(providers: &mut Providers) { + const_eval::provide(providers); +@@ -61,8 +59,4 @@ pub fn provide(providers: &mut Providers) { + let (param_env, value) = param_env_and_value.into_parts(); + const_eval::deref_mir_constant(tcx, param_env, value) + }; +- providers.permits_uninit_init = +- |tcx, ty| might_permit_raw_init::might_permit_raw_init(tcx, ty, InitKind::Uninit); +- providers.permits_zero_init = +- |tcx, ty| might_permit_raw_init::might_permit_raw_init(tcx, ty, InitKind::Zero); + } +diff --git a/compiler/rustc_const_eval/src/might_permit_raw_init.rs b/compiler/rustc_const_eval/src/might_permit_raw_init.rs +deleted file mode 100644 +index f971c2238c7..00000000000 +--- a/compiler/rustc_const_eval/src/might_permit_raw_init.rs ++++ /dev/null +@@ -1,40 +0,0 @@ +-use crate::const_eval::CompileTimeInterpreter; +-use crate::interpret::{InterpCx, MemoryKind, OpTy}; +-use rustc_middle::ty::layout::LayoutCx; +-use rustc_middle::ty::{layout::TyAndLayout, ParamEnv, TyCtxt}; +-use rustc_session::Limit; +-use rustc_target::abi::InitKind; +- +-pub fn might_permit_raw_init<'tcx>( +- tcx: TyCtxt<'tcx>, +- ty: TyAndLayout<'tcx>, +- kind: InitKind, +-) -> bool { +- let strict = tcx.sess.opts.unstable_opts.strict_init_checks; +- +- if strict { +- let machine = CompileTimeInterpreter::new(Limit::new(0), false); +- +- let mut cx = InterpCx::new(tcx, rustc_span::DUMMY_SP, ParamEnv::reveal_all(), machine); +- +- let allocated = cx +- .allocate(ty, MemoryKind::Machine(crate::const_eval::MemoryKind::Heap)) +- .expect("OOM: failed to allocate for uninit check"); +- +- if kind == InitKind::Zero { +- cx.write_bytes_ptr( +- allocated.ptr, +- std::iter::repeat(0_u8).take(ty.layout.size().bytes_usize()), +- ) +- .expect("failed to write bytes for zero valid check"); +- } +- +- let ot: OpTy<'_, _> = allocated.into(); +- +- // Assume that if it failed, it's a validation failure. +- cx.validate_operand(&ot).is_ok() +- } else { +- let layout_cx = LayoutCx { tcx, param_env: ParamEnv::reveal_all() }; +- ty.might_permit_raw_init(&layout_cx, kind) +- } +-} +diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs +index d8483e7e409..e498015a4a5 100644 +--- a/compiler/rustc_middle/src/query/mod.rs ++++ b/compiler/rustc_middle/src/query/mod.rs +@@ -2049,12 +2049,4 @@ + desc { |tcx| "looking up generator diagnostic data of `{}`", tcx.def_path_str(key) } + separate_provide_extern + } +- +- query permits_uninit_init(key: TyAndLayout<'tcx>) -> bool { +- desc { "checking to see if {:?} permits being left uninit", key.ty } +- } +- +- query permits_zero_init(key: TyAndLayout<'tcx>) -> bool { +- desc { "checking to see if {:?} permits being left zeroed", key.ty } +- } + } +diff --git a/compiler/rustc_middle/src/ty/query.rs b/compiler/rustc_middle/src/ty/query.rs +index 2452bcf6a61..3d662ed5de4 100644 +--- a/compiler/rustc_middle/src/ty/query.rs ++++ b/compiler/rustc_middle/src/ty/query.rs +@@ -28,7 +28,6 @@ + use crate::traits::specialization_graph; + use crate::traits::{self, ImplSource}; + use crate::ty::fast_reject::SimplifiedType; +-use crate::ty::layout::TyAndLayout; + use crate::ty::subst::{GenericArg, SubstsRef}; + use crate::ty::util::AlwaysRequiresDrop; + use crate::ty::GeneratorDiagnosticData; +diff --git a/compiler/rustc_query_impl/src/keys.rs b/compiler/rustc_query_impl/src/keys.rs +index 49175e97f41..4d6bb02c38e 100644 +--- a/compiler/rustc_query_impl/src/keys.rs ++++ b/compiler/rustc_query_impl/src/keys.rs +@@ -6,7 +6,7 @@ + use rustc_middle::traits; + use rustc_middle::ty::fast_reject::SimplifiedType; + use rustc_middle::ty::subst::{GenericArg, SubstsRef}; +-use rustc_middle::ty::{self, layout::TyAndLayout, Ty, TyCtxt}; ++use rustc_middle::ty::{self, Ty, TyCtxt}; + use rustc_span::symbol::{Ident, Symbol}; + use rustc_span::{Span, DUMMY_SP}; + +@@ -395,16 +395,6 @@ fn default_span(&self, _: TyCtxt<'_>) -> Span { + } + } + +-impl<'tcx> Key for TyAndLayout<'tcx> { +- #[inline(always)] +- fn query_crate_is_local(&self) -> bool { +- true +- } +- fn default_span(&self, _: TyCtxt<'_>) -> Span { +- DUMMY_SP +- } +-} +- + impl<'tcx> Key for (Ty<'tcx>, Ty<'tcx>) { + #[inline(always)] + fn query_crate_is_local(&self) -> bool { +diff --git a/compiler/rustc_target/src/abi/mod.rs b/compiler/rustc_target/src/abi/mod.rs +index 92ce4d91d84..d103a06060d 100644 +--- a/compiler/rustc_target/src/abi/mod.rs ++++ b/compiler/rustc_target/src/abi/mod.rs +@@ -1378,7 +1378,7 @@ pub struct PointeeInfo { + + /// Used in `might_permit_raw_init` to indicate the kind of initialisation + /// that is checked to be valid +-#[derive(Copy, Clone, Debug, PartialEq, Eq)] ++#[derive(Copy, Clone, Debug)] + pub enum InitKind { + Zero, + Uninit, +@@ -1493,18 +1493,14 @@ pub fn is_zst(&self) -> bool { + /// + /// `init_kind` indicates if the memory is zero-initialized or left uninitialized. + /// +- /// This code is intentionally conservative, and will not detect +- /// * zero init of an enum whose 0 variant does not allow zero initialization +- /// * making uninitialized types who have a full valid range (ints, floats, raw pointers) +- /// * Any form of invalid value being made inside an array (unless the value is uninhabited) ++ /// `strict` is an opt-in debugging flag added in #97323 that enables more checks. + /// +- /// A strict form of these checks that uses const evaluation exists in +- /// `rustc_const_eval::might_permit_raw_init`, and a tracking issue for making these checks +- /// stricter is <https://github.com/rust-lang/rust/issues/66151>. ++ /// This is conservative: in doubt, it will answer `true`. + /// +- /// FIXME: Once all the conservatism is removed from here, and the checks are ran by default, +- /// we can use the const evaluation checks always instead. +- pub fn might_permit_raw_init<C>(self, cx: &C, init_kind: InitKind) -> bool ++ /// FIXME: Once we removed all the conservatism, we could alternatively ++ /// create an all-0/all-undef constant and run the const value validator to see if ++ /// this is a valid value for the given type. ++ pub fn might_permit_raw_init<C>(self, cx: &C, init_kind: InitKind, strict: bool) -> bool + where + Self: Copy, + Ty: TyAbiInterface<'a, C>, +@@ -1517,8 +1513,13 @@ pub fn might_permit_raw_init<C>(self, cx: &C, init_kind: InitKind) -> bool + s.valid_range(cx).contains(0) + } + InitKind::Uninit => { +- // The range must include all values. +- s.is_always_valid(cx) ++ if strict { ++ // The type must be allowed to be uninit (which means "is a union"). ++ s.is_uninit_valid() ++ } else { ++ // The range must include all values. ++ s.is_always_valid(cx) ++ } + } + } + }; +@@ -1539,12 +1540,19 @@ pub fn might_permit_raw_init<C>(self, cx: &C, init_kind: InitKind) -> bool + // If we have not found an error yet, we need to recursively descend into fields. + match &self.fields { + FieldsShape::Primitive | FieldsShape::Union { .. } => {} +- FieldsShape::Array { .. } => { ++ FieldsShape::Array { count, .. } => { + // FIXME(#66151): For now, we are conservative and do not check arrays by default. ++ if strict ++ && *count > 0 ++ && !self.field(cx, 0).might_permit_raw_init(cx, init_kind, strict) ++ { ++ // Found non empty array with a type that is unhappy about this kind of initialization ++ return false; ++ } + } + FieldsShape::Arbitrary { offsets, .. } => { + for idx in 0..offsets.len() { +- if !self.field(cx, idx).might_permit_raw_init(cx, init_kind) { ++ if !self.field(cx, idx).might_permit_raw_init(cx, init_kind, strict) { + // We found a field that is unhappy with this kind of initialization. + return false; + } +diff --git a/src/test/ui/intrinsics/panic-uninitialized-zeroed.rs b/src/test/ui/intrinsics/panic-uninitialized-zeroed.rs +index 255151a9603..3ffd35ecdb8 100644 +--- a/src/test/ui/intrinsics/panic-uninitialized-zeroed.rs ++++ b/src/test/ui/intrinsics/panic-uninitialized-zeroed.rs +@@ -57,13 +57,6 @@ enum LR_NonZero { + + struct ZeroSized; + +-#[allow(dead_code)] +-#[repr(i32)] +-enum ZeroIsValid { +- Zero(u8) = 0, +- One(NonNull<()>) = 1, +-} +- + fn test_panic_msg<T>(op: impl (FnOnce() -> T) + panic::UnwindSafe, msg: &str) { + let err = panic::catch_unwind(op).err(); + assert_eq!( +@@ -159,12 +152,33 @@ fn main() { + "attempted to zero-initialize type `*const dyn core::marker::Send`, which is invalid" + ); + ++ /* FIXME(#66151) we conservatively do not error here yet. ++ test_panic_msg( ++ || mem::uninitialized::<LR_NonZero>(), ++ "attempted to leave type `LR_NonZero` uninitialized, which is invalid" ++ ); ++ test_panic_msg( ++ || mem::zeroed::<LR_NonZero>(), ++ "attempted to zero-initialize type `LR_NonZero`, which is invalid" ++ ); ++ ++ test_panic_msg( ++ || mem::uninitialized::<ManuallyDrop<LR_NonZero>>(), ++ "attempted to leave type `std::mem::ManuallyDrop<LR_NonZero>` uninitialized, \ ++ which is invalid" ++ ); ++ test_panic_msg( ++ || mem::zeroed::<ManuallyDrop<LR_NonZero>>(), ++ "attempted to zero-initialize type `std::mem::ManuallyDrop<LR_NonZero>`, \ ++ which is invalid" ++ ); ++ */ ++ + test_panic_msg( + || mem::uninitialized::<(NonNull<u32>, u32, u32)>(), + "attempted to leave type `(core::ptr::non_null::NonNull<u32>, u32, u32)` uninitialized, \ + which is invalid" + ); +- + test_panic_msg( + || mem::zeroed::<(NonNull<u32>, u32, u32)>(), + "attempted to zero-initialize type `(core::ptr::non_null::NonNull<u32>, u32, u32)`, \ +@@ -182,23 +196,11 @@ fn main() { + which is invalid" + ); + +- test_panic_msg( +- || mem::uninitialized::<LR_NonZero>(), +- "attempted to leave type `LR_NonZero` uninitialized, which is invalid" +- ); +- +- test_panic_msg( +- || mem::uninitialized::<ManuallyDrop<LR_NonZero>>(), +- "attempted to leave type `core::mem::manually_drop::ManuallyDrop<LR_NonZero>` uninitialized, \ +- which is invalid" +- ); +- + test_panic_msg( + || mem::uninitialized::<NoNullVariant>(), + "attempted to leave type `NoNullVariant` uninitialized, \ + which is invalid" + ); +- + test_panic_msg( + || mem::zeroed::<NoNullVariant>(), + "attempted to zero-initialize type `NoNullVariant`, \ +@@ -210,12 +212,10 @@ fn main() { + || mem::uninitialized::<bool>(), + "attempted to leave type `bool` uninitialized, which is invalid" + ); +- + test_panic_msg( + || mem::uninitialized::<LR>(), + "attempted to leave type `LR` uninitialized, which is invalid" + ); +- + test_panic_msg( + || mem::uninitialized::<ManuallyDrop<LR>>(), + "attempted to leave type `core::mem::manually_drop::ManuallyDrop<LR>` uninitialized, which is invalid" +@@ -229,7 +229,6 @@ fn main() { + let _val = mem::zeroed::<Option<&'static i32>>(); + let _val = mem::zeroed::<MaybeUninit<NonNull<u32>>>(); + let _val = mem::zeroed::<[!; 0]>(); +- let _val = mem::zeroed::<ZeroIsValid>(); + let _val = mem::uninitialized::<MaybeUninit<bool>>(); + let _val = mem::uninitialized::<[!; 0]>(); + let _val = mem::uninitialized::<()>(); +@@ -260,33 +259,12 @@ fn main() { + || mem::zeroed::<[NonNull<()>; 1]>(), + "attempted to zero-initialize type `[core::ptr::non_null::NonNull<()>; 1]`, which is invalid" + ); +- +- // FIXME(#66151) we conservatively do not error here yet (by default). +- test_panic_msg( +- || mem::zeroed::<LR_NonZero>(), +- "attempted to zero-initialize type `LR_NonZero`, which is invalid" +- ); +- +- test_panic_msg( +- || mem::zeroed::<ManuallyDrop<LR_NonZero>>(), +- "attempted to zero-initialize type `core::mem::manually_drop::ManuallyDrop<LR_NonZero>`, \ +- which is invalid" +- ); + } else { + // These are UB because they have not been officially blessed, but we await the resolution + // of <https://github.com/rust-lang/unsafe-code-guidelines/issues/71> before doing + // anything about that. + let _val = mem::uninitialized::<i32>(); + let _val = mem::uninitialized::<*const ()>(); +- +- // These are UB, but best to test them to ensure we don't become unintentionally +- // stricter. +- +- // It's currently unchecked to create invalid enums and values inside arrays. +- let _val = mem::zeroed::<LR_NonZero>(); +- let _val = mem::zeroed::<[LR_NonZero; 1]>(); +- let _val = mem::zeroed::<[NonNull<()>; 1]>(); +- let _val = mem::uninitialized::<[NonNull<()>; 1]>(); + } + } + } +-- +2.37.2 + diff --git a/debian/patches/ubuntu-disable-ppc64el-asm-tests.patch b/debian/patches/ubuntu-disable-ppc64el-asm-tests.patch new file mode 100644 index 000000000..bc841cc8b --- /dev/null +++ b/debian/patches/ubuntu-disable-ppc64el-asm-tests.patch @@ -0,0 +1,39 @@ +--- a/compiler/rustc_lint_defs/src/builtin.rs ++++ b/compiler/rustc_lint_defs/src/builtin.rs +@@ -2749,11 +2749,13 @@ + /// + /// use std::arch::asm; + /// ++ /// #[cfg(not(any(target_arch = "powerpc64", target_arch = "s390x")))] + /// #[naked] + /// pub fn default_abi() -> u32 { + /// unsafe { asm!("", options(noreturn)); } + /// } + /// ++ /// #[cfg(not(any(target_arch = "powerpc64", target_arch = "s390x")))] + /// #[naked] + /// pub extern "Rust" fn rust_abi() -> u32 { + /// unsafe { asm!("", options(noreturn)); } +--- a/src/test/run-make-fulldeps/intrinsic-unreachable/Makefile ++++ b/src/test/run-make-fulldeps/intrinsic-unreachable/Makefile +@@ -1,6 +1,7 @@ + -include ../tools.mk + + # ignore-windows-msvc ++# needs-asm-support + # + # Because of Windows exception handling, the code is not necessarily any shorter. + # https://github.com/llvm-mirror/llvm/commit/64b2297786f7fd6f5fa24cdd4db0298fbf211466 +--- a/compiler/rustc_lint/src/builtin.rs ++++ b/compiler/rustc_lint/src/builtin.rs +@@ -3136,6 +3136,10 @@ + /// ### Example + /// + /// ```rust,compile_fail ++ /// #![cfg_attr( ++ /// not(any(target_arch = "powerpc64", target_arch = "s390x")), ++ /// feature(asm_experimental_arch) ++ /// )] + /// use std::arch::asm; + /// + /// fn main() { diff --git a/debian/patches/ubuntu-ignore-arm-doctest.patch b/debian/patches/ubuntu-ignore-arm-doctest.patch new file mode 100644 index 000000000..b67b7d2ef --- /dev/null +++ b/debian/patches/ubuntu-ignore-arm-doctest.patch @@ -0,0 +1,38 @@ +Description: Disable the doctests for the instruction_set errors + The fix is as described in the upstream issue. +Author: Simon Chopin <simon.chopin@canonical.com> +Bug: https://github.com/rust-lang/rust/issues/83453 +Last-Update: 2022-02-23 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/compiler/rustc_error_codes/src/error_codes/E0778.md ++++ b/compiler/rustc_error_codes/src/error_codes/E0778.md +@@ -16,7 +16,7 @@ + ``` + #![feature(isa_attribute)] + +-#[cfg_attr(target_arch="arm", instruction_set(arm::a32))] ++#[cfg_attr(all(target_arch="arm", target_os="none"), instruction_set(arm::a32))] + fn something() {} + ``` + +@@ -25,7 +25,7 @@ + ``` + #![feature(isa_attribute)] + +-#[cfg_attr(target_arch="arm", instruction_set(arm::t32))] ++#[cfg_attr(all(target_arch="arm", target_os="none"), instruction_set(arm::t32))] + fn something() {} + ``` + +--- a/compiler/rustc_error_codes/src/error_codes/E0779.md ++++ b/compiler/rustc_error_codes/src/error_codes/E0779.md +@@ -21,7 +21,7 @@ + ``` + #![feature(isa_attribute)] + +-#[cfg_attr(target_arch="arm", instruction_set(arm::a32))] // ok! ++#[cfg_attr(all(target_arch="arm", target_os="none"), instruction_set(arm::a32))] // ok! + pub fn something() {} + fn main() {} + ``` diff --git a/debian/prune-checksums b/debian/prune-checksums new file mode 100755 index 000000000..0c895cff4 --- /dev/null +++ b/debian/prune-checksums @@ -0,0 +1,47 @@ +#!/usr/bin/python3 +# Copyright: 2015-2017 The Debian Project +# License: MIT or Apache-2.0 +# +# Helper to remove removed-files from .cargo-checksum +# TODO: rewrite to perl and add to dh-cargo, maybe? + +from collections import OrderedDict +import argparse +import json +import os +import sys + +def prune_keep(cfile): + with open(cfile) as fp: + sums = json.load(fp, object_pairs_hook=OrderedDict) + + oldfiles = sums["files"] + newfiles = OrderedDict([entry for entry in oldfiles.items() if os.path.exists(entry[0])]) + sums["files"] = newfiles + + if len(oldfiles) == len(newfiles): + return + + with open(cfile, "w") as fp: + json.dump(sums, fp, separators=(',', ':')) + +def prune(cfile): + with open(cfile, "r+") as fp: + sums = json.load(fp, object_pairs_hook=OrderedDict) + sums["files"] = {} + fp.seek(0) + json.dump(sums, fp, separators=(',', ':')) + fp.truncate() + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("-k", "--keep", action="store_true", help="keep " + "checksums of files that still exist, and assume they haven't changed.") + parser.add_argument('crates', nargs=argparse.REMAINDER, + help="crates whose checksums to prune. (default: ./)") + args = parser.parse_args(sys.argv[1:]) + crates = args.crates or ["."] + f = prune_keep if args.keep else prune + for c in crates: + cfile = os.path.join(c, ".cargo-checksum.json") if os.path.isdir(c) else c + f(cfile) diff --git a/debian/prune-unused-deps b/debian/prune-unused-deps new file mode 100755 index 000000000..32063b14e --- /dev/null +++ b/debian/prune-unused-deps @@ -0,0 +1,73 @@ +#!/bin/bash +# Run this script in an unpacked upstream tarball directory, and it will update +# (i.e. overwrite) the "unused deps" part of Files-Excluded in d/copyright. + +set -e + +scriptdir=$(dirname "$(dirname "$(readlink -f "$0")")") +had_config_toml=$(if test -e "$scriptdir/debian/config.toml"; then echo true; else echo false; fi) + +( cd "$scriptdir" && debian/rules debian/config.toml ) +cp "$scriptdir/debian/config.toml" config.toml + +for i in "$scriptdir/debian/patches"/d-00*.patch; do + "$scriptdir/debian/ensure-patch" -N "$i" +done + +test -f Cargo.lock.orig || cp Cargo.lock Cargo.lock.orig +test -f src/bootstrap/Cargo.lock.orig || cp src/bootstrap/Cargo.lock src/bootstrap/Cargo.lock.orig +test -f src/tools/rust-analyzer/Cargo.lock.orig || cp src/tools/rust-analyzer/Cargo.lock src/tools/rust-analyzer/Cargo.lock.orig +rm -f Cargo.lock src/bootstrap/Cargo.lock src/tools/rust-analyzer/Cargo.lock + +find vendor -name .cargo-checksum.json -execdir "$scriptdir/debian/prune-checksums" "{}" + + +# re-generate Cargo.lock after patching +cargo update --offline + +# re-generate src/bootstrap/Cargo.lock after patching +(cd src/bootstrap && cargo update --offline) + +# re-generate src/tools/rust-analyzer/Cargo.lock after patching +( cd src/tools/rust-analyzer && cargo update --offline ) + +needed_crates() { + cat Cargo.lock \ + src/bootstrap/Cargo.lock \ + src/tools/rust-analyzer/Cargo.lock \ + | sed -z -e 's/\nname = /name = /g' -e 's/\nversion = /version = /g' \ + | sed -ne 's/\[\[package\]\]name = "\(.*\)"version = "\(.*\)"/\1 \2/gp' +} + +ghetto_parse_cargo() { + cat "$1" \ + | tr '\n' '\t' \ + | sed -e 's/\t\[/\n[/g' \ + | perl -ne 'print if s/^\[(?:package|project)\].*\tname\s*=\s*"(.*?)".*\tversion\s*=\s*"(.*?)".*/\1 \2/g' +} + +pruned_paths() { + for i in vendor/*/Cargo.toml; do + pkgnamever= + pkgnamever=$(ghetto_parse_cargo "$i") + if [ -z "$pkgnamever" ]; then + echo >&2 "failed to parse: $i" + exit 1 + fi + echo "$pkgnamever $i" + done | grep -v -F -f <(needed_crates) | cut '-d ' -f3 | while read x; do + echo " $(dirname $x)" + done +} + +header='# DO NOT EDIT below, AUTOGENERATED' +footer='# DO NOT EDIT above, AUTOGENERATED' +{ +echo "$header" +pruned_paths +echo "$footer" +} > $scriptdir/debian/copyright.unused-deps + +cd $scriptdir/debian +sed -i -e "/^$header/,/^$footer/d" -e '/^# unused dependencies/rcopyright.unused-deps' copyright +rm copyright.unused-deps +$had_config_toml || rm "$scriptdir/debian/config.toml" diff --git a/debian/refresh-early-patches.sh b/debian/refresh-early-patches.sh new file mode 100755 index 000000000..12f1811c4 --- /dev/null +++ b/debian/refresh-early-patches.sh @@ -0,0 +1,54 @@ +#!/bin/bash +set -e + +ver="$1" +dfsg="${2:-+dfsg1}" +upstream_tag="upstream/${ver/\~/_}${dfsg/\~/_}" + +git show -s upstream/experimental +git show -s debian/experimental +printf "\ngit top-level dir: %s\n" "$(git rev-parse --show-toplevel)" +printf "version: $ver\n" + +if ! git merge-base --is-ancestor upstream/experimental debian/experimental; then + echo >&2 "upstream/experimental is not an ancestor of debian/experimental" +fi +if git rev-parse "${upstream_tag}" 2>/dev/null >/dev/null; then + echo >&2 "tag already exists: ${upstream_tag}" +fi + +read -p "continue? [y/N] " x +if [ "$x" != "y" ]; then exit 1; fi + +cd "$(git rev-parse --show-toplevel)" +git branch -f upstream/rebase-patches upstream/experimental +git branch -f debian/rebase-patches debian/experimental +git checkout debian/rebase-patches + +git branch -f patch-queue/debian/rebase-patches +for i in debian/patches/d-00*.patch; do gbp pq apply "$i"; done + +gbp import-orig "../rustc_${ver}${dfsg}.orig.tar.xz" \ + --upstream-branch=upstream/rebase-patches \ + --debian-branch=debian/rebase-patches \ + --no-sign-tags --no-pristine-tar --no-symlink-orig + +# rebase here +echo "$0: Now manually rebase - run 'git rebase debian/rebase-patches'" +echo "$0: There may be conflicts; follow the instructions that git tells you." +echo "$0: When done, exit the child shell with ctrl-D" +$SHELL + +gbp pq export --no-patch-numbers +for i in debian/patches/d-00*.patch; do git add "$i"; done +git commit -m "Update early-stage patches for ${ver}${dfsg}" +git checkout . +git rebase @~ --onto=debian/experimental +git branch -f debian/experimental +git checkout debian/experimental + +# cleanup +git tag -d "${upstream_tag}" || true +git branch -D upstream/rebase-patches || true +git branch -D debian/rebase-patches || true +git branch -D patch-queue/debian/rebase-patches || true diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..8b83b8272 --- /dev/null +++ b/debian/rules @@ -0,0 +1,497 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +include /usr/share/dpkg/pkg-info.mk +include /usr/share/dpkg/vendor.mk +include /usr/share/dpkg/architecture.mk +SED_VERSION_SHORT := sed -re 's/([^.]+)\.([^.]+)\..*/\1.\2/' +RUST_VERSION := $(shell echo '$(DEB_VERSION_UPSTREAM)' | $(SED_VERSION_SHORT)) +RUST_LONG_VERSION := $(shell echo '$(DEB_VERSION_UPSTREAM)' | sed -re 's/([^+]+).*/\1/') +LIBSTD_PKG := libstd-rust-$(RUST_VERSION) +# Sed expression that matches the "rustc" we have in our Build-Depends field +SED_RUSTC_BUILDDEP := sed -ne "/^Build-Depends:/,/^[^[:space:]\#]/{/^ *rustc:native .*,/p}" debian/control +# Version of /usr/bin/rustc +LOCAL_RUST_VERSION := $(shell rustc --version --verbose | sed -ne 's/^release: //p') + +include /usr/share/dpkg/buildflags.mk +export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS +export CARGO_HOME = $(CURDIR)/debian/cargo + +# Defines DEB_*_RUST_TYPE triples +include debian/architecture.mk +# for dh_install substitution variable +export DEB_HOST_RUST_TYPE + +# for dh_install substitution variable +export RUST_LONG_VERSION + +DEB_DESTDIR := $(CURDIR)/debian/tmp + +# Use system LLVM (comment out to use vendored LLVM) +LLVM_VERSION = 14 +OLD_LLVM_VERSION = 13 +# Make it easier to test against a custom LLVM +ifneq (,$(LLVM_DESTDIR)) +LLVM_LIBRARY_PATH := $(LLVM_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH):$(LLVM_DESTDIR)/usr/lib +LD_LIBRARY_PATH := $(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):$(LLVM_LIBRARY_PATH),$(LLVM_LIBRARY_PATH)) +export LD_LIBRARY_PATH +endif + +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +NJOBS := -j $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +endif +RUSTBUILD = RUST_BACKTRACE=1 python3 src/bootstrap/bootstrap.py $(NJOBS) +RUSTBUILD_FLAGS = --stage 2 --config debian/config.toml --on-fail env +# rust-tidy depends on lots of modules that we strip out of the build. +# it also tries to access the network for some reason. so just disable it. +RUSTBUILD_TEST = $(RUSTBUILD) test --no-fail-fast --exclude src/tools/tidy +# To run a specific test, run something like: +# $ debian/rules override_dh_auto_test-arch \ +# RUSTBUILD_TEST_FLAGS="src/test/run-make --test-args extern-fn-struct" +# See src/bootstrap/README.md for more options. +RUSTBUILD_TEST_FLAGS = + +# https://github.com/rust-lang/rust/issues/89744 +# TODO: remove when we update cargo to 1.55 / 0.56 +# upstream bug still exists and is under investigation, but is hidden by newer cargo +export CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_OPT_LEVEL=0 + +update-version: + oldver=$(shell $(SED_RUSTC_BUILDDEP) | sed -ne 's/.*(<= \(.*\)).*/\1/gp' | $(SED_VERSION_SHORT)); \ + newver=$(RUST_VERSION); \ + debian/update-version.sh $$oldver $$newver $(RUST_LONG_VERSION) $(CARGO_NEW) + +# Below we detect how we're supposed to bootstrap the stage0 compiler. See +# README.Debian for more details of the cases described below. +# +PRECONFIGURE_CHECK = : +HAVE_BINARY_TARBALL := $(shell ls -1 stage0/*/*$(DEB_HOST_RUST_TYPE)* 2>/dev/null | wc -l) +DOWNLOAD_BOOTSTRAP := false +# 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))) + # Make it easier to test against a custom rustc + ifneq (,$(RUST_DESTDIR)) + RUST_LIBRARY_PATH := $(RUST_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH):$(RUST_DESTDIR)/usr/lib + LD_LIBRARY_PATH := $(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):$(RUST_LIBRARY_PATH),$(RUST_LIBRARY_PATH)) + export LD_LIBRARY_PATH + endif + # + # Case A-2: the builder selected the "dlstage0" build profile. + # In this case, the rust build scripts will download a stage0 into stage0/ and use that. + # We don't need to do anything specific in this build file, so this case is empty. + else + DOWNLOAD_BOOTSTRAP := true + endif +else + # Case B (Bootstrapping a new distro): the extracted source tree does + # include a bootstrapping tarball for the current architecture; see the + # `source_orig-stage0` 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 $(SED_RUSTC_BUILDDEP))) + ifeq (,$(shell $(SED_RUSTC_BUILDDEP) | grep '!$(DEB_HOST_ARCH)')) + PRECONFIGURE_CHECK = $(error found matches for stage0/*/*$(DEB_HOST_RUST_TYPE)*, \ + but rustc might be a Build-Depends for $(DEB_HOST_ARCH)) + endif + endif +endif + +BUILD_DOCS := true +ifneq (,$(findstring nodoc,$(DEB_BUILD_PROFILES))) + BUILD_DOCS := false +endif +ifneq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS))) + BUILD_DOCS := false +endif + +BUILD_WASM := true +ifneq (,$(findstring nowasm,$(DEB_BUILD_PROFILES))) + BUILD_WASM := false +endif + +WINDOWS_SUPPORT := amd64 i386 +BUILD_WINDOWS := true +ifneq (,$(findstring nowindows,$(DEB_BUILD_PROFILES))) + BUILD_WINDOWS := false +endif +ifeq (,$(filter $(DEB_HOST_ARCH), $(WINDOWS_SUPPORT))) + BUILD_WINDOWS := false +else + ifeq (,$(filter $(DEB_BUILD_ARCH), $(WINDOWS_SUPPORT))) + ifeq (true,$(BUILD_WINDOWS)) + $(error cannot cross-compile from $(DEB_BUILD_ARCH) to $(DEB_HOST_ARCH), unless "nowindows" is in DEB_BUILD_PROFILES) + endif + endif + ifeq (i386,$(DEB_HOST_ARCH)) + WINDOWS_ARCH := i686 + else + WINDOWS_ARCH := x86_64 + endif +endif +# for dh_install substitution variable +export WINDOWS_ARCH + +MAKE_OPTIMISATIONS := true +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + MAKE_OPTIMISATIONS := false +endif + +VERBOSITY_SUB := $(words $(filter terse,$(DEB_BUILD_OPTIONS))) +VERBOSITY_ADD := $(words $(filter verbose,$(DEB_BUILD_OPTIONS))) +VERBOSITY := $(shell expr 2 + $(VERBOSITY_ADD) - $(VERBOSITY_SUB)) + +ifeq ($(shell test $(VERBOSITY) -ge 3; echo $$?),0) + export DH_VERBOSE=1 +endif + +ifeq ($(shell test $(VERBOSITY) -le 0; echo $$?),0) + export DH_QUIET=1 +.SILENT: +endif + +# Build products or non-source files in src/, that shouldn't go in rust-src +SRC_CLEAN = src/bootstrap/bootstrap.pyc \ + src/bootstrap/__pycache__ \ + src/etc/__pycache__/ + +# Try to work around #933045 +ifneq (,$(filter $(DEB_BUILD_ARCH), mips mipsel)) + SYSTEM_WORKAROUNDS += export MALLOC_ARENA_MAX=1; +endif + +%: + $(SYSTEM_WORKAROUNDS) dh $@ --parallel + +.PHONY: .dbg-windows +.dbg-windows: + @echo host=$(DEB_BUILD_ARCH) target=$(DEB_HOST_ARCH) BUILD_WINDOWS=$(BUILD_WINDOWS) WINDOWS_ARCH=$(WINDOWS_ARCH) + +.PHONY: build +build: + $(SYSTEM_WORKAROUNDS) dh $@ --parallel + +override_dh_clean: + # Upstream contains a lot of these + dh_clean -XCargo.toml.orig + +debian/config.toml: debian/config.toml.in debian/rules + u="$(DEB_VERSION_UPSTREAM)"; \ + if [ "$$u" != "$${u%~beta.*+dfsg*}" ]; then channel="beta"; \ + else channel="stable"; fi; \ + m4 -DRELEASE_CHANNEL="$$channel" \ + -DDEB_BUILD_RUST_TYPE="$(DEB_BUILD_RUST_TYPE)" \ + -DDEB_HOST_RUST_TYPE="$(DEB_HOST_RUST_TYPE)" \ + -DDEB_TARGET_RUST_TYPE="$(DEB_TARGET_RUST_TYPE)" \ + -DDEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \ + -DDEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \ + -DDEB_TARGET_GNU_TYPE="$(DEB_TARGET_GNU_TYPE)" \ + -DMAKE_OPTIMISATIONS="$(MAKE_OPTIMISATIONS)" \ + -DVERBOSITY="$(VERBOSITY)" \ + -DLLVM_DESTDIR="$(LLVM_DESTDIR)" \ + -DLLVM_VERSION="$(LLVM_VERSION)" \ + -DRUST_DESTDIR="$(RUST_DESTDIR)" \ + "$<" > "$@" + if $(DOWNLOAD_BOOTSTRAP) || [ $(HAVE_BINARY_TARBALL) != 0 ]; \ + then sed -i -e '/^rustc = /d' -e '/^cargo = /d' "$@"; fi +# Work around low-memory (32-bit) architectures: https://github.com/rust-lang/rust/issues/45854 +# i386 and x32 fail to mmap rustc_driver when building rustdoc in >1.60 +ifneq (,$(filter $(DEB_BUILD_ARCH), armhf armel i386 mips mipsel powerpc powerpcspe x32)) + sed -i -e 's/^debuginfo-level = .*/debuginfo-level = 0/g' "$@" +endif + +check-no-old-llvm: + # fail the build if we have any instances of OLD_LLVM_VERSION in debian, except for debian/changelog + ! grep --color=always -i '\(clang\|ll\(..\|d\)\)-\?$(subst .,\.,$(OLD_LLVM_VERSION))' --exclude=changelog --exclude=copyright --exclude='*.patch' --exclude-dir='.debhelper' -R debian +.PHONY: check-no-old-llvm + +debian/dh_auto_configure.stamp: debian/config.toml check-no-old-llvm + # fail the build if we accidentally vendored openssl, indicates we pulled in unnecessary dependencies + test ! -e vendor/openssl + # fail the build if our version contains ~exp and we are not releasing to experimental + v="$(DEB_VERSION)"; test "$$v" = "$${v%~exp*}" -o "$(DEB_DISTRIBUTION)" = "experimental" -o "$(DEB_DISTRIBUTION)" = "UNRELEASED" + $(PRECONFIGURE_CHECK) + if [ -d stage0 ]; then mkdir -p build && ln -sfT ../stage0 build/cache; fi + # work around #842634 + if test $$(grep "127.0.0.1\s*localhost" /etc/hosts | wc -l) -gt 1; then \ + debian/ensure-patch -N debian/patches/d-test-host-duplicates.patch; fi + # don't care about lock changes + rm -f Cargo.lock src/bootstrap/Cargo.lock src/tools/rust-analyzer/Cargo.lock + # We patched some crates so have to rm the checksums + find vendor -name .cargo-checksum.json -execdir "$(CURDIR)/debian/prune-checksums" "{}" + + # Link against system liblzma, see https://github.com/alexcrichton/xz2-rs/issues/16 + echo 'fn main() { println!("cargo:rustc-link-lib=lzma"); }' > vendor/lzma-sys/build.rs + # We don't run ./configure because we use debian/config.toml directly + ln -sf debian/config.toml config.toml + touch "$@" + +override_dh_auto_configure-arch: debian/dh_auto_configure.stamp +override_dh_auto_configure-indep: debian/dh_auto_configure.stamp +ifeq (true,$(BUILD_DOCS)) +# Change config.toml now and not later, since that might trigger a rebuild + sed -i -e 's/^docs = false/docs = true/' debian/config.toml +endif + +override_dh_auto_clean: + $(RM) -rf build tmp debian/cargo_home config.stamp config.mk Makefile + $(RM) -rf $(TEST_LOG) debian/config.toml debian/*.stamp + $(RM) -rf $(SRC_CLEAN) config.toml + +debian/dh_auto_build.stamp: + $(RUSTBUILD) build $(RUSTBUILD_FLAGS) + +override_dh_auto_build-arch: debian/dh_auto_build.stamp +ifeq (true,$(BUILD_WINDOWS)) + $(RUSTBUILD) build $(RUSTBUILD_FLAGS) \ + --host $(DEB_BUILD_RUST_TYPE) \ + --target $(WINDOWS_ARCH)-pc-windows-gnu \ + library/std +endif + +override_dh_auto_build-indep: debian/dh_auto_build.stamp +ifeq (true,$(BUILD_WASM)) + $(RUSTBUILD) build $(RUSTBUILD_FLAGS) \ + --host $(DEB_BUILD_RUST_TYPE) \ + --target wasm32-unknown-unknown,wasm32-wasi \ + library/std +endif +ifeq (true,$(BUILD_DOCS)) + $(RUSTBUILD) doc $(RUSTBUILD_FLAGS) +endif + +TEST_LOG = debian/rustc-tests.log +# This is advertised as "5 tests failed" in README.Debian because our counting +# method is imprecise and in practise we count some failures twice. +FAILURES_ALLOWED = 8 +ifneq (,$(filter $(DEB_BUILD_ARCH), armhf)) + FAILURES_ALLOWED = 12 +endif +ifneq (,$(filter $(DEB_BUILD_ARCH), armel mips mipsel mips64el)) + FAILURES_ALLOWED = 24 +endif +ifneq (,$(filter $(DEB_BUILD_ARCH), ppc64 s390x)) + FAILURES_ALLOWED = 40 +endif +ifneq (,$(filter $(DEB_BUILD_ARCH), powerpc powerpcspe riscv64 sparc64 x32)) + FAILURES_ALLOWED = 180 +endif +FAILED_TESTS = grep "FAILED\|^command did not execute successfully" $(TEST_LOG) | grep -v '^test result: FAILED' | grep -v 'FAILED (allowed)' +# ignore debuginfo failures on armhf due to regression in GDB 11.2 +# https://sourceware.org/bugzilla/show_bug.cgi?id=29272 +ifneq (,$(filter $(DEB_BUILD_ARCH), armhf)) + FAILED_TESTS += | grep -v '^test \[debuginfo-gdb\] src/test/debuginfo/' +endif +override_dh_auto_test-arch: + # ensure that rustc_llvm is actually dynamically linked to libLLVM + set -e; find build/*/stage2/lib/rustlib/* -name '*rustc_llvm*.so' | \ + while read x; do \ + stat -c '%s %n' "$$x"; \ + objdump -p "$$x" | grep -q "NEEDED.*LLVM"; \ + test "$$(stat -c %s "$$x")" -lt 6000000; \ + done +ifeq (, $(filter nocheck,$(DEB_BUILD_PROFILES))) +ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS))) + { $(RUSTBUILD_TEST) $(RUSTBUILD_FLAGS) $(RUSTBUILD_TEST_FLAGS); echo $$?; } | tee -a $(TEST_LOG) + # test that the log has at least 1 pass, to prevent e.g. #57709 + grep -l "^test .* \.\.\. ok$$" $(TEST_LOG) + echo "==== Debian rustc test report ===="; \ + echo "Specific test failures:"; \ + $(FAILED_TESTS); \ + num_failures=$$($(FAILED_TESTS) | wc -l); \ + exit_code=$$(tail -n1 $(TEST_LOG)); \ + echo "Summary: exit code $$exit_code, counted $$num_failures tests failed."; \ + echo -n "$(FAILURES_ALLOWED) maximum allowed. "; \ + if test "$$num_failures" -eq 0 -a "$$exit_code" -ne 0; then \ + echo "Aborting just in case, because we missed counting some test failures."; \ + echo "This could happen if we failed to build the tests, or if the testsuite runner is buggy."; \ + false; \ + elif test "$$num_failures" -le $(FAILURES_ALLOWED); then \ + echo "Continuing..."; \ + else \ + echo "Aborting the build."; \ + echo "Check the logs further above for details."; \ + false; \ + fi +# don't continue if RUSTBUILD_TEST_FLAGS is non-empty + test -z "$(RUSTBUILD_TEST_FLAGS)" +# don't run windows tests yet +endif +endif + +override_dh_auto_test-indep: +ifeq (, $(filter nocheck,$(DEB_BUILD_PROFILES))) +ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS))) +ifeq (true,$(BUILD_WASM)) + # Ignore failures in these tests, but run them so we see what it's like + -PATH=$(CURDIR)/debian/bin:$(PATH) $(RUSTBUILD_TEST) $(RUSTBUILD_FLAGS) $(RUSTBUILD_TEST_FLAGS) \ + --host $(DEB_BUILD_RUST_TYPE) \ + --target wasm32-unknown-unknown,wasm32-wasi \ + library/std +endif +ifeq (true,$(BUILD_DOCS)) + # Run all rules that test the docs, i.e. that depend on default:doc + $(RUSTBUILD_TEST) $(RUSTBUILD_FLAGS) src/tools/linkchecker +endif + test -z "$(RUSTBUILD_TEST_FLAGS)" +endif +endif + +run_rustbuild: + DESTDIR=$(DEB_DESTDIR) $(RUSTBUILD) $(X_CMD) $(RUSTBUILD_FLAGS) $(X_FLAGS) + +override_dh_prep: + dh_prep + $(RM) -f debian/dh_auto_install.stamp + +debian/dh_auto_install.stamp: + DESTDIR=$(DEB_DESTDIR) $(RUSTBUILD) install $(RUSTBUILD_FLAGS) + + 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 + + touch "$@" + +override_dh_auto_install-arch: debian/dh_auto_install.stamp +ifeq (true,$(BUILD_WINDOWS)) + DESTDIR=$(DEB_DESTDIR) $(RUSTBUILD) install $(RUSTBUILD_FLAGS) \ + --host $(DEB_BUILD_RUST_TYPE) \ + --target $(WINDOWS_ARCH)-pc-windows-gnu \ + library/std +endif + +override_dh_auto_install-indep: debian/dh_auto_install.stamp +ifeq (true,$(BUILD_WASM)) + DESTDIR=$(DEB_DESTDIR) $(RUSTBUILD) install $(RUSTBUILD_FLAGS) \ + --host $(DEB_BUILD_RUST_TYPE) \ + --target wasm32-unknown-unknown,wasm32-wasi \ + library/std +endif +ifeq (true,$(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/*/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\|www\).rust-lang.org/\(favicon.ico\|logos/rust-logo-32x32-blk.png\),$${topdir}rust-logo-32x32-blk.png," \ + -e 's,<img src="https://github.com/rust-lang/rust-clippy/workflows/Clippy%20Test/badge.svg[^"]*" alt="\([^"]*\)" />,<span class="deb-privacy-replace--github.com-badge">\1</span>,g' \ + -e 's,<img src="https://img.shields.io/[^"]*" alt="\([^"]*\)" />,<span class="deb-privacy-replace--shields-io">\1</span>,g' "$$file"; \ + done + find $(DEB_DESTDIR) \( -iname '*.html' -empty -o -name .lock -o -name '*.inc' \) -delete; +endif + +override_dh_install-indep: + dh_install + $(RM) -rf $(SRC_CLEAN:%=debian/rust-src/usr/src/rustc-$(RUST_LONG_VERSION)/%) + # Get rid of lintian warnings + find debian/rust-src/usr/src/rustc-$(RUST_LONG_VERSION) \ + \( -name .gitignore \ + -o -name 'LICENSE*' \ + -o -name 'LICENCE' \ + -o -name 'license' \ + -o -name 'COPYING*' \ + -o -name '.eslintrc.js' \ + \) -delete + # Remove files that autoload remote resources, caught by lintian + $(RM) -rf debian/rust-src/usr/src/rustc-*/vendor/cssparser/docs/*.html + $(RM) -rf debian/rust-src/usr/src/rustc-*/vendor/kuchiki/docs/*.html + $(RM) -rf debian/rust-src/usr/src/rustc-*/vendor/url/docs/*.html + $(RM) -rf debian/rust-src/usr/src/rustc-*/vendor/xz2/.gitmodules + +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 + +# The below override is disabled on advice from #debian-devel, because: +# - only shared libs get the "split dbgsym package" treatment by dh_strip; +# static libs simply get their debuginfo discarded +# - strip(1) sometimes breaks wasm libs +# +#override_dh_strip: +# # Work around #35733, #468333 +# find debian/libstd-rust-dev*/ -name '*.rlib' -execdir mv '{}' '{}.a' \; +# # This is expected to print out lots of "File format unrecognized" warnings about +# # rust.metadata.bin and *.deflate but the .o files inside the rlibs should be stripped +# # Some files are still omitted because of #875780 however. +# dh_strip -v +# find debian/libstd-rust-dev*/ -name '*.rlib.a' -execdir sh -c 'mv "$$1" "$${1%.a}"' - '{}' \; + +override_dh_dwz: + # otherwise rustc gets an empty multifile which lintian errors on, causing + # FTP auto-reject. this is a work-around, the lintian bug is #955752 + dh_dwz --no-dwz-multifile + +override_dh_makeshlibs: + dh_makeshlibs -V + + # dh_makeshlibs doesn't support our "libfoo-version.so" naming + # structure, so we have to do this ourselves. + mkdir -p 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 + +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-stage0: + QUILT_PATCHES=debian/patches quilt push -aq; $(QUILT_SPECIAL_SNOWFLAKE_RETURN_CODE) + $(MAKE) -f debian/rules clean + debian/make_orig-stage0_tarball.sh + QUILT_PATCHES=debian/patches quilt pop -aq; $(QUILT_SPECIAL_SNOWFLAKE_RETURN_CODE) + rm -rf .pc + +get_beta_version = \ + u="$(DEB_VERSION_UPSTREAM)"; \ + if [ "$$u" != "$${u%~beta.*+dfsg*}" ]; then \ + newver=$(shell echo $(RUST_VERSION) | perl -lpe 's/(\d+)\.(\d+)/$$1 . "." . ($$2)/e'); \ + else \ + newver=$(shell echo $(RUST_VERSION) | perl -lpe 's/(\d+)\.(\d+)/$$1 . "." . ($$2+1)/e'); \ + fi + +debian/watch-beta: debian/watch-beta.in debian/rules + set -e; $(get_beta_version); \ + m4 -DOLDVER="$$oldver" -DNEWVER="$$newver.0" "$<" > "$@" + +source_orig-beta: debian/watch-beta + uscan $(USCAN_OPTS) $(if $(USCAN_DESTDIR),--destdir=$(USCAN_DESTDIR),) --verbose --watchfile "$<" + set -e; $(get_beta_version); \ + bd="$(if $(USCAN_DESTDIR),$(USCAN_DESTDIR),..)"; \ + tar xf $$bd/rustc-$$newver.0-beta.999-src.tar.xz rustc-beta-src/version; \ + bv="$$(sed -re 's/[0-9]+.[0-9]+.[0-9]+-beta.([0-9]+) \(.*\)/\1/g' rustc-beta-src/version)"; \ + bash -c 'shopt -s nullglob; for i in '"$$bd"'/rustc*beta.999*; do mv $$i $${i/beta.999/beta.'"$$bv"'}; done'; \ + rm -f rustc-beta-src/version; \ + rmdir -p rustc-beta-src; \ + echo "prepared rustc $$newver.0~beta.$$bv in $$bd" diff --git a/debian/rust-clippy.install b/debian/rust-clippy.install new file mode 100644 index 000000000..cad917bfc --- /dev/null +++ b/debian/rust-clippy.install @@ -0,0 +1,2 @@ +usr/bin/clippy-driver +usr/bin/cargo-clippy diff --git a/debian/rust-doc.doc-base.book b/debian/rust-doc.doc-base.book new file mode 100644 index 000000000..80c3e08a8 --- /dev/null +++ b/debian/rust-doc.doc-base.book @@ -0,0 +1,13 @@ +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 + /usr/share/doc/rust-doc/html/book/*/*.html diff --git a/debian/rust-doc.doc-base.reference b/debian/rust-doc.doc-base.reference new file mode 100644 index 000000000..a538f8bcd --- /dev/null +++ b/debian/rust-doc.doc-base.reference @@ -0,0 +1,11 @@ +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/index.html +Files: /usr/share/doc/rust-doc/html/reference/*.html + /usr/share/doc/rust-doc/html/reference/*/*.html diff --git a/debian/rust-doc.docs b/debian/rust-doc.docs new file mode 100644 index 000000000..5a0e189bd --- /dev/null +++ b/debian/rust-doc.docs @@ -0,0 +1 @@ +debian/tmp/usr/share/doc/rust/html diff --git a/debian/rust-doc.install b/debian/rust-doc.install new file mode 100644 index 000000000..de6024b0c --- /dev/null +++ b/debian/rust-doc.install @@ -0,0 +1 @@ +debian/icons/rust-logo-32x32-blk.png usr/share/doc/rust-doc/html/ diff --git a/debian/rust-gdb.install b/debian/rust-gdb.install new file mode 100644 index 000000000..7c1bf5d5d --- /dev/null +++ b/debian/rust-gdb.install @@ -0,0 +1,5 @@ +usr/bin/rust-gdb +usr/bin/rust-gdbgui +usr/lib/rustlib/etc/gdb_load_rust_pretty_printers.py +usr/lib/rustlib/etc/gdb_lookup.py +usr/lib/rustlib/etc/gdb_providers.py diff --git a/debian/rust-gdb.links b/debian/rust-gdb.links new file mode 100644 index 000000000..51b82a4b7 --- /dev/null +++ b/debian/rust-gdb.links @@ -0,0 +1 @@ +usr/share/man/man1/gdb.1.gz usr/share/man/man1/rust-gdb.1.gz diff --git a/debian/rust-lldb.install b/debian/rust-lldb.install new file mode 100644 index 000000000..8d5ff5192 --- /dev/null +++ b/debian/rust-lldb.install @@ -0,0 +1,4 @@ +usr/bin/rust-lldb +usr/lib/rustlib/etc/lldb_commands +usr/lib/rustlib/etc/lldb_lookup.py +usr/lib/rustlib/etc/lldb_providers.py diff --git a/debian/rust-lldb.links b/debian/rust-lldb.links new file mode 100644 index 000000000..d9de18f77 --- /dev/null +++ b/debian/rust-lldb.links @@ -0,0 +1 @@ +usr/share/man/man1/lldb-14.1.gz usr/share/man/man1/rust-lldb.1.gz diff --git a/debian/rust-src.install b/debian/rust-src.install new file mode 100644 index 000000000..b4b93ffcb --- /dev/null +++ b/debian/rust-src.install @@ -0,0 +1,15 @@ +debian/patches usr/src/rustc-${env:RUST_LONG_VERSION}/debian +# from src/bootstrap/dist.rs:370 onwards +COPYRIGHT usr/src/rustc-${env:RUST_LONG_VERSION} +LICENSE-APACHE usr/src/rustc-${env:RUST_LONG_VERSION} +LICENSE-MIT usr/src/rustc-${env:RUST_LONG_VERSION} +CONTRIBUTING.md usr/src/rustc-${env:RUST_LONG_VERSION} +README.md usr/src/rustc-${env:RUST_LONG_VERSION} +RELEASES.md usr/src/rustc-${env:RUST_LONG_VERSION} +configure usr/src/rustc-${env:RUST_LONG_VERSION} +x.py usr/src/rustc-${env:RUST_LONG_VERSION} +config.toml.example usr/src/rustc-${env:RUST_LONG_VERSION} +Cargo.toml usr/src/rustc-${env:RUST_LONG_VERSION} +src usr/src/rustc-${env:RUST_LONG_VERSION} +library usr/src/rustc-${env:RUST_LONG_VERSION} +compiler usr/src/rustc-${env:RUST_LONG_VERSION} diff --git a/debian/rust-src.links b/debian/rust-src.links new file mode 100644 index 000000000..c1b645bd8 --- /dev/null +++ b/debian/rust-src.links @@ -0,0 +1 @@ +usr/src/rustc-${env:RUST_LONG_VERSION} usr/lib/rustlib/src/rust diff --git a/debian/rust-src.lintian-overrides b/debian/rust-src.lintian-overrides new file mode 100644 index 000000000..c6aa9f964 --- /dev/null +++ b/debian/rust-src.lintian-overrides @@ -0,0 +1,6 @@ +# False positives that change quite often, so just override with a wildcard +rust-src binary: executable-not-elf-or-script [usr/src/rustc-*/*] +rust-src binary: package-contains-eslint-config-file usr/src/rustc-*/src/librustdoc/html/static/.eslintrc.js +rust-src binary: breakout-link usr/lib/rustlib/src/rust -> usr/src/rustc-* +rust-src binary: embedded-javascript-library * [usr/src/rustc-*/*] +rust-src binary: national-encoding [usr/src/rustc-*/*] diff --git a/debian/rustc.install b/debian/rustc.install new file mode 100644 index 000000000..10efe89df --- /dev/null +++ b/debian/rustc.install @@ -0,0 +1,6 @@ +usr/bin/rustc +usr/bin/rustdoc +usr/lib/rustlib/etc/rust_types.py +usr/libexec/rust-analyzer-proc-macro-srv +debian/architecture.mk usr/share/rustc/ +debian/wasi-node usr/share/rustc/bin/ diff --git a/debian/rustc.links b/debian/rustc.links new file mode 100644 index 000000000..db024ff24 --- /dev/null +++ b/debian/rustc.links @@ -0,0 +1,6 @@ +usr/bin/lld-14 usr/bin/rust-lld +usr/bin/clang-14 usr/bin/rust-clang +usr/bin/llvm-dwp-14 usr/bin/rust-llvm-dwp +# for -Z gcc-ld=lld, see compiler/rustc_codegen_ssa/src/back/link.rs for logic +usr/bin/rust-lld usr/lib/rustlib/${env:DEB_HOST_RUST_TYPE}/bin/gcc-ld/ld +usr/bin/rust-lld usr/lib/rustlib/${env:DEB_HOST_RUST_TYPE}/bin/gcc-ld/ld64 diff --git a/debian/rustc.lintian-overrides b/debian/rustc.lintian-overrides new file mode 100644 index 000000000..b3d9d2dae --- /dev/null +++ b/debian/rustc.lintian-overrides @@ -0,0 +1,7 @@ +# unofficial example script, no dependency needed +rustc binary: missing-dep-for-interpreter /usr/bin/node (does not satisfy nodejs:any) [usr/share/rustc/bin/wasi-node] + +# symlinks to other programs +rustc binary: no-manual-page [usr/bin/rust-clang] +rustc binary: no-manual-page [usr/bin/rust-lld] +rustc binary: no-manual-page [usr/bin/rust-llvm-dwp] diff --git a/debian/rustc.manpages b/debian/rustc.manpages new file mode 100644 index 000000000..f153792b9 --- /dev/null +++ b/debian/rustc.manpages @@ -0,0 +1,3 @@ +debian/tmp/usr/share/man/man1/rustc.1 +debian/tmp/usr/share/man/man1/rustdoc.1 + diff --git a/debian/rustfmt.install b/debian/rustfmt.install new file mode 100644 index 000000000..e946f2db1 --- /dev/null +++ b/debian/rustfmt.install @@ -0,0 +1,2 @@ +usr/bin/rustfmt +usr/bin/cargo-fmt diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/include-binaries b/debian/source/include-binaries new file mode 100644 index 000000000..33bec9522 --- /dev/null +++ b/debian/source/include-binaries @@ -0,0 +1,6 @@ +debian/icons/rust-logo-32x32-blk.png +# if you are here because dpkg-source told you to "add stage0/rustc-** in d/source/include-binaries", +# ignore that instruction and instead: +# a) if you want to use the orig-stage0 for your next upload, then extract it into stage0/ +# b) if you don't want to use it, then rename "../rustc_${version}.orig-stage0.tar.xz" to something else +# see also d/source/options and d/source/local-options and #577113. diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 000000000..003835cd6 --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1,9 @@ +# Long documentation +rustc source: source-is-missing [library/stdarch/crates/stdarch-verify/arm-intrinsics.html] +# Test data +rustc source: source-is-missing [src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/*.html] +rustc source: source-is-missing [src/test/rustdoc/decl-trailing-whitespace.declaration.html] +rustc source: source-is-missing [vendor/html5ever/data/bench/*.html] +rustc source: source-is-missing [vendor/minifier/tests/files/minified_main.js] +rustc source: source-contains-prebuilt-windows-binary [vendor/libloading/tests/nagisa32.dll] +rustc source: source-contains-prebuilt-windows-binary [vendor/libloading/tests/nagisa64.dll] diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 000000000..8a8c93f54 --- /dev/null +++ b/debian/source/options @@ -0,0 +1,4 @@ +# this helps to prevent accidentally including the orig-stage0 tarball in a non +# orig-stage0 upload, after running `debian/rules source_orig-stage0`. +# we can get rid of this after #577113 is fixed +include-removal diff --git a/debian/update-version.sh b/debian/update-version.sh new file mode 100755 index 000000000..c2b1688de --- /dev/null +++ b/debian/update-version.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# Don't run this directly, use "debian/rules update-version" instead + +prev_stable() { +local V=$1 +python3 -c 'import sys; k=list(map(int,sys.argv[1].split("."))); k[1]-=1; print(".".join(map(str,k)))' "$V" +} + +cargo_new() { +local V=$1 +python3 -c 'import sys; k=list(map(int,sys.argv[1].split("."))); k[1]+='"${2:-1}"'; k[0]-=1; print(".".join(map(str,k)))' "$V" +} + +update() { +local ORIG=$1 NEW=$2 NEW_LONG=$3 +local CARGO_NEW=${4:-$(cargo_new $NEW)} +local CARGO_NEXT=${4:-$(cargo_new $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) + +WASI_CI="$(grep -Rl "git clone https://github.com/WebAssembly/wasi-libc" ../src/ci | head -n1)" +WASI_COMMIT="$(egrep -o '\b[0-9A-Fa-f]{7}' "$WASI_CI")" +WASI_REGEX='wasi-libc \(([><=]+) 0.0~git([0-9]+).([0-9a-f]+)([~+]+)\)' + +if [ -z "$WASI_COMMIT" -o "$(printf '%s\n' "$WASI_COMMIT" | wc -l)" != 1 ]; then + echo >&2 "error: could not determine unique WASI_COMMIT ($WASI_COMMIT), please figure it out from src/ci and update my logic" + exit 1 +fi + +WASI_COMMIT_OLD="$(sed -nre 's|.*'"${WASI_REGEX}"'.*|\3|gp' control | sort -u)" +if [ -z "$WASI_COMMIT_OLD" -o "$(printf '%s\n' "$WASI_COMMIT_OLD" | wc -l)" != 1 ]; then + echo >&2 "error: could not determine unique WASI_COMMIT_OLD ($WASI_COMMIT_OLD), please figure it out from debian/control and update my logic" + exit 1 +fi + +sed -i -e "s|libstd-rust-${ORIG_R}|libstd-rust-$NEW|g" \ + -e "s|rustc:native\( *\)(<= [^)]*)|rustc:native\1(<= $NEW_LONG++)|g" \ + -e "s|rustc:native\( *\)(>= ${ORIG_M1/./\\.}|rustc:native\1(>= ${NEW_M1}|g" \ + -e "s|cargo\( *\)(>= [^)]*)|cargo\1(>= ${CARGO_NEW}.0~~)|g" \ + -e "s|cargo\( *\)(<< [^)]*)|cargo\1(<< ${CARGO_NEXT}.0~~)|g" \ + control + +if [ "$WASI_COMMIT" != "$WASI_COMMIT_OLD" ]; then + sed -ri -e 's|'"${WASI_REGEX}"'|wasi-libc (\1 0.0~gitFIXME.'"${WASI_COMMIT}"'\4)|g' control + echo >&2 "note: the version of the wasi-libc Build-Depends has changed and needs to be FIXME with the correct date" + echo >&2 "please update that package, upload it to experimental, and supply the correct date in debian/control" +fi + +if [ "$NEW" != "$ORIG" ]; then +git mv libstd-rust-$ORIG.install libstd-rust-$NEW.install +git mv libstd-rust-$ORIG.lintian-overrides libstd-rust-$NEW.lintian-overrides +fi +sed -i -e "s|libstd-rust-${ORIG_R}|libstd-rust-$NEW|g" libstd-rust-$NEW.lintian-overrides +} + +cd $(dirname "$0") +update "$@" diff --git a/debian/upstream-tarball-unsuspicious.txt b/debian/upstream-tarball-unsuspicious.txt new file mode 100644 index 000000000..216c81b8f --- /dev/null +++ b/debian/upstream-tarball-unsuspicious.txt @@ -0,0 +1,378 @@ +## In this file we list false-positives of the check-orig-suspicious.sh script +# so that they can be ignored. You should manually audit all of the files here +# to confirm that they adhere to Debian Policy and the DFSG. In particular, if +# you are blindly adding files here just to get the build to work, you are +# probably Doing It Wrong. Ask in #debian-rust or the mailing list for pointers. + +# False-positive, file(1) misidentifies mime type +vendor/itertools*/examples/iris.data +vendor/regex/tests/unicode.rs +vendor/regex/tests/suffix_reverse.rs +vendor/term/src/terminfo/parser/names.rs + +# False-positive, "verylongtext" but OK +README.md +CONTRIBUTING.md +RELEASES.md +compiler/rustc_codegen_cranelift/docs/dwarf.md +compiler/rustc_codegen_gcc/Readme.md +library/core/src/ffi/c_*.md +library/portable-simd/*.md +library/std/src/sys/sgx/abi/entry.S +library/stdarch/CONTRIBUTING.md +library/stdarch/crates/core_arch/src/aarch64/neon/generated.rs +src/doc/book/first-edition/src/the-stack-and-the-heap.md +src/doc/edition-guide/src/rust-2018/index.md +src/doc/edition-guide/src/rust-2021/disjoint-capture-in-closures.md +src/doc/edition-guide/src/rust-2021/prelude.md +src/doc/embedded-book/src/*/*.md +src/doc/nomicon/src/intro.md +src/doc/reference/src/expressions/closure-expr.md +src/doc/reference/src/inline-assembly.md +src/doc/rust-by-example/src/flow_control/if_let.md +src/doc/rust-by-example/src/std/arc.md +src/doc/rust-by-example/src/trait/dyn.md +src/doc/rust-by-example/src/unsafe/asm.md +src/doc/rustc/src/instrument-coverage.md +src/doc/rustc/src/lints/groups.md +src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabihf.md +src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabi.md +src/doc/rustc/src/targets/known-issues.md +src/doc/rustc-dev-guide/src/*.md +src/doc/rustc-dev-guide/src/*/*.md +src/doc/rustdoc/src/*.md +src/doc/*/CODE_OF_CONDUCT.md +src/doc/unstable-book/src/*/*.md +src/etc/third-party/README.txt +src/librustdoc/html/highlight/fixtures/sample.html +src/librustdoc/html/static/scrape-examples-help.md +src/tools/rustfmt/*.md +src/tools/rust-analyzer/docs/user/manual.adoc +src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/to_proto.rs +vendor/*/Cargo.toml +vendor/*/CHANGELOG.md +vendor/*/CODE_OF_CONDUCT.md +vendor/*/README.md +vendor/*/README.tpl +vendor/*/LICENSE +vendor/*/LICENSE-MIT +vendor/*/*/LICENSE +vendor/*/*/*/LICENSE +vendor/ahash/FAQ.md +vendor/ammonia/src/lib.rs +vendor/clap/examples/derive_ref/README.md +vendor/generic-array/DESIGN.md +vendor/handlebars/src/lib.rs +vendor/handlebars/src/template.rs +vendor/maplit/README.rst +vendor/mdbook/CONTRIBUTING.md +vendor/miniz_oxide/Readme.md +vendor/lazy_static/src/lib.rs +vendor/pulldown-cmark/tests/suite/footnotes.rs +vendor/rustc-demangle/src/legacy.rs +vendor/stable_deref_trait/src/lib.rs +vendor/tinyvec/LICENSE-*.md +vendor/tracing-subscriber/src/fmt/format/json.rs +vendor/unicase/src/lib.rs +vendor/unicode-normalization/src/stream_safe.rs +vendor/winapi/src/lib.rs +vendor/windows-sys/readme.md +vendor/windows-sys/src/Windows/Win32/*.rs +vendor/windows-sys/src/Windows/Win32/*/*.rs +vendor/windows-sys/src/Windows/Win32/*/*/*.rs +vendor/windows-sys/src/Windows/Win32/*/*/*/*.rs +vendor/windows-sys-0.*/src/Windows/Win32/*.rs +vendor/windows-sys-0.*/src/Windows/Win32/*/*.rs +vendor/windows-sys-0.*/src/Windows/Win32/*/*/*.rs +vendor/windows-sys-0.*/src/Windows/Win32/*/*/*/*.rs + +# False-positive, audit-vendor-source automatically flags JS/C files +# The below ones are OK since they're actually part of rust's own source code +# and are not "embedded libraries". +src/ci/docker/scripts/qemu-bare-bones-addentropy.c +src/doc/book/*/ferris.js +src/doc/book/ferris.js +src/doc/rustc-dev-guide/mermaid-init.js +src/etc/wasm32-shim.js +src/librustdoc/html/static/js/*.js +src/librustdoc/html/static/.eslintrc.js +src/test/auxiliary/rust_test_helpers.c +src/test/run-make/*/*.c +src/test/run-make/wasm-*/*.js +src/test/run-make-fulldeps/*/*.c +src/test/rustdoc-js/*.js +src/test/rustdoc-js-std/*.js +src/tools/rustdoc-js/tester.js +src/tools/rustdoc-gui/tester.js + +# Embedded libraries, justified in README.source +vendor/dlmalloc/src/dlmalloc.c +vendor/mdbook/src/theme/book.js +vendor/mdbook/src/theme/searcher/searcher.js +vendor/windows_*_gnu/lib/libwindows.a +vendor/windows_*_msvc/lib/windows.lib +vendor/windows_*_gnu-0.*/lib/libwindows.a +vendor/windows_*_msvc-0.*/lib/windows.lib + +# Trivial glue code for C <-> Rust +library/backtrace/src/android-api.c +library/backtrace/crates/line-tables-only/src/callback.c +vendor/backtrace/src/android-api.c +vendor/errno-dragonfly/src/errno.c +vendor/stacker/src/arch/windows.c + +# False-positive, misc +src/doc/rustc-dev-guide/src/queries/example-0.counts.txt +src/stage0.json +src/test/run-make-fulldeps/target-specs/*.json +src/tools/clippy/.remarkrc +vendor/elasticlunr-rs/src/lang/*.rs + +# False-positive, hand-editable small image +src/etc/installer/gfx/ +src/doc/embedded-book/src/assets/*.png +src/doc/embedded-book/src/assets/*.svg +src/doc/embedded-book/src/assets/f3.jpg +src/doc/embedded-book/src/assets/verify.jpeg +src/doc/nomicon/src/img/safeandunsafe.svg +src/doc/book/second-edition/src/img/*.png +src/doc/book/second-edition/src/img/*.svg +src/doc/book/src/img/ferris/*.svg +src/doc/book/src/img/*.png +src/doc/book/src/img/*.svg +src/doc/book/2018-edition/src/img/ferris/*.svg +src/doc/book/2018-edition/src/img/*.svg +src/doc/book/2018-edition/src/img/*.png +src/doc/book/tools/docx-to-md.xsl +src/doc/rustc/src/images/*.png +src/doc/rustc-dev-guide/src/img/rustc_stages.svg +src/doc/rustc-dev-guide/src/queries/example-0.png +src/doc/rustc-dev-guide/src/img/*.png +src/librustdoc/html/static/images/*.svg +src/librustdoc/html/static/images/favicon-*.png +src/test/mir-opt/coverage_graphviz.*.InstrumentCoverage.0.dot +src/tools/rust-analyzer/assets/logo-*.svg +vendor/mdbook/src/theme/favicon.svg +vendor/mdbook/src/theme/favicon.png +vendor/pretty_assertions-0.7.2/examples/*.png + +# Example code +vendor/html5ever/examples/capi/tokenize.c +vendor/sysinfo/examples/simple.c + +# Test data +library/portable-simd/crates/core_simd/webdriver.json +library/portable-simd/crates/core_simd/tests/mask_ops_impl/*.rs +library/std/src/sys/windows/path/tests.rs +library/stdarch/ci/gba.json +library/stdarch/crates/stdarch-verify/arm-intrinsics.html +library/stdarch/crates/stdarch-verify/x86-intel.xml +library/stdarch/crates/std_detect/src/detect/test_data/*.auxv +library/core/benches/str.rs +library/core/tests/num/dec2flt/parse.rs +src/test/debuginfo/type-names.cdb.js +src/test/mir-opt/*.mir +src/test/mir-opt/*.diff +src/test/mir-opt/*/*.mir +src/test/mir-opt/*/*.diff +src/test/rustdoc/tuples.link2_i32.html +src/test/*/*.rs +src/test/*/*.stdout +src/test/*/issues/*.rs +src/test/*/*/issue-*.rs +src/test/*/*/issues/*.rs +src/test/*/*.stderr +src/test/*/*/*.rs +src/test/*/*/*.json +src/test/*/*/*.stderr +src/test/*/*/*.stdout +src/test/*/*/*/*.stdout +src/test/*/*/*/*.stderr +src/test/*/*/*/*/*.stderr +src/test/run-make/*-sgx-lvi/enclave/*/*/*.c +src/test/run-make/*-sgx-lvi/enclave/*.c +src/test/rustdoc/*.html +src/test/ui/macros/not-utf8.bin +src/tools/*/tests/*/*.stderr +src/tools/clippy/tests/ui-toml/*/*.stderr +src/tools/clippy/tests/ui-toml/large_include_file/too_big.txt +src/tools/clippy/tests/ui/wildcard_enum_match_arm.fixed +src/tools/rustfmt/tests/writemode/target/*.json +src/tools/rustfmt/tests/writemode/target/*.xml +src/tools/rustfmt/tests/source/*.rs +src/tools/rustfmt/tests/source/*/*.rs +src/tools/rustfmt/tests/target/issue-5088/very_long_comment_wrap_comments_false.rs +src/tools/rust-analyzer/bench_data/numerous_macro_rules +src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures/0005.rs +src/tools/rust-analyzer/crates/project-model/test_data/*.json +src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/test_data/clippy_pass_by_ref.txt +src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/* +src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_*.html +vendor/annotate-snippets/tests/fixtures/no-color/strip_line_non_ws.toml +vendor/bstr/src/unicode/data/*Test.txt +vendor/cargo_metadata*/tests/test_samples.rs +vendor/diff/tests/data/gitignores.chars.diff +vendor/dissimilar/benches/*.txt +vendor/elasticlunr-rs/tests/data/*.in.txt +vendor/elasticlunr-rs/tests/searchindex_fixture_*.json +vendor/flate2/tests/*.gz +vendor/flate2/tests/corrupt-gz-file.bin +vendor/fluent-syntax/benches/parser.rs +vendor/gimli-0*/fixtures/self/* +vendor/gimli/fixtures/self/* +vendor/gsgdt/tests/*.json +vendor/html5ever/data/bench/*.html +vendor/idna/tests/IdnaTest*.txt +vendor/idna/tests/punycode_tests.json +vendor/libloading/tests/*.dll +vendor/lsp-types/tests/tsc-unix.lsif +vendor/md-5/tests/data/*.blb +vendor/mdbook/test_book/src/individual/paragraph.md +vendor/mdbook/test_book/src/individual/table.md +vendor/mdbook/tests/searchindex_fixture.json +vendor/memchr/src/tests/*.json +vendor/minifier/tests/files/main.js +vendor/minifier/tests/files/minified_main.js +vendor/minifier/tests/files/test.json +vendor/minimal-lexical/tests/parse_tests.rs +vendor/minimal-lexical/tests/slow_tests.rs +vendor/petgraph/tests/res/*.txt +vendor/regex-automata/data/fowler-tests/basic.dat +vendor/regex-automata/data/tests/fowler/basic.dat +vendor/regex/src/testdata/basic.dat +vendor/regex/tests/crates_regex.rs +vendor/regex/tests/fowler.rs +vendor/rustc-demangle/src/lib.rs +vendor/rustc-demangle/src/v0-large-test-symbols/early-recursion-limit +vendor/serde_json/tests/lexical/parse.rs +vendor/sha-1-0*/tests/data/*.bin +vendor/sha-1-0*/tests/data/*.blb +vendor/sha-1/tests/data/*.blb +vendor/sha2/tests/data/*.blb +vendor/term/tests/data/* +vendor/unicode-ident/tests/fst/*.fst +vendor/unicode-segmentation/src/testdata.rs +vendor/url/tests/*.json +vendor/walkdir/compare/nftw.c + +# Compromise, ideally we'd autogenerate these +# Should already by documented in debian/copyright +src/doc/rustc-dev-guide/src/mir/mir_*.svg +src/librustdoc/html/static/css/normalize.css +src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs +src/tools/rust-analyzer/crates/parser/src/syntax_kind/generated.rs +vendor/linux-raw-sys/src/x86_64/general.rs +vendor/pest_meta/src/grammar.rs +vendor/regex-syntax/src/unicode_tables/*.rs +vendor/ucd-parse/src/sentence_break.rs +vendor/ucd-trie/src/general_category.rs +vendor/unicode-normalization/src/tables.rs +vendor/unicode-script/src/tables.rs +vendor/unicode-segmentation/src/tables.rs +vendor/wasi/src/lib_generated.rs + +# Compromise, ideally we'd package these in their own package +src/librustdoc/html/static/fonts/*.woff2 + +# Compromise, ideally we'd autogenerate these +vendor/bstr/src/unicode/fsm/*.dfa + +# file brokenness (detected as Algol source code) +vendor/digest/src/core_api/wrapper.rs +vendor/digest/src/core_api/rt_variable.rs +vendor/ahash/src/hash_quality_test.rs +vendor/clap/src/derive.rs +vendor/futures-macro/src/select.rs +vendor/nom/src/error.rs +vendor/nom/src/internal.rs +vendor/nom/src/bits/mod.rs +vendor/nom/src/bits/streaming.rs +vendor/nom/src/bits/complete.rs +vendor/nom/src/bytes/streaming.rs +vendor/nom/src/bytes/complete.rs +vendor/nom/src/branch/mod.rs +vendor/nom/src/branch/tests.rs +vendor/nom/src/multi/tests.rs +vendor/nom/src/multi/mod.rs +vendor/nom/src/number/complete.rs +vendor/nom/src/number/streaming.rs +vendor/nom/src/combinator/tests.rs +vendor/nom/src/character/streaming.rs +vendor/nom/src/character/complete.rs +vendor/nom/src/sequence/mod.rs +vendor/nom/tests/multiline.rs +vendor/nom/tests/css.rs +vendor/askama_shared/src/generator.rs +vendor/block-buffer/tests/mod.rs +src/tools/rustfmt/src/parse/parser.rs +vendor/libm/src/math/atan.rs +vendor/pest/tests/calculator.rs +vendor/pest/src/position.rs +vendor/pest/src/parser_state.rs +vendor/pest/src/span.rs +vendor/aho-corasick/src/nfa.rs +vendor/miniz_oxide/src/deflate/mod.rs +vendor/miniz_oxide/src/inflate/mod.rs +vendor/miniz_oxide-0.4.0/src/deflate/mod.rs +vendor/miniz_oxide-0.4.0/src/inflate/mod.rs +vendor/thiserror-impl/src/attr.rs +vendor/shlex/src/lib.rs +vendor/semver/src/parse.rs +vendor/rustc-rayon/tests/sort-panic-safe.rs +vendor/url/src/parser.rs +vendor/utf-8/tests/unit.rs +vendor/rustversion/src/attr.rs +vendor/env_logger/src/fmt/writer/mod.rs +vendor/env_logger-0.*/src/fmt/writer/mod.rs +vendor/pest_generator/src/generator.rs +vendor/digest/src/dev.rs +vendor/proc-macro2/src/parse.rs +vendor/xz2/src/stream.rs +vendor/xz2/src/bufread.rs +vendor/digest-0.8.1/src/dev.rs +vendor/pulldown-cmark/tests/lib.rs +vendor/pulldown-cmark/src/linklabel.rs +vendor/pulldown-cmark/benches/html_rendering.rs +vendor/gimli/src/read/aranges.rs +vendor/gimli/src/read/rnglists.rs +vendor/gimli/src/read/unit.rs +vendor/gimli/src/read/loclists.rs +vendor/gimli/src/read/line.rs +vendor/gimli/src/read/lookup.rs +vendor/gimli-0.25.0/src/read/aranges.rs +vendor/gimli-0.25.0/src/read/rnglists.rs +vendor/gimli-0.25.0/src/read/unit.rs +vendor/gimli-0.25.0/src/read/loclists.rs +vendor/gimli-0.25.0/src/read/line.rs +vendor/gimli-0.25.0/src/read/lookup.rs +vendor/regex-automata/src/regex.rs +vendor/rayon/tests/sort-panic-safe.rs +vendor/syn/tests/test_meta.rs +vendor/syn/src/punctuated.rs +vendor/syn/src/derive.rs +vendor/syn/src/token.rs +vendor/syn/src/data.rs +vendor/syn/src/ty.rs +vendor/syn/src/stmt.rs +vendor/syn/src/pat.rs +vendor/syn/src/custom_punctuation.rs +vendor/syn/src/path.rs +vendor/syn/src/attr.rs +vendor/syn/src/group.rs +vendor/sha2/src/sha512.rs +vendor/sha2/src/sha256.rs +vendor/compiler_builtins/libm/src/math/atan.rs +vendor/snap/src/decompress.rs +vendor/snap/src/compress.rs +vendor/flate2/src/mem.rs +vendor/flate2/src/zio.rs +compiler/rustc_expand/src/mbe/quoted.rs +compiler/rustc_macros/src/symbols/tests.rs +src/librustdoc/html/markdown/tests.rs +src/test/run-make-fulldeps/symbol-visibility/Makefile +src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs +src/tools/clippy/clippy_lints/src/pass_by_ref_or_value.rs +src/tools/rust-analyzer/crates/ide-assists/src/handlers/number_representation.rs +src/tools/rustfmt/src/string.rs +src/tools/rustfmt/src/formatting.rs +library/std/src/sys/unix/process/process_unix.rs diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc new file mode 100644 index 000000000..93e2282c7 --- /dev/null +++ b/debian/upstream/signing-key.asc @@ -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/debian/wasi-node b/debian/wasi-node new file mode 100755 index 000000000..c1d576275 --- /dev/null +++ b/debian/wasi-node @@ -0,0 +1,54 @@ +#!/usr/bin/node --experimental-wasi-unstable-preview1 +/// +/// Simple WASI executor, adapted from the NodeJS WASI module API docs [1]. +/// +/// Usage: wasi-node <command> [<args> .. ] +/// +/// Environment variables: +/// +/// WASI_NODE_PREOPENS - optional JSON file defining the application sandbox +/// directory structure. See [1] for details. +/// +/// WASI_NODE_ENV - optional JSON file defining the application environment. +/// If omitted then the process's POSIX environment is used; this may leak +/// information. If a clean environment is required then set this to /dev/null +/// or some other empty file. +/// +/// [1] https://nodejs.org/api/wasi.html + +'use strict'; +const fs = require('fs'); +const { WASI } = require('wasi'); + +// argv[0] is nodejs +// argv[1] is this script +var args = process.argv.slice(2); // inner argv includes cmd + +if (!args[0]) { + console.warn(process.argv[1] + ": no command given"); + process.exit(1); +} + +var preopens = {}; +var preopens_json = process.env["WASI_NODE_PREOPENS"]; +if (preopens_json) { + var preopens_data = fs.readFileSync(preopens_json); + preopens = preopens_data.length ? JSON.parse(preopens_data) : {}; +} + +var env = process.env; +var env_json = process.env["WASI_NODE_ENV"]; +if (env_json) { + var env_data = fs.readFileSync(env_json); + env = env_data.length ? JSON.parse(env_data) : {}; +} + +const wasi = new WASI({ args: args, env: env, preopens: preopens }); +const importObject = { wasi_snapshot_preview1: wasi.wasiImport }; + +(async () => { + const wasm = await WebAssembly.compile(fs.readFileSync(args[0])); + const instance = await WebAssembly.instantiate(wasm, importObject); + + wasi.start(instance); +})(); diff --git a/debian/watch b/debian/watch new file mode 100644 index 000000000..fe1cc1e51 --- /dev/null +++ b/debian/watch @@ -0,0 +1,18 @@ +version=4 +# if you need to download other versions replace the URL below with this one: +# https://static.rust-lang.org/dist/channel-rust-$VERSION.toml +# and also add searchmode=plain,\ +# it's a bit slower to download, that's why we use the other one normally + +opts="\ +pgpsigurlmangle=s/$/.asc/,\ +uversionmangle=s/(\d)[_.+-]?((beta|alpha)\.?\d*)$/$1~$2/,\ +dversionmangle=s/\+dfsg\d*$//,\ +downloadurlmangle=s/\.[gx]z/.xz/,\ +filenamemangle=s/.*\/(.*)\.[gx]z(\..*)?/$1.xz$2/,\ +repack,\ +repacksuffix=+dfsg1,\ +compression=xz,\ +" \ + https://forge.rust-lang.org/infra/other-installation-methods.html \ + https://(?:.*/)rustc?-(\d[\d.]*(?:-[\w.]+)?)-src\.tar\.[gx]z diff --git a/debian/watch-beta.in b/debian/watch-beta.in new file mode 100644 index 000000000..5cd2aa66e --- /dev/null +++ b/debian/watch-beta.in @@ -0,0 +1,17 @@ +version=4 +# if you need to download other versions replace the URL below with this one: +# https://static.rust-lang.org/dist/index.html +# it's a bit slower to download, that's why we use the other one normally + +opts="\ +pgpsigurlmangle=s/$/.asc/,\ +uversionmangle=s/.*/NEWVER~beta.999/,\ +dversionmangle=s/\+dfsg\d*$//,\ +downloadurlmangle=s/rustc-.*-(.*)\.[gx]z/rustc-beta-$1.xz/,\ +filenamemangle=s/.*\/(.*)-[^-]*-(.*)\.[gx]z(\..*)?/$1-NEWVER-beta.999-$2.xz$3/,\ +repack,\ +repacksuffix=+dfsg1,\ +compression=xz,\ +" \ + https://forge.rust-lang.org/infra/other-installation-methods.html \ + (?:.*/)rustc?-(.*)-src\.tar\.[gx]z |