-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add reenable hooks #8
base: master
Are you sure you want to change the base?
Conversation
very nice. this is really important to having a consistent experience across upgrades |
This could use more discussion. Is the purpose explicitly for reenabling systemd units after an upgrade, or something more general? If we're just interested in systemd units, we can potentially symlink This way, toltec package authors can just store their services in |
That's the current main usecase for that. I didn't know we could do that alternative path. That would be a huge help as well. Though we may way we could e.g. reenable a services if needed or do other tasks that may come up in the future. @raisjnn @Eeems do any of you have ideas that could be non-systemd related? Otherwise I also don't really see a point aside from more flexibility for package maintainers. |
Symlinking of systemd units doesn't seem to work properly on reboot when I've tried it in the past. Probably due to timing on when things are mounted. For that reason we have been storing our systemd files in As for things other than systemd units, I'm not aware of any right now. |
@Eeems I did some tests yesterday and it seems like you're right about symlinking units on another partition. How about we split this into |
I like it |
@LinusCDE any chance you can work on this soon? |
I haven't had time to look into the services. But, I think @raisjn had tested whether we could link the services directory, but there were some implications on doing this. Seeing that many packages have some unique behaviour on whether their services should be enabled, this feature might end up unused (smaller packages might use it, but I haven't seen any likely ones). |
Linking services from another partition will not work on reboot.
It would still be good to have hooks for re-enabling services that were enabled before (i.e. oxide) that change the user experience. That way an upgrade doesn't have to be painful for users who aren't as tech literate. At the very least it would provide a standard we could use for upgrading the re-enable script without having to actually modify it. |
Good idea. Though we will need to consider all services there as still enabled by the user. A user who installs a software and then disables a service and only manually starts it, would get it re-activated after an upgrade since we can not detect well what services were enabled before. We could try to read out the old partition, but then we would need to figure out, if a user actually just made a upgrade. There could be other reasons for reenabling and reading out the old partition could have some side effects on activating services. In short:
|
That's going to require some sort of pre-upgrade script, either run automatically on a regular basis (perhaps with a standard backup service), or manually by the user. |
For toltec it can be managed by the packages themselves. For this repo it would make more sense to just require the user to manage it. |
Alternatively we might do as LinusCDE suggested and read the previous services and symlinks out of the old partition. We'd have to keep track of which services were created by entware, though. Is the list of files created by opkg for each package available somewhere on disk? Maybe that could be parsed. |
We use a variation of this to reinstall any package that has a file outside of |
Hi,
this PR is kinda building upon PR #7 .
Since the already packaged launchers add themselves a systemd services, they need an opportunity to get reenabled when the reMarkable gets an update.
This PR just runs all the scripts found in a specific folder when doing the reenable to give packages the opportunity should they have added a script there.