Mercurial > libervia-backend
annotate misc/README @ 4212:5f2d496c633f
core: get rid of `pickle`:
Use of `pickle` to serialise data was a technical legacy that was causing trouble to store
in database, to update (if a class was serialised, a change could break update), and to
security (pickle can lead to code execution).
This patch remove all use of Pickle in favour in JSON, notably:
- for caching data, a Pydantic model is now used instead
- for SQLAlchemy model, the LegacyPickle is replaced by JSON serialisation
- in XEP-0373 a class `PublicKeyMetadata` was serialised. New method `from_dict` and
`to_dict` method have been implemented to do serialisation.
- new methods to (de)serialise data can now be specified with Identity data types. It is
notably used to (de)serialise `path` of avatars.
A migration script has been created to convert data (for upgrade or downgrade), with
special care for XEP-0373 case. Depending of size of database, this migration script can
be long to run.
rel 443
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 23 Feb 2024 13:31:04 +0100 |
parents | a27fd445c7c7 |
children |
rev | line source |
---|---|
3485
7b888a488474
misc: update names for D-Bus service file and zsh autocompletion:
Goffi <goffi@goffi.org>
parents:
3480
diff
changeset
|
1 This directory contains files related to Libervia but not directly used by it. |
818
c328bcc4db71
jp: zsh completion, first draft (added in a new /misc directory):
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
2 |
3485
7b888a488474
misc: update names for D-Bus service file and zsh autocompletion:
Goffi <goffi@goffi.org>
parents:
3480
diff
changeset
|
3 * file _li: |
818
c328bcc4db71
jp: zsh completion, first draft (added in a new /misc directory):
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
4 This is the completion file for zsh. To use it, you need to have it in a path accessible in your fpath variable, and to have completion activated. This can be done by the following commands in your .zshrc: |
c328bcc4db71
jp: zsh completion, first draft (added in a new /misc directory):
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
5 |
c328bcc4db71
jp: zsh completion, first draft (added in a new /misc directory):
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 ### .zshrc completion ### |
3485
7b888a488474
misc: update names for D-Bus service file and zsh autocompletion:
Goffi <goffi@goffi.org>
parents:
3480
diff
changeset
|
7 fpath=(/path/to/directory/with/_li/ $fpath) |
818
c328bcc4db71
jp: zsh completion, first draft (added in a new /misc directory):
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 autoload -U compinit |
c328bcc4db71
jp: zsh completion, first draft (added in a new /misc directory):
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
9 compinit |
c328bcc4db71
jp: zsh completion, first draft (added in a new /misc directory):
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 ### end of .zshrc completion ### |
c328bcc4db71
jp: zsh completion, first draft (added in a new /misc directory):
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 |
3485
7b888a488474
misc: update names for D-Bus service file and zsh autocompletion:
Goffi <goffi@goffi.org>
parents:
3480
diff
changeset
|
12 Then, you should be able to complete a li command line by pressing [TAB]. |
1150
beaf8d4475e4
misc (D-Bus, installation): added a .service file for D-Bus auto-launch feature + installation from setup.py (path adaptation now use regex).
Goffi <goffi@goffi.org>
parents:
818
diff
changeset
|
13 |
3480
7550ae9cfbac
Renamed the project from "Salut à Toi" to "Libervia":
Goffi <goffi@goffi.org>
parents:
2628
diff
changeset
|
14 * org.libervia.Libervia.service: |
1150
beaf8d4475e4
misc (D-Bus, installation): added a .service file for D-Bus auto-launch feature + installation from setup.py (path adaptation now use regex).
Goffi <goffi@goffi.org>
parents:
818
diff
changeset
|
15 This file is used by D-Bus to know how to launch the backend, you have to put in in D-Bus services dir (usually /usr/share/dbus-1/services) |
3574
a27fd445c7c7
misc: added freedesktop metadata files
Goffi <goffi@goffi.org>
parents:
3485
diff
changeset
|
16 |
a27fd445c7c7
misc: added freedesktop metadata files
Goffi <goffi@goffi.org>
parents:
3485
diff
changeset
|
17 * org.libervia.Libervia*.metainfo.xml: |
a27fd445c7c7
misc: added freedesktop metadata files
Goffi <goffi@goffi.org>
parents:
3485
diff
changeset
|
18 AppStream metadata as specified at https://www.freedesktop.org/software/appstream/docs/ |
a27fd445c7c7
misc: added freedesktop metadata files
Goffi <goffi@goffi.org>
parents:
3485
diff
changeset
|
19 |
a27fd445c7c7
misc: added freedesktop metadata files
Goffi <goffi@goffi.org>
parents:
3485
diff
changeset
|
20 * org.libervia.LiberviaTUI.desktop: |
a27fd445c7c7
misc: added freedesktop metadata files
Goffi <goffi@goffi.org>
parents:
3485
diff
changeset
|
21 Desktop entry for TUI frontend as specified at https://specifications.freedesktop.org/desktop-entry-spec/ |