Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pacman: Build with PrettyProgressBar #377

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pacman/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = pacman
pkgdesc = A library-based package manager with dependency support. CachyOS fork.
pkgver = 7.0.0.r3.gf3211df
pkgrel = 1
pkgrel = 3
url = https://www.archlinux.org/pacman/
arch = x86_64
arch = aarch64
Expand Down Expand Up @@ -43,6 +43,8 @@ pkgbase = pacman
source = static_sqlite.patch
source = https://www.sqlite.org/2024/sqlite-src-3460100.zip
source = disable-always-stale.patch
source = https://github.com/CachyOS/pacman/commit/627ff238d90b5194316a7914d2fe11ebcde60db4.patch
source = 78cd453.patch
validpgpkeys = B1B70BB1CD56047DEF31DE2EB62C3D10C54D5DA9
sha256sums = 387ab7db82bca2da0fa565fa35695385f2fd67189e84242098b9a2a48c068a88
sha256sums = bc80e9d0439caddd29b99a69b5060b5589cad2398c23abc5b2b8b990fae6ad8c
Expand All @@ -52,6 +54,8 @@ pkgbase = pacman
sha256sums = bdd8fb13c1cd8606f41347bc1897e261031ac80b33c772d310f417064332f646
sha256sums = def3fc292eb9ecc444f6c1950e5c79d8462ed5e7b3d605fd6152d145e1d5abb4
sha256sums = 11e0078c5ac7cdafa625957a9da982989efe19719e4973cd77f28dc5780dccd9
sha256sums = cf6a780c99dbcd76ac4f2676385f95e57cd10bed8c3a7de2dcb5079f7cd037d9
sha256sums = 843ad07d4a996ad165f20544c5df5b6deec4496ec30daa38b874bf3fa28afa54
source_aarch64 = fix-alpm-crate-for-aarch64.patch
sha256sums_aarch64 = 98af0b680561b4430c0290d461d28a03b7178cce6b62880c7d0803473bfa543c

Expand Down
11 changes: 6 additions & 5 deletions pacman/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ _sqlitever=$(curl -s 'https://archlinux.org/packages/search/json/?name=sqlite' |
if (NF == 4) { printf "%02d", $4 }
else { printf "00" }
}')
pkgrel=2
pkgrel=3
pkgdesc="A library-based package manager with dependency support. CachyOS fork."
arch=('x86_64' 'aarch64')
url="https://www.archlinux.org/pacman/"
Expand Down Expand Up @@ -72,6 +72,7 @@ source=("git+https://github.com/CachyOS/pacman.git#commit=${_commit}?signed"
"https://www.sqlite.org/2024/sqlite-src-${_sqlitever}.zip"
disable-always-stale.patch
https://github.com/CachyOS/pacman/commit/627ff238d90b5194316a7914d2fe11ebcde60db4.patch # updates deps, including alpm crate
78cd453.patch # PrettyProgressBar
)
source_aarch64=(fix-alpm-crate-for-aarch64.patch)
sha256sums=('387ab7db82bca2da0fa565fa35695385f2fd67189e84242098b9a2a48c068a88'
Expand All @@ -82,16 +83,16 @@ sha256sums=('387ab7db82bca2da0fa565fa35695385f2fd67189e84242098b9a2a48c068a88'
'bdd8fb13c1cd8606f41347bc1897e261031ac80b33c772d310f417064332f646'
'def3fc292eb9ecc444f6c1950e5c79d8462ed5e7b3d605fd6152d145e1d5abb4'
'11e0078c5ac7cdafa625957a9da982989efe19719e4973cd77f28dc5780dccd9'
'cf6a780c99dbcd76ac4f2676385f95e57cd10bed8c3a7de2dcb5079f7cd037d9')
'cf6a780c99dbcd76ac4f2676385f95e57cd10bed8c3a7de2dcb5079f7cd037d9'
'843ad07d4a996ad165f20544c5df5b6deec4496ec30daa38b874bf3fa28afa54')
sha256sums_aarch64=('98af0b680561b4430c0290d461d28a03b7178cce6b62880c7d0803473bfa543c')
validpgpkeys=(
'B1B70BB1CD56047DEF31DE2EB62C3D10C54D5DA9' # Vladislav Nepogodin <[email protected]>
)

if $_staging; then
source+=(78cd453.patch)
#if $_staging; then
#source+=(https://raw.githubusercontent.com/vnepogodin/my-patches/develop/pacman/0001-libalpm-parallel-signature-check.patch)
fi
#fi

