Hello community,
here is the log from the commit of package ripgrep for openSUSE:Factory checked in at 2020-03-31 17:17:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ripgrep (Old)
and /work/SRC/openSUSE:Factory/.ripgrep.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ripgrep"
Tue Mar 31 17:17:31 2020 rev:4 rq:790100 version:11.0.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/ripgrep/ripgrep.changes 2019-11-28 10:14:09.939637194 +0100
+++ /work/SRC/openSUSE:Factory/.ripgrep.new.3160/ripgrep.changes 2020-03-31 17:17:36.587717695 +0200
@@ -1,0 +2,5 @@
+Wed Mar 25 09:24:24 UTC 2020 - Bernhard Wiedemann
+
+- Add ripgrep-11.0.2-reproducible-manpage.patch (boo#1100677)
+
+-------------------------------------------------------------------
New:
----
ripgrep-11.0.2-reproducible-manpage.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ripgrep.spec ++++++
--- /var/tmp/diff_new_pack.cGIhra/_old 2020-03-31 17:17:37.879718515 +0200
+++ /var/tmp/diff_new_pack.cGIhra/_new 2020-03-31 17:17:37.879718515 +0200
@@ -25,6 +25,8 @@
URL: https://github.com/BurntSushi/ripgrep
Source: https://github.com/BurntSushi/ripgrep/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: vendor.tar.xz
+# PATCH-FIX-UPSTREAM https://github.com/BurntSushi/ripgrep/issues/1441
+Patch0: ripgrep-11.0.2-reproducible-manpage.patch
BuildRequires: asciidoc
BuildRequires: cargo
BuildRequires: rust >= 1.31
@@ -66,6 +68,7 @@
%prep
%setup -q
%setup -q -D -T -a 1
+%patch0 -p1
mkdir cargo-home
cat >cargo-home/config <
From 12e41809850a4ac14ed200101ef8b033d2a20c38 Mon Sep 17 00:00:00 2001
From: Andrew Gallant
Date: Sun, 15 Mar 2020 10:06:23 -0400
Subject: [PATCH] doc: remove CPU features from man pages
It doesn't really belong in the man page since it's an artifact of a
build/runtime configuration. Moreover, it inhibits reproducible builds.
Fixes #1441
---
CHANGELOG.md | 2 ++
build.rs | 2 +-
crates/core/app.rs | 42 ++++++++++++++++++++++++------------------
3 files changed, 27 insertions(+), 19 deletions(-)
Index: ripgrep-11.0.2/build.rs
===================================================================
--- ripgrep-11.0.2.orig/build.rs
+++ ripgrep-11.0.2/build.rs
@@ -85,7 +85,7 @@ fn generate_man_page(out
let githash = git_revision_hash();
let githash = githash.as_ref().map(|x| &**x);
- tpl = tpl.replace("{VERSION}", &app::long_version(githash));
+ tpl = tpl.replace("{VERSION}", &app::long_version(githash, false));
File::create(&txt_path)?.write_all(tpl.as_bytes())?;
let result = process::Command::new("a2x")
Index: ripgrep-11.0.2/src/app.rs
===================================================================
--- ripgrep-11.0.2.orig/src/app.rs
+++ ripgrep-11.0.2/src/app.rs
@@ -61,7 +61,7 @@ pub fn app() -> App<'static, 'static> {
// 'static, but we need to build the version string dynamically. We can
// fake the 'static lifetime with lazy_static.
lazy_static! {
- static ref LONG_VERSION: String = long_version(None);
+ static ref LONG_VERSION: String = long_version(None, true);
}
let mut app = App::new("ripgrep")
@@ -86,30 +86,36 @@ pub fn app() -> App<'static, 'static> {
/// If a revision hash is given, then it is used. If one isn't given, then
/// the RIPGREP_BUILD_GIT_HASH env var is inspected for it. If that isn't set,
/// then a revision hash is not included in the version string returned.
-pub fn long_version(revision_hash: Option<&str>) -> String {
+///
+/// If `cpu` is true, then the version string will include the compiled and
+/// runtime CPU features.
+pub fn long_version(revision_hash: Option<&str>, cpu: bool) -> String {
// Do we have a git hash?
// (Yes, if ripgrep was built on a machine with `git` installed.)
let hash = match revision_hash.or(option_env!("RIPGREP_BUILD_GIT_HASH")) {
None => String::new(),
Some(githash) => format!(" (rev {})", githash),
};
- // Put everything together.
- let runtime = runtime_cpu_features();
- if runtime.is_empty() {
- format!(
- "{}{}\n{} (compiled)",
- crate_version!(),
- hash,
- compile_cpu_features().join(" ")
- )
+ if !cpu {
+ format!("{}{}", crate_version!(), hash,)
} else {
- format!(
- "{}{}\n{} (compiled)\n{} (runtime)",
- crate_version!(),
- hash,
- compile_cpu_features().join(" "),
- runtime.join(" ")
- )
+ let runtime = runtime_cpu_features();
+ if runtime.is_empty() {
+ format!(
+ "{}{}\n{} (compiled)",
+ crate_version!(),
+ hash,
+ compile_cpu_features().join(" ")
+ )
+ } else {
+ format!(
+ "{}{}\n{} (compiled)\n{} (runtime)",
+ crate_version!(),
+ hash,
+ compile_cpu_features().join(" "),
+ runtime.join(" ")
+ )
+ }
}
}
Index: ripgrep-11.0.2/CHANGELOG.md
===================================================================
--- ripgrep-11.0.2.orig/CHANGELOG.md
+++ ripgrep-11.0.2/CHANGELOG.md
@@ -11,6 +11,8 @@ Feature enhancements:
Bug fixes:
+* [BUG #1441](https://github.com/BurntSushi/ripgrep/issues/1441):
+ Remove CPU features from man page.
* [BUG #1246](https://github.com/BurntSushi/ripgrep/issues/1246):
Add translations to README, starting with an unofficial Chinese translation.
* [BUG #1259](https://github.com/BurntSushi/ripgrep/issues/1259):