Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
-
Rava
- Contributor

- Posts: 5424
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Post#1
by Rava » 13 Feb 2016, 05:40
Seems, in current Porteus (3.1 XFCe, x86-64) there is no longer a txz2dir:
Code: Select all
root@porteus:/mnt/live/memory/images# find . |grep txz2dir
root@porteus:/mnt/live/memory/images#
Does anyone have the script at hand that works well in this version?
I duckduckgo'd forit, and the only distro that I found is:
wifislax 4.10.1 or
4.11.1 VMware Edition , which is
> 1.1 GB, and quite the overkill to download for a tiny script as such...

Cheers!
Yours Rava
Rava
-
Ed_P
- Contributor

- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Post#2
by Ed_P » 13 Feb 2016, 07:14
Rava wrote:Seems, in current Porteus (3.1 XFCe, x86-64) there is no longer a txz2dir:
Code: Select all
root@porteus:/mnt/live/memory/images# find . |grep txz2dir
root@porteus:/mnt/live/memory/images#
Does anyone have the script at hand that works well in this version?
Not in 3.0 either.
Code: Select all
guest@porteus:~$ txz2dir
bash: txz2dir: command not found
guest@porteus:~$ su
Password:
root@porteus:/home/guest# txz2dir
bash: txz2dir: command not found
root@porteus:/home/guest#
You sure you spelled it right?
-edit-
There is a txz2xzm and a xzm2dir though/
txz2xzm
Code: Select all
#!/bin/bash
# Convert Slackware's package(s) into .xzm module
#
# Author: Tomas M. <http://www.linux-live.org>
# Modifications for Porteus by fanthom
# Exit if nothing is provided as an argument:
if [ "$1" = "" ]; then
echo
echo "Convert Slackware's TXZ package into .xzm compressed module"
echo "usage:"
echo
echo "$0 package.txz"
echo "$0 package1.txz package2.txz package3.txz"
echo "$0 /folder/with_packages/*"
exit 1
fi
# Work only on txz/tgz packages:
for x in $*; do
ext=`echo $x | rev | cut -d. -f1 | rev`
if [ "$ext" = txz -o "$ext" = tgz ]; then
mod=`readlink -f $x`
MOD=`echo $MOD $mod`
fi
done
# Switch to root:
if [ "$DISPLAY" ]; then
if [ `whoami` != "root" ]; then
/opt/porteus-scripts/xorg/psu "/opt/porteus-scripts/txz2xzm $MOD"
exit
fi
else
if [ `whoami` != "root" ]; then
echo "Please enter root's password below"
su - -c "/opt/porteus-scripts/txz2xzm $MOD"
exit
fi
fi
# Create module:
for y in $MOD; do
TMPDIR=/tmp/txz2xzm$$
XZM="`echo $y | rev | cut -d. -f2- | rev`.xzm"
installpkg -root $TMPDIR $y
if [ $? != 0 ]; then echo "error installing $y package"; exit; fi
# optimalization procedures, this doesn't hurt
find $TMPDIR/usr{/local/,/share/,/}{man,info} -type l -name "*.gz" 2>/dev/null | xargs -r gunzip -f
find $TMPDIR/usr{/local/,/share/,/}{man,info} -type f -name "*.gz" 2>/dev/null | xargs -r gunzip
cp -a $TMPDIR/usr/share/man $TMPDIR/usr 2>/dev/null; rm -rf $TMPDIR/usr/share/man
rm -f $TMPDIR/{usr,usr/local,var}/man/cat*/*
echo -e "Creating $XZM\n"
dir2xzm $TMPDIR $XZM >/dev/null
if [ $? != 0 ]; then echo "error building compressed image"; exit; fi
rm -Rf $TMPDIR
done
xzm2dir
Code: Select all
#!/bin/bash
# convert .xzm compressed file back into directory tree
#
# Author: Tomas M. <http://www.linux-live.org>
# Modifications for Porteus by fanthom
mod=`readlink -f $1`
mod2=`readlink -f $2`
# Switch to root
if [ "$DISPLAY" ]; then
if [ `whoami` != "root" ]; then
/opt/porteus-scripts/xorg/psu "/opt/porteus-scripts/xzm2dir $mod $mod2"
exit
fi
else
if [ `whoami` != "root" ]; then
echo "Please enter root's password below"
su -c "/opt/porteus-scripts/xzm2dir $mod $mod2"
exit
fi
fi
if [ ! -d "$2" ]; then
echo
echo "Convert .xzm compressed module back into directory tree"
echo "usage: $0 source_file.xzm existing_output_directory"
exit 1
fi
unsquashfs -f -dest "$2" "$1"
Ed_P
-
bour59
- Shogun

- Posts: 204
- Joined: 29 Dec 2010, 08:10
- Distribution: porteus v5.0-xfce K5.19.7
- Location: France
Post#3
by bour59 » 13 Feb 2016, 09:07
Hi
to do this I use explodepkg
bour59
-
aus9
Post#4
by aus9 » 13 Feb 2016, 13:29
I have in the past used as root
unsquashfs <packagename>
aus9
-
beny
- Full of knowledge

- Posts: 2253
- Joined: 02 Jan 2011, 11:33
- Location: italy
Post#5
by beny » 16 Feb 2016, 20:11
hi rava you can do this with file roller or ark
beny
-
tome
- Contributor

- Posts: 686
- Joined: 26 Jun 2013, 14:03
- Distribution: x64 Openbox
- Location: Russia is causing the immense damage to humanity
-
Contact:
Post#6
by tome » 16 Feb 2016, 21:39
tar -xvf %F
or
installpkg -root %d/%N %F - only for root, not tested
tome
-
port
- Samurai

- Posts: 137
- Joined: 18 Feb 2016, 09:25
- Distribution: Linux porteus 3.2.2 KDE
- Location: Spain
Post#7
by port » 23 Mar 2016, 17:04
a txz2dir is trivial:
Code: Select all
mkdir DIRNAME && tar xvJf FILE.txz -C DIRNAME
if you want a command with same parameters as old txt2dir ( txz2dir file.txz directory ) just add this function to your .bashrc or similar:
Code: Select all
txz2dir () {
mkdir $1 && tar xvJf $2 -C $1
}
you can improve the function with error checking in parameters passed, I let this to you as exercise ;-)
port
-
Bogomips
- Full of knowledge

- Posts: 2564
- Joined: 25 Jun 2014, 15:21
- Distribution: 3.2.2 Cinnamon & KDE5
- Location: London
Post#8
by Bogomips » 23 Mar 2016, 20:15
tome wrote:tar -xvf %F
Or
bsdtar -xf <pkg>.txz -C <dir> or
explodepkg.
tome wrote:installpkg -root %d/%N %F - only for root, not tested
Here however install script will be run on the fake root directory.
Depends on the needs of the moment.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB
Bogomips
-
wread
- Module Guard

- Posts: 1257
- Joined: 09 Jan 2011, 18:48
- Distribution: Porteus v5.0-kde-64 bits
- Location: Santo Domingo
-
Contact:
Post#9
by wread » 01 May 2016, 20:26
I do it the brutal way: txz2xzm, then extract xzm 8)
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!
wread
-
jmhoward56
- Black ninja

- Posts: 37
- Joined: 08 Dec 2011, 19:28
- Location: USA
Post#10
by jmhoward56 » 19 Aug 2016, 18:16
you should be root to do the following;
First create a directory where you want to install the txz pkg
Then in the same directory where the txz file is located do this;
Code: Select all
ROOT="/tmp/mytxz" installpkg "txz filename"
replace "tmp/mytxz" with your directory name, less quotes and the same with "txz filename"
When it completes you will find your file "installed" in the directory you created. You could then do a dir2xzm if you wanted to create a module from the contents of the directory.
jmhoward56
-
francois
- Contributor

- Posts: 6499
- Joined: 28 Dec 2010, 14:25
- Distribution: xfce plank porteus nemesis
- Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.
Post#11
by francois » 19 Aug 2016, 20:31
There are very elegant cli solutions in this post. Thanks for that great knowledge.
My way, the newbie way is:
right click on the txz package > submenu txz2xzm
right click on the xzm package (porteus module) > submenu extract module
8)
Prendre son temps, profiter de celui qui passe.
francois
-
Rava
- Contributor

- Posts: 5424
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Post#12
by Rava » 24 Aug 2016, 04:35
With all these possibilities, we really need a working wiki, or at least post in in our HOWTO part of the forum. Of course someone needs to not only check out all these possibilities, but also put it into [ code ] with examples (and probably with the command output / data and file result as well when these differ, and they might differ)
wread wrote:I do it the brutal way: txz2xzm, then extract xzm 8)
That was my lazy ass variant as well, but when I try to create a slim custom build all-in-one-with-only-the-really-needed-dependencies txz and hace to open and try out 15 or more modules, I tell you that sucks, since not only you have to convert each single one into a folder, but also have to work in monitoring which dependencies you really need, and so I want a more robust and less workload solution..
Cheers!
Yours Rava
Rava
-
francois
- Contributor

- Posts: 6499
- Joined: 28 Dec 2010, 14:25
- Distribution: xfce plank porteus nemesis
- Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.
Post#13
by francois » 24 Aug 2016, 16:18
fanthom solution:
http://forum.porteus.org/viewtopic.php?f=94&t=4398
Locically, I imagine that also should work:
etc.
Prendre son temps, profiter de celui qui passe.
francois
-
Jack
- Contributor

- Posts: 1955
- Joined: 09 Aug 2013, 14:25
- Distribution: Nemesis Cinnamon 64
- Location: USA
Post#14
by Jack » 24 Aug 2016, 16:42
Was there ever txz2dir in any version of Porteus? Cause for me to build a bundle package, here what I have to do. Take a *.txz and convert to *.xzm then xzm2dir and then from dir2xzm to build the bundle. That a lot of work.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.
Jack
-
francois
- Contributor

- Posts: 6499
- Joined: 28 Dec 2010, 14:25
- Distribution: xfce plank porteus nemesis
- Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.
Post#15
by francois » 24 Aug 2016, 17:24
Yes there was I am almost sure in 2.x.
Prendre son temps, profiter de celui qui passe.
francois