Page 1 of 2

multi package manager

Posted: Tue 10 Nov 2009, 20:31
by jamesjeffries2
Been out of the puppy loop for a while due to having to learn lots about debian for work. Good to be back using puppy, much friendlier feel to it.

Anyway, working on a command line based package manager for puppy. a sort of apt-get style thing that we can link up to ibilio or any other puppy software repository.

After I have the basic functionality working I want to work on getting it be able to install packages from other distributions too such as .deb .rpm etc.

Would anyone use this? and what do some of the more technical people think about using other package formats?

Jim

Posted: Tue 10 Nov 2009, 22:15
by Eyes-Only
.

Posted: Wed 11 Nov 2009, 01:39
by Jim1911
jamesjeffries2,

I'm sure that such an application will be embraced. But, as Eyes-Only said, there is work being done that you may want to check out, for example dposil already has done considerable work on getting apt-get and synaptic to work with his dpup and he expects them to be ready for release later this month.

Welcome back,
Jim

Posted: Wed 11 Nov 2009, 06:34
by technosaurus
petget (and install.sh) can do a lot of this (pet, tgz and deb) from the command line already, but not rpm AFAIK. I also made a patch to be able to use txz (needs xz and tar 1.22+)

Posted: Wed 11 Nov 2009, 06:48
by gposil
The latest rpm as in Mandriva2010, Suse and FC is a bit of a mystery, no one can tell me definitively how to unpack one...rpm2cpio does not work on them...Any clues

Posted: Wed 11 Nov 2009, 07:20
by amigo
gposil, can you supply a link to one of the rpm's which is not working?

Posted: Wed 11 Nov 2009, 07:52
by gposil

Posted: Wed 11 Nov 2009, 11:02
by amigo
Thanks, I'll see what I can do about this -I've found others which did not unpack with certain tools.

Posted: Wed 11 Nov 2009, 11:16
by aragon
if that helps: 7z shows me that inside the rpm there is the following archive

Code: Select all

abiword-2.8.1-1mdv2010.0.i586.cpio.lzma
whereas an older rpm has this

Code: Select all

streamripper-1.62.3-8.fc8.i386.cpio.gz
so maybe it is a problem cpio.gz vs. cpio.lzma.

aragon

Posted: Wed 11 Nov 2009, 16:01
by amigo
I think you are onto the answer there aragon -the funny thing is that these brand-new archives are created with a(very) old version of rpm. I have occassionally had problems with some these, but have been able to decompress them using rpm2tgz or disrpm.

I#m going to llok at the rpm-3.x sources being used by these distros to see what is going on.

Posted: Wed 11 Nov 2009, 19:04
by amigo
Okay, I cam up with this which seems to work with rpm2cpio, whether from rpm-3.x or rpm-4.x:

Code: Select all

#!/bin/sh

FILE="$1"
FILE_BASENAME=${FILE%.*}

#rpm2cpio test.rpm > "$FILE_BASENAME".cpio.test
#gzip -dc "$FILE_BASENAME".cpio.test > "$FILE_BASENAME".cpio ||rm -f "$FILE_BASENAME".cpio
#bzip2 -dc "$FILE_BASENAME".cpio.test > "$FILE_BASENAME".cpio ||rm -f "$FILE_BASENAME".cpio
#xz -dc "$FILE_BASENAME".cpio.test > "$FILE_BASENAME".cpio ||rm -f "$FILE_BASENAME".cpio
#cpio -i -m -d < test.cpio

rpm2cpio "$FILE" > "$FILE_BASENAME".cpio.test

for method in gzip bzip2 xz ; do
	$method -t "$FILE_BASENAME".cpio.test &> /dev/null
	if [[ $? = 0 ]] ; then
		$method -dc "$FILE_BASENAME".cpio.test > "$FILE_BASENAME".cpio
	else
		continue
	fi
done

if [[ -f "$FILE_BASENAME".cpio ]] ; then
	rm -f "$FILE_BASENAME".cpio.test
	cpio -i -m -d < "$FILE_BASENAME".cpio &> /dev/null
	if [[ $? = 0 ]] ; then
		rm -f "$FILE_BASENAME".cpio
		echo "Done"
	else
		echo "Failed cpio"
	fi
else
	echo "Failed -no compression method found"
fi
That may *not* work with the busybox implementation of rp2cpio. I'm still trying to get it working another way as I have another tool which I normally use on rpm'S which does not rpm2cpio, but hexdump instead. But I haven't been able to get the lzma 'magic' bytes properly recognized.

Posted: Wed 11 Nov 2009, 19:44
by jamesjeffries2
hmm, you are right looks like a lot of the work i was thinking of is already done!

WOW! for me one of the big things that i prefered in other distros was the package manager, but this looks really good.

I'm going to have to rethink this a bit, but I would still like a command version I think for my "puppy server" that I only access over ssh.

Posted: Wed 11 Nov 2009, 20:09
by jamesjeffries2
So my understanding is this:

- which ever distro the puppy that you are using is based on can use the packages from that distro in the package manager
- and the user can add any repo from said distro


What I want to do is:

- for ANY puppy user to be able to install what ever packages they want.
- and the user can add ANY repo that contains these packages
- and dependencies can be satisfied cross distribution
- all from the command line

Should be a challenge, especially the cross package dependency stuff

Posted: Thu 12 Nov 2009, 07:41
by amigo
Mixing programs and libs from different distros -even from different versions of the same distro is a bad idea. And the easier you make doing that, the more problems you create for the user.

Since there are over 1,000 distros out there, why not just build a program which will randomly install one program or library from each of themx --what do you suppose the result would be?

Posted: Thu 12 Nov 2009, 09:20
by Lobster
There are two major sources of files
RPM (Red Hat/Fedora) and OpenSuse also using RPM
I believe.
Would that be a good place to start?
Much linux software offered
seems designed for usage by either Red Hat or Suse . . ..

Posted: Thu 12 Nov 2009, 12:53
by gposil
RPM problem solved...

Yes you need the full version of rpm2cpio, not the busybox one...
rpm2cpio xyz.rpm | xz -d | cpio -idv
That works...

are .deb packets auto-installable via PPM/

Posted: Thu 12 Nov 2009, 13:55
by otropogo
I'm a little confused by this thread. I vaguely recall reading a year or more ago that Puppy 4 was able to auto-install debian packages.

I've never actually tried this, but just today Jockjunior posted about successfully installing an anonymiser program called jondo via a .deb package.

What's the story on this?

Can it be done automatically via the pet manager in 4.3.1, or does one have to track down and install dependencies manually?

It was mentioned earlier here that it's dangerous to install packets from a different versions of the same distro.

Presumably that means that to use a .deb packet safely, the kernel for which it was compiled has to be the same as in the version of Puppy in which it's to be installed?

If so, there's not much hope of keeping up to date with the latest browser versions, is there?

Posted: Thu 12 Nov 2009, 14:15
by gposil
If you are using Dpup or Upup, yes certainly you can use PPM to install debs(with dependencies) from Debian or Ubuntu repos...not sure about 4.3.1...

Posted: Thu 12 Nov 2009, 14:29
by sikpuppy
gposil wrote:If you are using Dpup or Upup, yes certainly you can use PPM to install debs(with dependencies) from Debian or Ubuntu repos...not sure about 4.3.1...
4.3.1 installs downloaded DEB files, but it doesn't check for dependencies. In fact 4.3.1 appears not to check dependencies unless the PPM is used, or the CHECK DEPENDENCIES menu item is used.

Posted: Thu 12 Nov 2009, 14:49
by otropogo
sikpuppy wrote:....
4.3.1 installs downloaded DEB files, but it doesn't check for dependencies. In fact 4.3.1 appears not to check dependencies unless the PPM is used, or the CHECK DEPENDENCIES menu item is used.
:? So, if I download a .deb package, I can use 4.3.1's pet manager to install it, and it will tell me what dependencies I need - but then I have to go find them, download them, figure out where they need to go, and manually put them there?

And does the .deb have to be compiled for the kernel used in 4.3.1?