Page 1 of 1

(SOLVED) rpm2xzm

Posted: 16 Oct 2011, 05:56
by francois
It would be nice to have rpm2xzm module.

Re: rpm2xzm

Posted: 16 Oct 2011, 23:45
by fanthom
hi francois,

please try this script (save it as rpm2xzm and give x bit) and let me know if it works. if yes then i'll add it to Porteus-1.1.

Code: Select all

#!/bin/sh
# Script by fanthom

# Variables
c='\e[36m'
r='\e[31m'
e=`tput sgr0`

# Let's start
if [ "$1" = "" ]; then
    echo -e "${c}nead an rpm package as an argument, example: $0 /mnt/sda2/fedora_packages/package.rpm"$e | fmt -w 80
    exit
fi

txz=`readlink -f $1 | sed s/.rpm$/.txz/`
mod=`readlink -f $1 | sed s/.rpm$/.xzm/`
rpm2txz $1 && txz2xzm $txz $mod && rm $txz && echo -e "${c}Module created as $mod"$e || echo -e "${r}Module creation failed!"$e

Re: rpm2xzm

Posted: 17 Oct 2011, 01:43
by francois
I made your script executable. Here is the output:
bash-4.1# ls
brhl2170wlpr-2.0.2-1.i386.rpm rpm2xzm.sh*
bash-4.1# rpm2xzm /mnt/sda2/porteus32bit_v10/porteus/modules/brhl2170wlpr-2.0.2-1.i386.rpm
bash: rpm2xzm: command not found
bash-4.1#

Re: rpm2xzm

Posted: 17 Oct 2011, 04:44
by Falcony
rpm2xzm is in additional xzm utilities, see description of
http://code.google.com/p/fidoslax/wiki/XzmUtilities

number 6 - rpm2xzm

Re: rpm2xzm

Posted: 17 Oct 2011, 17:14
by francois
Thanks falcony.

What about a 64bit version? (I think this is what fanthom was about to create)

Re: rpm2xzm

Posted: 18 Oct 2011, 12:02
by Ahau
In order to use it as a command without specifying a path to the script, you need to save it to somewhere in your $PATH global variable (see the output of 'echo $PATH'), probably /usr/bin/ or /opt/porteus-scripts/ would be most appropriate.

Or, you can navigate to the directory where it was saved and run it as ./rpm2xzm /path/to/rpm.rpm

EDIT: oops -- should have read the mini-chat. seems you've already got this advice from fanthom. I'll leave it here for posterity.

Re: rpm2xzm

Posted: 18 Oct 2011, 12:30
by francois
I am not computer oriented. :oops:

It works very fine:
...
Slackware package /mnt/sda2/porteus32bit_v10/porteus/modules/rpm2xzm/brhl2170wlpr-2.0.2-1.i386.txz created.

Verifying package brhl2170wlpr-2.0.2-1.i386.txz.
Installing package brhl2170wlpr-2.0.2-1.i386.txz:
PACKAGE DESCRIPTION:
Package brhl2170wlpr-2.0.2-1.i386.txz installed.

Thanks a lot fanthom.