Mercurial > code > home > repos > infra
changeset 138:5558d8481ddf
nodejs version to 16
author | drewp@bigasterisk.com |
---|---|
date | Tue, 10 Jan 2023 10:52:55 -0800 |
parents | 2acb7a80d92d |
children | 105b628e3bfa |
files | package_lists.py packages.py system.py templates/sources.list.j2 |
diffstat | 4 files changed, 28 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/package_lists.py Wed Dec 21 17:45:05 2022 -0800 +++ b/package_lists.py Tue Jan 10 10:52:55 2023 -0800 @@ -47,8 +47,7 @@ non_pi = [ 'lpr', 'nfs-client', - 'nodejs', - 'npm', + 'nodejs', # alt source, includes npm 'podman-docker', # updated with https://podman.io/getting-started/installation # 'python3-dulwich', # desired, but it may depend on an old python3 'python3-invoke',
--- a/packages.py Wed Dec 21 17:45:05 2022 -0800 +++ b/packages.py Tue Jan 10 10:52:55 2023 -0800 @@ -21,6 +21,8 @@ def pnpm(): + if host not in ['plus', 'prime', 'slash', 'bang', 'dot']: + return server.shell([ # https://github.com/pnpm/pnpm/releases # but also https://pnpm.io/installation#compatibility @@ -39,19 +41,7 @@ apt.packages(packages=['mandb'], present=False) -def pkg_keys(): - # apt.key(keyserver='keyserver.ubuntu.com', keyid='04EE7237B7D453EC') - # apt.key(keyserver='keyserver.ubuntu.com', keyid='648ACFD622F3D138') - # apt.key(keyserver='keyserver.ubuntu.com', keyid='8B48AD6246925553') - # apt.key(keyserver='keyserver.ubuntu.com', keyid='F24AEA9FB05498B7') - apt.key(src='https://dl.google.com/linux/linux_signing_key.pub') - apt.key(src='https://ftp-master.debian.org/keys/archive-key-8-security.asc') - apt.key(src='https://ftp-master.debian.org/keys/archive-key-8.asc') - apt.key(src='https://ftp-master.debian.org/keys/archive-key-9-security.asc') - apt.key(src='https://packages.microsoft.com/keys/microsoft.asc') - - -pkg_keys() +apt.packages(packages=['libnode72'], present=False, force=True) apt.packages(packages=package_lists.setup)
--- a/system.py Wed Dec 21 17:45:05 2022 -0800 +++ b/system.py Tue Jan 10 10:52:55 2023 -0800 @@ -15,12 +15,27 @@ def timezone(): files.link(path='/etc/localtime', target=f'/usr/share/zoneinfo/{TZ}') files.replace(path='/etc/timezone', text='.*', replace=TZ) - + +def pkg_keys(): + # apt.key(keyserver='keyserver.ubuntu.com', keyid='04EE7237B7D453EC') + # apt.key(keyserver='keyserver.ubuntu.com', keyid='648ACFD622F3D138') + # apt.key(keyserver='keyserver.ubuntu.com', keyid='8B48AD6246925553') + # apt.key(keyserver='keyserver.ubuntu.com', keyid='F24AEA9FB05498B7') + if host.name != 'prime': + apt.key(keyserver='keyserver.ubuntu.com', keyid='D0392EC59F9583BA') + apt.key(src='https://dl.google.com/linux/linux_signing_key.pub') + apt.key(src='https://ftp-master.debian.org/keys/archive-key-8-security.asc') + apt.key(src='https://ftp-master.debian.org/keys/archive-key-8.asc') + apt.key(src='https://ftp-master.debian.org/keys/archive-key-9-security.asc') + apt.key(src='https://packages.microsoft.com/keys/microsoft.asc') + apt.key(src='https://deb.nodesource.com/gpgkey/nodesource.gpg.key') + + def apt_sources(): if host.get_fact(Arch) == 'x86_64': server.shell(commands=['dpkg --add-architecture i386']) - files.template(src='templates/sources.list.j2', dest='/etc/apt/sources.list.j2') + files.template(src='templates/sources.list.j2', dest='/etc/apt/sources.list') if host.get_fact(FindFiles, '/etc/apt/sources.list.d/', quote_path=True): raise SystemExit(f"new files in {host.name} /etc/apt/sources.list.d/ - please remove") apt.packages(update=True, @@ -81,6 +96,7 @@ systemd.service(service=f'zfs_space_metrics', enabled=True, restarted=True, daemon_reload=True) timezone() +pkg_keys() apt_sources() fstab() @@ -91,7 +107,7 @@ pi_tmpfs() files.template(src='templates/boot_config.txt.j2', dest='/boot/config.txt') -if not is_pi: +if not is_pi: podman_inecure_registry() if host.name in ['bang', 'pipe']:
--- a/templates/sources.list.j2 Wed Dec 21 17:45:05 2022 -0800 +++ b/templates/sources.list.j2 Tue Jan 10 10:52:55 2023 -0800 @@ -12,6 +12,7 @@ deb http://us.archive.ubuntu.com/ubuntu jammy-updates main restricted deb http://us.archive.ubuntu.com/ubuntu jammy-updates multiverse deb http://us.archive.ubuntu.com/ubuntu jammy-updates universe +deb [signed-by=/etc/apt/trusted.gpg] https://deb.nodesource.com/node_16.x jammy main {% endif %} {% if host.name in ['bang'] %} @@ -28,6 +29,7 @@ deb http://us.archive.ubuntu.com/ubuntu jammy-updates main restricted deb http://us.archive.ubuntu.com/ubuntu jammy-updates multiverse deb http://us.archive.ubuntu.com/ubuntu jammy-updates universe +deb [signed-by=/etc/apt/trusted.gpg] https://deb.nodesource.com/node_16.x jammy main {% endif %} {% if host.name in ['slash'] %} @@ -44,6 +46,7 @@ deb http://us.archive.ubuntu.com/ubuntu jammy-updates main restricted deb http://us.archive.ubuntu.com/ubuntu jammy-updates multiverse deb http://us.archive.ubuntu.com/ubuntu jammy-updates universe +deb [signed-by=/etc/apt/trusted.gpg] https://deb.nodesource.com/node_16.x jammy main {% endif %} {% if host.name in ['dot'] %} @@ -60,6 +63,7 @@ deb http://us.archive.ubuntu.com/ubuntu jammy-updates main restricted deb http://us.archive.ubuntu.com/ubuntu jammy-updates multiverse deb http://us.archive.ubuntu.com/ubuntu jammy-updates universe +deb [signed-by=/etc/apt/trusted.gpg] https://deb.nodesource.com/node_16.x jammy main {% endif %} {% if host.name in ['pipe'] %} @@ -110,4 +114,5 @@ deb http://us.archive.ubuntu.com/ubuntu jammy-updates main restricted deb http://us.archive.ubuntu.com/ubuntu jammy-updates multiverse deb http://us.archive.ubuntu.com/ubuntu jammy-updates universe +deb [signed-by=/etc/apt/trusted.gpg] https://deb.nodesource.com/node_16.x jammy main {% endif %}