892f9b
# Only x86_64 and i686 are Tier 1 platforms at this time.
892f9b
# https://doc.rust-lang.org/nightly/rustc/platform-support.html
b0e138
%global rust_arches x86_64 i686 aarch64 ppc64le s390x
892f9b
892f9b
# The channel can be stable, beta, or nightly
892f9b
%{!?channel: %global channel stable}
892f9b
892f9b
# To bootstrap from scratch, set the channel and date from src/stage0.txt
892f9b
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
892f9b
# or nightly wants some beta-YYYY-MM-DD
892f9b
# Note that cargo matches the program version here, not its crate version.
b0e138
%global bootstrap_rust 1.55.0
b0e138
%global bootstrap_cargo 1.55.0
b0e138
%global bootstrap_channel 1.55.0
b0e138
%global bootstrap_date 2021-09-09
892f9b
892f9b
# Only the specified arches will use bootstrap binaries.
892f9b
#global bootstrap_arches %%{rust_arches}
892f9b
892f9b
# Define a space-separated list of targets to ship rust-std-static-$triple for
892f9b
# cross-compilation. The packages are noarch, but they're not fully
892f9b
# reproducible between hosts, so only x86_64 actually builds it.
892f9b
%ifarch x86_64
892f9b
%if 0%{?fedora} || 0%{?rhel} >= 8
b0e138
%global cross_targets wasm32-unknown-unknown wasm32-wasi
892f9b
%endif
892f9b
%endif
892f9b
b0e138
# We need CRT files for *-wasi targets, at least as new as the commit in
b0e138
# src/ci/docker/host-x86_64/dist-various-2/build-wasi-toolchain.sh
b0e138
%global forgeurl1 https://github.com/WebAssembly/wasi-libc
b0e138
%global commit1 ad5133410f66b93a2381db5b542aad5e0964db96
b0e138
%forgemeta -z 1
b0e138
%undefine distprefix1
b0e138
%global wasi_libc_source %{forgesource1}
b0e138
%global wasi_libc_dir %{_builddir}/%{extractdir1}
b0e138
892f9b
# Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases.
892f9b
%bcond_with llvm_static
892f9b
892f9b
# We can also choose to just use Rust's bundled LLVM, in case the system LLVM
892f9b
# is insufficient.  Rust currently requires LLVM 10.0+.
892f9b
%bcond_with bundled_llvm
892f9b
892f9b
# Requires stable libgit2 1.1
892f9b
%if 0%{?fedora} >= 34
892f9b
%bcond_with bundled_libgit2
892f9b
%else
892f9b
%bcond_without bundled_libgit2
892f9b
%endif
892f9b
892f9b
%if 0%{?rhel}
892f9b
# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949)
892f9b
%bcond_without disabled_libssh2
892f9b
%else
892f9b
%bcond_with disabled_libssh2
892f9b
%endif
892f9b
892f9b
%if 0%{?rhel} && 0%{?rhel} < 8
892f9b
%bcond_with curl_http2
892f9b
%else
892f9b
%bcond_without curl_http2
892f9b
%endif
892f9b
892f9b
# LLDB isn't available everywhere...
892f9b
%if 0%{?rhel} && 0%{?rhel} < 8
892f9b
%bcond_with lldb
892f9b
%else
892f9b
%bcond_without lldb
892f9b
%endif
892f9b
892f9b
Name:           rust
b0e138
Version:        1.56.1
892f9b
Release:        2%{?dist}
892f9b
Summary:        The Rust Programming Language
892f9b
License:        (ASL 2.0 or MIT) and (BSD and MIT)
892f9b
# ^ written as: (rust itself) and (bundled libraries)
892f9b
URL:            https://www.rust-lang.org
892f9b
ExclusiveArch:  %{rust_arches}
892f9b
892f9b
%if "%{channel}" == "stable"
892f9b
%global rustc_package rustc-%{version}-src
892f9b
%else
892f9b
%global rustc_package rustc-%{channel}-src
892f9b
%endif
892f9b
Source0:        https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
b0e138
Source1:        %{wasi_libc_source}
b0e138
# Sources for bootstrap_arches are inserted by lua below
892f9b
b0e138
# An internal rust-abi change broke s390x, but it's fixed in LLVM 12.0.1.
b0e138
# We'll revert the change on Fedora 33 that has an unpatched LLVM 11.
892f9b
# https://github.com/rust-lang/rust/issues/80810#issuecomment-781784032
892f9b
Patch1:         0001-Revert-Auto-merge-of-79547.patch
892f9b
892f9b
# By default, rust tries to use "rust-lld" as a linker for WebAssembly.
892f9b
Patch2:         0001-Use-lld-provided-by-system-for-wasm.patch
892f9b
892f9b
### RHEL-specific patches below ###
892f9b
892f9b
# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949)
b0e138
Patch100:       rustc-1.56.0-disable-libssh2.patch
892f9b
892f9b
# libcurl on RHEL7 doesn't have http2, but since cargo requests it, curl-sys
892f9b
# will try to build it statically -- instead we turn off the feature.
b0e138
Patch101:       rustc-1.56.0-disable-http2.patch
892f9b
892f9b
# kernel rh1410097 causes too-small stacks for PIE.
892f9b
# (affects RHEL6 kernels when building for RHEL7)
892f9b
Patch102:       rustc-1.51.0-no-default-pie.patch
892f9b
892f9b
# Get the Rust triple for any arch.
892f9b
%{lua: function rust_triple(arch)
892f9b
  local abi = "gnu"
892f9b
  if arch == "armv7hl" then
892f9b
    arch = "armv7"
892f9b
    abi = "gnueabihf"
892f9b
  elseif arch == "ppc64" then
892f9b
    arch = "powerpc64"
892f9b
  elseif arch == "ppc64le" then
892f9b
    arch = "powerpc64le"
892f9b
  elseif arch == "riscv64" then
892f9b
    arch = "riscv64gc"
892f9b
  end
892f9b
  return arch.."-unknown-linux-"..abi
892f9b
end}
892f9b
892f9b
%global rust_triple %{lua: print(rust_triple(rpm.expand("%{_target_cpu}")))}
892f9b
892f9b
%if %defined bootstrap_arches
892f9b
# For each bootstrap arch, add an additional binary Source.
892f9b
# Also define bootstrap_source just for the current target.
892f9b
%{lua: do
892f9b
  local bootstrap_arches = {}
892f9b
  for arch in string.gmatch(rpm.expand("%{bootstrap_arches}"), "%S+") do
892f9b
    table.insert(bootstrap_arches, arch)
892f9b
  end
892f9b
  local base = rpm.expand("https://static.rust-lang.org/dist/%{bootstrap_date}"
892f9b
                          .."/rust-%{bootstrap_channel}")
892f9b
  local target_arch = rpm.expand("%{_target_cpu}")
892f9b
  for i, arch in ipairs(bootstrap_arches) do
b0e138
    i = 100 + i
892f9b
    print(string.format("Source%d: %s-%s.tar.xz\n",
892f9b
                        i, base, rust_triple(arch)))
892f9b
    if arch == target_arch then
892f9b
      rpm.define("bootstrap_source "..i)
892f9b
    end
892f9b
  end
892f9b
end}
892f9b
%endif
892f9b
892f9b
%ifarch %{bootstrap_arches}
892f9b
%global bootstrap_root rust-%{bootstrap_channel}-%{rust_triple}
892f9b
%global local_rust_root %{_builddir}/%{bootstrap_root}/usr
892f9b
Provides:       bundled(%{name}-bootstrap) = %{bootstrap_rust}
892f9b
%else
892f9b
BuildRequires:  cargo >= %{bootstrap_cargo}
892f9b
%if 0%{?rhel} && 0%{?rhel} < 8
892f9b
BuildRequires:  %{name} >= %{bootstrap_rust}
892f9b
BuildConflicts: %{name} > %{version}
892f9b
%else
892f9b
BuildRequires:  (%{name} >= %{bootstrap_rust} with %{name} <= %{version})
892f9b
%endif
892f9b
%global local_rust_root %{_prefix}
892f9b
%endif
892f9b
892f9b
BuildRequires:  make
892f9b
BuildRequires:  gcc
892f9b
BuildRequires:  gcc-c++
892f9b
BuildRequires:  ncurses-devel
892f9b
BuildRequires:  curl
892f9b
# explicit curl-devel to avoid httpd24-curl (rhbz1540167)
892f9b
BuildRequires:  curl-devel
892f9b
BuildRequires:  pkgconfig(libcurl)
892f9b
BuildRequires:  pkgconfig(liblzma)
892f9b
BuildRequires:  pkgconfig(openssl)
892f9b
BuildRequires:  pkgconfig(zlib)
892f9b
892f9b
%if %without bundled_libgit2
892f9b
BuildRequires:  pkgconfig(libgit2) >= 1.1.0
892f9b
%endif
892f9b
892f9b
%if %{without disabled_libssh2}
892f9b
# needs libssh2_userauth_publickey_frommemory
892f9b
BuildRequires:  pkgconfig(libssh2) >= 1.6.0
892f9b
%endif
892f9b
892f9b
%global python python3
892f9b
BuildRequires:  %{python}
892f9b
892f9b
%if %with bundled_llvm
892f9b
BuildRequires:  cmake3 >= 3.13.4
b0e138
BuildRequires:  ninja-build
b0e138
Provides:       bundled(llvm) = 13.0.0
892f9b
%else
892f9b
BuildRequires:  cmake >= 2.8.11
892f9b
%if 0%{?epel} == 7
892f9b
%global llvm llvm11
892f9b
%endif
892f9b
%if %defined llvm
892f9b
%global llvm_root %{_libdir}/%{llvm}
892f9b
%else
892f9b
%global llvm llvm
892f9b
%global llvm_root %{_prefix}
892f9b
%endif
892f9b
BuildRequires:  %{llvm}-devel >= 10.0
892f9b
%if %with llvm_static
892f9b
BuildRequires:  %{llvm}-static
892f9b
BuildRequires:  libffi-devel
892f9b
%endif
892f9b
%endif
892f9b
892f9b
# make check needs "ps" for src/test/run-pass/wait-forked-but-failed-child.rs
892f9b
BuildRequires:  procps-ng
892f9b
892f9b
# debuginfo-gdb tests need gdb
892f9b
BuildRequires:  gdb
892f9b
892f9b
# Virtual provides for folks who attempt "dnf install rustc"
892f9b
Provides:       rustc = %{version}-%{release}
892f9b
Provides:       rustc%{?_isa} = %{version}-%{release}
892f9b
892f9b
# Always require our exact standard library
892f9b
Requires:       %{name}-std-static%{?_isa} = %{version}-%{release}
892f9b
892f9b
# The C compiler is needed at runtime just for linking.  Someday rustc might
892f9b
# invoke the linker directly, and then we'll only need binutils.
892f9b
# https://github.com/rust-lang/rust/issues/11937
892f9b
Requires:       /usr/bin/cc
892f9b
892f9b
%if 0%{?epel} == 7
892f9b
%global devtoolset_name devtoolset-9
892f9b
BuildRequires:  %{devtoolset_name}-gcc
892f9b
BuildRequires:  %{devtoolset_name}-gcc-c++
892f9b
%global __cc /opt/rh/%{devtoolset_name}/root/usr/bin/gcc
892f9b
%global __cxx /opt/rh/%{devtoolset_name}/root/usr/bin/g++
892f9b
%endif
892f9b
892f9b
# ALL Rust libraries are private, because they don't keep an ABI.
892f9b
%global _privatelibs lib(.*-[[:xdigit:]]{16}*|rustc.*)[.]so.*
892f9b
%global __provides_exclude ^(%{_privatelibs})$
892f9b
%global __requires_exclude ^(%{_privatelibs})$
892f9b
%global __provides_exclude_from ^(%{_docdir}|%{rustlibdir}/src)/.*$
892f9b
%global __requires_exclude_from ^(%{_docdir}|%{rustlibdir}/src)/.*$
892f9b
892f9b
# While we don't want to encourage dynamic linking to Rust shared libraries, as
892f9b
# there's no stable ABI, we still need the unallocated metadata (.rustc) to
892f9b
# support custom-derive plugins like #[proc_macro_derive(Foo)].
892f9b
%if 0%{?rhel} && 0%{?rhel} < 8
892f9b
# eu-strip is very eager by default, so we have to limit it to -g, only debugging symbols.
892f9b
%global _find_debuginfo_opts -g
892f9b
%undefine _include_minidebuginfo
892f9b
%else
892f9b
# Newer find-debuginfo.sh supports --keep-section, which is preferable. rhbz1465997
892f9b
%global _find_debuginfo_opts --keep-section .rustc
892f9b
%endif
892f9b
892f9b
# Use hardening ldflags.
892f9b
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now
892f9b
892f9b
%if %{without bundled_llvm}
892f9b
%if "%{llvm_root}" == "%{_prefix}" || 0%{?scl:1}
892f9b
%global llvm_has_filecheck 1
892f9b
%endif
892f9b
%endif
892f9b
892f9b
# We're going to override --libdir when configuring to get rustlib into a
892f9b
# common path, but we'll fix the shared libraries during install.
892f9b
%global common_libdir %{_prefix}/lib
892f9b
%global rustlibdir %{common_libdir}/rustlib
892f9b
892f9b
%if %defined cross_targets
b0e138
BuildRequires:  clang
892f9b
# brp-strip-static-archive breaks the archive index for wasm
892f9b
%global __os_install_post \
892f9b
%__os_install_post \
b0e138
find '%{buildroot}%{rustlibdir}' -type f -path '*/wasm*/lib/*.rlib' -print -exec '%{llvm_root}/bin/llvm-ranlib' '{}' ';' \
892f9b
%{nil}
892f9b
%endif
892f9b
892f9b
%description
892f9b
Rust is a systems programming language that runs blazingly fast, prevents
892f9b
segfaults, and guarantees thread safety.
892f9b
892f9b
This package includes the Rust compiler and documentation generator.
892f9b
892f9b
892f9b
%package std-static
892f9b
Summary:        Standard library for Rust
892f9b
892f9b
%description std-static
892f9b
This package includes the standard libraries for building applications
892f9b
written in Rust.
892f9b
892f9b
%if %defined cross_targets
892f9b
%{lua: do
892f9b
  for triple in string.gmatch(rpm.expand("%{cross_targets}"), "%S+") do
892f9b
    local subs = {
892f9b
      triple = triple,
b0e138
      verrel = rpm.expand("%{version}-%{release}"),
b0e138
      wasm = string.sub(triple, 1, 4) == "wasm" and 1 or 0,
b0e138
      wasi = string.find(triple, "-wasi") and 1 or 0,
892f9b
    }
892f9b
    local s = string.gsub([[
b0e138
892f9b
%package std-static-{{triple}}
892f9b
Summary:        Standard library for Rust
892f9b
BuildArch:      noarch
b0e138
Requires:       rust = {{verrel}}
b0e138
%if {{wasm}}
b0e138
Requires:       lld >= 8.0
b0e138
%endif
b0e138
%if {{wasi}}
b0e138
Provides:       bundled(wasi-libc)
b0e138
%endif
892f9b
892f9b
%description std-static-{{triple}}
892f9b
This package includes the standard libraries for building applications
892f9b
written in Rust for the {{triple}} target.
b0e138
892f9b
]], "{{(%w+)}}", subs)
892f9b
    print(s)
892f9b
  end
892f9b
end}
892f9b
%endif
892f9b
892f9b
892f9b
%package debugger-common
892f9b
Summary:        Common debugger pretty printers for Rust
892f9b
BuildArch:      noarch
892f9b
892f9b
%description debugger-common
892f9b
This package includes the common functionality for %{name}-gdb and %{name}-lldb.
892f9b
892f9b
892f9b
%package gdb
892f9b
Summary:        GDB pretty printers for Rust
892f9b
BuildArch:      noarch
892f9b
Requires:       gdb
892f9b
Requires:       %{name}-debugger-common = %{version}-%{release}
892f9b
892f9b
%description gdb
892f9b
This package includes the rust-gdb script, which allows easier debugging of Rust
892f9b
programs.
892f9b
892f9b
892f9b
%if %with lldb
892f9b
892f9b
%package lldb
892f9b
Summary:        LLDB pretty printers for Rust
892f9b
BuildArch:      noarch
892f9b
Requires:       lldb
892f9b
Requires:       %{python}-lldb
892f9b
Requires:       %{name}-debugger-common = %{version}-%{release}
892f9b
892f9b
%description lldb
892f9b
This package includes the rust-lldb script, which allows easier debugging of Rust
892f9b
programs.
892f9b
892f9b
%endif
892f9b
892f9b
892f9b
%package doc
892f9b
Summary:        Documentation for Rust
892f9b
# NOT BuildArch:      noarch
892f9b
# Note, while docs are mostly noarch, some things do vary by target_arch.
892f9b
# Koji will fail the build in rpmdiff if two architectures build a noarch
892f9b
# subpackage differently, so instead we have to keep its arch.
892f9b
892f9b
%description doc
892f9b
This package includes HTML documentation for the Rust programming language and
892f9b
its standard library.
892f9b
892f9b
892f9b
%package -n cargo
892f9b
Summary:        Rust's package manager and build tool
892f9b
%if %with bundled_libgit2
892f9b
Provides:       bundled(libgit2) = 1.1.0
892f9b
%endif
892f9b
# For tests:
892f9b
BuildRequires:  git
892f9b
# Cargo is not much use without Rust
892f9b
Requires:       rust
892f9b
892f9b
# "cargo vendor" is a builtin command starting with 1.37.  The Obsoletes and
892f9b
# Provides are mostly relevant to RHEL, but harmless to have on Fedora/etc. too
892f9b
Obsoletes:      cargo-vendor <= 0.1.23
892f9b
Provides:       cargo-vendor = %{version}-%{release}
892f9b
892f9b
%description -n cargo
892f9b
Cargo is a tool that allows Rust projects to declare their various dependencies
892f9b
and ensure that you'll always get a repeatable build.
892f9b
892f9b
892f9b
%package -n cargo-doc
892f9b
Summary:        Documentation for Cargo
892f9b
BuildArch:      noarch
892f9b
# Cargo no longer builds its own documentation
892f9b
# https://github.com/rust-lang/cargo/pull/4904
892f9b
Requires:       rust-doc = %{version}-%{release}
892f9b
892f9b
%description -n cargo-doc
892f9b
This package includes HTML documentation for Cargo.
892f9b
892f9b
892f9b
%package -n rustfmt
892f9b
Summary:        Tool to find and fix Rust formatting issues
892f9b
Requires:       cargo
892f9b
892f9b
# The component/package was rustfmt-preview until Rust 1.31.
892f9b
Obsoletes:      rustfmt-preview < 1.0.0
892f9b
Provides:       rustfmt-preview = %{version}-%{release}
892f9b
892f9b
%description -n rustfmt
892f9b
A tool for formatting Rust code according to style guidelines.
892f9b
892f9b
892f9b
%package -n rls
892f9b
Summary:        Rust Language Server for IDE integration
892f9b
%if %with bundled_libgit2
892f9b
Provides:       bundled(libgit2) = 1.1.0
892f9b
%endif
892f9b
Requires:       rust-analysis
892f9b
# /usr/bin/rls is dynamically linked against internal rustc libs
892f9b
Requires:       %{name}%{?_isa} = %{version}-%{release}
892f9b
892f9b
# The component/package was rls-preview until Rust 1.31.
892f9b
Obsoletes:      rls-preview < 1.31.6
892f9b
Provides:       rls-preview = %{version}-%{release}
892f9b
892f9b
%description -n rls
892f9b
The Rust Language Server provides a server that runs in the background,
892f9b
providing IDEs, editors, and other tools with information about Rust programs.
892f9b
It supports functionality such as 'goto definition', symbol search,
892f9b
reformatting, and code completion, and enables renaming and refactorings.
892f9b
892f9b
892f9b
%package -n clippy
892f9b
Summary:        Lints to catch common mistakes and improve your Rust code
892f9b
Requires:       cargo
892f9b
# /usr/bin/clippy-driver is dynamically linked against internal rustc libs
892f9b
Requires:       %{name}%{?_isa} = %{version}-%{release}
892f9b
892f9b
# The component/package was clippy-preview until Rust 1.31.
892f9b
Obsoletes:      clippy-preview <= 0.0.212
892f9b
Provides:       clippy-preview = %{version}-%{release}
892f9b
892f9b
%description -n clippy
892f9b
A collection of lints to catch common mistakes and improve your Rust code.
892f9b
892f9b
892f9b
%package src
892f9b
Summary:        Sources for the Rust standard library
892f9b
BuildArch:      noarch
892f9b
892f9b
%description src
892f9b
This package includes source files for the Rust standard library.  It may be
892f9b
useful as a reference for code completion tools in various editors.
892f9b
892f9b
892f9b
%package analysis
892f9b
Summary:        Compiler analysis data for the Rust standard library
892f9b
Requires:       rust-std-static%{?_isa} = %{version}-%{release}
892f9b
892f9b
%description analysis
892f9b
This package contains analysis data files produced with rustc's -Zsave-analysis
892f9b
feature for the Rust standard library. The RLS (Rust Language Server) uses this
892f9b
data to provide information about the Rust standard library.
892f9b
892f9b
892f9b
%prep
892f9b
892f9b
%ifarch %{bootstrap_arches}
892f9b
%setup -q -n %{bootstrap_root} -T -b %{bootstrap_source}
892f9b
./install.sh --components=cargo,rustc,rust-std-%{rust_triple} \
892f9b
  --prefix=%{local_rust_root} --disable-ldconfig
892f9b
test -f '%{local_rust_root}/bin/cargo'
892f9b
test -f '%{local_rust_root}/bin/rustc'
892f9b
%endif
892f9b
b0e138
%if %defined cross_targets
b0e138
%forgesetup -z 1
b0e138
%endif
b0e138
892f9b
%setup -q -n %{rustc_package}
892f9b
b0e138
%if 0%{?fedora} == 33
b0e138
# revert only for LLVM 11
892f9b
%patch1 -p1
b0e138
%endif
b0e138
892f9b
%patch2 -p1
892f9b
892f9b
%if %with disabled_libssh2
892f9b
%patch100 -p1
892f9b
%endif
892f9b
892f9b
%if %without curl_http2
892f9b
%patch101 -p1
892f9b
rm -rf vendor/libnghttp2-sys/
892f9b
%endif
892f9b
892f9b
%if 0%{?rhel} && 0%{?rhel} < 8
892f9b
%patch102 -p1
892f9b
%endif
892f9b
892f9b
%if "%{python}" != "python3"
892f9b
# Use our preferred python first
892f9b
sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure
892f9b
%endif
892f9b
892f9b
%if %without bundled_llvm
892f9b
rm -rf src/llvm-project/
892f9b
mkdir -p src/llvm-project/libunwind/
892f9b
%endif
892f9b
892f9b
# Remove other unused vendored libraries
892f9b
rm -rf vendor/curl-sys/curl/
892f9b
rm -rf vendor/jemalloc-sys/jemalloc/
892f9b
rm -rf vendor/libssh2-sys/libssh2/
892f9b
rm -rf vendor/libz-sys/src/zlib/
892f9b
rm -rf vendor/libz-sys/src/zlib-ng/
892f9b
rm -rf vendor/lzma-sys/xz-*/
892f9b
rm -rf vendor/openssl-src/openssl/
892f9b
892f9b
%if %without bundled_libgit2
892f9b
rm -rf vendor/libgit2-sys/libgit2/
892f9b
%endif
892f9b
892f9b
%if %with disabled_libssh2
892f9b
rm -rf vendor/libssh2-sys/
892f9b
%endif
892f9b
892f9b
# This only affects the transient rust-installer, but let it use our dynamic xz-libs
892f9b
sed -i.lzma -e '/LZMA_API_STATIC/d' src/bootstrap/tool.rs
892f9b
892f9b
%if %{with bundled_llvm} && 0%{?epel} == 7
892f9b
mkdir -p cmake-bin
892f9b
ln -s /usr/bin/cmake3 cmake-bin/cmake
892f9b
%global cmake_path $PWD/cmake-bin
892f9b
%endif
892f9b
892f9b
%if %{without bundled_llvm} && %{with llvm_static}
892f9b
# Static linking to distro LLVM needs to add -lffi
892f9b
# https://github.com/rust-lang/rust/issues/34486
892f9b
sed -i.ffi -e '$a #[link(name = "ffi")] extern {}' \
892f9b
  src/librustc_llvm/lib.rs
