Migrace updater na Turrisu HW verze 1.x

tohle šlo pryč:

INFO:Queue removal of updater-deps
INFO:Queue removal of libmysqlclient
INFO:Queue removal of userspace_time_sync
INFO:Queue removal of updater-consolidator
INFO:Queue removal of updater
INFO:Queue removal of coova-chilli

tady potom jedna chybka:

INFO:Executing preupdate hooks…
WARN:Config file /etc/config/updater modified by the user. Backing up the new on e into /etc/config/updater-opkg
Output from luci-app-sqm.postinst:
uci: Parse error (invalid command) at line 92, byte 4
INFO:Executing postupdate hooks…

a teď už jen tohle :

updater.sh
WARN:Script revision-specific not found, but ignoring its absence as requested
WARN:Script serial-specific not found, but ignoring its absence as requested
WARN:Lock on //var/lock/opkg.lock released by garbage collector

tak uvidíme až bude automatický update :slight_smile:

ale je pravada, že při aktualizaci na 3.3 jsem musel udělat obnovu z SD a přechod na UBIFS, páč se mi celý Turris zbořil a aktualizace se pokoušela dělat pořád dokola …

Jo, u mě stejné, už jsem to tam psal…
EDIT: veškeré problémy vyřešil restart, už je vše v pořádku…

Také mi již updater.sh vyhazuje chyby:

WARN:Script revision-specific not found, but ignoring its absence as requested
WARN:Script serial-specific not found, but ignoring its absence as requested
WARN:Lock on //var/lock/opkg.lock released by garbage collector

Během instalace vyskočilo akorát:
WARN:Config file /etc/config/updater modified by the user. Backing up the new one into /etc/config/updater-opkg
Output from luci-app-sqm.postinst:
uci: Parse error (invalid command) at line 92, byte 4
INFO:Executing postupdate hooks…

Reset nepomáhá :frowning:

WARN: máme ignorovat… To není chyba…

Sděluji, že u mne (TurrisOS 3.5) až na pár warningů proběhl upgrade updateru úspěšně.

Update proběhl v pořádku, updater.sh -n také a echo $? ukázalo 0. Takže já do toho šťourat nebudu :slight_smile:

Log: http://pastebin.com/R7wG6dPy

DIE:
[string “transaction”]:310: [string “transaction”]:143: Collisions:
• /etc/config/updater: updater-ng (new), updater (existing)
• /usr/bin/updater-wipe.sh: updater-ng (new), updater (existing)
• /usr/bin/updater-unstuck.sh: updater-ng (new), updater (existing)
• /etc/init.d/updater: updater-ng (new), updater (existing)
• /usr/bin/updater.sh: updater-ng (new), updater (existing)
• /etc/ssl/updater.pem: updater-ng (new), updater (existing)
Aborted

Vyřešil jsem přes: opkg remove updater --force-removal-of-dependent-packages

Pak jsem zkoušel znovu updater-migrate.sh (to psalo, že to proběhlo) a tak jsem ještě jednou raději provedl: opkg update a updater.sh nebyl nalezený, tak jsem ho nainstaloval přes opkg installl updater-ng (log: http://pastebin.com/41jhqEcf )

Spustil jsem updater.sh a log: http://pastebin.com/ncwpvNLv

– snip –

Output from fontconfig.postinst:
/usr/share/fonts: failed to write cache
/usr/share/fonts/ghostscript: failed to write cache
/usr/share/fonts/ghostscript/fonts: failed to write cache
/usr/share/fonts: failed to write cache
/usr/share/fonts/ghostscript: failed to write cache
/usr/share/fonts/ghostscript/fonts: failed to write cache
Output from ghostscript-fonts-std.postinst:
/usr/share/fonts: failed to write cache
/usr/share/fonts/ghostscript: failed to write cache
/usr/share/fonts/ghostscript/fonts: failed to write cache
Output from ghostscript-gnu-gs-fonts-other.postinst:
/usr/share/fonts: failed to write cache
/usr/share/fonts/ghostscript: failed to write cache
/usr/share/fonts/ghostscript/fonts: failed to write cache
Output from luci-app-sqm.postinst:
uci: Parse error (invalid command) at line 92, byte 4

Znovu jsem spustil opkg update a updater.sh a už by to mělo být v pořádku:

root@turris:~# updater.sh
WARN:Script revision-specific not found, but ignoring its absence as requested
WARN:Script serial-specific not found, but ignoring its absence as requested
WARN:Lock on //var/lock/opkg.lock released by garbage collector

@Pepe, tohle by myslím zrovna stálo za to poslat na tech.support@turris.cz
Update updateru na updater-ng by správně mělo proběhnout na jeden běh toho shellovského scriptu

Měl jsem zmínit v příspěvku, že jsem v 17:16 jim to tam odeslal.

1 Like

Tak to jo! Pak je to v pořádku :+1:

1 Like

Kdepak asi udelali soudruzi z NDR chybu? Ze by problem ve zmene URL serveru?

root@turris:~# updater-migrate.sh

  • grep -q -e – Auto-migration performed /etc/updater/auto.lua
  • BATCH=
  • uci -q get updater.override.branch
  • true
  • BRANCH=
  • [ -z ]
    • sed -e s#.openwrt-repo/##;s#/.##
      grep ^src/gz.*/base$ /etc/opkg/distfeeds.conf
  • BRANCH=src
    • sed -e s/^omnia-//;s/^turris-//
      echo src
  • BRANCH=src
  • [ src = turris -o src = omnia ]
  • [ src ]
  • uci set updater.override=override
  • uci set updater.override.branch=src
  • uci commit updater
  • pkgmigrate --exclude=updater --exclude=updater-migrate --exclude=updater-deps --exclude=updater-consolidator --exclude=libelf --exclude=mtd-utils-flash-info --exclude=kmod-ipt-nathelper --exclude=6relayd --exclude=kmod-ipv6 --exclude=init-thermometer --exclude=kmod-crypto-aes --exclude=kmod-crypto-core --exclude=luci-i18n-czech --exclude=luci-i18n-english --exclude=coova-chilli --exclude=libevent --exclude=libmysqlclient --exclude=libncursesw --exclude=r8196-firmware --exclude=r8188eu-firmware --exclude=userspace_time_sync --exclude=foris-oldconfig
    WARN:Branch overriden to src
    line not found
    line not found
    line not found
    DIE:
    unreachable: https://api.turris.cz/updater-defs/3.5.2/turris/src/base.lua: curl: (22) The requested URL returned error: 404 Not Found

Aborted

Písněte jim to na email. Zminte tam updater a ozvou se dnes/zítra.
Mně odpověděli hned druhý den, protože jsem email posílal večer.

Ta adresa má být https://api.turris.cz/updater-defs/3.5.2/turris/rc/base.lua soudruzi z NDR se nejspíše upsali v definici adresáře, nejspíše má být všude ve skriptu rc ne src.

Primo v tom skriptu to neni, kdovi odkud to nacita.

Oprava 404 chyby.

uci -q set updater.override.branch=“rc”

Opravil jsem si to rucne v /etc/config/updater, nicmene po spusteni skriptu mi to vraci 1 a ne nulu.

root@turris:~# updater.sh -n
+ [ -n = -w ]
+ WAIT_FOR_ONLINE=180
+ dirname /usr/bin/updater.sh
+ LIB_DIR=/usr/bin
+ . /usr/bin/updater-worker.sh
+ . /usr/bin/updater-utils.sh
+ PID=29452
+ PROGRAM=updater
+ FAILSAFE_MODE=false
+ TMP_DIR=/tmp/update
+ PKG_DIR=/tmp/update/packages
+ CIPHER=aes-256-cbc
+ COOLDOWN=3
+ CERT=/etc/ssl/updater.pem
+ CRL=/etc/ssl/crl.pem
+ STATE_DIR=/tmp/update-state
+ STATE_FILE=/tmp/update-state/state
+ LOG_FILE=/tmp/update-state/log2
+ PLAN_FILE=/tmp/update-state/plan
+ LOCK_DIR=/tmp/update-state/lock
+ QUEUE=
+ uci -q get updater.override.branch
+ ID=rc
+ uci -q get updater.override.revision
+ atsha204cmd hw-rev
+ REVISION=00000009
+ uci -q get updater.override.generation
+ sed -e s/\..*/\// /etc/turris-version
+ GENERATION=3/
+ uci -q get updater.override.base_url
+ echo https://api.turris.cz/updater-repo/
+ BASE_URL=https://api.turris.cz/updater-repo/
+ uci -q get updater.override.hash_url
+ echo https://api.turris.cz/hashes/
+ HASH_URL=https://api.turris.cz/hashes/
+ BASE_URL=https://api.turris.cz/updater-repo/3/00000009
+ uci -q get updater.override.list_req_url
+ echo https://api.turris.cz/getlists.cgi
+ LIST_REQ=https://api.turris.cz/getlists.cgi
+ uci -q get updater.override.disable
+ echo false
+ DISABLED=false
+ false
+ GENERIC_LIST_URL=https://api.turris.cz/updater-repo/3/00000009/lists/generic
+ SPECIFIC_LIST_URL=https://api.turris.cz/updater-repo/3/00000009/lists/rc
+ PACKAGE_URL=https://api.turris.cz/updater-repo/3/00000009/packages
+ PID_FILE=/tmp/update-state/pid
+ BACKGROUND=false
+ EXIT_CODE=1
+ BASE_PLAN_FILE=/usr/share/updater/plan
+ [ -e /tmp/offline-update-ready ]
+ [ -n = -b ]
+ echo+ sed s|^https*://\([^/]*\)/.*|\1|
 https://api.turris.cz/updater-repo/3/00000009
+ PING_TEST_HOST=api.turris.cz
+ seq 1 180
+ ping -c 1 -w 1 api.turris.cz
+ break
+ [ -n = -r ]
+ /usr/bin/updater-wipe.sh
+ [ -d /tmp/update-state/lock ]
+ mkdir -p /tmp/update-state
+ mkdir /tmp/update-state/lock
+ echo 29452
+ echo startup
+ echo initial sleep
+ rm -f /tmp/update-state/log2 /tmp/update-state/last_error
+ touch /tmp/update-state/log2
+ false
+ STABLE_PACKAGES=/usr/share/updater/packages
+ STABLE_PLAN=/usr/share/updater/plan
+ trap rm -rf "$TMP_DIR" "$PID_FILE" "$LOCK_DIR" $STABLE_PACKAGES $STABLE_PLAN; exit "$EXIT_CODE" EXIT INT QUIT TERM ABRT
+ [ -n != -n ]
+ shift
+ mkdir -p /tmp/update
+ get-api-crl
+ cat /tmp/opkg-update-timestamp
+ LAST_UPDATE=1487071392
+ date +%s
+ DATE_NOW=1487073336
+ [ -z 1487071392 ]
+ expr 1487073336 - 1487071392
+ [ 1944 -gt 86400 ]
+ do_journal
+ [ -f /usr/share/updater/journal ]
+ echo get list
+ uci get updater.pkglists.lists
+ get_list_pack base core honeypot netutils majordomo dvb shell-utils cacerts luci-controls nas definitions
+ echo 3/00000009
+ [ rc != unknown-id ]
+ + uci -q get updater.override.branch
my_curl -T - https://api.turris.cz/getlists.cgi -X POST -f
+ curl --compress --cacert /etc/ssl/updater.pem --crlfile /etc/ssl/crl.pem -T - https://api.turris.cz/getlists.cgi -X POST -f
+ [ -z rc ]
+ SERIAL=rc
+ echo rc
+ mkdir -p /tmp/updater-lists
+ [ base ]
+ [ -f /tmp/updater-lists/base ]
+ HASH=-
+ echo base -
+ shift
+ [ core ]
+ [ -f /tmp/updater-lists/core ]
+ HASH=-
+ echo core -
+ shift
+ [ honeypot ]
+ [ -f /tmp/updater-lists/honeypot ]
+ HASH=-
+ echo honeypot -
+ shift
+ [ netutils ]
+ [ -f /tmp/updater-lists/netutils ]
+ HASH=-
+ echo netutils -
+ shift
+ [ majordomo ]
+ [ -f /tmp/updater-lists/majordomo ]
+ HASH=-
+ echo majordomo -
+ shift
+ [ dvb ]
+ [ -f /tmp/updater-lists/dvb ]
+ HASH=-
+ echo dvb -
+ shift
+ [ shell-utils ]
+ [ -f /tmp/updater-lists/shell-utils ]
+ HASH=-
+ echo shell-utils -
+ shift
+ [ cacerts ]
+ [ -f /tmp/updater-lists/cacerts ]
+ HASH=-
+ echo cacerts -
+ shift
+ [ luci-controls ]
+ [ -f /tmp/updater-lists/luci-controls ]
+ HASH=-
+ echo luci-controls -
+ shift
+ [ nas ]
+ [ -f /tmp/updater-lists/nas ]
+ HASH=-
+ echo nas -
+ shift
+ [ definitions ]
+ [ -f /tmp/updater-lists/definitions ]
+ HASH=-
+ echo definitions -
+ shift
+ [  ]
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: unable to get certificate CRL
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
+ die Could not download list pack
+ echo error
+ echo Could not download list pack
+ echo Could not download list pack
Could not download list pack
+ my_logger -p daemon.err
+ + echo Could not download list pack
logger -t updater -p daemon.err
+ kill -SIGABRT 29452
+ rm -rf /tmp/update /tmp/update-state/pid /tmp/update-state/lock /usr/share/updater/packages /usr/share/updater/plan
+ exit 1
+ rm -rf /tmp/update /tmp/update-state/pid /tmp/update-state/lock /usr/share/updater/packages /usr/share/updater/plan
+ exit 1
root@turris:~# echo $?
1

Takze evidentne problem s chybejicimi certifikaty, jak je zmineno zde:

Po jejich stazeni/instalaci uz updater.sh -n hlasil nulu.

Spusten tedy updater-migrate.sh, ktery plus minus probehl, jen sem tam nejaky WARN:
> WARN:Branch overriden to rc
> WARN:Script revision-specific not found, but ignoring its absence as requested
> WARN:Script serial-specific not found, but ignoring its absence as requested
> …
> WARN:Lock on //var/lock/opkg.lock released by garbage collector
> + exec pkgupdate
> WARN:Branch overriden to rc
> WARN:Script revision-specific not found, but ignoring its absence as requested
> WARN:Script serial-specific not found, but ignoring its absence as requested
> WARN:Couldn’t load flags: cannot open /usr/share/updater/flags: No such file or directory
> …
> WARN:Config file /etc/config/updater modified by the user. Backing up the new one into /etc/config/updater-opkg
> WARN:Config file /etc/config/transmission modified by the user. Backing up the new one into /etc/config/transmission-opkg
> Output from luci-app-sqm.postinst:
> uci: Parse error (invalid command) at line 157, byte 4
> uci: Parse error (invalid character in name field) at line 12, byte 24
> INFO:Executing postupdate hooks…
> root@turris:~#

Po opetovnem spusteni updater.sh pouze tyto WARN:

WARN:Script revision-specific not found, but ignoring its absence as requested
WARN:Script serial-specific not found, but ignoring its absence as requested
WARN:Multiple candidates from same repository with same version for package shairport-sync-openssl

Snad je tedy vse v poradku :slight_smile:

Tak jsem včera provedl migraci, nejsem si jistý, ale myslím si, že proběhla v pořádku, jen mám problém s tím, že před migrací jsem měl v Turrisu cca 65 MB místa a teď mám pouze 15 MB, nevíte, kde by mohl být problém? Děkuji

Než to všechno začneš řešit restartoval si Turrise?

Mělo by se to dát zjistit z logu updateru, který se nachází ve složce /usr/share/updater
Potom je důležité vědět, jestli si neměl balíček pro tiskárnu ( v návodu bylo, že se to má předtím odinstalovat)

Jinak tady je můj soubor installed-packages (bude se lišit, protože je z nightly) a když tak to zkus porovnat (třeba přes github) a zjistit, které balíčky máš navíc a odinstalovat je.

+ cat /tmp/update/user_lists/nas
+ run_plan /tmp/update-state/plan
+ . /tmp/update-state/plan
+ do_commit
+ [  ]
+ rm /tmp/update-state/plan
+ execute_list i_agree_datacollect
+ echo get list
+ get_list i_agree_datacollect user_lists/i_agree_datacollect
+ grep  MISSING$ /tmp/updater-lists/status
+ grep -qF i_agree_datacollect
+ die Missing list i_agree_datacollect
+ echo error
+ echo Missing list i_agree_datacollect
+ echo Missing list i_agree_datacollect
Missing list i_agree_datacollect
+ my_logger -p daemon.err
+ logger -t updater-user -p daemon.err
+ echo Missing list i_agree_datacollect
+ kill -SIGABRT 1671
+ rm -rf /tmp/update /tmp/update-state/pid /tmp/update-state/lock /usr/share/updater/packages /usr/share/updater/plan
+ exit 1
+ rm -rf /tmp/update /tmp/update-state/pid /tmp/update-state/lock /usr/share/updater/packages /usr/share/updater/plan
+ exit 1
root@turris:~# i_agree_datacollectMissing list i_agree_datacollect
-ash: i_agree_datacollectMissing: not found

Poradí někdo co s tím? Nebo napsat rovnou na podporu? :smiley: Díky.