aericson / aarchup Goto Github PK
View Code? Open in Web Editor NEWaarchup an update notifier for ArchLinux
Home Page: https://bbs.archlinux.org/viewtopic.php?id=119129
aarchup an update notifier for ArchLinux
Home Page: https://bbs.archlinux.org/viewtopic.php?id=119129
/usr/bin/checkupdates
was moved to pacman-contrib
about two years ago. pacman-contrib
should be added a dependency.
Moving this discussion here.
From email I received.
Hello André,
My idea is to add another command line/config option which will allow to define custom action triggered after button is pressed. Also without this option button will not be shown at all. So basically no extra dependency. User will decide on he or she own which command want to use. It would look like that:
aarchup --aur --loop-time 60 --icon /usr/share/aarchup/archlogo.png --update-command 'xfce4-terminal ...'
So basically it can be easily adjusted to any environment and any GUI or terminal application can be run. I think examples for most popular environments may be added in manual.
Thanks,
Krzysztof
It aarchup.service
fails to find the appropriate environment, and thus has empty user
and display
variables which ultimately cause sudo
to fail. Here's the error:
Dec 02 20:36:25 systemd[1]: Started Run aarchup.
Dec 02 20:36:25 noxaarchup.sh[23899]: usage: sudo -h | -K | -k | -V
Dec 02 20:36:25 noxaarchup.sh[23899]: usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
Dec 02 20:36:25 noxaarchup.sh[23899]: usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
Dec 02 20:36:25 noxaarchup.sh[23899]: [command]
Dec 02 20:36:25 noxaarchup.sh[23899]: usage: sudo [-AbEHknPS] [-C num] [-g group] [-h host] [-p prompt] [-u user]
Dec 02 20:36:25 noxaarchup.sh[23899]: [VAR=value] [-i|-s] [<command>]
Dec 02 20:36:25 noxaarchup.sh[23899]: usage: sudo -e [-AknS] [-C num] [-g group] [-h host] [-p prompt] [-u user] file
Dec 02 20:36:25 noxaarchup.sh[23899]: ...
Dec 02 20:36:25 systemd[1]: aarchup.service: Main process exited, code=exited, status=1/FAILURE
Dec 02 20:36:25 systemd[1]: aarchup.service: Unit entered failed state.
Dec 02 20:36:25 systemd[1]: aarchup.service: Failed with result 'exit-code'.
and doing a bit of debugging, the command being evaluated is:
script ==> sudo -u $user sh -c "DISPLAY=\"$dply\" /usr/bin/aarchup"
exec ==> sudo -u sh -c "DISPLAY="" /usr/bin/aarchup"
so the issue is that it isn't finding the correct environment variables.
Note their neither gconf-helper
nor dconf-service
are installed, so the fallback to reading /proc/self/environ
doesn't seem to work.
If this is intended to be run by the user, why not place the two systemd files in /usr/lib/systemd/user
so that they can be enabled on a per-user basis with
systemctl --user enable aarchup.timer
I installed the package via AUR but the resulting .xz package does not have archlogo.png in it, only archlogo.svg.
In the end, I need to change the content of /usr/share/aarchup/aarchupstartup.sh
:
- /usr/bin/aarchup --loop-time 60 --icon /usr/share/aarchup/archlogo.png &
+ /usr/bin/aarchup --loop-time 60 --icon /usr/share/aarchup/archlogo.svg &
I added testing repo with only Sync (ability to refresh the database) and Search, to be able to list and sometimes manually install some packets from it.
...
[testing]
Include = /etc/pacman.d/mirrorlist
Usage = Sync Search
...
When a repo does not have "Install" nor "Upgrade" usage, pacman ignore it when updating.
gconf-helper
is provided by the pulseaudio
package; I don't use pulseaudio
, so I don't have gconf-helper
running, so the script fails since it falls back on its own PID and it's run as root
. I do however use dconf
, which provides an executable called dconf-service
whose environ data is the same.
Hi @aericson,
Many thanks for aarchup
. I was precisely looking for a small OSD notification program that only does this. Instead of cron I would like to use systemd Timer, however.
Is it possible to add that support?
Many thanks in advance!
Robert
Add a script similar to checkupdates instead of doing pacman -Sy
.
Some background on this problem:
http://gist.io/5660494
https://wiki.archlinux.org/index.php/Pacman#Partial_upgrades_are_unsupported
https://projects.archlinux.org/pacman.git/tree/contrib/checkupdates.sh.in
https://bbs.archlinux.org/viewtopic.php?pid=1563725#p1563725
This issue is meant to summarize a couple of problems which should be improved, imo, but which don't justify a bug report on their own.
All findings made with recent AUR package aarchup.
icons
The build procedure creates archlogo.svg but skips archlogo.png. If this is intentional (which I don't believe), aarchupstartup.example should be modified as it's referencing archlogo.png.
I think archlogo.{png,svg} should be placed in /usr/share/icons/hicolor/{32x32,scalable}/apps. This would be according to the Icon Theme Specification and hence make the icons available to other applications as well.
systemd
According to systemd documentation, see e. g. Section "Unit Load Path" in man (5) systemd.unit unit files provided by packages should go to /usr/lib/systemd/system. Folder /etc/systemd/system is for local configuration adjustments only, e. g. by copying units from /usr or by using those snippets in subfolders .service.d. So aarchup.{service,timer} should be moved accordingly.
As a side effect line backup in PKGBUILD wouldn't have to cover aarchup.timer any longer.
Regarding systemd.timer I think 15min is a bit much. Normally one wants to be informed as soon as possible after booting. So I'd suggest to reduce to 5min or something.
noxaarchup, aarchupstartup.example
noxaarchup is invoking aarchup without --icon. Would be nicer to have it set, imo.
Also, I think both noxaarchup and aarchupstartup.example should set --aur by default as using this switch when cower is lacking seems to cause nothing but an error message.
messages
Given Summary starts by "New updates..." setting "Application Name" to "New Updates" doesn't seem like a good choice to me, in particular with regards to notificationd implementations which state both items in their pop-ups like the one from LXQt. Why not set 'Application Name' just to 'aarchup'?
If updates in official repos are available both old and new version are displayed, regarding AUR only the latter. This should be consistent.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.