comparison apt.py @ 249:5c10b1e8d0e1

add unity key
author drewp@bigasterisk.com
date Mon, 08 Jan 2024 18:38:55 -0800
parents ff36727f3a10
children 11b738d4c4ae
comparison
equal deleted inserted replaced
248:7566ede833cf 249:5c10b1e8d0e1
22 22
23 apt.packages(packages=['curl']) 23 apt.packages(packages=['curl'])
24 server.shell(commands=[ 24 server.shell(commands=[
25 f"curl -fsSL {url} | gpg --dearmor > /etc/apt/keyrings/{name}" for (url, name) in [ 25 f"curl -fsSL {url} | gpg --dearmor > /etc/apt/keyrings/{name}" for (url, name) in [
26 ('https://packages.microsoft.com/keys/microsoft.asc', 'ms.gpg'), 26 ('https://packages.microsoft.com/keys/microsoft.asc', 'ms.gpg'),
27 ('https://deb.nodesource.com/gpgkey/nodesource.gpg.key', 'nodesource-older.gpg'), # rm after everything's on 23.10 27 ('https://deb.nodesource.com/gpgkey/nodesource.gpg.key', 'nodesource-older.gpg'), # rm after everything's on 23.10
28 ('https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key', 'nodesource.gpg'), 28 ('https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key', 'nodesource.gpg'),
29 ('https://dl.google.com/linux/linux_signing_key.pub', 'chrome.gpg'), 29 ('https://dl.google.com/linux/linux_signing_key.pub', 'chrome.gpg'),
30 ('https://ftp-master.debian.org/keys/archive-key-11.asc', 'bullseye.gpg'), 30 ('https://ftp-master.debian.org/keys/archive-key-11.asc', 'bullseye.gpg'),
31 ('https://ftp-master.debian.org/keys/archive-key-11-security.asc', 'bullseye-security.gpg'), 31 ('https://ftp-master.debian.org/keys/archive-key-11-security.asc', 'bullseye-security.gpg'),
32 ('https://packages.cloud.google.com/apt/doc/apt-key.gpg', 'coral.gpg'), 32 ('https://packages.cloud.google.com/apt/doc/apt-key.gpg', 'coral.gpg'),
33 ('https://hub.unity3d.com/linux/keys/public', 'unityhub.gpg'),
33 ] 34 ]
34 ]) 35 ])
35 if host.get_fact(Arch) == 'armv7l' or host.name == 'bang': # I mean raspbian/debian 36 if host.get_fact(Arch) == 'armv7l' or host.name == 'bang': # I mean raspbian/debian
36 # this contaminates the apt-update 37 # this contaminates the apt-update
37 files.file(path="/etc/apt/trusted.gpg.d/podman.asc", present=False) 38 files.file(path="/etc/apt/trusted.gpg.d/podman.asc", present=False)
38 39
39 # also these 40 # also these
40 #-rw-r--r-- 1 root root 2794 Mar 26 2021 /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg 41 #-rw-r--r-- 1 root root 2794 Mar 26 2021 /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg
41 #-rw-r--r-- 1 root root 1733 Mar 26 2021 /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg 42 #-rw-r--r-- 1 root root 1733 Mar 26 2021 /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg
42 43
44
43 dir = Path('/etc/apt/sources.list.d') 45 dir = Path('/etc/apt/sources.list.d')
44 46
45 47
46 def clear_known_sources_files(known=[ 48 def clear_known_sources_files(known=[
47 dir / 'vscode.list', 49 dir / 'vscode.list',
48 dir / 'google-chrome.list', 50 dir / 'google-chrome.list',
49 dir / 'steam-beta.list', 51 dir / 'steam-beta.list',
50 dir / 'google-chrome-unstable.list', 52 dir / 'google-chrome-unstable.list',
51 dir / 'steam-stable.list', 53 dir / 'steam-stable.list',
52 ]): 54 ]):
53 found = map(Path, host.get_fact(FindFiles, dir, quote_path=True)) 55 found = map(Path, host.get_fact(FindFiles, dir, quote_path=True))
54 if set(found) - set(known): 56 if set(found) - set(known):
55 raise SystemExit(f"new files in {host.name} /etc/apt/sources.list.d/ - please remove") 57 raise SystemExit(f"new files in {host.name} /etc/apt/sources.list.d/ - please remove")
56 for f in known: 58 for f in known: