Help Learning Yaourt


12 posts
by sdjf » Wed Jan 09, 2013 3:51 am
I have two packages I need to get that are in the AUR but not in in the Alarm repository. So, I installed Yaourt to install them and must be doing something wrong.

Both packages, yaourt complains about missing metadata and invalid/corrupt packages, I downloaded the raw data files, should I have also gotten the PKGBUILDs for both files?

# yaourt -U /boot/pppconfig.tar.gz
warning: database file for 'custom' does not exist
loading packages...
error: missing package metadata in /boot/pppconfig.tar.gz
error: '/boot/pppconfig.tar.gz': invalid or corrupted
package
# yaourt -U /boot/xwit.tar.gz
warning: database file for 'custom' does not exist
loading packages...
error: missing package metadata in /boot/xwit.tar.gz
error: '/boot/xwit.tar.gz': invalid or corrupted
package
#

Note I am doing this offline so I would think the warnings about no custom databases file should not matter. I get them all the time for straight pacman, and it is still able to give me dependency lists and install the packages.

Then I read the man page and wiki over again and tried -Ub, and got a little further, but still it is not working on either:

# yaourt -Ub /boot/xwit.tar.gz
error: failed to initialize alpm library (couldnot find or read directory)
sf:TueJan08-09:05am# yaourt -Ub /boot/pppconfig.tar.gz
error: failed to initialize alpm library (couldnot find or read directory)
#

I do see there are alpm files, no idea how that is related.

# find / -name "alpm*"
/usr/lib/yaourt/alpm_backup.sh
/usr/lib/yaourt/alpm_stats.sh
/usr/lib/yaourt/alpm_query.sh
/usr/include/alpm.h
/usr/include/alpm_list.h
#

What do I do next?

Thanks!
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1298
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by pepedog » Wed Jan 09, 2013 9:35 am
I wouldn't use yaourt for offline, you could run into tmp size problems, and you have the tarball which is half the work
Wouldn't build in boot either
Anyway-
tar xf pppconfig.tar.gz
cd pppconfig
Your source files will be needed at this point, in this case
http://ftp.debian.org/debian/pool/main/p/pppconfig/pppconfig_2.3.19.tar.gz
Your depends would need to be installed, in this case dialog perl ppp
Now build
makepkg -Acs --asroot
Copy made pkg to /boot if you need to save off card, does your zaurus do scp?
install with
pacman -U pppconfig<I hit tab key twice here to autofill>
Posts: 982
Joined: Fri Oct 07, 2011 9:55 am
by sdjf » Wed Jan 09, 2013 9:48 am
I did not know yaourt would build in the directory the file was in. Thanks for that information, and also for telling me how to do this without using yaourt.

Do plan on doing in /root, have about 1.2GB free space there. Forgot I had originally downloaded the source file and changed to the raw data file when that did not work.

This is cool, thank you.

BTW, I put sync at start of my .bashrc, to help in case forget when run pacman.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1298
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by pepedog » Wed Jan 09, 2013 10:04 am
Does scp work? It will help transfer of files, eg
scp <filename> ipofzaurus:/pathonzaurus/
If you never used it, it logs in with same username, you can do username@ipofzaurus
Posts: 982
Joined: Fri Oct 07, 2011 9:55 am
by sdjf » Wed Jan 09, 2013 4:15 pm
Yes, I am using scp to and from my pi and the zaurus. but continuing to put some things in /boot right now so if pi crashes badly, they will be there even if rootfs gets trashed. learning experience for me - not used to a system where it is so easy to trash the file system. probably true for all basic linux distributions when you work just at commandline. My zaurus PDA has a few less ways that this can happen, so learning from mistakes.

Oh, I assume you mean the dependencies need to be installed on Pi before final installation of pppconfig, they do not need to be present to build the binary, do they?

Thanks!
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1298
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by pepedog » Wed Jan 09, 2013 9:00 pm
Look inside a PKGBUILD file, it's almost English!
There are depends and makedepends
Posts: 982
Joined: Fri Oct 07, 2011 9:55 am
by sdjf » Thu Jan 10, 2013 2:08 am
okay, just got done downloading the PKGBUILD files, makepkg pooped out because I had not gotten the PKGBUILD.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1298
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by sdjf » Thu Jan 10, 2013 5:43 am
pepedog wrote:I wouldn't use yaourt for offline, you could run into tmp size problems, and you have the tarball which is half the work


