Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
etersoft
eepm
Commits
62cc7703
Commit
62cc7703
authored
Mar 17, 2025
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm repack generic-post.sh: add some post checking with warnings
parent
1ae52fcf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
common.sh
repack.d/common.sh
+5
-0
generic-post.sh
repack.d/generic-post.sh
+39
-0
No files found.
repack.d/common.sh
View file @
62cc7703
...
...
@@ -15,6 +15,11 @@ info()
echo
"
$*
"
>
&2
}
warning
()
{
echo
"WARNING:
$*
"
>
&2
}
# compatibility layer
# check if <arg> is a real command
...
...
repack.d/generic-post.sh
0 → 100755
View file @
62cc7703
#!/bin/sh -x
# It will run with two args: buildroot spec
BUILDROOT
=
"
$1
"
SPEC
=
"
$2
"
PRODUCT
=
"
$3
"
PKG
=
"
$4
"
.
$(
dirname
$0
)
/common.sh
# drop forbidded paths
# https://bugzilla.altlinux.org/show_bug.cgi?id=38842
for
i
in
/ /etc /etc/init.d /etc/systemd /bin /opt /usr /usr/bin /usr/lib /usr/lib64 /usr/share /usr/share/doc /var /var/log /var/run
\
/etc/cron.daily /usr/share/icons/usr/share/pixmaps /usr/share/man /usr/share/man/man1 /usr/share/appdata /usr/share/applications /usr/share/menu
\
/usr/share/mime /usr/share/mime/packages /usr/share/icons
\
/usr/share/icons/gnome
\
/usr/share/icons/hicolor
;
do
sed
\
-e
"s|/
\.
/|/|"
\
-e
"s|^%dir[[:space:]]
\"
$i
/*
\"
$|
|"
\
-e
"s|^%dir[[:space:]]
$i
/*
$|
|"
\
-e
"s|^
\"
$i
/*
\"
$|
|"
\
-e
"s|^
$i
/*
$|
|"
\
<
$SPEC
>
$SPEC
.new
diff
-u
$SPEC
$SPEC
.new
||
warning
"There was some introduced system paths in the spec file"
done
for
DESKTOPFILE
in
$BUILDROOT
/usr/share/applications/
*
.desktop
;
do
[
-f
"
$DESKTOPFILE
"
]
||
continue
EXEC
=
"
$(
get_desktop_value
"
$DESKTOPFILE
"
"Exec"
)
"
if
echo
"
$EXEC
"
|
grep
-q
"/"
;
then
warning
"Exec path in desktop file
$DESKTOPFILE
contains slashes:
$EXEC
"
elif
[
!
-f
"./usr/bin/
$EXEC
"
]
;
then
warning
"Exec from desktop file
$DESKTOPFILE
missed in /usr/bin:
$EXEC
"
elif
[
!
-x
"./usr/bin/
$EXEC
"
]
;
then
warning
"Exec from desktop file
$DESKTOPFILE
exists in /usr/bin, but not executable:
$EXEC
"
fi
done
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