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

[plato] Update to 0.9.17-1 #344

Merged
merged 8 commits into from
May 10, 2021

Conversation

LinusCDE
Copy link
Member

This update doesn't add any custom reMarkable functionality.

It does however handle a breaking change that happened with release 0.9.14 of the upstream plato. I ported the migration script from python to baseh (with jq as new dependency) but only support the default library location. In any case the user should get a warning anyway.

The migration messages may need some refinement. I'll probably do those tomorrow.

Tested it on the rM 1 and 2 (both with firmware 2.5.X). Is a 2.X toolchain required for the 2.6.X firmware? The other doesn't seem to work at least (using the package with 2.1 toolchain on a 2.5.X device) gives the following error:

reMarkable: ~/ rm2fb-client plato
./plato: /lib/libc.so.6: version `GLIBC_2.28' not found (required by ./plato)

If the 1.6 toolchain works on the 2.6.X firmware in that regard, I don't see a reason to update it yet since plato doesn't use QT.

Steps for testing:

  • Have 0.9.13 or earlier installed
  • Have some document in ~/plato-media that e.g. has some other last opened page
  • Update to this version
  • The update should automatically migrate the metadata and thus e.g. keep the last opened page
  • (It should not attempt to migrate an already up-to-date metadata file and warn if an "-old" variation was already created.)

(Some more info about this release can be found on my release page.)


P.S.: I'll hopefully be able to do more again in the coming days.

@LinusCDE LinusCDE added the packages Add or improve packages of the repository label Apr 18, 2021
@LinusCDE LinusCDE changed the title Update plato to 0.9.16-1 [plato] Update to 0.9.16-1 Apr 18, 2021
@LinusCDE LinusCDE marked this pull request as ready for review April 19, 2021 21:21
@LinusCDE
Copy link
Member Author

The messages should be alright now.

@LinusCDE LinusCDE force-pushed the feature/update-plato branch from 9f33524 to aaf5eac Compare May 2, 2021 14:56
@LinusCDE LinusCDE changed the title [plato] Update to 0.9.16-1 [plato] Update to 0.9.17-1 May 2, 2021
@LinusCDE LinusCDE marked this pull request as ready for review May 2, 2021 14:57
@LinusCDE LinusCDE requested a review from raisjn May 2, 2021 14:57
raisjn
raisjn previously approved these changes May 2, 2021
Comment on lines 108 to 113
echo ""
echo "In Plato 0.9.14 the metadata format for libraries changed."
echo "MANUAL INTERVENTION REQUIRED\!\!\!"
echo "Please follow the following guide to update your library metadata manually:"
echo "https://github.com/baskerville/plato/releases/tag/0.9.14"
echo "Please LAUNCH plato ONLY AFTER this was done\!"
Copy link
Contributor

Choose a reason for hiding this comment

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

i didn't go through this, i just blew it away and restarted. i think this should be done automatically (since it makes a backup, i think?) and the user notified

Copy link
Member

Choose a reason for hiding this comment

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

I agree, this should be done automagically by the package. It's one of the use-cases for pre/post upgrade scripts.

Copy link
Member Author

Choose a reason for hiding this comment

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

I used configure as I feared pre/post upgrade might miss cases where a user fully reinstalled a package. The script checks for old versions of the metadata and I attempted to make it check more often/reliably this way.

I can change this tomorrow though. Is still a good point.

Copy link
Contributor

Choose a reason for hiding this comment

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

i think i'm a bit confused. when i upgraded plato, i got the message (MANUAL INTERVENTION REQUIRED), but it looks like you automatically do the migration for people. Did I get that message because I didn't have any metadata?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this happened because you seem like you didn't do the migration but also have a .old (backup) file. I just didn't support that usecase and added that hint instead of trying to deal with it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also just looked at the docs:

When upgrading a package from version A to B, the following happens:

  • preupgrade B, if it exists, is called from version A
  • Old package files are removed (except configuration files)
  • postupgrade B, if it exists, is called from version A
  • New package files are unpacked and installed
  • configure, if it exists, is called from version B

If I read this correctly, calling postupgrade wouldn't make sense since it would only call if this package ever gets upgraded to a future one.

raisjn and others added 2 commits May 2, 2021 14:32
* Do not print/do anything if there’s no .metadata.json file
* Do the migration even if there’s already a .old file, by creating a unique backup file name
* Tell the user where the backup is stored
Copy link
Member

@matteodelabre matteodelabre left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @LinusCDE! I made some minor changes to the migration logic: to make the script only output a message if there is actually a migration to be done (i.e., if there is an existing .metadata.json file with the old format), and to make the backup copy have a randomly-generated extension, so that the migration works even if there’s already a file called .metadata.json.old. The rest of the PR looks good to me, I tested it on my rM2 with no issues.

@LinusCDE LinusCDE merged commit b44b5e6 into toltec-dev:testing May 10, 2021
@LinusCDE LinusCDE deleted the feature/update-plato branch June 3, 2021 10:45
matteodelabre added a commit that referenced this pull request Jun 4, 2021
* Update plato to 0.9.16-1

* Fix formatting

* Fix linting errors

* Update messages for metadata updates

* Update plato to 0.9.17

* Improve migration script

* Do not print/do anything if there’s no .metadata.json file
* Do the migration even if there’s already a .old file, by creating a unique backup file name
* Tell the user where the backup is stored

Co-authored-by: raisjn <70462544+raisjn@users.noreply.github.com>
Co-authored-by: Mattéo Delabre <spam@delab.re>
Co-authored-by: Mattéo Delabre <1370040+matteodelabre@users.noreply.github.com>
matteodelabre added a commit that referenced this pull request Jul 21, 2021
Important notices:

* When upgrading, users should run `opkg update && opkg upgrade` **twice** because of the changes introduced by this merge. (#310)
* Toltec **no longer supports** OS releases **earlier than 2.6**. You can check your current OS version in the settings panel. Please upgrade to 2.6 or newer after upgrading your Toltec install. (#366)
* To re-enable Toltec, **run `toltecctl reenable`** instead of the previous `entware-reenable` script that has been removed with this update.

Major change: The repository is now split into architecture subfolders. The `rmall` subfolder contains packages that can run both on reMarkable 1 and reMarkable 2 without modification. The `rm1` and `rm2` subfolders contain packages that are specific to each of the two devices. This change requires updating the Opkg configuration to point to the appropriate architectures. The migration is automated by placing an upgrade to the `toltec-bootstrap` package in the root folder of the repo that contains a migration script. (Note that this package is not generated automatically by our build system but will be added manually by the server administrator.)

New packages:

* bash-completion - 2.11-3 (#277, #375)
* display - 1.0.1-7 _(replaces the server part of the old rm2fb package)_ (#310)
* fuse - 1.0.0-2 (#331)
* gocryptfs - 2.0-beta2 (#318)
* innernet - 1.3.1-2 (#350, #358, #361)
* netsurf - 0.4.0-1 (#339)
* puzzles - 0.2.2-2 (#326)
* remarkable-stylus - 0.0.3-1 (#383)
* rm2fb-client - 1.0.1-7 _(replaces the client part of the old rm2fb package)_ (#310)
* tilem - 0.0.7-1 (#352)
* toltec-completion - 0.2.0-1 (#277)
* yaft - 0.0.4-3 (#261, #353)
* zoneinfo-utils - 2021a-2 (#182)

Updated packages:

* appmarkable - 0.0.0-11
* bufshot - 0.1.0-5
* calculator - 0.0.0-15
* chessmarkable - 0.7.1-2 (#362, #373)
* ddvk-hacks - 23.02-1 (#385)
* draft - 0.2.0-20
* evtest - 1.34-3
* fbink fbdepth fbink-doom - 1.23.1-4
* fingerterm - 1.3.5-14
* genie - 0.1.5-3
* harmony - 0.1.3-3
* iago - 0.1.0-4
* keywriter - 0.1.0-3
* koreader - 2021.06-1 (#330, #348, #357, #378)
* lamp - 0.1.0-4
* libdlib libdlib-dev - 19.21-2
* libvncserver libvncclient libvncserver-dev - 0.9.13-2
* mines - 0.1.2-4
* nao - 0.1.3-3
* oxide erode fret rot tarnish decay corrupt anxiety - 2.2-1 (#382)
* plato - 0.9.17-2 (#344)
* quickjs - 2020.11.08-2
* recrossable - 0.0.0-7
* remarkable-splash - 1.0-5
* remux - 0.1.9-3
* restream - 1.1-2
* retris - 0.6.3-3
* rmservewacominput - 0.3.0-2
* simple - 0.1.4-3
* templatectl - 0.1.3-3
* toltec-bootstrap - 0.1.0-1 _(includes toltecctl)_ (#379)
* vnsee - 0.4.0-2 (#355)
* wikipedia - 0.1.0-3
* wireguard - 1.0.20210219-2
* xochitl - 0.0.0-7 (#383, #382, #386)
* zshelf - 0.3.1-3

Website: The source files and scripts used for generating the website have been transferred to a separate repository (<https://github.com/toltec-dev/web>). A website rebuild is triggered automatically from this repository’s workflow when the stable branch is updated, so that the displayed checksum of the bootstrap script is always accurate.
matteodelabre added a commit that referenced this pull request Jul 31, 2021
Important notices:

* When upgrading, users should run `opkg update && opkg upgrade` **twice** because of the changes introduced by this merge. (#310)
* Toltec **no longer supports** OS releases **earlier than 2.6**. You can check your current OS version in the settings panel. If you’re still running on 2.5 or earlier, please upgrade to 2.6 or newer after upgrading your Toltec install. (#366)

Less important notices:

* To re-enable Toltec after a system upgrade, **run `toltecctl reenable`** instead of the previous `entware-reenable` script that has been removed with this update.
* You can now easily uninstall Toltec by running `toltec uninstall`.
* This release marks the end of our work towards transitioning to a new repository layout. This means that **stable will be updated more frequently from now on.** If you switched to the testing branch because stable has been outdated for a few months, and if you prefer to run stable releases, you can go back to the stable branch by running `toltecctl switch-branch stable`.

Layout change: The repository is now split into architecture subfolders. The `rmall` subfolder contains packages that can run both on reMarkable 1 and reMarkable 2 without modification. The `rm1` and `rm2` subfolders contain packages that are specific to each of the two devices. This change requires updating the Opkg configuration to point to the appropriate architectures. The migration is automated by placing an upgrade to the `toltec-bootstrap` package in the root folder of the repo that contains a migration script.

New packages:

* bash-completion - 2.11-3 (#277, #375)
* display - 1.0.1-7 _(replaces the server part of the old rm2fb package)_ (#310)
* fuse - 1.0.0-3 (#331)
* gocryptfs - 2.0-beta2 (#318)
* innernet-client - 1.3.1-2 (#350, #358, #361)
* netsurf - 0.4.0-2 (#339)
* puzzles - 0.2.2-3 (#326)
* remarkable-stylus - 0.0.3-1 (#383)
* rm2fb-client - 1.0.1-7 _(replaces the client part of the old rm2fb package)_ (#310)
* tilem - 0.0.7-2 (#352)
* toltec-completion - 0.2.0-1 (#277)
* yaft - 0.0.4-4 (#261, #353)
* zoneinfo-utils - 2021a-2 (#182)

Updated packages:

* appmarkable - 0.0.0-11
* bufshot - 0.1.0-5
* calculator - 0.0.0-15
* chessmarkable - 0.8.0-1 (#362, #373, #392)
* ddvk-hacks - 23.02-1 (#385)
* draft - 0.2.0-20
* evtest - 1.34-3
* fbink fbdepth fbink-doom - 1.23.2-1 (#387)
* fingerterm - 1.3.5-14
* genie - 0.1.5-3
* harmony - 0.1.3-3
* iago - 0.1.0-4
* keywriter - 0.1.0-3
* koreader - 2021.07-1 (#330, #348, #357, #378, #389)
* lamp - 0.1.0-4
* libdlib libdlib-dev - 19.21-2
* libvncserver libvncclient libvncserver-dev - 0.9.13-2
* mines - 0.1.2-4
* nao - 0.1.3-3
* oxide erode fret rot tarnish decay corrupt anxiety - 2.2.1-1 (#382)
* plato - 0.9.17-2 (#344)
* quickjs - 2020.11.08-2
* recrossable - 0.0.0-7
* remarkable-splash - 1.0-5
* remux - 0.1.9-4
* restream - 1.1-2
* retris - 0.6.3-3
* rmservewacominput - 0.3.0-2
* simple - 0.1.4-3
* templatectl - 0.1.3-3
* toltec-bootstrap - 0.1.0-1 _(includes toltecctl)_ (#379)
* vnsee - 0.4.0-2 (#355)
* wikipedia - 0.1.0-3
* wireguard - 1.0.20210219-2
* xochitl - 0.0.0-7 (#383, #382, #386)
* zshelf - 0.3.1-3

Website: The source files and scripts used for generating the website have been transferred to a separate repository (<https://github.com/toltec-dev/web>). A website rebuild is triggered automatically from this repository’s workflow when the stable branch is updated, so that the displayed checksum of the bootstrap script is always accurate.
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.

4 participants