Update to 1.5.0
- Drop rust-cradle dependency - Exclude unwanted files Incorrect shebang in %{crate_instdir}/justfile was causing a broken dependency on the devel subpackage. Excluding the file fixed that.
This commit is contained in:
parent
e0b4e9dfbe
commit
98d290b726
4
.gitignore
vendored
4
.gitignore
vendored
@ -1 +1,3 @@
|
|||||||
/just-0.9.8.crate
|
/*.src.rpm
|
||||||
|
/results_*/
|
||||||
|
/just-1.5.0.crate
|
||||||
|
69
just-1.5.0-no-cradle.patch
Normal file
69
just-1.5.0-no-cradle.patch
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
diff --git a/tests/choose.rs b/tests/choose.rs
|
||||||
|
index 6444f2a..a81e124 100644
|
||||||
|
--- a/tests/choose.rs
|
||||||
|
+++ b/tests/choose.rs
|
||||||
|
@@ -140,7 +140,13 @@ fn status_error() {
|
||||||
|
"exit-2": "#!/usr/bin/env bash\nexit 2\n",
|
||||||
|
};
|
||||||
|
|
||||||
|
- ("chmod", "+x", tmp.path().join("exit-2")).run();
|
||||||
|
+ let output = Command::new("chmod")
|
||||||
|
+ .arg("+x")
|
||||||
|
+ .arg(tmp.path().join("exit-2"))
|
||||||
|
+ .output()
|
||||||
|
+ .unwrap();
|
||||||
|
+
|
||||||
|
+ assert!(output.status.success());
|
||||||
|
|
||||||
|
let path = env::join_paths(
|
||||||
|
iter::once(tmp.path().to_owned()).chain(env::split_paths(&env::var_os("PATH").unwrap())),
|
||||||
|
diff --git a/tests/edit.rs b/tests/edit.rs
|
||||||
|
index c7d72c7..40c82c2 100644
|
||||||
|
--- a/tests/edit.rs
|
||||||
|
+++ b/tests/edit.rs
|
||||||
|
@@ -64,7 +64,13 @@ fn status_error() {
|
||||||
|
"exit-2": "#!/usr/bin/env bash\nexit 2\n",
|
||||||
|
};
|
||||||
|
|
||||||
|
- ("chmod", "+x", tmp.path().join("exit-2")).run();
|
||||||
|
+ let output = Command::new("chmod")
|
||||||
|
+ .arg("+x")
|
||||||
|
+ .arg(tmp.path().join("exit-2"))
|
||||||
|
+ .output()
|
||||||
|
+ .unwrap();
|
||||||
|
+
|
||||||
|
+ assert!(output.status.success());
|
||||||
|
|
||||||
|
let path = env::join_paths(
|
||||||
|
iter::once(tmp.path().to_owned()).chain(env::split_paths(&env::var_os("PATH").unwrap())),
|
||||||
|
diff --git a/tests/fmt.rs b/tests/fmt.rs
|
||||||
|
index e4c4687..ccf7f5d 100644
|
||||||
|
--- a/tests/fmt.rs
|
||||||
|
+++ b/tests/fmt.rs
|
||||||
|
@@ -107,7 +107,13 @@ fn write_error() {
|
||||||
|
|
||||||
|
let justfile_path = test.justfile_path();
|
||||||
|
|
||||||
|
- ("chmod", "400", &justfile_path).run();
|
||||||
|
+ let output = Command::new("chmod")
|
||||||
|
+ .arg("400")
|
||||||
|
+ .arg(&justfile_path)
|
||||||
|
+ .output()
|
||||||
|
+ .unwrap();
|
||||||
|
+
|
||||||
|
+ assert!(output.status.success());
|
||||||
|
|
||||||
|
let _tempdir = test.run();
|
||||||
|
|
||||||
|
diff --git a/tests/lib.rs b/tests/lib.rs
|
||||||
|
index 9867e3d..2f47d90 100644
|
||||||
|
--- a/tests/lib.rs
|
||||||
|
+++ b/tests/lib.rs
|
||||||
|
@@ -2,7 +2,6 @@ pub(crate) use {
|
||||||
|
crate::{
|
||||||
|
assert_stdout::assert_stdout, assert_success::assert_success, tempdir::tempdir, test::Test,
|
||||||
|
},
|
||||||
|
- cradle::input::Input,
|
||||||
|
executable_path::executable_path,
|
||||||
|
just::unindent,
|
||||||
|
libc::{EXIT_FAILURE, EXIT_SUCCESS},
|
28
just-fix-metadata.diff
Normal file
28
just-fix-metadata.diff
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
--- just-1.5.0/Cargo.toml 1970-01-01T00:00:01+00:00
|
||||||
|
+++ just-1.5.0/Cargo.toml 2022-09-30T00:37:34.996094+00:00
|
||||||
|
@@ -15,9 +15,15 @@
|
||||||
|
version = "1.5.0"
|
||||||
|
authors = ["Casey Rodarmor <casey@rodarmor.com>"]
|
||||||
|
exclude = [
|
||||||
|
+ "/Vagrantfile",
|
||||||
|
+ "/bin",
|
||||||
|
"/book",
|
||||||
|
+ "/completions",
|
||||||
|
+ "/extras",
|
||||||
|
"/icon.png",
|
||||||
|
+ "/justfile",
|
||||||
|
"/screenshot.png",
|
||||||
|
+ "/snapcraft.yaml",
|
||||||
|
"/www",
|
||||||
|
]
|
||||||
|
autotests = false
|
||||||
|
@@ -133,9 +139,6 @@
|
||||||
|
version = "1.0.0"
|
||||||
|
features = ["v4"]
|
||||||
|
|
||||||
|
-[dev-dependencies.cradle]
|
||||||
|
-version = "0.2.0"
|
||||||
|
-
|
||||||
|
[dev-dependencies.executable-path]
|
||||||
|
version = "1.0.0"
|
||||||
|
|
@ -1,31 +1,32 @@
|
|||||||
# Generated by rust2rpm 17
|
# Generated by rust2rpm 22
|
||||||
%bcond_without check
|
%bcond_without check
|
||||||
|
|
||||||
%global crate just
|
%global crate just
|
||||||
|
|
||||||
Name: rust-%{crate}
|
Name: rust-just
|
||||||
Version: 0.9.8
|
Version: 1.5.0
|
||||||
Release: %autorelease
|
Release: %autorelease
|
||||||
Summary: A command runner
|
Summary: Just a command runner
|
||||||
|
|
||||||
# Upstream license specification: CC0-1.0
|
License: CC0-1.0
|
||||||
License: CC0
|
|
||||||
URL: https://crates.io/crates/just
|
URL: https://crates.io/crates/just
|
||||||
Source: %{crates_source}
|
Source: %{crates_source}
|
||||||
|
# Initial patched metadata
|
||||||
|
# - Exclude unwanted files
|
||||||
|
# - Drop cradle dependency, the crate cannot be packaged due to CC0 license
|
||||||
|
Patch0: just-fix-metadata.diff
|
||||||
|
# Remove all uses of cradle
|
||||||
|
Patch1: just-1.5.0-no-cradle.patch
|
||||||
|
|
||||||
ExclusiveArch: %{rust_arches}
|
ExclusiveArch: %{rust_arches}
|
||||||
%if %{__cargo_skip_build}
|
|
||||||
BuildArch: noarch
|
|
||||||
%endif
|
|
||||||
|
|
||||||
BuildRequires: rust-packaging
|
BuildRequires: rust-packaging >= 21
|
||||||
|
|
||||||
%global _description %{expand:
|
%global _description %{expand:
|
||||||
just is a handy way to save and run project-specific commands.}
|
just is a handy way to save and run project-specific commands.}
|
||||||
|
|
||||||
%description %{_description}
|
%description %{_description}
|
||||||
|
|
||||||
%if ! %{__cargo_skip_build}
|
|
||||||
%package -n %{crate}
|
%package -n %{crate}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
|
|
||||||
@ -33,14 +34,17 @@ Summary: %{summary}
|
|||||||
|
|
||||||
%files -n %{crate}
|
%files -n %{crate}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.adoc examples
|
%doc CHANGELOG.md
|
||||||
%doc GRAMMAR.md CHANGELOG.md CONTRIBUTING.md
|
%doc CONTRIBUTING.md
|
||||||
|
%doc GRAMMAR.md
|
||||||
|
%doc README.md
|
||||||
|
%doc README.中文.md
|
||||||
|
%doc crates-io-readme.md
|
||||||
%{_bindir}/just
|
%{_bindir}/just
|
||||||
%{_mandir}/man1/just.1*
|
%{_mandir}/man1/just.1*
|
||||||
%{_datadir}/bash-completion
|
%{_datadir}/bash-completion
|
||||||
%{_datadir}/fish/
|
%{_datadir}/fish/
|
||||||
%{_datadir}/zsh/site-functions
|
%{_datadir}/zsh/site-functions
|
||||||
%endif
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
@ -48,14 +52,18 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%description devel %{_description}
|
%description devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "%{crate}" crate.
|
use the "%{crate}" crate.
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%license LICENSE
|
%license %{crate_instdir}/LICENSE
|
||||||
%doc crates-io-readme.md
|
%doc %{crate_instdir}/CHANGELOG.md
|
||||||
%doc GRAMMAR.md CHANGELOG.md CONTRIBUTING.md
|
%doc %{crate_instdir}/CONTRIBUTING.md
|
||||||
%{cargo_registry}/%{crate}-%{version_no_tilde}/
|
%doc %{crate_instdir}/GRAMMAR.md
|
||||||
|
%doc %{crate_instdir}/README.md
|
||||||
|
%doc %{crate_instdir}/README.中文.md
|
||||||
|
%doc %{crate_instdir}/crates-io-readme.md
|
||||||
|
%{crate_instdir}/
|
||||||
|
|
||||||
%package -n %{name}+default-devel
|
%package -n %{name}+default-devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
@ -63,11 +71,23 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%description -n %{name}+default-devel %{_description}
|
%description -n %{name}+default-devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "default" feature of "%{crate}" crate.
|
use the "default" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
%files -n %{name}+default-devel
|
%files -n %{name}+default-devel
|
||||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
|
%package -n %{name}+help4help2man-devel
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n %{name}+help4help2man-devel %{_description}
|
||||||
|
|
||||||
|
This package contains library source intended for building other packages which
|
||||||
|
use the "help4help2man" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
|
%files -n %{name}+help4help2man-devel
|
||||||
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (just-0.9.8.crate) = 46cb9da586f9b226d3632cb102dd3033778630b0501b65e27a8286dc0d8cd8862b4f2be0e2c43a1722c89a889519c885cd9057d3d73758cf7e68a977d9bb4505
|
SHA512 (just-1.5.0.crate) = 500b75bf4d7f2958ff98173de40f8930b98291da09fef1e142606b41b65f73190cb7873e58181f2e0efee20b61fafd55c48a4df88d82e180100186109a18e8c2
|
||||||
|
Loading…
Reference in New Issue
Block a user