Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
syuppod: autosync and auto pretend world daemon
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Jjeje007
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2006
Posts: 142
Location: France, La Croix Valmer

PostPosted: Tue Dec 17, 2019 8:26 pm    Post subject: syuppod: autosync and auto pretend world daemon Reply with quote

Hello,

I'm developping on my own a python daemon which auto sync and auto pretend world update.
I name this project syuppod (SYnc UPdate POrtage Daemon) and it has also a module to auto pull kernel git repositories (only test with zen-kernel)
This post is just to know if some one else could be interest for this kind of program.

I've started writing this because i forgot time to time to sync and to update my system. So after 1 or 2 months it starting to be *more* difficult to update
world (i'm on ~amd64). For now, i have syuppod running in a back ground and conky which get information through syuppod's dbus client. Conky will display how long i haven't update my system and how many package(s) to update.
So, for now, syuppod has theses features/specifications:

- written in python3 (i think 3.5 is recommended - using 3.6.9)
- auto sync - interval can be tweak : 1 day is minimum
- auto sync will detect manual sync and adapt is interval (1d mini)
- auto pretend is schedule after auto sync but it can auto shutdown and auto restart in case it detect world update running (emerge .* @world)
- auto detect world update (so auto pretend is run after to re guess how many package(s) to update)
- auto detect an update to portage (so you cannot miss message like : '* An update to portage is available. It is _highly_ recommended...')
- dbus service (expose method to system bus)
- dbus client to retrieve informations
- auto git pull (interval can be also tweak)
- auto detect new branch and new kernel version (only tested with zen-kernel git --> https://github.com/zen-kernel/zen-kernel THX !! ;) )
- can be run as a daemon (using /etc/init.d) or in a terminal
- when run in a daemon logs goes to syslog, when run in a terminal all logs goes to terminal
- each process has it own log (sync -> /var/log/syuppod/sync.log, pretend -> /var/log/syuppod/pretend.log) and it auto rotate
- for technical part: using asyncio and thread to make method call non blocking (that why python 3.5 mini is needed)
- dbus client is translate using gettext : in french and in english (I apologize for my english)

I think i could miss some features :)
Any way, this is a work in progress and it's my hobby (and also my first phyton program ever )

Here is some screenshot from my desktop:

https://pic.infini.fr/flAa7tku/HH5NwzaO.jpeg
https://pic.infini.fr/1Javlskq/BiNruwc1.jpeg
https://pic.infini.fr/x53NYAry/py97lVzQ.jpeg

I hope this could interest some one :)
Back to top
View user's profile Send private message
Jjeje007
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2006
Posts: 142
Location: France, La Croix Valmer

PostPosted: Wed Apr 29, 2020 10:12 pm    Post subject: Reply with quote

Hello,

I'm still developping my project.
I just open a public repo on github if someone want to test:

https://github.com/Jjeje007/syuppod

At the time of the writing, you should try branch 'testing'.
I just push to this new repo, so i haven't yet write readme or install text.

To make it work:
copy
Quote:
syuppod.conf
to
Quote:
/usr/share/dbus-1/system.d/

copy
Quote:
syuppod-init
to
Quote:
/etc/init.d/syuppod


You should adapt:
Quote:
command=

to point to:
Quote:
main.py

and
Quote:
command_args=

to your needs (try ./main.py --help for more details)

Anyway, if syuppod won't start, first try running by hand and enable debug:
Quote:
./main -d


I recommand to start daemon in debug mode (using -d) so you will get a LOT more informations.

To use dbus client, just try:
Quote:
./client --help


This is a work in progress and comments / reviews / bug reports are REALLY welcome.

Sorry for my poor english (every where) :p

Edit: By the way this program is running in my gentoo machine (~amd64) since more than 6 months.
It successfully sync already 113 times (and maybe more... don't reminder when i reset stats).

Jjeje007
Back to top
View user's profile Send private message
Jjeje007
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2006
Posts: 142
Location: France, La Croix Valmer

PostPosted: Wed May 06, 2020 3:42 pm    Post subject: Reply with quote

Hello,

I made a README so all you need to know is there:

https://github.com/Jjeje007/syuppod

Thx,

Jjeje007
Back to top
View user's profile Send private message
Jjeje007
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2006
Posts: 142
Location: France, La Croix Valmer

PostPosted: Mon Jun 08, 2020 4:16 pm    Post subject: Reply with quote

Hello,

Some news from my project.
So i split the project onto two projects: one dedicated to git kernel (https://github.com/Jjeje007/gikeud)
and an other dedicated to portage (https://github.com/Jjeje007/syuppod).

For syuppod there is a lot of changes, the main:

- now run as a dedicated system user and no more root user (sync process is using sudo).
- now using inotify to watch emerge.log file (before it was a timer) and only proceed if file is close_write.
- i made ebuilds for out of tree dependency: pydbus and inotify_simple (overlay: https://github.com/Jjeje007/Jjeje007-overlay)
- client have a trivial autocomplete arguments.

And a lot more... and more to come :p

Here is the syuppo-cli output retrieving informations from syuppod over dbus:

Code:
LANG=US ./client.py --all
[*] Last state of the repositories syncronizer:
    - Success
[*] The repositories syncronizer run successfully:
    - Overall: 7 times
    - Session: 0 time
[*] Last repositories synchronization:
    - The June 9, 2020 at 5:06:14 PM +0200
[*] Current repositories synchronization interval:
    - 1 day
[*] Current repositories synchronization elapsed time:
    - 6 hours, 22 minutes and 43 seconds
[*] Current repositories synchronization remain time:
    - 17 hours, 37 minutes and 17 seconds
[*] Portage package update status:
    - Not available
[*] Available packages to update:
    - 49
[*] Last world update finished:
    - There is 1 hour and 23 minutes ago



See you,

Jjeje007
Back to top
View user's profile Send private message
Jjeje007
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2006
Posts: 142
Location: France, La Croix Valmer

PostPosted: Sat Oct 03, 2020 3:50 pm    Post subject: Reply with quote

Hello,

Some news from my project. I have finally made an ebuild for syuppod which install all the needed dependencies and files.

You can grab it from my overlay -> https://github.com/Jjeje007/Jjeje007-overlay

See you,

Jjeje007
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum