(SOLVED) rpm2xzm

If you are looking for a specific 32-bit package and you can't find it in any of the 32-bit repos, please post a request for it here.
User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

(SOLVED) rpm2xzm

Post#1 by francois » 16 Oct 2011, 05:56

It would be nice to have rpm2xzm module.
Last edited by francois on 12 Nov 2011, 19:22, edited 3 times in total.
Prendre son temps, profiter de celui qui passe.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: rpm2xzm

Post#2 by fanthom » 16 Oct 2011, 23:45

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
Please add [Solved] to your thread title if the solution was found.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: rpm2xzm

Post#3 by francois » 17 Oct 2011, 01:43

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#
Prendre son temps, profiter de celui qui passe.

Falcony
Full of knowledge
Full of knowledge
Posts: 237
Joined: 01 Jan 2011, 12:44
Location: Russia

Re: rpm2xzm

Post#4 by Falcony » 17 Oct 2011, 04:44

rpm2xzm is in additional xzm utilities, see description of
http://code.google.com/p/fidoslax/wiki/XzmUtilities

number 6 - rpm2xzm

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: rpm2xzm

Post#5 by francois » 17 Oct 2011, 17:14

Thanks falcony.

What about a 64bit version? (I think this is what fanthom was about to create)
Prendre son temps, profiter de celui qui passe.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: rpm2xzm

Post#6 by Ahau » 18 Oct 2011, 12:02

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.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: rpm2xzm

Post#7 by francois » 18 Oct 2011, 12:30

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.
Prendre son temps, profiter de celui qui passe.

Post Reply