Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toltec-bootstrap #163

Merged
merged 28 commits into from
Dec 31, 2020
Merged

toltec-bootstrap #163

merged 28 commits into from
Dec 31, 2020

Conversation

Eeems
Copy link
Member

@Eeems Eeems commented Dec 27, 2020

Fix #140

@Eeems Eeems marked this pull request as ready for review December 28, 2020 00:33
@Eeems Eeems requested a review from raisjn December 28, 2020 01:26
@Eeems
Copy link
Member Author

Eeems commented Dec 28, 2020

Test scenarios

  1. Existing install should replace bootstrap and entware-reenable with the updated files
  2. Running entware-reenable should reinstall any packages that have files outside of /opt and /home/root that are in one of the repos (If you install an ipkg that isn't available it wont try to reinstall them).
  3. Running bootstrap will now install toltec-bootstrap

@LinusCDE
Copy link
Member

Gave it a quick test and it seems to work well. 👍

@LinusCDE
Copy link
Member

LinusCDE commented Dec 28, 2020

Maybe an issue

  1. Running entware-reenable should reinstall any packages that have files outside of /opt and /home/root that are in one of the repos (If you install an ipkg that isn't available it wont try to reinstall them).

Running entware-reenable seemed to reinstall everything. That doesn't seem to be the intended action according to what you said above.

Some packages also failed to install for me, though that might be because they could've been more up-to date custom files before for reviewing.

Log of ./entware-install
reMarkable: /home/root/ ./entware-reenable
Downloading https://bin.entware.net/armv7sf-k3.2/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
Downloading https://rmtestrepo.cosmos-ink.net/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/rmtestrepo
Downloading https://opkg.rmkit.dev/testing/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/rmkit-testing
Downloading https://toltec-dev.org/stable/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/toltec
Removing package appmarkable from root...
Removing package calculator from root...
Removing package chessmarkable from root...
Removing package erode from root...
Removing package fingerterm from root...
Removing package fret from root...
Removing package harmony from root...
Removing package koreader from root...
You may need to manually remove the application entry for KOReader in Oxide.
Removing package mines from root...
Removing package nao from root...
Removing package oxide from root...
Removing package plato from root...
Removing package recrossable from root...
Removing package remux from root...
Disabling remux
Removed /etc/systemd/system/multi-user.target.wants/remux.service.
Removing package retris from root...
Removing package rmservewacominput from root...
Removing package rot from root...
Removing package simple from root...
Removing package tarnish from root...
Disabling tarnish
Removing package whiteboard-hypercard from root...
Removing package xochitl from root...
Installing appmarkable (0.1.1-1) to root...
Downloading https://rmtestrepo.cosmos-ink.net/appmarkable_0.1.1-1_armv7-3.2.ipk
Installing calculator (0.0.0-12) to root...
Downloading https://toltec-dev.org/stable/calculator_0.0.0-12_armv7-3.2.ipk
Installing chessmarkable (0.5.1-1) to root...
Downloading https://rmtestrepo.cosmos-ink.net/chessmarkable_0.5.1-1_armv7-3.2.ipk
Installing draft (0.2.0-14) to root...
Downloading https://toltec-dev.org/stable/draft_0.2.0-14_armv7-3.2.ipk
Installing xochitl (0.0.0-1) to root...
Downloading https://toltec-dev.org/stable/xochitl_0.0.0-1_armv7-3.2.ipk
Installing erode (2.0.1~beta-2) to root...
Installing fingerterm (1.3.5-9) to root...
Downloading https://toltec-dev.org/stable/fingerterm_1.3.5-9_armv7-3.2.ipk
Installing fret (2.0.1~beta-2) to root...
Installing harmony (0.1.0-3) to root...
Downloading https://rmtestrepo.cosmos-ink.net/harmony_0.1.0-3_armv7-3.2.ipk
Installing koreader (2020.12-1) to root...
Downloading https://rmtestrepo.cosmos-ink.net/koreader_2020.12-1_armv7-3.2.ipk
Installing mines (0.1.0-2) to root...
Downloading https://rmtestrepo.cosmos-ink.net/mines_0.1.0-2_armv7-3.2.ipk
Installing nao (0.1.0-2) to root...
Downloading https://rmtestrepo.cosmos-ink.net/nao_0.1.0-2_armv7-3.2.ipk
Installing simple (0.1.0-2) to root...
Downloading https://rmtestrepo.cosmos-ink.net/simple_0.1.0-2_armv7-3.2.ipk
Installing oxide (2.0.1~beta-2) to root...
Installing plato (0.9.1-11) to root...
Downloading https://rmtestrepo.cosmos-ink.net/plato_0.9.1-11_armv7-3.2.ipk
Installing reboot-guard (1.0.1-2) to root...
Downloading https://toltec-dev.org/stable/reboot-guard_1.0.1-2_armv7-3.2.ipk
Installing python3-base (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-base_3.9.0-1_armv7-3.2.ipk
Installing libffi (3.3-2) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/libffi_3.3-2_armv7-3.2.ipk
Installing libuuid (2.36-2) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/libuuid_2.36-2_armv7-3.2.ipk
Installing libtirpc (1.2.6-2) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/libtirpc_1.2.6-2_armv7-3.2.ipk
Installing python3-light (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-light_3.9.0-1_armv7-3.2.ipk
Installing python3-unittest (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-unittest_3.9.0-1_armv7-3.2.ipk
Installing python3-ncurses (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-ncurses_3.9.0-1_armv7-3.2.ipk
Installing python3-ctypes (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-ctypes_3.9.0-1_armv7-3.2.ipk
Installing python3-pydoc (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-pydoc_3.9.0-1_armv7-3.2.ipk
Installing python3-logging (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-logging_3.9.0-1_armv7-3.2.ipk
Installing python3-decimal (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-decimal_3.9.0-1_armv7-3.2.ipk
Installing python3-multiprocessing (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-multiprocessing_3.9.0-1_armv7-3.2.ipk
Installing python3-codecs (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-codecs_3.9.0-1_armv7-3.2.ipk
Installing libgdbm (1.18.1-2) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/libgdbm_1.18.1-2_armv7-3.2.ipk
Installing python3-gdbm (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-gdbm_3.9.0-1_armv7-3.2.ipk
Installing libsqlite3 (3330000-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/libsqlite3_3330000-1_armv7-3.2.ipk
Installing python3-sqlite3 (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-sqlite3_3.9.0-1_armv7-3.2.ipk
Installing python3-email (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-email_3.9.0-1_armv7-3.2.ipk
Installing python3-urllib (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-urllib_3.9.0-1_armv7-3.2.ipk
Installing libexpat (2.2.10-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/libexpat_2.2.10-1_armv7-3.2.ipk
Installing python3-xml (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-xml_3.9.0-1_armv7-3.2.ipk
Installing python3-distutils (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-distutils_3.9.0-1_armv7-3.2.ipk
Installing python3-openssl (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-openssl_3.9.0-1_armv7-3.2.ipk
Installing python3-cgi (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-cgi_3.9.0-1_armv7-3.2.ipk
Installing python3-cgitb (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-cgitb_3.9.0-1_armv7-3.2.ipk
Installing libxml2 (2.9.10-2) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/libxml2_2.9.10-2_armv7-3.2.ipk
Installing libdb47 (4.7.25.4.NC-5) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/libdb47_4.7.25.4.NC-5_armv7-3.2.ipk
Installing python3-dbm (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-dbm_3.9.0-1_armv7-3.2.ipk
Installing python3-lzma (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-lzma_3.9.0-1_armv7-3.2.ipk
Installing python3-asyncio (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3-asyncio_3.9.0-1_armv7-3.2.ipk
Installing python3 (3.9.0-1) to root...
Downloading https://bin.entware.net/armv7sf-k3.2/python3_3.9.0-1_armv7-3.2.ipk
Installing recrossable (0.0.0-2) to root...
Downloading https://toltec-dev.org/stable/recrossable_0.0.0-2_armv7-3.2.ipk
Installing remarkable-splash (1.0-1) to root...
Downloading https://toltec-dev.org/stable/remarkable-splash_1.0-1_armv7-3.2.ipk
Installing remux (0.1.3-1) to root...
Downloading https://rmtestrepo.cosmos-ink.net/remux_0.1.3-1_armv7-3.2.ipk
Installing retris (0.6.1-1) to root...
Downloading https://rmtestrepo.cosmos-ink.net/retris_0.6.1-1_armv7-3.2.ipk
Installing rmservewacominput (0.2.5-8) to root...
Downloading https://toltec-dev.org/stable/rmservewacominput_0.2.5-8_armv7-3.2.ipk
Installing rot (1.0.0) to root...
Downloading https://toltec-dev.org/stable/rot_1.0.0_armv7-3.2.ipk
Installing tarnish (2.0.1~beta-2) to root...
Package simple (0.1.0-2) installed in root is up to date.
Installing tarnish (2.0.1~beta-2) to root...
Installing vnsee (0.3.0-1) to root...
Downloading https://toltec-dev.org/stable/vnsee_0.3.0-1_armv7-3.2.ipk
Installing whiteboard-hypercard (0.3.0-1) to root...
Downloading https://toltec-dev.org/stable/whiteboard-hypercard_0.3.0-1_armv7-3.2.ipk
Package xochitl (0.0.0-1) installed in root is up to date.
Configuring mines.
Configuring python3-base.
Configuring libffi.
Configuring libuuid.
Configuring libtirpc.
Configuring python3-light.
Configuring python3-email.
Configuring python3-urllib.
Configuring python3-pydoc.
Configuring xochitl.
Configuring python3-cgi.
Configuring python3-cgitb.
Configuring python3-decimal.
Configuring libexpat.
Configuring python3-xml.
Configuring appmarkable.
Configuring rmservewacominput.
Configuring libxml2.
Configuring plato.
Configuring python3-ncurses.
Configuring python3-distutils.
Configuring koreader.
Configuring python3-codecs.
Configuring simple.
Configuring python3-multiprocessing.
Configuring whiteboard-hypercard.
Configuring retris.
Configuring recrossable.
Configuring python3-unittest.
Configuring python3-ctypes.
Configuring python3-logging.
Configuring libgdbm.
Configuring python3-gdbm.
Configuring libsqlite3.
Configuring python3-sqlite3.
Configuring python3-openssl.
Configuring libdb47.
Configuring python3-dbm.
Configuring python3-lzma.
Configuring python3-asyncio.
Configuring python3.
Configuring harmony.
Configuring calculator.
Configuring remarkable-splash.
Configuring remux.

Run the following command(s) to use remux as your launcher
$ systemctl enable --now remux

Configuring reboot-guard.
Configuring nao.
Configuring fingerterm.
Configuring chessmarkable.
Configuring vnsee.
Configuring draft.

Run the following command(s) to use draft as your launcher
$ systemctl enable --now draft

Collected errors:
 * opkg_download_pkg: Package erode is not available from any configured src.
 * opkg_install_pkg: Failed to download erode. Perhaps you need to run 'opkg update'?
 * opkg_install_cmd: Cannot install package erode.
 * opkg_download_pkg: Package fret is not available from any configured src.
 * opkg_install_pkg: Failed to download fret. Perhaps you need to run 'opkg update'?
 * opkg_install_cmd: Cannot install package fret.
 * opkg_download_pkg: Package oxide is not available from any configured src.
 * opkg_install_pkg: Failed to download oxide. Perhaps you need to run 'opkg update'?
 * opkg_install_cmd: Cannot install package oxide.
 * opkg_download_pkg: Package tarnish is not available from any configured src.
 * opkg_install_pkg: Failed to download tarnish. Perhaps you need to run 'opkg update'?
 * opkg_install_cmd: Cannot install package rot.
 * opkg_download_pkg: Package tarnish is not available from any configured src.
 * opkg_install_pkg: Failed to download tarnish. Perhaps you need to run 'opkg update'?
 * opkg_install_cmd: Cannot install package tarnish.
xargs: opkg: exited with status 255; aborting

@Eeems
Copy link
Member Author

Eeems commented Dec 28, 2020

Hmm, when I tested earlier it was working for me. Could you run the reinstall commands without the opkg call to see what it reports needs to be reinstalled for you? For me it was just reinstalling two packages.

Edit: I should also add some logic to keep from installing packages where the version isn't available anymore. Maybe add an opkg update && opkg upgrade?

@raisjn
Copy link
Contributor

raisjn commented Dec 28, 2020

this mostly worked for me, it guessed i had draft, rm2fb and oxide installed (but not remux? need to look into that). it didn't reinstall a bunch of packages like it did for linus, just the three named ones

@Eeems
Copy link
Member Author

Eeems commented Dec 28, 2020

I think what @LinusCDE is running into is that he's got versions of packages that aren't out yet, so it's not able to find the correct version yet. It should be simple enough to filter it out though. I'll be home from house shopping soon, so I'll take a look at the extra filtering.

@LinusCDE
Copy link
Member

I think what @LinusCDE is running into is that he's got versions of packages that aren't out yet, so it's not able to find the correct version yet. It should be simple enough to filter it out though. I'll be home from house shopping soon, so I'll take a look at the extra filtering.

That could well be. Though it reinstall basically everything for me. Running it a second time does pretty much the same except the entware packages. Also many packages were pulled from my or other peoples servers since I have a lot of them in.

It may also be that I ran bootstrap which switched testing to stable for me and than it may have found a lot more version differences than I probably have anyway.

@LinusCDE
Copy link
Member

The script seems to cause all kinds of problems for me. Just ran it again and the device suddenly rebooted and the screen stayed white (probably after the normal starting screen). The last thing it did was configuring draft (didn't even know I had it installed). I sshd in and it seemed that it had switched off remux and enabled tarnish. Enabling remux --now did nothing (disabled --now tarnish before) and when I rebootet the devices failsafe probably triggered since the ssh key changed, but my xochitl version got downgraded to 2.4.1.30 (most likely switched to backup roofs).

Gonna take a break for today. I'm probably not the most normal user when it comes to repos and stuff, but the script seems to hate me in particular.

@Eeems
Copy link
Member Author

Eeems commented Dec 28, 2020

The script seems to cause all kinds of problems for me. Just ran it again and the device suddenly rebooted and the screen stayed white (probably after the normal starting screen). The last thing it did was configuring draft (didn't even know I had it installed). I sshd in and it seemed that it had switched off remux and enabled tarnish. Enabling remux --now did nothing (disabled --now tarnish before) and when I rebootet the devices failsafe probably triggered since the ssh key changed, but my xochitl version got downgraded to 2.4.1.30 (most likely switched to backup roofs).

Gonna take a break for today. I'm probably not the most normal user when it comes to repos and stuff, but the script seems to hate me in particular.

It shouldn't have enabled anything, our install scripts don't do that. Likely it was just switching to the other root partition which had tarnish installed. Could you next time just try running the code manually without the opkg install --force-reinstall portion to see what it would list instead of actually running the reinstall:

# Get the list of installed packages with files on root
packages=$(opkg list-installed | awk '{print $1}' | while read -r pkg; do opkg files "$pkg" | grep -v /opt | grep -v "is installed on root" | grep -v /home/root | awk "{print \"$pkg\",\$0}"; done | awk '{print $1}' | uniq)
# Get the list of packages that can be installed
available_packages=$(gunzip -c /opt/var/opkg-lists/* | grep Package: | awk '{print $2}' | uniq)
# Reinstall all packages that have files on root that are available to install
echo "${packages[@]}" "${available_packages[@]}" | sed 's/ /\n/g' | sort | uniq -d

@LinusCDE
Copy link
Member

It shouldn't have enabled anything, our install scripts don't do that.

Not sure why, but it seemed to do so. Maybe it was due to some file errors. The switch to 2.4 happened after that. So it was not a result of that.

After that downgrade, I let the device upgrade again and ran the script again to get me set up. I have the logs this time. It did the same thing (aside from differing logs and maybe errors if not mistaken). The device automatically rebooted for some reason, had a white screen (maybe some packages disabled xochitl but no one enabled itself?). After not doing a thing, it started downgrading again. Gonna upgrade it again...

Logs
reMarkable: /home/root/ ./entware-reenable
Downloading https://bin.entware.net/armv7sf-k3.2/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
Downloading https://rmtestrepo.cosmos-ink.net/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/rmtestrepo
Downloading https://opkg.rmkit.dev/testing/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/rmkit-testing
Downloading https://toltec-dev.org/testing/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/toltec
Removing package appmarkable from root...
Removing package calculator from root...
Removing package chessmarkable from root...
Removing package draft from root...
Disabling draft
Failed to disable unit: Unit file draft.service does not exist.
You can force removal of packages with failed prerm scripts with the option:
        --force-remove
Removing package erode from root...
Removing package fingerterm from root...
Removing package fret from root...
Removing package harmony from root...
Removing package koreader from root...
You may need to manually remove the application entry for KOReader in Oxide.
Removing package micro from root...
Removing package mines from root...
Removing package nao from root...
Removing package oxide from root...
Removing package plato from root...
Removing package reboot-guard from root...
Failed to disable unit: Unit file rguard.service does not exist.
You can force removal of packages with failed prerm scripts with the option:
        --force-remove
Removing package recrossable from root...
Removing package remarkable-splash from root...
Removing package remux from root...
Disabling remux
Failed to disable unit: Unit file remux.service does not exist.
You can force removal of packages with failed prerm scripts with the option:
        --force-remove
Removing package retris from root...
Removing package rm2fb from root...
make sure to re-enable xochitl with 'systemctl enable xochitl --now'
and to disable / uninstall any launchers like draft, oxide or remux before
rebooting your tablet to complete the uninstallation
Removing package rmservewacominput from root...
Removing package rot from root...
Removing package simple from root...
Removing package tarnish from root...
Disabling tarnish
Failed to disable unit: Unit file tarnish.service does not exist.
You can force removal of packages with failed prerm scripts with the option:
        --force-remove
Removing package vnsee from root...
Removing package whiteboard-hypercard from root...
Removing package xochitl from root...
Installing appmarkable (0.1.1-1) to root...
Downloading https://rmtestrepo.cosmos-ink.net/appmarkable_0.1.1-1_armv7-3.2.ipk
Installing calculator (0.0.0-12) to root...
Downloading https://toltec-dev.org/testing/calculator_0.0.0-12_armv7-3.2.ipk
Installing chessmarkable (0.5.1-1) to root...
Downloading https://toltec-dev.org/testing/chessmarkable_0.5.1-1_armv7-3.2.ipk
Package draft (0.2.0-14) installed in root is up to date.
Installing erode (2.0.1~beta-2) to root...
Downloading https://toltec-dev.org/testing/erode_2.0.1~beta-2_armv7-3.2.ipk
Installing fingerterm (1.3.5-9) to root...
Downloading https://toltec-dev.org/testing/fingerterm_1.3.5-9_armv7-3.2.ipk
Installing fret (2.0.1~beta-2) to root...
Downloading https://toltec-dev.org/testing/fret_2.0.1~beta-2_armv7-3.2.ipk
Installing harmony (0.1.0-4) to root...
Downloading https://toltec-dev.org/testing/harmony_0.1.0-4_armv7-3.2.ipk
Installing koreader (2020.12-1) to root...
Downloading https://rmtestrepo.cosmos-ink.net/koreader_2020.12-1_armv7-3.2.ipk
Installing micro (2.0.8-1) to root...
Downloading https://toltec-dev.org/testing/micro_2.0.8-1_armv7-3.2.ipk
Installing mines (0.1.0-3) to root...
Downloading https://toltec-dev.org/testing/mines_0.1.0-3_armv7-3.2.ipk
Installing nao (0.1.0-3) to root...
Downloading https://toltec-dev.org/testing/nao_0.1.0-3_armv7-3.2.ipk
Installing simple (0.1.0-2) to root...
Downloading https://toltec-dev.org/testing/simple_0.1.0-2_armv7-3.2.ipk
Installing oxide (2.0.1~beta-2) to root...
Downloading https://toltec-dev.org/testing/oxide_2.0.1~beta-2_armv7-3.2.ipk
Installing xochitl (0.0.0-1) to root...
Downloading https://toltec-dev.org/testing/xochitl_0.0.0-1_armv7-3.2.ipk
Installing rot (1.0.0) to root...
Downloading https://toltec-dev.org/testing/rot_1.0.0_armv7-3.2.ipk
Installing plato (0.9.1-12) to root...
Downloading https://rmtestrepo.cosmos-ink.net/plato_0.9.1-12_armv7-3.2.ipk
Package reboot-guard (1.0.1-2) installed in root is up to date.
Installing recrossable (0.0.0-2) to root...
Downloading https://toltec-dev.org/testing/recrossable_0.0.0-2_armv7-3.2.ipk
Installing remarkable-splash (1.0-1) to root...
Downloading https://toltec-dev.org/testing/remarkable-splash_1.0-1_armv7-3.2.ipk
Package remux (0.1.3-1) installed in root is up to date.
Installing retris (0.6.1-1) to root...
Downloading https://toltec-dev.org/testing/retris_0.6.1-1_armv7-3.2.ipk
Installing rm2fb (1.0.0-1) to root...
Downloading https://toltec-dev.org/testing/rm2fb_1.0.0-1_armv7-3.2.ipk
Installing rmservewacominput (0.2.5-8) to root...
Downloading https://toltec-dev.org/testing/rmservewacominput_0.2.5-8_armv7-3.2.ipk
Package rot (1.0.0) installed in root is up to date.
Package simple (0.1.0-2) installed in root is up to date.
Package tarnish (2.0.1~beta-2) installed in root is up to date.
Installing vnsee (0.3.0-1) to root...
Downloading https://toltec-dev.org/testing/vnsee_0.3.0-1_armv7-3.2.ipk
Installing whiteboard-hypercard (0.3.0-1) to root...
Downloading https://toltec-dev.org/testing/whiteboard-hypercard_0.3.0-1_armv7-3.2.ipk
Package xochitl (0.0.0-1) installed in root is up to date.
Configuring mines.
Configuring fret.
Configuring xochitl.
Configuring rm2fb.
Created symlink /etc/systemd/system/multi-user.target.wants/rm2fb.service → /lib/systemd/system/rm2fb.service.
Created symlink /etc/systemd/system/xochitl.service.wants/rm2fb.service → /lib/systemd/system/rm2fb.service.
Configuring appmarkable.
Configuring rmservewacominput.
Configuring erode.
Configuring rot.
Configuring oxide.

Run the following command(s) to use oxide as your launcher
$ systemctl enable --now tarnish

Configuring plato.
Configuring koreader.
Configuring simple.
Configuring whiteboard-hypercard.
Configuring retris.
Configuring recrossable.
Configuring harmony.
Configuring calculator.
Configuring remarkable-splash.
Configuring micro.
Configuring nao.
Configuring fingerterm.
Configuring chessmarkable.
Configuring vnsee.
Collected errors:
 * pkg_run_script: package "draft" prerm script returned status 1.
 * opkg_remove_pkg: not removing package "draft", prerm script failed
 * pkg_run_script: package "reboot-guard" prerm script returned status 1.
 * opkg_remove_pkg: not removing package "reboot-guard", prerm script failed
 * pkg_run_script: package "remux" prerm script returned status 1.
 * opkg_remove_pkg: not removing package "remux", prerm script failed
 * pkg_run_script: package "tarnish" prerm script returned status 1.
 * opkg_remove_pkg: not removing package "tarnish", prerm script failed

I'll run the stable bootstrap next time and then do the renable with your suggested changes.

@LinusCDE
Copy link
Member

I have now restored to the device to seemingly normal working state (reenabled with official bootstrap script, reinstalled oxide + deps, remux and removed draft). Enabled oxide and disabled xochitl.

Could you next time just try running the code manually without the opkg install --force-reinstall portion to see what it would list instead of actually running the reinstall: [...]

Output (with older script)
reMarkable: /home/root/ ./entware-reenable 
Downloading https://bin.entware.net/armv7sf-k3.2/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
Downloading https://rmtestrepo.cosmos-ink.net/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/rmtestrepo
Downloading https://opkg.rmkit.dev/testing/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/rmkit-testing
Downloading https://toltec-dev.org/stable/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/toltec
appmarkable
calculator
chessmarkable
draft
erode
fingerterm
fret
harmony
koreader
mines
nao
oxide
plato
reboot-guard
recrossable
remarkable-splash
remux
retris
rm2fb
rmservewacominput
rot
simple
tarnish
vnsee
whiteboard-hypercard
xochitl

Ran the new entware-renable script (79c43b7):

Seemed ok and reinstalled fewer packages. (Lost the output due to next).

It restarted again, ended up at white screen and after some time rebooted to downgrade. While this happened though I tried to (re)start tarnish and xochitl some times and go this interesting log from xochitl via journalctl:

Dec 28 22:52:00 reMarkable systemd[1]: Started reMarkable main application.
Dec 28 22:52:00 reMarkable xochitl[308]: Unable to find update fn
Dec 28 22:52:00 reMarkable xochitl[308]: PLEASE SEE https://github.com/ddvk/remarkable2-framebuffer/issues/18
Dec 28 22:52:00 reMarkable systemd[1]: xochitl.service: Main process exited, code=dumped, status=6/ABRT
Dec 28 22:52:00 reMarkable systemd[1]: xochitl.service: Failed with result 'core-dump'.
Dec 28 22:52:00 reMarkable systemd[1]: xochitl.service: Triggering OnFailure= dependencies.
Dec 28 22:52:01 reMarkable systemd[1]: xochitl.service: Service hold-off time over, scheduling restart.
Dec 28 22:52:01 reMarkable systemd[1]: xochitl.service: Scheduled restart job, restart counter is at 1.
Dec 28 22:52:01 reMarkable systemd[1]: Stopped reMarkable main application.
Dec 28 22:52:01 reMarkable systemd[1]: Started reMarkable main application.
Dec 28 22:52:01 reMarkable xochitl[313]: Unable to find update fn
Dec 28 22:52:01 reMarkable xochitl[313]: PLEASE SEE https://github.com/ddvk/remarkable2-framebuffer/issues/18
Dec 28 22:52:01 reMarkable systemd[1]: xochitl.service: Main process exited, code=dumped, status=6/ABRT
Dec 28 22:52:01 reMarkable systemd[1]: xochitl.service: Failed with result 'core-dump'.
Dec 28 22:52:01 reMarkable systemd[1]: xochitl.service: Triggering OnFailure= dependencies.
Dec 28 22:52:01 reMarkable systemd[1]: xochitl.service: Service hold-off time over, scheduling restart.
Dec 28 22:52:01 reMarkable systemd[1]: xochitl.service: Scheduled restart job, restart counter is at 2.
Dec 28 22:52:01 reMarkable systemd[1]: Stopped reMarkable main application.
Dec 28 22:52:01 reMarkable systemd[1]: Started reMarkable main application.
Dec 28 22:52:01 reMarkable xochitl[315]: Unable to find update fn
Dec 28 22:52:01 reMarkable xochitl[315]: PLEASE SEE https://github.com/ddvk/remarkable2-framebuffer/issues/18
Dec 28 22:52:01 reMarkable systemd[1]: xochitl.service: Main process exited, code=dumped, status=6/ABRT
Dec 28 22:52:01 reMarkable systemd[1]: xochitl.service: Failed with result 'core-dump'.
Dec 28 22:52:01 reMarkable systemd[1]: xochitl.service: Triggering OnFailure= dependencies.
Dec 28 22:52:01 reMarkable systemd[1]: xochitl.service: Service hold-off time over, scheduling restart.
Dec 28 22:52:02 reMarkable systemd[1]: xochitl.service: Scheduled restart job, restart counter is at 3.
Dec 28 22:52:02 reMarkable systemd[1]: Stopped reMarkable main application.
Dec 28 22:52:02 reMarkable systemd[1]: Started reMarkable main application.
Dec 28 22:52:02 reMarkable xochitl[317]: Unable to find update fn
Dec 28 22:52:02 reMarkable xochitl[317]: PLEASE SEE https://github.com/ddvk/remarkable2-framebuffer/issues/18
Dec 28 22:52:02 reMarkable systemd[1]: xochitl.service: Main process exited, code=dumped, status=6/ABRT
Dec 28 22:52:02 reMarkable systemd[1]: xochitl.service: Failed with result 'core-dump'.
Dec 28 22:52:02 reMarkable systemd[1]: xochitl.service: Triggering OnFailure= dependencies.
Dec 28 22:52:02 reMarkable systemd[1]: xochitl.service: Service hold-off time over, scheduling restart.
Dec 28 22:52:02 reMarkable systemd[1]: xochitl.service: Scheduled restart job, restart counter is at 4.
Dec 28 22:52:02 reMarkable systemd[1]: Stopped reMarkable main application.
Dec 28 22:52:02 reMarkable systemd[1]: xochitl.service: Start request repeated too quickly.
Dec 28 22:52:02 reMarkable systemd[1]: xochitl.service: Failed with result 'core-dump'.
Dec 28 22:52:02 reMarkable systemd[1]: Failed to start reMarkable main application.
Dec 28 22:52:02 reMarkable systemd[1]: xochitl.service: Triggering OnFailure= dependencies.

So it's not an direct issue with the reenable-script but the rm2fb server. Didn't know that it would even get used on the rM 1. @raisjn

@Eeems
Copy link
Member Author

Eeems commented Dec 28, 2020

You shouldn't have rm2fb installed on an rM1. That's likely the issue. Did you have the other packages installed to begin with?

@raisjn
Copy link
Contributor

raisjn commented Dec 29, 2020

after looking at the script, i think the logic for detecting overlap is not specific enough. my hypothesis for what happened with linus is that the line for detecting which packages are installed and have files on the root partition picked up duplicate packages because of the multiple repositories (or maybe another reason) and many packages were seen as needing to be re-installed.

rm2fb might have been in two repositories (his local testing repo and the official toltec testing repo, for example) and therefore installed on his machine. (and this would explain the mystery of how rm2fb got there at all).

recommendation: do set intersection another way

@LinusCDE
Copy link
Member

The crashes/downgrades really seemed to be that some version of the entware-reenable script from this PR, installed it. I never noticed it and removed it, so subsequent scripts might have reenabled all the hooks that lead to a crash on the next reboot. Though I'm still now sure why the device rebooted at all. (Maybe also rm2fb's doing?)

@Eeems
Copy link
Member Author

Eeems commented Dec 29, 2020

after looking at the script, i think the logic for detecting overlap is not specific enough. my hypothesis for what happened with linus is that the line for detecting which packages are installed and have files on the root partition picked up duplicate packages because of the multiple repositories (or maybe another reason) and many packages were seen as needing to be re-installed.

Should be easy enough to remove duplicates of the same version if there are duplicate repos.

EDIT: Actually the $available_packages list already does a sort | uniq which should filter out any duplicates of different versions. The intersection should then only find packages of the same version. So if two repos contain different versions of the package it should still only report it if it matches one that's installed.

@Eeems Eeems requested a review from LinusCDE December 30, 2020 05:12
@Eeems Eeems requested a review from raisjn December 31, 2020 00:45
Copy link
Member

@LinusCDE LinusCDE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems a lot better now.

Running while everything is installed
reMarkable: /home/root/ ./entware-reenable 
Downloading https://bin.entware.net/armv7sf-k3.2/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
Downloading https://rmtestrepo.cosmos-ink.net/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/rmtestrepo
Downloading https://opkg.rmkit.dev/testing/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/rmkit-testing
Downloading https://toltec-dev.org/testing/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/toltec
Removing package dotnet-profile from root...
Removing package reboot-guard from root...
Failed to disable unit: Unit file rguard.service does not exist.
You can force removal of packages with failed prerm scripts with the option: 
        --force-remove
Removing package remux from root...
Disabling remux
Removing package tarnish from root...
Disabling tarnish
Removed /etc/systemd/system/multi-user.target.wants/tarnish.service.
Installing dotnet-profile (3.1.10-1) to root...
Downloading https://toltec-dev.org/testing/dotnet-profile_3.1.10-1_armv7-3.2.ipk
Package reboot-guard (1.0.1-2) installed in root is up to date.
Installing remux (0.1.3-1) to root...
Downloading https://toltec-dev.org/testing/remux_0.1.3-1_armv7-3.2.ipk
Installing tarnish (2.0.1~beta-2) to root...
Downloading https://toltec-dev.org/testing/tarnish_2.0.1~beta-2_armv7-3.2.ipk
Configuring tarnish.
Configuring remux.

Run the following command(s) to use remux as your launcher
$ systemctl enable --now remux

Configuring dotnet-profile.
Make sure to source /etc/profile.d/dotnet-profile.sh before running dotnet
Collected errors:
 * pkg_run_script: package "reboot-guard" prerm script returned status 1.
 * opkg_remove_pkg: not removing package "reboot-guard", prerm script failed

Reactivating after unmounting /opt and the service worked good as well (pretty much the same output as above).

Seems pretty stable now. 👍

@Eeems
Copy link
Member Author

Eeems commented Dec 31, 2020

Looks like reboot-guard's preremove script needs a tweak. I'll do that in another PR.

@Eeems Eeems merged commit 8e35773 into testing Dec 31, 2020
@Eeems Eeems deleted the Eeems-patch-2 branch December 31, 2020 19:46
LinusCDE pushed a commit that referenced this pull request Jan 4, 2021
* add toltec-bootstrap package
@matteodelabre matteodelabre added the packages Add or improve packages of the repository label Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages Add or improve packages of the repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add toltec-bootstrap package to allow updating bootstrap code
4 participants