Update to 0.5.0

Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
epel9
Michel Alexandre Salim 3 years ago
parent 67243c99ae
commit d1be2887a2

2
.gitignore vendored

@ -6,3 +6,5 @@
/below-0.4.0-vendor.tar.gz /below-0.4.0-vendor.tar.gz
/below-0.4.1.crate /below-0.4.1.crate
/below-0.4.1-vendor.tar.gz /below-0.4.1-vendor.tar.gz
/below-0.5.0.crate
/below-0.5.0-vendor.tar.gz

@ -1,15 +1,7 @@
--- below-0.4.0/Cargo.toml 1970-01-01T00:00:01+00:00 diff '--color=auto' -ruN below-0.5.0/Cargo.toml below-0.5.0-fix-metadata/Cargo.toml
+++ below-0.4.0/Cargo.toml 2021-10-27T17:40:41.373826+00:00 --- below-0.5.0/Cargo.toml 1969-12-31 16:00:01.000000000 -0800
@@ -10,7 +10,7 @@ +++ below-0.5.0-fix-metadata/Cargo.toml 2022-02-17 22:51:13.480645198 -0800
# See Cargo.toml.orig for the original contents. @@ -112,3 +112,17 @@
[package]
-edition = "2021"
+edition = "2018"
name = "below"
version = "0.4.0"
authors = ["Daniel Xu <dlxu@fb.com>", "Facebook"]
@@ -108,3 +108,17 @@
[features] [features]
enable_backtrace = [] enable_backtrace = []
@ -18,12 +10,12 @@
+cgroupfs = { path = "patched-crates/cgroupfs" } +cgroupfs = { path = "patched-crates/cgroupfs" }
+common = { path = "patched-crates/below-common", package = "below-common" } +common = { path = "patched-crates/below-common", package = "below-common" }
+config = { path = "patched-crates/below-config", package = "below-config" } +config = { path = "patched-crates/below-config", package = "below-config" }
+derive = { path = "patched-crates/below_derive", package = "below_derive" }
+dump = { path = "patched-crates/below-dump", package = "below-dump" } +dump = { path = "patched-crates/below-dump", package = "below-dump" }
+libbpf-rs = { path = "patched-crates/libbpf-rs" } +libbpf-rs = { path = "patched-crates/libbpf-rs" }
+libbpf-cargo = { path = "patched-crates/libbpf-cargo" } +libbpf-cargo = { path = "patched-crates/libbpf-cargo" }
+model = { path = "patched-crates/below-model", package = "below-model" } +model = { path = "patched-crates/below-model", package = "below-model" }
+procfs = { path = "patched-crates/fb_procfs", package = "fb_procfs" } +procfs = { path = "patched-crates/fb_procfs", package = "fb_procfs" }
+render = { path = "patched-crates/below-render", package = "below-render" }
+store = { path = "patched-crates/below-store", package = "below-store" } +store = { path = "patched-crates/below-store", package = "below-store" }
+view = { path = "patched-crates/below-view", package = "below-view" } +view = { path = "patched-crates/below-view", package = "below-view" }
+derive = { path = "patched-crates/below_derive", package = "below_derive" }
+render = { path = "patched-crates/below-render", package = "below-render" }

@ -1,169 +0,0 @@
diff -Naur a/patched-crates/below-common/Cargo.toml b/patched-crates/below-common/Cargo.toml
--- a/patched-crates/below-common/Cargo.toml 2021-11-11 10:54:23.798601187 -0800
+++ b/patched-crates/below-common/Cargo.toml 2021-11-11 10:55:02.722814393 -0800
@@ -10,7 +10,7 @@
# See Cargo.toml.orig for the original contents.
[package]
-edition = "2021"
+edition = "2018"
name = "below-common"
version = "0.4.1"
authors = ["Daniel Xu <dlxu@fb.com>", "Facebook"]
diff -Naur a/patched-crates/below-common/src/dateutil.rs b/patched-crates/below-common/src/dateutil.rs
--- a/patched-crates/below-common/src/dateutil.rs 2021-11-11 10:54:23.798601187 -0800
+++ b/patched-crates/below-common/src/dateutil.rs 2021-11-11 10:55:02.723814398 -0800
@@ -302,7 +302,7 @@
let mut default_format = String::new();
let mut date_with_defaults = date.clone();
let mut use_now = false;
- for part in ["S", "M", "HI", "d", "mb", "Yy"] {
+ for part in ["S", "M", "HI", "d", "mb", "Yy"].iter() {
if part
.chars()
.any(|ch| naive_format.contains(&format!("%{}", ch)))
diff -Naur a/patched-crates/below-config/Cargo.toml b/patched-crates/below-config/Cargo.toml
--- a/patched-crates/below-config/Cargo.toml 2021-11-11 10:54:23.798601187 -0800
+++ b/patched-crates/below-config/Cargo.toml 2021-11-11 10:55:02.723814398 -0800
@@ -10,7 +10,7 @@
# See Cargo.toml.orig for the original contents.
[package]
-edition = "2021"
+edition = "2018"
name = "below-config"
version = "0.4.1"
authors = ["Daniel Xu <dlxu@fb.com>", "Facebook"]
diff -Naur a/patched-crates/below_derive/Cargo.toml b/patched-crates/below_derive/Cargo.toml
--- a/patched-crates/below_derive/Cargo.toml 2021-11-11 10:54:23.802601209 -0800
+++ b/patched-crates/below_derive/Cargo.toml 2021-11-11 10:55:02.723814398 -0800
@@ -10,7 +10,7 @@
# See Cargo.toml.orig for the original contents.
[package]
-edition = "2021"
+edition = "2018"
name = "below_derive"
version = "0.4.1"
authors = ["Daniel Xu <dlxu@fb.com>", "Facebook"]
diff -Naur a/patched-crates/below-dump/Cargo.toml b/patched-crates/below-dump/Cargo.toml
--- a/patched-crates/below-dump/Cargo.toml 2021-11-11 10:54:23.798601187 -0800
+++ b/patched-crates/below-dump/Cargo.toml 2021-11-11 10:55:02.723814398 -0800
@@ -10,7 +10,7 @@
# See Cargo.toml.orig for the original contents.
[package]
-edition = "2021"
+edition = "2018"
name = "below-dump"
version = "0.4.1"
authors = ["Daniel Xu <dlxu@fb.com>", "Facebook"]
diff -Naur a/patched-crates/below-model/Cargo.toml b/patched-crates/below-model/Cargo.toml
--- a/patched-crates/below-model/Cargo.toml 2021-11-11 10:54:23.799601192 -0800
+++ b/patched-crates/below-model/Cargo.toml 2021-11-11 10:55:02.724814404 -0800
@@ -10,7 +10,7 @@
# See Cargo.toml.orig for the original contents.
[package]
-edition = "2021"
+edition = "2018"
name = "below-model"
version = "0.4.1"
authors = ["Daniel Xu <dlxu@fb.com>", "Facebook"]
diff -Naur a/patched-crates/below-render/Cargo.toml b/patched-crates/below-render/Cargo.toml
--- a/patched-crates/below-render/Cargo.toml 2021-11-11 10:54:23.800601198 -0800
+++ b/patched-crates/below-render/Cargo.toml 2021-11-11 10:55:02.724814404 -0800
@@ -10,7 +10,7 @@
# See Cargo.toml.orig for the original contents.
[package]
-edition = "2021"
+edition = "2018"
name = "below-render"
version = "0.4.1"
authors = ["Daniel Xu <dlxu@fb.com>", "Facebook"]
diff -Naur a/patched-crates/below-store/Cargo.toml b/patched-crates/below-store/Cargo.toml
--- a/patched-crates/below-store/Cargo.toml 2021-11-11 10:54:23.800601198 -0800
+++ b/patched-crates/below-store/Cargo.toml 2021-11-11 10:55:02.724814404 -0800
@@ -10,7 +10,7 @@
# See Cargo.toml.orig for the original contents.
[package]
-edition = "2021"
+edition = "2018"
name = "below-store"
version = "0.4.1"
authors = ["Daniel Xu <dlxu@fb.com>", "Facebook"]
diff -Naur a/patched-crates/below-view/Cargo.toml b/patched-crates/below-view/Cargo.toml
--- a/patched-crates/below-view/Cargo.toml 2021-11-11 10:54:23.801601203 -0800
+++ b/patched-crates/below-view/Cargo.toml 2021-11-11 10:55:02.724814404 -0800
@@ -10,7 +10,7 @@
# See Cargo.toml.orig for the original contents.
[package]
-edition = "2021"
+edition = "2018"
name = "below-view"
version = "0.4.1"
authors = ["Daniel Xu <dlxu@fb.com>", "Facebook"]
diff -Naur a/patched-crates/cgroupfs/Cargo.toml b/patched-crates/cgroupfs/Cargo.toml
--- a/patched-crates/cgroupfs/Cargo.toml 2021-11-11 10:54:23.807601236 -0800
+++ b/patched-crates/cgroupfs/Cargo.toml 2021-11-11 10:55:02.724814404 -0800
@@ -10,7 +10,7 @@
# See Cargo.toml.orig for the original contents.
[package]
-edition = "2021"
+edition = "2018"
name = "cgroupfs"
version = "0.4.1"
authors = ["Daniel Xu <dlxu@fb.com>", "Facebook"]
diff -Naur a/patched-crates/fb_procfs/Cargo.toml b/patched-crates/fb_procfs/Cargo.toml
--- a/patched-crates/fb_procfs/Cargo.toml 2021-11-11 10:54:23.838601406 -0800
+++ b/patched-crates/fb_procfs/Cargo.toml 2021-11-11 10:55:02.724814404 -0800
@@ -10,7 +10,7 @@
# See Cargo.toml.orig for the original contents.
[package]
-edition = "2021"
+edition = "2018"
name = "fb_procfs"
version = "0.4.1"
authors = ["Daniel Xu <dlxu@fb.com>", "Facebook"]
diff -Naur a/patched-crates/libbpf-cargo/Cargo.toml b/patched-crates/libbpf-cargo/Cargo.toml
--- a/patched-crates/libbpf-cargo/Cargo.toml 2021-11-11 10:54:23.848601461 -0800
+++ b/patched-crates/libbpf-cargo/Cargo.toml 2021-11-11 10:55:28.898957781 -0800
@@ -35,7 +35,7 @@
version = "0.12"
[dependencies.libbpf-sys]
-version = "0.5.0-2"
+version = "0.4.0-2"
[dependencies.memmap2]
version = "0.3"
diff -Naur a/patched-crates/libbpf-rs/Cargo.toml b/patched-crates/libbpf-rs/Cargo.toml
--- a/patched-crates/libbpf-rs/Cargo.toml 2021-11-11 10:54:23.856601505 -0800
+++ b/patched-crates/libbpf-rs/Cargo.toml 2021-11-11 10:55:48.192063468 -0800
@@ -24,7 +24,7 @@
version = "1.3"
[dependencies.libbpf-sys]
-version = "0.5.0-2"
+version = "0.4.0-2"
[dependencies.nix]
version = "0.22"
diff -Naur a/patched-crates/libbpf-rs/src/object.rs b/patched-crates/libbpf-rs/src/object.rs
--- a/patched-crates/libbpf-rs/src/object.rs 2021-11-11 10:54:23.857601510 -0800
+++ b/patched-crates/libbpf-rs/src/object.rs 2021-11-11 10:56:05.745159628 -0800
@@ -67,9 +67,6 @@
pin_root_path: ptr::null(),
attach_prog_fd: 0,
kconfig: ptr::null(),
- btf_custom_path: ptr::null(),
- __bindgen_padding_0: <[u8; 6]>::default(),
- __bindgen_padding_1: <[u8; 4]>::default(),
}
}

@ -1,6 +1,5 @@
# Generated by rust2rpm 18 # Generated by rust2rpm 20
%bcond_without check %bcond_without check
%global __cargo_skip_build 0
%global crate below %global crate below
@ -16,7 +15,7 @@
%global forgeurl https://github.com/facebookincubator/below %global forgeurl https://github.com/facebookincubator/below
Name: rust-%{crate} Name: rust-%{crate}
Version: 0.4.1 Version: 0.5.0
Release: %autorelease Release: %autorelease
Summary: Interactive tool to view and record historical system data Summary: Interactive tool to view and record historical system data
@ -91,8 +90,9 @@ Recommends: logrotate
%if 0%{?el8} %if 0%{?el8}
%doc README-epel.md %doc README-epel.md
%endif %endif
%attr(755, root, root) %{_bindir}/%{crate} %{_bindir}/below
%{_unitdir}/%{crate}.service %{_unitdir}/%{crate}.service
%dir %{_sysconfdir}/logrotate.d
%config(noreplace) %{_sysconfdir}/logrotate.d/%{crate}.conf %config(noreplace) %{_sysconfdir}/logrotate.d/%{crate}.conf
%dir %{_localstatedir}/log/%{crate} %dir %{_localstatedir}/log/%{crate}

@ -1,2 +1,2 @@
SHA512 (below-0.4.1.crate) = 1e67ad09248c8ae457932857fbee21375d1ea71020ba8254e08f1d43473ef400ac31189771e4ae02b6e199cec1a12fed6d4cde0320224ff844a39c12668e0375 SHA512 (below-0.5.0.crate) = 7fd12aae0b912756a5ac3cee289d1b8390349f046cbf18a32dc61b7b41ab0809154133eff63cd04637f0d2ae3cdb25b5c7e2016452ed840205f5b7db57403c61
SHA512 (below-0.4.1-vendor.tar.gz) = 7d93a19ec33feae4ae7649bfc8125a958a4b4cb0899d047f132f48e503bff6b9daac3ef298926d3e690431ef6a482d8d2c0bf2fa45904fbc18234a376e5043ce SHA512 (below-0.5.0-vendor.tar.gz) = 61d9bfcb0243c08f6fe4f16f4dcbebafb946b1e62857d4182aaa99325bf72e7ecc8209c6ddd05c0e120f0bcc3cff128fe60ad9fb33cd560a996cb424ad74a7ed

