How can I autoupdate AUR packages and get apps from git/svn/etc repos?

Hello,

After a couple of days reading the arch wiki, finally I could setup my arch environment but I have some questions about the AUR repo and yaourt. I'm using KDE as GUI and I would like keep updated the AUR packages automatically using apper (or similar) as I do with the other repos, is this possible?

Also I have read that you can update with yaourt apps from git/svn/etc with the option --devel but I don't understand, does it means that for example I can use yaourt to install libreoffice from the official git repo (git://anongit.freedesktop.org/libreoffice/core) and keep it updated?

Re: How can I autoupdate AUR packages and get apps from git/svn/etc repos?

yaourt is used to search for and install applications from the AUR in addition to the standard pacman repos. So `yaourt -Syua --devel` will update the database and all applications including those installed from the AUR.

So, if you want to install libreoffice from git and keep it updated, you'll need the PKGBUILD for it (this is already available in the AUR. [1])

Read the wiki [2], if you haven't already done so, for more info on yaourt.

Re: How can I autoupdate AUR packages and get apps from git/svn/etc repos?

sdh wrote:

yaourt is used to search for and install applications from the AUR in addition to the standard pacman repos. So `yaourt -Syua --devel` will update the database and all applications including those installed from the AUR.

So, if you want to install libreoffice from git and keep it updated, you'll need the PKGBUILD for it (this is already available in the AUR. [1])

Read the wiki [2], if you haven't already done so, for more info on yaourt.

Thank your for reply, now I understand a little bit better how yaourt works. The PKGBUILD is used for describe the rules to build the app. If I want to make mine package I must to made a new PKGBUILD file and set the git URL and other variables listed here then I will be able to install and keep updated my own app. It looks really nice but Is it correct? (libreoffice is just an example I know that the easier way would be install it from Extra repo). The option --devel is only necessary if I have git/svn/etc apps, if not I can use --aur, Is this true?

Furthermore how I can keep it updated without use the terminal, I use to forget about look for updates then I would like to see the updates as KDE notifications or just install the updates with some kind of init script (this option would be worst because I would like to see what is going to be updated before update).

Also there are many other pacman+aur "wrappers" but the general consensus is yaourt is BAD

can I also ask that prior to jumping in with a wrapper you at least spend a few weeks using wget+makepkg so as to familiarise yourself with what these wrappers actually use because you can simply create a hand full of bash alias' & possibly a script to achieve the same thing but it will be more hand's on & give you full control without hiding anything from you.

lord_rafa wrote:

Furthermore how I can keep it updated without use the terminal, I use to forget about look for updates then I would like to see the updates as KDE notifications or just install the updates with some kind of init script (this option would be worst because I would like to see what is going to be updated before update).

automated updates are not a good idea, you can have conky & various other "sys info systems" poll a script to tell you if any updates are available but on the whole Arch is a manual system which focuses more on the DIY side of things

Re: How can I autoupdate AUR packages and get apps from git/svn/etc repos?

Well said t0m5k1. Lord_rafa, I'd second t0m's advice. I suspect you will not get a lot of useful input on these questions as most people who would know how to do what you want, also know it's a bad idea.

Autoupdates are dangerous. Using the AUR without learning what is really being done is silly - and keeps you dependent on tools or community help. Learn to use the AUR "manually", then start using some tools to automate the repetetive parts.

Re: How can I autoupdate AUR packages and get apps from git/svn/etc repos?

Hello, thanks for your advices guys. I know that some times trust autostuff can be problematic but in my case I'm using just 2 packages from the AUR (dropbox and spotify), they are not critical for my system and they don't use any critical dependence from AUR. In my opinion as AUR are not officially supported[1] the main problem in this case would be the security risk of use a third party PKGBUILD file that maybe points to one URL with malicious version of those apps but this can be avoid making my own PKGBUILD file. For me the advantages of get the latest versions of those apps automatically are greater than the risk of system failure.

[1] supposing that you can trust in official supported soft but is better don't think too much about it because you can become really paranoid hehe.

Re: How can I autoupdate AUR packages and get apps from git/svn/etc repos?

t0m5k1 wrote:

yaourt caused me a whole heap of issue's, so I would advise you avoid that!...Also there are many other pacman+aur "wrappers" but the general consensus is yaourt is BAD

Hi t0m5k1,

I have been using yaourt for a while now. I tried out pacaur after reading your post, and found the yaourt way better. Eg I can directly search using yaourt <incomplete name> and then select required packages from there itself. In pacaur, I have to first search and then provide full package name for each install.

Re: How can I autoupdate AUR packages and get apps from git/svn/etc repos?

lord_rafa wrote:

After a couple of days reading the arch wiki, finally I could setup my arch environment but I have some questions about the AUR repo and yaourt. I'm using KDE as GUI and I would like keep updated the AUR packages automatically using apper (or similar) as I do with the other repos, is this possible?

Also I have read that you can update with yaourt apps from git/svn/etc with the option --devel but I don't understand, does it means that for example I can use yaourt to install libreoffice from the official git repo (git://anongit.freedesktop.org/libreoffice/core) and keep it updated?

Packages in Arch Linux come from two places: the official repositories (use pacman) and from Arch Linux users (the AUR). It is a bad idea to automatically install any packages because, in Arch Linux, you are responsible for your computer. For example, in Debian, a big update will automatically update the configuration files so everything will work correctly, but in Arch Linux you will just get a message that says "Hey! You need to update your configuration files!".

Some of the packages in the AUR, like libreoffice-git, are "development" packages. That means, when you install it, you will have the LATEST version of the application built from the LATEST source code. If you install it again next week, then you will have a newer version of the application built from the newer source code. You can install it as often as you want, and every time you do you will have the very latest version of the application.

t0m5k1 wrote:

yaourt caused me a whole heap of issue's, so I would advise you avoid that!...Also there are many other pacman+aur "wrappers" but the general consensus is yaourt is BAD

The old version of yaourt was bad. The newer version is fine. Why do you suggest avoiding yaourt?

Re: How can I autoupdate AUR packages and get apps from git/svn/etc repos?

drcouzelis wrote:

The old version of yaourt was bad. The newer version is fine. Why do you suggest avoiding yaourt?

Usually, yaourt is great, unless there are changes to pacman, then yaourt starts to suck by simply breaking. It usually does not take too long for the yaourt maintainer to fix the issues, but while pacman hangs around in testing, nothing happens. Changes are done after pacman hits the stable repo, after the maintainer realized, that the new pacman broke yaourt. I cannot say for sure, if it is still that way, but it used to.

Re: How can I autoupdate AUR packages and get apps from git/svn/etc repos?

sdh wrote:

I have been using yaourt for a while now. I tried out pacaur after reading your post, and found the yaourt way better. Eg I can directly search using yaourt <incomplete name> and then select required packages from there itself. In pacaur, I have to first search and then provide full package name for each install.

That's a double edged feature that the pacaur's developer will probable never implement as it is considered more as a bloated feature than something really useful But the strength of pacaur is elsewhere: it tries to minimize user prompt interaction, while yaourt (and most if not all other helpers) requires much more time interacting with package management prompts to install or upgrade packages. It is also less prone to breakage as the libalpm C interface it is based on is maintained by a pacman developer.

Re: How can I autoupdate AUR packages and get apps from git/svn/etc repos?

Hello, thanks you all so much for the answers, I will try pacaur specially because Spyhawk says about minimize user prompt interaction. Also was useful the link "very simple introduction to the ABS" Finally I understand how works ABS and AUR and a lot of other stuff.

I realized that I don't need autoupdate the packages however would be nice see an update notification in KDE when updates will available. Is this possible?, can I handle those updates with a GUI?

Re: How can I autoupdate AUR packages and get apps from git/svn/etc repos?

Do you really want your workflow interrupted by package updates? Update notifications are one of the most common causes for a broken workflow. You should reserve a fix time window every, say, day to check for updates.

Then again, if you really need to automate the check, there are AUR helpers that can only list possible updates, like cower (cower -u). You could run a cronjob, that sens something to the notification system, every time cower -u results in anything other than 0. I don't know how much you know about the bash language…

A && B runs A, if A exits with "true" (aka nothing), then it runs B, otherwise it does nothing.A || B runs A, if A exits with "false" (aka anything that is not nothing), then it runs B, otherwise it does nothing.

Most good tools are made to output nothing, if they have nothing of interest to report.

You won't get notifications for git/svn/cvs/bzr packages if the maintainer does not upload a new PKGBUILD. If you want to monitor those, you'll have to write your own scripts.I suggest this: create your own build directory, put your pkgbuilds in subdirectories and then create a script that only updates your working copies. If it finds changes, then it sends you a notification and you can recompile and install. (this won't work with the temporary directories yaourt creates)