Package: sccache
Version: 0.5.4
Severity: serious
sccache has a couple of FTBFS issues.
The first is that a couple of dependencies have been updated, dealing
with this is a simple matter of dropping patches and updating
dependencies.
The second is that the build runs out of address space on mipsel.
The workaround seems to be to use "thin" lto rather than full
lto. Unfortunately i'm not aware of a good way to do this other
than editing Cargo.toml. I did so with sed in debian/rules,
conditioned behind architecture conditionals.
Debdiff attatched, I may or may not NMU this later.
diff -Nru sccache-0.5.4/debian/changelog sccache-0.5.4/debian/changelog
--- sccache-0.5.4/debian/changelog 2023-07-05 18:31:19.000000000 +0000
+++ sccache-0.5.4/debian/changelog 2023-07-25 23:06:38.000000000 +0000
@@ -1,3 +1,14 @@
+sccache (0.5.4-2.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Drop patch 2023 and update debian dependency, directories 5.x is now in
+ Debian.
+ * Drop patch 2016 and update debian dependency, daemonise 0.5 is now in
+ Debian.
+ * Use thin lto on mipsel to avoid running out of address space.
+
+ -- Peter Michael Green <plugw...@debian.org> Tue, 25 Jul 2023 23:06:38 +0000
+
sccache (0.5.4-2) unstable; urgency=medium
* drop patch 2019, obsoleted by Debian package updates
diff -Nru sccache-0.5.4/debian/control sccache-0.5.4/debian/control
--- sccache-0.5.4/debian/control 2023-06-27 13:20:11.000000000 +0000
+++ sccache-0.5.4/debian/control 2023-07-25 23:06:38.000000000 +0000
@@ -22,8 +22,8 @@
librust-chrono-0.4+default-dev,
librust-clap-4+default-dev,
librust-counted-array-0.1+default-dev,
- librust-daemonize-0.4+default-dev,
- librust-directories-4+default-dev,
+ librust-daemonize-0.5+default-dev,
+ librust-directories-5+default-dev,
librust-env-logger-0.9+default-dev,
librust-encoding-0.2+default-dev,
librust-filetime-0.2+default-dev,
diff -Nru sccache-0.5.4/debian/patches/2016_daemonize.patch
sccache-0.5.4/debian/patches/2016_daemonize.patch
--- sccache-0.5.4/debian/patches/2016_daemonize.patch 2023-06-27
13:26:13.000000000 +0000
+++ sccache-0.5.4/debian/patches/2016_daemonize.patch 1970-01-01
00:00:00.000000000 +0000
@@ -1,17 +0,0 @@
-Description: relax dependency on crate daemonize
- Needed to match Debian-packaged daemonize v0.4.1.
-Author: Jonas Smedegaard <d...@jones.dk>
-Last-Update: 2023-05-21
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/Cargo.toml
-+++ b/Cargo.toml
-@@ -108,7 +108,7 @@
- serial_test = ">= 0.9, < 3"
-
- [target.'cfg(unix)'.dependencies]
--daemonize = "0.5"
-+daemonize = ">= 0.4, < 0.6"
-
- [features]
- all = [
diff -Nru sccache-0.5.4/debian/patches/2023_directories.patch
sccache-0.5.4/debian/patches/2023_directories.patch
--- sccache-0.5.4/debian/patches/2023_directories.patch 2023-07-05
18:31:19.000000000 +0000
+++ sccache-0.5.4/debian/patches/2023_directories.patch 1970-01-01
00:00:00.000000000 +0000
@@ -1,17 +0,0 @@
-Description: relax dependency on crate directories
- Needed to match Debian-packaged directories v4.0.1.
-Author: Jonas Smedegaard <d...@jones.dk>
-Last-Update: 2023-05-21
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/Cargo.toml
-+++ b/Cargo.toml
-@@ -33,7 +33,7 @@
- byteorder = "1.0"
- bytes = "1"
- clap = { version = "4.1.11", features = ["derive", "env", "wrap_help"] }
--directories = "5.0.0"
-+directories = ">= 4, < 6"
- encoding = "0.2"
- env_logger = ">= 0.9, < 0.11"
- filetime = "0.2"
diff -Nru sccache-0.5.4/debian/patches/series
sccache-0.5.4/debian/patches/series
--- sccache-0.5.4/debian/patches/series 2023-07-04 08:18:27.000000000 +0000
+++ sccache-0.5.4/debian/patches/series 2023-07-25 23:06:38.000000000 +0000
@@ -15,9 +15,7 @@
2013_is-terminal.patch
2014_hyper.patch
2015_uuid.patch
-2016_daemonize.patch
2017_memmap2.patch
2018_regex.patch
2021_chrono.patch
2022_reqwest_trust-dns.patch
-2023_directories.patch
diff -Nru sccache-0.5.4/debian/rules sccache-0.5.4/debian/rules
--- sccache-0.5.4/debian/rules 2023-07-05 18:31:19.000000000 +0000
+++ sccache-0.5.4/debian/rules 2023-07-25 23:06:38.000000000 +0000
@@ -26,6 +26,10 @@
dh $@ --buildsystem cargo
override_dh_auto_build:
+ #use thin rather than full lto on mipsel to avoid running out of
address space.
+ifeq ($(DEB_HOST_ARCH),mipsel)
+ sed -i 's/lto = true/lto = "thin"/' Cargo.toml
+endif
dh_auto_build --buildsystem cargo -- $(CARGO_BUILD_ARGS)
# ensure ccache is not in use during tests
@@ -43,3 +47,8 @@
--name "a fast C/C++/Rust compiler cache" \
--output $@ $< \
|| { $< --help; false; }
+
+ifeq ($(DEB_HOST_ARCH),mipsel)
+execute_after_dh_auto_clean:
+ sed -i 's/lto = "thin"/lto = true/' Cargo.toml
+endif