Search
SailfishOS Open Build Service
>
Projects
>
home:tortoisedoc
:
branches:home:sfietkonstantin:sailfish:rust
>
rust-1.24.0
> rust.spec
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File rust.spec of Package rust-1.24.0
%global channel dev %ifarch %ix86 %global rust_triple i686-unknown-linux-gnu %else %global rust_triple armv7-unknown-linux-gnueabihf %endif Name: rust Version: 1.24.0 Release: 3 Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and ISC and MIT) # ^ written as: (rust itself) and (bundled libraries) URL: https://www.rust-lang.org ExclusiveArch: i486 armv7hl %global rustc_package rustc-%{version}-src Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz # Patch1: rust-1.22.0-45566-option-checking.patch Patch1: 0002_fix_beta_compiler.patch Patch2: 0003_remove_complex_fp_funcs.patch %global local_rust_root %{_prefix} BuildRequires: make BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: ncurses-devel BuildRequires: zlib-devel BuildRequires: python2 BuildRequires: curl %global llvm_root %{_prefix} BuildRequires: llvm-devel BuildRequires: llvm-static BuildRequires: libffi-devel BuildRequires: rust = 1.23.0 BuildRequires: rust-std-static = 1.23.0 BuildRequires: cargo023 # debuginfo-gdb tests need gdb BuildRequires: gdb # Always require our exact standard library #Requires: %{name}-std-static = %{version}-%{release} # The C compiler is needed at runtime just for linking. Someday rustc might # invoke the linker directly, and then we'll only need binutils. # https://github.com/rust-lang/rust/issues/11937 #Requires: gcc # ALL Rust libraries are private, because they don't keep an ABI. %global _privatelibs lib.*-[[:xdigit:]]*[.]so.* %global __provides_exclude ^(%{_privatelibs})$ %global __requires_exclude ^(%{_privatelibs})$ %global __provides_exclude_from ^%{_docdir}/.*$ %global __requires_exclude_from ^%{_docdir}/.*$ # While we don't want to encourage dynamic linking to Rust shared libraries, as # there's no stable ABI, we still need the unallocated metadata (.rustc) to # support custom-derive plugins like #[proc_macro_derive(Foo)]. But eu-strip is # very eager by default, so we have to limit it to -g, only debugging symbols. %global _find_debuginfo_opts -g %undefine _include_minidebuginfo # Use hardening ldflags. %global rustflags -Clink-arg=-Wl,-z,relro,-z,now %description Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety. This package includes the Rust compiler and documentation generator. %package std-static Summary: Standard library for Rust %description std-static This package includes the standard libraries for building applications written in Rust. %package debugger-common Summary: Common debugger pretty printers for Rust BuildArch: noarch %description debugger-common This package includes the common functionality for %{name}-gdb and %{name}-lldb. %package gdb Summary: GDB pretty printers for Rust BuildArch: noarch Requires: gdb Requires: %{name}-debugger-common = %{version}-%{release} %description gdb This package includes the rust-gdb script, which allows easier debugging of Rust programs. %package lldb Summary: LLDB pretty printers for Rust # It could be noarch, but lldb has limited availability #BuildArch: noarch Requires: lldb Requires: %{name}-debugger-common = %{version}-%{release} %description lldb This package includes the rust-lldb script, which allows easier debugging of Rust programs. # package doc #Summary: Documentation for Rust # NOT BuildArch: noarch # Note, while docs are mostly noarch, some things do vary by target_arch. # Koji will fail the build in rpmdiff if two architectures build a noarch # subpackage differently, so instead we have to keep its arch. # description doc #This package includes HTML documentation for the Rust programming language and # its standard library. %package src Summary: Sources for the Rust standard library BuildArch: noarch %description src This package includes source files for the Rust standard library. It may be useful as a reference for code completion tools in various editors. %prep %ifarch %{bootstrap_arches} %setup -q -n %{bootstrap_root} -T -b %{bootstrap_source} ./install.sh --components=cargo,rustc,rust-std-%{rust_triple} \ --prefix=%{local_rust_root} --disable-ldconfig test -f '%{local_rust_root}/bin/cargo' test -f '%{local_rust_root}/bin/rustc' %endif %setup -q -n %{rustc_package} cp ../../SOURCES/config.toml ./ # unbundle #rm -rf src/llvm/ # extract bundled licenses for packaging # cp src/rt/hoedown/LICENSE src/rt/hoedown/LICENSE-hoedown sed -e '/*\//q' src/libbacktrace/backtrace.h \ >src/libbacktrace/LICENSE-libbacktrace sed -i.ffi -e '$a #[link(name = "ffi")] extern {}' \ src/librustc_llvm/lib.rs %global _default_patch_fuzz 1 cat src/stage0.txt %patch1 -p1 %patch2 -p1 # The configure macro will modify some autoconf-related files, which upsets # cargo when it tries to verify checksums in those files. If we just truncate # that file list, cargo won't have anything to complain about. #find src/vendor -name .cargo-checksum.json \ # -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+' %build %{?cmake_path:export PATH=%{cmake_path}:$PATH} %{?library_path:export LIBRARY_PATH="%{library_path}"} %{?rustflags:export RUSTFLAGS="%{rustflags}"} # We're going to override --libdir when configuring to get rustlib into a # common path, but we'll fix the shared libraries during install. %global common_libdir %{_prefix}/lib %global rustlibdir %{common_libdir}/rustlib %ifarch %{arm} # full debuginfo is exhausting memory; just do libstd for now # https://github.com/rust-lang/rust/issues/45854 %define enable_debuginfo --enable-debuginfo --enable-debuginfo-only-std --disable-debuginfo-lines %else %define enable_debuginfo --enable-debuginfo --disable-debuginfo-only-std --disable-debuginfo-lines %endif # configure --disable-option-checking \ # --libdir=%{common_libdir} \ # --build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \ # --enable-local-rust --local-rust-root=%{local_rust_root} \ # %{!?with_bundled_llvm: --llvm-root=%{llvm_root} --disable-codegen-tests \ # %{!?with_llvm_static: --enable-llvm-link-shared } } \ # --disable-jemalloc \ # --disable-rpath \ # %{enable_debuginfo} \ # --enable-vendor \ # --release-channel=%{channel} ./x.py build -j 3 -vv #./x.py doc %install %{?cmake_path:export PATH=%{cmake_path}:$PATH} %{?library_path:export LIBRARY_PATH="%{library_path}"} %{?rustflags:export RUSTFLAGS="%{rustflags}"} DESTDIR=%{buildroot} ./x.py install DESTDIR=%{buildroot} ./x.py install src # Make sure the shared libraries are in the proper libdir %if "%{_libdir}" != "%{common_libdir}" mkdir -p %{buildroot}%{_libdir} find %{buildroot}%{common_libdir} -maxdepth 1 -type f -name '*.so' \ -exec mv -v -t %{buildroot}%{_libdir} '{}' '+' %endif # The shared libraries should be executable for debuginfo extraction. find %{buildroot}%{_libdir} -maxdepth 1 -type f -name '*.so' \ -exec chmod -v +x '{}' '+' # The libdir libraries are identical to those under rustlib/. It's easier on # library loading if we keep them in libdir, but we do need them in rustlib/ # to support dynamic linking for compiler plugins, so we'll symlink. (cd "%{buildroot}%{rustlibdir}/%{rust_triple}/lib" && find ../../../../%{_lib} -maxdepth 1 -name '*.so' \ -exec ln -v -f -s -t . '{}' '+') # Remove installer artifacts (manifests, uninstall scripts, etc.) find %{buildroot}%{rustlibdir} -maxdepth 1 -type f -exec rm -v '{}' '+' # FIXME: __os_install_post will strip the rlibs # -- should we find a way to preserve debuginfo? # Sanitize the HTML documentation # find %{buildroot}%{_docdir}/%{name}/html -empty -delete # find %{buildroot}%{_docdir}/%{name}/html -type f -exec chmod -x '{}' '+' %check %{?cmake_path:export PATH=%{cmake_path}:$PATH} %{?library_path:export LIBRARY_PATH="%{library_path}"} %{?rustflags:export RUSTFLAGS="%{rustflags}"} # The results are not stable on koji, so mask errors and just log it. # Do not run those tests on arm, they are too slow # TODO : Re-enable once ready #%ifarch %ix86 #./x.py test --no-fail-fast || : #%endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %{_docdir}/%{name}/COPYRIGHT %{_docdir}/%{name}/LICENSE-APACHE %{_docdir}/%{name}/LICENSE-MIT %{_docdir}/%{name}/README.md %{_bindir}/rustc %{_bindir}/rustdoc %{_libdir}/*.so %{_mandir}/man1/rustc.1* %{_mandir}/man1/rustdoc.1* %dir %{rustlibdir} %dir %{rustlibdir}/%{rust_triple} %dir %{rustlibdir}/%{rust_triple}/lib %{rustlibdir}/%{rust_triple}/lib/*.so %files std-static %dir %{rustlibdir} %dir %{rustlibdir}/%{rust_triple} %dir %{rustlibdir}/%{rust_triple}/lib %{rustlibdir}/%{rust_triple}/lib/*.rlib %files debugger-common %dir %{rustlibdir} %dir %{rustlibdir}/etc %{rustlibdir}/etc/debugger_*.py* %files gdb %{_bindir}/rust-gdb %{rustlibdir}/etc/gdb_*.py* %files lldb %{_bindir}/rust-lldb %{rustlibdir}/etc/lldb_*.py* # files doc # dir %{_docdir}/%{name} # dir %{_docdir}/%{name}/html # {_docdir}/%{name}/html/*/ # {_docdir}/%{name}/html/*.html # {_docdir}/%{name}/html/*.css # {_docdir}/%{name}/html/*.js # {_docdir}/%{name}/html/*.woff # {_docdir}/%{name}/html/*.txt %files src %dir %{rustlibdir} %{rustlibdir}/src %changelog * Wed Jan 3 2018 Lucien Xu <sfietkonstantin@free.fr> - 1.22.1-2 - Package for Sailfish OS * Thu Nov 23 2017 Josh Stone <jistone@redhat.com> - 1.22.1-1 - Update to 1.22.1. * Thu Oct 12 2017 Josh Stone <jistone@redhat.com> - 1.21.0-1 - Update to 1.21.0. * Mon Sep 11 2017 Josh Stone <jistone@redhat.com> - 1.20.0-2 - ABI fixes for ppc64 and s390x. * Thu Aug 31 2017 Josh Stone <jistone@redhat.com> - 1.20.0-1 - Update to 1.20.0. - Add a rust-src subpackage. * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Mon Jul 24 2017 Josh Stone <jistone@redhat.com> - 1.19.0-2 - Use find-debuginfo.sh --keep-section .rustc * Thu Jul 20 2017 Josh Stone <jistone@redhat.com> - 1.19.0-1 - Update to 1.19.0. * Thu Jun 08 2017 Josh Stone <jistone@redhat.com> - 1.18.0-1 - Update to 1.18.0. * Mon May 08 2017 Josh Stone <jistone@redhat.com> - 1.17.0-2 - Move shared libraries back to libdir and symlink in rustlib * Thu Apr 27 2017 Josh Stone <jistone@redhat.com> - 1.17.0-1 - Update to 1.17.0. * Mon Mar 20 2017 Josh Stone <jistone@redhat.com> - 1.16.0-3 - Make rust-lldb arch-specific to deal with lldb deps * Fri Mar 17 2017 Josh Stone <jistone@redhat.com> - 1.16.0-2 - Limit rust-lldb arches * Thu Mar 16 2017 Josh Stone <jistone@redhat.com> - 1.16.0-1 - Update to 1.16.0. - Use rustbuild instead of the old makefiles. - Update bootstrapping to include rust-std and cargo. - Add a rust-lldb subpackage. * Thu Feb 09 2017 Josh Stone <jistone@redhat.com> - 1.15.1-1 - Update to 1.15.1. - Require rust-rpm-macros for new crate packaging. - Keep shared libraries under rustlib/, only debug-stripped. - Merge and clean up conditionals for epel7. * Fri Dec 23 2016 Josh Stone <jistone@redhat.com> - 1.14.0-2 - Rebuild without bootstrap binaries. * Thu Dec 22 2016 Josh Stone <jistone@redhat.com> - 1.14.0-1 - Update to 1.14.0. - Rewrite bootstrap logic to target specific arches. - Bootstrap ppc64, ppc64le, s390x. (thanks to Sinny Kumari for testing!) * Thu Nov 10 2016 Josh Stone <jistone@redhat.com> - 1.13.0-1 - Update to 1.13.0. - Use hardening flags for linking. - Split the standard library into its own package - Centralize rustlib/ under /usr/lib/ for multilib integration. * Thu Oct 20 2016 Josh Stone <jistone@redhat.com> - 1.12.1-1 - Update to 1.12.1. * Fri Oct 14 2016 Josh Stone <jistone@redhat.com> - 1.12.0-7 - Rebuild with LLVM 3.9. - Add ncurses-devel for llvm-config's -ltinfo. * Thu Oct 13 2016 Josh Stone <jistone@redhat.com> - 1.12.0-6 - Rebuild with llvm-static, preparing for 3.9 * Fri Oct 07 2016 Josh Stone <jistone@redhat.com> - 1.12.0-5 - Rebuild with fixed eu-strip (rhbz1380961) * Fri Oct 07 2016 Josh Stone <jistone@redhat.com> - 1.12.0-4 - Rebuild without bootstrap binaries. * Thu Oct 06 2016 Josh Stone <jistone@redhat.com> - 1.12.0-3 - Bootstrap aarch64. - Use jemalloc's MALLOC_CONF to work around #36944. - Apply pr36933 to really disable armv7hl NEON. * Sat Oct 01 2016 Josh Stone <jistone@redhat.com> - 1.12.0-2 - Protect .rustc from rpm stripping. * Fri Sep 30 2016 Josh Stone <jistone@redhat.com> - 1.12.0-1 - Update to 1.12.0. - Always use --local-rust-root, even for bootstrap binaries. - Remove the rebuild conditional - the build system now figures it out. - Let minidebuginfo do its thing, since metadata is no longer a note. - Let rust build its own compiler-rt builtins again. * Sat Sep 03 2016 Josh Stone <jistone@redhat.com> - 1.11.0-3 - Rebuild without bootstrap binaries. * Fri Sep 02 2016 Josh Stone <jistone@redhat.com> - 1.11.0-2 - Bootstrap armv7hl, with backported no-neon patch. * Wed Aug 24 2016 Josh Stone <jistone@redhat.com> - 1.11.0-1 - Update to 1.11.0. - Drop the backported patches. - Patch get-stage0.py to trust existing bootstrap binaries. - Use libclang_rt.builtins from compiler-rt, dodging llvm-static issues. - Use --local-rust-root to make sure the right bootstrap is used. * Sat Aug 13 2016 Josh Stone <jistone@redhat.com> 1.10.0-4 - Rebuild without bootstrap binaries. * Fri Aug 12 2016 Josh Stone <jistone@redhat.com> - 1.10.0-3 - Initial import into Fedora (#1356907), bootstrapped - Format license text as suggested in review. - Note how the tests already run in parallel. - Undefine _include_minidebuginfo, because it duplicates ".note.rustc". - Don't let checks fail the whole build. - Note that -doc can't be noarch, as rpmdiff doesn't allow variations. * Tue Jul 26 2016 Josh Stone <jistone@redhat.com> - 1.10.0-2 - Update -doc directory ownership, and mark its licenses. - Package and declare licenses for libbacktrace and hoedown. - Set bootstrap_base as a global. - Explicitly require python2. * Thu Jul 14 2016 Josh Stone <jistone@fedoraproject.org> - 1.10.0-1 - Initial package, bootstrapped