Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
1c4c6d79
Commit
1c4c6d79
authored
Jun 29, 2017
by
lyxell
Committed by
GitHub
Jun 29, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #827 from jam7/refactor/crew-strip2
Change crew comand to check strip command existence
parents
b7e11402
a714c790
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
crew
crew
+12
-6
No files found.
crew
View file @
1c4c6d79
...
...
@@ -437,20 +437,26 @@ def prepare_package (destdir)
end
end
def
strip_find_files
(
find_cmd
,
strip_option
=
""
)
#
check
whether
crew
should
strip
return
if
CREW_NOT_STRIP
||
!File.exist?("#{CREW_PREFIX}/bin/strip")
#
run
find_cmd
and
strip
only
ar
or
ELF
files
system
"#{find_cmd} | xargs -r chmod u+w"
system
"#{find_cmd} | xargs -r sh -c 'for i in
\"
$0
\"
\"
$@
\"
; do case
\"
$(head -c 4 $i)
\"
in ?ELF|\!?ar) echo
\"
$i
\"
;; esac ; done' | xargs -r strip #{strip_option}"
end
def
install_package
(
pkgdir
)
Dir
.
chdir
pkgdir
do
FileUtils
.
mv
'dlist'
,
CREW_CONFIG_PATH
+
"meta/#{@pkg.name}.directorylist"
FileUtils
.
mv
'filelist'
,
CREW_CONFIG_PATH
+
"meta/#{@pkg.name}.filelist"
#
Strip
libraries
with
-
S
system
"find . -name 'lib*.a' -print | xargs chmod u+w 2>/dev/null"
unless
CREW_NOT_STRIP
system
"find . -name 'lib*.a' -print | xargs strip -S 2>/dev/null"
unless
CREW_NOT_STRIP
system
"find . -name 'lib*.so*' -print | xargs chmod u+w 2>/dev/null"
unless
CREW_NOT_STRIP
system
"find . -name 'lib*.so*' -print | xargs strip -S 2>/dev/null"
unless
CREW_NOT_STRIP
strip_find_files
"find . -type f -name 'lib*.a' -print"
,
"-S"
strip_find_files
"find . -type f -name 'lib*.so*' -print"
,
"-S"
#
Strip
binaries
system
"find . -type f -perm /111 -print | sed -e '/lib.*\.a$/d' -e '/lib.*\.so/d' | xargs chmod u+w 2>/dev/null"
unless
CREW_NOT_STRIP
system
"find . -type f -perm /111 -print | sed -e '/lib.*\.a$/d' -e '/lib.*\.so/d' | xargs strip 2>/dev/null"
unless
CREW_NOT_STRIP
strip_find_files
"find . -type f -perm /111 -print | sed -e '/lib.*\.a$/d' -e '/lib.*\.so/d'"
system
"tar cf - ./usr/* | (cd /; tar xp --keep-directory-symlink -f -)"
end
...
...
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