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

Bug: Rust panic on 0.8.3 with Fedora Linux 37 #308

Open
airtonix opened this issue Jan 17, 2023 · 1 comment
Open

Bug: Rust panic on 0.8.3 with Fedora Linux 37 #308

airtonix opened this issue Jan 17, 2023 · 1 comment
Assignees

Comments

@airtonix
Copy link
Contributor

Description

Steps to reproduce
Step by step explanation. Please add the output of with -vvv flag enabled (be careful not to include any secrets from your config).

Expected behaviour
What the expected behaviour in your opinion.

Environment

  • OS
  • Version: 0.8.3
System:
  Host: brass Kernel: 6.0.7-301.fc37.x86_64 arch: x86_64 bits: 64 Console: pty pts/0 Distro: Fedora
    release 37 (Thirty Seven)

Additional information

[zenobius@brass ~]$ curl -fsSL https://get.comtrya.dev | sh
x86_64
Downloading package https://github.com/comtrya/comtrya/releases/download/v0.8.3/comtrya-x86_64-unknown-linux-gnu as /home/zenobius/comtrya-x86_64-unknown-linux-gnu
Download complete.

============================================================
  The script was run as a user who is unable to write
  to /usr/local/bin. To complete the installation the
  following commands may need to be run manually.
============================================================

  sudo cp comtrya-x86_64-unknown-linux-gnu /usr/local/bin/comtrya
  sudo ln -sf /usr/local/bin/comtrya /usr/local/bin/comtrya

[zenobius@brass ~]$   sudo cp comtrya-x86_64-unknown-linux-gnu /usr/local/bin/comtrya
[sudo] password for zenobius: 
[zenobius@brass ~]$ comtrya -d https://github.com/airtonix/dotfiles apply
 INFO execute: Syncing Git repository https://github.com/airtonix/dotfiles to /home/zenobius/.cache/comtrya/manifests/git/githubcomairtonixdotfiles
 INFO execute:{manifest="devtools.wsl2"}: Skip manifest, because 'where' conditions were false!
 INFO execute:{manifest="devtools.files.nvim.lua.config.lazygit.config"}: Completed
 INFO execute:{manifest="shells.alacritty"}:{action=package.install}: Sudo required for privilege elevation to run `sudo dnf install --assumeyes --quiet alacritty`. Validating sudo ...
 INFO execute:{manifest="shells.alacritty"}: Completed
 INFO execute:{manifest="commands.bin"}: Completed
 INFO execute:{manifest="packagemanagers.scoop"}: Completed
 INFO execute:{manifest="windowmanagers.altsnap"}: Skip manifest, because 'where' conditions were false!
 INFO execute:{manifest="startup.systemd"}: Completed
 INFO execute:{manifest="shells.files.alacritty.alacritty"}: Completed
 INFO execute:{manifest="commands.launchers"}: Completed
 INFO execute:{manifest="devtools.ssh"}: Skip manifest, because 'where' conditions were false!
 INFO execute:{manifest="shells.zsh"}: Completed
 INFO execute:{manifest="shells.starship"}: Completed
 INFO execute:{manifest="windowmanagers.picom"}:{action=package.install}: Sudo required for privilege elevation to run `sudo dnf install --assumeyes --quiet picom`. Validating sudo ...
 INFO execute:{manifest="windowmanagers.picom"}: Completed
 INFO execute:{manifest="devtools.git-credentials"}: Skip manifest, because 'where' conditions were false!
 INFO execute:{manifest="packagemanagers.winget"}: Skip manifest, because 'where' conditions were false!
 INFO execute:{manifest="devtools.neovim"}: Completed
 INFO execute:{manifest="windowmanagers.autorandr"}: Completed
 INFO execute:{manifest="devtools.asdf"}:{action=package.install}: Sudo required for privilege elevation to run `sudo dnf install --assumeyes --quiet readline`. Validating sudo ...
 INFO execute:{manifest="devtools.asdf"}: Completed
 INFO execute:{manifest="devtools.git"}: Completed
 INFO execute:{manifest="devtools.vscode"}: Skip manifest, because 'where' conditions were false!
 INFO execute:{manifest="devtools.wsl2-ssh-agent"}: Skip manifest, because 'where' conditions were false!
 INFO execute:{manifest="devtools.wsl2-vpnkit"}: Skip manifest, because 'where' conditions were false!
 INFO execute:{manifest="devtools"}: Completed
 INFO execute:{manifest="windowmanagers.autohotkey"}: Skip manifest, because 'where' conditions were false!
 INFO execute:{manifest="windowmanagers.files.awesome.settings"}: Completed
 INFO execute:{manifest="secrets.enpass"}:{action=command.run}: nothing to be done to reconcile action
 INFO execute:{manifest="secrets.enpass"}:{action=command.run}: nothing to be done to reconcile action
 INFO execute:{manifest="secrets.enpass"}: Completed
 INFO execute:{manifest="secrets.pass"}:{action=command.run}: nothing to be done to reconcile action
 INFO execute:{manifest="secrets.pass"}:{action=command.run}: nothing to be done to reconcile action
 INFO execute:{manifest="secrets.pass"}:{action=command.run}: nothing to be done to reconcile action
 INFO execute:{manifest="secrets.pass"}:{action=command.run}: nothing to be done to reconcile action
 INFO execute:{manifest="secrets.pass"}: Completed
 INFO execute:{manifest="dotfiles.submodules"}: Completed
 INFO execute:{manifest="windowmanagers.rofi"}:{action=package.install}: Sudo required for privilege elevation to run `sudo dnf install --assumeyes --quiet rofi rofimoji`. Validating sudo ...
 INFO execute:{manifest="windowmanagers.rofi"}: Completed
 INFO execute:{manifest="shells.xresources"}: Completed
 INFO execute:{manifest="windowmanagers.awesome"}:{action=package.install}: Sudo required for privilege elevation to run `sudo dnf install --assumeyes --quiet lua lua-devel gobject-introspection-devel`. Validating sudo ...
 INFO execute:{manifest="windowmanagers.awesome"}:{action=package.install}: Sudo required for privilege elevation to run `sudo dnf install --assumeyes --quiet awesome arandr autorandr nitrogen lxappearance scrot viewnior xsel xsettingsd luarocks`. Validating sudo ...
 INFO execute:{manifest="windowmanagers.awesome"}:{action=command.run}: Sudo required for privilege elevation to run `sudo sh -s packages=(path luafilesystem power_widget lgi lcpz/awesome-freedesktop awesome-autostart lyaml); for package in $packages; do echo "installing ${package}"; luarocks install $package; done
`. Validating sudo ...
 INFO execute:{manifest="windowmanagers.awesome"}: Completed
