-
Notifications
You must be signed in to change notification settings - Fork 131
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
cargo make run rust script with rust-script fails on encrypted drive because file name too long #1150
Comments
@wallem89 sorry for late reply. |
@wallem89 i pushed a possible fix in dev branch 0.37.17 mind trying it out to see if it helps? as i have no way to validate this. |
Thanks @sagiegurari for looking into this issue and providing the branch with possible fix. I am trying to test but it is still not working or I din't manage to set cargo-make to the correct branch.
If I check my cargo-make version it still shows 0.37.16:
I (tried) to install with the following command:
But when done it still reports the following:
Looks like it indeed switched branches and the version number is only confusing because it still says So I am afraid the possible fix didn't help. |
thanks. dumb question, can you do touch or something and test max file len? and maybe i can do some fallback and cut filename if failing but need some sort of estimated len to understand the size of the issue |
Yes I did this during my initial investigation of the source of the issue, as I wrote: "I have double checked this by creating a file with So the maximum length is 143 bytes as also stated here: https://askubuntu.com/questions/728465/how-can-i-increase-ubuntus-143-byte-file-name-limit-for-encrypted-directories |
great so will try to get to that as a target |
@wallem89 sorry it took so long. can you retry again using that same branch? make sure to pull it. |
released |
@sagiegurari Sorry I didn't test again. I was working on another Rust project not using cargo make. I now working again with cargo make and updated to version |
Describe The Bug
Running a rust script trough
cargo make
fails on a dual boot system with Ubuntu 24.04 LTS 6.8.0-40-generic with an encrypted diskTo Reproduce
Ubuntu 24.04 LTS
cargo new <project-name>
Makefile.toml
with a task with task name<task-name>
as explained in theReadme
: https://github.com/sagiegurari/cargo-make?tab=readme-ov-file#rust-codeCargo make <task-name>
Error Stack
Code Sample
Further information
The file name it fails on,
_9e82d59a8e20e9e9c36290bd2cbf6fcce20b02cd6d095a42e8ded57c29e89525_bf38f7868792efabca30ea61-8b0e8709f49ba593._9e82d59a8e20e9e9c36290bd2cbf6fcce20b02cd6d095a42e8ded57c29e89525_bf38f7868792efabca30ea61.a89cfab540600d1e-cgu.0.rcgu.o
in this example, is 228 bytes long. This can be check with:echo "9e82d59a8e20e9e9c36290bd2cbf6fcce20b02cd6d095a42e8ded57c29e89525_bf38f7868792efabca30ea61-8b0e8709f49ba593._9e82d59a8e20e9e9c36290bd2cbf6fcce20b02cd6d095a42e8ded57c29e89525_bf38f7868792efabca30ea61.a89cfab540600d1e-cgu.0.rcgu.o" | wc -c
.This shouldn't be a problem on a non-encryped Linux system because the maximum file name length on my system (check with
getconf NAME_MAX /dev/nvme0 ; getconf PATH_MAX /dev/nvme0
is: 255. But unfortunately on encrypted systems this limit is lower (143 bytes), for background information: https://askubuntu.com/questions/728465/how-can-i-increase-ubuntus-143-byte-file-name-limit-for-encrypted-directories.I have double checked this by creating a file with
touch
with the same file name length with a length of 143 bytes can be created.When running the rust script as part of the task with the cargo-script runner it fails in the same way. Running the same with cargo-play will work:
When moving the Rust script to an actual Rust script the behavior is the same when running through
cargo make
:When running the Rust script directly with rust-script it does work:
But when changing the name of the script to something with a longer name, e.g.
733788858E67B5B8B2D6E2209D3C91EA16E7E8888ECA4616F707AF276465F795.rs
this script fails too when running with:rust-script 733788858E67B5B8B2D6E2209D3C91EA16E7E8888ECA4616F707AF276465F795.rs
The text was updated successfully, but these errors were encountered: