You are not logged in.

#1 2009-09-16 03:19:27

opothehippo
Member
From: hella norcal bro
Registered: 2009-08-06
Posts: 89

Makepkg does not extract anything before trying to make [SOLVED]

I have a puzzeling problem with my makepkg. When trying to install any package from the aur (with or without yaourt) I get an error similar to this:

[chris@cow ~]$ wget http://aur.archlinux.org/packages/opera/opera.tar.gz
--2009-09-14 16:55:28--  http://aur.archlinux.org/packages/opera/opera.tar.gz
Resolving aur.archlinux.org... 208.92.232.29
Connecting to aur.archlinux.org|208.92.232.29|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2724 (2.7K) [application/x-tgz]
Saving to: `opera.tar.gz'

100%[=====================================================================================================================================================================================================>] 2,724       --.-K/s   in 0.001s 

2009-09-14 16:55:28 (2.87 MB/s) - `opera.tar.gz' saved [2724/2724]

[chris@cow ~]$ tar -xzvf opera.tar.gz
opera
opera/opera.desktop
opera/PKGBUILD
opera/opera-qt4-theme.patch
tar: Record size = 18 blocks
[chris@cow ~]$ cd opera
opera/        opera.tar.gz 
[chris@cow ~]$ cd opera
[chris@cow opera]$ makepkg
==> Making package: opera 10.00-3 x86_64 (Mon Sep 14 16:56:23 PDT 2009)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
  -> Downloading opera-10.00.gcc4-qt4.x86_64.tar.bz2...
--2009-09-14 16:56:24--  http://ftp.opera.com/pub/opera/linux/10 … 64.tar.bz2
Resolving ftp.opera.com... 195.189.143.122
Connecting to ftp.opera.com|195.189.143.122|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9262414 (8.8M) [application/x-tar]
Saving to: `opera-10.00.gcc4-qt4.x86_64.tar.bz2.part'

100%[=====================================================================================================================================================================================================>] 9,262,414   79.7K/s   in 23s     

2009-09-14 16:56:47 (399 KB/s) - `opera-10.00.gcc4-qt4.x86_64.tar.bz2.part' saved [9262414/9262414]

  -> Found opera.desktop in build dir
  -> Found opera-qt4-theme.patch in build dir
==> Validating source files with md5sums...
    opera-10.00.gcc4-qt4.x86_64.tar.bz2 ... Passed
    opera.desktop ... Passed
    opera-qt4-theme.patch ... Passed
==> Extracting Sources...
==> Entering fakeroot environment...
==> Starting build()...
/home/chris/opera/PKGBUILD: line 24: cd: /home/chris/opera/src/opera-10.00-4585.gcc4-qt4.x86_64: No such file or directory
sed: can't read usr/share/opera/defaults/pluginpath.ini: No such file or directory
==> ERROR: Build Failed.
    Aborting...
[chris@cow opera]$

With the good help of irc people I discovered that makepkg was not extracting archives before it tried to use them to make a package. (An example in this case would be it not extracting opera-10.00.gcc4-qt4.x86_64.bz2 and then trying to use what would have resulted from its extraction to actually make the application.) This is why it would give the "No such file or directory" error.

I havn't the slightest clue why packages aren't extracting. Any ideas?

Last edited by opothehippo (2009-09-23 03:14:19)


Arch x86_64 | XMonad

Offline

#2 2009-09-16 04:00:48

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

Re: Makepkg does not extract anything before trying to make [SOLVED]

What is the output of:

file -bizL opera-10.00.gcc4-qt4.x86_64.tar.bz2

Offline

#3 2009-09-17 01:36:03

opothehippo
Member
From: hella norcal bro
Registered: 2009-08-06
Posts: 89

Re: Makepkg does not extract anything before trying to make [SOLVED]

application/x-tar; charset=binary compressed-encoding=application/x-bzip2; charset=binary; charset=binary

Arch x86_64 | XMonad

Offline

#4 2009-09-17 01:49:58

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

Re: Makepkg does not extract anything before trying to make [SOLVED]

I can not replicate on i686...

> makepkg
==> Making package: opera 10.00-3 i686 (Thu Sep 17 11:48:05 EST 2009)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
  -> Found opera-10.00.gcc4-qt4.i386.tar.bz2 in build dir
  -> Found opera.desktop in build dir
  -> Found opera-qt4-theme.patch in build dir
==> Validating source files with md5sums...
    opera-10.00.gcc4-qt4.i386.tar.bz2 ... Passed
    opera.desktop ... Passed
    opera-qt4-theme.patch ... Passed
==> Extracting Sources...
  -> bsdtar -x -f "opera-10.00.gcc4-qt4.i386.tar.bz2"
==> Entering fakeroot environment...

and file gives the exact same output and that is what makepkg uses to determine what to extract.  So I have no idea here...

Offline

#5 2009-09-17 05:46:41

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: Makepkg does not extract anything before trying to make [SOLVED]

@allan not the same output. you have after Extracting Sources the command from extracting. he doesn't


Give what you have. To someone, it may be better than you dare to think.

Offline

#6 2009-09-17 05:51:29

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

Re: Makepkg does not extract anything before trying to make [SOLVED]

well...   that was my point.  I was giving a "works for me".

Edit: I think I see where the confusion was.  The "file" command I gave above gives the same output for me.

Offline

#7 2009-09-17 06:11:20

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Makepkg does not extract anything before trying to make [SOLVED]

opothehippo, bsdtar is included in libarchive. Do you have that installed?

Offline

#8 2009-09-17 07:40:56

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Makepkg does not extract anything before trying to make [SOLVED]

Maybe add some debug statements in makepkg, especially around lines 642-658.
Basically the "case file_type" construct, to see what is going on there, to check if it is indeed skipping the file and to understand why.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#9 2009-09-19 03:38:45

opothehippo
Member
From: hella norcal bro
Registered: 2009-08-06
Posts: 89

Re: Makepkg does not extract anything before trying to make [SOLVED]

How would I do that? What file is it that I must make changes too?


Arch x86_64 | XMonad

Offline

#10 2009-09-19 04:53:45

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: Makepkg does not extract anything before trying to make [SOLVED]

opothehippo wrote:

How would I do that? What file is it that I must make changes too?

Basically add something along these lines to /usr/bin/makepkg..  I left the new lines unindented just to make them more obvious.

        # fix flyspray #6246
        local file_type=$(file -bizL "$file")
echo "FILE TYPE: $file_type"
        local cmd=''
        case "$file_type" in
            *application/x-tar*|*application/zip*|*application/x-zip*|*application/x-cpio*)
echo "CASE TAR"
                cmd="bsdtar -x -f" ;;
            *application/x-gzip*)
echo "CASE GZIP"
                cmd="gunzip -d -f" ;;
            *application/x-bzip*)
echo "CASE BZIP"
                cmd="bunzip2 -f" ;;
            *application/x-xz*)
echo "CASE XZ"
                cmd="xz -d -f" ;;
            *)
                # Don't know what to use to extract this file,
                # skip to the next file
echo "CASE SKIP"
                continue;;
        esac

Last edited by tdy (2009-09-19 05:19:28)

Offline

#11 2009-09-19 06:34:35

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: Makepkg does not extract anything before trying to make [SOLVED]

It works for me here on x86_64.

--2009-09-19 02:32:38--  http://ftp.opera.com/pub/opera/linux/1000/final/en/x86_64/opera-10.00.gcc4-qt4.x86_64.tar.bz2              
Resolving ftp.opera.com... 195.189.143.122                                                                                          
Connecting to ftp.opera.com|195.189.143.122|:80... connected.                                                                       
HTTP request sent, awaiting response... 200 OK                                                                                      
Length: 9262414 (8.8M) [application/x-tar]                                                                                          
Saving to: `opera-10.00.gcc4-qt4.x86_64.tar.bz2.part'                                                                               

100%[============================================================================================>] 9,262,414    425K/s   in 23s     

2009-09-19 02:33:01 (396 KB/s) - `opera-10.00.gcc4-qt4.x86_64.tar.bz2.part' saved [9262414/9262414]

  -> Found opera.desktop in build dir
  -> Found opera-qt4-theme.patch in build dir
==> Validating source files with md5sums...  
    opera-10.00.gcc4-qt4.x86_64.tar.bz2 ... Passed
    opera.desktop ... Passed                      
    opera-qt4-theme.patch ... Passed              
==> Extracting Sources...                         
  -> bsdtar -x -f "opera-10.00.gcc4-qt4.x86_64.tar.bz2"
==> Entering fakeroot environment...                   
==> Starting build()...

Offline

#12 2009-09-20 02:31:02

opothehippo
Member
From: hella norcal bro
Registered: 2009-08-06
Posts: 89

Re: Makepkg does not extract anything before trying to make [SOLVED]

I edited my makepkg as follows:

 642                 # fix flyspray #6246
 643                 local file_type=$(file -bizL "$file")
 644                 echo "FILE TYPE: $file_type"
 645                 local cmd=''
 646                 case "$file_type" in
 647                         *application/x-tar*|*application/zip*|*application/x-zip*|*application/x-cpio*)
 648                         echo "CASE TAR"
 649                                 cmd="bsdtar -x -f" ;;
 650                         *application/x-gzip*)
 651                         echo "CASE GZIP"
 652                                 cmd="gunzip -d -f" ;;
 653                         *application/x-bzip*)
 654                         echo "CASE BZIP"
 655                                 cmd="bunzip2 -f" ;;
 656                         *application/x-xz*)
 657                         echo "CASE XZ"
 658                                 cmd="xz -d -f" ;;
 659                         *)      
 660                                 # Don't know what to use to extract this file,
 661                                 # skip to the next file
 662                         echo "CASE SKIP"
 663                                 continue;;
 664                 esac
 665

I ran makepkg again and received this:

==> Extracting Sources...
FILE TYPE: application/x-tar; charset=binary compressed-encoding=application/x-bzip2; charset=binary; charset=binary
CASE SKIP
FILE TYPE: text/plain; charset=utf-8
CASE SKIP
FILE TYPE: text/plain; charset=us-ascii
CASE SKIP
==> Entering fakeroot environment...
==> Starting build()...
/tmp/yaourt-tmp-chris/aur-opera/opera/./PKGBUILD: line 24: cd: /tmp/yaourt-tmp-chris/aur-opera/opera/src/opera-10.00-4585.gcc4-qt4.x86_64: No such file or directory
sed: can't read usr/share/opera/defaults/pluginpath.ini: No such file or directory
==> ERROR: Build Failed.
    Aborting...
Error: Makepkg was unable to build opera package.

I have a limited understanding of this, I'm guessing makepkg does not recognize the binary and so it skips it?

@iBertus: Thanks for veryifying it works on you 64 bit arch. However I've had this problem on 32 bit arch also.


Arch x86_64 | XMonad

Offline

#13 2009-09-23 03:14:01

opothehippo
Member
From: hella norcal bro
Registered: 2009-08-06
Posts: 89

Re: Makepkg does not extract anything before trying to make [SOLVED]

Got it working! I was looking at another thread where C programs weren't building and cwrapper was the culprit. I removed the cwrapper stuff from my .bash_profile and it works great now. A simple solution to a frusterating problem.


Arch x86_64 | XMonad

Offline

Board footer

Powered by FluxBB