thread 'main' panicked at 'Failed to resolve path', lib/src/actions/directory/mod.rs:17:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'Failed to resolve path', lib/src/actions/directory/mod.rs:17:14
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
   2: core::panicking::panic_display
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:72:5
   3: core::panicking::panic_str
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:56:5
   4: core::option::expect_failed
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/option.rs:1874:5
   5: <comtrya_lib::actions::directory::copy::DirectoryCopy as comtrya_lib::actions::Action>::plan
   6: <comtrya_lib::actions::ConditionalVariantAction<T> as comtrya_lib::actions::Action>::plan
   7: comtrya::commands::apply::execute::{{closure}}
   8: comtrya::commands::apply::execute
   9: comtrya::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

thread 'main' panicked at 'Failed to resolve path', lib/src/actions/directory/mod.rs:17:14
stack backtrace:
   0:     0x563e66337d2d - std::backtrace_rs::backtrace::libunwind::trace::h9135f25bc195152c
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x563e66337d2d - std::backtrace_rs::backtrace::trace_unsynchronized::h015ee85be510df51
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x563e66337d2d - std::sys_common::backtrace::_print_fmt::h5fad03caa9652a2c
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x563e66337d2d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h2b42ca28d244e5c7
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x563e663613ac - core::fmt::write::h401e827d053130ed
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/fmt/mod.rs:1198:17
   5:     0x563e663301e1 - std::io::Write::write_fmt::hffec93268f5cde32
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/io/mod.rs:1672:15
   6:     0x563e66339665 - std::sys_common::backtrace::_print::h180c4c706ee1d3fb
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x563e66339665 - std::sys_common::backtrace::print::hd0c35d18765761c9
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x563e66339665 - std::panicking::default_hook::{{closure}}::h1f023310983bc730
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:295:22
   9:     0x563e66339381 - std::panicking::default_hook::h188fec3334afd5be
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:314:9
  10:     0x563e66339bf6 - std::panicking::rust_panic_with_hook::hf26e9d4f97b40096
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:698:17
  11:     0x563e66339ae7 - std::panicking::begin_panic_handler::{{closure}}::hfab912107608087a
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:588:13
  12:     0x563e66338224 - std::sys_common::backtrace::__rust_end_short_backtrace::h434b685ce8d9965b
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:138:18
  13:     0x563e66339819 - rust_begin_unwind
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
  14:     0x563e657f3453 - core::panicking::panic_fmt::ha6dc7f2ab2479463
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
  15:     0x563e6635e0b1 - core::panicking::panic_display::h372d79c23510af4d
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:72:5
  16:     0x563e6635e05b - core::panicking::panic_str::h61705effd6c84979
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:56:5
  17:     0x563e657f32c6 - core::option::expect_failed::hef4294f320c9cc36
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/option.rs:1874:5
  18:     0x563e659f1dad - <comtrya_lib::actions::directory::copy::DirectoryCopy as comtrya_lib::actions::Action>::plan::h976556337f7c09af
  19:     0x563e65912da8 - <comtrya_lib::actions::ConditionalVariantAction<T> as comtrya_lib::actions::Action>::plan::hf9dc05d216f29a43
  20:     0x563e657fe4ee - comtrya::commands::apply::execute::{{closure}}::hbd64c6c0340c8d3e
  21:     0x563e657fbedb - comtrya::commands::apply::execute::hb67e431f20fee385
  22:     0x563e65816204 - comtrya::main::h507f8207313806dd
  23:     0x563e65801f03 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf338008e2a86137a
  24:     0x563e65810759 - std::rt::lang_start::{{closure}}::h2a5b72395aa8a4b6
  25:     0x563e66329c4e - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hcdfee62722e5e4b8
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:280:13
  26:     0x563e66329c4e - std::panicking::try::do_call::h84ca51609826746f
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:492:40
  27:     0x563e66329c4e - std::panicking::try::hd58075e533b8e0cb
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:456:19
  28:     0x563e66329c4e - std::panic::catch_unwind::h1ebac24d83cb6ce2
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panic.rs:137:14
  29:     0x563e66329c4e - std::rt::lang_start_internal::{{closure}}::h0145388a1edd1640
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/rt.rs:128:48
  30:     0x563e66329c4e - std::panicking::try::do_call::h7630182e534a0a32
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:492:40
  31:     0x563e66329c4e - std::panicking::try::h05b6544f0c6331dc
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:456:19
  32:     0x563e66329c4e - std::panic::catch_unwind::h77b2ba8fd3309f34
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panic.rs:137:14
  33:     0x563e66329c4e - std::rt::lang_start_internal::h6612c8a7a6861b8b
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/rt.rs:128:20
  34:     0x563e65816f42 - main
  35:     0x7fe029818510 - __libc_start_call_main
  36:     0x7fe0298185c9 - __libc_start_main@GLIBC_2.2.5
  37:     0x563e657f37ae - _start
  38:                0x0 - <unknown>
@martintc
Copy link
Contributor

martintc commented Mar 8, 2023

Sorry I didn't get to this one soon. So I have played around with directory copy and what is throwing an error. I do get a failure that I can reproduce using the example files. If I create a directory and try to copy it somewhere else it will fail unless the path to copy to also has the directory name. So as an example, this fails with similar output to yours.

actions:
  - action: directory.create
    path: /home/todd/testdir
  - action: directory.copy
    from: /home/todd/testdir
    to: /home/todd/Testing/

However, this succeeds

actions:
  - action: directory.create
    path: /home/todd/testdir
  - action: directory.copy
    from: /home/todd/testdir
    to: /home/todd/Testing/testdir

Looking at your dotfiles, it looks like when you call directory.copy, you do it the way I am doing it when it fails. I have a solution in mind, but I will talk to the other maintainers to check that they agree. I don't think this should fail if you just specify a path to the parent directory where the new directory will be copied into.

@martintc martintc self-assigned this Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants