From 16cf99ebffd536f3b1e236d6568f15d1cfcad6fb Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Thu, 2 Jul 2026 13:55:29 +0100 Subject: [PATCH] ansible: update cargo/rust on Debian 13 Use Debian backports to install newer versions of cargo and rustc on Debian 13. Signed-off-by: Richard Lau --- .../tasks/partials/postinstall/debian13.yml | 10 ++++++++ .../tasks/partials/repo/debian13.yml | 25 +++++++++++++++++++ ansible/roles/baselayout/vars/main.yml | 3 ++- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 ansible/roles/baselayout/tasks/partials/postinstall/debian13.yml create mode 100644 ansible/roles/baselayout/tasks/partials/repo/debian13.yml diff --git a/ansible/roles/baselayout/tasks/partials/postinstall/debian13.yml b/ansible/roles/baselayout/tasks/partials/postinstall/debian13.yml new file mode 100644 index 000000000..73b8dd9ab --- /dev/null +++ b/ansible/roles/baselayout/tasks/partials/postinstall/debian13.yml @@ -0,0 +1,10 @@ +--- + +# Debian 13 + +- name: install packages from backports + ansible.builtin.apt: + autoremove: true + default_release: trixie-backports + name: cargo, rustc + state: latest diff --git a/ansible/roles/baselayout/tasks/partials/repo/debian13.yml b/ansible/roles/baselayout/tasks/partials/repo/debian13.yml new file mode 100644 index 000000000..acc709649 --- /dev/null +++ b/ansible/roles/baselayout/tasks/partials/repo/debian13.yml @@ -0,0 +1,25 @@ +--- + +# Debian 13 + +- name: install prereqs for deb822_repository task + ansible.builtin.apt: + name: python3-debian + state: present + +- name: enable debian_backports repository + ansible.builtin.deb822_repository: + architectures: amd64 + components: main + enabled: true + name: debian-backports + signed_by: /usr/share/keyrings/debian-archive-keyring.gpg + suites: trixie-backports + types: deb + uris: http://deb.debian.org/debian + register: debian_backports_repo_install_result + +- name: update apt cache + ansible.builtin.apt: + update_cache: true + when: debian_backports_repo_install_result.changed diff --git a/ansible/roles/baselayout/vars/main.yml b/ansible/roles/baselayout/vars/main.yml index e7c98d91c..967fcf975 100644 --- a/ansible/roles/baselayout/vars/main.yml +++ b/ansible/roles/baselayout/vars/main.yml @@ -61,8 +61,9 @@ packages: { 'systemd-timesyncd,clang-19,gcc,g++,make,ccache,git,curl,libfontconfig1,apt-transport-https,ca-certificates,sudo,python3-venv', ], + # cargo and rustc are installed from debian backports, see ansible/roles/baselayout/tasks/partials/postinstall/debian13.yml debian13: [ - 'apt-transport-https,ca-certificates,cargo,clang-19,gcc,g++,make,ccache,git,curl,libfontconfig1,python3-packaging,python3-venv,rustc,sudo,systemd-timesyncd', + 'apt-transport-https,ca-certificates,clang-19,gcc,g++,make,ccache,git,curl,libfontconfig1,python3-packaging,python3-venv,sudo,systemd-timesyncd', ], fedora: [