You are not logged in.
Hi folks! I am trying to build bacula from AUR and Makepkg refuses to unpack the bacula.tar.gz. I was able to find what was happening but couldn't understand why.
/usr/bin/makepkg lines 618-631:
local file_type=$(file -bizL "$file")
local cmd=''
case "$file_type" in
*application/x-tar*|*application/zip*|*application/x-zip*|*applica$
cmd="bsdtar -x -f $file" ;;
*application/x-gzip*)
cmd="gunzip -d -f $file" ;;
*application/x-bzip*)
cmd="bunzip2 -f $file" ;;
*)
# Don't know what to use to extract this file,
# skip to the next file
continue;;
esacFor some reason it always falls through to the last case - skip to the next file.
sa@arch ~ $ file -bizL bacula-2.2.8.tar.gz
application/x-tar compressed-encoding=application/x-gzipsa@arch ~ $ sudo pacman -Q file
file 4.23-1Any idea what could be wrong and how to fix it?
Arch linux
Offline
did you md5'd the archive to check if it's not corrupted ?
All design goals must be phrased in such a way that it is hard to use them as slogans to justify stupidity.
Offline
I didn't, makepkg did. Here's the output:
==> Making package: bacula-sqlite 2.2.8-3 (Sun Feb 24 08:23:02 EST 2008)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
-> Found bacula-2.2.8.tar.gz in build dir
-> Found bacula-dir in build dir
-> Found bacula-fd in build dir
-> Found bacula-sd in build dir
-> Found bacula-2.2.8-sqlite.patch in build dir
==> Validating source files with md5sums...
bacula-2.2.8.tar.gz ... Passed
bacula-dir ... Passed
bacula-fd ... Passed
bacula-sd ... Passed
bacula-2.2.8-sqlite.patch ... Passed
==> Extracting Sources...
==> Removing existing pkg/ directory...
==> Entering fakeroot environment...
==> Starting build()...
PKGBUILD: line 24: cd: /var/abs/local/bacula-sqlite/src/bacula-2.2.8: No such file or directory
PKGBUILD: line 28: ./configure: No such file or directory
make: *** No targets specified and no makefile found. Stop.
==> ERROR: Build Failed.
Aborting...Arch linux
Offline
looks like the problem is elsewhere... the package is extracted... seems to be only a directory name problem... check the name of the extracted directory and adjust your PKGBUILD
All design goals must be phrased in such a way that it is hard to use them as slogans to justify stupidity.
Offline
hmmm... i may have posted too fast, my bad... i've check the PKGBUILD from AUR and it's working properly...
[edit]what happens when you untar the archive (out of the makepkg process) ? Is everything correct ? If yes, you can try makepkg -e, it won't untar the archive again...[/edit]
Last edited by bangkok_manouel (2008-02-24 13:45:34)
All design goals must be phrased in such a way that it is hard to use them as slogans to justify stupidity.
Offline
looks like the problem is elsewhere... the package is extracted...
That's the problem, the package IS NOT extracted. Read the initial post.
There seems to be something wrong between "file" and mime types....
Arch linux
Offline
Hmmm...this piece of code always produces "unknown" on my machine. I just extracted it from makepkg and made standalone.
I wonder if same is true for any tar.gz file. Will test it next...
#!/bin/bash
file="bacula-2.2.8.tar.gz"
file_type=$(file -bizL "$file")
cmd=''
case "$file_type" in
*application/x-tar*|*application/zip*|*application/x-zip*|*application/x-cpio*)
cmd="bsdtar -x -f $file" ;;
*application/x-gzip*)
cmd="gunzip -d -f $file" ;;
*application/x-bzip*)
cmd="bunzip2 -f $file" ;;
*)
# Don't know what to use to extract this file,
# skip to the next file
#continue;;
cmd="unknown";
esac
printf "${cmd}\n";Arch linux
Offline
Okay, for every single *.tar.gz file I've tested "file -bizL" output is "application/x-tar compressed-encoding=application/x-gzip". And for all of them the script above failed to find a proper command for extracting source...Proly need a little more knowledge in bash to figure it out.
Arch linux
Offline
really strange...
Could you add a "echo $file_type" in the script maybe just to check?
Are you using a strange locale? Apparently not, but well, I have no idea..
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
"echo $file_type" produces "application/x-tar compressed-encoding=application/x-gzip", locale is "en_US.utf8"
I can extract tar.gz manually and then the build goes on fine. But I'd still like to find out why it fails !?
Arch linux
Offline