@ -23,13 +23,12 @@ if [ ! -n "$PREPARE" ]; then
trap 'rm -rf "$workdir"' EXIT trap 'rm -rf "$workdir"' EXIT
fi fi
# All the below crates use edition 2021, which isn't supported by rust in el8; # libbpf-rs and libbpf-cargo transitively depend on libbpf 0.5.0, and
# moreover, libbpf-rs and libbpf-cargo transitively depend on libbpf 0.5.0, and
# el8 ships 0.4.0. # el8 ships 0.4.0.
# #
# So we cheat: # So we cheat:
# - below-fix-metadata.diff (which is applied in %prep) downgrades the edition # - below-fix-metadata.diff (which is applied in %prep)
# for below and sets up all the other crates to be replaced with patched # sets up all the other crates to be replaced with patched
# versions under patched-crates/ # versions under patched-crates/
# - below-patched-crates.patch contains the actual modifications of the patched # - below-patched-crates.patch contains the actual modifications of the patched
# crates (mostly the edition downgrades, a few pins and a couple of build # crates (mostly the edition downgrades, a few pins and a couple of build
@ -54,7 +53,8 @@ if [ -n "$PREPARE" ]; then
exit 1 exit 1
else else
(cd "${workdir}/${nv}" && \ (cd "${workdir}/${nv}" && \
patch -p1 < ${tardir}/below-patched-crates.patch && \ ([ -f ${tardir}/below-patched-crates.patch ] && \
patch -p1 < ${tardir}/below-patched-crates.patch); \
cargo vendor && \ cargo vendor && \
tar cvzf "${tardir}/${vendor_tarball}" patched-crates/ vendor/) tar cvzf "${tardir}/${vendor_tarball}" patched-crates/ vendor/)
fi fi

Loading…
Cancel
Save