diff options
author | Jonathan Bauer | 2018-02-09 16:55:13 +0100 |
---|---|---|
committer | Jonathan Bauer | 2018-02-09 16:55:13 +0100 |
commit | ae47924a54b897d9710079afd1fe4ed47913e58b (patch) | |
tree | d27a3d8ccaf200815c8cb89e51e7dcb72b352f09 | |
parent | [bwlp] remove redundant setup pre-task (diff) | |
download | ansible-dracut-ae47924a54b897d9710079afd1fe4ed47913e58b.tar.gz ansible-dracut-ae47924a54b897d9710079afd1fe4ed47913e58b.tar.xz ansible-dracut-ae47924a54b897d9710079afd1fe4ed47913e58b.zip |
[dracut-init] externalize dnbd3 compile fixes
-rw-r--r-- | dracut-initramfs-builder/tasks/dnbd3-fixes.yml | 17 | ||||
-rw-r--r-- | dracut-initramfs-builder/tasks/main.yml | 11 |
2 files changed, 20 insertions, 8 deletions
diff --git a/dracut-initramfs-builder/tasks/dnbd3-fixes.yml b/dracut-initramfs-builder/tasks/dnbd3-fixes.yml new file mode 100644 index 0000000..e9bd6dd --- /dev/null +++ b/dracut-initramfs-builder/tasks/dnbd3-fixes.yml @@ -0,0 +1,17 @@ +--- +- name: Hack fix dnbd3 blk.c for Ubuntu newer kernels + replace: + dest: "{{ gittarget }}/builder/modules.d/dnbd3-rootfs/scripts/build.sh" + regexp: 'make -j4 dnbd3 dnbd3-client' + replace: 'sed -i "s/backing_dev_info.ra_pages/backing_dev_info->ra_pages/g" blk.c && make -j4 dnbd3 dnbd3-client' + backup: yes + when: + - ansible_distribution == "Ubuntu" +- name: Hack fix dnbd3 blk.h for CentOS kernels with backports + replace: + dest: "{{ gittarget }}/builder/modules.d/dnbd3-rootfs/scripts/build.sh" + regexp: 'make -j4 dnbd3 dnbd3-client' + replace: 'sed -i "s/KERNEL_VERSION.*/KERNEL_VERSION\(3, 10, 0\)/g" blk.h && make -j4 dnbd3 dnbd3-client' + backup: yes + when: + - ansible_distribution == "CentOS" diff --git a/dracut-initramfs-builder/tasks/main.yml b/dracut-initramfs-builder/tasks/main.yml index 6c8042a..b50e57d 100644 --- a/dracut-initramfs-builder/tasks/main.yml +++ b/dracut-initramfs-builder/tasks/main.yml @@ -10,14 +10,9 @@ repo: "{{ gitsource }}" dest: "{{ gittarget }}" depth: 1 -- name: Hack fix dnbd3 blk.h for CentOS (one day this should get fixed in dnbd3 :)) - replace: - dest: "{{ gittarget }}/builder/modules.d/dnbd3-rootfs/scripts/build.sh" - regexp: 'make -j4 dnbd3 dnbd3-client' - replace: 'sed -i "s/KERNEL_VERSION.*/KERNEL_VERSION\(3, 10, 0\)/g" blk.h && make -j4 dnbd3 dnbd3-client' - backup: yes - when: - - ansible_distribution == "CentOS" + +- include: tasks/dnbd3-fixes.yml + - name: Build initramfs with dracut shell: "{{ gittarget }}/builder/build-initramfs.sh -s -d -p {{ gittarget }}/initramfs" args: |