Skip to content

Commit

Permalink
*/*: rebuild for libgit2
Browse files Browse the repository at this point in the history
  • Loading branch information
q66 committed Jan 19, 2025
1 parent 02af7bd commit cfd2e7a
Show file tree
Hide file tree
Showing 49 changed files with 1,032 additions and 225 deletions.
66 changes: 66 additions & 0 deletions main/cargo-c/patches/libgit2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
diff --git a/Cargo.lock b/Cargo.lock
index 75adb6c..6d3ad35 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -961,9 +961,9 @@ dependencies = [

[[package]]
name = "git2"
-version = "0.19.0"
+version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724"
+checksum = "3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff"
dependencies = [
"bitflags",
"libc",
@@ -976,9 +976,9 @@ dependencies = [

[[package]]
name = "git2-curl"
-version = "0.20.0"
+version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68ff14527a1c242320039b138376f8e0786697a1b7b172bc44f6efda3ab9079f"
+checksum = "be8dcabbc09ece4d30a9aa983d5804203b7e2f8054a171f792deff59b56d31fa"
dependencies = [
"curl",
"git2",
@@ -2169,9 +2169,9 @@ dependencies = [

[[package]]
name = "libgit2-sys"
-version = "0.17.0+1.8.1"
+version = "0.18.0+1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224"
+checksum = "e1a117465e7e1597e8febea8bb0c410f1c7fb93b1e1cddf34363f8390367ffec"
dependencies = [
"cc",
"libc",
diff --git a/vendor/cargo/Cargo.toml b/vendor/cargo/Cargo.toml
index 8eac87d..9aaf673 100644
--- a/vendor/cargo/Cargo.toml
+++ b/vendor/cargo/Cargo.toml
@@ -110,10 +110,10 @@ features = ["zlib"]
default-features = false

[dependencies.git2]
-version = "0.19.0"
+version = "0.20.0"

[dependencies.git2-curl]
-version = "0.20.0"
+version = "0.21.0"

[dependencies.gix]
version = "0.67.0"
@@ -163,7 +163,7 @@ version = "0.1.32"
version = "1.3.0"

[dependencies.libgit2-sys]
-version = "0.17.0"
+version = "0.18.0"

[dependencies.memchr]
version = "2.7.4"
41 changes: 40 additions & 1 deletion main/cargo-c/template.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgname = "cargo-c"
pkgver = "0.10.8"
pkgrel = 0
pkgrel = 1
build_style = "cargo"
# no tests in others
make_check_args = ["--lib"]
Expand All @@ -21,10 +21,13 @@
url = "https://github.com/lu-zero/cargo-c"
source = [
f"{url}/archive/refs/tags/v{pkgver}.tar.gz",
"https://github.com/rust-lang/git2-rs/archive/refs/tags/git2-0.20.0.tar.gz",
f"!{url}/releases/download/v{pkgver}/Cargo.lock>Cargo.lock.{pkgver}",
]
source_paths = [".", "git2", "."]
sha256 = [
"2c7bfff50e9c11801c92280f34f7d308857652b0c3875d0fd0906167623414ac",
"d4b8b2b2526944d6cb75ecf8bcc2c1757fc1fa6deef94b6d32410b1f84f38d1b",
"f3c1e2e8fb2e78fac3a84f32c83fd68c69e6761c622bb948ddd1be194e03c57d",
]
# mfs be like rebuild literally everything and then run
Expand All @@ -36,5 +39,41 @@ def post_extract(self):
self.cp(self.sources_path / f"Cargo.lock.{pkgver}", "Cargo.lock")


def post_prepare(self):
from cbuild.util import cargo

# nuke lockfiles that may still hold the old ver
self.rm("vendor/cargo/Cargo.lock")
self.rm("vendor/gix/Cargo.lock")

cargo.clear_vendor_checksums(self, "cargo")
cargo.clear_vendor_checksums(self, "gix")

self.mv("git2/libgit2-sys", ".")
self.mv("git2/git2-curl", ".")

# nuke the old git2 stuff and replace with new
for crt in ["libgit2-sys", "git2-curl", "git2"]:
self.rm(f"vendor/{crt}", recursive=True)
self.mv(crt, "vendor")

# write updated checksums from lockfile
cargo.write_vendor_checksum(
self,
"libgit2-sys",
"e1a117465e7e1597e8febea8bb0c410f1c7fb93b1e1cddf34363f8390367ffec",
)
cargo.write_vendor_checksum(
self,
"git2-curl",
"be8dcabbc09ece4d30a9aa983d5804203b7e2f8054a171f792deff59b56d31fa",
)
cargo.write_vendor_checksum(
self,
"git2",
"3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff",
)


def post_install(self):
self.install_license("LICENSE")
64 changes: 64 additions & 0 deletions main/cargo/patches/lol2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
diff --git a/Cargo.lock b/Cargo.lock
index 14dcf1b..0636df5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1133,9 +1133,9 @@ dependencies = [

[[package]]
name = "git2"
-version = "0.19.0"
+version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724"
+checksum = "3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff"
dependencies = [
"bitflags 2.6.0",
"libc",
@@ -1148,9 +1148,9 @@ dependencies = [

[[package]]
name = "git2-curl"
-version = "0.20.0"
+version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68ff14527a1c242320039b138376f8e0786697a1b7b172bc44f6efda3ab9079f"
+checksum = "be8dcabbc09ece4d30a9aa983d5804203b7e2f8054a171f792deff59b56d31fa"
dependencies = [
"curl",
"git2",
@@ -2267,9 +2267,9 @@ dependencies = [

[[package]]
name = "libgit2-sys"
-version = "0.17.0+1.8.1"
+version = "0.18.0+1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224"
+checksum = "e1a117465e7e1597e8febea8bb0c410f1c7fb93b1e1cddf34363f8390367ffec"
dependencies = [
"cc",
"libc",
diff --git a/Cargo.toml b/Cargo.toml
index 3018282..0adacf4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -47,8 +47,8 @@ curl = "0.4.46"
curl-sys = "0.4.73"
filetime = "0.2.23"
flate2 = { version = "1.0.30", default-features = false, features = ["zlib"] }
-git2 = "0.19.0"
-git2-curl = "0.20.0"
+git2 = "0.20.0"
+git2-curl = "0.21.0"
gix = { version = "0.67.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk"] }
glob = "0.3.1"
handlebars = { version = "6.0.0", features = ["dir_source"] }
@@ -64,7 +64,7 @@ itertools = "0.13.0"
jobserver = "0.1.32"
lazycell = "1.3.0"
libc = "0.2.155"
-libgit2-sys = "0.17.0"
+libgit2-sys = "0.18.0"
libloading = "0.8.5"
memchr = "2.6.0"
miow = "0.6.0"
2 changes: 1 addition & 1 deletion main/cargo/template.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgname = "cargo"
pkgver = "1.84.0"
_cargover = f"0.{int(pkgver[2:4]) + 1}.{pkgver[5:]}"
pkgrel = 0
pkgrel = 1
build_style = "cargo"
# PKG_CONFIG being in environment mysteriously brings target sysroot
# into linker sequence for build script, breaking build entirely
Expand Down
60 changes: 60 additions & 0 deletions main/delta/patches/e3e9222175a8ff6c9228d8ebb996331e02d49c02.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
From e3e9222175a8ff6c9228d8ebb996331e02d49c02 Mon Sep 17 00:00:00 2001
From: Rui Chen <[email protected]>
Date: Sat, 21 Dec 2024 21:23:22 -0500
Subject: [PATCH] chore(deps): update git2 to 0.20.0

Signed-off-by: Rui Chen <[email protected]>
---
Cargo.lock | 10 +++++-----
Cargo.toml | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 1565342cc..051cdbad1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-version = 3
+version = 4

[[package]]
name = "adler"
@@ -638,9 +638,9 @@ dependencies = [

[[package]]
name = "git2"
-version = "0.18.2"
+version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b3ba52851e73b46a4c3df1d89343741112003f0f6f13beb0dfac9e457c3fdcd"
+checksum = "3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff"
dependencies = [
"bitflags 2.4.1",
"libc",
@@ -806,9 +806,9 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"

[[package]]
name = "libgit2-sys"
-version = "0.16.2+1.7.2"
+version = "0.18.0+1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8"
+checksum = "e1a117465e7e1597e8febea8bb0c410f1c7fb93b1e1cddf34363f8390367ffec"
dependencies = [
"cc",
"libc",
diff --git a/Cargo.toml b/Cargo.toml
index 6401aaf21..28982ff14 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -39,7 +39,7 @@ clap = { version = "4.3.14", features = [
console = "0.15.0"
ctrlc = "3.2.5"
dirs = "5.0.1"
-git2 = { version = "0.18.2", default-features = false, features = [] }
+git2 = { version = "0.20.0", default-features = false, features = [] }
grep-cli = "0.1.8"
itertools = "0.10.5"
lazy_static = "1.4"
41 changes: 0 additions & 41 deletions main/delta/patches/git2.patch

This file was deleted.

2 changes: 1 addition & 1 deletion main/delta/template.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgname = "delta"
pkgver = "0.18.2"
pkgrel = 0
pkgrel = 1
build_style = "cargo"
prepare_after_patch = True
hostmakedepends = ["cargo-auditable", "pkgconf"]
Expand Down
2 changes: 1 addition & 1 deletion main/geany-plugins/template.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgname = "geany-plugins"
pkgver = "2.0.0"
pkgrel = 4
pkgrel = 5
build_style = "gnu_configure"
configure_args = [
"--enable-all-plugins",
Expand Down
4 changes: 2 additions & 2 deletions main/git-absorb/template.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pkgname = "git-absorb"
pkgver = "0.6.16"
pkgver = "0.6.17"
pkgrel = 0
build_style = "cargo"
hostmakedepends = ["asciidoc", "cargo-auditable", "pkgconf"]
Expand All @@ -9,7 +9,7 @@
license = "BSD-3-Clause"
url = "https://github.com/tummychow/git-absorb"
source = f"{url}/archive/refs/tags/{pkgver}.tar.gz"
sha256 = "d0fac448801674a4d4d5d42d6ef2d2e21545ad66755023c531a273a47893a573"
sha256 = "512ef2bf0e642f8c34eb56aad657413bd9e04595e3bc4650ecf1c0799f148ca4"
# generates completions with host bin
options = ["!cross"]

Expand Down
Loading

0 comments on commit cfd2e7a

Please sign in to comment.