Merge ~cyruslien/plainbox-provider-pc-sanity/+git/plainbox-provider-pc-sanity-2:fix-noble-build-and-install-issues into plainbox-provider-pc-sanity:master

Proposed by Cyrus Lien
Status: Merged
Approved by: Shih-Yuan Lee
Approved revision: 842c583b77e963f0bddc1ae0990f7e8ee0f1633a
Merged at revision: e713912c9998ce92abda41108509fc431b42245e
Proposed branch: ~cyruslien/plainbox-provider-pc-sanity/+git/plainbox-provider-pc-sanity-2:fix-noble-build-and-install-issues
Merge into: plainbox-provider-pc-sanity:master
Diff against target: 226 lines (+34/-26)
12 files modified
bin/boot-up-time-check.sh (+1/-1)
bin/check-nvidia.sh (+9/-9)
bin/check-turbostat-power-residency.sh (+1/-1)
bin/check_wifi6e.py (+3/-3)
bin/edid_continuous_frequency_check.py (+1/-1)
bin/get-oem-info.sh (+1/-0)
bin/oval-report.py (+3/-3)
bin/screen-pkg.py (+3/-3)
bin/touchpad-support.sh (+1/-1)
debian/control (+2/-0)
debian/rules (+9/-2)
units/pc-sanity/pc-sanity-check-env.pxu (+0/-2)
Reviewer Review Type Date Requested Status
Dirk Su Approve
Shih-Yuan Lee Approve
Review via email: mp+465564@code.launchpad.net
To post a comment you must log in.
Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

LGTM

