Package Details: pacman-static 7.0.0.r3.g7736133-9

Git Clone URL: https://aur.archlinux.org/pacman-static.git (read-only, click to copy)
Package Base: pacman-static
Description: Statically-compiled pacman (to fix or install systems without libc)
Upstream URL: https://www.archlinux.org/pacman/
Licenses: GPL-2.0-or-later
Submitter: mazieres
Maintainer: Morganamilo (andreas_baumann)
Last Packager: andreas_baumann
Votes: 57
Popularity: 2.77
First Submitted: 2013-01-09 02:17 (UTC)
Last Updated: 2024-11-23 08:26 (UTC)

Dependencies (5)

Required by (0)

Sources (26)

Pinned Comments

Morganamilo commented on 2022-02-20 18:30 (UTC)

There's now a custom repo and binaries again. Though only for x86_64 currently.

Custom Repo
[pacman-static]
SigLevel = Required
Server = https://pkgbuild.com/~morganamilo/$repo/$arch
Pre compiled binaries

https://pkgbuild.com/~morganamilo/pacman-static/x86_64/bin/

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 11 .. 13 Next › Last »

andreas_baumann commented on 2024-01-16 19:08 (UTC) (edited on 2024-01-17 06:48 (UTC) by andreas_baumann)

Actually:

    for exe in "${pkgdir}"/usr/bin/*; do
        if [[ -f ${exe} && $(head -c4 "${exe}") = $'\x7fELF' ]]; then
            mv "${exe}" "${exe}"-static
        else
            rm "${exe}"
        fi
    done

makes static versions of things which are recognized as ELF binaries. pacman-key and all the other "binaries" you mentioned are shell scripts.

The shell scripts might contain calls to pacman instead of pacman-static, that might be something one could patch, on the other hand the pacman to use can be set via environment:

# set pacman command if not already defined
PACMAN=${PACMAN:-pacman}

So, something like PACMAN=pacman-static makepkg -s should actually work. pacman-key should actually just manipulate the keys in /etc/pacman.d/gnupg without the help of pacman or pacman-static (as far as I can tell). Besides, those can also be manipulated directly with gpg.

Building packages while your standard pacman is broken, is maybe not a smart idea to begin with and you should fix your standard pacman first.

Well, "repo-elaphants" are actually absolutely crucial to run statically.. ;-)

Opinions?

LukeShortCloud commented on 2024-01-15 19:32 (UTC)

Would it be possible to add pacman-key-static to this build? For situations where (1) Pacman is broken and (2) the GPG keyrings used by Pacman are also broken this would be really helpful. I know I can set SigLevel = Never in the Pacman configuration to workaround those issues but it would be ideal to have trusted packages.

I compared the binaries from pacman and pacman-static packages. These are the missing ones: makepkg, makepkg-template, pacman-db-upgrade, pacman-key, repo-add, repo-elephant, and repo-move. I am not sure how useful most of those are to have as statically built but I do have a lot of old systems (last update was from 1.5+ years ago) where at least having pacman-key-static would be beneficial. On those systems, the GPG keys are so old that they need to be recreated from scratch. This required workaround below cannot be done when GLIBC was upgraded but pacman and pacman-key are broken:

rm -r -f /etc/pacman.d/gnupg
pacman-key --init
pacman-static -S archlinux-keyring

andreas_baumann commented on 2024-01-05 13:21 (UTC)

updated c-ares to 1.25.0

andreas_baumann commented on 2023-12-09 15:37 (UTC)

The downgrading issue didn't appear again with pkgver=12.

andreas_baumann commented on 2023-12-09 11:48 (UTC)

updated c-ares to 1.23.0, curl to 8.5.0, gpgme to 1.32.2

andreas_baumann commented on 2023-12-02 10:48 (UTC) (edited on 2023-12-02 10:49 (UTC) by andreas_baumann)

Interesting issue with newer pacman-static: it downgrades certain packages. No clue why. Maybe the sync databases are read differently?

andreas_baumann commented on 2023-11-30 10:46 (UTC)

updated c-ares to 1.22.1

andreas_baumann commented on 2023-11-03 07:09 (UTC)

updated c-ares to 1.21.0, gpgme to 1.23.1, nghttp2 to 1.58.0

andreas_baumann commented on 2023-10-26 07:42 (UTC)

updated openssl to 3.1.4

andreas_baumann commented on 2023-10-15 07:11 (UTC)

updated curl to 8.4.0, c-ares to 1.20.1 and nghttp2 to 1.57.0