Skip to content

paru (sometimes?) rebuilds package from scratch after sudo timeout #1582

Description

@deviant

Affected Version

paru -V

paru v2.1.0 - libalpm v16.0.1

Description

Have you checked previous issues?

This is a continuation of #1401, which I cannot reopen due to permissions on the repository. To recap: after building a package, paru uses sudo to install it. sudo by default times out waiting for a password after 5 minutes. paru exits unsuccessfully when this happens. Rerunning paru causes it (possibly not in all cases) to start over building the package.

Side note: obviously it is more likely that sudo will time out if it's left unattended, which is more likely when the package takes a long time to build. So this issue is most likely to affect package builds that are already time-consuming.

Response from @Morganamilo on the previous issue:

Paru caches so the sensible thing to do is just re run your command.

[...]

It's always been like that. There's just some startup time where paru first checks if there's a new version of the package and stuff. But it won't rebuild the whole packages.

After learning this, I played around with paru a little bit, and found that this statement seemed to be correct. So for a while, I began thinking that I had simply gone crazy and full imagined all and any of this having ever happened. However, I just ran into it again just now, so I think that the caching must be broken in certain situations.

Output

Include the FULL output of any relevant commands/configs

Don't cut parts of the input always include the FULL thing

paru.conf and pacman.conf are usually always relevant

Here is the terminal output from the following sequence of events:

  1. I ask paru to install grafana-bin.
  2. I leave to do other things.
  3. The package is built successfully.
  4. sudo prompts me for my password. As I am not present, it times out, causing paru to fail.
  5. I return, notice the error, and ask paru to install grafana-bin, again.
  6. I notice that paru does not install the ready-built package, and is running makepkg again.
  7. I kill paru, and verify that the package is already built, and is in paru's cache.
Details
v@Apollo ~> paru grafana
 1 extra/grafana-agent 0.44.8-1 [40.40 MiB 223.39 MiB]
    Grafana Agent is a telemetry collector for sending metrics, logs, and trace data to the opinionated Grafana observability stack
 2 extra/grafana-agentctl 0.44.8-1 [32.61 MiB 193.71 MiB]
    provides utilities for interacting with Grafana Agent
 3 extra/grafana-alloy 1.13.2-1 [75.56 MiB 416.39 MiB]
    OpenTelemetry Collector distribution with programmable pipelines
 4 extra/promtail 3.6.6-1 [19.53 MiB 115.81 MiB]
    An agent which ships the contents of local logs to a private Loki instance or Grafana Cloud
 5 aur/grafana-bin 13.1.0-1 [+20 ~0.57]
    Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & OpenTSDB - binary version
 6 aur/grafana-alloy-bin 1.17.1-1 [+3 ~0.00]
    OpenTelemetry Collector distribution with programmable pipelines.
 7 aur/grafana-git v6.0.0.beta1.r3707.g649fa6789e-1 [+3 ~0.00] [Out-of-date: 2026-07-06]
    The tool for beautiful monitoring and metric analytics & dashboards for Graphite, InfluxDB & Prometheus & More
 8 aur/gcx-bin 1.0.0-1 [+1 ~0.75]
    A CLI for managing Grafana Cloud resources, optimized for agentic usage (prebuilt binary)
 9 aur/grafana-apprise-adapter-git 0.1.0.r32.g520f47f-1 [+1 ~0.00]
    Send grafana alerts to apprise for notifications
10 aur/prometheus-xmpp-webhook 0.4.0-3 [+1 ~0.00]
    XMPP-Webhook built for Prometheus/Grafana Alerts
11 aur/gcx 1.0.0-1 [+0 ~0.00]
    A CLI for managing Grafana Cloud resources, optimized for agentic usage
12 aur/gcx-git 0.4.0.r6.gf28846f-1 [+0 ~0.00]
    A CLI for managing Grafana Cloud resources, optimized for agentic usage (VCS, builds the main branch)
13 aur/gdg-bin 0.9.2-1 [+0 ~0.00]
    CLI tool to backup and restore Grafana dashboards, connections, and other resources (Grafana Dash-n-Grab)
14 aur/gitflux-git r13.e7f31a6-1 [+0 ~0.00]
    Track your GitHub projects in InfluxDB and create beautiful graphs with Grafana
15 aur/grafana-pcp-bin 5.1.1-1 [+0 ~0.00] [Orphaned]
    Performance Co-Pilot Grafana Plugin
16 aur/grafanactl-bin 0.1.10-1 [+0 ~0.00]
    CLI tool for managing Grafana resources as code
17 aur/grafterm 0.2.0-1 [+0 ~0.00]
    Metrics dashboards on terminal (a grafana inspired terminal version)
18 aur/grafterm-bin 0.2.0-2 [+0 ~0.00]
    Metrics dashboards on terminal (a grafana inspired terminal version)
19 aur/grizzly 0.7.1-1 [+0 ~0.00]
    A utility for managing Jsonnet dashboards against the Grafana API
20 aur/grizzly-bin 0.7.1-1 [+0 ~0.00]
    A utility for managing Jsonnet dashboards against the Grafana API
21 aur/icingaweb2-module-grafana 1.4.2-1 [+0 ~0.00] [Out-of-date: 2023-09-07] [Orphaned]
    Grafana module for Icinga Web 2 (supports InfluxDB & Graphite)
22 aur/loki-cli 0.1.0-1 [+0 ~0.00]
    A logcli-style CLI for querying Grafana Loki instances
23 aur/mimirtool-bin 2.16.0-1 [+0 ~0.00]
    Command-line tool that operators and tenants can use to execute a number of common tasks that involve grafana mimir or grafana cloud metrics.
24 aur/profilecli 2.2.0-1 [+0 ~0.00]
    CLI for Grafana Pyroscope, the continuous profiling aggregation system
25 aur/profilecli-bin 2.2.0-1 [+0 ~0.00]
    CLI for Grafana Pyroscope, the continuous profiling aggregation system (static binary)
26 aur/prometheus-xmpp-webhook-bin 0.2-0 [+0 ~0.00] [Orphaned]
    XMPP-Webhook built for Prometheus/Grafana Alerts
27 aur/prometheus-xmpp-webhook-git 0.2_5_g8346a2202805-1 [+0 ~0.00] [Orphaned]
    XMPP-Webhook built for Prometheus/Grafana Alerts
28 aur/tempo-cli 3.0.2-1 [+0 ~0.00]
    Command line tool for viewing and manipulating Grafana Tempo backend blocks
:: Packages to install (eg: 1 2 3, 1-3):
:: 5
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...

Aur (1) grafana-bin-13.1.0-1

:: Proceed to review? [Y/n]: y

:: Downloading PKGBUILDs...
 (1/1) grafana-bin-13.1.0-1                          [------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------]
Paging with less. Press 'q' to quit or 'h' for help.
Paging with less. Press 'q' to quit or 'h' for help.
Paging with less. Press 'q' to quit or 'h' for help.

:: grafana-bin:
  .gitignore:
    pkg/
    src/
    grafana*.tar.gz
    grafana*.tar

  .nvchecker.toml:
    [grafana]
    source = 'regex'
    url = 'https://grafana.com/grafana/download?edition=oss'
    encoding = 'utf-8'
    regex = 'grafana_([\d\.]+_\d{10,})_linux_amd64.tar.gz'

  PKGBUILD:
    # Maintainer: Zhuoyun Wei <wzyboy@wzyboy.org>
    # Contributor: S<C3><A9>bastien "Seblu" Luttringer
    # Contributor: Carsten Feuls <archlinux@carstenfeuls.de>
    # Contributor: Gilles Hamel <hamelg at laposte dot net>
    # Contributor: Erikas Rudinskas <erikmnkl@gmail.com>

    pkgname=grafana-bin
    _pkgname=grafana
    pkgver=13.1.0
    _pkgver=${pkgver}
    _build_id=28013217238
    pkgrel=1
    pkgdesc='Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & OpenTSDB - binary version'
    url='https://grafana.com/grafana/download?edition=oss'
    conflicts=('grafana')
    provides=('grafana')
    arch=('x86_64' 'armv6h' 'armv7h' 'aarch64')
    license=('AGPL' 'Apache')
    install=${_pkgname}.install
    backup=('etc/grafana.ini')
    source=('grafana.service'
            'grafana.sysusers'
            'grafana.tmpfiles'
           )
    install=$_pkgname.install
    source_x86_64=("https://dl.grafana.com/grafana/release/${_pkgver}/grafana_${_pkgver}_${_build_id}_linux_amd64.tar.gz")
    source_armv6h=("https://dl.grafana.com/grafana/release/${_pkgver}/grafana_${_pkgver}_${_build_id}_linux_arm-6.tar.gz")
    source_armv7h=("https://dl.grafana.com/grafana/release/${_pkgver}/grafana_${_pkgver}_${_build_id}_linux_arm-7.tar.gz")
    source_aarch64=("https://dl.grafana.com/grafana/release/${_pkgver}/grafana_${_pkgver}_${_build_id}_linux_arm64.tar.gz")
    sha256sums=('9e3637d00065b88e051f9950d836ea3ec69f21ab8ab452f3b99a4deb30d41efa'
                '9cbd46f771dae5e2308b991a00d07a25cc1765f9bdd4082726108e3476403b56'
                '3cd6026ba009e05f49ec265d049d590d4f35330c1f14cd90a468c8d588501675')
    sha256sums_x86_64=('4f562bb224b8bb758b47789381babb284cb41687da8d714f2ff0e118e945e775')
    sha256sums_armv6h=('4aa94ad3ef8b4881cc87a6850fbebc142bb4689090e9c5cd01d315d996b4290c')
    sha256sums_armv7h=('4dd1c117d868b3e2c870618468e873fc98098ebc5093c99e6456b5a1a7660f81')
    sha256sums_aarch64=('d5f98305792b917b173320d5fde6b394685ae5df179ae9f9a8f22b56436b389a')

    prepare() {
      cd ${_pkgname}-${_pkgver}
      # set arch linux paths
      sed -ri 's,^(\s*data\s*=).*,\1 /var/lib/grafana,' conf/defaults.ini
      sed -ri 's,^(\s*plugins\s*=).*,\1 /var/lib/grafana/plugins,' conf/defaults.ini
      sed -ri 's,^(\s*provisioning\s*=).*,\1 /var/lib/grafana/conf/provisioning,' conf/defaults.ini
      sed -ri 's,^(\s*logs\s*=).*,\1 /var/log/grafana,' conf/defaults.ini
    }

    package() {
      install -Dm644 grafana.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/grafana.conf"
      install -Dm644 grafana.sysusers "$pkgdir/usr/lib/sysusers.d/grafana.conf"
      install -Dm644 grafana.service "$pkgdir/usr/lib/systemd/system/grafana.service"

      cd ${_pkgname}-${pkgver}
      install -Dm755 bin/grafana "$pkgdir/usr/bin/grafana"
      install -Dm640 -o207 -g207 conf/sample.ini "$pkgdir/etc/grafana.ini"
      install -Dm644 conf/defaults.ini "$pkgdir/usr/share/grafana/conf/defaults.ini"
      install -dm755 "$pkgdir/usr/share/grafana/"
      cp -r public plugins-bundled "$pkgdir/usr/share/grafana/"

      # Remove unit tests
      rm -r "$pkgdir/usr/share/grafana/public/test"

      # Source maps are only useful for frontend debugging and add substantial size.
      find "$pkgdir/usr/share/grafana/public" -type f -name '*.js.map' -delete
      find "$pkgdir/usr/share/grafana/public" -type f -name '*.js' -exec \
        sed -i '/^\/\/# sourceMappingURL=.*\.js\.map$/d' {} +
    }

  grafana.install:
    #/bin/sh

    # arg 1:  the new package version
    # arg 2:  the old package version
    post_upgrade() {
      if (( "$(vercmp $2 2.6.0-3)" < 0 )); then
        echo '==> Configuration moved to /etc/grafana.ini'
      fi
      if (( "$(vercmp $2 4.4.3-1)" < 0 )); then
        echo '==> Grafana now uses static UID/GID 207'
        echo '==> Trying to update your previous UID/GID'
        if ! { usermod -u 207 grafana && groupmod -g 207 grafana &&
          chown -R 207:207 /var/{lib,log}/grafana; }; then
          echo '==> Automatic GID/UID change failed. Do it manually!'
          echo '==> usermod -g 207 grafana && groupmod -u 207 grafana && chown -R 207:207 /var/l{ib,og}/grafana'
        fi
        echo '==> Check the ownership of your files!'
      fi
      return 0
    }

    # vim:set ts=2 sw=2 et:

  grafana.service:
    [Unit]
    Description=Grafana service
    After=network.target postgresql.service mariadb.service mysqld.service

    [Service]
    User=grafana
    Group=grafana
    WorkingDirectory=/usr/share/grafana
    ExecStart=/usr/bin/grafana server --config=/etc/grafana.ini
    LimitNOFILE=10000
    TimeoutStopSec=20
    SuccessExitStatus=0 2
    NoNewPrivileges=yes
    ProtectSystem=full
    ProtectHome=true
    PrivateTmp=true
    PrivateDevices=true
    ProtectKernelTunables=true
    ProtectKernelModules=true
    ProtectControlGroups=true

    [Install]
    WantedBy=multi-user.target

  grafana.sysusers:
    u grafana 207 - /var/lib/grafana

  grafana.tmpfiles:
    d /var/lib/grafana 0750 grafana grafana -
    d /var/log/grafana 0750 grafana grafana -

