Package Details: units 2.24-2

Git Clone URL: https://aur.archlinux.org/units.git (read-only, click to copy)
Package Base: units
Description: converts between different units
Upstream URL: https://www.gnu.org/software/units/units.html
Keywords: calculator conversion units
Licenses: GPL-3.0-or-later
Submitter: arojas
Maintainer: tarball
Last Packager: tarball
Votes: 48
Popularity: 3.59
First Submitted: 2023-04-01 17:48 (UTC)
Last Updated: 2025-05-01 17:39 (UTC)

Pinned Comments

tarball commented on 2024-12-02 21:49 (UTC) (edited on 2025-05-01 19:00 (UTC) by tarball)

Fetching the signing key:

gpg --keyserver keyserver.ubuntu.com --recv-keys 927D02FA733C3D902D21CAC02D649F2B7B4C8179

Latest Comments

1 2 3 Next › Last »

cbb commented on 2025-05-01 18:17 (UTC)

People asking for signature verification on AUR are pretty much just cargo culting and/or box checking. If the maintainer verifies the signature, the sha256sums in the PKGBUILD are good enough for users.

ModelHX commented on 2025-05-01 17:36 (UTC) (edited on 2025-05-01 17:39 (UTC) by ModelHX)

Confirmed; with your patch, makepkg -i works in one step with no compilation issues. Thank you!

Re: configure in prepare(): Understood. My Bash is quite poor, so I didn't understand how readily its behavior could be modified by setting variables before running it.

tarball commented on 2025-05-01 17:29 (UTC) (edited on 2025-05-01 17:35 (UTC) by tarball)

Thanks for the report, it is unfortunate that I tested it just a few minutes ago, but on a week-old VM snapshot with gcc14.

I believe simply settings CFLAGS before running configure should suffice, could you please check if it works for you also?

diff --git a/PKGBUILD b/PKGBUILD
index f166455..bc3695a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -29,7 +29,10 @@ sha256sums=('1e502c4edfacf20b29284716c72e5ddb51a495a2365d7b03e7960494c4a0c902'

 build() {
   cd "$pkgname-$pkgver"
-  ./configure --prefix=/usr --datadir=/usr/share --sharedstatedir=/var/lib
+
+  # gcc15 compatibility fix
+  CFLAGS="$CFLAGS -std=gnu17" \
+    ./configure --prefix=/usr --datadir=/usr/share --sharedstatedir=/var/lib

   # /usr/bin/pager seems to be a Debian-ism; it is not provided by any of the
   # packages shipped with Arch Linux. Replace it with less, which, according to

As for prepare(), ./configure is usually called from build() in most official packages I've seen.

ModelHX commented on 2025-05-01 17:17 (UTC) (edited on 2025-05-01 17:24 (UTC) by ModelHX)

Hey, good afternoon.

I'm getting compilation issues when attempting to build this package after the GCC update to version 15. In this update, GCC updated the default language version for C compilation from -std=gnu17 to -std=gnu23, which is yielding compilation errors during the call to make. (makepkg output log: https://pastebin.com/WFfJcZ4k)

The good news is that adding -std=gnu17 to CFLAGS in the generated Makefile resolved the issues and allowed the package to build and install correctly. I tried to do this by editing the configure script (which generates the Makefile) but quickly got bogged down and couldn't figure out what to edit in order to add the flag, so I decided to simply try to edit the Makefile directly as a hack-around.

However, actually editing the Makefile was difficult, since it gets generated during the call to build(), and any changes to it will get overwritten if the Makefile itself is what's edited. Instead, I had to edit the PKGBUILD to move the Makefile-generation steps into a prepare() function. This allowed me to makepkg --nobuild, edit the generated Makefile, and then makepkg -i --noextract.

Regardless of what needs to happen to add -std=gnu17 on a more permanent basis, would you be open to modifying the PKGBUILD to break out a separate prepare() function, as per the patch below? This seems to be more in line with the guidance from Creating packages.

diff --git a/PKGBUILD b/PKGBUILD
index 0de1410..f166455 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -27,7 +27,7 @@ sha256sums=('1e502c4edfacf20b29284716c72e5ddb51a495a2365d7b03e7960494c4a0c902'
             'c1cb48a6157c850a0b7ecbf4387b82820d6e42f4a2c7ff0eb9de293bad6b128f'
             '52e8cd68110e797e3ee3737f06200505225039b18f3f9b87ae38b6c539c9ccb2')

-prepare() {
+build() {
   cd "$pkgname-$pkgver"
   ./configure --prefix=/usr --datadir=/usr/share --sharedstatedir=/var/lib

@@ -36,10 +36,7 @@ prepare() {
   # pkgstats, is shipped on 100% of Arch systems, and will make the 'help'
   # function work correctly on systems with an empty $PAGER env var.
   sed -i 's|DEFAULTPAGER "/usr/bin/pager"|DEFAULTPAGER "/usr/bin/less"|' units.c
-}

-build() {
-  cd "$pkgname-$pkgver"
   make
 }

tarball commented on 2025-05-01 16:59 (UTC)

@cbb, point taken, but I'm going to come under fire either way, because for every person with GPG problems caused by local broken state or misconfiguration, there will always be someone else asking why GPG isn't being used when the upstream source is signed.

(If not for your comment, I would have ignored it as complaints made in a demanding tone by someone with zero contributions to the AUR usually go straight into /dev/null).

Anyway, the key is valid, there is no need to update it. I just tested it on a fresh/empty VM, it builds fine.

cbb commented on 2025-05-01 16:46 (UTC)

@Mackin_cheese Because you haven't contributed yet.

I'd suggest just removing validpgpkeys from the PKGBUILD entirely, since it's pure security theater in AUR packages and only serves to break things in ways that aren't always obvious to the maintainer.

Mackin_cheese commented on 2025-05-01 16:30 (UTC)

it's been 5 months, why hasn't the GPG key been updated in the PKGBUILD?

tarball commented on 2024-12-02 21:49 (UTC) (edited on 2025-05-01 19:00 (UTC) by tarball)

Fetching the signing key:

gpg --keyserver keyserver.ubuntu.com --recv-keys 927D02FA733C3D902D21CAC02D649F2B7B4C8179

Ranguvar commented on 2024-12-01 17:43 (UTC) (edited on 2024-12-01 17:44 (UTC) by Ranguvar)

I'm able to import the new key from Adrian Mariano <avm4 -at- crnell -dot- edu> now, using

gpg --keyserver keyserver.ubuntu.com --recv-keys 927D02FA733C3D902D21CAC02D649F2B7B4C8179

jfbourdeau commented on 2024-11-29 21:49 (UTC)

ok instead of installing the normal way on Manjaro, I clicked the BUILD button and imported the key and it's working now