zhangyuannie / butter

Btrfs snapshot management GUI frontend
GNU General Public License v3.0
130 stars 5 forks source link

Butter doesn't create a config dir on arch #14

Open spacefall opened 1 year ago

spacefall commented 1 year ago

To Reproduce

  1. Install butter-git from the aur
  2. Run butter

Expected Behavior

The application should open without issues

Actual Behavior

The application crashes and prints this: "thread 'main' panicked at 'Failed to connect to system dbus: org.zhangyuannie.Butter1.Failed: Failed to read config directory', src/bin/butter.rs:41:30

I was able to fix this with sudo mkdir /etc/butter/schedules/ --parents but it's weird that the dir wasn't created during installation even if meson seems to be configured to create it.

Environment

zhangyuannie commented 1 year ago

I was not able to replicate with yay -S butter-git.

Can you please also provide the full install log?

spacefall commented 1 year ago

Sorry for the delay, I've uninstalled (with pacman -Rns), recompiled and reinstalled the package, and butter still crashes with the same error. These are all the logs I could find:

/var/log/pacman.log doesn't give much info:

[2023-08-29T22:49:26+0200] [PACMAN] Running '/usr/bin/pacman -U /home/user/test/butter-git/butter-git-1.0.r172.9263841-1-x86_64.pkg.tar.zst'
[2023-08-29T22:49:28+0200] [ALPM] transaction started
[2023-08-29T22:49:28+0200] [ALPM] reinstalled butter-git (1.0.r172.9263841-1)
[2023-08-29T22:49:28+0200] [ALPM] transaction completed
[2023-08-29T22:49:28+0200] [ALPM] running '30-systemd-daemon-reload.hook'...
[2023-08-29T22:49:28+0200] [ALPM] running '30-systemd-update.hook'...
[2023-08-29T22:49:28+0200] [ALPM] running 'dbus-reload.hook'...
[2023-08-29T22:49:28+0200] [ALPM] running 'glib-compile-schemas.hook'...
[2023-08-29T22:49:29+0200] [ALPM] running 'gtk-update-icon-cache.hook'...
[2023-08-29T22:49:29+0200] [ALPM] running 'pkgfile.hook'...
[2023-08-29T22:49:29+0200] [ALPM] running 'update-desktop-database.hook'...

butter-git-1.0.r172.9263841-1-x86_64-package.log:

