Can I repackage an installed package or create a tar.gz file

Booting, installing, newbie
Post Reply
Message
Author
davec60

Can I repackage an installed package or create a tar.gz file

#1 Post by davec60 »

Hi,
I have recently downloaded and installed the Opera browser on a frugal-install of Slacko 5.3.3.
Is there a cache somewhere that holds a copy of the complete, original package so that I can install it manually in some of the other puppies that I have and/or can I re-package that Opera download eg. as a tar.gz file?
If so, does anyone know what I need to input in the terminal to achieve this?
Many thanks,
Dave

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#2 Post by Karl Godt »

Don't install a package from /root directory . Put the package into something like /root/Downloads . The petget installer copies the package automatically into /root and after installing deletes that /root/package.pet file ( at least in older petget scripts ) .

davec60

#3 Post by davec60 »

Thanks for your reply. I will heed your advice for future downloads.
As for the download/installation of Opera that I have already done, I have found three folders related to Opera inside the /Opt directory (ie. /Opt/Bin; /Opt/Lib and /Opt/Share) as well as an hidden file called /root/.opera in the /root directory.
I am wondering whether I can somehow bundle all or some of these files together in order to create a portable tar.gz file or a portable file with some other extension?
Can anyone perhaps enlighten me as to whether this is actually possible and, if so, which files do I need to use and how should I go about it?
(I'd prefer not to have to download Opera several times for different operating systems and also I simply want to try and learn how to achieve this).
Thanks,
Dave

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#4 Post by Karl Godt »

I dl Opera directly as tar.xz from the Opera website . Then I extract it into "/lib" directly which gives a
"/lib/opera-12.02-1578.i386.linux" directory with the contents . I have also a "/lib/flashplayer" directory containing several "libflashplayer-VERSION.so" with one symlink to one of these named "libflashplayer.so" .

Then I rename the "/lib/opera-12.02-1578.i386.linux/opera" script to "opera-orig" and place this one instead :

Code: Select all

#!/bin/sh

cd "${0%/*}"
echo "$0"
echo "`pwd`: PWD=$PWD"
readlink -e $0
cd `dirname $(readlink -e $0)`
echo "$0"
echo "`pwd`: PWD=$PWD"
readlink -e $0
export OPERA_DIR=${OPERA_DIR:-"${PWD}"/share/opera}
export OPERA_PERSONALDIR=${OPERA_PERSONALDIR:-"${PWD}"/profile}
#exec "${PWD%/*}"/lib/opera/opera "$@"
exec "${PWD}"/lib/opera/opera "$@"
#export OPERA_DIR=${OPERA_DIR:-"${0%/*}"/share/opera}
#export OPERA_PERSONALDIR=${OPERA_PERSONALDIR:-"${0%/*}"/profile}
#exec "${0%/*}"/lib/opera/opera "$@"
The code still is untidy but to work with symlinks like "/usr/bin/opera" -> "/lib/opera-12.02-1578.i386.linux/opera" and having debugging output I have it as it is .
The "/usr/share/application/Opera.desktop" file looks like this :

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=Opera 12.00 Internet Suite
Icon=/usr/share/pixmaps/opera.xpm
Comment=Opera Internet Suite
Exec=/lib/opera-12.00-1467.i386.linux/opera -newwindow
Terminal=false
Type=Application
Categories=WebBrowser
GenericName=Opera Internet Suite
I have several Opera Versions like this .
Have not good experiences with copying extracted and used Operas from partition to partition .

Finally I check "/usr/lib/mozilla/plugins" for "libflashplayer.so" -> "/lib/flashplayer/libflashplayer.so" because my Operas seem not to use libflashplayer.so in the opera directory but relies on" /usr/lib/mozilla" :D . My Operas also seem not to use "$HOME/.opera" .. probably because of "root" .

[edit: Also needed : Manually creation of the "/lib/opera-12.00-1467.i386.linux/profile" directory . I used to symlink other Operas but deleting the LinkTarget once left me the others with no saved passwords, skins, bookmarks . /edit]
[ I am running full installs ] .

Post Reply