Add ed25519 public key and enhance package installation error handling

- Embed ed25519 public key for signature verification when doing sync prcess with servidordomal.fun
- Improve error handling in AddToInstalledDB to rollback on failure
- Update InstallPackage function to accept io.Reader instead of *os.File
This commit is contained in:
2025-09-20 21:55:34 -03:00
parent b14bd1806a
commit 68b394523d
4 changed files with 166 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
package pkg
package packets
import (
"archive/tar"
@@ -23,7 +23,7 @@ import (
)
// Install exctract and fully install from a package file ( tar.zst )
func InstallPackage(file *os.File) error {
func InstallPackage(file io.Reader) error {
manifest, err := utils.ReadManifest(file)
if err != nil {