892f9b
%endif
892f9b
892f9b
# The configure macro will modify some autoconf-related files, which upsets
892f9b
# cargo when it tries to verify checksums in those files.  If we just truncate
892f9b
# that file list, cargo won't have anything to complain about.
892f9b
find vendor -name .cargo-checksum.json \
892f9b
  -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+'
892f9b
892f9b
# Sometimes Rust sources start with #![...] attributes, and "smart" editors think
892f9b
# it's a shebang and make them executable. Then brp-mangle-shebangs gets upset...
892f9b
find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
892f9b
892f9b
# Set up shared environment variables for build/install/check
892f9b
%global rust_env RUSTFLAGS="%{rustflags}"
892f9b
%if 0%{?cmake_path:1}
892f9b
%global rust_env %{rust_env} PATH="%{cmake_path}:$PATH"
892f9b
%endif
892f9b
%if %without bundled_libgit2
892f9b
# convince libgit2-sys to use the distro libgit2
892f9b
%global rust_env %{rust_env} LIBGIT2_SYS_USE_PKG_CONFIG=1
892f9b
%endif
892f9b
%if %without disabled_libssh2
892f9b
# convince libssh2-sys to use the distro libssh2
892f9b
%global rust_env %{rust_env} LIBSSH2_SYS_USE_PKG_CONFIG=1
892f9b
%endif
892f9b
892f9b
892f9b
%build
892f9b
export %{rust_env}
892f9b
892f9b
%ifarch %{arm} %{ix86} s390x
892f9b
# full debuginfo is exhausting memory; just do libstd for now
892f9b
# https://github.com/rust-lang/rust/issues/45854
892f9b
%if 0%{?rhel} && 0%{?rhel} < 8
892f9b
# Older rpmbuild didn't work with partial debuginfo coverage.
892f9b
%global debug_package %{nil}
892f9b
%define enable_debuginfo --debuginfo-level=0
892f9b
%else
892f9b
%define enable_debuginfo --debuginfo-level=0 --debuginfo-level-std=2
892f9b
%endif
892f9b
%else
892f9b
%define enable_debuginfo --debuginfo-level=2
892f9b
%endif
892f9b
892f9b
# Some builders have relatively little memory for their CPU count.
892f9b
# At least 2GB per CPU is a good rule of thumb for building rustc.
892f9b
ncpus=$(/usr/bin/getconf _NPROCESSORS_ONLN)
892f9b
max_cpus=$(( ($(free -g | awk '/^Mem:/{print $2}') + 1) / 2 ))
892f9b
if [ "$max_cpus" -ge 1 -a "$max_cpus" -lt "$ncpus" ]; then
892f9b
  ncpus="$max_cpus"
