You are not logged in.

#1 2026-02-05 14:54:51

sebastianprehn
Member
From: Denmark
Registered: 2026-01-03
Posts: 7
Website

How to ensure a PKGBUILD actually updates a git-subscribed package

I recently adopted the futhark-bin package and would like to add a package for the nightly version as well.

I have the following modified PKGBUILD based on the (now deleted) futhark-nightly package:

# Maintainer: Sebastian Larsen Prehn <slp (at) sebastianprehn (dot) dk>
# Contributor: Mikael Blomstrand <gmail.com: kmbloms>
# Contributor: Olaf Leidinger <oleid@mescharet.de>

pkgname=futhark-nightly-bin
pkgver=0.26.0.r1769122800.g5f8545b6
pkgrel=1
pkgdesc="A data-parallel functional programming language"
arch=('x86_64')
url='https://futhark-lang.org/'
license=('LicenseRef-ISC')
depends=()
options=('!debug')
optdepends=('opencl-headers: OpenCL backend'
            'cuda: CUDA backend'
            'python-pyopencl: PyOpenCL backend')
provides=('futhark-nightly' 'futhark')
conflicts=('futhark-nightly' 'futhark')
_tarurl="https://github.com/diku-dk/futhark/releases/download/nightly/futhark-nightly-linux-x86_64.tar.xz"
_modificationtime=$(date +%s -d "$(curl -sI ${_tarurl} | grep Last-Modified | sed s/^'Last-Modified: '//)")
source=("${pkgname}-${_modificationtime}.tar.xz::https://github.com/diku-dk/futhark/releases/download/nightly/futhark-nightly-linux-x86_64.tar.xz")
sha256sums=(SKIP)

pkgver() {
    cd "${srcdir}/futhark-nightly-linux-${arch}"

    if [[ $(cat commit-id) =~ "-g" ]]
    then
        # If commit-id contains output from `git describe`
        sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' < commit-id
    else
        # Fallback on modification time and commit-id
        printf "%s.r%s.g%s" "$(./bin/futhark -V | grep Futhark | sed 's/Futhark //;s/ (.*//')" "$_modificationtime" "$(cut -c 1-8 < commit-id)"
    fi
}

package() {
    cd "${srcdir}/futhark-nightly-linux-${arch}"
    make PREFIX="${pkgdir}/usr" install

    install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

However, after running both pkgctl and makepkg, I can't figure out why it doesn't auto-update to the newest commit to the nightly version when updating it via pacman when its been installed via pacman -U, when it seems to do that fine when I'm running the makepkg in the repository.

I presume I have either placed some of the code in the wrong block, or am missing something?

Also, since it's a prebuilt binary released for the nightly version, should the package be called futhark-nightly-bin, and should I simply reinstate the old futhark-nightly, or make a new git repository for it? And if I am to make a new git repository, do I keep the names of the previous contributors as I have in the current version, or do I remove them as they have not been part of "futhark-nightly-bin"? It's mostly the same code, so my knee-jerk reaction is to keep them in, but there's also no history to what they actually did if I made a new repository, and thus their exact contributions become a bit unclear. I'm unsure how the best way to tackle that is.

Offline

#2 2026-02-05 15:58:40

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,840

Re: How to ensure a PKGBUILD actually updates a git-subscribed package

doesn't auto-update to the newest commit to the nightly version when updating it via pacman

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
What exactly are you running to update the package?

when its been installed via pacman -U

pacman -U installs a built package - any PKGBUILD is irrelevant at this point.

should the package be called futhark-nightly-bin

Yes.
https://wiki.archlinux.org/title/AUR_su … submission

reinstate the old futhark-nightly, or make a new git repository for it

You mean at https://github.com/diku-dk/ ??

Offline

#3 2026-02-05 16:34:52

sebastianprehn
Member
From: Denmark
Registered: 2026-01-03
Posts: 7
Website

Re: How to ensure a PKGBUILD actually updates a git-subscribed package

seth wrote:

doesn't auto-update to the newest commit to the nightly version when updating it via pacman

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
What exactly are you running to update the package?

Sorry.

I have gotten the PKGBUILD to build and give me an executable using both makepkg, and then makepkg --install (see output for makepkg in [0]), and run it again from fresh using pkgctl build, where I once again could get a working prebuilt binary (see output in [1]), although I was a bit perplexed and worried about the lines containing

upgrading archlinux-keyring...
gpg: Warning: using insecure memory!
==> Appending keys from archlinux.gpg...
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!

After having installed it with pacman -U, I made the assumption that the nightly package would check if its running the newest build, and otherwise fetch and build again to be up-to-date with the newest git commit associated with it. Therefore, when I run the command pacman -Syu, it should see that a newer version was available, and offer to update it. At least that was my hope with this package and why I'm trying to use the git method with it, despite it being a prebuilt binary that simply gets delivered by the Futhark team a few hours after a commit has been made.

It will fetch the newest version when I run makepkg in the repository with the PKGBUILD. This is despite me not having changed the PKGBUILD file for several days, with several nightly versions having been released in the meantime.

seth wrote:

when its been installed via pacman -U

pacman -U installs a built package - any PKGBUILD is irrelevant at this point.

Among my questions was thus what I had done incorrectly for it not to make the check when you run for example pacman -Syu, although it might be because I'm thinking about something like paru or yay doing this, and in reality it just goes and does something akin to makepkg as well, and thus the package actually works, but I'm simply not using an AUR helper and thus not having this functionality when trying to check if it updates correctly with either pacman or an AUR helper.

Thus, I am interested in knowing how I can better test whether it correctly checks its current version against a newer version and updates if that is the case, and for people using an AUR helper, that it would correctly perform the check and pull it down for them and update it.

seth wrote:

should the package be called futhark-nightly-bin

Yes.
https://wiki.archlinux.org/title/AUR_su … submission

reinstate the old futhark-nightly, or make a new git repository for it

You mean at https://github.com/diku-dk/ ??

The PKGBUILD already assumed that it should be named futhark-nightly-bin, and my question was thus more about how I should go about uploading it once it was correct. Should I pull down the old and deleted repository for futhark-nightly, and somehow get that renamed to futhark-nightly-bin, or create a new one called futhark-nightly-bin.

Second, I was worried how I should go about the potential crediting or not-crediting of the people who used to maintain the futhark-nightly package which I based my own PKGBUILD on.

[0]

❯ makepkg
==> Making package: futhark-nightly-bin 0.26.0.r1770249600.ge2c392a1-1 (2026-02-05T17:35:32 CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading futhark-nightly-bin-1770246000.tar.xz...
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
  0      0   0      0   0      0      0      0           00:03              0
100  7.73M 100  7.73M   0      0  1.23M      0   00:06   00:06          2.45M
==> Validating source files with sha256sums...
    futhark-nightly-bin-1770246000.tar.xz ... Skipped
==> Extracting sources...
  -> Extracting futhark-nightly-bin-1770246000.tar.xz with bsdtar
==> Starting pkgver()...
==> Updated version: futhark-nightly-bin 0.26.0.r1770246000.ge2c392a1-1
==> Entering fakeroot environment...
==> Starting package()...
# Installing executable files to /home/sebastian/pkgs/aur/futhark-nightly/pkg/futhark-nightly-bin/usr/bin
install bin/* /home/sebastian/pkgs/aur/futhark-nightly/pkg/futhark-nightly-bin/usr/bin/
# Installing manual page to /home/sebastian/pkgs/aur/futhark-nightly/pkg/futhark-nightly-bin/usr/share/man/man1
# Installing manpages to /home/sebastian/pkgs/aur/futhark-nightly/pkg/futhark-nightly-bin/usr/share/man/man1/
install -D -m 644 share/man/man1/* /home/sebastian/pkgs/aur/futhark-nightly/pkg/futhark-nightly-bin/usr/share/man/man1/
==> Tidying install...
  -> Removing libtool files...
  -> Removing static library files...
  -> Purging unwanted files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
libfakeroot internal error: payload not recognized!
==> Checking for packaging issues...
==> Creating package "futhark-nightly-bin"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: futhark-nightly-bin 0.26.0.r1770246000.ge2c392a1-1 (2026-02-05T17:35:46 CET)

[1]

❯ pkgctl build
==> Updating pacman database cache
:: Synchronizing package databases...
 core downloading...
 extra downloading...
 multilib downloading...
==> Building futhark-nightly-bin
  ->   repo: extra
  ->   arch: x86_64
  -> worker: sebastian-1
==> Building futhark-nightly-bin for [extra] (x86_64)
[sudo] password for sebastian:
:: Synchronizing package databases...
 core downloading...
 extra downloading...
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Package (13)            Old Version               New Version               Net Change  Download Size

core/archlinux-keyring  20260107-2                20260202-1                  0.01 MiB
core/coreutils          9.9-1                     9.10-1                     -1.00 MiB       2.82 MiB
core/cryptsetup         2.8.3-1                   2.8.4-1                     0.00 MiB
core/curl               8.18.0-2                  8.18.0-3                    0.00 MiB
core/expat              2.7.3-1                   2.7.4-1                     0.01 MiB
core/gettext            0.26-1                    1.0-1                       4.96 MiB
core/glibc              2.42+r51+gcbf39c26b258-1  2.42+r51+gcbf39c26b258-2   -1.28 MiB
core/jansson            2.14.1-1                  2.15.0-1                    0.01 MiB
core/libevent           2.1.12-4                  2.1.12-5                    0.00 MiB
core/libldap            2.6.10-2                  2.6.12-1                    0.00 MiB
core/libunistring       1.3-1                     1.4.1-1                     0.04 MiB
core/openssl            3.6.0-1                   3.6.1-1                    -0.16 MiB
core/pam                1.7.1-1                   1.7.2-2                     0.00 MiB

Total Download Size:     2.82 MiB
Total Installed Size:  122.75 MiB
Net Upgrade Size:        2.59 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
 coreutils-9.10-1-x86_64 downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
upgrading glibc...
Generating locales...
  en_US.UTF-8... done
  de_DE.UTF-8... done
Generation complete.
upgrading openssl...
upgrading libldap...
upgrading libevent...
upgrading pam...
upgrading coreutils...
upgrading libunistring...
upgrading curl...
upgrading gettext...
upgrading jansson...
upgrading cryptsetup...
upgrading expat...
upgrading archlinux-keyring...
gpg: Warning: using insecure memory!
==> Appending keys from archlinux.gpg...
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
gpg: Warning: using insecure memory!
==> Updating trust database...
gpg: Warning: using insecure memory!
gpg: next trustdb check due at 2026-03-13
:: Running post-transaction hooks...
(1/5) Creating temporary files...
(2/5) Reloading system manager configuration...
  Skipped: Current root is not booted.
(3/5) Restarting marked services...
  Skipped: Current root is not booted.
(4/5) Arming ConditionNeedsUpdate...
(5/5) Updating the info directory file...
==> Building in chroot for [extra] (x86_64)...
==> Synchronizing chroot copy [/var/lib/archbuild/extra-x86_64/root] -> [sebastian-1]...done
==> Making package: futhark-nightly-bin 0.26.0.r1770246000.ge2c392a1-1 (Thu Feb  5 17:28:20 2026)
==> Retrieving sources...
  -> Downloading futhark-nightly-bin-1770246000.tar.xz...
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
  0      0   0      0   0      0      0      0           00:03              0
100  7.73M 100  7.73M   0      0  1.23M      0   00:06   00:06          2.45M
==> Validating source files with sha256sums...
    futhark-nightly-bin-1770246000.tar.xz ... Skipped
==> Making package: futhark-nightly-bin 0.26.0.r1770246000.ge2c392a1-1 (Thu Feb  5 16:28:32 2026)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading futhark-nightly-bin-1770249600.tar.xz...
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
  0      0   0      0   0      0      0      0           00:03              0
100  7.73M 100  7.73M   0      0  1.22M      0   00:06   00:06          2.45M
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
  -> Extracting futhark-nightly-bin-1770249600.tar.xz with bsdtar
==> Starting pkgver()...
==> Updated version: futhark-nightly-bin 0.26.0.r1770249600.ge2c392a1-1
==> Entering fakeroot environment...
==> Starting package()...
# Installing executable files to /build/futhark-nightly-bin/pkg/futhark-nightly-bin/usr/bin
install bin/* /build/futhark-nightly-bin/pkg/futhark-nightly-bin/usr/bin/
# Installing manual page to /build/futhark-nightly-bin/pkg/futhark-nightly-bin/usr/share/man/man1
# Installing manpages to /build/futhark-nightly-bin/pkg/futhark-nightly-bin/usr/share/man/man1/
install -D -m 644 share/man/man1/* /build/futhark-nightly-bin/pkg/futhark-nightly-bin/usr/share/man/man1/
==> Tidying install...
  -> Removing libtool files...
  -> Removing static library files...
  -> Purging unwanted files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "futhark-nightly-bin"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: futhark-nightly-bin 0.26.0.r1770249600.ge2c392a1-1 (Thu Feb  5 16:29:00 2026)
==> Installing package futhark-nightly-bin with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...

Package (1)          New Version                     Net Change

futhark-nightly-bin  0.26.0.r1770249600.ge2c392a1-1   48.86 MiB

Total Installed Size:  48.86 MiB

:: Proceed with installation? [Y/n]
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing futhark-nightly-bin...
Optional dependencies for futhark-nightly-bin
    opencl-headers: OpenCL backend
    cuda: CUDA backend
    python-pyopencl: PyOpenCL backend
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
resolving dependencies...
looking for conflicting packages...

Package (9)                      New Version  Net Change

core/elfutils                    0.194-1        3.56 MiB
core/licenses                    20240728-1     1.54 MiB
core/mpdecimal                   4.0.1-1        0.33 MiB
extra/pyalpm                     0.11.1-1       0.23 MiB
core/python                      3.14.2-2      72.04 MiB
extra/python-boolean.py          5.0-2          0.36 MiB
extra/python-license-expression  30.4.4-2       1.24 MiB
extra/python-pyelftools          0.32-2         2.17 MiB
extra/namcap                     3.6.0-3        1.00 MiB

Total Installed Size:  82.48 MiB

:: Proceed with installation? [Y/n]
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing elfutils...
installing licenses...
installing mpdecimal...
installing python...
Optional dependencies for python
    python-setuptools: for building Python packages using tooling that is usually bundled with Python
    python-pip: for installing Python packages using tooling that is usually bundled with Python
    python-pipx: for installing Python software not packaged on Arch Linux
    sqlite: for a default database integration [installed]
    xz: for lzma [installed]
    tk: for tkinter
installing pyalpm...
installing python-boolean.py...
installing python-license-expression...
installing python-pyelftools...
installing namcap...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
Checking PKGBUILD
PKGBUILD (futhark-nightly-bin) W: Reference to x86_64 should be changed to $CARCH
PKGBUILD (futhark-nightly-bin) W: Reference to x86_64 should be changed to $CARCH
Checking futhark-nightly-bin-0.26.0.r1770249600.ge2c392a1-1-x86_64.pkg.tar.zst
futhark-nightly-bin W: ELF file ('usr/bin/futhark') lacks FULL RELRO, check LDFLAGS.
futhark-nightly-bin W: ELF file ('usr/bin/futhark') lacks PIE.
==> Running checkpkg
error: target not found: futhark-nightly-bin
==> WARNING: Skipped checkpkg due to missing repo packages
==> Generating .SRCINFO...done
==> Finished building futhark-nightly-bin 0.26.0.r1770249600.ge2c392a1-1

Last edited by sebastianprehn (2026-02-05 16:37:04)

Offline

#4 2026-02-05 16:56:19

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,840

Re: How to ensure a PKGBUILD actually updates a git-subscribed package

when I run the command pacman -Syu, it should see that a newer version was available

No. pacman -Syu will sync and update the confgured repos, ie. usually https://archlinux.org/packages/ (plus custom repos you might have added)
Local and AUR packages need to be explicitly updated by you or

because I'm thinking about something like paru or yay doing this

AUR helpers will typically update AUR packages when those update and *might* provide special treatment for -git packages, but there's no guarantee for that behavior.

how I can better test whether it correctly checks its current version against a newer version and updates if that is the case, and for people using an AUR helper, that it would correctly perform the check and pull it down for them and update it

You'll have to bump the AUR package whenever there's a new upstream update (nightly build)
That'd be the stronges  and somewhat reliable hint to rebuild the package.

As for the AUR

create a new one called futhark-nightly-bin

Do you know why the other package was deleted? (don't pick a fight w/ the AUR maintainers/moderators over that)

Second, I was worried how I should go about the potential crediting or not-crediting of the people who used to maintain the futhark-nightly package which I based my own PKGBUILD on.

Acknowledge them in the PKGBUILD comment.

Offline

#5 2026-02-05 17:24:45

sebastianprehn
Member
From: Denmark
Registered: 2026-01-03
Posts: 7
Website

Re: How to ensure a PKGBUILD actually updates a git-subscribed package

seth wrote:

when I run the command pacman -Syu, it should see that a newer version was available

No. pacman -Syu will sync and update the confgured repos, ie. usually https://archlinux.org/packages/ (plus custom repos you might have added)
Local and AUR packages need to be explicitly updated by you or

because I'm thinking about something like paru or yay doing this

AUR helpers will typically update AUR packages when those update and *might* provide special treatment for -git packages, but there's no guarantee for that behavior.

how I can better test whether it correctly checks its current version against a newer version and updates if that is the case, and for people using an AUR helper, that it would correctly perform the check and pull it down for them and update it

You'll have to bump the AUR package whenever there's a new upstream update (nightly build)
That'd be the stronges  and somewhat reliable hint to rebuild the package.

As for the AUR

create a new one called futhark-nightly-bin

Do you know why the other package was deleted? (don't pick a fight w/ the AUR maintainers/moderators over that)

Second, I was worried how I should go about the potential crediting or not-crediting of the people who used to maintain the futhark-nightly package which I based my own PKGBUILD on.

Acknowledge them in the PKGBUILD comment.

So the "best" approach would be automating a script from one of my own servers to keep an eye on the nightly build, and then update the PKGBUILD and .SRCINFO file accordingly and push this? Reason I used the git method of building packages is also because the link never changes, so it has to do similar checks to packages which follows the git commits.

On that note, is my way of checking reasonable? I tried to look how it had been done previously, as well as look to a few different -git repositories, but I'm ultimately a bit unsure whether I placed them correctly as to not accidentally do something unintentional. For example, I'm unsure why it started talking about insecure memory when building with pkgctl build.

The packages were deleted because they were unmaintained as per his thread for Futhark nightly and this thread for futhark-git

Offline

#6 2026-02-05 20:48:51

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,840

Re: How to ensure a PKGBUILD actually updates a git-subscribed package

So the "best" approach would be …

Yes.


so it has to do similar checks to packages which follows the git commits … is my way of checking reasonable?

You mean in the pkgver() function?

It's a nightly release so you can just bump the version every day at the same time, no?

Offline

Board footer

Powered by FluxBB