You are not logged in.
I used aurbuild, but I saw there are many... So what is your pacman for AUR? And overall why?
my own pkgman (see below) ![]()
Offline
Custom Python script that simply downloads remote PKGBUILDs and compares '%(pkgver)s-%(pkgrel)s' with the output from `pacman -Qm`. If a newer version is found, it will grab the tarball for me.
Good script, but does not work in the absence of the remote PKGBUILD.
Traceback (most recent call last):
File "./upaur.py", line 38, in <module>
remote_ver = '%(pkgver)s-%(pkgrel)s' % pkgbuild
KeyError: 'pkgver'Last edited by sirocco (2009-04-10 12:16:24)
Offline
#!/bin/bash
#
# AurCheck V 0.1
#
# pbrisbin 2009
#
# script parses aur.archlinux PKGBUILDs and compares
# it to `pacman -Qm` outputs to find out if you've
# got the latest aur package installed
#
###
# setup colors
if [ $(tput colors) -eq 256 ]; then
color0="[1;38;5;229m"
color1="[0;38;5;40m"
color2="[0;38;5;160m"
else
color0="[1;37m"
color1="[0;32m"
color2="[0;31m"
fi
# error handling
errorout() {
echo ""
echo -e " \e${color2}Error:\e[0m"
echo "$1"
echo ""
exit 1
}
[ $(tput cols) -lt 70 ] && errorout " Your terminal is not wide enough to run this script."
# Set up a working directory
WD="/tmp/aurcheck"
[ -d $WD ] || mkdir $WD
# Set up a list of updatable packages
list="$WD/aurlist"
[ -f $list ] || touch $list
# print a header row
echo ""
line="$(echo Package Available Installed | awk '{printf "%-30s %20s %20s\n", $1, $2, $3}')"
echo -e "\e$color0$line\e[0m"
# list out foreign packages and check the versions
pacman -Qm | while read pack; do
name="$(echo $pack | awk '{print $1}')"
pkgver="$(echo $pack | awk '{print $2}' | cut -d "-" -f 1)"
pkgrel="$(echo $pack | awk '{print $2}' | cut -d "-" -f 2)"
URL="http://aur.archlinux.org/packages/${name}/${name}/PKGBUILD"
wget -q -O $WD/PKGBUILD "$URL" || errorout "Count not download package information"
pkgverN="$(grep ^pkgver $WD/PKGBUILD | cut -d "=" -f 2 | tr -d '"')"
pkgrelN="$(grep ^pkgrel $WD/PKGBUILD | cut -d "=" -f 2 | tr -d '"')"
line="$(echo $name ${pkgverN}-${pkgrelN} ${pkgver}-${pkgrel} | awk '{printf "%-30s %20s %20s\n", $1, $2, $3}')"
if [ "${pkgver}-${pkgrel}" = "${pkgverN}-${pkgrelN}" ]; then
echo -e "\e$color1$line\e[0m"
else
echo -e "\e$color2$line\e[0m"
echo $name >> $list
fi
done
echo ""
# cleanup
[ -d $WD ] && rm -rf $WD
exit 0//github/
Offline
Thank you.
One question - as i see, scripts on ftp://pbrisbin.com/bin, http://bbs.archlinux.org/viewtopic.php?id=56646&p=12 and this topic are differ. Although version is the same (AurCheck V 0.1).
For me best script from http://bbs.archlinux.org/viewtopic.php?id=56646&p=12.
Other two print
Error:
Count not download package informationfor packages without the remote PKGBUILD.
Last edited by sirocco (2009-04-11 05:56:08)
Offline
sirocco, thanks for the interest my 'scripts'
sadly i don't do much "version tracking" or "version control" in any way. i have that "V 0.1" bit in my script template and should really take it out. the one's on ftp://pbrisbin.com/bin are the most up to date because that's just a symlink to my actual ~/.bin directory which i update and use every day.
i should've noted. if the URL is not exactly http://aur.archlinux.org/packages/NAME/NAME/PKGBUILD where NAME is the exact name output by pacman -Qm then this script falls flat on it's face. and i think the only major difference between the scripts is how that's handled. (i.e. in my ~/.bin version i have an errorout() funciton that sees the wget failure and prints that message).
can't promise you any fixes coming, but feel free to change it to suit your needs it's not very complicated (or elegant
).
also my ~/.bin version will optionally use my ~/.bin/aurget script to update the package; which i took out in this thread for obvious reasons.
//github/
Offline
Why don't you use http://aur.archlinux.org/rpc.php to get that information instead?
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
thanks Xyne, that looks much more useful to my aurget and aurcheck scripts. it'll require some extensive rewrites and little learning on my part though. considering how well these work for me now, it could be a bit before i get to that .php stuff. thanks though.
edit: Xyne, that makes things much cleaner. i've updated both aurget and aurcheck to use it. i'm sure there's a million better ways, but it works for me; new versions in my signature.
Last edited by brisbin33 (2009-04-12 21:16:44)
//github/
Offline
Thanks brisbin33 for your aurget/aurcheck scripts, I was looking for something similar.
I want do download your new versions from you ftp, but the bin folder is empty ![]()
Offline
jordz, i've been having some issues with that lately; my ftp site works for some, not for others. it's working for me from my work machine now, please try again. if you have no joy, feel free to email me and i can send them to you.
Last edited by brisbin33 (2009-04-13 13:40:26)
//github/
Offline
jordz, i've been having some issues with that lately; my ftp site works for some, not for others. it's working for me from my work machine now, please try again. if you have no joy, feel free to email me and i can send them to you.
I think it has something to do with your ftp server and passive connections.
I tried and guessed a bit with wget and it works now ![]()
wget ftp://pbrisbin.com/bin/aur* --no-passive-ftpFor your ftp to work you need to open/forward some ports which you specify in you ftp config for you passive connections.
Offline
brisbin33 wrote:jordz, i've been having some issues with that lately; my ftp site works for some, not for others. it's working for me from my work machine now, please try again. if you have no joy, feel free to email me and i can send them to you.
I think it has something to do with your ftp server and passive connections.
I tried and guessed a bit with wget and it works nowwget ftp://pbrisbin.com/bin/aur* --no-passive-ftpFor your ftp to work you need to open/forward some ports which you specify in you ftp config for you passive connections.
thanks for the tips, my vsftpd.conf specifies passive ports 50000 to 50100 which are forwarded on my router. along with the standard 21 and nonstandard 50120 which i've also called out.
it's really frustrating. sitting behind my work firewall on my work pc i can `tail -f vsftpd.log` (i'm ssh'd in) and see my passive connection go through just fine. then, i talk to my brother or another random archer not unlike yourself and `tail -f vsftpd.log` shows it choking when switching to PASV; no errors, just hangs.
furthermore, that wget --no-passive-ftp command also works for some and not for others; and if i make any changes to my vsftpd.conf (like adding "connect_from_port_20=" or "passive_address=") to try and make it better, everything fails.
it'll be it's own forum post shortly... glad you got it working for you, enjoy the scripts.
EDIT: i finally fixed it! --i think-- adding pasv_promiscuous=YES (however unadvised in the man page) solved it for me. thanks to wget -vd, it appears my router situation was making vsftpd think certain requests were coming from a different IP than the connection and therefore was blocking things i didn't want blocked.
Last edited by brisbin33 (2009-04-13 20:23:09)
//github/
Offline
Good to hear you solved it ![]()
I created my own "aurget" today, I used your search and update function as a base in my scripts, thanks again!
If you want to take a look, I uploaded it to github: http://github.com/jordz/aurget/tree/master
Edit:
I created a package for it, to make my life easier ![]()
http://aur.archlinux.org/packages.php?ID=25551
Last edited by jordz (2009-04-14 00:14:55)
Offline
yaourt
Entertain yourself in a stupid way: www.stupidreality.org
Offline
I updated aurget to fix a few problems with rpc from AUR and show different colors when updating.
When a local package is newer than on AUR and if it's a devel package (git/svn etc).
Added a build option, to build the PKGBUILD in the current folder.
The script is simple and does everything I need ![]()
Edit: I don't like yaourt because it isn't KISS ![]()
Last edited by jordz (2009-04-20 13:36:46)
Offline