-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an ansible task for openSUSE which will use the configure options used by the official openSUSE package. Signed-off-by: Michael Vetter <[email protected]>
- Loading branch information
Showing
4 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
# tasks file for ci_run | ||
- name: Ensure python is installed | ||
ansible.builtin.raw: zypper --non-interactive in python3 | ||
|
||
- name: Ensure dependencies are installed | ||
community.general.zypper: | ||
name: | ||
- autoconf | ||
- automake | ||
- byacc | ||
- diffutils | ||
- gawk | ||
- gcc | ||
- gettext-tools | ||
- intltool | ||
- libcmocka-devel | ||
- libtool | ||
- libxslt-tools | ||
- make | ||
- systemd-devel | ||
state: present | ||
|
||
# Needed to use `zypper si` | ||
- name: Enable all repos | ||
ansible.builtin.command: | ||
zypper --non-interactive mr -ea | ||
|
||
- name: Ensure build dependencies are installed | ||
ansible.builtin.command: | ||
zypper --non-interactive si -d shadow | ||
register: zypper_result | ||
changed_when: '"Nothing to do" not in zypper_result.stdout' | ||
|
||
- name: Build configuration | ||
ansible.builtin.command: > | ||
./autogen.sh | ||
--enable-account-tools-setuid | ||
--enable-shadowgrp | ||
--with-acl | ||
--with-attr | ||
--with-audit | ||
--with-group-name-max-length=32 | ||
--with-libpam | ||
--with-nscd | ||
--with-selinux | ||
--with-sha-crypt | ||
--without-libbsd | ||
--without-libcrack | ||
--without-sssd | ||
args: | ||
chdir: /usr/local/src/shadow/ | ||
ignore_errors: true | ||
|
||
- name: Build | ||
ansible.builtin.shell: | ||
make -Orecurse -j4 > build.log | ||
args: | ||
chdir: /usr/local/src/shadow/ | ||
ignore_errors: true | ||
|
||
- name: Run unit-tests | ||
ansible.builtin.command: | ||
make check | ||
args: | ||
chdir: /usr/local/src/shadow/ | ||
ignore_errors: true | ||
|
||
- name: Install | ||
ansible.builtin.command: | ||
make install | ||
args: | ||
chdir: /usr/local/src/shadow/ | ||
ignore_errors: true | ||
|
||
- name: Copy logs | ||
ansible.builtin.fetch: | ||
src: '{{ item }}' | ||
dest: ./build-out/ | ||
flat: yes | ||
with_items: | ||
- "/usr/local/src/shadow/config.log" | ||
- "/usr/local/src/shadow/config.h" | ||
- "/usr/local/src/shadow/build.log" | ||
- "/usr/local/src/shadow/tests/unit/test-suite.log" | ||
|
||
- name: Copy configuration file for testing | ||
ansible.builtin.copy: | ||
src: /usr/local/src/shadow/tests/system/etc/login.defs | ||
dest: /etc/login.defs | ||
remote_src: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters