updater issueshttps://gitlab.nic.cz/turris/updater/updater/-/issues2023-08-16T15:00:04+02:00https://gitlab.nic.cz/turris/updater/updater/-/issues/290Candidates from provided packages might be in some cases ignored2023-08-16T15:00:04+02:00Karel KociCandidates from provided packages might be in some cases ignoredIn one specific case the package `libmariadbclient` provides `libmysqlclient-r` but updater reports
```
TRACE:planner.lua:104 (sat_pkg_group):SAT add package libmysqlclient-r with var: 324
TRACE:planner.lua:150 (sat_pkg_group):SAT group ...In one specific case the package `libmariadbclient` provides `libmysqlclient-r` but updater reports
```
TRACE:planner.lua:104 (sat_pkg_group):SAT add package libmysqlclient-r with var: 324
TRACE:planner.lua:150 (sat_pkg_group):SAT group libmysqlclient-r has no candidate
```Turris OS 4.0.5https://gitlab.nic.cz/turris/updater/updater/-/issues/292Rewrite pkg_unpack to not use tmp and instead do it by stream operation2023-08-16T15:00:00+02:00Karel KociRewrite pkg_unpack to not use tmp and instead do it by stream operationThis should help when we install big packages.
We should unpack two archives not by fist unpacking first one and then other one but by unpacking both at the same time in stream. Files should go directly to mountpoint root (to FS as they...This should help when we install big packages.
We should unpack two archives not by fist unpacking first one and then other one but by unpacking both at the same time in stream. Files should go directly to mountpoint root (to FS as they are going to be written there anyway).https://gitlab.nic.cz/turris/updater/updater/-/issues/208Replace custom build system with autotools2023-08-16T14:59:58+02:00Karel KociReplace custom build system with autotoolsCurrently used build system was developed by one of now gone colleague and
probably won't be maintained any more. If so we should think about migrating it to
autotools.Currently used build system was developed by one of now gone colleague and
probably won't be maintained any more. If so we should think about migrating it to
autotools.https://gitlab.nic.cz/turris/updater/updater/-/issues/300Detect broken Internet connection2023-08-16T14:59:54+02:00Vojtech MyslivecDetect broken Internet connectionWhen a WAN is down and Internet connection is not available, updater "spam" Foris notifications with:
```
unreachable: https://repo.turris.cz/omnia/lists/base.lua: Couldn't resolve host 'repo.turris.cz'
```
which is a bit cryptic, espec...When a WAN is down and Internet connection is not available, updater "spam" Foris notifications with:
```
unreachable: https://repo.turris.cz/omnia/lists/base.lua: Couldn't resolve host 'repo.turris.cz'
```
which is a bit cryptic, especially for new Turris users.
It would be really nice to enhance user experience and lower "false issues" [like that](https://forum.turris.cz/t/nemohu-resolvovat-repo-turris-cz/12907) (that's really not unique).Turris OS 5.1https://gitlab.nic.cz/turris/updater/updater/-/issues/307Create notification is in compatible mode2023-08-16T14:59:49+02:00Josef SchlehoferCreate notification is in compatible modeThis script here: https://gitlab.nic.cz/turris/updater/updater/-/blob/master/src/pkgupdate/hook_reboot_required/50-create-notification.sh#L5 throws up warning during update:
`create_notification: Warning: Running in compatible mode! Use...This script here: https://gitlab.nic.cz/turris/updater/updater/-/blob/master/src/pkgupdate/hook_reboot_required/50-create-notification.sh#L5 throws up warning during update:
`create_notification: Warning: Running in compatible mode! Use of cs message is obsoleted.`Turris OS 5.2.0https://gitlab.nic.cz/turris/updater/updater/-/issues/325Approvals does not require manual confirmation2023-08-16T14:59:40+02:00Josef SchlehoferApprovals does not require manual confirmationOn Turris 1.1 router, I'm using Approvals.
```
root@turris:~# uci export updater
package updater
config turris 'turris'
option mode 'branch'
option branch 'hbl'
config l10n 'l10n'
list langs 'cs'
config autorun 'autorun'
option e...On Turris 1.1 router, I'm using Approvals.
```
root@turris:~# uci export updater
package updater
config turris 'turris'
option mode 'branch'
option branch 'hbl'
config l10n 'l10n'
list langs 'cs'
config autorun 'autorun'
option enable '1'
option approvals '1'
```
And it seems that Approvals are not necessary since the update is installed anyway.
I got two notifications today:
- 5.28 am:
```
Update notifications
====================
Your approval is required to apply pending updates. You can grant it in the Foris administrative interface in the 'Updater' menu.
• Install libnetfilter-log 1.0.2-1
```
- 6.21 am:
```
Update notifications
====================
Changes performed by updater at 2022-03-18T05:21:23+00:00
• Updated package libnetfilter-log from version 1.0.1-3 to version 1.0.2-1
```
If you need some logs, please let me know, I will be gladly to help.Turris OS 6.0https://gitlab.nic.cz/turris/updater/updater/-/issues/236Report updater state on named socket2023-08-16T14:59:38+02:00Karel KociReport updater state on named socketWe want to be able to access state of running updater from gui (specially from Foris) and for that we need some common way to see what is updater doing no matter if we are running it directly or not.
We should dump to it informations ab...We want to be able to access state of running updater from gui (specially from Foris) and for that we need some common way to see what is updater doing no matter if we are running it directly or not.
We should dump to it informations about what packages are we downloading, installing, removing and so on at the moment.https://gitlab.nic.cz/turris/updater/updater/-/issues/326Updater throws instead logs updating errors2023-08-16T14:59:35+02:00Adam UhlířUpdater throws instead logs updating errorsUpdater started to fail with Stack Traceback instead of reporting the error ( "perlbase-ipc not available" ):
Running on HBL branch.
```
Updater execution failed:
Stack Traceback
===============
(1) Lua function '?' at line 57 of ch...Updater started to fail with Stack Traceback instead of reporting the error ( "perlbase-ipc not available" ):
Running on HBL branch.
```
Updater execution failed:
Stack Traceback
===============
(1) Lua function '?' at line 57 of chunk '"logging"]'
Local variables:
err = Requested package perlbase-ipc that is not available. {msg:Requested package perlbase-ipc that is not available., tp:error, reason:inconsistent (more...)}
err2string = Lua function '?' (defined at line 38 of chunk "logging"])
msg = string: "\
inconsistent: Requested package perlbase-ipc that is not available."
(*temporary) = table: 0x51cb080 {msg:
inconsistent: Requested package perlbase-ipc that is not available. (more...)}
(2) C function 'function: 0x238e360'
(3) upvalue C function 'error'
(4) Lua local 'pkg_plan' at line 358 of chunk '"planner"]'
Local variables:
plan_pkg = table: 0x273a430 {tp:package, name:perlbase-ipc, final:table: 0x3878550}
ignore_missing = boolean: false
ignore_missing_pkg = boolean: false
only_version = nil
parent_str = string: "Requested package"
name = string: "perlbase-ipc"
missing_pkg = number: 608
(5) Lua function '?' at line 470 of chunk '"planner"]'
Local variables:
pkgs = table: 0x235f560 {luci-i18n-cshark-he:table: 0x2dc1540, kmod-video-gspca-vc032x:table: 0x3b1ce60 (more...)}
requests = table: 0x2369890 {1:table: 0x3953240, 2:table: 0x3954950, 3:table: 0x3954d80, 4:table: 0x3955280 (more...)}
sat = userdata: 0x45ceb38
satmap = table: 0x45c86b0 {pkgs:table: 0x235f560, pkg2sat:table: 0x45c78d0, sat:userdata: 0x45ceb38 (more...)}
plan = table: 0x5095df0 {1:table: 0x517d360, 2:table: 0x517d330, 3:table: 0x517d510, 4:table: 0x517d8c0 (more...)}
planned = table: 0x5095e20 {kmod-usb-storage-uas:8, libevent2:57, libc:2, liblua:46, kmod-lib-zlib-deflate:90 (more...)}
wstack = table: 0x5095e50 {}
inwstack = table: 0x5095e80 {}
inconsistent = table: 0x5095eb0 {}
missing_dep = table: 0x5095ee0 {}
pkg_plan = Lua function '?' (defined at line 345 of chunk "planner"])
(for generator) = C function: 0xb6f226a0
(for state) = table: 0x2369890 {1:table: 0x3953240, 2:table: 0x3954950, 3:table: 0x3954d80, 4:table: 0x3955280 (more...)}
(for control) = number: 37
_ = number: 37
req = table: 0x2430f10 {package:table: 0x273a430, priority:50, tp:install}
(6) tail call
Local variables:
(*temporary) = C function: 0x238e360
(7) tail call
Local variables:
(*temporary) = C function: 0x238e360
(8) Lua function '?' at line 71 of chunk '"updater"]'
Local variables:
entrypoint = string: "file:///etc/updater/conf.lua"
```Turris OS 6.0Michal HruseckyMichal Hruseckyhttps://gitlab.nic.cz/turris/updater/updater/-/issues/329Updating from Turris OS 4.0.1 to Turris OS 6.0.4 fails due to `ath10k-firmwar...2022-12-19T14:24:49+01:00Alois KlinkUpdating from Turris OS 4.0.1 to Turris OS 6.0.4 fails due to `ath10k-firmware-qca9888-ct-htt`Updating from Turris OS 4.0.1 to Turris OS 6 fails with the following error (a similar error shows in the WebUI):
```console
root@turris:~# pkgupdate
INFO:Target Turris OS: 6.0.4
WARN:There's no extra option condition for a install
line...Updating from Turris OS 4.0.1 to Turris OS 6 fails with the following error (a similar error shows in the WebUI):
```console
root@turris:~# pkgupdate
INFO:Target Turris OS: 6.0.4
WARN:There's no extra option condition for a install
line not found
line not found
line not found
ERROR:
inconsistent: Candidate exists for virtual package ath10k-firmware-qca9888-ct-htt
```
This has already been mentioned in the forums
(see https://forum.turris.cz/t/update-error-on-turrisos-4-ath10k-firmware-qca9888-ct-htt/18256
and https://forum.turris.cz/t/not-able-to-update-after-factory-reset/18033),
but since I couldn't find a GitLab issue, I thought I'd report it here too.
### Work-around
We can just flash a newer version of Turris OS, but considering that some Turris Omnias still come
with Turris OS 4 by default (and factory reset uses Turris OS 4), sometimes doing a manual update
is easier:
#### Updating to `version` 5.4.4, then back to Turris OS `branch` `hbs`
Manually updating to Turris OS 5.4.4 works:
Modifying `/etc/config/updater` to set `mode` to `version` and `version` to `5.4.4`.
```uci
config turris 'turris'
# option mode 'branch'
option mode 'version'
option version '5.4.4'
```
Then, running `pkgupdate` lets us do an update to v5.4.4:
```console
root@turris:~# pkgupdate
INFO:Target Turris OS: 5.4.4
WARN:There's no extra option condition for a install
INFO:Queue install of libgcc/core/7.5.0-2
INFO:Queue install of libc/core/1.1.24-2
INFO:Queue install of ca-certificates/base/20200601-1
INFO:Queue install of libopenssl/base/1.1.1q-1
INFO:Queue install of libexpat/packages/2.2.10-2
INFO:Queue install of libbz2/base/1.0.8-1
INFO:Queue install of libpthread/core/1.1.24-2
INFO:Queue install of liblzma/packages/5.2.5-1
INFO:Queue install of zlib/base/1.2.12
INFO:Queue install of libarchive/packages/3.4.2-1
INFO:Queue install of liburiparser/turrispackages/0.9.6-1
INFO:Queue install of ca-bundle/base/20200601-1
INFO:Queue install of libcurl/base/7.66.0-3
INFO:Queue install of libevent2/base/2.1.11-1
INFO:Queue install of liblua/base/5.1.5-3
INFO:Queue install of libubox/base/2020-05-25-66195aee-1
INFO:Queue install of libuci/base/2019-09-01-415f9e48-4
INFO:Queue install of libuci-lua/base/2019-09-01-415f9e48-4
INFO:Queue install of updater-ng/turrispackages/69.1.3-2
Press return to continue, CTRL+C to abort
<...>
```
Finally, we can undo our changes to `/etc/config/updater` by setting `mode` to `branch` and deleting the `version` key.
```uci
config turris 'turris'
option mode 'branch'
```
Then, running `pkgupdate` again worked to update us to `Target Turris OS: 6.0.4`.
```console
root@turris:~# pkgupdate
INFO:Target Turris OS: 6.0.4
INFO:Queue upgrade of libgcc/core/8.4.0-3[7.5.0-2]
INFO:Queue upgrade of libc/core/1.1.24-3[1.1.24-2]
<...>
```https://gitlab.nic.cz/turris/updater/updater/-/issues/311Compare of dependencies triggers reinstall after opkg usage2022-02-16T16:41:01+01:00Karel KociCompare of dependencies triggers reinstall after opkg usageOpkg sanitizes dependencies and that introduces inconsistency in string comparison. We should probably not compare dependencies as strings but rather in some other way.
This is considered as mirror bug as it triggers only once after opk...Opkg sanitizes dependencies and that introduces inconsistency in string comparison. We should probably not compare dependencies as strings but rather in some other way.
This is considered as mirror bug as it triggers only once after opkg usage and not after that.https://gitlab.nic.cz/turris/updater/updater/-/issues/320File hashes are now stored in `files-sha256sum` control file instead of `file...2022-02-16T16:40:58+01:00Karel KociFile hashes are now stored in `files-sha256sum` control file instead of `files-sha256`https://gitlab.nic.cz/turris/updater/updater/-/issues/231Change how virtual works so that it just doesn't tries to install package it ...2021-12-03T17:35:16+01:00Karel KociChange how virtual works so that it just doesn't tries to install package it selfAt the moment if virtual package has some candidate then we fail. This makes no sense. In reality we should just ignore all candidates and just use package for dependencies nothing else. So error should probably become warning.At the moment if virtual package has some candidate then we fail. This makes no sense. In reality we should just ignore all candidates and just use package for dependencies nothing else. So error should probably become warning.Turris OS 3.x migrationhttps://gitlab.nic.cz/turris/updater/updater/-/issues/319Updater hangs waiting for zombie process2021-10-15T12:02:45+02:00Vojtech MyslivecUpdater hangs waiting for zombie processRunning `pkgupdate` interactively to upgrade from TOS 5.1.8 to TOS 5.2.1 and the updater hangs waiting for zombie process while running `mwan` postinstall script:
![Screenshot_from_2021-06-15_17-37-51](/uploads/c1bb5ff671ed4494a1933ae2e...Running `pkgupdate` interactively to upgrade from TOS 5.1.8 to TOS 5.2.1 and the updater hangs waiting for zombie process while running `mwan` postinstall script:
![Screenshot_from_2021-06-15_17-37-51](/uploads/c1bb5ff671ed4494a1933ae2e30b2763/Screenshot_from_2021-06-15_17-37-51.png)
It recovers itself somehow after several minutes but it takes too long in interactive mode IMO. Also, this happened to me several times already. I guess it's `mwan` package every time...
<details>
<summary>pkgupdate console log</summary>
```
root@factory02: ~ # pkgupdate
INFO:Target Turris OS: 5.2.1
INFO:Queue install of kernel/core/4.14.232-1-67f70e2f39f8e8859c56d42cced0b0b3
...
INFO:Queue install of luci-i18n-mwan3-en/luci/git-21.132.36199-d0cf6e4-1
...
INFO:Queue install of kmod-sit/core/4.14.232-1-67f70e2f39f8e8859c56d42cced0b0b3
INFO:Queue removal of dhparam
...
INFO:Queue removal of luasec
Press return to continue, CTRL+C to abort
INFO:Downloading packages
INFO:Executing preupdate hook: 05_schnapps.sh
Snapshot number 55 created
INFO:Unpacking download packages
INFO:Checking for file collisions between packages
INFO:Running pre-install and pre-rm scripts and merging packages to root file system
WARN:Config file /etc/config/openvpn modified by the user. Backing up the new one into /etc/config/openvpn-opkg
...
WARN:Config file /etc/mwan3.user modified by the user. Backing up the new one into /etc/mwan3.user-opkg
...
WARN:Config file /etc/config/foris modified by the user. Backing up the new one into /etc/config/foris-opkg
INFO:Running prerm of dhparam
...
INFO:Running prerm of luasec
INFO:Removing packages and leftover files
INFO:Running post-install and post-rm scripts
INFO:Running postinst of kernel
...
INFO:Running postinst of kmod-ipt-ipset
INFO:Running postinst of mwan3
...
<several minutes>
...
ip: invalid argument '0x3d00/0x3F00' to 'fwmark'
ip: invalid argument '0x3e00/0x3F00' to 'fwmark'
ip: invalid argument '0x3d00/0x3F00' to 'fwmark'
ip: invalid argument '0x3e00/0x3F00' to 'fwmark'
ip: invalid argument '0x100/0x3F00' to 'fwmark'
ip: invalid argument '0x3d00/0x3F00' to 'fwmark'
ip: invalid argument '0x3e00/0x3F00' to 'fwmark'
ip: invalid argument '0x3d00/0x3F00' to 'fwmark'
ip: invalid argument '0x3e00/0x3F00' to 'fwmark'
ip: invalid argument '0x200/0x3F00' to 'fwmark'
INFO:Running postinst of luci-compat
...
```
</details>https://gitlab.nic.cz/turris/updater/updater/-/issues/308Remove log files and provide info instead to hooks2021-10-06T15:11:42+02:00Karel KociRemove log files and provide info instead to hooksWe have preinstall and postinstall hooks. We can use that to replace task log files if we pass all required info to those hooks.We have preinstall and postinstall hooks. We can use that to replace task log files if we pass all required info to those hooks.https://gitlab.nic.cz/turris/updater/updater/-/issues/293Failed download produces error about uri_path called on scheme https2021-08-03T09:11:05+02:00Karel KociFailed download produces error about uri_path called on scheme https```
DEBUG:src/lib/download.c:53 (download_check_info):Download failed, trying again 3 (https://cynerd.cz/repo/turris/updater.lua): SSL certificate problem: certificate has expired
DEBUG:src/lib/download.c:53 (download_check_info):Downloa...```
DEBUG:src/lib/download.c:53 (download_check_info):Download failed, trying again 3 (https://cynerd.cz/repo/turris/updater.lua): SSL certificate problem: certificate has expired
DEBUG:src/lib/download.c:53 (download_check_info):Download failed, trying again 3 (https://cynerd.cz/repo/turris/updater.lua.sig): SSL certificate problem: certificate has expired
DEBUG:src/lib/download.c:53 (download_check_info):Download failed, trying again 2 (https://cynerd.cz/repo/turris/updater.lua): SSL certificate problem: certificate has expired
DEBUG:src/lib/download.c:53 (download_check_info):Download failed, trying again 2 (https://cynerd.cz/repo/turris/updater.lua.sig): SSL certificate problem: certificate has expired
DEBUG:src/lib/download.c:61 (download_check_info):Download failed (https://cynerd.cz/repo/turris/updater.lua): SSL certificate problem: certificate has expired
DIE:src/lib/uri.c:290 (uri_path):Called uri_path on URI of scheme: https
```
This is invalid error message and we should have failed that time already. We for some reason call `uri_path` on it instead of reporting error.https://gitlab.nic.cz/turris/updater/updater/-/issues/322Update from TOS 4.0.1 to 5.2.3 fails to finish2021-07-27T20:48:58+02:00Stepan RechnerUpdate from TOS 4.0.1 to 5.2.3 fails to finish# Summary
After an update from TOS 4.0.1, no UI is available. Web UI is unavailable, SSH refused. Reported on support (ticket 1361041: [turris nepřístupný přes web po akualizaci](https://rt.nic.cz/Ticket/Display.html?id=1361041), reprodu...# Summary
After an update from TOS 4.0.1, no UI is available. Web UI is unavailable, SSH refused. Reported on support (ticket 1361041: [turris nepřístupný přes web po akualizaci](https://rt.nic.cz/Ticket/Display.html?id=1361041), reproduced on Omnia.
# Steps To Reproduce
1. Re-flash Turris Omnia with Turris OS 4.0.1
2. Finish the first setting guide
3. Let the updater work
# Expected Result
Turris OS updates to the current version, and an automatic restart is set. After a restart, the current version is fully initialized.
# Actual Result
A restart of the router is triggered during an update and the update ends unfinished. After the reboot, DHCP and access to the Internet via Ethernet works, router UIs are not accessible, Wi-Fi is off. Only a pre-update snapshot is created, not a post-update. `pkgupdate` via a serial connection helps.https://gitlab.nic.cz/turris/updater/updater/-/issues/313Add FilesSignature2021-06-11T08:24:02+02:00Karel KociAdd FilesSignature`FilesSignature` should be same extension as `LinkSignature` but assembled from list of files.
Originally I thought that we do not need this but it turns out that sometimes patches do not bump version but add/remove files. This can caus...`FilesSignature` should be same extension as `LinkSignature` but assembled from list of files.
Originally I thought that we do not need this but it turns out that sometimes patches do not bump version but add/remove files. This can cause collision but only in existing installations. This can be in the end pretty hard to detect. We should cover this even when this does not happen so often because of that.https://gitlab.nic.cz/turris/updater/updater/-/issues/318Unify format of notifications2021-06-03T21:20:13+02:00Vojtech MyslivecUnify format of notificationsUnify format and appearance of Turris notifications with the changelog:
![Screenshot_from_2021-05-31_22-17-41](/uploads/43b28e784207d4701d41eec2cadc716d/Screenshot_from_2021-05-31_22-17-41.png)Unify format and appearance of Turris notifications with the changelog:
![Screenshot_from_2021-05-31_22-17-41](/uploads/43b28e784207d4701d41eec2cadc716d/Screenshot_from_2021-05-31_22-17-41.png)https://gitlab.nic.cz/turris/updater/updater/-/issues/316Newly installed packages configuration scripts are run as they would be an up...2021-05-27T10:22:40+02:00Karel KociNewly installed packages configuration scripts are run as they would be an upgradeDue to error in detection if package is already installed the configure step of package is always run with environment variable `PKG_UPGRADE=1`.
The effects are:
* No automatic service enable and thus not service is started
* Some other...Due to error in detection if package is already installed the configure step of package is always run with environment variable `PKG_UPGRADE=1`.
The effects are:
* No automatic service enable and thus not service is started
* Some other packages using this variable installed in running system might not be set properly.
This was introduced by turris/updater/updater!268 (f099f89de4eebdd610ffe155da1298da752ddbdf)https://gitlab.nic.cz/turris/updater/updater/-/issues/309wget missing after TOS 3->5 upgrade2021-05-26T19:58:17+02:00David Hopfmuellerwget missing after TOS 3->5 upgrade```
root@router:~# cat /etc/turris-version
3.11.19.1
root@router:~# opkg list-installed | grep wget
wget - 1.20.3-1
root@router:~#
```
After installing the tos3to4 package and initiating `pkgupdate` it does `INFO:Queue removal of wget` ...```
root@router:~# cat /etc/turris-version
3.11.19.1
root@router:~# opkg list-installed | grep wget
wget - 1.20.3-1
root@router:~#
```
After installing the tos3to4 package and initiating `pkgupdate` it does `INFO:Queue removal of wget` but never reinstalls it. As such, it leaves TOS 5.1.3 in a broken state without any chance to self-recover through updates.
Please let me know if you need any additional information, I can go back and forth between snapshots if required.