Skip to content

Commit

Permalink
imagebuilder: use APK feed on snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
pktpls committed Nov 15, 2024
1 parent b425061 commit c50d41c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
4 changes: 4 additions & 0 deletions roles/cfg_openwrt/files/falter.snapshot.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEE1NSmLpdMjXJpDQki9ziqW3Ve0aIX99t
uAc1Yn5TexwhBhHsGxUxICHS63pDXYj9xg1AZHlvbEnFrBNrsdjJQQ==
-----END PUBLIC KEY-----
19 changes: 16 additions & 3 deletions roles/cfg_openwrt/tasks/imagebuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,37 @@
instr_set: "{{ instr_set_result.stdout_lines | first }}"
when: 'instr_set is not defined and feed_version is defined'

- name: Insert falter feed
- name: Insert falter opkg feed
lineinfile:
path: "{{ build_dir }}/repositories.conf"
line: "{{ feed | replace('__INSTR_SET__', instr_set) | replace('__FEED_VERSION__', feed_version) }}"
when: 'feed_version is defined'
when: 'feed_version is defined and openwrt_version != "snapshot"'

- name: Insert falter apk feed
lineinfile:
path: "{{ build_dir }}/repositories"
line: "{{ feed | replace('__INSTR_SET__', instr_set) | replace('__FEED_VERSION__', feed_version) }}"
when: 'feed_version is defined and openwrt_version == "snapshot"'

- name: Define Key-Dir
stat:
path: "{{ build_dir }}/keys/"
register: keydir

- name: Add falter feed key
- name: Add falter opkg feed key
copy:
src: "files/packagefeed_master.pub"
dest: "{{ build_dir }}/keys/61a078a38408e710" # matches fingerprint
mode: "preserve"
when: 'feed_version is defined and keydir.stat.exists'

- name: Add falter apk feed key
copy:
src: "files/falter.snapshot.pem"
dest: "{{ build_dir }}/keys/"
mode: "preserve"
when: 'feed_version is defined and keydir.stat.exists'

- name: Disable Signature verification if required
lineinfile:
path: "{{ build_dir }}/repositories.conf"
Expand Down

0 comments on commit c50d41c

Please sign in to comment.