Accepting request 686253 from home:luke_nukem:branches:devel:languages:rust
- Remove miri complete instead of excluding. This is experimental and so should not be included. - BuildRequires ccache in attempt to reduce compile times. - Remove more extraneous directories from src that will never be used. - Extra patterns in rpmlintrc to catch more false positives: + Rust has no stable API, ignore SONAME warnings + Tool versions don't update in step with rust, ignore warnings OBS-URL: https://build.opensuse.org/request/show/686253 OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=202
This commit is contained in:
parent
3dbbcc65f4
commit
a96ee8dda3
@ -6,3 +6,11 @@ addFilter("devel-file-in-non-devel-package.*/usr/lib/rustlib/src/.*")
|
|||||||
addFilter("binaryinfo-readelf-failed*./usr/lib/rustlib/*.rlib")
|
addFilter("binaryinfo-readelf-failed*./usr/lib/rustlib/*.rlib")
|
||||||
# rust has no stable ABI as of yet, soname is of no use yet
|
# rust has no stable ABI as of yet, soname is of no use yet
|
||||||
addFilter("no-soname.*/usr/lib/rustlib/.*")
|
addFilter("no-soname.*/usr/lib/rustlib/.*")
|
||||||
|
addFilter("no-soname.*/usr/lib/lib*")
|
||||||
|
# tool versions don't always change at same pace as rustc
|
||||||
|
addFilter("clippy.x86_64: W: no-version-in-last-changelog")
|
||||||
|
addFilter("rls.x86_64: W: no-version-in-last-changelog")
|
||||||
|
addFilter("rust-analysis.x86_64: W: no-version-in-last-changelog")
|
||||||
|
addFilter("rustfmt.x86_64: W: no-version-in-last-changelog")
|
||||||
|
# error when building with bootstrap. ignore for now
|
||||||
|
addFilter(".*shlib-policy-name-error.*libLLVM-8svn.*")
|
14
rust.changes
14
rust.changes
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Mar 16 01:19:22 UTC 2019 - Luke Jones <jones_ld@protonmail.com>
|
||||||
|
|
||||||
|
- Remove miri complete instead of excluding. This is experimental
|
||||||
|
and so should not be included.
|
||||||
|
- BuildRequires ccache in attempt to reduce compile times.
|
||||||
|
- Remove more extraneous directories from src that will never be
|
||||||
|
used.
|
||||||
|
- Extra patterns in rpmlintrc to catch more false positives:
|
||||||
|
+ Rust has no stable API, ignore SONAME warnings
|
||||||
|
+ Tool versions don't update in step with rust, ignore warnings
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Mar 6 09:07:43 UTC 2019 - Luke Jones <jones_ld@protonmail.com>
|
Wed Mar 6 09:07:43 UTC 2019 - Luke Jones <jones_ld@protonmail.com>
|
||||||
|
|
||||||
@ -20,7 +32,7 @@ Sat Mar 2 05:17:36 UTC 2019 - Luke Jones <jones_ld@protonmail.com>
|
|||||||
`#[cfg(target_vendor="linux")] fn main() { println!("Hello Linux!"); }`
|
`#[cfg(target_vendor="linux")] fn main() { println!("Hello Linux!"); }`
|
||||||
- Integer patterns such as in a match expression can now be exhaustive.
|
- Integer patterns such as in a match expression can now be exhaustive.
|
||||||
E.g. You can have match statement on a `u8` that covers `0..=255` and
|
E.g. You can have match statement on a `u8` that covers `0..=255` and
|
||||||
you would no longer be required to have a `_ => unreachable!()` case.
|
you would no longer be required to have a `_ => unreachable!()` case.
|
||||||
- You can now have multiple patterns in `if let` and `while let`
|
- You can now have multiple patterns in `if let` and `while let`
|
||||||
expressions. You can do this with the same syntax as a `match`
|
expressions. You can do this with the same syntax as a `match`
|
||||||
expression. E.g.
|
expression. E.g.
|
||||||
|
36
rust.spec
36
rust.spec
@ -13,7 +13,7 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@ -101,6 +101,7 @@ Source107: %{dl_url}/rust-%{version_bootstrap}-s390x-unknown-linux-gnu.tar.
|
|||||||
Patch0: ignore-Wstring-conversion.patch
|
Patch0: ignore-Wstring-conversion.patch
|
||||||
# PATCH-FIX-OPENSUSE: replace depreciated trim_left_matches with trim_start_matches
|
# PATCH-FIX-OPENSUSE: replace depreciated trim_left_matches with trim_start_matches
|
||||||
Patch1: depreciated-trim_left_matches.patch
|
Patch1: depreciated-trim_left_matches.patch
|
||||||
|
BuildRequires: ccache
|
||||||
# Leap 42 to 42.3, SLE12 SP1, SP2
|
# Leap 42 to 42.3, SLE12 SP1, SP2
|
||||||
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120200
|
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120200
|
||||||
# In these distros cmake is 2.x, so we need cmake3 for building llvm.
|
# In these distros cmake is 2.x, so we need cmake3 for building llvm.
|
||||||
@ -141,7 +142,7 @@ ExclusiveArch: i686
|
|||||||
%endif
|
%endif
|
||||||
# Real LLVM minimum version should be 7.x, but rust has a fallback mode
|
# Real LLVM minimum version should be 7.x, but rust has a fallback mode
|
||||||
%if !%with bundled_llvm
|
%if !%with bundled_llvm
|
||||||
BuildRequires: llvm-devel >= 7.0
|
BuildRequires: llvm-devel >= 6.0
|
||||||
%endif
|
%endif
|
||||||
%if !%with rust_bootstrap
|
%if !%with rust_bootstrap
|
||||||
# We will now package cargo using the version number of rustc since
|
# We will now package cargo using the version number of rustc since
|
||||||
@ -204,7 +205,6 @@ Supplements: packageand(%{name}:gdb)
|
|||||||
# Standard form
|
# Standard form
|
||||||
Supplements: (%{name} and gdb)
|
Supplements: (%{name} and gdb)
|
||||||
%endif
|
%endif
|
||||||
Provides: rust-gdb = %{version}
|
|
||||||
|
|
||||||
%description -n rust-gdb
|
%description -n rust-gdb
|
||||||
This subpackage provides pretty printers and a wrapper script for
|
This subpackage provides pretty printers and a wrapper script for
|
||||||
@ -293,8 +293,6 @@ Provides: rustc:%{_bindir}/cargo = %{version}
|
|||||||
Cargo downloads dependencies of Rust projects and compiles it.
|
Cargo downloads dependencies of Rust projects and compiles it.
|
||||||
|
|
||||||
%package -n cargo-doc
|
%package -n cargo-doc
|
||||||
Version: %{version}
|
|
||||||
Release: 0
|
|
||||||
Summary: Documentation for Cargo
|
Summary: Documentation for Cargo
|
||||||
# Cargo no longer builds its own documentation
|
# Cargo no longer builds its own documentation
|
||||||
# https://github.com/rust-lang/cargo/pull/4904
|
# https://github.com/rust-lang/cargo/pull/4904
|
||||||
@ -356,6 +354,12 @@ rm -rf src/llvm-emscripten/
|
|||||||
rm -rf src/tools/clang
|
rm -rf src/tools/clang
|
||||||
rm -rf src/tools/lld
|
rm -rf src/tools/lld
|
||||||
rm -rf src/tools/lldb
|
rm -rf src/tools/lldb
|
||||||
|
# CI tooling won't be used
|
||||||
|
rm -rf src/stdsimd/ci
|
||||||
|
|
||||||
|
# Remove hidden files from source
|
||||||
|
find src/ -type f -name '.appveyor.yml -exec rm -v '{}' '+'
|
||||||
|
find src/ -type f -name '.travis.yml -exec rm -v '{}' '+'
|
||||||
|
|
||||||
%if !%with bundled_llvm
|
%if !%with bundled_llvm
|
||||||
rm -rf src/llvm/
|
rm -rf src/llvm/
|
||||||
@ -369,9 +373,8 @@ find vendor -name .cargo-checksum.json \
|
|||||||
|
|
||||||
# Fix rpmlint error "This script uses 'env' as an interpreter"
|
# Fix rpmlint error "This script uses 'env' as an interpreter"
|
||||||
sed -i '1s|#!%{_bindir}/env python|#!%{_bindir}/python3|' src/libcore/unicode/unicode.py
|
sed -i '1s|#!%{_bindir}/env python|#!%{_bindir}/python3|' src/libcore/unicode/unicode.py
|
||||||
|
sed -i '1s|#!%{_bindir}/env python|#!%{_bindir}/python3|' src/libcore/unicode/printable.py
|
||||||
# Fix rpmlint warnings about these shell scripts not having a shebang or incorrect path
|
chmod +x src/libcore/unicode/printable.py
|
||||||
sed -i '1s|^|#!/bin/bash\n|' src/stdsimd/ci/run-docker.sh
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%configure \
|
||||||
@ -381,9 +384,11 @@ sed -i '1s|^|#!/bin/bash\n|' src/stdsimd/ci/run-docker.sh
|
|||||||
--local-rust-root=%{rust_root} \
|
--local-rust-root=%{rust_root} \
|
||||||
--libdir=%{common_libdir} \
|
--libdir=%{common_libdir} \
|
||||||
--docdir=%{_docdir}/%{name} \
|
--docdir=%{_docdir}/%{name} \
|
||||||
%{!?with_bundled_llvm: --llvm-root=%{_prefix} --enable-llvm-link-shared --set llvm.link-jobs=1} \
|
%{!?with_bundled_llvm: --llvm-root=%{_prefix} --enable-llvm-link-shared} \
|
||||||
|
%{?with_bundled_llvm: --disable-llvm-link-shared --set llvm.link-jobs=4} \
|
||||||
--disable-codegen-tests \
|
--disable-codegen-tests \
|
||||||
--enable-optimize \
|
--enable-optimize \
|
||||||
|
--enable-ccache \
|
||||||
--enable-docs \
|
--enable-docs \
|
||||||
--enable-verbose-tests \
|
--enable-verbose-tests \
|
||||||
--disable-jemalloc \
|
--disable-jemalloc \
|
||||||
@ -459,16 +464,13 @@ rm %{buildroot}%{_docdir}/%{name}/*.old
|
|||||||
# Remove installer artifacts (manifests, uninstall scripts, etc.)
|
# Remove installer artifacts (manifests, uninstall scripts, etc.)
|
||||||
find %{buildroot}%{rustlibdir} -maxdepth 1 -type f -exec rm -v '{}' '+'
|
find %{buildroot}%{rustlibdir} -maxdepth 1 -type f -exec rm -v '{}' '+'
|
||||||
|
|
||||||
# Remove hidden files from source
|
|
||||||
find %{buildroot}%{rustlibdir} -type f -name '.appveyor.yml -exec rm -v '{}' '+'
|
|
||||||
find %{buildroot}%{rustlibdir} -type f -name '.travis.yml -exec rm -v '{}' '+'
|
|
||||||
|
|
||||||
# The shared libraries should be executable for debuginfo extraction.
|
# The shared libraries should be executable for debuginfo extraction.
|
||||||
find %{buildroot}%{rustlibdir} -maxdepth 1 -type f -name '*.so' -exec chmod -v +x '{}' '+'
|
find %{buildroot}%{rustlibdir} -maxdepth 1 -type f -name '*.so' -exec chmod -v +x '{}' '+'
|
||||||
|
|
||||||
# The html docs for x86 and x86_64 are the same in most places
|
# The html docs for x86 and x86_64 are the same in most places
|
||||||
%fdupes %{buildroot}%{_docdir}/%{name}/html
|
%fdupes -s %{buildroot}%{_docdir}/%{name}/html
|
||||||
# We don't want to run fdupes over much else (like src) or it may cause weirdness.
|
%fdupes -s %{buildroot}/%{_mandir}
|
||||||
|
%fdupes %{buildroot}/%{_prefix}
|
||||||
|
|
||||||
# Create the path for crate-devel packages
|
# Create the path for crate-devel packages
|
||||||
mkdir -p %{buildroot}%{_datadir}/cargo/registry
|
mkdir -p %{buildroot}%{_datadir}/cargo/registry
|
||||||
@ -482,6 +484,9 @@ ln -sT ../rust/html/cargo/ %{buildroot}%{_docdir}/cargo/html
|
|||||||
install -D %{buildroot}%{_sysconfdir}/bash_completion.d/cargo %{buildroot}%{_datadir}/bash-completion/completions/cargo
|
install -D %{buildroot}%{_sysconfdir}/bash_completion.d/cargo %{buildroot}%{_datadir}/bash-completion/completions/cargo
|
||||||
# There should be nothing here at all
|
# There should be nothing here at all
|
||||||
rm -rf %{buildroot}%{_sysconfdir}
|
rm -rf %{buildroot}%{_sysconfdir}
|
||||||
|
# miri is experimental, we should not package it
|
||||||
|
rm -rf %{buildroot}%{_bindir}/miri
|
||||||
|
rm -rf %{buildroot}%{_bindir}/cargo-miri
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
@ -506,7 +511,6 @@ rm -rf %{buildroot}%{_sysconfdir}
|
|||||||
%{rustlibdir}/%{rust_triple}/codegen-backends/
|
%{rustlibdir}/%{rust_triple}/codegen-backends/
|
||||||
%exclude %{_docdir}/%{name}/html
|
%exclude %{_docdir}/%{name}/html
|
||||||
%exclude %{rustlibdir}/src
|
%exclude %{rustlibdir}/src
|
||||||
%exclude %{_bindir}/*miri
|
|
||||||
|
|
||||||
%files -n rust-std-static
|
%files -n rust-std-static
|
||||||
%dir %{rustlibdir}
|
%dir %{rustlibdir}
|
||||||
|
Loading…
Reference in New Issue
Block a user