Skip to content

Commit

Permalink
Adding setup fix
Browse files Browse the repository at this point in the history
resolve #310

Current regexp creates malformed podman
storage.conf file for qm, which breaks podman cli inside QM
Adding precommit python fix

Signed-off-by: Yariv Rachmani <[email protected]>
  • Loading branch information
Yarboa committed Jan 17, 2024
1 parent c883d17 commit 63171e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ repos:
rev: 6.0.0
hooks:
- id: flake8
args: ["-j8", "--ignore=B036"]
additional_dependencies: [
'flake8-blind-except',
'flake8-docstrings',
Expand Down
3 changes: 2 additions & 1 deletion demos/asilservice
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ if os.path.exists(socket_dir):
try:
selinux.setfscreatecon("system_u:object_r:qm_file_t:s0")
selinux.setsockcreatecon("system_u:system_r:qm_t:s0")
except BaseException:
except BaseException as see:
# selinux is disabled
print("\nSELinux is disabled, such environment is not recommended\n")
print("\nSELinux Exception occured:", see)
pass

server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
Expand Down
2 changes: 1 addition & 1 deletion setup
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ storage() {
"${ROOTFS}/var/lib/shared/overlay-layers/layers.lock"

sed -e '/additionalimage.*/,/]/s/^#//g' \
-e '/additionalimages.*/{n;s/.*/\"\/var\/lib\/shared\",/;}' \
-e '/additionalimages.*/a\"/var\/lib\/shared/\",' \
-e 's|^#.*transient_store.*|transient_store=true|g' \
/"${ROOTFS}/usr/share/containers/storage.conf" \
> "${ROOTFS}/etc/containers/storage.conf"
Expand Down

0 comments on commit 63171e9

Please sign in to comment.