public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Fabio Valentini <decathorpe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rustup] epel10: Initial import (#2251579)
Date: Wed, 18 Nov 2026 21:43:51 GMT	[thread overview]
Message-ID: <179503823194.1.6594755496322139014.rpms-rustup-fa7bcfa4e327@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rustup
Branch : epel10
Commit : fa7bcfa4e327caea228f975b22bdd71748733156
Author : Fabio Valentini <decathorpe@gmail.com>
Date   : 2023-11-30T21:33:02+01:00
Stats  : +497/-3 in 9 file(s)
URL    : https://src.fedoraproject.org/rpms/rustup/c/fa7bcfa4e327caea228f975b22bdd71748733156?branch=epel10

Log:
Initial import (#2251579)

---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f13364b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/rustup-1.26.0.tar.gz

diff --git a/0001-Drop-Windows-specific-dependencies.patch b/0001-Drop-Windows-specific-dependencies.patch
new file mode 100644
index 0000000..400b24c
--- /dev/null
+++ b/0001-Drop-Windows-specific-dependencies.patch
@@ -0,0 +1,53 @@
+From 50e9805a689adc522b92412525c3676de1b4af49 Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe@gmail.com>
+Date: Wed, 8 Nov 2023 17:47:31 +0100
+Subject: [PATCH 1/5] Drop Windows-specific dependencies
+
+---
+ Cargo.toml | 30 ------------------------------
+ 1 file changed, 30 deletions(-)
+
+diff --git a/Cargo.toml b/Cargo.toml
+index 406cb37..23eb61a 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -85,36 +85,6 @@ version = "1.3.1"
+ features = ["rs_tracing"]
+ version = "1.1.0"
+ 
+-[target."cfg(windows)".dependencies]
+-cc = "1"
+-winreg = "0.11"
+-
+-[target."cfg(windows)".dependencies.winapi]
+-features = [
+-    "combaseapi",
+-    "errhandlingapi",
+-    "fileapi",
+-    "handleapi",
+-    "ioapiset",
+-    "jobapi",
+-    "jobapi2",
+-    "minwindef",
+-    "processthreadsapi",
+-    "psapi",
+-    "shlobj",
+-    "shtypes",
+-    "synchapi",
+-    "sysinfoapi",
+-    "tlhelp32",
+-    "userenv",
+-    "winbase",
+-    "winerror",
+-    "winioctl",
+-    "winnt",
+-    "winuser",
+-]
+-version = "0.3"
+-
+ [dev-dependencies]
+ enum-map = "2.4.2"
+ once_cell = "1.17.1"
+-- 
+2.43.0
+

diff --git a/0002-Drop-feature-for-statically-linking-against-vendored.patch b/0002-Drop-feature-for-statically-linking-against-vendored.patch
new file mode 100644
index 0000000..fbffe08
--- /dev/null
+++ b/0002-Drop-feature-for-statically-linking-against-vendored.patch
@@ -0,0 +1,25 @@
+From 6e62451af518059056dd2e9352081670b0e8fc30 Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe@gmail.com>
+Date: Wed, 8 Nov 2023 17:53:44 +0100
+Subject: [PATCH 2/5] Drop feature for statically linking against vendored
+ OpenSSL
+
+---
+ Cargo.toml | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Cargo.toml b/Cargo.toml
+index 23eb61a..3e878ac 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -24,7 +24,6 @@ default = [
+ ]
+ 
+ reqwest-backend = ["download/reqwest-backend"]
+-vendored-openssl = ['openssl/vendored']
+ 
+ reqwest-default-tls = ["download/reqwest-default-tls"]
+ reqwest-rustls-tls = ["download/reqwest-rustls-tls"]
+-- 
+2.43.0
+

diff --git a/0003-Bump-term-dependency-from-0.5.1-to-0.7.patch b/0003-Bump-term-dependency-from-0.5.1-to-0.7.patch
new file mode 100644
index 0000000..6b97a7c
--- /dev/null
+++ b/0003-Bump-term-dependency-from-0.5.1-to-0.7.patch
@@ -0,0 +1,26 @@
+From 10e8f24e297d66db1c6cce1be94b4a8850f64f73 Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe@gmail.com>
+Date: Wed, 8 Nov 2023 17:55:55 +0100
+Subject: [PATCH 3/5] Bump term dependency from =0.5.1 to 0.7
+
+---
+ Cargo.toml | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Cargo.toml b/Cargo.toml
+index 3e878ac..3aec3b1 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -65,8 +65,7 @@ sharded-slab = "0.1.1"
+ strsim = "0.10"
+ tar = "0.4.26"
+ tempfile.workspace = true
+-# FIXME(issue #1818, #1826, and friends)
+-term = "=0.5.1"
++term = "0.7"
+ thiserror.workspace = true
+ threadpool = "1"
+ toml = "0.5"
+-- 
+2.43.0
+

diff --git a/0004-Remove-unused-tracing-support.patch b/0004-Remove-unused-tracing-support.patch
new file mode 100644
index 0000000..d7da35b
--- /dev/null
+++ b/0004-Remove-unused-tracing-support.patch
@@ -0,0 +1,154 @@
+From cdc1e26072bf1183a9fd784d33553fe6167e7969 Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe@gmail.com>
+Date: Wed, 8 Nov 2023 17:56:26 +0100
+Subject: [PATCH 4/5] Remove unused tracing support
+
+---
+ Cargo.toml              | 4 ----
+ src/bin/rustup-init.rs  | 7 -------
+ src/diskio/immediate.rs | 3 ---
+ src/diskio/mod.rs       | 8 --------
+ src/lib.rs              | 3 ---
+ 5 files changed, 25 deletions(-)
+
+diff --git a/Cargo.toml b/Cargo.toml
+index 3aec3b1..aae3d01 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -79,10 +79,6 @@ default-features = false
+ features = ["random"]
+ version = "1.3.1"
+ 
+-[dependencies.rs_tracing]
+-features = ["rs_tracing"]
+-version = "1.1.0"
+-
+ [dev-dependencies]
+ enum-map = "2.4.2"
+ once_cell = "1.17.1"
+diff --git a/src/bin/rustup-init.rs b/src/bin/rustup-init.rs
+index 35ed986..22d29b6 100644
+--- a/src/bin/rustup-init.rs
++++ b/src/bin/rustup-init.rs
+@@ -15,7 +15,6 @@
+ 
+ use anyhow::{anyhow, Result};
+ use cfg_if::cfg_if;
+-use rs_tracing::*;
+ 
+ use rustup::cli::common;
+ use rustup::cli::proxy_mode;
+@@ -40,13 +39,7 @@ fn main() {
+ }
+ 
+ fn run_rustup() -> Result<utils::ExitCode> {
+-    if let Ok(dir) = process().var("RUSTUP_TRACE_DIR") {
+-        open_trace_file!(dir)?;
+-    }
+     let result = run_rustup_inner();
+-    if process().var("RUSTUP_TRACE_DIR").is_ok() {
+-        close_trace_file!();
+-    }
+     result
+ }
+ 
+diff --git a/src/diskio/immediate.rs b/src/diskio/immediate.rs
+index 2bc2a5d..5818b58 100644
+--- a/src/diskio/immediate.rs
++++ b/src/diskio/immediate.rs
+@@ -167,7 +167,6 @@ impl IncrementalFileWriter {
+         let path = path.as_ref();
+         let path_display = format!("{}", path.display());
+         let file = Some({
+-            trace_scoped!("creat", "name": path_display);
+             opts.write(true).create(true).truncate(true).open(path)?
+         });
+         Ok(IncrementalFileWriter {
+@@ -207,11 +206,9 @@ impl IncrementalFileWriter {
+             if let Some(ref mut file) = self.file.as_mut() {
+                 // Length 0 vector is used for clean EOF signalling.
+                 if chunk.is_empty() {
+-                    trace_scoped!("close", "name:": self.path_display);
+                     drop(std::mem::take(&mut self.file));
+                     state.finished = true;
+                 } else {
+-                    trace_scoped!("write_segment", "name": self.path_display, "len": chunk.len());
+                     file.write_all(&chunk)?;
+ 
+                     state.completed_chunks.push(chunk.len());
+diff --git a/src/diskio/mod.rs b/src/diskio/mod.rs
+index a5e597c..488be46 100644
+--- a/src/diskio/mod.rs
++++ b/src/diskio/mod.rs
+@@ -373,17 +373,14 @@ pub(crate) fn write_file<P: AsRef<Path>, C: AsRef<[u8]>>(
+     let path = path.as_ref();
+     let path_display = format!("{}", path.display());
+     let mut f = {
+-        trace_scoped!("creat", "name": path_display);
+         opts.write(true).create(true).truncate(true).open(path)?
+     };
+     let contents = contents.as_ref();
+     let len = contents.len();
+     {
+-        trace_scoped!("write", "name": path_display, "len": len);
+         f.write_all(contents)?;
+     }
+     {
+-        trace_scoped!("close", "name:": path_display);
+         drop(f);
+     }
+     Ok(())
+@@ -405,7 +402,6 @@ pub(crate) fn write_file_incremental<P: AsRef<Path>, F: Fn(usize)>(
+     let path = path.as_ref();
+     let path_display = format!("{}", path.display());
+     let mut f = {
+-        trace_scoped!("creat", "name": path_display);
+         opts.write(true).create(true).truncate(true).open(path)?
+     };
+     if let IncrementalFile::ThreadedReceiver(recv) = content_callback {
+@@ -416,12 +412,10 @@ pub(crate) fn write_file_incremental<P: AsRef<Path>, F: Fn(usize)>(
+             let len = contents.len();
+             // Length 0 vector is used for clean EOF signalling.
+             if len == 0 {
+-                trace_scoped!("EOF_chunk", "name": path_display, "len": len);
+                 drop(contents);
+                 chunk_complete_callback(len);
+                 break;
+             } else {
+-                trace_scoped!("write_segment", "name": path_display, "len": len);
+                 f.write_all(&contents)?;
+                 drop(contents);
+                 chunk_complete_callback(len);
+@@ -431,7 +425,6 @@ pub(crate) fn write_file_incremental<P: AsRef<Path>, F: Fn(usize)>(
+         unreachable!();
+     }
+     {
+-        trace_scoped!("close", "name:": path_display);
+         drop(f);
+     }
+     Ok(())
+@@ -440,7 +433,6 @@ pub(crate) fn write_file_incremental<P: AsRef<Path>, F: Fn(usize)>(
+ pub(crate) fn create_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
+     let path = path.as_ref();
+     let path_display = format!("{}", path.display());
+-    trace_scoped!("create_dir", "name": path_display);
+     std::fs::create_dir(path)
+ }
+ 
+diff --git a/src/lib.rs b/src/lib.rs
+index b4e88fa..c34c6d1 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -15,9 +15,6 @@ use crate::toolchain::*;
+ pub(crate) use crate::utils::toml_utils;
+ use anyhow::{anyhow, Result};
+ 
+-#[macro_use]
+-extern crate rs_tracing;
+-
+ // A list of all binaries which Rustup will proxy.
+ pub static TOOLS: &[&str] = &[
+     "rustc",
+-- 
+2.43.0
+

diff --git a/0005-Remove-unused-git-based-versioning.patch b/0005-Remove-unused-git-based-versioning.patch
new file mode 100644
index 0000000..9808bea
--- /dev/null
+++ b/0005-Remove-unused-git-based-versioning.patch
@@ -0,0 +1,136 @@
+From 7e7ffd44e6284de55df4e5eb050635ab5bce6ad2 Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe@gmail.com>
+Date: Wed, 8 Nov 2023 18:08:54 +0100
+Subject: [PATCH 5/5] Remove unused git-based versioning
+
+---
+ Cargo.toml             |  1 -
+ src/cli/common.rs      | 61 +-----------------------------------------
+ src/cli/rustup_mode.rs |  1 -
+ src/cli/setup_mode.rs  |  6 -----
+ 4 files changed, 1 insertion(+), 68 deletions(-)
+
+diff --git a/Cargo.toml b/Cargo.toml
+index aae3d01..f33f4a9 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -42,7 +42,6 @@ download = { path = "download", default-features = false }
+ effective-limits = "0.5.5"
+ enum-map = "2.4.2"
+ flate2 = "1"
+-git-testament = "0.2"
+ home = "0.5.4"
+ lazy_static.workspace = true
+ libc = "0.2"
+diff --git a/src/cli/common.rs b/src/cli/common.rs
+index 9a6a68d..3bb0a2c 100644
+--- a/src/cli/common.rs
++++ b/src/cli/common.rs
+@@ -7,8 +7,6 @@ use std::sync::Arc;
+ use std::{cmp, env};
+ 
+ use anyhow::{anyhow, Context, Result};
+-use git_testament::{git_testament, render_testament};
+-use lazy_static::lazy_static;
+ use term2::Terminal;
+ 
+ use super::self_update;
+@@ -513,65 +511,8 @@ pub(crate) fn list_overrides(cfg: &Cfg) -> Result<utils::ExitCode> {
+     Ok(utils::ExitCode(0))
+ }
+ 
+-git_testament!(TESTAMENT);
+-
+ pub(crate) fn version() -> &'static str {
+-    lazy_static! {
+-        // Because we trust our `stable` branch given the careful release
+-        // process, we mark it trusted here so that our version numbers look
+-        // right when built from CI before the tag is pushed
+-        static ref RENDERED: String = render_testament!(TESTAMENT, "stable");
+-    }
+-    &RENDERED
+-}
+-
+-pub(crate) fn dump_testament() -> Result<utils::ExitCode> {
+-    use git_testament::GitModification::*;
+-    writeln!(
+-        process().stdout(),
+-        "Rustup version renders as: {}",
+-        version()
+-    )?;
+-    writeln!(
+-        process().stdout(),
+-        "Current crate version: {}",
+-        env!("CARGO_PKG_VERSION")
+-    )?;
+-    if TESTAMENT.branch_name.is_some() {
+-        writeln!(
+-            process().stdout(),
+-            "Built from branch: {}",
+-            TESTAMENT.branch_name.unwrap()
+-        )?;
+-    } else {
+-        writeln!(process().stdout(), "Branch information missing")?;
+-    }
+-    writeln!(process().stdout(), "Commit info: {}", TESTAMENT.commit)?;
+-    if TESTAMENT.modifications.is_empty() {
+-        writeln!(process().stdout(), "Working tree is clean")?;
+-    } else {
+-        for fmod in TESTAMENT.modifications {
+-            match fmod {
+-                Added(f) => writeln!(process().stdout(), "Added: {}", String::from_utf8_lossy(f))?,
+-                Removed(f) => writeln!(
+-                    process().stdout(),
+-                    "Removed: {}",
+-                    String::from_utf8_lossy(f)
+-                )?,
+-                Modified(f) => writeln!(
+-                    process().stdout(),
+-                    "Modified: {}",
+-                    String::from_utf8_lossy(f)
+-                )?,
+-                Untracked(f) => writeln!(
+-                    process().stdout(),
+-                    "Untracked: {}",
+-                    String::from_utf8_lossy(f)
+-                )?,
+-            }
+-        }
+-    }
+-    Ok(utils::ExitCode(0))
++    "1.26.0"
+ }
+ 
+ fn show_backtrace() -> bool {
+diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs
+index 09d1379..06a0af7 100644
+--- a/src/cli/rustup_mode.rs
++++ b/src/cli/rustup_mode.rs
+@@ -137,7 +137,6 @@ pub fn main() -> Result<utils::ExitCode> {
+ 
+     Ok(match matches.subcommand() {
+         Some(s) => match s {
+-            ("dump-testament", _) => common::dump_testament()?,
+             ("show", c) => match c.subcommand() {
+                 Some(s) => match s {
+                     ("active-toolchain", m) => handle_epipe(show_active_toolchain(cfg, m))?,
+diff --git a/src/cli/setup_mode.rs b/src/cli/setup_mode.rs
+index 6dd04ec..eaa814b 100644
+--- a/src/cli/setup_mode.rs
++++ b/src/cli/setup_mode.rs
+@@ -16,12 +16,6 @@ pub fn main() -> Result<utils::ExitCode> {
+         return self_update::self_replace();
+     }
+ 
+-    // Internal testament dump used during CI.  Not for users.
+-    if arg1 == Some("--dump-testament") {
+-        common::dump_testament()?;
+-        return Ok(utils::ExitCode(0));
+-    }
+-
+     // NOTICE: If you change anything here, please make the same changes in rustup-init.sh
+     let cli = Command::new("rustup-init")
+         .version(common::version())
+-- 
+2.43.0
+

diff --git a/README.md b/README.md
deleted file mode 100644
index d2418c5..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# rustup
-
-The rustup package

diff --git a/rustup.spec b/rustup.spec
new file mode 100644
index 0000000..3b875d5
--- /dev/null
+++ b/rustup.spec
@@ -0,0 +1,101 @@
+# Generated by rust2rpm 25
+%bcond_without check
+
+Name:           rustup
+Version:        1.26.0
+Release:        %autorelease
+Summary:        Manage multiple rust installations with ease
+
+SourceLicense:  MIT OR Apache-2.0
+# (Apache-2.0 OR MIT) AND BSD-3-Clause
+# (MIT OR Apache-2.0) AND Unicode-DFS-2016
+# 0BSD OR MIT OR Apache-2.0
+# Apache-2.0
+# Apache-2.0 OR BSL-1.0
+# Apache-2.0 OR ISC OR MIT
+# Apache-2.0 OR MIT
+# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
+# ISC
+# ISC AND MIT AND OpenSSL
+# MIT
+# MIT OR Apache-2.0
+# MIT OR Apache-2.0 OR Zlib
+# MIT OR Zlib OR Apache-2.0
+# Unlicense OR MIT
+# Zlib OR Apache-2.0 OR MIT
+License:        Apache-2.0 AND BSD-3-Clause AND ISC AND MIT AND OpenSSL AND Unicode-DFS-2016 AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
+# LICENSE.dependencies contains a full license breakdown
+
+URL:            https://github.com/rust-lang/rustup
+Source:         %{url}/archive/%{version}/rustup-%{version}.tar.gz
+
+# non-upstreamable patches:
+# * drop Windows-specific dependencies
+Patch:          0001-Drop-Windows-specific-dependencies.patch
+# * drop unavailable "openssl/vendored" feature
+Patch:          0002-Drop-feature-for-statically-linking-against-vendored.patch
+# * bump "term" dependency from 0.5.1 to 0.7 (blocked upstream)
+Patch:          0003-Bump-term-dependency-from-0.5.1-to-0.7.patch
+# * remove unused tracing support and unnecessary "rs_tracing" dependency
+Patch:          0004-Remove-unused-tracing-support.patch
+# * remove unused git-based versioning and unnecessary "git-testament" dependency
+Patch:          0005-Remove-unused-git-based-versioning.patch
+
+# rustup is only fully functional on Rust "Tier 1" architectures
+ExclusiveArch:  x86_64 aarch64
+
+BuildRequires:  cargo-rpm-macros >= 24
+
+%global _description %{expand:
+Manage multiple rust installations with ease.}
+
+%description %{_description}
+
+%prep
+%autosetup -n rustup-%{version} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build -f no-self-update
+%{cargo_license_summary -f no-self-update}
+%{cargo_license -f no-self-update} > LICENSE.dependencies
+
+%install
+%cargo_install -f no-self-update
+
+# generate and install shell completions
+cp -pav target/rpm/rustup-init target/rpm/rustup
+target/rpm/rustup completions bash > rustup.bash
+target/rpm/rustup completions fish > rustup.fish
+target/rpm/rustup completions zsh > _rustup
+
+install -Dpm 0644 rustup.bash -t %{buildroot}/%{bash_completions_dir}
+install -Dpm 0644 rustup.fish -t %{buildroot}/%{fish_completions_dir}
+install -Dpm 0644 _rustup -t %{buildroot}/%{zsh_completions_dir}
+
+%if %{with check}
+%check
+# * skip tests that require internet access
+# * skip tests for the "rustup" binary that is not built in this package
+%cargo_test -- -- --skip suite::cli_exact::check_updates --skip suite::cli_ui::rustup_ui_doc_text_tests
+%endif
+
+%files
+%license LICENSE-APACHE
+%license LICENSE-MIT
+%license LICENSE.dependencies
+%doc CHANGELOG.md
+%doc CONTRIBUTING.md
+%doc README.md
+
+%{_bindir}/rustup-init
+
+%{bash_completions_dir}/rustup.bash
+%{fish_completions_dir}/rustup.fish
+%{zsh_completions_dir}/_rustup
+
+%changelog
+%autochangelog

diff --git a/sources b/sources
new file mode 100644
index 0000000..f732aa6
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (rustup-1.26.0.tar.gz) = bc7cb580640248a601dbafb87c3a9e908b6c687377b4e0f88280576af15527f5837d9463f7831c14b0c274cd3170449e634cd851e0d03ea4ff1d0461d4a941be

                 reply	other threads:[~2026-11-18 21:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179503823194.1.6594755496322139014.rpms-rustup-fa7bcfa4e327@fedoraproject.org \
    --to=decathorpe@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox