You are not logged in.

#1 2008-05-13 15:50:37

Sajmon
Member
From: Austria/Poland
Registered: 2008-05-12
Posts: 3
Website

makepkg: unpack deb support

Hello all,

A small patch for makepkg helps DEB to unpack.
http://www.sajmon.at/archlinux/PKGBUILD … kage.patch

My first picasa(google not provide tar.gz) PKGBUILD for testing
http://www.sajmon.at/archlinux/PKGBUILDS/picasa

I am glad for your comments.

regards,
Sajmon

PS. sorry for my english, archlinux installed on Saturday

Offline

#2 2008-05-13 16:08:25

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,123

Re: makepkg: unpack deb support

Is this easier/better then using deb2targz?

edit: Your solution looks quite KISS for me...

Last edited by Sigi (2008-05-13 16:10:32)


Haven't been here in a while. Still rocking Arch. smile

Offline

#3 2008-05-13 17:26:10

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: makepkg: unpack deb support

Hah, neat.

For the PKGBUILD: I think the license is LGPL2, and make sure you use namcap (pkg from extra) on both the PKGBUILD and the resulting pkg.tar.gz.


1000

Offline

#4 2008-05-13 17:38:20

oliwer
Member
From: Paris
Registered: 2007-06-30
Posts: 153
Website

Re: makepkg: unpack deb support

Although the usage of .deb should not be encouraged on Arch, I think this patch should be applied. It only brings good.

Offline

#5 2008-05-13 18:57:34

Sajmon
Member
From: Austria/Poland
Registered: 2008-05-12
Posts: 3
Website

Re: makepkg: unpack deb support

byte wrote:

...
For the PKGBUILD: I think the license is LGPL2, and make sure you use namcap (pkg from extra) on both the PKGBUILD and the resulting pkg.tar.gz.

Thanks for the tips, picasa PKGBUILD updated.

regards,
Sajmon

Offline

#6 2008-05-13 19:01:49

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: makepkg: unpack deb support

I suggest you join the pacman-dev mailing list and post your patch there, if you'd like it to get accepted into makepkg upstream.  There's a link for mailing lists on the front page.

Offline

#7 2008-05-15 12:22:16

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: makepkg: unpack deb support

A deb package is a data.tar.gz and a control.tar.gz bundled in an ar archive. Adding unpack support for .deb files is still useless in the way you added it: I don't care about the control.tar.gz and as result I would like the contents of data.tar.gz. Just unpacking the ar archive does not result in this.

Offline

#8 2008-05-15 12:54:19

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,204
Website

Re: makepkg: unpack deb support

byte wrote:

For the PKGBUILD: I think the license is LGPL2

Then we should have the access to the source and not need to extract the deb right...

Google FAQ wrote:

Q: Is Picasa for Linux open source?

Picasa for Linux isn't open source; it uses a carefully tested version of Wine to run the current Windows version of Picasa. Wine itself is an open-source implementation of the Windows API. It runs on top of the X Window System and Linux or Unix.

I'm not a fan of the patch to makepkg.  As JGC pointed out, it is not fully functional as it does not actually extract the relevant part of the file.  Also, how much software is just distributed as a .deb or .rpm anyway.  It seems the current solution of using deb2targz is enough in these few cases.  Anyway, feel free to post a version fixing JGC's problem to the pacman-dev mailing list and see what others there think.

Last edited by Allan (2008-05-15 12:55:09)

Offline

#9 2008-05-15 17:53:29

Sajmon
Member
From: Austria/Poland
Registered: 2008-05-12
Posts: 3
Website

Re: makepkg: unpack deb support

Hallo,
   
is this better?

+            *application/x-debian-package*)
+                                  if [ ! -d ../deb-controlfiles ];then
+                                echo "## ==> unpack DEB control files  <== ##"
+                                     mkdir ../deb-controlfiles
+                                        ( cd ../deb-controlfiles ; ar -x $SRCDEST/$file /control.tar.gz ; bsdtar -x -f control.tar.gz ;rm control.tar.gz )
+                                     fi
+                                ( cd $SRCDEST;ar -x $file /data.tar.gz;mv data.tar.gz $file.tar.gz  )
+                                echo "## ==> unpack $file.tar.gz instead $file <== ##"
+                                file=$SRCDEST/$file.tar.gz
+                                cmd="bsdtar -x -f $file";;

regards,
Sajmon

Last edited by Sajmon (2008-05-15 18:12:44)

Offline

#10 2008-05-16 03:02:08

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,204
Website

Re: makepkg: unpack deb support

I'd get rid of this whole section.  Who needs the control files?

+                                  if [ ! -d ../deb-controlfiles ];then
+                                echo "## ==> unpack DEB control files  <== ##"
+                                     mkdir ../deb-controlfiles
+                                        ( cd ../deb-controlfiles ; ar -x $SRCDEST/$file /control.tar.gz ; bsdtar -x -f control.tar.gz ;rm control.tar.gz )
+                                     fi

Don't understand the need for cd $SRCDEST here...  do you see it for any other file types?

+                                ( cd $SRCDEST;ar -x $file /data.tar.gz;mv data.tar.gz $file.tar.gz  )
+                                echo "## ==> unpack $file.tar.gz instead $file <== ##"
+                                file=$SRCDEST/$file.tar.gz
+                                cmd="bsdtar -x -f $file";;

As pointed out above, if you actually want this to go anywhere, you need to post to the pacman-dev mailing list.  It will get overlooked on the forums.  You will also have to provide some justification for its inclusion as it does not seem really necessary to me.

Offline

Board footer

Powered by FluxBB