SailJail preparations #43

Merged
blizzz merged 8 commits from nephros/harbour-nextcloud-talk:sbox into master 2022-03-27 20:54:46 +00:00
Collaborator

See #44

See #44
nephros added 1 commit 2022-03-19 15:11:33 +00:00
nephros changed title from SailJail preparations to WIP: SailJail preparations 2022-03-19 18:29:09 +00:00
nephros force-pushed sbox from 3a30802740 to 5d8f70587b 2022-03-19 19:52:39 +00:00 Compare
nephros force-pushed sbox from eb06414af0 to 612dae951d 2022-03-19 20:12:00 +00:00 Compare
nephros force-pushed sbox from d6ba934b3e to 89b40366f8 2022-03-19 22:12:47 +00:00 Compare
nephros changed title from WIP: SailJail preparations to SailJail preparations 2022-03-19 22:38:47 +00:00
blizzz reviewed 2022-03-20 19:32:54 +00:00
@ -0,0 +3,4 @@
X-Nemo-Application-Type=silica-qt5
Icon=harbour-nextcloud-talk
Exec=/usr/bin/harbour-nextcloud-talk
Name=Nextcloud Talk

does it make sense to hint here that it's the jailed version? Or, other way, indiciated in the unjailed version that it is accordingly? e.g. "Nextcloud Talk ([Un]jailed)"

does it make sense to hint here that it's the jailed version? Or, other way, indiciated in the unjailed version that it is accordingly? e.g. "Nextcloud Talk ([Un]jailed)"
src/db.cpp Outdated
@ -21,0 +25,4 @@
newDbDir.mkpath(newDbDir.path());
qDebug() << "dir created " << newDbDir.path();
if(oldDb.exists()) {
oldDb.copy(newDbDir.path() + "/talk.db" );

let's move it instead of leaving stale files around

let's move it instead of leaving stale files around
Poster
Collaborator

I'm not entirely sure the old location is writeable while jailed, but yeah, will try to delete the file.

I'm not entirely sure the old location is writeable while jailed, but yeah, will try to delete the file.
Poster
Collaborator

I wonder if all this migrating is necessesary at all.
AFAICS only the last message markers are stored there - are they critical?

Because otherwise we could drop all that migrating stuff and just use the new location (creating a new empty DB at next launch).

I wonder if all this migrating is necessesary at all. AFAICS only the last message markers are stored there - are they critical? Because otherwise we could drop all that migrating stuff and just use the new location (creating a new empty DB at next launch).

AFAICS only the last message markers are stored there - are they critical?

In nowadays Talk versions probably not anymore, any unread ones should be displayed now. When using more clients, like web and mobile, it actually can be quite annoying when a big number of posts has to be fetched first when it was not opened on this client for a while. So I was already thinking to get rid of the marker in general, with some testing to ensure all new message are being fetched (for pulling older messages is not implemented).

Also in that cast it would be good to remove the table. For it probably is not writable anyway, an info in the app description (storage page) would be sufficient.

> AFAICS only the last message markers are stored there - are they critical? In nowadays Talk versions probably not anymore, any unread ones should be displayed now. When using more clients, like web and mobile, it actually can be quite annoying when a big number of posts has to be fetched first when it was not opened on this client for a while. So I was already thinking to get rid of the marker in general, with some testing to ensure all new message are being fetched (for pulling older messages is not implemented). Also in that cast it would be good to remove the table. For it probably is not writable anyway, an info in the app description (storage page) would be sufficient.
nephros force-pushed sbox from 7950e4be10 to 4d0b9a1fef 2022-03-21 08:50:30 +00:00 Compare
nephros force-pushed sbox from 570828aa7c to dcf2f524d7 2022-03-21 11:21:48 +00:00 Compare
nephros changed title from SailJail preparations to WIP: SailJail preparations 2022-03-21 11:23:47 +00:00
nephros force-pushed sbox from ac87215ff7 to 59eac47638 2022-03-21 12:18:50 +00:00 Compare
nephros force-pushed sbox from 59eac47638 to be0f9bd2ad 2022-03-21 12:46:43 +00:00 Compare
Poster
Collaborator

Sorry for the noise.

I think this works correctly now.

Sorry for the noise. I think this works correctly now.
nephros changed title from WIP: SailJail preparations to SailJail preparations 2022-03-21 12:48:33 +00:00
nephros changed title from SailJail preparations to WIP: SailJail preparations 2022-03-21 12:51:37 +00:00
nephros force-pushed sbox from be0f9bd2ad to 0559bf4c7c 2022-03-21 13:54:09 +00:00 Compare
nephros changed title from WIP: SailJail preparations to SailJail preparations 2022-03-21 13:54:48 +00:00

Sorry for the noise.

I think this works correctly now.

Nothing to apologize for! I am absolutely happy that you pick up on it!

> Sorry for the noise. > > I think this works correctly now. Nothing to apologize for! I am absolutely happy that you pick up on it!
blizzz approved these changes 2022-03-22 22:26:24 +00:00
@ -67,2 +70,4 @@
%post
# >> post
# Secrets permission is only in SFOS >= 4.4
if [ $(awk -F= '/^VERSION_ID/ {gsub(/\./,"") ; print $2}' /etc/os-release) -lt 44000 ]; then

good one!

good one!
nephros marked this conversation as resolved
src/db.cpp Outdated
@ -21,0 +26,4 @@
qDebug() << "success, removing old";
oldDbPath.remove();
QDir().rmpath(newDbDir.path());
} else { qCritical() << "copying failed"; }

style: imo better readable (and editable) to spread it out into three lines. Whitep

style: imo better readable (and editable) to spread it out into three lines. Whitep
nephros marked this conversation as resolved

Generally good to merge, if you like to check out #43 (comment) you can try this out, but not a necessity at all. Good to merge like this already.

Generally good to merge, if you like to check out https://codeberg.org/blizzz/harbour-nextcloud-talk/pulls/43#issuecomment-410433 you can try this out, but not a necessity at all. Good to merge like this already.
nephros force-pushed sbox from 1636211238 to 384d6f52da 2022-03-23 06:59:33 +00:00 Compare
Poster
Collaborator

Generally good to merge, if you like to check out #43 (comment) you can try this out, but not a necessity at all. Good to merge like this already.

I'll leave it as is.

Copy & remove is the cleanest. The rmdir() doesn't work (old dir remains) - I think that is because there is something mounted on it (through sailjail) but not sure.

Dropping the database completely is too big a change, and maybe there is some other use for it in the future.

> Generally good to merge, if you like to check out https://codeberg.org/blizzz/harbour-nextcloud-talk/pulls/43#issuecomment-410433 you can try this out, but not a necessity at all. Good to merge like this already. I'll leave it as is. Copy & remove is the cleanest. The rmdir() doesn't work (old dir remains) - I think that is because there is something mounted on it (through sailjail) but not sure. Dropping the database completely is too big a change, and maybe there is some other use for it in the future.
nephros added 1 commit 2022-03-23 07:49:00 +00:00
blizzz merged commit eb047f338f into master 2022-03-27 20:54:46 +00:00
blizzz referenced this issue from a commit 2022-03-27 20:54:47 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blizzz/harbour-nextcloud-talk#43
There is no content yet.