Difference between revisions of "Archup"

From ArchWiki
Jump to: navigation, search
m
Line 1: Line 1:
 
[[Category:Package management (English)]]
 
[[Category:Package management (English)]]
 
[[Category:Utilities (English)]]
 
[[Category:Utilities (English)]]
 +
{{i18n|Archup}}
 +
  
 
= Description =
 
= Description =

Revision as of 09:51, 31 July 2010

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی


Description

archup is a small C application which informs the user when system-updates for Archlinux are available. It's licenced under the GPLv3. In contrast to other update notifiers archup is intended to be lightweight and just do what it should: notify about possible updates.

archup uses GTk+ and libnotify to show a desktop notification if updates are available. It follows the unix-philosophy of "just doing one thing, but doing it well". It just notifies about new updates but the packagedatabase has to be updated by the user (better said a cronjob). With a cronjob archup can be used to regulary check for new updates and get a desktop notification if there are some.


Screenshots: KDE, Gnome (with notify-osd), Gnome (low urgency), Gnome (normal urgency), Gnome (critical urgency)

Download

current version: 1.3

AUR

The package has the name archup in aur.

sourcecode

Get current source-code: https://savannah.nongnu.org/files/?group=archup.

git

Get a working-copy of archup:

git clone git://git.sv.gnu.org/archup.git

Installation

We need autoconf, gzip(for zipping the man page) and libevent for building archup. At runtime we need pacman and libevent.

Create the configure-script:

       $ autoconf

,execute it

       $ ./configure

compile archup

       $ make

and finally install it

       $ make install

This installs the binary to /usr/bin/archup and the other files to /usr/share/doc/archup.


Configuration

archup can simply be invoked by executing it from the commandline. But you surely want to automate this task and let archup continouisly be run with a cronjob.

Hourly

The most simple setup is for a single user system where you want to check once an hour for updates. In this case just copy the /usr/share/doc/archup/cronhourly.example to /etc/cron.hourly/archup.sh

$ sudo cp /usr/share/doc/archup/cronhourly.example /etc/cron.hourly/archup.sh

and make it executable with

$ sudo chmod 755 /etc/cron.hourly/archup.sh

Finally open this file with a texteditor of your choice and change the username of the arch_user value with your username.

Now every hour your package database will get updated and after that archup will be executed. If there are updates archup shows a desktop notifiaction, if there are no updates nothing will happen. The desktop notification will automatically disappear after 60min or if you simply click on it.

other Intervals

If you want to execute archup at other intervals than hourly you are free to do so simply by setting up a custom cronjob (read manpage of crond for more on this).

Some hints on this:

  • you can adjust the timeout value, before the notification will disappear with the --timeout option of archup
  • you should take care that the packagedatabase gets updated by executing /usr/bin/pacman -Sy before archup gets executed
  • if you wanna start a graphical application from a cronjob you propably have to set the DISPLAY and XAUTHORITY values. The best is taking a look at /usr/share/doc/archup/cronhourly.example and get your inspiration there.

cronhourly.example

#!/bin/bash

arch_user=rorschach

if [ -z "$(pgrep pacman)" ];then
        /usr/bin/pacman -Sy > /dev/null
fi
XAUTHORITY=/home/$arch_user/.Xauthority DISPLAY=:0.0 /usr/bin/archup --uid $(id -u $arch_user)

Make sure to replace "arch_user" with the specific user.

Miscellaneous

Links