review: Approve
Revision history for this message
Dirk Su (dirksu) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/boot-up-time-check.sh b/bin/boot-up-time-check.sh
2index 1b606a4..883612c 100755
3--- a/bin/boot-up-time-check.sh
4+++ b/bin/boot-up-time-check.sh
5@@ -9,7 +9,7 @@ if (systemctl is-active graphical.target); then
6 systemctl is-active --quiet gdm3.service || RET=$?
7 if [[ "$RET" -ne 0 ]]; then
8 echo "gdm3.service is not active. Exit code: $RET"
9- exit $RET
10+ exit "$RET"
11 fi
12
13 OUTPUT=$(systemd-analyze)
14diff --git a/bin/check-nvidia.sh b/bin/check-nvidia.sh
15index 1669901..30b3caf 100755
16--- a/bin/check-nvidia.sh
17+++ b/bin/check-nvidia.sh
18@@ -47,23 +47,23 @@ show_error() {
19 collect_nvidia_debug_info() {
20 local logs_folder="$OUTPUT_FOLDER/nvidia-debug-logs"
21 mkdir -p "$logs_folder"
22- echo "/proc/driver/nvidia/params:" >> $OUTPUT_FOLDER/nvidia-debug-log
23+ echo "/proc/driver/nvidia/params:" >> "$OUTPUT_FOLDER"/nvidia-debug-log
24 if [ -f /proc/driver/nvidia/params ]; then
25- cat /proc/driver/nvidia/params >> $OUTPUT_FOLDER/nvidia-debug-log
26+ cat /proc/driver/nvidia/params >> "$OUTPUT_FOLDER"/nvidia-debug-log
27 else
28- echo "file is not there" >> $OUTPUT_FOLDER/nvidia-debug-log
29+ echo "file is not there" >> "$OUTPUT_FOLDER"/nvidia-debug-log
30 fi
31
32- echo "/var/log/gpu-manager.log:" >> $OUTPUT_FOLDER/nvidia-debug-log
33+ echo "/var/log/gpu-manager.log:" >> "$OUTPUT_FOLDER"/nvidia-debug-log
34 if [ -f /var/log/gpu-manager.log ]; then
35- cp /var/log/gpu-manager.log $logs_folder
36- echo "Copied file to $logs_folder" >> $OUTPUT_FOLDER/nvidia-debug-log
37+ cp /var/log/gpu-manager.log "$logs_folder"
38+ echo "Copied file to $logs_folder" >> "$OUTPUT_FOLDER"/nvidia-debug-log
39 else
40- echo "file is not there" >> $OUTPUT_FOLDER/nvidia-debug-log
41+ echo "file is not there" >> "$OUTPUT_FOLDER"/nvidia-debug-log
42 fi
43
44- echo "nvidia-smi:" >> $OUTPUT_FOLDER/nvidia-debug-log
45- nvidia-smi >> $OUTPUT_FOLDER/nvidia-debug-log
46+ echo "nvidia-smi:" >> "$OUTPUT_FOLDER"/nvidia-debug-log
47+ nvidia-smi >> "$OUTPUT_FOLDER"/nvidia-debug-log
48 }
49
50 is_nv_bootvga() {
51diff --git a/bin/check-turbostat-power-residency.sh b/bin/check-turbostat-power-residency.sh
52index 2d6d7f8..18933fa 100755
53--- a/bin/check-turbostat-power-residency.sh
54+++ b/bin/check-turbostat-power-residency.sh
55@@ -1,5 +1,5 @@
56 #!/bin/bash
57-
58+# shellcheck disable=SC2317
59 #refer to https://web.archive.org/web/20230614200306/https://01.org/blogs/qwang59/2020/linux-s0ix-troubleshooting
60 set -e
61 state="pass"
62diff --git a/bin/check_wifi6e.py b/bin/check_wifi6e.py
63index 85d4cfc..a41b2bf 100755
64--- a/bin/check_wifi6e.py
65+++ b/bin/check_wifi6e.py
66@@ -18,9 +18,9 @@ def main():
67 _6g_end = 7125
68
69 data = subprocess.run(
70- ["iw", sys.argv[1], "info"],
71- capture_output=True,
72- encoding='utf-8')
73+ ["iw", sys.argv[1], "info"],
74+ capture_output=True,
75+ encoding='utf-8')
76 if data.returncode:
77 print(sys.argv[1] + " is not valid wireless interface")
78 return 0
79diff --git a/bin/edid_continuous_frequency_check.py b/bin/edid_continuous_frequency_check.py
80index 303db36..8da5952 100755
81--- a/bin/edid_continuous_frequency_check.py
82+++ b/bin/edid_continuous_frequency_check.py
83@@ -51,7 +51,7 @@ def get_edid_version(value_of_12h, value_of_13h):
84
85
86 def get_horizontal_addressable_video_in_pixels(data_block_of_DTD):
87- """ Get Horizontal Addressable Video in pixels from Detailed Timing Definition
88+ """ Get Horizontal Addressable Video in pixels from Detailed Timing Definition # noqa: E501
89 Address: 0x36h
90 Size: 18 bytes
91 """
92diff --git a/bin/get-oem-info.sh b/bin/get-oem-info.sh
93index e160047..7e8d865 100755
94--- a/bin/get-oem-info.sh
95+++ b/bin/get-oem-info.sh
96@@ -1,4 +1,5 @@
97 #!/bin/bash
98+# shellcheck disable=SC2317
99 set -e
100
101 oem=""
102diff --git a/bin/oval-report.py b/bin/oval-report.py
103index e876590..713b5f4 100755
104--- a/bin/oval-report.py
105+++ b/bin/oval-report.py
106@@ -138,7 +138,7 @@ def main(
107 if not is_valid:
108 raise ValueError(
109 "Cannot find target css under <style>, it is very likely "
110- + "that this script is outdated!"
111+ + "that this script is outdated!" # noqa: W503
112 )
113
114 has_vuln = False
115@@ -147,7 +147,7 @@ def main(
116 ident = identify(elem, real_tag)
117 if (
118 paths[-2:] != ["table", "tr.LightRow.Center"]
119- or ident != "td.SmallText.resultbadB"
120+ or ident != "td.SmallText.resultbadB" # noqa: W503
121 ):
122 return False, ident
123 nonlocal has_vuln
124@@ -160,7 +160,7 @@ def main(
125 if not is_valid:
126 raise ValueError(
127 "Cannot find target HTML element, it is very likely "
128- + "that this script is outdated!"
129+ + "that this script is outdated!" # noqa: W503
130 )
131 if not has_vuln:
132 print("All avaliable CVEs are patched!")
133diff --git a/bin/screen-pkg.py b/bin/screen-pkg.py
134index 9933f96..4b1ddaf 100755
135--- a/bin/screen-pkg.py
136+++ b/bin/screen-pkg.py
137@@ -311,7 +311,7 @@ def check_public_scanning(
138 item
139 for item in pkgs_installed
140 if item.k.name in metapkg_names
141- and not pkg_is_uploaded_metapkg(item.pkg, metapkg_names)
142+ and not pkg_is_uploaded_metapkg(item.pkg, metapkg_names) # noqa: W503
143 ]
144 if pkgs_metapkg_not_uploaded:
145 print("\n" "The following metapackages are not uploaded:")
146@@ -356,7 +356,7 @@ def check_component_scanning(
147 item
148 for item in pkgs_installed
149 if not pkg_in_component(item.pkg, ["main", "restricted"])
150- and item.pkg.name not in metapkg_names
151+ and item.pkg.name not in metapkg_names # noqa: W503
152 ]
153
154 pkgs_not_allowed = [
155@@ -415,7 +415,7 @@ def pkg_is_public(pkg: Package) -> bool:
156 for origin in ver.origins:
157 if (
158 "security.ubuntu.com" in origin.site
159- or "archive.ubuntu.com" in origin.site
160+ or "archive.ubuntu.com" in origin.site # noqa: W503
161 ) and origin.trusted:
162 return True
163 return False
164diff --git a/bin/touchpad-support.sh b/bin/touchpad-support.sh
165index ddea2b8..05e1811 100755
166--- a/bin/touchpad-support.sh
167+++ b/bin/touchpad-support.sh
168@@ -1,5 +1,5 @@
169 #!/bin/bash
170-
171+# shellcheck disable=SC2317
172 export LANG=C
173 set -euo pipefail
174
175diff --git a/debian/control b/debian/control
176index ca9135f..2da9995 100644
177--- a/debian/control
178+++ b/debian/control
179@@ -33,6 +33,8 @@ Depends: git,
180 python3-pip,
181 sudo,
182 xautomation,
183+ wget,
184+ bzip2,
185 ${misc:Depends},
186 ${shlibs:Depends},
187 ${plainbox:Depends}
188diff --git a/debian/rules b/debian/rules
189index f980c0c..22fa9f8 100755
190--- a/debian/rules
191+++ b/debian/rules
192@@ -3,6 +3,8 @@
193 %:
194 dh $@
195
196+UBUNTU_MAJOR_VERSION := $(shell lsb_release -rs| cut -d '.' -f 1)
197+
198 override_dh_auto_clean:
199 cd $(CURDIR)/c && $(MAKE) clean
200 cd $(CURDIR)/c && $(MAKE) uninstall PREFIX=$(CURDIR)
201@@ -24,5 +26,10 @@ override_dh_auto_install:
202 --root=$(CURDIR)/debian/plainbox-provider-pc-sanity/
203
204 override_dh_gencontrol:
205- python3 manage.py packaging
206- dh_gencontrol
207+ python3 manage.py packaging;\
208+ #Noble replaced libopenscap8 by lopenscap-common and libopenscap25t64
209+ if [ "$(UBUNTU_MAJOR_VERSION)" -gt "22" ];then \
210+ dh_gencontrol -- -V"plainbox:Depends=openscap-common,libopenscap25t64";\
211+ else\
212+ dh_gencontrol;\
213+ fi
214diff --git a/units/pc-sanity/pc-sanity-check-env.pxu b/units/pc-sanity/pc-sanity-check-env.pxu
215index cc062fd..9f7447a 100644
216--- a/units/pc-sanity/pc-sanity-check-env.pxu
217+++ b/units/pc-sanity/pc-sanity-check-env.pxu
218@@ -63,8 +63,6 @@ _description:
219 unit: packaging meta-data
220 os-id: ubuntu
221 Depends:
222- bzip2,
223- wget,
224 libopenscap8
225
226 plugin: shell

Subscribers

People subscribed via source and target branches