ninja: Entering directory `/home/user/test/butter-git/src/butter-git/build'
[0/1] Generating src/cargo_build_butter with a custom command
cargo build skipped: running as root
Installing data/resources/resources.gresource to /home/user/test/butter-git/pkg/butter-git/usr/share/butter
Installing po/fr/LC_MESSAGES/butter.mo to /home/user/test/butter-git/pkg/butter-git/usr/share/locale/fr/LC_MESSAGES
Installing po/zh_CN/LC_MESSAGES/butter.mo to /home/user/test/butter-git/pkg/butter-git/usr/share/locale/zh_CN/LC_MESSAGES
Installing po/ta/LC_MESSAGES/butter.mo to /home/user/test/butter-git/pkg/butter-git/usr/share/locale/ta/LC_MESSAGES
Installing src/butter to /home/user/test/butter-git/pkg/butter-git/usr/bin
Installing src/butterd to /home/user/test/butter-git/pkg/butter-git/usr/lib
Installing new directory /home/user/test/butter-git/pkg/butter-git/etc/butter/schedules
Installing /home/user/test/butter-git/src/butter-git/build/data/org.zhangyuannie.butter.policy to /home/user/test/butter-git/pkg/butter-git/usr/share/polkit-1/actions
Installing /home/user/test/butter-git/src/butter-git/data/org.zhangyuannie.Butter.desktop to /home/user/test/butter-git/pkg/butter-git/usr/share/applications
Installing /home/user/test/butter-git/src/butter-git/data/org.zhangyuannie.Butter.gschema.xml to /home/user/test/butter-git/pkg/butter-git/usr/share/glib-2.0/schemas
Installing /home/user/test/butter-git/src/butter-git/build/data/butter-schedule-snapshot.service to /home/user/test/butter-git/pkg/butter-git/usr/lib/systemd/system
Installing /home/user/test/butter-git/src/butter-git/build/data/butter-schedule-prune.service to /home/user/test/butter-git/pkg/butter-git/usr/lib/systemd/system
Installing /home/user/test/butter-git/src/butter-git/data/butter-schedule-snapshot.timer to /home/user/test/butter-git/pkg/butter-git/usr/lib/systemd/system
Installing /home/user/test/butter-git/src/butter-git/data/butter-schedule-prune.timer to /home/user/test/butter-git/pkg/butter-git/usr/lib/systemd/system
Installing /home/user/test/butter-git/src/butter-git/data/org.zhangyuannie.Butter1.conf to /home/user/test/butter-git/pkg/butter-git/usr/share/dbus-1/system.d
Installing /home/user/test/butter-git/src/butter-git/build/data/org.zhangyuannie.Butter1.service to /home/user/test/butter-git/pkg/butter-git/usr/share/dbus-1/system-services
Installing /home/user/test/butter-git/src/butter-git/data/icons/hicolor/scalable/apps/org.zhangyuannie.Butter.svg to /home/user/test/butter-git/pkg/butter-git/usr/share/icons/hicolor/scalable/apps
Installing /home/user/test/butter-git/src/butter-git/data/icons/hicolor/symbolic/apps/org.zhangyuannie.Butter-symbolic.svg to /home/user/test/butter-git/pkg/butter-git/usr/share/icons/hicolor/symbolic/apps
Running custom install script '/home/user/test/butter-git/src/butter-git/scripts/restorecon /usr/lib/systemd/system/butter-schedule-snapshot.service /usr/lib/systemd/system/butter-schedule-prune.service /usr/lib/systemd/system/butter-schedule-snapshot.timer /usr/lib/systemd/system/butter-schedule-prune.timer /usr/bin/butter'
Skipping custom install script because DESTDIR is set '/usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas'
Skipping custom install script because DESTDIR is set '/usr/bin/gtk4-update-icon-cache -q -t -f /usr/share/icons/hicolor'
Skipping custom install script because DESTDIR is set '/usr/bin/update-desktop-database -q /usr/share/applications'
butter-git-1.0.r172.9263841-1-x86_64-build.log: ``` + exec meson setup --prefix /usr --libexecdir lib --sbindir bin --buildtype plain --auto-features enabled --wrap-mode nodownload -D b_lto=true -D b_pie=true -D python.bytecompile=1 . build The Meson build system Version: 1.2.1 Source dir: /home/user/test/butter-git/src/butter-git Build dir: /home/user/test/butter-git/src/butter-git/build Build type: native build Project name: butter Project version: 1.0 Rust compiler for the host machine: rustc -C linker=cc (rustc 1.72.0) Rust linker for the host machine: rustc -C linker=cc ld.lld 16.0.6 Host machine cpu family: x86_64 Host machine cpu: x86_64 Program cargo found: YES (/usr/bin/cargo) Program scripts/restorecon found: YES (/home/user/test/butter-git/src/butter-git/scripts/restorecon) Program scripts/cargo_build found: YES (/home/user/test/butter-git/src/butter-git/scripts/cargo_build) Configuring org.zhangyuannie.butter.policy using configuration Found pkg-config: /usr/bin/pkg-config (1.8.1) Run-time dependency systemd found: YES 254 Configuring butter-schedule-snapshot.service using configuration Configuring butter-schedule-prune.service using configuration Configuring org.zhangyuannie.Butter1.service using configuration Found pkg-config: /usr/bin/pkg-config (1.8.1) Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources) Program msgfmt found: YES (/usr/bin/msgfmt) Program msginit found: YES (/usr/bin/msginit) Program msgmerge found: YES (/usr/bin/msgmerge) Program xgettext found: YES (/usr/bin/xgettext) Configuring config.rs using configuration Build-time dependency gio-2.0 found: YES 2.76.4 Program glib-compile-schemas found: YES (/usr/bin/glib-compile-schemas) Program gtk4-update-icon-cache found: YES (/usr/bin/gtk4-update-icon-cache) Program update-desktop-database found: YES (/usr/bin/update-desktop-database) Build targets in project: 8 butter 1.0 User defined options auto_features : enabled buildtype : plain libexecdir : lib prefix : /usr sbindir : bin wrap_mode : nodownload python.bytecompile: 1 b_lto : true b_pie : true Found ninja-1.11.1 at /usr/bin/ninja Generating targets: 0%| | 0/8 eta ? Writing build.ninja: 0%| | 0/38 eta ? ninja: Entering directory `/home/user/test/butter-git/src/butter-git/build' [0/5] Generating src/cargo_build_butter with a custom command Compiling serde v1.0.185 Compiling hashbrown v0.14.0 Compiling equivalent v1.0.1 Compiling winnow v0.5.14 Compiling proc-macro2 v1.0.66 Compiling unicode-ident v1.0.11 Compiling libc v0.2.147 Compiling pkg-config v0.3.27 Compiling autocfg v1.1.0 Compiling heck v0.4.1 Compiling indexmap v2.0.0 Compiling quote v1.0.33 Compiling target-lexicon v0.12.11 Compiling smallvec v1.11.0 Compiling version-compare v0.1.1 Compiling memchr v2.5.0 Compiling syn v2.0.29 Compiling version_check v0.9.4 Compiling cfg-if v1.0.0 Compiling futures-core v0.3.28 Compiling cfg-expr v0.15.4 Compiling syn v1.0.109 Compiling pin-project-lite v0.2.12 Compiling futures-io v0.3.28 Compiling slab v0.4.9 Compiling once_cell v1.18.0 Compiling pin-utils v0.1.0 Compiling bitflags v2.4.0 Compiling futures-task v0.3.28 Compiling futures-channel v0.3.28 Compiling futures-sink v0.3.28 Compiling futures-util v0.3.28 Compiling toml_datetime v0.6.3 Compiling serde_spanned v0.6.3 Compiling toml_edit v0.19.14 Compiling proc-macro-error-attr v1.0.4 Compiling proc-macro-error v1.0.4 Compiling regex-syntax v0.7.4 Compiling thiserror v1.0.47 Compiling aho-corasick v1.0.4 Compiling crossbeam-utils v0.8.16 Compiling getrandom v0.2.10 Compiling event-listener v2.5.3 Compiling toml v0.7.6 Compiling proc-macro-crate v1.3.1 Compiling system-deps v6.1.1 Compiling regex-automata v0.3.6 Compiling typenum v1.16.0 Compiling regex v1.9.3 Compiling generic-array v0.14.7 Compiling glob v0.3.1 Compiling concurrent-queue v2.2.0 Compiling log v0.4.20 Compiling fastrand v1.9.0 Compiling clang-sys v1.6.1 Compiling rustix v0.38.8 Compiling waker-fn v1.1.0 Compiling parking v2.1.0 Compiling semver v1.0.18 Compiling gio v0.18.1 Compiling futures-lite v1.13.0 Compiling zvariant_utils v1.0.1 Compiling async-lock v2.8.0 Compiling lock_api v0.4.10 Compiling memoffset v0.7.1 Compiling linux-raw-sys v0.4.5 Compiling static_assertions v1.1.0 Compiling anyhow v1.0.75 Compiling bitflags v1.3.2 Compiling io-lifetimes v1.0.11 Compiling minimal-lexical v0.2.1 Compiling parking_lot_core v0.9.8 Compiling libloading v0.7.4 Compiling nom v7.1.3 Compiling atty v0.2.14 Compiling polling v2.8.0 Compiling termcolor v1.2.0 Compiling bindgen v0.60.1 Compiling humantime v2.1.0 Compiling scopeguard v1.2.0 Compiling async-task v4.4.0 Compiling rustix v0.37.23 Compiling either v1.9.0 Compiling which v4.4.0 Compiling cexpr v0.6.0 Compiling env_logger v0.9.3 Compiling rustc_version v0.4.0 Compiling block-buffer v0.10.4 Compiling crypto-common v0.1.6 Compiling async-channel v1.9.0 Compiling rand_core v0.6.4 Compiling async-io v1.13.0 Compiling memoffset v0.9.0 Compiling async-fs v1.6.0 Compiling rustc-hash v1.1.0 Compiling peeking_take_while v0.1.2 Compiling lazy_static v1.4.0 Compiling atomic-waker v1.1.1 Compiling ppv-lite86 v0.2.17 Compiling async-trait v0.1.73 Compiling byteorder v1.4.3 Compiling lazycell v1.3.0 Compiling shlex v1.1.0 Compiling linux-raw-sys v0.3.8 Compiling glib-sys v0.18.1 Compiling gobject-sys v0.18.0 Compiling gio-sys v0.18.1 Compiling pango-sys v0.18.0 Compiling gdk-pixbuf-sys v0.18.0 Compiling cairo-sys-rs v0.18.0 Compiling futures-macro v0.3.28 Compiling thiserror-impl v1.0.47 Compiling serde_derive v1.0.185 Compiling glib-macros v0.18.0 Compiling graphene-sys v0.18.1 Compiling gdk4-sys v0.7.2 Compiling gsk4-sys v0.7.2 Compiling enumflags2_derive v0.7.7 Compiling gtk4-sys v0.7.2 Compiling zvariant_derive v3.15.0 Compiling tokio-macros v2.1.0 Compiling tracing-attributes v0.1.26 Compiling rand_chacha v0.3.1 Compiling futures-executor v0.3.28 Compiling blocking v1.3.1 Compiling digest v0.10.7 Compiling parking_lot v0.12.1 Compiling nix v0.26.2 Compiling field-offset v0.3.6 Compiling is-terminal v0.4.9 Compiling cc v1.0.83 Compiling tracing-core v0.1.31 Compiling socket2 v0.4.9 Compiling socket2 v0.5.3 Compiling mio v0.8.8 Compiling num_cpus v1.16.0 Compiling signal-hook-registry v1.4.1 Compiling bytes v1.4.0 Compiling utf8parse v0.2.1 Compiling cpufeatures v0.2.9 Compiling temp-dir v0.1.11 Compiling tokio v1.32.0 Compiling sha1 v0.10.5 Compiling anstyle-parse v0.2.1 Compiling xdg-home v1.0.0 Compiling gettext-sys v0.21.3 Compiling rand v0.8.5 Compiling derivative v2.2.0 Compiling uuid v1.4.1 Compiling enumflags2 v0.7.7 Compiling tracing v0.1.37 Compiling zvariant v3.15.0 Compiling zbus_macros v3.14.1 Compiling glib v0.18.1 Compiling serde_repr v0.1.16 Compiling zbus_names v2.6.0 Compiling async-recursion v1.0.4 Compiling libadwaita-sys v0.5.2 Compiling async-executor v1.5.1 Compiling async-broadcast v0.5.1 Compiling ordered-stream v0.2.0 Compiling num-traits v0.2.16 Compiling colorchoice v1.0.0 Compiling anstyle-query v1.0.0 Compiling anstyle v1.0.2 Compiling hex v0.4.3 Compiling anstream v0.3.2 Compiling gtk4-macros v0.7.2 Compiling strsim v0.10.0 Compiling serde_json v1.0.105 Compiling cairo-rs v0.18.0 Compiling graphene-rs v0.18.1 Compiling clap_lex v0.5.0 Compiling clap_builder v4.3.24 Compiling locale_config v0.3.0 Compiling libbtrfsutil-sys v0.1.0 Compiling futures v0.3.28 Compiling clap_derive v4.3.12 Compiling time v0.1.45 Compiling ryu v1.0.15 Compiling itoa v1.0.9 Compiling fastrand v2.0.0 Compiling iana-time-zone v0.1.57 Compiling chrono v0.4.26 Compiling zbus v3.14.1 Compiling tempfile v3.8.0 Compiling libbtrfsutil v0.6.0 Compiling env_logger v0.10.0 Compiling gettext-rs v0.7.0 Compiling zbus_polkit v3.0.1 Compiling zbus_systemd v0.0.10 Compiling gdk-pixbuf v0.18.0 Compiling pango v0.18.0 Compiling clap v4.3.24 Compiling gdk4 v0.7.2 Compiling gsk4 v0.7.2 Compiling gtk4 v0.7.2 Compiling libadwaita v0.5.2 Compiling butter v0.1.0 (/home/user/test/butter-git/src/butter-git) Finished release [optimized] target(s) in 7m 36s [4/5] Generating data/resources/resources_gresource with a custom command INFO: autodetecting backend as ninja INFO: calculating backend command to run: /usr/bin/ninja -C /home/user/test/butter-git/src/butter-git/build ```
zhangyuannie commented 1 year ago

This is weird. In your logs, it also implies that specific directory is installed:

Installing new directory /home/user/test/butter-git/pkg/butter-git/etc/butter/schedules

Anyways, in this case, I'll just create that directory if it doesn't exist at runtime then. Thanks for reporting!