Well, this is not working offline with the instructions you gave for using makepkg either.

pepedog wrote:
tar xf pppconfig.tar.gz
cd pppconfig
Your source files will be needed at this point, in this case
http://ftp.debian.org/debian/pool/main/p/pppconfig/pppconfig_2.3.19.tar.gz


The above I was able to do easily, and already had the pppconfig_2.3.19.tar.gz file, as well as the one without a version for it.

pepedog wrote:
Your depends would need to be installed, in this case dialog perl ppp

perl and ppp are already on the pi, I installed dialog.
pepedog wrote:
Now build
makepkg -Acs --asroot


This does not work offline, whether I use the pppconfig.tar.gz or the pppconfig_2.3.19.tar.gz file.

# tar xf /boot/pppconfig_2.3.19.tar.gz
# cd pppconfig-2.3.19
# ls
0dns-down debian messages.mo
0dns-up dns-clean po
COPYING man pppconfig
# makepkg -Acs --asroot
==> ERROR: PKGBUILD does not exist.
#

So, got the PKGBUILD, then makepkg tries to download the tarball again anyhow:

# makepkg -Acs --asroot
==> Making package: pppconfig 2.3.19-1 (Wed Jan 9 18:40:31 PST 2013)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
-> Downloading pppconfig_2.3.19.tar.gz...
Warning: Transient problem: timeout Will retry
in 3 seconds. 3 retries left.
Warning: Transient problem: timeout Will retry
in 3 seconds. 2 retries left.
Warning: Transient problem: timeout Will retry
in 3 seconds. 1 retries left.
curl: (6) Could not resolve host: ftp.debian.org; Unknown error
==> ERROR: Failure while downloading pppconfig_2.3.19.tar.gz
Aborting...
#

Exact same scenario when run on pppconfig.tar.gz, including a listing of what file it was trying to download from debian.

Tried reading the relevant man pages and none say what to do, to run makepkg offline, if you already have the tar.gz file..

Some websites say to use a -u option, but that is not listed in the man page for makepkg.

Is there any reason (other than space) for not using Yaourt, other than that alpm error I got? I do like the idea of running the regular linux commands instead, but what have I left out here or done wrong, to get makepkg to work?
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1298
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by pepedog » Thu Jan 10, 2013 8:54 am
cd to the pppconfig directory
Put pppconfig_2.3.19.tar.gz into that same folder, don't unpack
Now it should work
makepkg -Acs --asroot
Posts: 982
Joined: Fri Oct 07, 2011 9:55 am
by Rozan » Thu Jan 10, 2013 10:18 am
Never do makepkg as root. Here's what I do:

wget https://aur.archlinux.org/packages/path/to/foo.tar.gz
tar -xzvf foo.tar.gz
cd foo
makepkg -s

You will be asked for your password if missing dependencies need to be installed (of course internet required), and finally.

pacman -U *.xz (as root)

That's it!
Posts: 4
Joined: Fri Dec 28, 2012 1:22 pm
by Rozan » Thu Jan 10, 2013 10:25 am
By the way these tarballs do not contain binaries, so the source code will always be downloaded from a specific source (git, sourceforge). So that's why it will just doesn't work offline.
Posts: 4
Joined: Fri Dec 28, 2012 1:22 pm
by sdjf » Thu Jan 10, 2013 3:44 pm
pepedog wrote:cd to the pppconfig directory
Put pppconfig_2.3.19.tar.gz into that same folder, don't unpack
Now it should work
makepkg -Acs --asroot


Yahoo! That worked perfectly and was easy as pi.

@Rozan: Thanks for your interest. But a network connection was not required, it just is not obvious from all the documentation if and how it can be done offline. I had already researched and installed all the dependencies, which can also be done without the Pi having an internet connection. I download the dependencies from the alarm mirror with a PDA that does have internet, and then put the packages onto the pi for pacman to access with the -U option, to install them.

@pepedog: now I get to move on to the next level, figuring out how to get the application itself to work!

For anyone else reading this, it looks like the difference is that if you are making an AUR package into an alarm package with makepkg offline, you do not untar/unzip the package, you put it in the directory you are working in and issue the makepkg command from there.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1298
Joined: Fri Mar 16, 2012 5:20 am
Location: California