pkgver() {
cd "$pkgname"
Expand Down
1 change: 1 addition & 0 deletions pacman/pacman.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Architecture = auto
#UseSyslog
#Color
#NoProgressBar
#PrettyProgressBar
CheckSpace
#VerbosePkgLists
ParallelDownloads = 5
Expand Down
19 changes: 19 additions & 0 deletions pacutils/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pkgbase = pacutils
pkgdesc = Helper tools for libalpm
pkgver = 0.14.0
pkgrel = 4
url = https://github.com/andrewgregory/pacutils
arch = x86_64
license = MIT
makedepends = git
makedepends = perl
depends = glibc
depends = libarchive
depends = pacman
source = git+https://github.com/andrewgregory/pacutils.git#commit=20516b5e9ac8cffc88edded6f57c896cd596eba0
source = Add-PrettyProgressBar-config-option.patch
validpgpkeys = 0016846EDD8432261C62CB63DF3891463C352040
sha256sums = 0b8ca94ebfa90f5108740221608709030c324fed5bdc1602007975a5bf63f956
sha256sums = 8b1bc6f26b53f584d94cf323e654942a38a87dc99fc97a715df0e7eb1d92ace4

pkgname = pacutils
73 changes: 73 additions & 0 deletions pacutils/Add-PrettyProgressBar-config-option.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
From 0979284b4f404401a8f083f9713fc5791d76bd9a Mon Sep 17 00:00:00 2001
From: Eric Naim <[email protected]>
Date: Tue, 20 Aug 2024 17:53:00 +0700
Subject: [PATCH] pacconf: Add PrettyProgressBar config option

Signed-off-by: Eric Naim <[email protected]>
---
lib/pacutils/config.c | 5 +++++
lib/pacutils/config.h | 4 ++++
src/pacconf.c | 2 ++
3 files changed, 11 insertions(+)

diff --git a/lib/pacutils/config.c b/lib/pacutils/config.c
index 9b9397a..bb65e0c 100644
--- a/lib/pacutils/config.c
+++ b/lib/pacutils/config.c
@@ -51,6 +51,8 @@ struct _pu_config_setting {
{"VerbosePkgLists", PU_CONFIG_OPTION_VERBOSEPKGLISTS},
{"ILoveCandy", PU_CONFIG_OPTION_ILOVECANDY},

+ {"PrettyProgressBar", PU_CONFIG_OPTION_PRETTYPROGRESSBAR},
+
{"DisableDownloadTimeout", PU_CONFIG_OPTION_DISABLEDOWNLOADTIMEOUT},
{"ParallelDownloads", PU_CONFIG_OPTION_PARALLELDOWNLOADS},

@@ -880,6 +882,9 @@ int pu_config_reader_next(pu_config_reader_t *reader) {
case PU_CONFIG_OPTION_ILOVECANDY:
config->ilovecandy = 1;
break;
+ case PU_CONFIG_OPTION_PRETTYPROGRESSBAR:
+ config->prettyprogressbar = 1;
+ break;
case PU_CONFIG_OPTION_DISABLEDOWNLOADTIMEOUT:
config->disabledownloadtimeout = 1;
break;
diff --git a/lib/pacutils/config.h b/lib/pacutils/config.h
index f842f9d..e3bf813 100644
--- a/lib/pacutils/config.h
+++ b/lib/pacutils/config.h
@@ -43,6 +43,8 @@ typedef enum pu_config_option_t {
PU_CONFIG_OPTION_DISABLEDOWNLOADTIMEOUT,
PU_CONFIG_OPTION_PARALLELDOWNLOADS,

+ PU_CONFIG_OPTION_PRETTYPROGRESSBAR,
+
PU_CONFIG_OPTION_SIGLEVEL,
PU_CONFIG_OPTION_LOCAL_SIGLEVEL,
PU_CONFIG_OPTION_REMOTE_SIGLEVEL,
@@ -93,6 +95,8 @@ typedef struct pu_config_t {
pu_config_bool_t verbosepkglists;
pu_config_bool_t disabledownloadtimeout;

+ pu_config_bool_t prettyprogressbar;
+
int siglevel;
int localfilesiglevel;
int remotefilesiglevel;
diff --git a/src/pacconf.c b/src/pacconf.c
index 7d1e8a7..9fd20fe 100644
--- a/src/pacconf.c
+++ b/src/pacconf.c
@@ -311,6 +311,8 @@ void dump_options(void) {
show_bool("VerbosePkgLists", config->verbosepkglists);
show_bool("ILoveCandy", config->ilovecandy);

+ show_bool("PrettyProgressBar", config->prettyprogressbar);
+
show_int("ParallelDownloads", config->paralleldownloads);

show_cleanmethod("CleanMethod", config->cleanmethod);
--
2.46.0

59 changes: 59 additions & 0 deletions pacutils/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Maintainer: Johannes Löthberg <[email protected]>

pkgname=pacutils
pkgver=0.14.0
pkgrel=4
# from the pacman-7.0.0 branch
_commit=20516b5e9ac8cffc88edded6f57c896cd596eba0
pkgdesc='Helper tools for libalpm'
url='https://github.com/andrewgregory/pacutils'
arch=('x86_64')
license=('MIT')

depends=(
'glibc'
'libarchive'
'pacman'
)
makedepends=('git' 'perl')

source=("git+https://github.com/andrewgregory/pacutils.git#commit=${_commit}"
Add-PrettyProgressBar-config-option.patch)
sha256sums=('0b8ca94ebfa90f5108740221608709030c324fed5bdc1602007975a5bf63f956'
'8b1bc6f26b53f584d94cf323e654942a38a87dc99fc97a715df0e7eb1d92ace4')
validpgpkeys=('0016846EDD8432261C62CB63DF3891463C352040')

prepare() {
cd pacutils

local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
msg2 "Applying patch $src..."
patch -Np1 < "../$src"
done
}

build() {
cd pacutils

export PATH="$PATH:/usr/bin/core_perl/"
make CFLAGS="$CFLAGS $LDFLAGS" SYSCONFDIR=/etc LOCALSTATEDIR=/var
}

check() {
cd pacutils
export PATH="$PATH:/usr/bin/core_perl/"
make check
}

package() {
cd pacutils
export PATH="$PATH:/usr/bin/core_perl/"
make DESTDIR="$pkgdir" PREFIX=/usr install
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/"$pkgname"/COPYING
}

# vim: set ft=PKGBUILD et sw=2: