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
This commit is contained in:
Thomas Lavocat 2023-01-25 17:27:04 +01:00 committed by Thomas Lavocat
parent c0fb5cf90c
commit 8f08433804
3 changed files with 122 additions and 46 deletions

View file

@ -31,6 +31,24 @@ SCHEMA_2 = """
"readonly": {
"description": "mount the source as a readonly device",
"type": "boolean"
},
"uid": {
"description": "mount the source with given uid",
"type": "integer"
},
"gid": {
"description": "mount the source with given guid",
"type": "integer"
},
"umask": {
"description": "mount the source with given umask",
"type": "string",
"pattern": "^[0-7][0-7][0-7]$"
},
"shortname": {
"description": "mount the source with given shortname",
"type": "string",
"enum": ["lower", "win95", "winnt", "mixed"]
}
}
}