Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci-live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ jobs:
run: zypper modifyrepo -d repo-non-oss repo-openh264 repo-update && zypper ref

- name: Install Ruby development files
run: zypper --non-interactive install
make
run: zypper --non-interactive install ShellCheck make

- name: Run shellcheck
run: make shellcheck

- name: Run the tests
run: make check
11 changes: 10 additions & 1 deletion live/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,13 @@ build: $(DESTDIR)
check:
for i in ./test/*_test.*; do $${i} || exit 1; done

.PHONY: build all clean
# Shellcheck reports lots of warnings, run it in the error-only mode first. If that succeeds run it
# in full mode with warnings but ignore the failures (some are false positives).
# TODO: Fix/disable the warnings and run it in more strict mode.
shellcheck:
@find config-cdroot root src -type f -exec grep -l -E "^#! *(/usr/|)/bin/(ba|)sh" \{\} \; \
| xargs -I% bash -c "echo 'Checking errors in %...' && shellcheck --severity=error %"
@find config-cdroot root src -type f -exec grep -l -E "^#! *(/usr/|)/bin/(ba|)sh" \{\} \; \
| xargs -I% bash -c "echo 'Checking warnings in %...' && shellcheck %" || true

.PHONY: build all clean shellcheck
2 changes: 1 addition & 1 deletion live/config-cdroot/fix_bootconfig.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if [ -d "$dst/boot/grub2/themes/SLE" ]; then
theme="SLE"
else
theme="openSUSE"
end
fi
Comment thread
imobachgs marked this conversation as resolved.

#
# Create grub.cfg
Expand Down
14 changes: 9 additions & 5 deletions live/src/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,14 @@ echo 'add_dracutmodules+=" agama-logging "' > /etc/dracut.conf.d/10-agama-loggin
# FIXME: remove when the module is included in the default driver list in
# in /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh, see
# https://github.com/openSUSE/dracut/blob/7559201e7480a65b0da050263d96a1cd8f15f50d/modules.d/90kernel-modules/module-setup.sh#L42-L46
if [ -f /lib/modules/*/kernel/drivers/usb/host/xhci-pci-renesas.ko* ]; then
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://www.shellcheck.net/wiki/SC2144 for more details about the problem.

echo "Adding xhci-pci-renesas driver to initrd..."
echo 'add_drivers+=" xhci-pci-renesas "' > /etc/dracut.conf.d/10-extra-drivers.conf
fi
for file in /lib/modules/*/kernel/drivers/usb/host/xhci-pci-renesas.ko*
do
if [ -f "$file" ]; then
echo "Adding xhci-pci-renesas driver to initrd..."
echo 'add_drivers+=" xhci-pci-renesas "' > /etc/dracut.conf.d/10-extra-drivers.conf
break
fi
done

if [ "${arch}" = "s390x" ]; then
# workaround for custom bootloader setting
Expand Down Expand Up @@ -174,7 +178,7 @@ if [ -n "$python" ]; then
# avoid removing python accidentally because of some new unknown dependency
python_deps=$(echo "$python_deps" | grep -v -e "Failed dependencies" -e "needed by .* libpython" -e "needed by .* bcache-tools" -e "needed by .* xfsprogs" || true)

if [ -z "$python_deps"]; then
if [ -z "$python_deps" ]; then
echo "Removing Python..."
# remove libpython as well
rpm -e --nodeps "$python" $(rpm -qa | grep "^libpython3")
Expand Down