mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-27 02:41:53 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21f6560074 | ||
|
|
a077600c7e | ||
|
|
59f0d4e23a | ||
|
|
e64b92c5dd | ||
|
|
748379becc | ||
|
|
5b3163465d | ||
|
|
b00af8980a | ||
|
|
8708a4de8e |
@@ -5,7 +5,7 @@ cabal-version: 1.12
|
|||||||
-- see: https://github.com/sol/hpack
|
-- see: https://github.com/sol/hpack
|
||||||
|
|
||||||
name: ambassador-agent
|
name: ambassador-agent
|
||||||
version: 0.2.13
|
version: 0.2.14
|
||||||
build-type: Simple
|
build-type: Simple
|
||||||
extra-source-files:
|
extra-source-files:
|
||||||
./migrations/0.1.0::0.1.0
|
./migrations/0.1.0::0.1.0
|
||||||
@@ -19,6 +19,7 @@ extra-source-files:
|
|||||||
./migrations/0.2.10::0.2.11
|
./migrations/0.2.10::0.2.11
|
||||||
./migrations/0.2.11::0.2.12
|
./migrations/0.2.11::0.2.12
|
||||||
./migrations/0.2.12::0.2.13
|
./migrations/0.2.12::0.2.13
|
||||||
|
./migrations/0.2.13::0.2.14
|
||||||
./migrations/0.2.1::0.2.2
|
./migrations/0.2.1::0.2.2
|
||||||
./migrations/0.2.2::0.2.3
|
./migrations/0.2.2::0.2.3
|
||||||
./migrations/0.2.3::0.2.4
|
./migrations/0.2.3::0.2.4
|
||||||
|
|||||||
@@ -33,5 +33,5 @@ database:
|
|||||||
database: "start9_agent.sqlite3"
|
database: "start9_agent.sqlite3"
|
||||||
poolsize: "_env:YESOD_SQLITE_POOLSIZE:10"
|
poolsize: "_env:YESOD_SQLITE_POOLSIZE:10"
|
||||||
|
|
||||||
app-mgr-version-spec: "=0.2.13"
|
app-mgr-version-spec: "=0.2.14"
|
||||||
#analytics: UA-YOURCODE
|
#analytics: UA-YOURCODE
|
||||||
|
|||||||
1
agent/migrations/0.2.13::0.2.14
Normal file
1
agent/migrations/0.2.13::0.2.14
Normal file
@@ -0,0 +1 @@
|
|||||||
|
SELECT TRUE;
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
name: ambassador-agent
|
name: ambassador-agent
|
||||||
version: 0.2.13
|
version: 0.2.14
|
||||||
|
|
||||||
default-extensions:
|
default-extensions:
|
||||||
- NoImplicitPrelude
|
- NoImplicitPrelude
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import qualified Data.Conduit.Combinators as Conduit
|
|||||||
import Data.Conduit.Shell hiding ( arch
|
import Data.Conduit.Shell hiding ( arch
|
||||||
, hostname
|
, hostname
|
||||||
, patch
|
, patch
|
||||||
|
, split
|
||||||
, stream
|
, stream
|
||||||
)
|
)
|
||||||
import qualified Data.Conduit.Tar as Conduit
|
import qualified Data.Conduit.Tar as Conduit
|
||||||
@@ -50,6 +51,9 @@ import Constants
|
|||||||
import Control.Effect.Error hiding ( run )
|
import Control.Effect.Error hiding ( run )
|
||||||
import Control.Effect.Labelled ( runLabelled )
|
import Control.Effect.Labelled ( runLabelled )
|
||||||
import Daemon.ZeroConf ( getStart9AgentHostname )
|
import Daemon.ZeroConf ( getStart9AgentHostname )
|
||||||
|
import Data.ByteString.Char8 ( split )
|
||||||
|
import qualified Data.ByteString.Char8 as C8
|
||||||
|
import Data.Conduit.List ( consume )
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import Foundation
|
import Foundation
|
||||||
import Handler.Network
|
import Handler.Network
|
||||||
@@ -98,12 +102,12 @@ parseKernelVersion = do
|
|||||||
pure $ KernelVersion (Version (major', minor', patch', 0)) arch
|
pure $ KernelVersion (Version (major', minor', patch', 0)) arch
|
||||||
|
|
||||||
synchronizer :: Synchronizer
|
synchronizer :: Synchronizer
|
||||||
synchronizer = sync_0_2_13
|
synchronizer = sync_0_2_14
|
||||||
{-# INLINE synchronizer #-}
|
{-# INLINE synchronizer #-}
|
||||||
|
|
||||||
sync_0_2_13 :: Synchronizer
|
sync_0_2_14 :: Synchronizer
|
||||||
sync_0_2_13 = Synchronizer
|
sync_0_2_14 = Synchronizer
|
||||||
"0.2.13"
|
"0.2.14"
|
||||||
[ syncCreateAgentTmp
|
[ syncCreateAgentTmp
|
||||||
, syncCreateSshDir
|
, syncCreateSshDir
|
||||||
, syncRemoveAvahiSystemdDependency
|
, syncRemoveAvahiSystemdDependency
|
||||||
@@ -585,19 +589,34 @@ syncRestarterService = SyncOp "Install Restarter Service" check migrate True
|
|||||||
liftIO $ callCommand "systemctl enable restarter.timer"
|
liftIO $ callCommand "systemctl enable restarter.timer"
|
||||||
|
|
||||||
syncUpgradeTor :: SyncOp
|
syncUpgradeTor :: SyncOp
|
||||||
syncUpgradeTor = SyncOp "Install Tor 0.3.5.14-1" check migrate False
|
syncUpgradeTor = SyncOp "Install Latest Tor" check migrate False
|
||||||
where
|
where
|
||||||
check =
|
check = run $ do
|
||||||
liftIO
|
shell "apt-get clean"
|
||||||
$ ( run (shell [i|dpkg -l|] $| shell [i|grep tor|] $| shell [i|grep 0.3.5.14-1|] $| conduit await)
|
shell "apt-get update"
|
||||||
$> False
|
mTorVersion <- (shell "dpkg -s tor" $| shell "grep '^Version'" $| shell "cut -d ' ' -f2" $| conduit await)
|
||||||
)
|
let torVersion = case mTorVersion of
|
||||||
`catch` \(e :: ProcessException) -> case e of
|
Nothing -> panic "invalid output from dpkg, can't read tor version"
|
||||||
ProcessException _ (ExitFailure 1) -> pure True
|
Just x -> x
|
||||||
_ -> throwIO e
|
pure $ compareTorVersions torVersion "0.3.5.15-1" == LT
|
||||||
migrate = liftIO . run $ do
|
migrate = liftIO . run $ do
|
||||||
shell "apt-get update"
|
shell "apt-get update"
|
||||||
shell "apt-get install -y tor=0.3.5.14-1"
|
availVersions <-
|
||||||
|
(shell "apt-cache madison tor" $| shell "cut -d '|' -f2" $| shell "xargs" $| conduit consume)
|
||||||
|
latest <- case lastMay $ sortBy compareTorVersions availVersions of
|
||||||
|
Nothing -> throwIO $ ErrorCall "No available versions of tor"
|
||||||
|
Just x -> pure x
|
||||||
|
shell $ "apt-get install -y tor=" <> if "0.3.5.15-1" `elem` availVersions
|
||||||
|
then "0.3.5.15-1"
|
||||||
|
else (C8.unpack latest)
|
||||||
|
compareTorVersions :: ByteString -> ByteString -> Ordering
|
||||||
|
compareTorVersions a b =
|
||||||
|
let a' = (traverse (readMaybe @Int . decodeUtf8) . (split '.' <=< split '-') $ a)
|
||||||
|
b' = (traverse (readMaybe @Int . decodeUtf8) . (split '.' <=< split '-') $ b)
|
||||||
|
in case liftA2 compare a' b' of
|
||||||
|
Nothing -> panic "invalid tor version string"
|
||||||
|
Just x -> x
|
||||||
|
|
||||||
|
|
||||||
syncDropCertificateUniqueness :: SyncOp
|
syncDropCertificateUniqueness :: SyncOp
|
||||||
syncDropCertificateUniqueness = SyncOp "Eliminate OpenSSL unique_subject=yes" check migrate False
|
syncDropCertificateUniqueness = SyncOp "Eliminate OpenSSL unique_subject=yes" check migrate False
|
||||||
|
|||||||
2
appmgr/Cargo.lock
generated
2
appmgr/Cargo.lock
generated
@@ -41,7 +41,7 @@ checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "appmgr"
|
name = "appmgr"
|
||||||
version = "0.2.13"
|
version = "0.2.14"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"avahi-sys",
|
"avahi-sys",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
authors = ["Aiden McClelland <me@drbonez.dev>"]
|
authors = ["Aiden McClelland <me@drbonez.dev>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "appmgr"
|
name = "appmgr"
|
||||||
version = "0.2.13"
|
version = "0.2.14"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "appmgrlib"
|
name = "appmgrlib"
|
||||||
@@ -20,7 +20,9 @@ production = []
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-trait = "0.1.42"
|
async-trait = "0.1.42"
|
||||||
avahi-sys = { git = "https://github.com/Start9Labs/avahi-sys", branch = "feature/dynamic-linking", features = ["dynamic"], optional = true }
|
avahi-sys = { git = "https://github.com/Start9Labs/avahi-sys", branch = "feature/dynamic-linking", features = [
|
||||||
|
"dynamic",
|
||||||
|
], optional = true }
|
||||||
base32 = "0.4.0"
|
base32 = "0.4.0"
|
||||||
clap = "2.33"
|
clap = "2.33"
|
||||||
ctrlc = "3.1.7"
|
ctrlc = "3.1.7"
|
||||||
|
|||||||
@@ -30,8 +30,9 @@ mod v0_2_10;
|
|||||||
mod v0_2_11;
|
mod v0_2_11;
|
||||||
mod v0_2_12;
|
mod v0_2_12;
|
||||||
mod v0_2_13;
|
mod v0_2_13;
|
||||||
|
mod v0_2_14;
|
||||||
|
|
||||||
pub use v0_2_13::Version as Current;
|
pub use v0_2_14::Version as Current;
|
||||||
|
|
||||||
#[derive(serde::Serialize, serde::Deserialize)]
|
#[derive(serde::Serialize, serde::Deserialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
@@ -57,6 +58,7 @@ enum Version {
|
|||||||
V0_2_11(Wrapper<v0_2_11::Version>),
|
V0_2_11(Wrapper<v0_2_11::Version>),
|
||||||
V0_2_12(Wrapper<v0_2_12::Version>),
|
V0_2_12(Wrapper<v0_2_12::Version>),
|
||||||
V0_2_13(Wrapper<v0_2_13::Version>),
|
V0_2_13(Wrapper<v0_2_13::Version>),
|
||||||
|
V0_2_14(Wrapper<v0_2_14::Version>),
|
||||||
Other(emver::Version),
|
Other(emver::Version),
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,6 +174,7 @@ pub async fn init() -> Result<(), failure::Error> {
|
|||||||
Version::V0_2_11(v) => v.0.migrate_to(&Current::new()).await?,
|
Version::V0_2_11(v) => v.0.migrate_to(&Current::new()).await?,
|
||||||
Version::V0_2_12(v) => v.0.migrate_to(&Current::new()).await?,
|
Version::V0_2_12(v) => v.0.migrate_to(&Current::new()).await?,
|
||||||
Version::V0_2_13(v) => v.0.migrate_to(&Current::new()).await?,
|
Version::V0_2_13(v) => v.0.migrate_to(&Current::new()).await?,
|
||||||
|
Version::V0_2_14(v) => v.0.migrate_to(&Current::new()).await?,
|
||||||
Version::Other(_) => (),
|
Version::Other(_) => (),
|
||||||
// TODO find some way to automate this?
|
// TODO find some way to automate this?
|
||||||
}
|
}
|
||||||
@@ -266,6 +269,7 @@ pub async fn self_update(requirement: emver::VersionRange) -> Result<(), Error>
|
|||||||
Version::V0_2_11(v) => Current::new().migrate_to(&v.0).await?,
|
Version::V0_2_11(v) => Current::new().migrate_to(&v.0).await?,
|
||||||
Version::V0_2_12(v) => Current::new().migrate_to(&v.0).await?,
|
Version::V0_2_12(v) => Current::new().migrate_to(&v.0).await?,
|
||||||
Version::V0_2_13(v) => Current::new().migrate_to(&v.0).await?,
|
Version::V0_2_13(v) => Current::new().migrate_to(&v.0).await?,
|
||||||
|
Version::V0_2_14(v) => Current::new().migrate_to(&v.0).await?,
|
||||||
Version::Other(_) => (),
|
Version::Other(_) => (),
|
||||||
// TODO find some way to automate this?
|
// TODO find some way to automate this?
|
||||||
};
|
};
|
||||||
|
|||||||
21
appmgr/src/version/v0_2_14.rs
Normal file
21
appmgr/src/version/v0_2_14.rs
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
use super::*;
|
||||||
|
|
||||||
|
const V0_2_14: emver::Version = emver::Version::new(0, 2, 14, 0);
|
||||||
|
|
||||||
|
pub struct Version;
|
||||||
|
#[async_trait]
|
||||||
|
impl VersionT for Version {
|
||||||
|
type Previous = v0_2_13::Version;
|
||||||
|
fn new() -> Self {
|
||||||
|
Version
|
||||||
|
}
|
||||||
|
fn semver(&self) -> &'static emver::Version {
|
||||||
|
&V0_2_14
|
||||||
|
}
|
||||||
|
async fn up(&self) -> Result<(), Error> {
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
async fn down(&self) -> Result<(), Error> {
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
manifest-version: 0
|
manifest-version: 0
|
||||||
app-id: start9-ambassador
|
app-id: start9-ambassador
|
||||||
app-version: 0.2.13
|
app-version: 0.2.14
|
||||||
uri-rewrites:
|
uri-rewrites:
|
||||||
- =/api -> http://{{start9-ambassador}}:5959/authenticate
|
- =/api -> http://{{start9-ambassador}}:5959/authenticate
|
||||||
- /api/ -> http://{{start9-ambassador}}:5959/
|
- /api/ -> http://{{start9-ambassador}}:5959/
|
||||||
|
|||||||
2831
ui/package-lock.json
generated
2831
ui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "embassy-ui",
|
"name": "embassy-ui",
|
||||||
"version": "0.2.13",
|
"version": "0.2.14",
|
||||||
"description": "GUI for EmbassyOS",
|
"description": "GUI for EmbassyOS",
|
||||||
"author": "Start9 Labs",
|
"author": "Start9 Labs",
|
||||||
"homepage": "https://github.com/Start9Labs/embassy-ui",
|
"homepage": "https://github.com/Start9Labs/embassy-ui",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title >
|
<ion-title >
|
||||||
<ion-label style="font-size: 20px;" class="ion-text-wrap">Welcome to 0.2.13!</ion-label>
|
<ion-label style="font-size: 20px;" class="ion-text-wrap">Welcome to 0.2.14!</ion-label>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
@@ -10,8 +10,7 @@
|
|||||||
<div style="display: flex; flex-direction: column; justify-content: space-between; height: 100%">
|
<div style="display: flex; flex-direction: column; justify-content: space-between; height: 100%">
|
||||||
<h2>Highlights</h2>
|
<h2>Highlights</h2>
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<p>At long last, Matrix has arrived!</p>
|
<p>This release contains an important security patch to the tor binaries</p>
|
||||||
<p>This release also enables displaying Service license information and contains utilities to facilitate the next major release of EmbassyOS.</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="close-button">
|
<div class="close-button">
|
||||||
|
|||||||
@@ -499,8 +499,8 @@ const mockApiNotifications: ReqRes.GetNotificationsRes = [
|
|||||||
const mockApiServer: () => ReqRes.GetServerRes = () => ({
|
const mockApiServer: () => ReqRes.GetServerRes = () => ({
|
||||||
serverId: 'start9-mockxyzab',
|
serverId: 'start9-mockxyzab',
|
||||||
name: 'Embassy:12345678',
|
name: 'Embassy:12345678',
|
||||||
versionInstalled: '0.2.13',
|
versionInstalled: '0.2.14',
|
||||||
versionLatest: '0.2.13',
|
versionLatest: '0.2.14',
|
||||||
status: ServerStatus.RUNNING,
|
status: ServerStatus.RUNNING,
|
||||||
alternativeRegistryUrl: 'beta-registry.start9labs.com',
|
alternativeRegistryUrl: 'beta-registry.start9labs.com',
|
||||||
welcomeAck: true,
|
welcomeAck: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user