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
Need an update mechanism #98
Comments
That's part of what I'm working on with the .deb package. With a pihole repository, then an install would just be another apt-get and when updates are ready the usual apt-get update/upgrade should pull in the updates. Debian packages are just a little more involved in creating, plus we'd need to make a repository (repo.pihole.net?) to host. Any help from other DD's or people with packaging experience would be great, I'm used to supporting Arch. But it's on the list! lol... |
That being said, I don't remember if I asked yesterday, so forgive me if I did, but can you cut a 2.1 release and put up a tarball? It would help with a baseline for the package and reduce the patch count. |
You did ask, but I haven't actually made a tarball before; I mean I know what tools to use, but I'm not quite sure how to package it up. Do I just archive all the necessary files and then use a script to put them in the right place? I'm a bit of n00b in this department. |
No problem, when you made your 2.0 release it created the zip and the tar.gz for you. You just need to make a new release and tag it. https://help.github.com/articles/creating-releases/ I just tested it, and the tarballs are auto-created. Just set the version to 'v2.1' or something like that, the release number prepended with a v. |
Done. |
Awesome, thanks! |
Following this, what would be the best way to update from say a 1 month old installation? Complete reinstall or is there a smart method (since functions have moved, and maybe even helper files have been added) |
Well, you wouldn't lose anything by doing a fresh install, may hold off a few days though, there are some changes coming. I'm working on a .deb that would eliminate the upgrade issues, but we need to set a good baseline to get a good .deb that isn't going to change locations with each new release. |
No rush, it all works fine, but I've seen many new commits and wondered what the best path forward would be for "an early adopter" (although that is a bit overstating it). There have been many changes recently so I figured I'd give it a shot. Not sure f.e. if the list selection is still in the script or in a configuration file (which would eliminate any issues on an update in the future, provided there is a system like apt-get update). |
The list that comes as a default with Jacob is doing a lot with the web interface that will allow you to customize your blocking in a very user friendly way. Gravity.sh is still the workhorse and all that has changed there is internal structure. There may be a little speed up, but I'm not sure. So if it's working, hold on a bit and see what's in store... |
HI, I jumped and did a fresh installation earlier today (with same IP setup etc) and all works fine, however it it a bit unclear to me. Assume there is a new version, can I simply update gravity.sh or are the more files that need to be changed? I am not very familiar with the github system but am able to SSH into the pi and change it on that level (and restart services if required). Thanks! |
It's possible new files could be added or modified (see #174, which was just merged). So in order to get these files you can basically reinstall using |
I have a cunning plan... How about adding a version number txt file to the repo? when gravity.sh runs (which it does every night) It checks the currently downloaded version file against the one in the repo. If the one in the repo is newer then run install.sh (which can then be expanded to run silently if pi-hole is already installed) |
But doesn't it seem a bit excessive to try to I was hoping for something more along the lines of |
Could
No need if you defer the work to gravity.sh, as that is already on a cron job... |
But the latest Web interface is always downloaded with the installer; |
Basically, the part in the installer that downloads master.zip can be replaced with the same logic from updateDashboard.sh if ! is_repo; then
make_repo
fi
update_repo If you look over the changes I've suggested for the install script, you'll see I've been working on making it a bit more intelligent. (which will essentially turn it into a dual purpose installer/updater) |
So would you use |
For the Admin Dashboard? git. Same as For the rest of the files, no reason why they too could not be checked out to a local repo and distributed to where they need to be, rather than using curl as it is right now. |
So wouldn't we need to restructure the repo to reflect the file structure of the OS so the files end up in the right place? |
It would add |
@jacobsalmela - I shouldn't have thought so, the script can handle copying file out to their relevant directories! |
@PromoFaux Well, I learn something new everyday! Lol... |
Yeah, I added that back when I merged the |
Fantastic! I had updated to 2.5 just after posting my comment, saw that the dnsmasq.conf was overwritten and the new 01-pihole.conf was created. Dropped my few config items into their own conf file in /etc/dnsmasq.d. Saw that 2.5.1 was out there and updated again and my changes are still available!!! Awesome. However, it would be nice if there was a separate upgrade script, so existing users don't have to go through the install script and be prompted for any input. Just grab the latest code and recycle.... Thanks again! |
Agree with @kmr2319 on the update part. Ofcourse the script checks for all kinds of files in existance and makes sure settings are resolved, but dedicated IP check, ip4/6 selection and more can be skipped in general on an upgrade imho aswell. If you want to change it you could always just run the installer instead of the upgrade. :-) |
The general idea was that if they wanted to change things, they could.. but it's a good point actually, just an "update.sh" that ships with it, so you don't even need to curl it, just run it! I'll get on that later! |
if that would exist it could even be CRON'd to auto update weekly, provided it only gets stuff from master |
Autoupdate COULD be set up, but not by default. We could provide an option to run it automatically, or provide instructions on how it can be run through |
Yes I am aware of that, not by default, but same as earlier to purge the pihole.log daily (which is now default I believe regardless if any statistics are saved) to keep the system quick and lean. |
I have often thought of a
I wouldn't want to do this until we do a revamp of some code, which would prevent us from repeating code or missing out on any hardcoded variables. As as example:
Then Also, we could make a separate update script now, but we would probably end up using a lot of the same code, which doesn't make sense to have it in two places. The |
Thanks ;) |
Oops. I though I could assign more than one person...I was trying to assign myself and @PromoFaux |
You should be able, it should just be a toggle... |
Huh, I guess you cant? That's odd? |
Yeah, I thought it would be like Labels where you can select multiple ones... |
The hardest part with |
I think we also need a purge script to remove any Pi-Hole specific files, even from old installations. Something using |
As long as we keep track of what files we create, we shouldn't have a problem of not deleting our files. |
Hi, I would endorse the Debian approach since #77 solves lots of problems being homegrown right now. https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html removing orphaned files new debian versions don't have
Uninstall + cleanup
I can't find where it says it prompts to replace/preserve/merge user modified files in the package file list but I know I've experienced debians stopping mid install to ask that to me too. |
No longer needed! |
There is no easy way for existing Pi-hole users to update their
gravity.sh
script and Pi-hole support files or the Web interface. I would like to get some sort of mechanism installed that can query the repos and install updates.The text was updated successfully, but these errors were encountered: