Package Details: hledger-bin 1.42-1

Git Clone URL: https://aur.archlinux.org/hledger-bin.git (read-only, click to copy)
Package Base: hledger-bin
Description: Command-line interface for the hledger accounting system
Upstream URL: http://hledger.org
Keywords: hledger ledger
Licenses: GPL-3.0-or-later
Conflicts: hledger
Provides: hledger
Submitter: ccat3z
Maintainer: gesh
Last Packager: gesh
Votes: 9
Popularity: 1.39
First Submitted: 2020-08-22 05:39 (UTC)
Last Updated: 2025-03-09 14:38 (UTC)

Dependencies (1)

Required by (3)

Sources (1)

Latest Comments

1 2 3 4 5 Next › Last »

gesh commented on 2025-03-09 14:39 (UTC)

Package updated, thanks @solipsist for the reminder!

gesh commented on 2025-02-23 15:42 (UTC)

At a guess, the problem is pacman notices it has local files named after the manual pages and tries to use them, instead of redownloading and checking against checksums.

Will push a fix giving the manpage files version-unique names to avoid this later tonight. Hopefully, once https://github.com/simonmichael/hledger/issues/2309 is fixed this can be entirely ignored.

As a sanity check, I too am seeing this breakage -- the sha256sums I have for the 1.40 manpages here are

cb37c183da683bd6031c881272998f994a60ead08b25e61c4698d6cbc3269968  /home/gesh/.local/var/cache/pacman/sources/hledger.1
7a789e1a2b82f0e250efb5ec0d1b630a6053cabb2912bccddee7f65fc08fe992  /home/gesh/.local/var/cache/pacman/sources/hledger-ui.1
cfd949b03ce0a0ce20d7ab1e99173456465d02716cc3ad472a4be7bc2e31d325  /home/gesh/.local/var/cache/pacman/sources/hledger-web.1

and checking against the hledger git repo, the files in pacman's cache are indeed the manuals as of 1.40 whereas the ones at the url I'm pointing to are the manuals as of 1.41

norgus commented on 2025-02-22 08:54 (UTC) (edited on 2025-02-22 08:56 (UTC) by norgus)

I think some checksums failed when I tried to update.

==> Making package: hledger-bin 1.41-1 (Sat 22 Feb 2025 08:41:35 GMT)
==> Retrieving sources...
-> Found hledger-1.41.tar.zip
-> Found hledger.1
-> Found hledger-ui.1
-> Found hledger-web.1
==> Validating source files with sha256sums...
hledger-1.41.tar.zip ... Passed
hledger.1 ... FAILED
hledger-ui.1 ... FAILED
hledger-web.1 ... FAILED
==> ERROR: One or more files did not pass the validity check!

gesh commented on 2025-01-19 14:08 (UTC)

@alerque Done, though I'm a little confused as to how you're using this?

Also, this feels like something a clever enough pacman should be able to do itself, I've raised this upstream: https://gitlab.archlinux.org/pacman/pacman/-/issues/225

alerque commented on 2025-01-17 12:55 (UTC)

Would you mind fixing the provide declarations (in 3 places of course) with version specs:

- provides=(hledger)
+ provides=("hledger=$pkgver")

This will make builds of this package easier to manage as project dependencies so it can resolve whether to prefer the (frequently OOD) official hledger package or this one. Thanks.

gesh commented on 2025-01-14 18:11 (UTC)

@zibolo That's odd -- I'm guessing I mistakenly ldd'd hledger-git, which yielded these false positives. Checking the archives, I can confirm what you're saying, and indeed dropping all depends lines yields a seemingly-working binary even when building in a clean chroot.

Indeed, checking upstream, the release is built against musl in an Alpine Linux container. Thanks for pointing it out, I'll be using upstream's config to fix my -static packages.

zibolo commented on 2025-01-12 20:26 (UTC)

Hello @gesh! I'm not an expert and I'm curious how did you determine gmp and ncurses dependencies.

By downloading the latest (1.41) prebuilt binaries, all executables seems to be "fully" statically linked, indeed ldd hledger* returns "not a dynamic executable".

file says hledger: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked [...].

dude commented on 2025-01-10 13:33 (UTC) (edited on 2025-01-10 13:34 (UTC) by dude)

