Skip to content

Commit

Permalink
[arch-audit] update, not build on aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
kikadf committed Sep 21, 2024
1 parent c0cd4b1 commit b0fb4a8
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 251 deletions.
4 changes: 4 additions & 0 deletions makepkg/arch-audit/.nvchecker.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[arch-audit]
source = "git"
git = "https://gitlab.archlinux.org/archlinux/arch-audit.git"
prefix = "v"
201 changes: 0 additions & 201 deletions makepkg/arch-audit/0001-Update-to-alpm-v3.patch

This file was deleted.

28 changes: 0 additions & 28 deletions makepkg/arch-audit/0002-update-quote.patch

This file was deleted.

54 changes: 32 additions & 22 deletions makepkg/arch-audit/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,54 @@
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=arch-audit
pkgver=0.1.20
pkgrel=2.1
pkgver=0.2.0
pkgrel=2
pkgdesc='A utility like pkg-audit based on Arch Security Team data'
url='https://gitlab.com/ilpianista/arch-audit'
depends=('glibc' 'gcc-libs' 'curl' 'libalpm.so')
makedepends=('cargo' 'pkg-config' 'scdoc' 'rust-bindgen')
url='https://gitlab.archlinux.org/archlinux/arch-audit'
depends=(
'ca-certificates'
'gcc-libs'
'glibc'
'pacman' 'libalpm.so'
)
makedepends=(
'cargo'
'pkg-config'
'scdoc'
)
arch=('x86_64' 'aarch64')
license=('MIT')
backup=('etc/arch-audit/settings.toml')
source=("https://gitlab.com/ilpianista/arch-audit/-/archive/${pkgver}/arch-audit-${pkgver}.tar.gz"
"0001-Update-to-alpm-v3.patch"
"0002-update-quote.patch")
sha512sums=('e0bdd5adb3c44677d39c8e618c8c8f666f1e2caaead82fc666468c46b296cb4d15584939715995bc6d3d8f996bd3127478bc6008dbdef677fee80063f2bc059e'
'SKIP'
'SKIP')
b2sums=('02ba56f1b4780da7e006ac25736afb6e0474502cc7d645b2eb48650c6d71878b1de349b9a072f2cd1d013254f68d79786d9195c98c520407e256e6fa9b63f2e4'
'SKIP'
'SKIP')
source=(https://gitlab.archlinux.org/archlinux/arch-audit/-/archive/v${pkgver}/arch-audit-v${pkgver}.tar.gz
hook-depends.patch
pacman-7.patch)
sha512sums=('353d220ffd553e42d3cfc9533eb5d904979d563871f4d7f24daf883f57f055861ff03b95dc89a0f3d8dc8772f793c929e3844bc03fa4be0522a2825811b4d9a3'
'd1a5baefe57adca4e303c8abc2de9c4d146e9783d45e6c662867ccf90ddef6b041df8c5f067aa95e9a4d4f7efa59ea43fdf903d6edcc16b7e95a0bbd33bd596c'
'3dcb15f11ccad840c1def14d07e696ef2662eca3505039b361dc42cc15332a3cf3178e04b91860f782619c80d4330c61e217f33e908649b15deca109ce0ac437')
b2sums=('0ad3ffbc1afdec3455c2d544b3d50d4a8852332141ca2b10601e01352e29ba96132362f793c75b397926c8582c3611661607b0637fb75132d6c181c5782a6f0e'
'3b0616eb618dc62696cab13a996086117fe11d21eab0628e7d95972b9f6987ded4a6ba53be20ae0953fdb2abd4dea356563c203b7493416dac85e65154aad6c1'
'015a7cc9967df2a84bca53895f0406a6f5936afdce4d8abe1079ed4bd83fdbe94c97be4bcdcf3b08311a9bec130bc9381ea85e739ab896e75ec9fd7d99149127')
options=(!lto)

prepare() {
cd "${pkgname}-${pkgver}"
patch -Np1 < "../0001-Update-to-alpm-v3.patch"
patch -Np1 < "../0002-update-quote.patch"
cd "${pkgname}-v${pkgver}"
patch -Np1 -i "../hook-depends.patch"
patch -Np1 -i "../pacman-7.patch"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
cd "${pkgname}-${pkgver}"
cargo build --release --locked
cd "${pkgname}-v${pkgver}"
cargo build --frozen --features generate --release
}

check() {
cd "${pkgname}-${pkgver}"
cargo test --release --locked
cd "${pkgname}-v${pkgver}"
cargo test --frozen --release
}

package() {
cd "${pkgname}-${pkgver}"
cd "${pkgname}-v${pkgver}"

make DESTDIR="${pkgdir}" PREFIX=/usr install

Expand Down
14 changes: 14 additions & 0 deletions makepkg/arch-audit/hook-depends.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/contrib/hooks/arch-audit.hook b/contrib/hooks/arch-audit.hook
index f3a9a68..526abb0 100644
--- a/contrib/hooks/arch-audit.hook
+++ b/contrib/hooks/arch-audit.hook
@@ -5,8 +5,7 @@ Type = Package
Target = *

[Action]
-Depends = curl
-Depends = openssl
+Depends = ca-certificates
Depends = arch-audit
When = PostTransaction
Exec = /usr/bin/arch-audit --color always
41 changes: 41 additions & 0 deletions makepkg/arch-audit/pacman-7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
diff --git a/Cargo.lock b/Cargo.lock
index 345dee0..840a4d9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -43,9 +43,9 @@ dependencies = [

[[package]]
name = "alpm"
-version = "3.0.5"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "310ec5dc25b236ee96bebf975af2d2de85e61001a7c39a0a7436a414ff3f6490"
+checksum = "d07c43bf396280fdda8928f725a89cdb8c525bba0240494f5da6b40aafe61387"
dependencies = [
"alpm-sys",
"bitflags",
@@ -53,9 +53,9 @@ dependencies = [

[[package]]
name = "alpm-sys"
-version = "3.0.0"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08a17e0cf15a06d4b86e30c606ee8808ad791300f3bd5e364c30360354b010bd"
+checksum = "ad5eb56a41bf4f036c600aa1ddff354971926dd8ea29a3fb6589c6c375bf918b"
dependencies = [
"pkg-config",
]
diff --git a/Cargo.toml b/Cargo.toml
index f410ed6..f495fca 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,7 +14,7 @@ edition = "2021"
name = "arch-audit"

[dependencies]
-alpm = "^3.0"
+alpm = "4"
anyhow = "^1.0"
reqwest = { version = "^0.12", default-features = false, features = ["rustls-tls-native-roots", "socks", "gzip", "brotli"] }
tokio = { version = "^1", features = ["macros", "rt-multi-thread"] }

0 comments on commit b0fb4a8

Please sign in to comment.