Skip to content
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

[pull] master from OSGeo:master #160

Merged
merged 37 commits into from
Jan 17, 2025
Merged

[pull] master from OSGeo:master #160

merged 37 commits into from
Jan 17, 2025

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 17, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

…t semantic change in Rename() where case-sensitive find() used instead of ifind(), change which is more logical
…ExtensionSafe(...).c_str(), ...)

Using
```
find frmts ogr  -name "*.cpp"  -exec sed -i "s/EQUAL(CPLGetExtension(\([a-zA-Z]*\)),/EQUAL(CPLGetExtensionSafe(\1).c_str(),/" {} \;
```
…anTrailingSlashSafe(), CPLGenerateTempFilenameSafe(), CPLExpandTildeSafe(), CPLLaunderForFilenameSafe()
Done with following script:
```bash
funcs=(CPLGetPath CPLGetDirname CPLGetBasename CPLGetExtension CPLFormFilename CPLFormCIFilename CPLResetExtension CPLProjectRelativeFilename CPLCleanTrailingSlash CPLGenerateTempFilename CPLExpandTilde CPLLaunderForFilename)

for func in "${funcs[@]}"; do
  find frmts ogr -name "*.cpp" -exec sed -i -E "s/const char \*([a-zA-Z_][a-zA-Z0-9_]*)\(${func}\(([^()]*(\([^()]*\))?[^()]*)\)\);/const char *\1 = ${func}(\2);/g" {} \;
done

for func in "${funcs[@]}"; do
  find frmts ogr -name "*.cpp" -exec sed -i -E "s/CPLString\(${func}\(([^()]*(\([^()]*\))?[^()]*)\)\)/CPLString(${func}Safe(\1))/g" {} \;
  find frmts ogr -name "*.cpp" -exec sed -i -E "s/std::string\(${func}\(([^()]*(\([^()]*\))?[^()]*)\)\)/std::string(${func}Safe(\1))/g" {} \;
done

for func in "${funcs[@]}"; do
  find frmts ogr -name "*.cpp" -exec sed -i -E "s/(CPLString\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\()${func}\((.*)\)/\1${func}Safe(\2)/g" {} \;
  find frmts ogr -name "*.cpp" -exec sed -i -E "s/(std::string\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\()${func}\((.*)\)/\1${func}Safe(\2)/g" {} \;
done

for func in "${funcs[@]}"; do
  find frmts ogr -name "*.cpp" -exec sed -i -E "s/(std::string\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\()${func}\(([^)]+)\)/\1${func}Safe(\2)/g" {} \;
  find frmts ogr -name "*.cpp" -exec sed -i -E "s/(CPLString\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\()${func}\(([^)]+)\)/\1${func}Safe(\2)/g" {} \;
done

for func in "${funcs[@]}"; do
  find frmts ogr -name "*.cpp" -exec sed -i -E "s/\(${func}\(([^()]*(\([^()]*\))?[^()]*)\)/(${func}Safe(\1).c_str()/g" {} \;
  find frmts ogr -name "*.cpp" -exec sed -i -E "s/, ${func}\(([^()]*(\([^()]*\))?[^()]*)\)/, ${func}Safe(\1).c_str()/g" {} \;
done
```
Done with following script:
```bash
funcs=(CPLGetPath CPLGetDirname CPLGetBasename CPLGetExtension CPLFormFilename CPLFormCIFilename CPLResetExtension CPLProjectRelativeFilename CPLCleanTrailingSlash CPLGenerateTempFilename CPLExpandTilde CPLLaunderForFilename)

for func in "${funcs[@]}"; do
  find frmts ogr -name "*.cpp" -exec sed -i -E "s/(CPLString\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\ = )${func}\((.*)\)/\1${func}Safe(\2)/g" {} \;
  find frmts ogr -name "*.cpp" -exec sed -i -E "s/(std::string\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\ = )${func}\((.*)\)/\1${func}Safe(\2)/g" {} \;
done
```
Done with following script:
```bash
funcs=(CPLGetPath CPLGetDirname CPLGetBasename CPLGetExtension CPLFormFilename CPLFormCIFilename CPLResetExtension CPLProjectRelativeFilename CPLCleanTrailingSlash CPLGenerateTempFilename CPLExpandTilde CPLLaunderForFilename)

for func in "${funcs[@]}"; do
  find frmts ogr -name "*.cpp" -exec sed -i -E "s/(CPLString\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\ = )${func}\(/\1${func}Safe(/g" {} \;
  find frmts ogr -name "*.cpp" -exec sed -i -E "s/(std::string\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\ = )${func}\(/\1${func}Safe(/g" {} \;
done
```
Done with following script:
```bash
funcs=(CPLGetPath CPLGetDirname CPLGetBasename CPLGetExtension CPLFormFilename CPLFormCIFilename CPLResetExtension CPLProjectRelativeFilename CPLCleanTrailingSlash CPLGenerateTempFilename CPLExpandTilde CPLLaunderForFilename)

for func in "${funcs[@]}"; do
  find frmts ogr -name "*.cpp" -exec sed -i -E "s/(^\s+os[a-zA-Z_][a-zA-Z0-9_]*\s*\ = )${func}(\((.*)\);)/\1${func}Safe\2/g" {} \;
done
```
…ename() with CPLProjectRelativeFilenameSafe()
Safer CPL path functions (RFC 105 implementation)
Cf comment in last successfull build:
```
2025-01-04T01:13:22.4654582Z /home/runner/miniconda3/envs/test/lib/python3.12/site-packages/conda_build/cli/main_build.py:520: FutureWarning: The default `pkg_format` of '.tar.bz2' is deprecated and will be removed in 25.1.
2025-01-04T01:13:22.4655579Z
2025-01-04T01:13:22.4655938Z The new default `pkg_format` value will be '.conda'. If you want to keep using `.tar.bz2`, consider:
2025-01-04T01:13:22.4656846Z - Setting `conda_build.pkg_format: 'tar.bz2' in your condarc file.
2025-01-04T01:13:22.4657562Z - Using `--pkg-format=tar.bz2` in the CLI.
2025-01-04T01:13:22.4657835Z
```

Fixes #11676
@pull pull bot added the ⤵️ pull label Jan 17, 2025
@pull pull bot merged commit 3da6544 into innFactory:master Jan 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant