Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Georgios Dagkakis
slapos
Commits
9fecbb51
Commit
9fecbb51
authored
Jun 05, 2013
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version up : LibreOffice 3.6.6, also fix rpm2cpio
that improves gzip header detection.
parent
d944375e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
11 deletions
+58
-11
component/libreoffice-bin/buildout.cfg
component/libreoffice-bin/buildout.cfg
+3
-3
component/rpm2cpio/buildout.cfg
component/rpm2cpio/buildout.cfg
+1
-1
component/rpm2cpio/rpm2cpio
component/rpm2cpio/rpm2cpio
+54
-7
No files found.
component/libreoffice-bin/buildout.cfg
View file @
9fecbb51
...
@@ -12,11 +12,11 @@ find-links =
...
@@ -12,11 +12,11 @@ find-links =
[libreoffice-bin]
[libreoffice-bin]
recipe = slapos.recipe.build
recipe = slapos.recipe.build
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64).
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64).
version = 3.6.
5
version = 3.6.
6
url = http://download.documentfoundation.org/libreoffice/stable/${:version}/rpm/%s/LibO_${:version}_Linux_%s_install-rpm_en-US.tar.gz
url = http://download.documentfoundation.org/libreoffice/stable/${:version}/rpm/%s/LibO_${:version}_Linux_%s_install-rpm_en-US.tar.gz
# supported architectures md5sums
# supported architectures md5sums
md5sum_x86 = 9
575c9a567d48a9feeaed2f915bfdf7f
md5sum_x86 = 9
22935201a350a7e0d3f83c08f739ee2
md5sum_x86-64 =
302e326f2b2a524a78994705ea782770
md5sum_x86-64 =
fa41089ce29eb03cdfb34d06a1e786db
# where office code can be found?
# where office code can be found?
officedir = libreoffice3.6
officedir = libreoffice3.6
...
...
component/rpm2cpio/buildout.cfg
View file @
9fecbb51
...
@@ -6,4 +6,4 @@ parts =
...
@@ -6,4 +6,4 @@ parts =
# https://github.com/ruda/rpm2cpio
# https://github.com/ruda/rpm2cpio
recipe = slapos.recipe.build:download
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_buildout_section_name_}
url = ${:_profile_base_location_}/${:_buildout_section_name_}
md5sum =
c5bb6227d99e1ff5df880f997cbed2e3
md5sum =
aa3a5920a1d8963592be0c2666ee05e2
component/rpm2cpio/rpm2cpio
View file @
9fecbb51
...
@@ -3,7 +3,33 @@
...
@@ -3,7 +3,33 @@
#
#
# Standalone RPM to CPIO converter
# Standalone RPM to CPIO converter
# Copyright (c) 2012 Rudá Moura
# Copyright (c) 2012 Rudá Moura
# https://github.com/ruda/rpm2cpio
#
#
# Impove gzip header detection thanks to
# http://afb.users.sourceforge.net/centos/rpm2cpio.py
#
# Copyright (C) 1997,1998,1999, Roger Espel Llima
# Copyright (C) 2000, Sergey Babkin
# Copyright (C) 2009, Alex Kozlov
# Copyright (C) 2010, Anders F Bjorklund
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and any associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# SOFTWARE'S COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE
'''Extract cpio archive from RPM package.
'''Extract cpio archive from RPM package.
...
@@ -21,6 +47,7 @@ rpm2cpio < adjtimex-1.20-2.1.i386.rpm | cpio -it
...
@@ -21,6 +47,7 @@ rpm2cpio < adjtimex-1.20-2.1.i386.rpm | cpio -it
'''
'''
import
sys
import
sys
import
struct
import
StringIO
import
StringIO
import
gzip
import
gzip
...
@@ -31,12 +58,32 @@ def rpm2cpio(stream_in=sys.stdin, stream_out=sys.stdout):
...
@@ -31,12 +58,32 @@ def rpm2cpio(stream_in=sys.stdin, stream_out=sys.stdout):
lead
=
stream_in
.
read
(
96
)
lead
=
stream_in
.
read
(
96
)
if
lead
[
0
:
4
]
!=
RPM_MAGIC
:
if
lead
[
0
:
4
]
!=
RPM_MAGIC
:
raise
IOError
,
'the input is not a RPM package'
raise
IOError
,
'the input is not a RPM package'
data
=
stream_in
.
read
()
lead
=
stream_in
.
read
(
16
)
idx
=
data
.
find
(
GZIP_MAGIC
)
if
not
lead
:
if
idx
==
-
1
:
raise
IOError
,
'No header'
raise
IOError
,
'could not find compressed cpio archive'
gzstream
=
StringIO
.
StringIO
(
data
[
idx
:])
while
True
:
gzipper
=
gzip
.
GzipFile
(
fileobj
=
gzstream
)
(
magic
,
ignore
,
sections
,
bytes
)
=
struct
.
unpack
(
"!LLLL"
,
lead
)
(
smagic
,
smagic2
)
=
struct
.
unpack
(
"!HL"
,
lead
[
0
:
6
])
if
smagic
==
0x1f8b
:
break
# skip the headers
stream_in
.
seek
(
16
*
sections
+
bytes
,
1
)
while
True
:
lead
=
stream_in
.
read
(
1
)
if
lead
==
""
:
raise
IOError
,
'No header'
if
(
0
,)
==
struct
.
unpack
(
"B"
,
lead
):
continue
break
lead
+=
stream_in
.
read
(
15
)
if
lead
==
""
:
raise
IOError
,
'No header'
stream_in
.
seek
(
-
len
(
lead
),
1
)
gzipper
=
gzip
.
GzipFile
(
fileobj
=
stream_in
)
data
=
gzipper
.
read
()
data
=
gzipper
.
read
()
stream_out
.
write
(
data
)
stream_out
.
write
(
data
)
...
...
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