-
Notifications
You must be signed in to change notification settings - Fork 266
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
Repo transferred to apache and renamed #174
Comments
Congratulations for the Apache tribute. Any chance you can update mesalock crates along with the next version bump? However, this is a delicate issue for us. We'd be blocked if this transition doesn't work smoothly. However, we did lock down our mesalock dependencies to specific git commits, so this might be less of an issue |
Thanks @brenzi ! I'm thinking of use a permanent (at least I think it's permanent) domain to host the redirect. I have a candidate
Seems that git can work with HTTP 301 redirect. However, cargo does not allow me to do that. If I have
Any ideas? |
Just find a flag in
If we enable this, we can directly use
Is this a good choice? |
I would prefer don't change global settings, if I remember correctly, developers no need to do anything after you transferred the repo, GitHub will do the redirection automatically. |
@jasl You're right about git. But cargo is stupid. "github.com/baidu/rust-sgx-sdk" and "github.com/apache/mesatee-sgx" are considered as two different crates. It'll lead to panic handler collisions and mess up the dependency tree. |
This is a patch which you guys can apply to hello-rust sample. It shows some usage on "sdk.rustsgx.com" and "repo.rustsgx.com" diff --git a/samplecode/hello-rust/enclave/.cargo/config b/samplecode/hello-rust/enclave/.cargo/config
new file mode 100644
index 0000000..c91c3f3
--- /dev/null
+++ b/samplecode/hello-rust/enclave/.cargo/config
@@ -0,0 +1,2 @@
+[net]
+git-fetch-with-cli = true
diff --git a/samplecode/hello-rust/enclave/Cargo.toml b/samplecode/hello-rust/enclave/Cargo.toml
index abd6c59..4c932cc 100644
--- a/samplecode/hello-rust/enclave/Cargo.toml
+++ b/samplecode/hello-rust/enclave/Cargo.toml
@@ -10,32 +10,36 @@ crate-type = ["staticlib"]
[features]
default = []
+[dependencies]
+log = { git = "https://repo.rustsgx.com/log-sgx" }
+
[target.'cfg(not(target_env = "sgx"))'.dependencies]
sgx_types = { git = "https://github.com/baidu/rust-sgx-sdk.git" }
-sgx_tstd = { git = "https://github.com/baidu/rust-sgx-sdk.git" }
+sgx_tstd = { git = "https://github.com/baidu/rust-sgx-sdk.git" }
+
[patch.'https://github.com/baidu/rust-sgx-sdk.git']
-sgx_alloc = { path = "../../../sgx_alloc" }
-sgx_build_helper = { path = "../../../sgx_build_helper" }
-sgx_cov = { path = "../../../sgx_cov" }
-sgx_crypto_helper = { path = "../../../sgx_crypto_helper" }
-sgx_libc = { path = "../../../sgx_libc" }
-sgx_rand = { path = "../../../sgx_rand" }
-sgx_rand_derive = { path = "../../../sgx_rand_derive" }
-sgx_serialize = { path = "../../../sgx_serialize" }
-sgx_serialize_derive = { path = "../../../sgx_serialize_derive" }
-sgx_serialize_derive_internals = { path = "../../../sgx_serialize_derive_internals" }
-sgx_tcrypto = { path = "../../../sgx_tcrypto" }
-sgx_tcrypto_helper = { path = "../../../sgx_tcrypto_helper" }
-sgx_tdh = { path = "../../../sgx_tdh" }
-sgx_tkey_exchange = { path = "../../../sgx_tkey_exchange" }
-sgx_tprotected_fs = { path = "../../../sgx_tprotected_fs" }
-sgx_trts = { path = "../../../sgx_trts" }
-sgx_tse = { path = "../../../sgx_tse" }
-sgx_tseal = { path = "../../../sgx_tseal" }
-sgx_tservice = { path = "../../../sgx_tservice" }
-sgx_tstd = { path = "../../../sgx_tstd" }
-sgx_tunittest = { path = "../../../sgx_tunittest" }
-sgx_types = { path = "../../../sgx_types" }
-sgx_ucrypto = { path = "../../../sgx_ucrypto" }
-sgx_unwind = { path = "../../../sgx_unwind" }
-sgx_urts = { path = "../../../sgx_urts" }
+sgx_alloc = { git = "https://sdk.rustsgx.com" }
+sgx_build_helper = { git = "https://sdk.rustsgx.com" }
+sgx_cov = { git = "https://sdk.rustsgx.com" }
+sgx_crypto_helper = { git = "https://sdk.rustsgx.com" }
+sgx_libc = { git = "https://sdk.rustsgx.com" }
+sgx_rand = { git = "https://sdk.rustsgx.com" }
+sgx_rand_derive = { git = "https://sdk.rustsgx.com" }
+sgx_serialize = { git = "https://sdk.rustsgx.com" }
+sgx_serialize_derive = { git = "https://sdk.rustsgx.com" }
+sgx_serialize_derive_internals = { git = "https://sdk.rustsgx.com" }
+sgx_tcrypto = { git = "https://sdk.rustsgx.com" }
+sgx_tcrypto_helper = { git = "https://sdk.rustsgx.com" }
+sgx_tdh = { git = "https://sdk.rustsgx.com" }
+sgx_tkey_exchange = { git = "https://sdk.rustsgx.com" }
+sgx_tprotected_fs = { git = "https://sdk.rustsgx.com" }
+sgx_trts = { git = "https://sdk.rustsgx.com" }
+sgx_tse = { git = "https://sdk.rustsgx.com" }
+sgx_tseal = { git = "https://sdk.rustsgx.com" }
+sgx_tservice = { git = "https://sdk.rustsgx.com" }
+sgx_tstd = { git = "https://sdk.rustsgx.com" }
+sgx_tunittest = { git = "https://sdk.rustsgx.com" }
+sgx_types = { git = "https://sdk.rustsgx.com" }
+sgx_ucrypto = { git = "https://sdk.rustsgx.com" }
+sgx_unwind = { git = "https://sdk.rustsgx.com" }
+sgx_urts = { git = "https://sdk.rustsgx.com" } |
the |
if this solution is acceptable, I can try if a shorter domain name is affordable. it'll be more ergonomic. |
Yes, that cargo issue crosses me all the time. I'd be happy for some endorsing comments (or critique) on my suggestion to resolve this properly: I'm not sure a custom domain will resolve the underlying problem. It's just a workaround. I could live with changing the global setting but I don't think this is elegant because it might change other behaviour as well as a side effect |
@brenzi Yeah I've seen your comments and I agree with you. btw, the |
the other choice is sgx.rs, sdk.sgx.rs and repo.sgx.rs |
given that this project is now under the apache org, i don't see any reason why you'd want to transfer repos again. apache is pretty prestigious. So, why not just go with https://github.com/apache/mesatee-sgx in the forked crates? |
@nabilschear The reason is that "mesatee" is a brand name owned by Baidu, and Baidu does not donate it to Apache. So we have to change it soon. besides, we may have option to make this sdk an isolated project and get rid of the prefix in a couple of years. in this case, we have to change the repo name again. |
understood. Whatever the solution to the path problem, when will it roll out to all the forked crates? |
@nabilschear I will do this next week after I get back in town. A new problem is that MesaTEE is being renamed... which means that the repo has to change its repo name again. So should we use the "sgx.rs" jumper, or keep up with every renaming? How do you think? |
What about creating a registery? |
@elichai Yes I'm thinking about it seriously! I have done a lot of experiment on that. I think it should be do-able, but with less transparency of porting. Currently, the forked crates can be "compared" directly with the upstream, and the diff reveals the difference clearly just in one click. Another though is that some crates are forked while some others are not. Does Cargo supports "partially overrided"? |
Well you can still keep them on github. (btw I would first spend time reaserching the |
In the previous crates.io design, a create published on crates.io can only depends on crates.io crates. So can I publish a crate on sgx's crates.io, but make it depends on crates hosted on official crates.io? |
regarding to the |
@dingelish that's a great question. Can we use 2 separate crates.io together? Idk. |
Hi all,
This project now belongs to apache, and has a new repo path at: https://github.com/apache/mesatee-sgx
Currently if one uses the forked crates, he/she still needs to use the old repo URL as
git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9"
, because all the forked crates are using the old repo URL.Now, mixed usage of this SDK, like the following Cargo.toml would trigger collision between two sgx_tstd:
You'll see
So I'm planning to have thorough update on all of the forked crates to use the new repo URL, and it would affect all of the projects which are depending on the old URL.
Any ideas?
Best,
Yu
The text was updated successfully, but these errors were encountered: