Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148582777
D53489.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D53489.id.diff
View Options
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -1,6 +1,6 @@
PORTNAME= rust
PORTVERSION?= 1.90.0
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES= lang
MASTER_SITES= https://static.rust-lang.org/dist/:src \
https://dev-static.rust-lang.org/dist/:src \
diff --git a/lang/rust/files/patch-vendor_git2-0.20.2_src_lib.rs b/lang/rust/files/patch-vendor_git2-0.20.2_src_lib.rs
deleted file mode 100644
--- a/lang/rust/files/patch-vendor_git2-0.20.2_src_lib.rs
+++ /dev/null
@@ -1,18 +0,0 @@
---- vendor/git2-0.20.2/src/lib.rs.orig 2025-02-21 20:02:44 UTC
-+++ vendor/git2-0.20.2/src/lib.rs
-@@ -759,6 +759,7 @@ fn init() {
- unix,
- not(target_os = "macos"),
- not(target_os = "ios"),
-+ not(target_os = "freebsd"),
- feature = "https"
- ))]
- fn openssl_env_init() {
-@@ -880,6 +881,7 @@ fn openssl_env_init() {
- windows,
- target_os = "macos",
- target_os = "ios",
-+ target_os = "freebsd",
- not(feature = "https")
- ))]
- fn openssl_env_init() {}
diff --git a/lang/rust/files/patch-vendor_openssl-probe-0.1.6_src_lib.rs b/lang/rust/files/patch-vendor_openssl-probe-0.1.6_src_lib.rs
new file mode 100644
--- /dev/null
+++ b/lang/rust/files/patch-vendor_openssl-probe-0.1.6_src_lib.rs
@@ -0,0 +1,50 @@
+--- vendor/openssl-probe-0.1.6/src/lib.rs
++++ vendor/openssl-probe-0.1.6/src/lib.rs
+@@ -26,6 +26,7 @@ pub fn find_certs_dirs() -> Vec<PathBuf> {
+ /// found.
+ ///
+ /// This will only search known system locations.
++#[cfg(not(target_os = "freebsd"))]
+ pub fn candidate_cert_dirs() -> impl Iterator<Item = &'static Path> {
+ // see http://gagravarr.org/writing/openssl-certs/others.shtml
+ [
+@@ -52,6 +53,19 @@ pub fn candidate_cert_dirs() -> impl Iterator<Item = &'static Path> {
+ .map(Path::new)
+ .filter(|p| p.exists())
+ }
++#[cfg(target_os = "freebsd")]
++pub fn candidate_cert_dirs() -> impl Iterator<Item = &'static Path> {
++ // see manpage of certctl(8): https://man.freebsd.org/cgi/man.cgi?query=certctl&sektion=8
++ // see security/openssl* ports
++ [
++ "/etc/ssl",
++ "/usr/local/etc/ssl",
++ "/usr/local/openssl",
++ ]
++ .iter()
++ .map(Path::new)
++ .filter(|p| p.exists())
++}
+
+ /// Deprecated as this isn't sound, use [`init_openssl_env_vars`] instead.
+ #[doc(hidden)]
+@@ -169,6 +183,7 @@ pub fn probe() -> ProbeResult {
+ for certs_dir in candidate_cert_dirs() {
+ // cert.pem looks to be an openssl 1.0.1 thing, while
+ // certs/ca-certificates.crt appears to be a 0.9.8 thing
++ #[cfg(not(target_os = "freebsd"))]
+ let cert_filenames = [
+ "cert.pem",
+ "certs.pem",
+@@ -181,6 +196,11 @@ pub fn probe() -> ProbeResult {
+ "CARootCertificates.pem",
+ "tls-ca-bundle.pem",
+ ];
++ #[cfg(target_os = "freebsd")]
++ let cert_filenames = [
++ "cert.pem",
++ "ca-root-nss.crt",
++ ];
+ if result.cert_file.is_none() {
+ result.cert_file = cert_filenames
+ .iter()
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 19, 10:56 PM (10 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29983716
Default Alt Text
D53489.id.diff (3 KB)
Attached To
Mode
D53489: lang/rust: Replace OpenSSL system default truststore with a more generic one
Attached
Detach File
Event Timeline
Log In to Comment