Skip to content
Snippets Groups Projects
Verified Commit cc70748e authored by Karel Koci's avatar Karel Koci :metal:
Browse files

lists: add migrate3x script

This script is intended to be used for migration from Turris OS 3.x.
parent 367c4e07
Branches
Tags
1 merge request!123Turris OS 5.0 (HBK)
......@@ -13,11 +13,3 @@ list_script('terminal-apps.lua')
Install("ds-lite", "6in4", "6rd", "6to4", { priority = 40 })
_END_FEATURE_GUARD_
--[[
We are migrating from uClibc to musl, so reinstall everything depending on libc.
]]
if installed['turris-version'] and version_match(installed['turris-version'].version, '<4.0') then
Package("libc", { abi_change_deep = true })
Package('updater-ng', { deps = { 'libgcc' } })
end
--[[
This is migration script used to migrate/update system from Turris OS 3.x to 4.x.
We have to update updater first so we do immediate replan and update only updater
itself.
]]
if not version_match or not self_version or version_match(self_version, "<63.0") then
local board
if model:match("[Oo]mnia") then
board = "omnia"
elseif model:match("^[Tt]urris$") then
board = "turris"
else
DIE("Unsupported Turris model: " .. tostring(model))
end
--[[
We provide access to only HBS repository and to only minimal set of feeds. We
don't need anything more to update updater.
]]
-- TODO move it to hbs when we have v63.0 in hbs
Repository("turris", "https://repo.turris.cz/hbt/packages/" .. pkg_board, {
subdirs = { "base", "core", "packages", "turrispackages"}
})
Install('updater-ng', { critical = true })
Package('updater-ng', {
replan = 'immediate',
deps = { 'libgcc', 'base-files' }
})
--[[
Updater package does not depend on libgcc but it requires it and dependency
breaks otherwise.
We also added base-files because that contains file /etc/os-release. We need
this file to detect target board (as a replacement to model variable).
]]
else
function for_l10n(fragment)
-- Dummy function. Languages are ignored and installed later on.
end
Export('for_l10n')
-- Call base script to update rest of the base system
Script("base.lua")
-- TODO add package containing migration script
end
-- We are potentially migrating from uClibc so reinstall everything depending
-- on it.
--Package("libc", { abi_change_deep = true })
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment