Ruarí's thoughts

XZ compressed snapshots

, , , , ,

Recent Opera snapshots are provided in xz compressed tar files. If xz is installed, GNU tar version 1.22 and above will be able to open these packages seamlessly (XZ Utils is pre-installed on many recent distributions or can easily be obtained from their respective repositories). If you have an older version of tar you can still open xz compressed tar files (assuming xz is installed) as follows:

xzcat opera-11.60-1173.i386.linux.tar.xz | tar x 
(Replace "opera-11.60-1173.i386.linux.tar.xz" with the name of the actual Opera package you wish to extract).

If you are using an older Linux distribution and find that xz is not available directly from your distribution's repositories, you can use these xzdec (XZ Decompressor) packages. Once installed you can now extract xz compressed Opera tar packages as follows:

xzdec opera-11.60-1173.i386.linux.tar.xz | tar x 

P.S. I compiled xzdec on 32 and 64 bit Ubuntu 6.06 LTS (Dapper Drake) LiveCDs. Ubuntu 6.06 was released on released in June 2006, so I expect these binaries should run on most distributions produced in the last 5 years. If you have problems using them please tell me your distribution (including version and architecture).

Some thoughts on UNIX and testing Opera on FreeBSDGnome or Unity styling lost on Opera shut down?

Comments

Wojciech EysymonttNasty Sunday, November 27, 2011 8:06:24 PM

Awesome. It works. Thanks!

Ruarí Ødegaardruario Monday, November 28, 2011 8:34:03 AM

I recompiled both packages so that they are single executables, without shared libraries. I also tweaked some of the configure options so that the binaries would be much smaller. They are now 40k for 32-bit and 49k for 64-bit.

These are the switches I used if anyone is interested:
--disable-shared
--disable-nls
--disable-encoders
--enable-small
--disable-threads
--disable-lzmainfo
--disable-scripts
--disable-xz
--disable-lzma-links

EDIT: Here is a video showing the process of creating one of these decompressors:

http://shelr.tv/records/500401c996608020cf000058

Ruarí Ødegaardruario Monday, November 28, 2011 8:49:38 AM

For the curious. This is why we started to use xz compression:
$ ls -lh
total 82M
-rw-r--r-- 1 ruario users 13M Nov 28 09:45 opera-11.60-1173.i386.linux.tar.bz2
-rw-r--r-- 1 ruario users 16M Nov 28 09:47 opera-11.60-1173.i386.linux.tar.gz
-rw-r--r-- 1 ruario users 12M Nov 26 18:23 opera-11.60-1173.i386.linux.tar.xz
-rw-r--r-- 1 ruario users 15M Nov 28 09:46 opera-11.60-1173.x86_64.linux.tar.bz2
-rw-r--r-- 1 ruario users 17M Nov 28 09:47 opera-11.60-1173.x86_64.linux.tar.gz
-rw-r--r-- 1 ruario users 12M Nov 26 19:07 opera-11.60-1173.x86_64.linux.tar.xz

Ruarí Ødegaardruario Monday, November 28, 2011 9:10:27 AM

Debian Lenny users could also use this native package of xzdec from backports. It doesn't depend on anything outside the base system, so you can just download one of the deb files linked at the bottom and install it:

http://packages.debian.org/lenny-backports/xzdec

Note: It is a slightly older version of xzdec than the one I provide (5.0.0 instead of 5.0.3) and may not work on versions of Debian before Lenny.

Ruarí Ødegaardruario Monday, November 28, 2011 10:03:47 AM

Another alternative, would be to use 7zip to extract the contents of these packages, e.g.:

7za -so x opera-11.60-1173.i386.linux.tar.xz | tar x 
Note: You will need to have version 9.04 beta or above for 7zip to support opening xz compressed files.

Wojciech EysymonttNasty Tuesday, November 29, 2011 9:29:25 PM

yes Great tip! My Knoppix has exactly 9.04 beta version of 7zip preinstalled, so I no longer need to have xzdec. up
I created an executable file with a universal command inside for unpacking Opera:
7za -so x opera*.tar.xz | tar x
Thank you a lot for your tips and help, Ruari. beer beer smile

Ruarí Ødegaardruario Wednesday, November 30, 2011 6:29:49 AM

If you have more than one file that might match 'opera*.tar.xz' in the same directory you could do the following to ensure you only extract the build with the highest version/build number:
#!/bin/sh
7za -so x $(echo opera*.tar.xz | sed "s/.* //") | tar x 

Or for something more generic, save this as 'untarxz':
#!/bin/sh
7za -so x $1 | tar x

Now you could issue the following to open any .tar.xz file:
untarxz opera-11.60-1173.i386.linux.tar.xz 
Just change 'opera-11.60-1173.i386.linux.tar.xz' to the name of the .tar.xz file you want to extract.

erika Wednesday, November 30, 2011 7:15:57 PM

no hablo ingles

Ruarí Ødegaardruario Wednesday, November 30, 2011 7:37:53 PM

Umm ... well I don't speak Spanish. confused

KerenSkyy Friday, December 2, 2011 10:46:00 PM

thanks for the information! up

Julianjjsl6 Saturday, December 3, 2011 6:34:32 PM

Interesting I'll test it

PS. Hey so si hablo Español (I speak Spanish) but erika doesn't appear a serious user of MyOpera confused

Unregistered user Monday, April 23, 2012 7:39:22 AM

puppylinux531 writes: some of our older distros cant unpack bz2 or xz (also barebone may not have a unpacker in). soloution i find is Peazip links below... http://code.google.com/p/peazip/downloads/list?can=1&q=&colspec=Filename+Summary+Uploaded+ReleaseDate+Size+DownloadCount gtk portable that i use.. http://code.google.com/p/peazip/downloads/detail?name=peazip_portable-4.5.LINUX.GTK2.tar.gz&can=1&q= hope this is ok to post up links? thanks for all the good work..tusand tak

Ruarí Ødegaardruario Tuesday, June 5, 2012 2:37:10 PM

Another option is to use this short shell script to extract one of the Opera rpms so that it can be run in place like one of the tar packages. This will require lzma-utils but this is more common on older distros than xz-utils.

#!/bin/sh
if [ ! -e "$1" ]; then
 echo "Usage: $0 opera.rpm" >&2
 exit 1
fi
operadir=$(echo $1 | sed "s/\.rpm$/.linux/")
mkdir -p $operadir
tail -c $(expr $(ls -l $1 | awk '{ print $5 }') - $(perl -ln0777e 'print (pos() - 13) while /]\x00{2}.{4}\xff{6}/g' $1 | head -n1)) $1 \
  | lzma -d \
  | (cd $operadir; cpio -idvu)
cat << EOF > $operadir/runopera
#!/bin/sh
export OPERA_DIR=\${OPERA_DIR:-"\${0%/*}"/usr/share/opera-next}
export OPERA_PERSONALDIR=\${OPERA_PERSONALDIR:-"\${0%/*}"/profile}
exec "\${0%/*}"/usr/lib/opera-next/opera-next "\$@"
EOF
chmod +x $operadir/runopera
echo "To run Opera issue the command: $operadir/runopera &"

Ruarí Ødegaardruario Tuesday, July 3, 2012 1:18:21 PM

I decided to upload my XZ decompressors to our snapshot server and drop a symlink in the Linux/FreeBSD upload directories to http://snapshot.opera.com/unix/xzdec/, e.g. http://snapshot.opera.com/unix/latest/xzdec/. Hopefully, this will make it even easier for user of distros where XZ utils are not available.

Note: Providing an XZ Opera Next tar package, plus the XZ decompressor still makes for a smaller total download than providing a bzip2 compressed Opera Next tar package. idea

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies