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.
-
Jack
- Contributor
- Posts: 1857
- Joined: 09 Aug 2013, 14:25
- Distribution: Porteus and Nemesis
- Location: USA
Post#16
by Jack » 24 Aug 2016, 17:36
francois wrote:Yes there was I am almost sure in 2.x.
I'm going to look for it. I don't know why it was delete.
EDIT:
I unpack all of those. Well I check 1.0, 1.1, 1.2, 2.0, 2.1, 3.0, 3.0.1 and 3.1 and there is no txz2dir.
EDIT:2
I guest you could use this.
Code: Select all
ROOT=/path/to/folder installpkg -terse *.txz
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
-
Rava
- Contributor
- Posts: 5401
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Post#17
by Rava » 25 Aug 2016, 00:08
francois wrote:Yes there was I am almost sure in 2.x.
And it should not be that hard to get back, at least I root for it...
Done on, say, 15 modules, with any other means, module sized several MB each, it's quite the overkill, when all we need really is
See?
Cheers!
Yours Rava
Rava
-
Jack
- Contributor
- Posts: 1857
- Joined: 09 Aug 2013, 14:25
- Distribution: Porteus and Nemesis
- Location: USA
Post#18
by Jack » 25 Aug 2016, 00:37
Just ask brokenman if there was but I did unpack them today and see any txz2dir in none I did.
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
-
brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Post#19
by brokenman » 25 Aug 2016, 03:35
Here is a script to decompress multiple package (or a directory of packages) into a given directory. Will include it in rc5.
It is only compatible with Porteus-v3.2+
txz2dir
Code: Select all
#!/bin/bash
# Script to decompress multiple slakware packages to a dir
# Author: brokenman@portues.org
# August 25th 2016
. /usr/share/porteus/porteus-functions
get_colors
echo
CWD=`pwd`
usage(){
echo
echo "Usage:"
bold "$0 /path/to/slackware-package.txz /path/to/dir"
bold "$0 /path/to/folder/of/packages /path/to/dir"
echo
exit
}
ARGNUM=$#
# Check input
[ -z $1 ] && usage
[ $# -lt 2 ] && { red "A target dir must be supplied"; usage; }
case $1 in
-h|--help)
usage ;;
esac
ARGS=${@:1:$(($#-1))}
LASTARG=${@: -1}
[ -e $1 ] && SRC=FILE
[ -d $1 ] && SRC=DIR
[ -z $SRC ] && { red "$1 does not appear to exist."; usage; }
[ ! -d $LASTARG ] && { red "$LASTARG is not a valid directory."; usage; }
[ ! -w $LASTARG ] && { red "$LASTARG is not writable."; usage; }
# Make variable with source files
if [ "$SRC" = DIR ]; then
FILES=`find $1 -type f | egrep "*.tgz|*.txz"`
[[ -z $FILES ]] && { red "$1 does not contain any slackware packages."; usage; }
else
FILES=${@:1:$(($#-1))}
fi
# Go through packages and extract them
for a in $FILES; do
file $a | egrep -qo "gzip compressed data|XZ compressed data" || { bold "${a##*/} is not a slackware package. Skipping."; continue; }
installpkg --terse --root $LASTARG $a
done
How do i become super user?
Wear your underpants on the outside and put on a cape.
brokenman
-
ncmprhnsbl
- DEV Team
- Posts: 3938
- Joined: 20 Mar 2012, 03:42
- Distribution: v5.0-64bit
- Location: australia
-
Contact:
Post#20
by ncmprhnsbl » 25 Aug 2016, 03:44
@brokenman nice one (:
was just about to draw attention to the 'installpkg --terse --root' command
(already mentioned by others
)
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44
ncmprhnsbl
-
Jack
- Contributor
- Posts: 1857
- Joined: 09 Aug 2013, 14:25
- Distribution: Porteus and Nemesis
- Location: USA
Post#21
by Jack » 25 Aug 2016, 13:08
francois wrote:@jack, see sitwon script:
convert Slackware's TGZ (or TXZ) package into .xzm compressed file
https://github.com/Sitwon/Porteus/blob/ ... ts/txz2xzm
Code: Select all
#!/bin/bash
# convert Slackware's TGZ (or TXZ) package into .xzm compressed file
# which can be used as a LiveCD module
#
# Author: Tomas M. <http://www.linux-live.org>
# Modifications for Porteus by fanthom
# Switch to root
if [ "$DISPLAY" ]; then
if [ `whoami` != "root" ]; then
mod=`readlink -f $1`
mod2=`readlink -f $2`
xterm -T "Please enter root's password below" -e su - -c "/opt/porteus-scripts/txz2xzm $mod $mod2"
exit
fi
else
if [ `whoami` != "root" ]; then
echo "Please enter root's password below"
mod=`readlink -f $1`
mod2=`readlink -f $2`
su - -c "/opt/porteus-scripts/txz2xzm $mod $mod2"
exit
fi
fi
if [ "$1" = "" -o "$2" = "" ]; then
echo
echo "Convert Slackware's TXZ package into .xzm compressed module"
echo "usage: $0 source_filename.txz output_file.xzm"
exit 1
fi
PATH=.:$(dirname $0):/usr/lib:$PATH
. liblinuxlive || exit 1
TMPDIR=/tmp/txz2xzm$$
installpkg -root $TMPDIR $1
if [ $? != 0 ]; then echo "error installing package"; exit; fi
# optimalization procedures, this doesn't hurt
find $TMPDIR/usr{/local,/}{man,info} -type l -name "*.gz" 2>/dev/null | xargs -r gunzip -f
find $TMPDIR/usr{/local,/}{man,info} -type f -name "*.gz" 2>/dev/null | xargs -r gunzip
rm -f $TMPDIR/{usr,usr/local,var}/man/cat*/*
create_module $TMPDIR "$2"
if [ $? != 0 ]; then echo "error building compressed image"; exit; fi
rm -Rf $TMPDIR
I know those were there but txz2dir was not. Or I must not be seeing it.
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
-
Bogomips
- Full of knowledge
- Posts: 2564
- Joined: 25 Jun 2014, 15:21
- Distribution: 3.2.2 Cinnamon & KDE5
- Location: London
Post#22
by Bogomips » 25 Aug 2016, 13:15
Not sure if going round in circle or in spiral.
ncmprhnsbl wrote:was just about to draw attention to the 'installpkg --terse --root' command
Languishing in Tutorials:
http://forum.porteus.org/viewtopic.php? ... 841#p27635
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: 1255
- Joined: 09 Jan 2011, 18:48
- Distribution: Porteus v5.0-kde-64 bits
- Location: Santo Domingo
-
Contact:
Post#23
by wread » 25 Aug 2016, 13:21
There wasn't any txz2dir as far as I can remember. But there was Ark to do the same, long ago
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
-
Jack
- Contributor
- Posts: 1857
- Joined: 09 Aug 2013, 14:25
- Distribution: Porteus and Nemesis
- Location: USA
Post#24
by Jack » 25 Aug 2016, 13:23
I won't say anymore on this cause brokenman has just release txz2dir and I made a copy of his script.
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