comparison packages.py @ 288:3af02e24eaf9

minor
author drewp@bigasterisk.com
date Sun, 21 Apr 2024 17:01:13 -0700
parents 73ec5064da44
children 65e28d2e0cd8
comparison
equal deleted inserted replaced
287:c094d23b7943 288:3af02e24eaf9
12 vers = '0.31.0' # see https://github.com/kovidgoyal/kitty/releases 12 vers = '0.31.0' # see https://github.com/kovidgoyal/kitty/releases
13 home = '/home/drewp' 13 home = '/home/drewp'
14 local = f"{home}/.local/kitty" 14 local = f"{home}/.local/kitty"
15 dl = f'/tmp/kitty-{vers}-x86_64.txz' 15 dl = f'/tmp/kitty-{vers}-x86_64.txz'
16 files.download(src=f"https://github.com/kovidgoyal/kitty/releases/download/v{vers}/kitty-{vers}-x86_64.txz", dest=dl) 16 files.download(src=f"https://github.com/kovidgoyal/kitty/releases/download/v{vers}/kitty-{vers}-x86_64.txz", dest=dl)
17 files.directory(local) 17 files.directory(path=local)
18 server.shell([ 18 server.shell(commands=[
19 f"mkdir -p {local}", # https://github.com/Fizzadar/pyinfra/issues/777 19 f"mkdir -p {local}", # https://github.com/Fizzadar/pyinfra/issues/777
20 f"aunpack --extract-to={local} {dl}", 20 f"aunpack --extract-to={local} {dl}",
21 ]) 21 ])
22 files.link(target="{local}/bin/kitty", path="{home}/bin/kitty") 22 files.link(target="{local}/bin/kitty", path="{home}/bin/kitty")
23 23
24 24
25 def nodejs(): 25 def nodejs():
26 apt.packages(packages=['libnode72'], present=False, force=True) 26 apt.packages(packages=['libnode72'], present=False, force=True)
27 apt.packages(packages=['nodejs'], latest=True) 27 apt.packages(packages=['nodejs'], latest=True)
28 server.shell([ 28 server.shell(commands=[
29 "rm -f /usr/local/bin/pnp{m,x}", 29 "rm -f /usr/local/bin/pnp{m,x}",
30 "corepack enable", 30 "corepack enable",
31 # https://github.com/pnpm/pnpm/releases 31 # https://github.com/pnpm/pnpm/releases
32 # but also https://pnpm.io/installation#compatibility 32 # but also https://pnpm.io/installation#compatibility
33 "corepack prepare 'pnpm@8.6.3' --activate", 33 "corepack prepare 'pnpm@8.6.3' --activate",
35 35
36 36
37 def podman(): 37 def podman():
38 # frigate build wants to mount a single file from the host, which needs podman 4.5.1 38 # frigate build wants to mount a single file from the host, which needs podman 4.5.1
39 # https://github.com/containers/podman/issues/12123#issuecomment-1620439593 39 # https://github.com/containers/podman/issues/12123#issuecomment-1620439593
40 40 server.shell(commands='apt --fix-broken install')
41
42 server.shell('apt --fix-broken install')
43 apt.deb(src="http://ftp.osuosl.org/pub/ubuntu/pool/main/g/gpgme1.0/libgpgme11t64_1.18.0-4.1ubuntu4_amd64.deb") 41 apt.deb(src="http://ftp.osuosl.org/pub/ubuntu/pool/main/g/gpgme1.0/libgpgme11t64_1.18.0-4.1ubuntu4_amd64.deb")
44 server.shell('apt --fix-broken install') 42 server.shell(commands='apt --fix-broken install')
45 apt.deb(src="http://ftp.osuosl.org/pub/ubuntu/pool/universe/c/conmon/conmon_2.1.10+ds1-1build2_amd64.deb") 43 apt.deb(src="http://ftp.osuosl.org/pub/ubuntu/pool/universe/c/conmon/conmon_2.1.10+ds1-1build2_amd64.deb")
46 apt.deb(src="http://ftp.osuosl.org/pub/ubuntu/pool/universe/libp/libpod/podman_4.9.3+ds1-1build2_amd64.deb") 44 apt.deb(src="http://ftp.osuosl.org/pub/ubuntu/pool/universe/libp/libpod/podman_4.9.3+ds1-1build2_amd64.deb")
47
48
49 # https://ftp.osuosl.org/pub/ubuntu/pool/main/g/gpgme1.0/libgpgme11_1.18.0-3ubuntu2_amd64.deb
50 # apt.deb(src="https://ftp.osuosl.org/pub/ubuntu/pool/main/g/gpgme1.0/libgpgme11t64_1.18.0-4.1ubuntu4_amd64.deb")
51 # apt.deb(src="https://ftp.osuosl.org/pub/ubuntu/pool/universe/libp/libpod/podman_4.9.3+ds1-1build2_amd64.deb")
52 apt.packages(packages=['libsubid4', 'buildah', 'podman-docker'], latest=True) 45 apt.packages(packages=['libsubid4', 'buildah', 'podman-docker'], latest=True)
53 46
54 47
55 def pdm(): 48 def pdm():
56 # https://github.com/pdm-project/pdm/blob/main/CHANGELOG.md 49 # https://github.com/pdm-project/pdm/blob/main/CHANGELOG.md
57 server.shell(["pip install --break-system-packages 'pdm==2.12.4'"]) 50 server.shell(commands=["pip install --break-system-packages 'pdm==2.12.4'"])
58 51
59 52
60 def proper_locate(): 53 def proper_locate():
61 apt.packages(packages='mlocate', present=False) 54 apt.packages(packages='mlocate', present=False)
62 if not is_pi and host.name not in ['prime', 'pipe']: 55 if not is_pi and host.name not in ['prime', 'pipe']: