randomNotes
This page is just a dump of notes.
Ubuntu ARMv7 on ARMv8
v=24.04 #Desired Ubuntu version lxd init lxc launch "ubuntu:$v/armhf" "armhf-$v" lxc shell "armhf-$v"
Setuptools
AttributeError: 'module' object has no attribute 'test_foo'
The setup() of Setuptools for a Python2 package was failing with
287s Traceback (most recent call last): 287s File "setup.py", line 26, in <module> 287s test_suite="tests", 287s File "/usr/lib/python2.7/dist-packages/DistUtilsExtra/auto.py", line 100, in setup 287s distutils.core.setup(**attrs) 287s File "/usr/lib/python2.7/distutils/core.py", line 151, in setup 287s dist.run_commands() 287s File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands 287s self.run_command(cmd) 287s File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command 287s cmd_obj.run() 287s File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line 159, in run 287s self.with_project_on_sys_path(self.run_tests) 287s File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line 140, in with_project_on_sys_path 287s func() 287s File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line 180, in run_tests 287s testRunner=self._resolve_as_ep(self.test_runner), 287s File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__ 287s self.parseArgs(argv) 287s File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs 287s self.createTests() 287s File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests 287s self.module) 287s File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames 287s suites = [self.loadTestsFromName(name, module) for name in names] 287s File "/usr/lib/python2.7/unittest/loader.py", line 103, in loadTestsFromName 287s return self.loadTestsFromModule(obj) 287s File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line 38, in loadTestsFromModule 287s tests.append(self.loadTestsFromName(submodule)) 287s File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName 287s parent, obj = obj, getattr(obj, part) 287s AttributeError: 'module' object has no attribute 'test_dbus'
Not a particularly clear error message, especially since test_dbus.py is a test file inside the tests directory.
With such a message one can't help but suspect that there is something in Setuptools itself, maybe a wrongly set reference directory... But that was not it.
After hours of trying and searching, I found this comment, which made me realize by simply running python test_dbus.py that for Python2 I hadn't installed the package that provided an import, and it would fail with
ImportError: No module named pathlib
Why on earth such a useful and unambiguous error message is replaced by that obscure one is beyond me.
Systemd socket activation failing
I got this in Golang, activation.Listeners would return an empty slice but no error. Grpcurl would bail out with "connection refused" and the socket log would say
Failed to queue service startup job (Maybe the service file is missing or not a template unit?): Invalid argument Failed with result 'resources'.
The solution was to remove Accept=true from the socket unit file.
Lintian obscure output -> Lintian descriptive output
Now running lintian libspelling_0.2.0-1_amd64.changes ... W: libspelling-1-doc: stray-devhelp-documentation [usr/share/doc/libspelling-1/libspelling-1.devhelp2] Finished running lintian.
What is that? Answer:
lintian-explain-tags stray-devhelp-documentation
Query for a specific snap revision
curl -s -H 'Content-Type: application/json' -H 'Snap-Device-Series: 16' 'http://api.snapcraft.io/v2/snaps/info/gnome-42-2204-sdk' | jq --arg arch arm64 -r '."channel-map" | . [] | select(.channel.name == "stable") | select (.channel.architecture == $arch)'
Where was Cmake test defined?
ctest -R test_some_side_corner_item_XYZ --show-only=json-v1
https://stackoverflow.com/questions/60863036/cmake-ctest-where-was-defined-test-xyz
Iterate on build
./debian/rules build fakeroot ./debian/rules binary dh_clean
No file selection dialog
sudo apt install xdg-desktop-portal-gtk+ xdg-desktop-portal-gnome-
Skip XDG portal to test snap access
This is a common mistake. The XDG portal provides the file to the snap.
In browser skip it with file:// in address bar.
Canonistack
>10 GB instances are actually available, see openstack flavor list.
List of merge requests on Launchpad
Meson: Output the tests output instead of sending then to a file
https://github.com/mesonbuild/meson/issues/3462
Which dependency is linking against an unwanted one?
I was getting this problem figuring who was including soup2.4 while I only wanted soup3.0 in a meson project.
Non-meson should be something similar.
Given meson.build in this form:
grep dependency meson.build dependency ('libnm', version: '>= 1.2'), dependency ('libnma', version: '>= 1.0'), dependency ('polkit-gobject-1', version: '>= 0.103'), dependency ('accountsservice'), ...
$ awk -F\' '/dependency/{dep=$2; "pkg-config --libs " dep | getline; if(/soup-2.4/)print dep}' meson.build webkit2gtk-4.0
Dbus stuff
For minimal environments, if you get
Failed to execute child process ?dbus-launch? (No such file or directory)
the solution is to put
. /etc/X11/Xsession.d/*dbus*
in your .xinitrc.
GTK
GTK3 to GTK4 *.ui
gtk4-builder-tool simplify --3to4 gtk3.ui > gtk4.ui fixes a considerable amount of stuff, but not all.
<packing> no longer works, use <layout>.
See https://docs.gtk.org/gtk4/migrating-3to4.html for more.
Old GTK, empty space in window
To make sure a widget expands (i.e., takes over empty space),
<packing> <property name="expand">True</property> <property name="fill">True</property> </packing>
was not enough in Xenial. It was necessary to add a
<property name="vexpand">True</property>
For widget initial size
https://stackoverflow.com/questions/29737096/gtk3-paned-widget-default-homogeneous-sizes https://stackoverflow.com/questions/7796335/how-to-set-minimal-and-current-size-of-the-right-pane-in-hpaned-in-gtk https://stackoverflow.com/questions/45799092/set-widget-initial-size https://docs.gtk.org/gtk3/signal.Widget.screen-changed.html
Gtk-CRITICAL **: assertion 'GTK_IS_WIDGET (widget)' failed
If created with a UI file, make sure the widget has
<property name="visible">True</property>
Chromium
Grepping its source code is slow, hours even with fixed patterns.
Use https://source.chromium.org/search?q=regex instead.
ISO QA testing hints
Minimal install is slower
Minimal install won't save you time; on the contrary: It adds the step of removing what was installed.
Nvidia test case
There are outdated bits, don't block on them.
The point is that, once you fully install and booted. you should have 1) secureboot on 2) working nvidia drivers loaded.
Tests that can be done in a single run
Save time by performing those in a single go:
- [Run-once] Other Features (i.e. test if keyboard, wireless and timezone configuration during installation is kept after installing)
- [Mandatory] Install (manual partitioning re-using home partition)
- [Mandatory] Install (manual partitioning)
nteodosio/randomNotes (last edited 2024-07-15 12:57:14 by nteodosio)