mirror of
https://git.proxmox.com/git/debcargo-conf
synced 2025-04-28 09:41:55 +00:00
debcargo: update to 2.7.0
adding myself to uploaders and dropping most patches. Signed-off-by: Fabian Grünbichler <git@fabian.gruenbichler.email> (cherry picked from commit f4d013b25f1780d1c80b5edc89366e4afa31f7fd)
This commit is contained in:
parent
afb9d92632
commit
4645b91b30
@ -1,3 +1,15 @@
|
|||||||
|
rust-debcargo (2.7.0-1) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
|
||||||
|
|
||||||
|
* Package debcargo 2.7.0 from crates.io using debcargo 2.7.0
|
||||||
|
* update to cargo 0.76
|
||||||
|
* bump the standard version to 4.7.0 for generated source packages
|
||||||
|
* no longer warn about uncollapsed packages
|
||||||
|
* Also generate a 'Static-Built-Using' in addition to the 'X-Cargo-Built-Using'
|
||||||
|
* Add rustc to autopkgtest Depends of generated source packages
|
||||||
|
* Switch dh compat to 13 for generated source packages
|
||||||
|
|
||||||
|
-- Fabian Grünbichler <debian@fabian.gruenbichler.email> Fri, 20 Sep 2024 15:05:38 +0200
|
||||||
|
|
||||||
rust-debcargo (2.6.1-6~bpo12+pve1) proxmox-rust; urgency=medium
|
rust-debcargo (2.6.1-6~bpo12+pve1) proxmox-rust; urgency=medium
|
||||||
|
|
||||||
* Rebuild for Debian Bookworm / Proxmox
|
* Rebuild for Debian Bookworm / Proxmox
|
||||||
|
@ -11,6 +11,7 @@ Copyright:
|
|||||||
2016 Josh Triplett <josh@joshtriplett.org>
|
2016 Josh Triplett <josh@joshtriplett.org>
|
||||||
2017-2018 Ximin Luo <infinity0@debian.org>
|
2017-2018 Ximin Luo <infinity0@debian.org>
|
||||||
2017-2018 Vasudev Kamath <vasudev@copyninja.info>
|
2017-2018 Vasudev Kamath <vasudev@copyninja.info>
|
||||||
|
2024 Fabian Grünbichler <debian@fabian.gruenbichler.email>
|
||||||
License: MIT or Apache-2.0
|
License: MIT or Apache-2.0
|
||||||
|
|
||||||
Files: debian/*
|
Files: debian/*
|
||||||
|
@ -4,6 +4,7 @@ Upstream-Contact:
|
|||||||
Josh Triplett <josh@joshtriplett.org>
|
Josh Triplett <josh@joshtriplett.org>
|
||||||
Ximin Luo <infinity0@debian.org>
|
Ximin Luo <infinity0@debian.org>
|
||||||
Vasudev Kamath <vasudev@copyninja.info>
|
Vasudev Kamath <vasudev@copyninja.info>
|
||||||
|
Fabian Grünbichler <debian@fabian.gruenbichler.email>
|
||||||
Source: https://salsa.debian.org/rust-team/debcargo
|
Source: https://salsa.debian.org/rust-team/debcargo
|
||||||
|
|
||||||
Files: *
|
Files: *
|
||||||
@ -11,6 +12,7 @@ Copyright:
|
|||||||
FIXME (overlay) UNKNOWN-YEARS Josh Triplett <josh@joshtriplett.org>
|
FIXME (overlay) UNKNOWN-YEARS Josh Triplett <josh@joshtriplett.org>
|
||||||
FIXME (overlay) UNKNOWN-YEARS Ximin Luo <infinity0@debian.org>
|
FIXME (overlay) UNKNOWN-YEARS Ximin Luo <infinity0@debian.org>
|
||||||
FIXME (overlay) UNKNOWN-YEARS Vasudev Kamath <vasudev@copyninja.info>
|
FIXME (overlay) UNKNOWN-YEARS Vasudev Kamath <vasudev@copyninja.info>
|
||||||
|
FIXME (overlay) UNKNOWN-YEARS Fabian Grünbichler <debian@fabian.gruenbichler.email>
|
||||||
License: MIT or Apache-2.0
|
License: MIT or Apache-2.0
|
||||||
Comment:
|
Comment:
|
||||||
FIXME (overlay): Since upstream copyright years are not available in
|
FIXME (overlay): Since upstream copyright years are not available in
|
||||||
@ -29,6 +31,7 @@ Files: debian/*
|
|||||||
Copyright:
|
Copyright:
|
||||||
2018-2024 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
|
2018-2024 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
|
||||||
2018-2024 Ximin Luo <infinity0@debian.org>
|
2018-2024 Ximin Luo <infinity0@debian.org>
|
||||||
|
2018-2024 Fabian Grünbichler <debian@fabian.gruenbichler.email>
|
||||||
License: MIT or Apache-2.0
|
License: MIT or Apache-2.0
|
||||||
|
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
overlay = "."
|
overlay = "."
|
||||||
uploaders = ["Ximin Luo <infinity0@debian.org>"]
|
uploaders = ["Ximin Luo <infinity0@debian.org>", "Fabian Grünbichler <debian@fabian.gruenbichler.email>"]
|
||||||
|
|
||||||
[source]
|
|
||||||
build_depends = ["rustc:native (>= 1.29)"]
|
|
||||||
|
|
||||||
[packages.bin]
|
[packages.bin]
|
||||||
section = "devel"
|
section = "devel"
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
From c94c3dccacf56a320696f043fcfb6e8424dfcd46 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?=
|
|
||||||
<debian@fabian.gruenbichler.email>
|
|
||||||
Date: Tue, 19 Dec 2023 09:08:44 +0100
|
|
||||||
Subject: [PATCH] allow crates.io sparse access
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
else, opt-in via the environment variable works with cargo but fails
|
|
||||||
debcargo since the cache paths are different.
|
|
||||||
|
|
||||||
Signed-off-by: Fabian Grünbichler <debian@fabian.gruenbichler.email>
|
|
||||||
---
|
|
||||||
src/crates.rs | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
Index: debcargo/src/crates.rs
|
|
||||||
===================================================================
|
|
||||||
--- debcargo.orig/src/crates.rs
|
|
||||||
+++ debcargo/src/crates.rs
|
|
||||||
@@ -76,7 +76,7 @@ fn fetch_candidates(registry: &mut Packa
|
|
||||||
pub fn invalidate_crates_io_cache() -> Result<()> {
|
|
||||||
let config = Config::default()?;
|
|
||||||
let _lock = config.acquire_package_cache_lock(CacheLockMode::DownloadExclusive)?;
|
|
||||||
- let source_id = SourceId::crates_io(&config)?;
|
|
||||||
+ let source_id = SourceId::crates_io_maybe_sparse_http(&config)?;
|
|
||||||
let yanked_whitelist = HashSet::new();
|
|
||||||
let mut r = RegistrySource::remote(source_id, &yanked_whitelist, &config)?;
|
|
||||||
r.invalidate_cache();
|
|
||||||
@@ -86,7 +86,7 @@ pub fn invalidate_crates_io_cache() -> R
|
|
||||||
pub fn crate_name_ver_to_dep(crate_name: &str, version: Option<&str>) -> Result<Dependency> {
|
|
||||||
// note: this forces a network call
|
|
||||||
let config = Config::default()?;
|
|
||||||
- let source_id = SourceId::crates_io(&config)?;
|
|
||||||
+ let source_id = SourceId::crates_io_maybe_sparse_http(&config)?;
|
|
||||||
let version = version.and_then(|v| {
|
|
||||||
if v.is_empty() {
|
|
||||||
None
|
|
@ -2,21 +2,12 @@ Index: debcargo/Cargo.toml
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- debcargo.orig/Cargo.toml
|
--- debcargo.orig/Cargo.toml
|
||||||
+++ debcargo/Cargo.toml
|
+++ debcargo/Cargo.toml
|
||||||
@@ -60,7 +60,7 @@ version = "0.18"
|
@@ -81,7 +81,7 @@ version = "0.18"
|
||||||
version = "0.3"
|
version = "0.3"
|
||||||
|
|
||||||
[dependencies.itertools]
|
[dependencies.itertools]
|
||||||
-version = "0.10"
|
-version = "0.12"
|
||||||
+version = ">= 0.10, <1.0"
|
+version = ">= 0.10, <1.0"
|
||||||
|
|
||||||
[dependencies.log]
|
[dependencies.log]
|
||||||
version = "0.4"
|
version = "0.4"
|
||||||
@@ -87,7 +87,7 @@ version = "3"
|
|
||||||
version = "0.16"
|
|
||||||
|
|
||||||
[dependencies.toml]
|
|
||||||
-version = "0.7"
|
|
||||||
+version = ">= 0.7, < 1.0"
|
|
||||||
|
|
||||||
[dependencies.walkdir]
|
|
||||||
version = "2"
|
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
Index: debcargo/Cargo.toml
|
|
||||||
===================================================================
|
|
||||||
--- debcargo.orig/Cargo.toml
|
|
||||||
+++ debcargo/Cargo.toml
|
|
||||||
@@ -45,7 +45,7 @@ features = [
|
|
||||||
]
|
|
||||||
|
|
||||||
[dependencies.env_logger]
|
|
||||||
-version = "0.9"
|
|
||||||
+version = "0.10"
|
|
||||||
|
|
||||||
[dependencies.filetime]
|
|
||||||
version = "0.2"
|
|
@ -1,5 +1 @@
|
|||||||
update-cargo.patch
|
|
||||||
relax-env-logger.diff
|
|
||||||
update-git2.patch
|
|
||||||
crates-io-sparse-support.patch
|
|
||||||
relax-dep.patch
|
relax-dep.patch
|
||||||
|
@ -1,190 +0,0 @@
|
|||||||
Index: debcargo/Cargo.toml
|
|
||||||
===================================================================
|
|
||||||
--- debcargo.orig/Cargo.toml
|
|
||||||
+++ debcargo/Cargo.toml
|
|
||||||
@@ -31,7 +31,7 @@ version = "0.12"
|
|
||||||
version = "1.0"
|
|
||||||
|
|
||||||
[dependencies.cargo]
|
|
||||||
-version = "0.63"
|
|
||||||
+version = "0.76"
|
|
||||||
|
|
||||||
[dependencies.chrono]
|
|
||||||
version = "0.4"
|
|
||||||
@@ -54,7 +54,7 @@ version = "0.2"
|
|
||||||
version = "1"
|
|
||||||
|
|
||||||
[dependencies.git2]
|
|
||||||
-version = "0.14"
|
|
||||||
+version = "0.16"
|
|
||||||
|
|
||||||
[dependencies.glob]
|
|
||||||
version = "0.3"
|
|
||||||
@@ -87,7 +87,7 @@ version = "3"
|
|
||||||
version = "0.16"
|
|
||||||
|
|
||||||
[dependencies.toml]
|
|
||||||
-version = "0.5"
|
|
||||||
+version = "0.7"
|
|
||||||
|
|
||||||
[dependencies.walkdir]
|
|
||||||
version = "2"
|
|
||||||
Index: debcargo/src/crates.rs
|
|
||||||
===================================================================
|
|
||||||
--- debcargo.orig/src/crates.rs
|
|
||||||
+++ debcargo/src/crates.rs
|
|
||||||
@@ -2,15 +2,17 @@ use anyhow::{format_err, Error};
|
|
||||||
use cargo::{
|
|
||||||
core::manifest::ManifestMetadata,
|
|
||||||
core::registry::PackageRegistry,
|
|
||||||
- core::source::MaybePackage,
|
|
||||||
core::{
|
|
||||||
resolver::features::CliFeatures, Dependency, EitherManifest, FeatureValue, Manifest,
|
|
||||||
- Package, PackageId, Registry, Source, SourceId, Summary, Target, TargetKind, Workspace,
|
|
||||||
+ Package, PackageId, Registry, SourceId, Summary, Target, TargetKind, Workspace,
|
|
||||||
},
|
|
||||||
ops,
|
|
||||||
ops::{PackageOpts, Packages},
|
|
||||||
- sources::RegistrySource,
|
|
||||||
- util::{interning::InternedString, toml::read_manifest, FileLock},
|
|
||||||
+ sources::{
|
|
||||||
+ source::{MaybePackage, QueryKind, Source},
|
|
||||||
+ RegistrySource,
|
|
||||||
+ },
|
|
||||||
+ util::{cache_lock::CacheLockMode, interning::InternedString, toml::read_manifest, FileLock},
|
|
||||||
Config,
|
|
||||||
};
|
|
||||||
use filetime::{set_file_times, FileTime};
|
|
||||||
@@ -60,7 +62,7 @@ fn hash<H: Hash>(hashable: &H) -> u64 {
|
|
||||||
}
|
|
||||||
|
|
||||||
fn fetch_candidates(registry: &mut PackageRegistry, dep: &Dependency) -> Result<Vec<Summary>> {
|
|
||||||
- let mut summaries = match registry.query_vec(dep, false) {
|
|
||||||
+ let mut summaries = match registry.query_vec(dep, QueryKind::Exact) {
|
|
||||||
std::task::Poll::Ready(res) => res?,
|
|
||||||
std::task::Poll::Pending => {
|
|
||||||
registry.block_until_ready()?;
|
|
||||||
@@ -73,7 +75,7 @@ fn fetch_candidates(registry: &mut Packa
|
|
||||||
|
|
||||||
pub fn invalidate_crates_io_cache() -> Result<()> {
|
|
||||||
let config = Config::default()?;
|
|
||||||
- let _lock = config.acquire_package_cache_lock()?;
|
|
||||||
+ let _lock = config.acquire_package_cache_lock(CacheLockMode::DownloadExclusive)?;
|
|
||||||
let source_id = SourceId::crates_io(&config)?;
|
|
||||||
let yanked_whitelist = HashSet::new();
|
|
||||||
let mut r = RegistrySource::remote(source_id, &yanked_whitelist, &config)?;
|
|
||||||
@@ -125,7 +127,7 @@ impl CrateInfo {
|
|
||||||
let dep = Dependency::parse(crate_name, None, source_id)?;
|
|
||||||
let mut package_id: Option<PackageId> = None;
|
|
||||||
loop {
|
|
||||||
- match source.query(&dep, &mut |p| package_id = Some(p.package_id())) {
|
|
||||||
+ match source.query(&dep, QueryKind::Exact, &mut |p| package_id = Some(p.package_id())) {
|
|
||||||
std::task::Poll::Ready(res) => {
|
|
||||||
res?;
|
|
||||||
break;
|
|
||||||
@@ -179,7 +181,7 @@ impl CrateInfo {
|
|
||||||
workspace
|
|
||||||
.target_dir()
|
|
||||||
.join("package")
|
|
||||||
- .open_rw(filename, &config, "crate file")?
|
|
||||||
+ .open_rw_exclusive_create(filename, &config, "crate file")?
|
|
||||||
};
|
|
||||||
|
|
||||||
(package, crate_file)
|
|
||||||
@@ -229,7 +229,7 @@ impl CrateInfo {
|
|
||||||
)?;
|
|
||||||
}
|
|
||||||
|
|
||||||
- let source_id = dependency.source_id();
|
|
||||||
+ let source_id = SourceId::crates_io_maybe_sparse_http(&config)?;
|
|
||||||
let registry_name = format!(
|
|
||||||
"{}-{:016x}",
|
|
||||||
source_id.url().host_str().unwrap_or(""),
|
|
||||||
@@ -232,7 +234,7 @@ impl CrateInfo {
|
|
||||||
hash(&source_id).swap_bytes()
|
|
||||||
);
|
|
||||||
let get_package_info = |config: &Config| -> Result<_> {
|
|
||||||
- let lock = config.acquire_package_cache_lock()?;
|
|
||||||
+ let lock = config.acquire_package_cache_lock(CacheLockMode::DownloadExclusive)?;
|
|
||||||
let mut registry = PackageRegistry::new(config)?;
|
|
||||||
registry.lock_patches();
|
|
||||||
let summaries = fetch_candidates(&mut registry, dependency)?;
|
|
||||||
@@ -274,7 +276,7 @@ impl CrateInfo {
|
|
||||||
let crate_file = config
|
|
||||||
.registry_cache_path()
|
|
||||||
.join(®istry_name)
|
|
||||||
- .open_ro(&filename, config, &filename)?;
|
|
||||||
+ .open_ro_shared(&filename, config, &filename)?;
|
|
||||||
Ok((package.clone(), manifest.clone(), crate_file))
|
|
||||||
};
|
|
||||||
// if update is false but the user never downloaded the crate then the
|
|
||||||
@@ -329,8 +331,8 @@ impl CrateInfo {
|
|
||||||
self.package.manifest_path()
|
|
||||||
}
|
|
||||||
|
|
||||||
- pub fn rust_version(&self) -> Option<&str> {
|
|
||||||
- self.manifest.rust_version()
|
|
||||||
+ pub fn rust_version(&self) -> Option<String> {
|
|
||||||
+ self.manifest.rust_version().map(|v| v.to_string())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn targets(&self) -> &[Target] {
|
|
||||||
Index: debcargo/src/debian/copyright/tests.rs
|
|
||||||
===================================================================
|
|
||||||
--- debcargo.orig/src/debian/copyright/tests.rs
|
|
||||||
+++ debcargo/src/debian/copyright/tests.rs
|
|
||||||
@@ -1,11 +1,10 @@
|
|
||||||
use super::{debian_copyright, get_licenses};
|
|
||||||
|
|
||||||
use std::path::Path;
|
|
||||||
-use std::rc::Rc;
|
|
||||||
|
|
||||||
use cargo::{
|
|
||||||
core::{package::Package, SourceId},
|
|
||||||
- util::{config::Config, toml::TomlManifest},
|
|
||||||
+ util::{config::Config, toml::schema::TomlManifest},
|
|
||||||
};
|
|
||||||
use toml::toml;
|
|
||||||
|
|
||||||
@@ -85,12 +84,11 @@ fn build_package_with_authors(authors: V
|
|
||||||
authors = authors
|
|
||||||
license = "AGPLv3"
|
|
||||||
};
|
|
||||||
- let toml_manifest: Rc<TomlManifest> =
|
|
||||||
- Rc::new(toml::from_str(&toml::to_string(&toml).unwrap()).unwrap());
|
|
||||||
- let source_id = SourceId::for_path(Path::new("/path/to/mypackage")).unwrap();
|
|
||||||
- let package_root = Path::new("/path/to/mypackage");
|
|
||||||
+ let toml_manifest: TomlManifest = toml::from_str(&toml::to_string(&toml).unwrap()).unwrap();
|
|
||||||
+ let source_id = SourceId::for_path(Path::new("/")).unwrap();
|
|
||||||
+ let package_root = Path::new("/");
|
|
||||||
let config = Config::default().unwrap();
|
|
||||||
- let manifest = TomlManifest::to_real_manifest(&toml_manifest, source_id, package_root, &config)
|
|
||||||
+ let manifest = TomlManifest::to_real_manifest(toml_manifest, false, source_id, package_root, &config)
|
|
||||||
.unwrap()
|
|
||||||
.0;
|
|
||||||
Package::new(manifest, Path::new("/path/to/manifest"))
|
|
||||||
Index: debcargo/src/debian/mod.rs
|
|
||||||
===================================================================
|
|
||||||
--- debcargo.orig/src/debian/mod.rs
|
|
||||||
+++ debcargo/src/debian/mod.rs
|
|
||||||
@@ -1172,7 +1172,7 @@ fn reduce_provides(
|
|
||||||
(provides, features_with_deps)
|
|
||||||
}
|
|
||||||
|
|
||||||
-fn rustc_dep(min_ver: &Option<&str>) -> String {
|
|
||||||
+fn rustc_dep(min_ver: &Option<String>) -> String {
|
|
||||||
if let Some(min_ver) = min_ver {
|
|
||||||
format!("rustc:native (>= {})", min_ver)
|
|
||||||
} else {
|
|
||||||
@@ -1186,7 +1186,10 @@ mod test {
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn rustc_dep_includes_minver() {
|
|
||||||
- assert_eq!("rustc:native (>= 1.65)", rustc_dep(&Some(&"1.65")));
|
|
||||||
+ assert_eq!(
|
|
||||||
+ "rustc:native (>= 1.65)",
|
|
||||||
+ rustc_dep(&Some("1.65".to_string()))
|
|
||||||
+ );
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
@ -1,13 +0,0 @@
|
|||||||
Index: debcargo/Cargo.toml
|
|
||||||
===================================================================
|
|
||||||
--- debcargo.orig/Cargo.toml
|
|
||||||
+++ debcargo/Cargo.toml
|
|
||||||
@@ -54,7 +54,7 @@ version = "0.2"
|
|
||||||
version = "1"
|
|
||||||
|
|
||||||
[dependencies.git2]
|
|
||||||
-version = "0.16"
|
|
||||||
+version = "0.18"
|
|
||||||
|
|
||||||
[dependencies.glob]
|
|
||||||
version = "0.3"
|
|
@ -45,6 +45,7 @@ case $dcver in
|
|||||||
2.4.*) true;;
|
2.4.*) true;;
|
||||||
2.5.*) true;;
|
2.5.*) true;;
|
||||||
2.6.*) true;;
|
2.6.*) true;;
|
||||||
|
2.7.*) true;;
|
||||||
*) abort 1 "unsupported debcargo version: $dcver";;
|
*) abort 1 "unsupported debcargo version: $dcver";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user