Thanks! I might not have time to review your changes for another few days, so I'm going to add you as a co-maintainer if that's okay. That way you can make changes to it as you see fit, without having to wait on me (I think that's how it works).

gesh commented on 2025-01-09 19:31 (UTC) (edited on 2025-01-09 19:43 (UTC) by gesh)

For some reason I thought I'd posted the patch, apologies. Checking with ldd, it seems that zlib and ncurses are indeed necessary, though ncurses5 isn't (that's due to an older version of the dependencies). Looking at the dependency tree, zlib is a transitive dependency of hledger-web (via its use of yesod), but not of either of the others. EDIT: Double-checking shows that everyone depends on ncurses for some reason, fixed the patch)

The patch (I omitted that on my local system, I removed the tabs, replaced the quotes for pkgdesc by single quotes, and most controversially extracted the common package() instructions into a separate function): (note the depends+=() line is not optional if you want hledger to have the correct dependencies in .SRCINFO)

diff --git a/PKGBUILD b/PKGBUILD
index 4c6d661..d6caa86 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,56 +1,52 @@
 # Maintainer: dude <brrtsm@gmail.com>

-pkgver=1.40
+pkgver=1.41
 pkgname=(hledger-bin hledger-ui-bin hledger-web-bin)
-pkgrel=5
+pkgrel=1
 pkgdesc="Easy-to-use command-line/curses/web plaintext accounting tool"
 arch=(x86_64)
 url="http://hledger.org"
-license=('GPL')
-depends=('gmp' 'ncurses5-compat-libs')
-makedepends=('coreutils')
+license=('GPL-3.0-or-later')
+depends=('gmp' 'ncurses')
 optdepends=('asciinema: hledger demo support')
 source=(
-    hledger-${pkgver}.tar.gz::https://github.com/simonmichael/hledger/releases/download/${pkgver}/hledger-linux-x64.tar.gz
-    https://raw.githubusercontent.com/simonmichael/hledger/hledger-${pkgver}/hledger/shell-completion/hledger-completion.bash
+    hledger-${pkgver}.tar.zip::https://github.com/simonmichael/hledger/releases/download/${pkgver}/hledger-linux-x64.zip
     https://raw.githubusercontent.com/simonmichael/hledger/hledger-${pkgver}/hledger/hledger.1
     https://raw.githubusercontent.com/simonmichael/hledger/hledger-${pkgver}/hledger-ui/hledger-ui.1
     https://raw.githubusercontent.com/simonmichael/hledger/hledger-${pkgver}/hledger-web/hledger-web.1
 )
-sha256sums=(
-    8f41679941ee6e68d77b9a6f9c0d155d9e6e27265da297f92d0a5bcf5658679e
-    662abb7f39b9582315a6d014012fdff56664e8cf6b2665f1d96ae3285930d4ce
-    cb37c183da683bd6031c881272998f994a60ead08b25e61c4698d6cbc3269968
-    7a789e1a2b82f0e250efb5ec0d1b630a6053cabb2912bccddee7f65fc08fe992
-    cfd949b03ce0a0ce20d7ab1e99173456465d02716cc3ad472a4be7bc2e31d325
-)
+sha256sums=('97b28749dbd673f093f0f0784b0cd938f41f0729bb4a73daf3aa56d7994c3353'
+            'd8608500460bddd820429a1b6a46e1a6f4f2955666c0ddf33969f2eb2d6886cc'
+            '8f4aa0bc4b0474596a06b48e9227fa6c18ecb58b123c078f81776ef4d2eb85ee'
+            'b49e60026438567f9ed98c80930ac9c2d60e637e2518a2ae4eaed606f16c46cb')

 prepare() {
     cd $srcdir
-    tar -xvf ./hledger-${pkgver}.tar.gz
+    tar -xvf ./hledger-${pkgver}.tar
 }

 package_hledger-bin() {
     pkgdesc="Command-line interface for the hledger accounting system"
    provides=(hledger)
    conflicts=(hledger)
-    depends+=(glibc)
+    depends+=()

-    install -Dm 755 ./hledger "$pkgdir/usr/bin/hledger"
-    install -Dm 644 hledger-completion.bash "$pkgdir/usr/share/bash-completion/completions/hledger"
-    install -Dm 644 hledger.1 -t "$pkgdir/usr/share/man/man1/"
+    install -Dm 755 "$pkgname" -t "$pkgdir/usr/bin/"
+    install -Dm 644 hledger-completion.bash \
+        "$pkgdir/usr/share/bash-completion/completions/$pkgname"
+    install -Dm 644 "$pkgname".1 -t "$pkgdir/usr/share/man/man1/"
 }

 package_hledger-ui-bin() {
     pkgdesc="Curses-style terminal interface for the hledger accounting system"
    provides=(hledger-ui)
    conflicts=(hledger-ui)
-    depends+=(zlib)
+    depends+=()

-    install -Dm 755 ./hledger-ui "$pkgdir/usr/bin/hledger-ui"
-    mkdir -p "$pkgdir/usr/share/bash-completion/completions/"
-    ln -sr "$pkgdir/usr/share/bash-completion/completions/hledger"{,-ui}
-    install -Dm 644 hledger-ui.1 -t "$pkgdir/usr/share/man/man1/"
+    install -Dm 755 "$pkgname" -t "$pkgdir/usr/bin/"
+    install -Dm 644 hledger-completion.bash \
+        "$pkgdir/usr/share/bash-completion/completions/$pkgname"
+    install -Dm 644 "$pkgname".1 -t "$pkgdir/usr/share/man/man1/"
 }

 package_hledger-web-bin() {
@@ -59,8 +55,8 @@ package_hledger-web-bin() {
    conflicts=(hledger-web)
     depends+=(zlib)

-    install -Dm 755 ./hledger-web "$pkgdir/usr/bin/hledger-web"
-    mkdir -p "$pkgdir/usr/share/bash-completion/completions/"
-    ln -sr "$pkgdir/usr/share/bash-completion/completions/hledger"{,-web}
-    install -Dm 644 hledger-web.1 -t "$pkgdir/usr/share/man/man1/"
+    install -Dm 755 "$pkgname" -t "$pkgdir/usr/bin/"
+    install -Dm 644 hledger-completion.bash \
+        "$pkgdir/usr/share/bash-completion/completions/$pkgname"
+    install -Dm 644 "$pkgname".1 -t "$pkgdir/usr/share/man/man1/"
 }

dude commented on 2025-01-09 18:57 (UTC)

@gesh Can you provide a diff with all of the changes that you mentioned?

Regarding ncurses, that's required for hledger-ui as far as I know. Not sure about zlib.