892f9b
fi
892f9b
b0e138
%if %defined cross_targets
b0e138
%make_build -C %{wasi_libc_dir}
b0e138
%{lua: do
b0e138
  local wasi_root = rpm.expand("%{wasi_libc_dir}") .. "/sysroot"
b0e138
  local set_wasi_root = ""
b0e138
  for triple in string.gmatch(rpm.expand("%{cross_targets}"), "%S+") do
b0e138
    if string.find(triple, "-wasi") then
b0e138
      set_wasi_root = set_wasi_root .. " --set target." .. triple .. ".wasi-root=" .. wasi_root
b0e138
    end
b0e138
  end
b0e138
  if wasi_root ~= "" then
b0e138
    rpm.define("set_wasi_root "..set_wasi_root)
b0e138
  end
b0e138
end}
b0e138
%endif
b0e138
892f9b
%configure --disable-option-checking \
892f9b
  --libdir=%{common_libdir} \
892f9b
  --build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \
892f9b
  --set target.%{rust_triple}.linker=%{__cc} \
892f9b
  --set target.%{rust_triple}.cc=%{__cc} \
892f9b
  --set target.%{rust_triple}.cxx=%{__cxx} \
892f9b
  --python=%{python} \
892f9b
  --local-rust-root=%{local_rust_root} \
892f9b
  %{!?with_bundled_llvm: --llvm-root=%{llvm_root} \
892f9b
    %{!?llvm_has_filecheck: --disable-codegen-tests} \
892f9b
    %{!?with_llvm_static: --enable-llvm-link-shared } } \
892f9b
  --disable-rpath \
892f9b
  %{enable_debuginfo} \
892f9b
  --set rust.codegen-units-std=1 \
892f9b
  --enable-extended \
892f9b
  --tools=analysis,cargo,clippy,rls,rustfmt,src \
892f9b
  --enable-vendor \
892f9b
  --enable-verbose-tests \
b0e138
  %{?set_wasi_root} \
b0e138
  --dist-compression-formats=gz \
892f9b
  --release-channel=%{channel} \
892f9b
  --release-description="%{?fedora:Fedora }%{?rhel:Red Hat }%{version}-%{release}"
892f9b
892f9b
%{python} ./x.py build -j "$ncpus" --stage 2
892f9b
%{python} ./x.py doc --stage 2
892f9b
892f9b
%if %defined cross_targets
892f9b
for triple in %{cross_targets}; do
892f9b
  %{python} ./x.py build --stage 2 --target=$triple std
892f9b
done
892f9b
%endif
892f9b
892f9b
%install
892f9b
export %{rust_env}
892f9b
892f9b
DESTDIR=%{buildroot} %{python} ./x.py install
892f9b
892f9b
%if %defined cross_targets
892f9b
for triple in %{cross_targets}; do
892f9b
  DESTDIR=%{buildroot} %{python} ./x.py install --target=$triple std
892f9b
done
892f9b
%endif
892f9b
892f9b
# These are transient files used by x.py dist and install
892f9b
rm -rf ./build/dist/ ./build/tmp/
892f9b
892f9b
# Make sure the shared libraries are in the proper libdir
892f9b
%if "%{_libdir}" != "%{common_libdir}"
892f9b
mkdir -p %{buildroot}%{_libdir}
892f9b
find %{buildroot}%{common_libdir} -maxdepth 1 -type f -name '*.so' \
892f9b
  -exec mv -v -t %{buildroot}%{_libdir} '{}' '+'
892f9b
%endif
892f9b
892f9b
# The shared libraries should be executable for debuginfo extraction.
892f9b
find %{buildroot}%{_libdir} -maxdepth 1 -type f -name '*.so' \
892f9b
  -exec chmod -v +x '{}' '+'
892f9b
892f9b
# The libdir libraries are identical to those under rustlib/.  It's easier on
892f9b
# library loading if we keep them in libdir, but we do need them in rustlib/
892f9b
# to support dynamic linking for compiler plugins, so we'll symlink.
892f9b
(cd "%{buildroot}%{rustlibdir}/%{rust_triple}/lib" &&
892f9b
 find ../../../../%{_lib} -maxdepth 1 -name '*.so' |
892f9b
 while read lib; do
892f9b
   if [ -f "${lib##*/}" ]; then
892f9b
     # make sure they're actually identical!
892f9b
     cmp "$lib" "${lib##*/}"
892f9b
     ln -v -f -s -t . "$lib"
892f9b
   fi
892f9b
 done)
892f9b
892f9b
# Remove installer artifacts (manifests, uninstall scripts, etc.)
892f9b
find %{buildroot}%{rustlibdir} -maxdepth 1 -type f -exec rm -v '{}' '+'
892f9b
892f9b
# Remove backup files from %%configure munging
892f9b
find %{buildroot}%{rustlibdir} -type f -name '*.orig' -exec rm -v '{}' '+'
892f9b
892f9b
# https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error
892f9b
# We don't actually need to ship any of those python scripts in rust-src anyway.
892f9b
find %{buildroot}%{rustlibdir}/src -type f -name '*.py' -exec rm -v '{}' '+'
892f9b
892f9b
# FIXME: __os_install_post will strip the rlibs
892f9b
# -- should we find a way to preserve debuginfo?
892f9b
892f9b
# Remove unwanted documentation files (we already package them)
892f9b
rm -f %{buildroot}%{_docdir}/%{name}/README.md
892f9b
rm -f %{buildroot}%{_docdir}/%{name}/COPYRIGHT
892f9b
rm -f %{buildroot}%{_docdir}/%{name}/LICENSE
892f9b
rm -f %{buildroot}%{_docdir}/%{name}/LICENSE-APACHE
892f9b
rm -f %{buildroot}%{_docdir}/%{name}/LICENSE-MIT
892f9b
rm -f %{buildroot}%{_docdir}/%{name}/LICENSE-THIRD-PARTY
892f9b
rm -f %{buildroot}%{_docdir}/%{name}/*.old
892f9b
892f9b
# Sanitize the HTML documentation
892f9b
find %{buildroot}%{_docdir}/%{name}/html -empty -delete
892f9b
find %{buildroot}%{_docdir}/%{name}/html -type f -exec chmod -x '{}' '+'
892f9b
892f9b
# Create the path for crate-devel packages
892f9b
mkdir -p %{buildroot}%{_datadir}/cargo/registry
892f9b
892f9b
# Cargo no longer builds its own documentation
892f9b
# https://github.com/rust-lang/cargo/pull/4904
892f9b
mkdir -p %{buildroot}%{_docdir}/cargo
892f9b
ln -sT ../rust/html/cargo/ %{buildroot}%{_docdir}/cargo/html
892f9b
892f9b
%if %without lldb
892f9b
rm -f %{buildroot}%{_bindir}/rust-lldb
892f9b
rm -f %{buildroot}%{rustlibdir}/etc/lldb_*
892f9b
%endif
892f9b
892f9b
# We don't want Rust copies of LLVM tools (rust-lld, rust-llvm-dwp)
892f9b
rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll*
892f9b
892f9b
892f9b
%check
892f9b
export %{rust_env}
892f9b
b0e138
# Sanity-check the installed binaries, debuginfo-stripped and all.
b0e138
%{buildroot}%{_bindir}/cargo new build/hello-world
b0e138
env RUSTC=%{buildroot}%{_bindir}/rustc \
b0e138
    LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" \
b0e138
    %{buildroot}%{_bindir}/cargo run --manifest-path build/hello-world/Cargo.toml
b0e138
892f9b
# The results are not stable on koji, so mask errors and just log it.
892f9b
# Some of the larger test artifacts are manually cleaned to save space.
892f9b
%{python} ./x.py test --no-fail-fast --stage 2 || :
892f9b
rm -rf "./build/%{rust_triple}/test/"
892f9b
892f9b
%{python} ./x.py test --no-fail-fast --stage 2 cargo || :
892f9b
rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
892f9b
892f9b
%{python} ./x.py test --no-fail-fast --stage 2 clippy || :
b0e138
b0e138
env RLS_TEST_WAIT_FOR_AGES=1 \
892f9b
%{python} ./x.py test --no-fail-fast --stage 2 rls || :
b0e138
892f9b
%{python} ./x.py test --no-fail-fast --stage 2 rustfmt || :
892f9b
892f9b
892f9b
%ldconfig_scriptlets
892f9b
892f9b
892f9b
%files
892f9b
%license COPYRIGHT LICENSE-APACHE LICENSE-MIT
892f9b
%doc README.md
892f9b
%{_bindir}/rustc
892f9b
%{_bindir}/rustdoc
892f9b
%{_libdir}/*.so
892f9b
%{_mandir}/man1/rustc.1*
892f9b
%{_mandir}/man1/rustdoc.1*
892f9b
%dir %{rustlibdir}
892f9b
%dir %{rustlibdir}/%{rust_triple}
892f9b
%dir %{rustlibdir}/%{rust_triple}/lib
892f9b
%{rustlibdir}/%{rust_triple}/lib/*.so
892f9b
892f9b
892f9b
%files std-static
892f9b
%dir %{rustlibdir}
892f9b
%dir %{rustlibdir}/%{rust_triple}
892f9b
%dir %{rustlibdir}/%{rust_triple}/lib
892f9b
%{rustlibdir}/%{rust_triple}/lib/*.rlib
892f9b
892f9b
892f9b
%if %defined cross_targets
892f9b
%{lua: do
892f9b
  for triple in string.gmatch(rpm.expand("%{cross_targets}"), "%S+") do
892f9b
    local subs = {
892f9b
      triple = triple,
892f9b
      rustlibdir = rpm.expand("%{rustlibdir}"),
b0e138
      wasi = string.find(triple, "-wasi") and 1 or 0,
892f9b
    }
892f9b
    local s = string.gsub([[
b0e138
892f9b
%files std-static-{{triple}}
892f9b
%dir {{rustlibdir}}
892f9b
%dir {{rustlibdir}}/{{triple}}
892f9b
%dir {{rustlibdir}}/{{triple}}/lib
892f9b
{{rustlibdir}}/{{triple}}/lib/*.rlib
b0e138
%if {{wasi}}
b0e138
%dir {{rustlibdir}}/{{triple}}/lib/self-contained
b0e138
{{rustlibdir}}/{{triple}}/lib/self-contained/crt*.o
b0e138
%endif
b0e138
892f9b
]], "{{(%w+)}}", subs)
892f9b
    print(s)
892f9b
  end
892f9b
end}
892f9b
%endif
892f9b
892f9b
892f9b
%files debugger-common
892f9b
%dir %{rustlibdir}
892f9b
%dir %{rustlibdir}/etc
892f9b
%{rustlibdir}/etc/rust_*.py*
892f9b
892f9b
892f9b
%files gdb
892f9b
%{_bindir}/rust-gdb
892f9b
%{rustlibdir}/etc/gdb_*
892f9b
%exclude %{_bindir}/rust-gdbgui
892f9b
892f9b
892f9b
%if %with lldb
892f9b
%files lldb
892f9b
%{_bindir}/rust-lldb
892f9b
%{rustlibdir}/etc/lldb_*
892f9b
%endif
892f9b
892f9b
892f9b
%files doc
892f9b
%docdir %{_docdir}/%{name}
892f9b
%dir %{_docdir}/%{name}
892f9b
%dir %{_docdir}/%{name}/html
892f9b
%{_docdir}/%{name}/html/*/
892f9b
%{_docdir}/%{name}/html/*.html
892f9b
%{_docdir}/%{name}/html/*.css
892f9b
%{_docdir}/%{name}/html/*.js
892f9b
%{_docdir}/%{name}/html/*.png
892f9b
%{_docdir}/%{name}/html/*.svg
892f9b
%{_docdir}/%{name}/html/*.woff
892f9b
%{_docdir}/%{name}/html/*.woff2
892f9b
%license %{_docdir}/%{name}/html/*.txt
892f9b
%license %{_docdir}/%{name}/html/*.md
892f9b
892f9b
892f9b
%files -n cargo
892f9b
%license src/tools/cargo/LICENSE-APACHE src/tools/cargo/LICENSE-MIT src/tools/cargo/LICENSE-THIRD-PARTY
892f9b
%doc src/tools/cargo/README.md
892f9b
%{_bindir}/cargo
892f9b
%{_libexecdir}/cargo*
892f9b
%{_mandir}/man1/cargo*.1*
892f9b
%{_sysconfdir}/bash_completion.d/cargo
892f9b
%{_datadir}/zsh/site-functions/_cargo
892f9b
%dir %{_datadir}/cargo
892f9b
%dir %{_datadir}/cargo/registry
892f9b
892f9b
892f9b
%files -n cargo-doc
892f9b
%docdir %{_docdir}/cargo
892f9b
%dir %{_docdir}/cargo
892f9b
%{_docdir}/cargo/html
892f9b
892f9b
892f9b
%files -n rustfmt
892f9b
%{_bindir}/rustfmt
892f9b
%{_bindir}/cargo-fmt
892f9b
%doc src/tools/rustfmt/{README,CHANGELOG,Configurations}.md
892f9b
%license src/tools/rustfmt/LICENSE-{APACHE,MIT}
892f9b
892f9b
892f9b
%files -n rls
892f9b
%{_bindir}/rls
892f9b
%doc src/tools/rls/{README.md,COPYRIGHT,debugging.md}
892f9b
%license src/tools/rls/LICENSE-{APACHE,MIT}
892f9b
892f9b
892f9b
%files -n clippy
892f9b
%{_bindir}/cargo-clippy
892f9b
%{_bindir}/clippy-driver
892f9b
%doc src/tools/clippy/{README.md,CHANGELOG.md}
892f9b
%license src/tools/clippy/LICENSE-{APACHE,MIT}
892f9b
892f9b
892f9b
%files src
892f9b
%dir %{rustlibdir}
892f9b
%{rustlibdir}/src
892f9b
892f9b
892f9b
%files analysis
892f9b
%{rustlibdir}/%{rust_triple}/analysis/
892f9b
892f9b
892f9b
%changelog
b0e138
* Wed Dec 01 2021 Josh Stone <jistone@redhat.com> - 1.56.1-2
b0e138
- Add rust-std-static-wasm32-wasi
b0e138
  Resolves: rhbz#1980082
b0e138
b0e138
* Thu Nov 04 2021 Josh Stone <jistone@redhat.com> - 1.56.1-1
b0e138
- Update to 1.56.1.
b0e138
b0e138
* Fri Oct 29 2021 Josh Stone <jistone@redhat.com> - 1.55.0-1
b0e138
- Update to 1.55.0.
b0e138
892f9b
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.54.0-2
892f9b
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
892f9b
  Related: rhbz#1991688
892f9b
892f9b
* Wed Aug 04 2021 Josh Stone <jistone@redhat.com> - 1.54.0-1
892f9b
- Update to 1.54.0.
892f9b
892f9b
* Tue Jun 22 2021 Josh Stone <jistone@redhat.com> - 1.53.0-1
892f9b
- Update to 1.53.0.
892f9b
- Update openssl crates to published versions for 3.0 support.
892f9b
892f9b
* Tue Jun 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.52.1-4
892f9b
- Rebuilt for RHEL 9 BETA for openssl 3.0
892f9b
892f9b
* Mon Jun 07 2021 Josh Stone <jistone@redhat.com> - 1.52.1-3
892f9b
- Set rust.codegen-units-std=1 for all targets again.
892f9b
- Add rust-std-static-wasm32-unknown-unknown.
892f9b
892f9b
* Tue May 18 2021 Josh Stone <jistone@redhat.com> - 1.52.1-2
892f9b
- Rebuild for OpenSSL 3.0.0-alpha16
892f9b
892f9b
* Thu May 13 2021 Josh Stone <jistone@redhat.com> - 1.52.1-1
892f9b
- Update to 1.52.1. Includes security fixes for CVE-2020-36323,
892f9b
  CVE-2021-28876, CVE-2021-28878, CVE-2021-28879, and CVE-2021-31162.
892f9b
- Initial support for OpenSSL 3.0.0-alpha15
892f9b
892f9b
* Wed Apr 28 2021 Josh Stone <jistone@redhat.com> - 1.51.0-1
892f9b
- Update to 1.51.0. Includes security fixes for CVE-2021-28875
892f9b
  and CVE-2021-28877.
892f9b
892f9b
* Tue Apr 27 2021 Josh Stone <jistone@redhat.com> - 1.50.0-1
892f9b
- Update to 1.50.0.
892f9b
892f9b
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.49.0-5
892f9b
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
892f9b
892f9b
* Fri Feb 12 2021 Josh Stone <jistone@redhat.com> - 1.49.0-4
892f9b
- Rebuild without bootstrap binaries
892f9b
892f9b
* Thu Feb 11 2021 Josh Stone <jistone@redhat.com> - 1.49.0-3
892f9b
- Re-bootstrap due to removed LLVM targets
892f9b
892f9b
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.0-2
892f9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
892f9b
892f9b
* Tue Jan 05 2021 Josh Stone <jistone@redhat.com> - 1.49.0-1
892f9b
- Update to 1.49.0.
892f9b
892f9b
* Tue Dec 29 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.48.0-3
892f9b
- De-bootstrap
892f9b
892f9b
* Mon Dec 28 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.48.0-2
892f9b
- Rebuild for libgit2 1.1.x
892f9b
892f9b
* Thu Nov 19 2020 Josh Stone <jistone@redhat.com> - 1.48.0-1
892f9b
- Update to 1.48.0.
892f9b
892f9b
* Sat Oct 10 2020 Jeff Law <law@redhat.com> - 1.47.0-2
892f9b
- Re-enable LTO
892f9b
892f9b
* Thu Oct 08 2020 Josh Stone <jistone@redhat.com> - 1.47.0-1
892f9b
- Update to 1.47.0.
892f9b
892f9b
* Fri Aug 28 2020 Fabio Valentini <decathorpe@gmail.com> - 1.46.0-2
892f9b
- Fix LTO with doctests (backported cargo PR#8657).
892f9b
892f9b
* Thu Aug 27 2020 Josh Stone <jistone@redhat.com> - 1.46.0-1
892f9b
- Update to 1.46.0.
892f9b
892f9b
* Mon Aug 03 2020 Josh Stone <jistone@redhat.com> - 1.45.2-1
892f9b
- Update to 1.45.2.
892f9b
892f9b
* Thu Jul 30 2020 Josh Stone <jistone@redhat.com> - 1.45.1-1
892f9b
- Update to 1.45.1.
892f9b
892f9b
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.45.0-2
892f9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
892f9b
892f9b
* Thu Jul 16 2020 Josh Stone <jistone@redhat.com> - 1.45.0-1
892f9b
- Update to 1.45.0.
892f9b
892f9b
* Wed Jul 01 2020 Jeff Law <law@redhat.com> - 1.44.1-2
892f9b
- Disable LTO
892f9b
892f9b
* Thu Jun 18 2020 Josh Stone <jistone@redhat.com> - 1.44.1-1
892f9b
- Update to 1.44.1.
892f9b
892f9b
* Thu Jun 04 2020 Josh Stone <jistone@redhat.com> - 1.44.0-1
892f9b
- Update to 1.44.0.
892f9b
892f9b
* Thu May 07 2020 Josh Stone <jistone@redhat.com> - 1.43.1-1
892f9b
- Update to 1.43.1.
892f9b
892f9b
* Thu Apr 23 2020 Josh Stone <jistone@redhat.com> - 1.43.0-1
892f9b
- Update to 1.43.0.
892f9b
892f9b
* Thu Mar 12 2020 Josh Stone <jistone@redhat.com> - 1.42.0-1
892f9b
- Update to 1.42.0.
892f9b
892f9b
* Thu Feb 27 2020 Josh Stone <jistone@redhat.com> - 1.41.1-1
892f9b
- Update to 1.41.1.
892f9b
892f9b
* Thu Feb 20 2020 Josh Stone <jistone@redhat.com> - 1.41.0-2
892f9b
- Rebuild with llvm9.0
892f9b
892f9b
* Thu Jan 30 2020 Josh Stone <jistone@redhat.com> - 1.41.0-1
892f9b
- Update to 1.41.0.
892f9b
892f9b
* Thu Jan 16 2020 Josh Stone <jistone@redhat.com> - 1.40.0-3
892f9b
- Build compiletest with in-tree libtest
892f9b
892f9b
* Tue Jan 07 2020 Josh Stone <jistone@redhat.com> - 1.40.0-2
892f9b
- Fix compiletest with newer (local-rebuild) libtest
892f9b
- Fix ARM EHABI unwinding
892f9b
892f9b
* Thu Dec 19 2019 Josh Stone <jistone@redhat.com> - 1.40.0-1
892f9b
- Update to 1.40.0.
892f9b
892f9b
* Tue Nov 12 2019 Josh Stone <jistone@redhat.com> - 1.39.0-2
892f9b
- Fix a couple build and test issues with rustdoc.
892f9b
892f9b
* Thu Nov 07 2019 Josh Stone <jistone@redhat.com> - 1.39.0-1
892f9b
- Update to 1.39.0.
892f9b
892f9b
* Fri Sep 27 2019 Josh Stone <jistone@redhat.com> - 1.38.0-2
892f9b
- Filter the libraries included in rust-std (rhbz1756487)
892f9b
892f9b
* Thu Sep 26 2019 Josh Stone <jistone@redhat.com> - 1.38.0-1
892f9b
- Update to 1.38.0.
892f9b
892f9b
* Thu Aug 15 2019 Josh Stone <jistone@redhat.com> - 1.37.0-1
892f9b
- Update to 1.37.0.
892f9b
892f9b
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.36.0-2
892f9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
892f9b
892f9b
* Thu Jul 04 2019 Josh Stone <jistone@redhat.com> - 1.36.0-1
892f9b
- Update to 1.36.0.
892f9b
892f9b
* Wed May 29 2019 Josh Stone <jistone@redhat.com> - 1.35.0-2
892f9b
- Fix compiletest for rebuild testing.
892f9b
892f9b
* Thu May 23 2019 Josh Stone <jistone@redhat.com> - 1.35.0-1
892f9b
- Update to 1.35.0.
892f9b
892f9b
* Tue May 14 2019 Josh Stone <jistone@redhat.com> - 1.34.2-1
892f9b
- Update to 1.34.2 -- fixes CVE-2019-12083.
892f9b
892f9b
* Tue Apr 30 2019 Josh Stone <jistone@redhat.com> - 1.34.1-3
892f9b
- Set rust.codegen-units-std=1
892f9b
892f9b
* Fri Apr 26 2019 Josh Stone <jistone@redhat.com> - 1.34.1-2
892f9b
- Remove the ThinLTO workaround.
892f9b
892f9b
* Thu Apr 25 2019 Josh Stone <jistone@redhat.com> - 1.34.1-1
892f9b
- Update to 1.34.1.
892f9b
- Add a ThinLTO fix for rhbz1701339.
892f9b
892f9b
* Thu Apr 11 2019 Josh Stone <jistone@redhat.com> - 1.34.0-1
892f9b
- Update to 1.34.0.
892f9b
892f9b
* Fri Mar 01 2019 Josh Stone <jistone@redhat.com> - 1.33.0-2
892f9b
- Fix deprecations for self-rebuild
892f9b
892f9b
* Thu Feb 28 2019 Josh Stone <jistone@redhat.com> - 1.33.0-1
892f9b
- Update to 1.33.0.
892f9b
892f9b
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.32.0-2
892f9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
892f9b
892f9b
* Thu Jan 17 2019 Josh Stone <jistone@redhat.com> - 1.32.0-1
892f9b
- Update to 1.32.0.
892f9b
892f9b
* Mon Jan 07 2019 Josh Stone <jistone@redhat.com> - 1.31.1-9
892f9b
- Update to 1.31.1 for RLS fixes.
892f9b
892f9b
* Thu Dec 06 2018 Josh Stone <jistone@redhat.com> - 1.31.0-8
892f9b
- Update to 1.31.0 -- Rust 2018!
892f9b
- clippy/rls/rustfmt are no longer -preview
892f9b
892f9b
* Thu Nov 08 2018 Josh Stone <jistone@redhat.com> - 1.30.1-7
892f9b
- Update to 1.30.1.
892f9b
892f9b
* Thu Oct 25 2018 Josh Stone <jistone@redhat.com> - 1.30.0-6
892f9b
- Update to 1.30.0.
892f9b
892f9b
* Mon Oct 22 2018 Josh Stone <jistone@redhat.com> - 1.29.2-5
892f9b
- Rebuild without bootstrap binaries.
892f9b
892f9b
* Sat Oct 20 2018 Josh Stone <jistone@redhat.com> - 1.29.2-4
892f9b
- Re-bootstrap armv7hl due to rhbz#1639485
892f9b
892f9b
* Fri Oct 12 2018 Josh Stone <jistone@redhat.com> - 1.29.2-3
892f9b
- Update to 1.29.2.
892f9b
892f9b
* Tue Sep 25 2018 Josh Stone <jistone@redhat.com> - 1.29.1-2
892f9b
- Update to 1.29.1.
892f9b
- Security fix for str::repeat (pending CVE).
892f9b
892f9b
* Thu Sep 13 2018 Josh Stone <jistone@redhat.com> - 1.29.0-1
892f9b
- Update to 1.29.0.
892f9b
- Add a clippy-preview subpackage
892f9b
892f9b
* Mon Aug 13 2018 Josh Stone <jistone@redhat.com> - 1.28.0-3
892f9b
- Use llvm6.0 instead of llvm-7 for now
892f9b
892f9b
* Tue Aug 07 2018 Josh Stone <jistone@redhat.com> - 1.28.0-2
892f9b
- Rebuild for LLVM ppc64/s390x fixes
892f9b
892f9b
* Thu Aug 02 2018 Josh Stone <jistone@redhat.com> - 1.28.0-1
892f9b
- Update to 1.28.0.
892f9b
892f9b
* Tue Jul 24 2018 Josh Stone <jistone@redhat.com> - 1.27.2-4
892f9b
- Update to 1.27.2.
892f9b
892f9b
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.27.1-3
892f9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
892f9b
892f9b
* Tue Jul 10 2018 Josh Stone <jistone@redhat.com> - 1.27.1-2
892f9b
- Update to 1.27.1.
892f9b
- Security fix for CVE-2018-1000622
892f9b
892f9b
* Thu Jun 21 2018 Josh Stone <jistone@redhat.com> - 1.27.0-1
892f9b
- Update to 1.27.0.
892f9b
892f9b
* Tue Jun 05 2018 Josh Stone <jistone@redhat.com> - 1.26.2-4
892f9b
- Rebuild without bootstrap binaries.
892f9b
892f9b
* Tue Jun 05 2018 Josh Stone <jistone@redhat.com> - 1.26.2-3
892f9b
- Update to 1.26.2.
892f9b
- Re-bootstrap to deal with LLVM symbol changes.
892f9b
892f9b
* Tue May 29 2018 Josh Stone <jistone@redhat.com> - 1.26.1-2
892f9b
- Update to 1.26.1.
892f9b
892f9b
* Thu May 10 2018 Josh Stone <jistone@redhat.com> - 1.26.0-1
892f9b
- Update to 1.26.0.
892f9b
892f9b
* Mon Apr 16 2018 Dan Callaghan <dcallagh@redhat.com> - 1.25.0-3
892f9b
- Add cargo, rls, and analysis
892f9b
892f9b
* Tue Apr 10 2018 Josh Stone <jistone@redhat.com> - 1.25.0-2
892f9b
- Filter codegen-backends from Provides too.
892f9b
892f9b
* Thu Mar 29 2018 Josh Stone <jistone@redhat.com> - 1.25.0-1
892f9b
- Update to 1.25.0.
892f9b
892f9b
* Thu Mar 01 2018 Josh Stone <jistone@redhat.com> - 1.24.1-1
892f9b
- Update to 1.24.1.
892f9b
892f9b
* Wed Feb 21 2018 Josh Stone <jistone@redhat.com> - 1.24.0-3
892f9b
- Backport a rebuild fix for rust#48308.
892f9b
892f9b
* Mon Feb 19 2018 Josh Stone <jistone@redhat.com> - 1.24.0-2
892f9b
- rhbz1546541: drop full-bootstrap; cmp libs before symlinking.
892f9b
- Backport pr46592 to fix local_rebuild bootstrapping.
892f9b
- Backport pr48362 to fix relative/absolute libdir.
892f9b
892f9b
* Thu Feb 15 2018 Josh Stone <jistone@redhat.com> - 1.24.0-1
892f9b
- Update to 1.24.0.
892f9b
892f9b
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.23.0-4
892f9b
- Update Python 2 dependency declarations to new packaging standards
892f9b
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
892f9b
892f9b
* Tue Feb 06 2018 Josh Stone <jistone@redhat.com> - 1.23.0-3
892f9b
- Use full-bootstrap to work around a rebuild issue.
892f9b
- Patch binaryen for GCC 8
892f9b
892f9b
* Thu Feb 01 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.23.0-2
892f9b
- Switch to %%ldconfig_scriptlets
892f9b
892f9b
* Mon Jan 08 2018 Josh Stone <jistone@redhat.com> - 1.23.0-1
892f9b
- Update to 1.23.0.
892f9b
892f9b
* Thu Nov 23 2017 Josh Stone <jistone@redhat.com> - 1.22.1-1
892f9b
- Update to 1.22.1.
892f9b
892f9b
* Thu Oct 12 2017 Josh Stone <jistone@redhat.com> - 1.21.0-1
892f9b
- Update to 1.21.0.
892f9b
892f9b
* Mon Sep 11 2017 Josh Stone <jistone@redhat.com> - 1.20.0-2
892f9b
- ABI fixes for ppc64 and s390x.
892f9b
892f9b
* Thu Aug 31 2017 Josh Stone <jistone@redhat.com> - 1.20.0-1
892f9b
- Update to 1.20.0.
892f9b
- Add a rust-src subpackage.
892f9b
892f9b
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.0-4
892f9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
892f9b
892f9b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.0-3
892f9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
892f9b
892f9b
* Mon Jul 24 2017 Josh Stone <jistone@redhat.com> - 1.19.0-2
892f9b
- Use find-debuginfo.sh --keep-section .rustc
892f9b
892f9b
* Thu Jul 20 2017 Josh Stone <jistone@redhat.com> - 1.19.0-1
892f9b
- Update to 1.19.0.
892f9b
892f9b
* Thu Jun 08 2017 Josh Stone <jistone@redhat.com> - 1.18.0-1
892f9b
- Update to 1.18.0.
892f9b
892f9b
* Mon May 08 2017 Josh Stone <jistone@redhat.com> - 1.17.0-2
892f9b
- Move shared libraries back to libdir and symlink in rustlib
892f9b
892f9b
* Thu Apr 27 2017 Josh Stone <jistone@redhat.com> - 1.17.0-1
892f9b
- Update to 1.17.0.
892f9b
892f9b
* Mon Mar 20 2017 Josh Stone <jistone@redhat.com> - 1.16.0-3
892f9b
- Make rust-lldb arch-specific to deal with lldb deps
892f9b
892f9b
* Fri Mar 17 2017 Josh Stone <jistone@redhat.com> - 1.16.0-2
892f9b
- Limit rust-lldb arches
892f9b
892f9b
* Thu Mar 16 2017 Josh Stone <jistone@redhat.com> - 1.16.0-1
892f9b
- Update to 1.16.0.
892f9b
- Use rustbuild instead of the old makefiles.
892f9b
- Update bootstrapping to include rust-std and cargo.
892f9b
- Add a rust-lldb subpackage.
892f9b
892f9b
* Thu Feb 09 2017 Josh Stone <jistone@redhat.com> - 1.15.1-1
892f9b
- Update to 1.15.1.
892f9b
- Require rust-rpm-macros for new crate packaging.
892f9b
- Keep shared libraries under rustlib/, only debug-stripped.
892f9b
- Merge and clean up conditionals for epel7.
892f9b
892f9b
* Fri Dec 23 2016 Josh Stone <jistone@redhat.com> - 1.14.0-2
892f9b
- Rebuild without bootstrap binaries.
892f9b
892f9b
* Thu Dec 22 2016 Josh Stone <jistone@redhat.com> - 1.14.0-1
892f9b
- Update to 1.14.0.
892f9b
- Rewrite bootstrap logic to target specific arches.
892f9b
- Bootstrap ppc64, ppc64le, s390x. (thanks to Sinny Kumari for testing!)
892f9b
892f9b
* Thu Nov 10 2016 Josh Stone <jistone@redhat.com> - 1.13.0-1
892f9b
- Update to 1.13.0.
892f9b
- Use hardening flags for linking.
892f9b
- Split the standard library into its own package
892f9b
- Centralize rustlib/ under /usr/lib/ for multilib integration.
892f9b
892f9b
* Thu Oct 20 2016 Josh Stone <jistone@redhat.com> - 1.12.1-1
892f9b
- Update to 1.12.1.
892f9b
892f9b
* Fri Oct 14 2016 Josh Stone <jistone@redhat.com> - 1.12.0-7
892f9b
- Rebuild with LLVM 3.9.
892f9b
- Add ncurses-devel for llvm-config's -ltinfo.
892f9b
892f9b
* Thu Oct 13 2016 Josh Stone <jistone@redhat.com> - 1.12.0-6
892f9b
- Rebuild with llvm-static, preparing for 3.9
892f9b
892f9b
* Fri Oct 07 2016 Josh Stone <jistone@redhat.com> - 1.12.0-5
892f9b
- Rebuild with fixed eu-strip (rhbz1380961)
892f9b
892f9b
* Fri Oct 07 2016 Josh Stone <jistone@redhat.com> - 1.12.0-4
892f9b
- Rebuild without bootstrap binaries.
892f9b
892f9b
* Thu Oct 06 2016 Josh Stone <jistone@redhat.com> - 1.12.0-3
892f9b
- Bootstrap aarch64.
892f9b
- Use jemalloc's MALLOC_CONF to work around #36944.
892f9b
- Apply pr36933 to really disable armv7hl NEON.
892f9b
892f9b
* Sat Oct 01 2016 Josh Stone <jistone@redhat.com> - 1.12.0-2
892f9b
- Protect .rustc from rpm stripping.
892f9b
892f9b
* Fri Sep 30 2016 Josh Stone <jistone@redhat.com> - 1.12.0-1
892f9b
- Update to 1.12.0.
892f9b
- Always use --local-rust-root, even for bootstrap binaries.
892f9b
- Remove the rebuild conditional - the build system now figures it out.
892f9b
- Let minidebuginfo do its thing, since metadata is no longer a note.
892f9b
- Let rust build its own compiler-rt builtins again.
892f9b
892f9b
* Sat Sep 03 2016 Josh Stone <jistone@redhat.com> - 1.11.0-3
892f9b
- Rebuild without bootstrap binaries.
892f9b
892f9b
* Fri Sep 02 2016 Josh Stone <jistone@redhat.com> - 1.11.0-2
892f9b
- Bootstrap armv7hl, with backported no-neon patch.
892f9b
892f9b
* Wed Aug 24 2016 Josh Stone <jistone@redhat.com> - 1.11.0-1
892f9b
- Update to 1.11.0.
892f9b
- Drop the backported patches.
892f9b
- Patch get-stage0.py to trust existing bootstrap binaries.
892f9b
- Use libclang_rt.builtins from compiler-rt, dodging llvm-static issues.
892f9b
- Use --local-rust-root to make sure the right bootstrap is used.
892f9b
892f9b
* Sat Aug 13 2016 Josh Stone <jistone@redhat.com> 1.10.0-4
892f9b
- Rebuild without bootstrap binaries.
892f9b
892f9b
* Fri Aug 12 2016 Josh Stone <jistone@redhat.com> - 1.10.0-3
892f9b
- Initial import into Fedora (#1356907), bootstrapped
892f9b
- Format license text as suggested in review.
892f9b
- Note how the tests already run in parallel.
892f9b
- Undefine _include_minidebuginfo, because it duplicates ".note.rustc".
892f9b
- Don't let checks fail the whole build.
892f9b
- Note that -doc can't be noarch, as rpmdiff doesn't allow variations.
892f9b
892f9b
* Tue Jul 26 2016 Josh Stone <jistone@redhat.com> - 1.10.0-2
892f9b
- Update -doc directory ownership, and mark its licenses.
892f9b
- Package and declare licenses for libbacktrace and hoedown.
892f9b
- Set bootstrap_base as a global.
892f9b
- Explicitly require python2.
892f9b
892f9b
* Thu Jul 14 2016 Josh Stone <jistone@fedoraproject.org> - 1.10.0-1
892f9b
- Initial package, bootstrapped