-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
68a7369
commit d01d749
Showing
3 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
srcpkgs/sequoia-git/patches/0001-write-man-and-completion-artifacts-to-reasonable-dir.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
From de4d124faa3e01d6d58f907eeb31c5942061d853 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= | ||
<[email protected]> | ||
Date: Sat, 9 Dec 2023 15:05:01 +0100 | ||
Subject: [PATCH 1/2] write man and completion artifacts to reasonable | ||
directories | ||
|
||
--- | ||
.gitignore | 2 ++ | ||
build.rs | 19 ++----------------- | ||
2 files changed, 4 insertions(+), 17 deletions(-) | ||
|
||
diff --git a/.gitignore b/.gitignore | ||
index ea8c4bf..dfe6e54 100644 | ||
--- a/.gitignore | ||
+++ b/.gitignore | ||
@@ -1 +1,3 @@ | ||
/target | ||
+/man | ||
+/completions | ||
diff --git a/build.rs b/build.rs | ||
index 1b950a6..a501d3d 100644 | ||
--- a/build.rs | ||
+++ b/build.rs | ||
@@ -49,14 +49,7 @@ fn git_version() { | ||
|
||
fn completions() { | ||
// Generate shell completions | ||
- let outdir = match std::env::var_os("CARGO_TARGET_DIR") { | ||
- None => { | ||
- println!("cargo:warning=Not generating completion files, \ | ||
- environment variable CARGO_TARGET_DIR not set"); | ||
- return; | ||
- } | ||
- Some(outdir) => outdir, | ||
- }; | ||
+ let outdir = PathBuf::from("completions"); | ||
|
||
std::fs::create_dir_all(&outdir).unwrap(); | ||
|
||
@@ -72,15 +65,7 @@ fn completions() { | ||
|
||
fn man_pages() { | ||
// Man page support. | ||
- let outdir = match std::env::var_os("CARGO_TARGET_DIR") { | ||
- None => { | ||
- println!("cargo:warning=Not generating man pages, \ | ||
- environment variable CARGO_TARGET_DIR not set"); | ||
- return; | ||
- } | ||
- Some(outdir) => PathBuf::from(outdir), | ||
- }; | ||
- | ||
+ let outdir = PathBuf::from("man"); | ||
std::fs::create_dir_all(&outdir).unwrap(); | ||
|
||
let cli = cli::Cli::command(); | ||
-- | ||
2.43.0 | ||
|
70 changes: 70 additions & 0 deletions
70
srcpkgs/sequoia-git/patches/0002-downgrade-git2-to-allow-for-older-libgit2-versions.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
From 49c34e60cdea812cc8df11db0f5a397b154a8cee Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= | ||
<[email protected]> | ||
Date: Mon, 11 Dec 2023 10:17:56 +0100 | ||
Subject: [PATCH 2/2] downgrade git2 to allow for older libgit2 versions | ||
|
||
--- | ||
Cargo.lock | 14 +++++++------- | ||
Cargo.toml | 2 +- | ||
2 files changed, 8 insertions(+), 8 deletions(-) | ||
|
||
diff --git a/Cargo.lock b/Cargo.lock | ||
index da54f2e..fa78be6 100644 | ||
--- a/Cargo.lock | ||
+++ b/Cargo.lock | ||
@@ -782,11 +782,11 @@ checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" | ||
|
||
[[package]] | ||
name = "git2" | ||
-version = "0.18.0" | ||
+version = "0.17.2" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
-checksum = "12ef350ba88a33b4d524b1d1c79096c9ade5ef8c59395df0e60d1e1889414c0e" | ||
+checksum = "7b989d6a7ca95a362cf2cfc5ad688b3a467be1f87e480b8dad07fee8c79b0044" | ||
dependencies = [ | ||
- "bitflags 2.4.0", | ||
+ "bitflags 1.3.2", | ||
"libc", | ||
"libgit2-sys", | ||
"log", | ||
@@ -1111,9 +1111,9 @@ checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" | ||
|
||
[[package]] | ||
name = "libgit2-sys" | ||
-version = "0.16.1+1.7.1" | ||
+version = "0.15.2+1.6.4" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
-checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" | ||
+checksum = "a80df2e11fb4a61f4ba2ab42dbe7f74468da143f1a75c74e11dee7c813f694fa" | ||
dependencies = [ | ||
"cc", | ||
"libc", | ||
@@ -2452,9 +2452,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" | ||
|
||
[[package]] | ||
name = "vergen" | ||
-version = "8.2.5" | ||
+version = "8.2.4" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
-checksum = "85e7dc29b3c54a2ea67ef4f953d5ec0c4085035c0ae2d325be1c0d2144bd9f16" | ||
+checksum = "bbc5ad0d9d26b2c49a5ab7da76c3e79d3ee37e7821799f8223fcb8f2f391a2e7" | ||
dependencies = [ | ||
"anyhow", | ||
"git2", | ||
diff --git a/Cargo.toml b/Cargo.toml | ||
index a175848..80aca7c 100644 | ||
--- a/Cargo.toml | ||
+++ b/Cargo.toml | ||
@@ -23,7 +23,7 @@ anyhow = "1" | ||
buffered-reader = "1" | ||
clap = { version = "4.0", features = [ "cargo", "derive", "env", "string", "wrap_help" ] } | ||
dirs = "5" | ||
-git2 = "0.18" | ||
+git2 = "=0.17.2" | ||
once_cell = "1" | ||
toml = "0.8" | ||
serde = { version = "1.0", features = ["derive"] } | ||
-- | ||
2.43.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Template file for 'sequoia-git' | ||
pkgname=sequoia-git | ||
version=0.1.0 | ||
revision=1 | ||
build_style=cargo | ||
build_helper=qemu | ||
_deps="nettle-devel openssl-devel sqlite-devel libgit2-devel bzip2-devel" | ||
hostmakedepends="pkg-config llvm clang ${_deps}" | ||
makedepends="${_deps}" | ||
checkdepends="git gnupg" | ||
short_desc="Tool to verify git commit signatures based on a policy" | ||
maintainer="Jan Christian Grünhage <[email protected]>" | ||
license="LGPL-2.0-or-later" | ||
homepage="https://gitlab.com/sequoia-pgp/sequoia-git" | ||
distfiles="https://gitlab.com/sequoia-pgp/sequoia-git/-/archive/v${version}/sequoia-git-v${version}.tar.gz" | ||
checksum=c1f7d2647538f3335dab8862a9c4b78bac8c41bb22a3917ec45989849fd035dd | ||
|
||
post_install() { | ||
for page in man/*; do | ||
vman ${page} | ||
done | ||
vcompletion completions/sq-git.bash bash | ||
vcompletion completions/sq-git.fish fish | ||
vcompletion completions/_sq-git zsh | ||
} |