:: Accept changes? [Y/n]: y
fetching devel info...
==> Making package: grafana-bin 13.1.0-1 (Thu Aug 13 01:51:26 2026)
==> Retrieving sources...
  -> Found grafana.service
  -> Found grafana.sysusers
  -> Found grafana.tmpfiles
  -> Downloading grafana_13.1.0_28013217238_linux_arm64.tar.gz...
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
100 328.7M 100 328.7M   0      0 17.84M      0   00:18   00:18         37.71M
==> Validating source files with sha256sums...
    grafana.service ... Passed
    grafana.sysusers ... Passed
    grafana.tmpfiles ... Passed
==> Validating source_aarch64 files with sha256sums...
    grafana_13.1.0_28013217238_linux_arm64.tar.gz ... Passed
==> Making package: grafana-bin 13.1.0-1 (Thu Aug 13 01:52:11 2026)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found grafana.service
  -> Found grafana.sysusers
  -> Found grafana.tmpfiles
  -> Found grafana_13.1.0_28013217238_linux_arm64.tar.gz
==> Validating source files with sha256sums...
    grafana.service ... Passed
    grafana.sysusers ... Passed
    grafana.tmpfiles ... Passed
==> Validating source_aarch64 files with sha256sums...
    grafana_13.1.0_28013217238_linux_arm64.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting grafana_13.1.0_28013217238_linux_arm64.tar.gz with bsdtar
==> Starting prepare()...
==> Sources are ready.
grafana-bin-13.1.0-1: parsing pkg list...
==> Making package: grafana-bin 13.1.0-1 (Thu Aug 13 01:53:21 2026)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Entering fakeroot environment...
==> Starting package()...
==> 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 "grafana-bin"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: grafana-bin 13.1.0-1 (Thu Aug 13 02:03:02 2026)
==> Cleaning up...
[sudo] password for v:
sudo: timed out reading password
sudo: a password is required
v@Apollo ~ [1]> paru grafana
 1 extra/grafana-agent 0.44.8-1 [40.40 MiB 223.39 MiB]
    Grafana Agent is a telemetry collector for sending metrics, logs, and trace data to the opinionated Grafana observability stack
 2 extra/grafana-agentctl 0.44.8-1 [32.61 MiB 193.71 MiB]
    provides utilities for interacting with Grafana Agent
 3 extra/grafana-alloy 1.13.2-1 [75.56 MiB 416.39 MiB]
    OpenTelemetry Collector distribution with programmable pipelines
 4 extra/promtail 3.6.6-1 [19.53 MiB 115.81 MiB]
    An agent which ships the contents of local logs to a private Loki instance or Grafana Cloud
 5 aur/grafana-bin 13.1.0-1 [+20 ~0.57]
    Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & OpenTSDB - binary version
 6 aur/grafana-alloy-bin 1.17.1-1 [+3 ~0.00]
    OpenTelemetry Collector distribution with programmable pipelines.
 7 aur/grafana-git v6.0.0.beta1.r3707.g649fa6789e-1 [+3 ~0.00] [Out-of-date: 2026-07-06]
    The tool for beautiful monitoring and metric analytics & dashboards for Graphite, InfluxDB & Prometheus & More
 8 aur/gcx-bin 1.0.0-1 [+1 ~0.75]
    A CLI for managing Grafana Cloud resources, optimized for agentic usage (prebuilt binary)
 9 aur/grafana-apprise-adapter-git 0.1.0.r32.g520f47f-1 [+1 ~0.00]
    Send grafana alerts to apprise for notifications
10 aur/prometheus-xmpp-webhook 0.4.0-3 [+1 ~0.00]
    XMPP-Webhook built for Prometheus/Grafana Alerts
11 aur/gcx 1.0.0-1 [+0 ~0.00]
    A CLI for managing Grafana Cloud resources, optimized for agentic usage
12 aur/gcx-git 0.4.0.r6.gf28846f-1 [+0 ~0.00]
    A CLI for managing Grafana Cloud resources, optimized for agentic usage (VCS, builds the main branch)
13 aur/gdg-bin 0.9.2-1 [+0 ~0.00]
    CLI tool to backup and restore Grafana dashboards, connections, and other resources (Grafana Dash-n-Grab)
14 aur/gitflux-git r13.e7f31a6-1 [+0 ~0.00]
    Track your GitHub projects in InfluxDB and create beautiful graphs with Grafana
15 aur/grafana-pcp-bin 5.1.1-1 [+0 ~0.00] [Orphaned]
    Performance Co-Pilot Grafana Plugin
16 aur/grafanactl-bin 0.1.10-1 [+0 ~0.00]
    CLI tool for managing Grafana resources as code
17 aur/grafterm 0.2.0-1 [+0 ~0.00]
    Metrics dashboards on terminal (a grafana inspired terminal version)
18 aur/grafterm-bin 0.2.0-2 [+0 ~0.00]
    Metrics dashboards on terminal (a grafana inspired terminal version)
19 aur/grizzly 0.7.1-1 [+0 ~0.00]
    A utility for managing Jsonnet dashboards against the Grafana API
20 aur/grizzly-bin 0.7.1-1 [+0 ~0.00]
    A utility for managing Jsonnet dashboards against the Grafana API
21 aur/icingaweb2-module-grafana 1.4.2-1 [+0 ~0.00] [Out-of-date: 2023-09-07] [Orphaned]
    Grafana module for Icinga Web 2 (supports InfluxDB & Graphite)
22 aur/loki-cli 0.1.0-1 [+0 ~0.00]
    A logcli-style CLI for querying Grafana Loki instances
23 aur/mimirtool-bin 2.16.0-1 [+0 ~0.00]
    Command-line tool that operators and tenants can use to execute a number of common tasks that involve grafana mimir or grafana cloud metrics.
24 aur/profilecli 2.2.0-1 [+0 ~0.00]
    CLI for Grafana Pyroscope, the continuous profiling aggregation system
25 aur/profilecli-bin 2.2.0-1 [+0 ~0.00]
    CLI for Grafana Pyroscope, the continuous profiling aggregation system (static binary)
26 aur/prometheus-xmpp-webhook-bin 0.2-0 [+0 ~0.00] [Orphaned]
    XMPP-Webhook built for Prometheus/Grafana Alerts
27 aur/prometheus-xmpp-webhook-git 0.2_5_g8346a2202805-1 [+0 ~0.00] [Orphaned]
    XMPP-Webhook built for Prometheus/Grafana Alerts
28 aur/tempo-cli 3.0.2-1 [+0 ~0.00]
    Command line tool for viewing and manipulating Grafana Tempo backend blocks
:: Packages to install (eg: 1 2 3, 1-3):
:: 5
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...

Aur (1) grafana-bin-13.1.0-1

:: Proceed to review? [Y/n]: y

:: Downloading PKGBUILDs...
 PKGBUILDs up to date
 nothing new to review
fetching devel info...
==> Making package: grafana-bin 13.1.0-1 (Thu Aug 13 02:09:04 2026)
==> Retrieving sources...
  -> Found grafana.service
  -> Found grafana.sysusers
  -> Found grafana.tmpfiles
  -> Found grafana_13.1.0_28013217238_linux_arm64.tar.gz
==> Validating source files with sha256sums...
    grafana.service ... Passed
    grafana.sysusers ... Passed
    grafana.tmpfiles ... Passed
==> Validating source_aarch64 files with sha256sums...
    grafana_13.1.0_28013217238_linux_arm64.tar.gz ... Passed
==> Making package: grafana-bin 13.1.0-1 (Thu Aug 13 02:09:22 2026)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found grafana.service
  -> Found grafana.sysusers
  -> Found grafana.tmpfiles
  -> Found grafana_13.1.0_28013217238_linux_arm64.tar.gz
==> Validating source files with sha256sums...
    grafana.service ... Passed
    grafana.sysusers ... Passed
    grafana.tmpfiles ... Passed
==> Validating source_aarch64 files with sha256sums...
    grafana_13.1.0_28013217238_linux_arm64.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting grafana_13.1.0_28013217238_linux_arm64.tar.gz with bsdtar
==> Starting prepare()...
==> Sources are ready.
grafana-bin-13.1.0-1: parsing pkg list...
^C⏎
v@Apollo ~ [SIGINT]> la ~/.cache/paru/clone/grafana-bin/
total 430M
drwxr-xr-x 1 v v  156 Aug 13 02:08 .git/
drwxr-xr-x 1 v v  212 Aug 13 02:09 src/
-rw-r--r-- 1 v v 1.5K Aug 13 01:50 .SRCINFO
-rw-r--r-- 1 v v   39 Aug 13 01:50 .gitignore
-rw-r--r-- 1 v v  158 Aug 13 01:50 .nvchecker.toml
-rw-r--r-- 1 v v 3.2K Aug 13 01:50 PKGBUILD
-rw-r--r-- 1 v v 101M Aug 13 02:03 grafana-bin-13.1.0-1-aarch64.pkg.tar.xz
-rw-r--r-- 1 v v  742 Aug 13 01:50 grafana.install
-rw-r--r-- 1 v v  507 Aug 13 01:50 grafana.service
-rw-r--r-- 1 v v   33 Aug 13 01:50 grafana.sysusers
-rw-r--r-- 1 v v   84 Aug 13 01:50 grafana.tmpfiles
-rw-r--r-- 1 v v 329M Aug 13 01:51 grafana_13.1.0_28013217238_linux_arm64.tar.gz

I am not really sure why this could be happening, with paru sometimes using the cached package build, and sometimes not. Is it perhaps because I was installing this package for the first time on this system (and not upgrading it)? Did I pick the wrong moon phase to do this under? For now, I will continue adding Defaults passwd_timeout = 0 to /etc/suoders to work around this (when I remember to), but it would be great to get to the bottom of this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions