Comments (4)
This would be cleaner if Go had a standard compression interface, like a compress.Deflater(io.Reader) io.Reader
. Then you could just pass in a compress.Deflater
to the update and it would handle the decompression behind the scenes.
As it stands, I don't see an easy way to do the decompression automatically. You'd need to return the archive to the user and have them decompress it. You also need a way to track the contents of the archive, probably by unpacking it into a specially named hidden folder.
Honestly, I think it would be a huge headache to make compression+archives pluggable. Instead, I would manually support zip and tar.gz. If the user wants to do otherwise, it's still possible to build out of the update primitives.
With that out of the way, the API extensions should be fairly straightforward: just add a FromZip
option or equivalent. You don't even need to change the checksum/signature semantics, because they'll still be called on the supplied stream.
from go-update.
It seems like these are two orthogonal problems. One is compression and the other is unarchiving. Since wrapping a decompressor like gzip.NewReader
or flate.NewReader
is pretty easy in Go (and because it can often be taken care of for you via Content-Encoding over HTTP, I'm okay leaving that to the application to solve.
Solving the unarchiving problem is much harder, I think. When dealing with multi-file updates, you need to actually start thinking about how to add new files, how to delete files that shouldn't . Is the archive all new files, or all patches to existing files? Or a mixture? Is signing done on each file, or the whole archive? etc.
I'm inclined to leave this problem for last since it's going to require the most changes from both an API and implementation standpoint. It may even be worth it to just scope it out and say 'go-update is only about updating single files'.
from go-update.
did this get put into main code ?
I need it :)
from go-update.
sorry, there's been no work been done on this yet
from go-update.
Related Issues (20)
- Attack possible by downgrading to earlier exploitable binary version by MITM HOT 5
- Quick Start Documentation HOT 1
- Tag release HOT 2
- can i get complete example program to understand self update usage? HOT 3
- Are you providing support for linux too? HOT 1
- Release osext as an independent package HOT 1
- Bug in Example? HOT 2
- Make switch of files more robust
- x HOT 1
- Wrong permissions HOT 1
- McAfee virus scanner cleans the new exe after update HOT 1
- example handler HOT 1
- Restart process after update HOT 3
- progress prompt
- Check directory permissions and throw an informative error when they are wrong
- Will this work inside a Macos dmg application? HOT 1
- Support go modules
- THIS PROJECT APPEARS TO BE UNMAINTAINED (details inside) HOT 2
- Equinox is shutting down on September 30th, 2021 HOT 1
- Self-update in parallel processes does not work properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-update.