Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortWINE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mikhail Tergoev
PortWINE
Commits
576155e0
Commit
576155e0
authored
Oct 31, 2024
by
Mikhail Tergoev
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-selinux-1' of github.com:Htylol/PortWINE into Htylol-fix-selinux-1
parents
6e5cee5c
8b223bed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
functions_helper
data_from_portwine/scripts/functions_helper
+24
-0
start.sh
data_from_portwine/scripts/start.sh
+5
-0
No files found.
data_from_portwine/scripts/functions_helper
View file @
576155e0
...
...
@@ -748,6 +748,30 @@ check_flatpak () {
}
export -f check_flatpak
check_selinux () {
if [[ -n "
$SELINUX_IN_USE
" ]]
then [[ "
$SELINUX_IN_USE
" == 1 ]] && return 0 || return 1
fi
if check_flatpak ; then
if grep -i ^"
SELINUX
=enforcing
" /run/host/etc/selinux/config &>/dev/null ; then
export SELINUX_IN_USE=1
return 0
else
export SELINUX_IN_USE=0
return 1
fi
else
if grep -i ^"
SELINUX
=enforcing
" /etc/selinux/config &>/dev/null ; then
export SELINUX_IN_USE=1
return 0
else
export SELINUX_IN_USE=0
return 1
fi
fi
}
export -f check_selinux
background_pid () {
local arg1=
$1
# --start или --end
local arg2=
$2
# Название команды
...
...
data_from_portwine/scripts/start.sh
View file @
576155e0
...
...
@@ -331,10 +331,15 @@ if [[ $(basename "${portwine_exe}") =~ .[Pp][Pp][Aa][Cc][Kk]$ ]] ; then
then
TMP_ALL_PATH
=
""
else
TMP_ALL_PATH
=
"LD_LIBRARY_PATH=
\"
${
PW_LD_LIBRARY_PATH
}
\"
"
fi
if
check_selinux
then
NO_XATTRS_NEED
=
"-no-xattrs"
else
NO_XATTRS_NEED
=
""
fi
PW_PREFIX_NAME
=
$(
basename
"
$1
"
|
awk
-F
'.'
'{print $1}'
)
cat
<<
EOF
> "
${
PORT_WINE_TMP_PATH
}
"/pp_pfx_unpack.sh
#!/usr/bin/env bash
${
TMP_ALL_PATH
}
unsquashfs -f -d "
${
PORT_WINE_PATH
}
/data/prefixes/
${
PW_PREFIX_NAME
}
" "
$1
" \
${
TMP_ALL_PATH
}
unsquashfs
$NO_XATTRS_NEED
-f -d "
${
PORT_WINE_PATH
}
/data/prefixes/
${
PW_PREFIX_NAME
}
" "
$1
" \
|| echo "ERROR" > "
${
PORT_WINE_TMP_PATH
}
"/pp_pfx_unpack_error
EOF
chmod
u+x
"
${
PORT_WINE_TMP_PATH
}
"
/pp_pfx_unpack.sh
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment