diff --git a/pkg/arvo/gen/desk-jam.hoon b/pkg/arvo/gen/desk-jam.hoon new file mode 100644 index 000000000..af8ca6a82 --- /dev/null +++ b/pkg/arvo/gen/desk-jam.hoon @@ -0,0 +1,26 @@ +:: +desk-jam: jam ankh from desk +:: +=, clay +=> +|% +++ ankh-to-map + =| res=(map path page) + =| pax=path + |= a=ankh + ^- (map path page) + =? res ?=(^ fil.a) (~(put by res) pax [p q.q]:q.u.fil.a) + =/ dir=(list [seg=@ta =ankh]) ~(tap by dir.a) + |- ^+ res + ?~ dir res + $(dir t.dir, res ^$(pax (snoc pax seg.i.dir), a ankh.i.dir)) +-- +:- %say +|= $: [now=@da eny=@uvJ bec=beak] + [=desk ~] + ~ + == +:- %jam +%- jam +%- ankh-to-map +=< ank +.^(dome:clay %cv /(scot %p p.bec)/[desk]/(scot %da now)) diff --git a/pkg/arvo/lib/hood/kiln.hoon b/pkg/arvo/lib/hood/kiln.hoon index f5968a4c6..baf20c0b6 100644 --- a/pkg/arvo/lib/hood/kiln.hoon +++ b/pkg/arvo/lib/hood/kiln.hoon @@ -264,6 +264,9 @@ -- =| old-ota=(unit ota) |= [hood-version=@ud old=any-state] + =/ old-version -.old + =* state +<+.$.abet + :: =? old-ota ?=(%0 -.old) =/ syncs=(list [ota =aeon]) ~(tap by syn.old) |- ^- (unit ota) @@ -327,15 +330,17 @@ `[paused.rail ship.rail desk.rail aeon.rail next]:a :: ?> ?=(%7 -.old) - =. +<+.$.abet old - =< abet + =. state old + :: + =? kiln (lth old-version %7) + abet:(install:vats %base our %base) =? kiln ?=(^ old-ota) abet:(install:vats %base [her sud]:u.old-ota) =? kiln ?=(^ wef) =/ except=(set desk) (sy %base %kids ~) (bump:vats u.wef (all-desks-but:vats except) %.n) =. wef ~ - kiln + abet:kiln :: ++ on-peek |= =path @@ -385,7 +390,6 @@ :: ++ here ?~ rail.rak "{} from local" "{} from {<[ship desk]:ral>}" - :: ++ make-wire |=(step=@tas /kiln/vats/[loc]/[step]) ++ from-wire |= =wire @@ -489,7 +493,7 @@ =: loc lac rak [~ *rein] == - ~> %slog.0^leaf/"kiln: beginning install into {here}" + ~> %slog.0^leaf/"kiln: local install {here}" =. vats (update-running-apps (get-apps-diff our loc now rein.rak)) =. vats (emit listen:pass) vats diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index ca59188d1..d8661c3cd 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -168,6 +168,8 @@ hez=(unit duct) :: sync duct cez=(map @ta crew) :: permission groups pud=(unit [=desk =yoki]) :: pending update + :: REMOVE on next upgrade + dist-upgraded=_| :: are we in dist yet? == :: :: :: Object store. @@ -303,6 +305,7 @@ $> $? %info :: internal edit %merg :: merge desks %fuse :: merge many + %park :: %pork :: %warp :: %werp :: @@ -339,6 +342,11 @@ == :: gift :: == :: + $: %gall + $> $? %unto + == + gift:gall + == $: %jael :: $>(%public-keys gift:jael) :: == == :: @@ -524,7 +532,7 @@ =^ top stack.nub pop-stack =. naves.cache.nub (~(put by naves.cache.nub) mak [vase.res top]) [vase.res nub] - ~> %slog.0^leaf/"ford: make mark {}" + :: ~> %slog.0^leaf/"ford: make mark {}" =^ cor=vase nub (build-fit %mar mak) =/ gad=vase (slap cor limb/%grad) ?@ q.gad @@ -599,7 +607,7 @@ =. marks.cache.nub (~(put by marks.cache.nub) mak [dais.res top]) [dais.res nub] =^ nav=vase nub (build-nave mak) - ~> %slog.0^leaf/"ford: make dais {}" + :: ~> %slog.0^leaf/"ford: make dais {}" :_ nub ^- dais |_ sam=vase @@ -654,7 +662,7 @@ [vase.res nub] :: try +grow; is there a +grow core with a .b arm? :: - ~> %slog.0^leaf/"ford: make cast {} -> {}" + :: ~> %slog.0^leaf/"ford: make cast {} -> {}" =^ old=vase nub (build-fit %mar a) ?: =/ ram (mule |.((slap old !,(*hoon grow)))) ?: ?=(%| -.ram) %.n @@ -714,7 +722,7 @@ =. tubes.cache.nub (~(put by tubes.cache.nub) [a b] [tube.res top]) [tube.res nub] =^ gat=vase nub (build-cast a b) - ~> %slog.0^leaf/"ford: make tube {} -> {}" + :: ~> %slog.0^leaf/"ford: make tube {} -> {}" :_(nub |=(v=vase (slam gat v))) :: ++ lobe-to-page @@ -803,7 +811,7 @@ =. stack.nub =- [(sy - ~) stack.nub] ?:(?=(%| -.dep) dep [& dir.p.dep]) - ~> %slog.0^leaf/"ford: make file {(spud path)}" + :: ~> %slog.0^leaf/"ford: make file {(spud path)}" =^ cag=cage nub (read-file path) ?> =(%hoon p.cag) =/ tex=tape (trip !<(@t q.cag)) @@ -1146,6 +1154,12 @@ |= mof=(list move) %_(+> mow (weld (flop mof) mow)) :: + :: Queue a list of moves, to be emitted before the rest + :: + ++ lime + |= mof=(list move) + %_(+> mow (weld mow (flop mof))) + :: :: Produce either null or a result along a subscription. :: :: Producing null means subscription has been completed or cancelled. @@ -1518,9 +1532,10 @@ ?: &(=(%base syd) !updated (~(any in invalid) is-kernel-path)) (sys-update yoki new-data) :: + ~? (did-kernel-update invalid) %clay-kernel-updated =? updated updated (did-kernel-update invalid) => ?. updated . - ~>(%slog.0^leaf/"clay: rebuilding {} after after kernel update" .) + ~>(%slog.0^leaf/"clay: rebuilding {} after kernel update" .) :: clear caches if zuse reloaded :: =. fod.dom @@ -1575,7 +1590,50 @@ =. fod.dom ford-cache.args =. ..park (emil (print q.old-yaki data)) :: + =? ..park &(updated !dist-upgraded.ruf) migrate-dist + :: wake:(ergo mim) + :: + ++ migrate-dist + ~> %slog.0^'clay: migrating for third-party software distribution' + |^ ^+ ..park + :: NOTE: reverse order, since we're prepending moves each time + =. ..park (install-from-tmp %landscape) + =. ..park (install-from-tmp %garden) + =. ..park (install-from-tmp %base) + ..park(dist-upgraded.ruf &) + :: + ++ install-from-tmp + |= =desk + %- lime + :~ :^ hen %pass /dist/[desk]/create + %^ new-desk:cloy desk + (latest-tako desk) + ;;((map path page) (cue (get-tmp-jam desk))) + :: + :^ hen %pass /dist/[desk]/install + [%g %deal [our our] %hood %poke %kiln-install !>([desk our desk])] + == + :: + ++ latest-tako + |= =desk + ^- (unit tako) + ?~ doj=(~(get by dos.rom) desk) ~ + =, dom.u.doj + (~(get by hit) let) + :: + ++ get-tmp-jam + |= =desk + ^- @ + ~| [%missing-tmp-desk-jam desk] + ?~ tmp=(~(get by dir.ank.dom) ~.tmp) !! + ?~ new=(~(get by dir.u.tmp) desk) !! + ?~ jam=(~(get by dir.u.new) ~.jam) !! + ?~ fil.u.jam !! + =* fil u.fil.u.jam + ?> =(%jam p.q.fil) + ;;(@ q.q.q.fil) + -- :: +is-kernel-path: should changing .pax cause a kernel or vane reload? :: ++ is-kernel-path |=(pax=path ?=([%sys *] pax)) @@ -1592,12 +1650,14 @@ |^ ?- -.yoki %| %- lobe-to-weft - ~> %mean.'clay: missing /sys/kelvin' + ~> %mean.(cat 3 'clay: missing /sys/kelvin on ' syd) + ~| ~(key by q.p.yoki) (~(got by q.p.yoki) /sys/kelvin) :: %& =/ fil=(each page lobe) - ~> %mean.'clay: missing /sys/kelvin' + ~> %mean.(cat 3 'clay: missing /sys/kelvin on ' syd) + ~| ~(key by q.p.yoki) (~(got by q.p.yoki) /sys/kelvin) ?- -.fil %& (page-to-weft p.fil) @@ -4109,9 +4169,10 @@ [~ fod] :: virtualize to catch and produce deterministic failures :: - !. + !: =- ?: ?=(%& -<) p.- - ((slog leaf+"clay: read-at-aeon fail {}" p.-) [[~ ~] fod]) + %. [[~ ~] fod] + (slog leaf+"clay: read-at-aeon fail {<[desk=syd mun]>}" ~) %- mule |. ?- care.mun %d @@ -4269,6 +4330,7 @@ [~ ..^$(hun.rom.ruf hen)] :: %into + ~& [%into (turn fis.req head)] =. hez.ruf `hen =+ bem=(~(get by mon.ruf) des.req) ?: &(?=(~ bem) !=(%$ des.req)) @@ -4428,12 +4490,22 @@ ++ load => |% +$ raft-any - $% [%9 raft-9] + $% [%10 raft-10] + [%9 raft-9] [%8 raft-8] [%7 raft-7] [%6 raft-6] == - +$ raft-9 raft + +$ raft-10 raft + +$ raft-9 + $: rom=room :: domestic + hoy=(map ship rung) :: foreign + ran=rang :: hashes + mon=(map term beam) :: mount points + hez=(unit duct) :: sync duct + cez=(map @ta crew) :: permission groups + pud=(unit [=desk =yoki]) :: pending update + == :: +$ raft-8 $: rom=room-8 hoy=(map ship rung-8) @@ -4549,7 +4621,8 @@ =? old ?=(%6 -.old) 7+(raft-6-to-7 +.old) =? old ?=(%7 -.old) 8+(raft-7-to-8 +.old) =? old ?=(%8 -.old) 9+(raft-8-to-9 +.old) - ?> ?=(%9 -.old) + =? old ?=(%9 -.old) 10+(raft-9-to-10 +.old) + ?> ?=(%10 -.old) ..^^$(ruf +.old) :: +raft-6-to-7: delete stale ford caches (they could all be invalid) :: @@ -4612,6 +4685,11 @@ =/ dom dom.rede-8 rede-8(dom [ank.dom let.dom hit.dom lab.dom mim.dom *ford-cache]) == + :: +raft-9-to-10: add .dist-upgraded + ++ raft-9-to-10 + |= raf=raft-9 + ^- raft-10 + raf(pud [pud.raf dist-upgraded=|]) -- :: ++ scry :: inspect @@ -4682,6 +4760,13 @@ ^+ [*(list move) ..^$] ?^ dud ~|(%clay-take-dud (mean tang.u.dud)) + ?: ?=([%dist *] tea) + ?> ?=(%unto +<.hin) + ?> ?=(%poke-ack -.p.hin) + ?~ p.p.hin + [~ ..^$] + =+ ((slog 'clay: dist migration failed' u.p.p.hin) ~) + !! :: ?: ?=([%merge @ @ @ @ ~] tea) ?> ?=(%writ +<.hin) @@ -4835,6 +4920,7 @@ :: %boon !! %lost !! + %unto !! %writ %- (slog leaf+"clay: strange writ (expected on upgrade to Fusion)" ~) [~ ..^$] diff --git a/pkg/arvo/sys/vane/gall.hoon b/pkg/arvo/sys/vane/gall.hoon index 2c00b6f34..4f4fc7de7 100644 --- a/pkg/arvo/sys/vane/gall.hoon +++ b/pkg/arvo/sys/vane/gall.hoon @@ -12,9 +12,9 @@ :: $move: Arvo-level move :: +$ move [=duct move=(wind note-arvo gift-arvo)] -:: $state-7: overall gall state, versioned +:: $state-8: overall gall state, versioned :: -+$ state-7 [%7 state] ++$ state-8 [%8 state] :: $state: overall gall state :: :: system-duct: TODO document @@ -116,8 +116,7 @@ :: $spore: structures for update, produced by +stay :: +$ spore - $: %7 - wipe-eyre-subs=_| ::NOTE band-aid for #3196, remove on next upgrade + $: %8 system-duct=duct outstanding=(map [wire duct] (qeu remote-request)) contacts=(set ship) @@ -165,12 +164,10 @@ [^duct %pass /whiz/gall %$ %whiz ~]~ =/ adult adult-core =. state.adult - [%7 system-duct outstanding contacts yokes=~ blocked]:spore + [%8 system-duct outstanding contacts yokes=~ blocked]:spore =/ mo-core (mo-abed:mo:adult duct) =. mo-core =/ apps=(list [dap=term =egg]) ~(tap by eggs.spore) - ~? wipe-eyre-subs.spore - [%g %wiping-eyre-subs] |- ^+ mo-core ?~ apps mo-core ?. =(%base q.beak.egg.i.apps) @@ -187,18 +184,6 @@ ?^ tan (mean u.tan) ap-core - =? ap-core wipe-eyre-subs.spore - =/ ducts=(list ^duct) - %+ skim ~(tap in ~(key by inbound.watches.egg.i.apps)) - |= =^duct - %+ lien duct - |= =path - ?=(^ (find /e/channel/subscription path)) - |- - ?~ ducts ap-core - =. ap-core - ap-load-delete:ap-core(agent-duct i.ducts) - $(ducts t.ducts) $(apps t.apps, mo-core ap-abet:ap-core) =. mo-core (mo-subscribe-to-agent-builds:mo-core now) =^ moves adult-gate mo-abet:mo-core @@ -210,7 +195,7 @@ =* call-args +< ?: =(~ eggs.spore) ~> %slog.[0 leaf+"gall: direct morphogenesis"] - =. state.adult-gate [- +>]:spore(eggs *(map term yoke)) + =. state.adult-gate spore(eggs *(map term yoke)) (call:adult-core call-args) ?^ dud ~> %slog.[0 leaf+"gall: pupa call dud"] @@ -227,7 +212,7 @@ =* take-args +< ?: =(~ eggs.spore) ~> %slog.[0 leaf+"gall: direct morphogenesis"] - =. state.adult-gate [- +>]:spore(eggs *(map term yoke)) + =. state.adult-gate spore(eggs *(map term yoke)) (take:adult-core take-args) ?^ dud ~> %slog.[0 leaf+"gall: pupa take dud"] @@ -237,18 +222,46 @@ (molt duct `[duct %pass wire %b %huck sign]) :: ++ load - |= old=^spore - =. spore old - ?. =(~ eggs.spore) - pupal-gate - ~> %slog.[0 leaf+"gall: direct morphogenesis"] - %_ adult-gate - state [- +>]:spore(eggs *(map term yoke)) - == + |^ |= old=spore-any + =? old ?=(%7 -.old) + (spore-7-to-8 old) + ?> ?=(%8 -.old) + =. spore old + ::TODO suspend everything except hood + ?. =(~ eggs.spore) + pupal-gate + ~> %slog.[0 leaf+"gall: direct morphogenesis"] + %_ adult-gate + state spore(eggs *(map term yoke)) + == + :: + +$ spore-any $%(^spore spore-7) + +$ spore-7 + $: %7 + wipe-eyre-subs=_| ::NOTE band-aid for #3196 + system-duct=duct + outstanding=(map [wire duct] (qeu remote-request)) + contacts=(set ship) + eggs=(map term egg) + blocked=(map term (qeu blocked-move)) + == + :: + ++ spore-7-to-8 + |= old=spore-7 + ^- ^spore + :- %8 + =. eggs.old + %- ~(urn by eggs.old) + |= [a=term e=egg] + ::NOTE kiln will kick off appropriate app revival + ?: =(%hood a) e(q.beak %base) + e(old-state [%| p.old-state.e]) + +>.old + -- -- :: adult gall vane interface, for type compatibility with pupa :: -=| state=state-7 +=| state=state-8 |= [now=@da eny=@uvJ rof=roof] =* gall-payload . =< ~% %gall-wrap ..mo ~ @@ -581,7 +594,7 @@ ?~ yok ~> %slog.[0 leaf+"gall: no agent to reload: {}"] cor - ?: ?=(%| -.agent) + ?: ?=(%| -.agent.u.yok) ~> %slog.[0 leaf+"gall: dead agent reload: {}"] cor =/ bek=beak [our q.beak.u.yok p.sign-arvo] @@ -1794,7 +1807,7 @@ :: ++ stay ^- spore - =; eggs=(map term egg) [- | +]:state(yokes eggs) + =; eggs=(map term egg) state(yokes eggs) %- ~(run by yokes.state) |= =yoke ^- egg diff --git a/pkg/arvo/sys/zuse.hoon b/pkg/arvo/sys/zuse.hoon index 4bb3221f8..955872e50 100644 --- a/pkg/arvo/sys/zuse.hoon +++ b/pkg/arvo/sys/zuse.hoon @@ -3734,6 +3734,9 @@ ++ cloy =, clay |% + ++ new-desk + |= [=desk tako=(unit tako) files=(map path page)] + [%c %park desk &/[(drop tako) (~(run by files) (lead %&))] *rang] :: +an: $ankh interface door :: ++ an @@ -3755,6 +3758,33 @@ ?~ nik=(dug path) ~ ?~ fil.u.nik ~ `q.u.fil.u.nik + :: +mup: convert sub-tree at .pre to (map path [lobe cage]) + :: + ++ mup + |= pre=path + =- ~? =(~ -) [%oh-no-empty pre] + - + ^- (map path [lobe cage]) + =/ nek=(unit ankh) (dug pre) + ?~ nek + ~& [%oh-no-empty-pre pre ~(key by dir.nak)] + ~ + =. nak u.nek + ~? =(~ nak) [%oh-no-empty-nak pre] + =| pax=path + =| res=(map path [=lobe =cage]) + |- ^+ res + =? res ?=(^ fil.nak) (~(put by res) pax u.fil.nak) + :: =/ anz=(list [seg=@ta =ankh]) ~(tap by dir.nak) + :: |- ^+ res + :: ?~ anz res + :: %_ $ + :: anz t.anz + :: res ^$(pax (snoc pax seg.i.anz), nak ankh.i.anz) + :: == + %+ roll ~(tap by dir.nak) + |= [[seg=@ta =ankh] res=_res] + ^$(pax (snoc pax seg), nak ankh, res res) -- -- :: :: diff --git a/pkg/base-dev/sur/hood.hoon b/pkg/base-dev/sur/hood.hoon index e05655438..ace3e9a06 100644 --- a/pkg/base-dev/sur/hood.hoon +++ b/pkg/base-dev/sur/hood.hoon @@ -204,7 +204,8 @@ :: ++ mergebase-hashes |= [our=@p =desk now=@da =arak] - ?> ?=(^ rail.arak) + ?~ rail.arak + ~ =/ her (scot %p ship.u.rail.arak) =/ ego (scot %p our) =/ wen (scot %da now) diff --git a/pkg/landscape/app/notify.hoon b/pkg/landscape/app/notify.hoon index ce127fe74..cd9ebc9b0 100644 --- a/pkg/landscape/app/notify.hoon +++ b/pkg/landscape/app/notify.hoon @@ -67,6 +67,7 @@ :: %0 %_ $ + -.old %1 :: cards %+ welp cards