cargo builds can corrupt consumer git repos due to env vars
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- git, rust
- Área
- build-system
Línea de trabajo
Comienza en boring-sys/build/main.rs, centrándote en los dos puntos donde se llama a git y en el uso existente de git rev-parse --local-env-vars. Comprueba cómo el buildscript invoca git cuando Cargo se ejecuta desde un hook o un worktree. Se considera terminado cuando esas invocaciones ya no heredan variables de entorno de Git que puedan afectar al repositorio consumidor.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
The buildscript in boring-sys/build/main.rs calls out to git to set up the BoringSSL sources. When a project using this crate runs cargo from a git hook, git has already set variables like GIT_DIR for the hook. The buildscript here doesn't sanitize those variables, so git init re-initializes the consumer's repo, rather than the BoringSSL repo the buildscript intended.
Normally that's harmless, but when the build is running from a worktree rather than the main checkout, a surprising git interaction causes it to write core.bare = true into the main checkout's config, breaking most git commands in that main checkout until the config is fixed. Unexpected behaviour from git, for sure, but definitely not something we want to trigger from our build.
Proposed fix
Before invoking git in boring-sys/build/main.rs (2 call sites), strip env vars that would alter git's behaviour. git rev-parse --local-env-vars prints a list of those vars; for me, it gives:
GIT_ALTERNATE_OBJECT_DIRECTORIES
GIT_CONFIG
GIT_CONFIG_PARAMETERS
GIT_CONFIG_COUNT
GIT_OBJECT_DIRECTORY
GIT_DIR
GIT_WORK_TREE
GIT_IMPLICIT_WORK_TREE
GIT_GRAFT_FILE
GIT_INDEX_FILE
GIT_NO_REPLACE_OBJECTS
GIT_REPLACE_REF_BASE
GIT_PREFIX
GIT_SHALLOW_FILE
GIT_COMMON_DIR
- Lenguaje dominante
- Rust
- Estrellas
- 526
- Forks
- 178
- Merge medio
- 15 h 34 min
- PR fusionados (30 d)
- 9
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cloudflare/boring
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
cloudflare/boring#526 ·
Los mantenedores suelen responder en 1 día
-
5.3.0 regression: SSL_set_cert_cb(..., NULL, ...) stores a null function pointer instead of clearing, crashing the next handshakePosiblemente ocupada @dorianverlaine la tomó hace 1 día. Abierto
Dificultad 3/5 Medio día Aptitud para principiantes 62/100
cloudflare/boring#537 ·
Los mantenedores suelen responder en 1 día
-
SLH-DSA supportPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
cloudflare/boring#522 ·
Los mantenedores suelen responder en 1 día
-
Build failure on 32 bit freebsdAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
cloudflare/boring#517 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
cloudflare/boring#500 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de cloudflare/boring
Issues similares
-
agent:triaged bug bughunt pm:pipenv priority:p1
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
SocketDev/socket-patch#1608 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
adorsys/status-list-server#698 ·
Los mantenedores suelen responder en 2 días
-
Expose the dot grid colourAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
nannou-org/egui_graph#92 ·
Los mantenedores suelen responder en 1 día
-
documentation good first issue
Dificultad 2/5 Medio día Aptitud para principiantes 72/100
sujithputta02/Esapay#13 ·
-
Deduplicate normalized_f64_bits (hash_table.rs and bloom_filter.rs)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
tursodatabase/turso#10002 ·
Los mantenedores suelen responder en 1 día