Commit graph

6 commits

Author SHA1 Message Date
Brian C. Lane
44c28c8c16 autopep8: Update with changes to make autopep8 -a -a -a happy 2023-08-10 13:04:14 +02:00
Tomáš Hozza
eb427e2513 Don't use capture_output=True with subprocess.run()
The `capture_output` argument does not exist on Python 3.6 used by
default on RHEL-8.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-04-26 11:43:13 +02:00
Tomáš Hozza
56987fdda4 Test: make run/test_mount.py not depend on installed osbuild
Previously, the unit test depended on osbuild modules being installed on
the system. As a result, this made the test not work in CI where we do
not install osbuild when running unit tests. In addition, the stage
executed by the unit test would use different version of osbuild
internals than the version that is being tests, which could result in
issues or not testing the intended code.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-04-12 11:57:18 +02:00
Tomáš Hozza
975965510b Test: handle non-existence of /run/osbuild in test/run/test_mount.py
The directory does not exist when the unit test is run in CI. Handle
this case by ensuring that parent directories are created as needed.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-04-12 11:57:18 +02:00
Thomas Lavocat
8f08433804 mounts: accept more mount options
Before we could only ask OSBuild to mount a device as readonly. But
devices can have more mount options than this. Supporting more options
is necessary for the new version of image-info that is using OSBuild's
internals in order to mount the image it wants to work on. Otherwise,
for instance, some umasks aren't applied properly and we can get
differences in rpm-verify results, thus corrupting the DB.

Mount is now accepting:
* readonly
* uid
* gid
* umask
* shortname
2023-02-01 12:29:58 +01:00
Thomas Lavocat
5112f72cbf mounts: use the options object for mountopts
This modification will allow a user to ask to mount the system as read
only for instance. Which would be super useful for image-info who is
progressively using more of OSbuild internals to mount partitions.
2022-11-30 14:21:10 +01:00