-
Notifications
You must be signed in to change notification settings - Fork 12
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
Case sensitive filesystems don't work? #14
Comments
Ran a small script to rename all the top level folders in After renaming all directories to lowercase all problems have been fixed. |
I seem to have figured out the problem, some crates' names start with a capital letter, and these crates seem to be downloaded first, that causes the prefix paths to be created with uppercase letters as well, then other crates with lowercase names with the same prefix get downloaded into the already existing directories (windows paths seem to be non case-sensitive) causing the problems. Renaming all prefixes to lowercase then breaks the downloading of the uppercase named crates. |
Thanks for submitting this issue. I haven't documented your use case (sharing a single mirror with both case-sensitive and case-insensitive mounts), but it is supported, with caveats. TL/DR: If you write the crates using a case-insensitive mount, you must access the crates case-insensitively thereafter. If you want to use the same underlying storage with both case-sensitive and case-insensitive mounts, you must always use the case-sensitive mount when writing to the storage. The easiest way to recover is to start over from the original If you no longer have the original
The above steps should work even after you've renamed your prefix directories to be all lowercase, as long as you access the mirror case-insensitively. This is because Romt uses the Unconditionally forcing the crate prefix to lowercase runs into a couple of difficulties. The main problem is when using nginx or some other server instead of The other issue is one of backward compatibility with the way Romt has historically worked. Forcing crate prefixes to lowercase would cause failures for non-lowercase crate prefixes for users with existing mirrors. A couple of years ago I requested that Cargo add the ability to use lowercase prefixes for crate downloads to someday make this issue easier: rust-lang/cargo#8267 The change was accepted, so if older Rust tooling need not be supported, in the future it would be possible to have Rust tooling use crate URLs with lowercase-only prefixes using the new I want to consider all of the above aspects more fully before deciding what changes to make (though the changes will certainly at least include additions to the README to explain the current limitations). |
hmm I see. The nginx problem probable can be solved using perl. But the repackaging and re-extracting solves my problem, though I recommend adding the case-sensitivity information to the readme. |
While considering the changes I want to make, I discovered that Windows case-insensitive shares of case-sensitive filesystems don't work as I'd originally thought. Consider creating the following tree using Linux on a case-sensitive file system: mkdir /m/tmp/rust
cd /m/tmp/rust
mkdir directory DIRECTORY
touch directory/crate DIRECTORY/CRATE
tree with output:
Now on a Windows machine accessing this same share via Samba (as
I'd thought this behavior carried over to contents within the subdirectories, but Windows is unable to see the contents of one of these directories, e.g.:
Note how
Romt therefore currently doesn't support using the same tree of crates in both case-sensitive and case-insensitive mode simultaneously. Reading and writing exclusively in one mode or the other works. I've reopened this issue pending a fix. |
From my experiments, on the same network drive, mounted on two linux systems:
When creating directories with the same name but different casing from the fedora machine: The numbers seem to correspond to the directories' order of creation rather than something to do with the casing. Anyway currently I'm planning to serve the crates just from the fedora machine so it works for me, but I agree that something should be figured out. |
This avoids problems when using a crate mirror with both case-sensitive and case-insensitive filesystems simultaneously; see #14. See README.rst for details.
Romt-0.4.0 now can use lowercase crate prefixes in addition to mixed-case prefixes. Lowercase is the default. Crate archives continue to use mixed-case prefixes for interoperability with older Romt, though new Romt can now use either prefix format. See the |
Closing with the assumption that Romt-0.4.0 fixes this issue. |
Hi,
I ran the crates download on a Windows machine, some of crates got downloaded into paths with uppercase letters.
For example
aead
got downloaded intocrates/Ae/ad/aead/aead-x.y.z.crate
(notice theAe
).I have transferred the crates to a network drive on an offline network, and serve from that drive from a linux machine.
When serving from one machine with the drive mounted using cifs, everything seems to work fine, but when serving from another machine that has the drive mounted as nfs, all crates that have uppercase letters in their prefix seem to break (return 404).
Any ideas or help would be appreciated.
The text was updated successfully, but these errors were encountered: