Fix SPN intel updates
This commit is contained in:
@@ -79,6 +79,21 @@ func initializeGlobals(cmd *cobra.Command, args []string) {
|
||||
log.SetLogLevel(log.WarningLevel)
|
||||
_ = log.Start(log.InfoLevel.String(), true, "")
|
||||
|
||||
// Configure SPN binary updates.
|
||||
configure.DefaultBinaryIndexName = "SPN Binaries"
|
||||
configure.DefaultStableBinaryIndexURLs = []string{
|
||||
"https://updates.safing.io/spn-stable.v3.json",
|
||||
}
|
||||
configure.DefaultBetaBinaryIndexURLs = []string{
|
||||
"https://updates.safing.io/spn-beta.v3.json",
|
||||
}
|
||||
configure.DefaultStagingBinaryIndexURLs = []string{
|
||||
"https://updates.safing.io/spn-staging.v3.json",
|
||||
}
|
||||
configure.DefaultSupportBinaryIndexURLs = []string{
|
||||
"https://updates.safing.io/spn-support.v3.json",
|
||||
}
|
||||
|
||||
// Configure service.
|
||||
cmdbase.SvcFactory = func(svcCfg *service.ServiceConfig) (cmdbase.ServiceInstance, error) {
|
||||
svc, err := spn.New(svcCfg)
|
||||
@@ -93,7 +108,7 @@ func initializeGlobals(cmd *cobra.Command, args []string) {
|
||||
LogDir: logDir,
|
||||
LogLevel: logLevel,
|
||||
|
||||
BinariesIndexURLs: configure.DefaultSpnStableBinaryIndexURLs,
|
||||
BinariesIndexURLs: configure.DefaultStableBinaryIndexURLs,
|
||||
IntelIndexURLs: configure.DefaultIntelIndexURLs,
|
||||
VerifyBinaryUpdates: configure.BinarySigningTrustStore,
|
||||
}
|
||||
|
||||
@@ -11,9 +11,6 @@ var (
|
||||
DefaultStableBinaryIndexURLs = []string{
|
||||
"https://updates.safing.io/stable.v3.json",
|
||||
}
|
||||
DefaultSpnStableBinaryIndexURLs = []string{
|
||||
"https://updates.safing.io/spn-stable.v3.json",
|
||||
}
|
||||
DefaultBetaBinaryIndexURLs = []string{
|
||||
"https://updates.safing.io/beta.v3.json",
|
||||
}
|
||||
|
||||
@@ -241,7 +241,10 @@ func (index *Index) ShouldUpgradeTo(newIndex *Index) error {
|
||||
return nil
|
||||
|
||||
case index.Name != newIndex.Name:
|
||||
return errors.New("new index name does not match")
|
||||
return fmt.Errorf(
|
||||
"new index name (%q) does not match current index name (%q)",
|
||||
newIndex.Name, index.Name,
|
||||
)
|
||||
|
||||
case index.isLocallyGenerated:
|
||||
if newIndex.versionNum.GreaterThan(index.versionNum) {
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"github.com/safing/portmaster/base/log"
|
||||
"github.com/safing/portmaster/base/notifications"
|
||||
"github.com/safing/portmaster/base/utils"
|
||||
"github.com/safing/portmaster/service/configure"
|
||||
"github.com/safing/portmaster/service/mgr"
|
||||
"github.com/safing/portmaster/service/ui"
|
||||
)
|
||||
@@ -203,7 +202,7 @@ func New(instance instance, name string, cfg Config) (*Updater, error) {
|
||||
module.corruptedInstallation = fmt.Errorf("invalid index: %w", err)
|
||||
}
|
||||
index, err = GenerateIndexFromDir(cfg.Directory, IndexScanConfig{
|
||||
Name: configure.DefaultBinaryIndexName,
|
||||
Name: cfg.Name,
|
||||
Version: info.VersionNumber(),
|
||||
})
|
||||
if err == nil && index.init(currentPlatform) == nil {
|
||||
|
||||
Reference in New Issue
Block a user