taskwarrior-tui icon indicating copy to clipboard operation
taskwarrior-tui copied to clipboard

Snap install cannot access taskwarrior database

Open ghost opened this issue 5 years ago • 8 comments

$ sudo snap install taskwarrior-tui $ taskwarrior-tui

The TUI is empty. I can add tasks too for some reason, and they persist in the tui, even though these tasks are not added to the actual taskwarrior database whose location is given in ~/.taskrc.

ghost avatar Nov 22 '20 08:11 ghost

Do you know if this is possible? When I was looking into it I wasn’t able to find a way to get the snap to use the correct .taskrc file.

See this thread for more information for everything I already tried: https://github.com/kdheepak/taskwarrior-tui/issues/34#issuecomment-721303713

kdheepak avatar Nov 22 '20 15:11 kdheepak

I'm closing this issue since I'm not sure if this can be done.

kdheepak avatar Feb 10 '21 08:02 kdheepak

@kdheepak Please, reopen it. You can do this using "home" interface (better option) or "classic" confinement (worse option). It's definitely doable.

mhalano avatar Nov 18 '21 18:11 mhalano

@mhalano can you elaborate? I tried a bunch of things for this and I'm not sure I was able to get it to work.

kdheepak avatar Nov 18 '21 22:11 kdheepak

@kdheepak Here are the details about the home interface. You can use it to allow access to user's personal directory where is the .task directory. But I think again and may be what you want is the classic confinement because the home interface must be manually connected in strict mode, which can be cumbersome. So classic confinement is better. When you publish the Snap in Snap store, there will be a manual review, so explain to them, you need access to .task directory and files which is present in user's home directory.

mhalano avatar Nov 18 '21 22:11 mhalano

What if users what to access a .task folder that is not in the home directory?

kdheepak avatar Nov 27 '21 19:11 kdheepak

Neither works for me:

❯ snap connections taskwarrior-tui
❯ snap connect taskwarrior-tui:home :home
error: snap "taskwarrior-tui" has no plug named "home"

and installing taskwarrior-tui in classic has the same issues. I don't think the snap package is usable unless you manually copy of the files into the snap folder

max-pod avatar Nov 04 '22 13:11 max-pod

I don't know if I have the bandwidth to figure this out at the moment unfortunately.

I have a "snap" build action on github that used to work and now it doesn't:

Pulling taskwarrior-tui 
+ snapcraftctl pull
Building task 
+ snapcraftctl build
+ cmake /root/parts/task/src/ -G 'Unix Makefiles'
CMake Error at cmake/CMakeRust/cmake/FindRust.cmake:69 (message):
  Could not find Rust!
Call Stack (most recent call first):
  cmake/CMakeRust/cmake/CMakeDetermineRustCompiler.cmake:3 (find_package)
  CMakeLists.txt:4 (enable_language)


CMake Error: CMAKE_Rust_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/root/parts/task/build/CMakeFiles/CMakeOutput.log".
Failed to build 'task'.

Recommended resolution:
Check the build logs and ensure the part's configuration and sources are correct.
Starting Snapcraft 7.2.5
Logging execution to '/home/runner/.cache/snapcraft/log/snapcraft-20221104-143433.376814.log'
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
Error: Process completed with exit code 2.

I used to be able to build taskwarrior and taskwarrior-tui in the snap but it appears I need to apply for a manual review to figure this out.

kdheepak avatar Nov 04 '22 14:11 kdheepak