Update example/add reqs, support for f32 and kernel 5.6+
This commit is contained in:
parent
ac58fa64a6
commit
9f5b50f6da
2 changed files with 42 additions and 33 deletions
65
README.md
65
README.md
|
@ -1,52 +1,55 @@
|
|||
### build_kernel
|
||||
### build-kernel
|
||||
This playbook is used to automatically build a kernel with an ACS overrides patch applied. Useful to isolate PCI-e devices to their own IOMMU group for VFIO passthrough.
|
||||
|
||||
See this page for kernel configuration details: https://copr.fedorainfracloud.org/coprs/jlay/kernel-acspatch/
|
||||
|
||||
### Requirements
|
||||
- Inventory with one host
|
||||
- `hosts-local` provided as a sample inventory for localhost
|
||||
- This host must be running Fedora (builds use mock)
|
||||
|
||||
### Example usage
|
||||
```
|
||||
jlay@workstation:~/git/ansible/build_kernel$ ansible-playbook -i hosts playbook.yml
|
||||
$ ansible-playbook -i buildserver playbook.yml -b --ask-become-pass
|
||||
BECOME password:
|
||||
|
||||
PLAY [buildservers] ******************************************************************************************************************************************
|
||||
PLAY [buildservers] *******************************************************************************************************************************************
|
||||
|
||||
TASK [Gathering Facts] ******************************************************************************************************************************************
|
||||
ok: [delta.jlay.io]
|
||||
TASK [Gathering Facts] ****************************************************************************************************************************************
|
||||
ok: [buildserver]
|
||||
|
||||
TASK [Ensure libselinux-python is installed] ******************************************************************************************************************************************
|
||||
ok: [delta.jlay.io]
|
||||
TASK [Ensure fedpkg is installed] *****************************************************************************************************************************
|
||||
changed: [buildserver]
|
||||
|
||||
TASK [Ensure fedpkg is installed] ******************************************************************************************************************************************
|
||||
ok: [delta.jlay.io]
|
||||
TASK [Find old mock chroots] **********************************************************************************************************************************
|
||||
ok: [buildserver]
|
||||
|
||||
TASK [Find old mock chroots] ******************************************************************************************************************************************
|
||||
ok: [delta.jlay.io]
|
||||
TASK [Clean old mock chroots] *********************************************************************************************************************************
|
||||
|
||||
TASK [Clean old mock chroots] ******************************************************************************************************************************************
|
||||
TASK [Clean old build dir] ************************************************************************************************************************************
|
||||
ok: [buildserver]
|
||||
|
||||
TASK [Clean old build dir] ******************************************************************************************************************************************
|
||||
changed: [delta.jlay.io]
|
||||
TASK [Clone f32 kernel to /tmp/f32_kernel] ********************************************************************************************************************
|
||||
changed: [buildserver]
|
||||
|
||||
TASK [Clone f29 kernel to /tmp/f29_kernel] ******************************************************************************************************************************************
|
||||
changed: [delta.jlay.io]
|
||||
TASK [Copy patch to build dir] ********************************************************************************************************************************
|
||||
changed: [buildserver]
|
||||
|
||||
TASK [Copy patch to build dir] ******************************************************************************************************************************************
|
||||
changed: [delta.jlay.io]
|
||||
TASK [Copy newpatch.sh on master branch, for 5.6 on f31] ******************************************************************************************************
|
||||
changed: [buildserver]
|
||||
|
||||
TASK [Apply patch and build kernel (logs in /tmp/f29_kernel/results_kernel/*)] ******************************************************************************************************************************************
|
||||
changed: [delta.jlay.io] => (item=./scripts/newpatch.sh acso-4.18.patch)
|
||||
changed: [delta.jlay.io] => (item=/usr/bin/sed -i -e 's/%define buildid .*$/%define buildid .acspatch/' kernel.spec)
|
||||
changed: [delta.jlay.io] => (item=/usr/bin/make release)
|
||||
changed: [delta.jlay.io] => (item=fedpkg mockbuild)
|
||||
TASK [Apply patch and build kernel (logs in /tmp/f32_kernel/results_kernel/*)] ********************************************************************************
|
||||
changed: [buildserver] => (item=./scripts/newpatch.sh acso-5.4.6.patch)
|
||||
changed: [buildserver] => (item=/usr/bin/sed -i -e 's/%define buildid .*$/%define buildid .acspatch/' kernel.spec)
|
||||
changed: [buildserver] => (item=/usr/bin/make release)
|
||||
changed: [buildserver] => (item=fedpkg mockbuild)
|
||||
|
||||
TASK [Find RPMs in /tmp/f29_kernel/results_kernel/*/*/*.rpm] ******************************************************************************************************************************************
|
||||
ok: [delta.jlay.io]
|
||||
TASK [Find RPMs in /tmp/f32_kernel/results_kernel/*/*/*.rpm] **************************************************************************************************
|
||||
ok: [buildserver]
|
||||
|
||||
TASK [Copy RPMs to /tmp/ (local)] ******************************************************************************************************************************************
|
||||
ok: [delta.jlay.io] => (item={'uid': 0, 'woth': False, 'mtime': 1545900251.552329, 'inode': 1086935, 'isgid': False, 'size': 104419185, 'roth': True, 'isuid': False, 'isreg': True, 'pw_name': 'root', 'gid': 135, 'ischr': False, 'wusr': True, 'xoth': False, 'rusr': True, 'nlink': 1, 'issock': False, 'rgrp': True, 'gr_name': 'mock', 'path': '/tmp/f29_kernel/results_kernel/4.19.12/302.acspatch.fc29/kernel-4.19.12-302.acspatch.fc29.src.rpm', 'xusr': False, 'atime': 1545932715.7957838, 'isdir': False, 'ctime': 1545926304.4206192, 'isblk': False, 'xgrp': False, 'dev': 41, 'wgrp': False, 'isfifo': False, 'mode': '0644', 'islnk': False})
|
||||
TASK [Copy RPMs to /tmp/ (local)] *****************************************************************************************************************************
|
||||
[...]
|
||||
|
||||
PLAY RECAP ******************************************************************************************************************************************
|
||||
delta.jlay.io : ok=8 changed=4 unreachable=0 failed=0
|
||||
|
||||
jlay@workstation:~/git/ansible/build_kernel$
|
||||
PLAY RECAP ****************************************************************************************************************************************************
|
||||
buildserver : ok=10 changed=6 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0
|
||||
```
|
||||
|
|
10
playbook.yml
10
playbook.yml
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
- hosts: buildservers
|
||||
vars:
|
||||
fedora_version: f31
|
||||
patch_file: acso-5.4.6.patch # This patch has been modified to work on 5.4+
|
||||
fedora_version: f32
|
||||
patch_file: acso-5.4.6.patch # This patch has been modified to work on 5.6+
|
||||
run_epoch: "{{ ansible_date_time.epoch }}"
|
||||
build_dir: /tmp/{{ fedora_version }}_kernel
|
||||
tasks:
|
||||
|
@ -40,6 +40,12 @@
|
|||
copy:
|
||||
src: payload/{{ patch_file }}
|
||||
dest: "{{ build_dir }}"
|
||||
- name: Copy newpatch.sh on master branch, for 5.6 on f31
|
||||
copy:
|
||||
src: files/newpatch.sh
|
||||
mode: 0775
|
||||
dest: "{{ build_dir }}/scripts/"
|
||||
when: (fedora_version in ['master', 'f32'])
|
||||
- name: Apply patch and build kernel (logs in {{ build_dir }}/results_kernel/*)
|
||||
command: "{{ item }} chdir={{ build_dir }}"
|
||||
with_items:
|
||||
|
|
Loading…
Reference in a new issue