Skip to content

Commit 6234dd9

Browse files
author
cranko
committed
Release request commit created with Cranko.
+++ cranko-rc-info-v1 [[projects]] qnames = ["tectonic_xetex_format", "cargo"] bump_spec = "minor bump" [[projects]] qnames = ["tectonic_bundles", "cargo"] bump_spec = "minor bump" [[projects]] qnames = ["tectonic_bridge_harfbuzz", "cargo"] bump_spec = "micro bump" [[projects]] qnames = ["tectonic_xetex_layout", "cargo"] bump_spec = "minor bump" [[projects]] qnames = ["tectonic_pdf_io", "cargo"] bump_spec = "minor bump" +++
2 parents d4c9f1b + 664eb5a commit 6234dd9

135 files changed

Lines changed: 9353 additions & 8025 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 6 additions & 1096 deletions
Large diffs are not rendered by default.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ tokio = "0.1.22"
120120

121121
[package.metadata.vcpkg]
122122
git = "https://github.com/microsoft/vcpkg"
123-
rev = "997cd412fa4dff71bec6c99dea95f0b9a3c2c240"
123+
rev = "6b6a35335c9064fac2ec6684c4f79808dce59b7d"
124124

125125
[package.metadata.vcpkg.target]
126126
x86_64-apple-darwin = { install = ["freetype","harfbuzz[icu,graphite2]"] }
@@ -134,7 +134,7 @@ tectonic_bridge_flate = "thiscommit:2021-01-01:eer4ahL4"
134134
tectonic_bridge_graphite2 = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
135135
tectonic_bridge_harfbuzz = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
136136
tectonic_bridge_icu = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
137-
tectonic_bundles = "207e6e796b1827330ee03a4c395fe6db059bddd9"
137+
tectonic_bundles = "thiscommit:2022-03-29:SFnXSaL"
138138
tectonic_cfg_support = "thiscommit:aeRoo7oa"
139139
tectonic_dep_support = "5faf4205bdd3d31101b749fc32857dd746f9e5bc"
140140
tectonic_docmodel = "thiscommit:2022-02-20:2SpEl4c"
Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,50 @@
1-
# See elsewhere for changelog
1+
# rc: micro bump
22

3-
This project’s release notes are curated from the Git history of its main
4-
branch. You can find them by looking at [the version of this file on the
5-
`release` branch][branch] or the [GitHub release history][gh-releases].
3+
- Update the vendored harfbuzz to 4.1.0.
64

7-
[branch]: https://github.com/tectonic-typesetting/tectonic/blob/release/crates/bridge_harfbuzz/CHANGELOG.md
8-
[gh-releases]: https://github.com/tectonic-typesetting/tectonic/releases
5+
6+
# tectonic_bridge_harfbuzz 0.2.4 (2022-02-28)
7+
8+
- Update the vendored Harfbuzz to 3.0.0.
9+
10+
11+
# tectonic_bridge_harfbuzz 0.2.3 (2021-10-11)
12+
13+
- Update the vendored Harfbuzz source to
14+
- Fixes for Clippy 1.53.0
15+
16+
17+
# tectonic_bridge_harfbuzz 0.2.2 (2021-06-07)
18+
19+
- Still no code changes
20+
- 0.2.1 didn't publish to Crates.io because our package file was too big for it;
21+
we've eliminated some of the Harfbuzz support files that should fix this
22+
([#781], [@pkgw])
23+
24+
[#781]: https://github.com/tectonic-typesetting/tectonic/pull/781
25+
[@pkgw]: https://github.com/pkgw
26+
27+
28+
# tectonic_bridge_harfbuzz 0.2.1 (2021-06-07)
29+
30+
- No code changes
31+
- The 0.2.0 package didn't actually contain the vendored Harfbuzz source files,
32+
breaking `cargo` builds. We’ve modified the CI scripts to attempt to fix this
33+
([#777], [@pkgw])
34+
35+
[#777]: https://github.com/tectonic-typesetting/tectonic/pull/777
36+
[@pkgw]: https://github.com/pkgw
37+
38+
39+
# tectonic_bridge_harfbuzz 0.2.0 (2021-06-03)
40+
41+
- Update the vendored Harfbuzz to 2.8.1.
42+
- Fix up handling of how C/C++ header file paths are exported to dependent
43+
crates. This is a breaking change: we've moved from a single include directory
44+
to a list of them.
45+
46+
47+
# tectonic_bridge_harfbuzz 0.1.0 (2021-01-15)
48+
49+
Initial release of Harfbuzz "bridge" crate for Tectonic. Includes the ability to
50+
vendor Harfbuzz.

crates/bridge_harfbuzz/harfbuzz

Submodule harfbuzz updated 649 files

crates/bundles/CHANGELOG.md

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,56 @@
1-
# See elsewhere for changelog
1+
# rc: minor bump
22

3-
This project’s release notes are curated from the Git history of its main
4-
branch. You can find them by looking at [the version of this file on the
5-
`release` branch][branch] or the [GitHub release history][gh-releases].
3+
This minor bump contains a breaking change!
64

7-
[branch]: https://github.com/tectonic-typesetting/tectonic/blob/release/crates/bundles/CHANGELOG.md
8-
[gh-releases]: https://github.com/tectonic-typesetting/tectonic/releases
5+
- The default bundle URL is now parametrized with the "format version", which
6+
captures the internal capabilities of the XeTeX engine. Since the bundle and
7+
the engine are fairly tightly coupled, this allows us to provide bundles that
8+
track the capabilities of newer engine versions, while preserving the behavior
9+
of older engine versions. Anyway, instead of exporting a `FALLBACK_BUNDLE_URL`
10+
const, we now export a `get_fallback_bundle_url()` method that takes the
11+
format version as an argument. This argument should be the value of
12+
`tectonic_engine_xetex::FORMAT_SERIAL` if you have a module that actually
13+
links to the XeTeX engine.
14+
- Make the cache location customizable with the environment variable
15+
`TECTONIC_CACHE_DIR` (#880, #884, @wischi-chr).
16+
- Fix "fetching" of zero-size files to succeed without attempting any I/O (#888,
17+
@pkgw).
18+
19+
20+
# tectonic_bundles 0.2.0 (2021-10-11)
21+
22+
This release contains a major configuration change, updating the URL of the
23+
default bundle to refer to a new, dedicated web service rather than using
24+
`archive.org` (#833, @pkgw). The new default URL is:
25+
26+
https://relay.fullyjustified.net/default_bundle.tar
27+
28+
This switch was motivated by the recent breakage caused by a change in
29+
archive.org's internal implementation, even though that breakage has been fixed
30+
in the most recent release of the `tectonic_geturl` crate. The `archive.org`
31+
redirection service has always had low-level reliability issues and, more
32+
importantly, is blocked in China, which is a fatal issue for a potentially large
33+
number of users.
34+
35+
The new webservice is a very simple nginx server set up in a Docker container
36+
defined in the [tectonic-relay-service] repo. The associated web infrastructure
37+
runs on Microsoft Azure and is configured using Terraform files in the
38+
[tectonic-cloud-infra] repo.
39+
40+
[tectonic-relay-service]: https://github.com/tectonic-typesetting/tectonic-relay-service
41+
[tectonic-cloud-infra]: https://github.com/tectonic-typesetting/tectonic-cloud-infra
42+
43+
@pkgw owns the `fullyjustified.net` domain name and the Azure subscription into
44+
which the services are deployed.
45+
46+
47+
# tectonic_bundles 0.1.0 (2021-06-15)
48+
49+
Add the `tectonic_bundles` crate! This separates out the implementation of the
50+
various Tectonic file “bundles” into a standalone crate, so that you can use
51+
them without having to link to harfbuzz and everything else pulled in by the
52+
main crate.
53+
54+
As usual, separating out this crate led to some good API clarifications and
55+
improvements. The API offered here includes some nontrivial breakage compared to
56+
the old APIs in `tectonic::io::*`, but it's much more rationalized.

crates/bundles/src/cache.rs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use fs2::FileExt;
2020
use std::{
2121
collections::HashMap,
22+
env,
2223
fs::{self, File},
2324
io::{BufRead, BufReader, Error as IoError, ErrorKind as IoErrorKind, Read, Write},
2425
path::{Path, PathBuf},
@@ -43,13 +44,26 @@ pub struct Cache {
4344
impl Cache {
4445
/// Get a handle to a bundle cache, using default per-user settings.
4546
///
47+
/// The cache location defaults to the `AppDataType::UserCache`
48+
/// provided by `app_dirs2` but can be overwritten using the
49+
/// `TECTONIC_CACHE_DIR` environment variable.
50+
///
4651
/// This method may perform I/O to create the user cache directory, so it is
4752
/// fallible. (Due to its `app_dirs2` implementation, it would have to be
4853
/// fallible even if it didn't perform I/O.)
4954
pub fn get_user_default() -> Result<Self> {
50-
Ok(Cache {
51-
root: app_dirs::ensure_user_cache_dir("")?,
52-
})
55+
let env_cache_path = env::var_os("TECTONIC_CACHE_DIR");
56+
57+
let cache_path = match env_cache_path {
58+
Some(env_cache_path) => {
59+
let env_cache_path = env_cache_path.into();
60+
fs::create_dir_all(&env_cache_path)?;
61+
env_cache_path
62+
}
63+
None => app_dirs::ensure_user_cache_dir("")?,
64+
};
65+
66+
Ok(Cache { root: cache_path })
5367
}
5468

5569
/// Get a handle to a bundle cache, using a custom cache directory.

crates/bundles/src/itar.rs

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -159,35 +159,40 @@ impl CacheBackend for IndexedTarBackend {
159159
let mut overall_failed = true;
160160
let mut any_failed = false;
161161

162-
for _ in 0..MAX_HTTP_ATTEMPTS {
163-
let mut stream = match self.reader.read_range(info.offset, n) {
164-
Ok(r) => r,
165-
Err(e) => {
166-
tt_warning!(status, "failure requesting \"{}\" from network", name; e);
162+
// Our HTTP implementation actually has problems with zero-sized ranged
163+
// reads (Azure gives us a 200 response, which we don't properly
164+
// handle), but when the file is 0-sized we're all set anyway!
165+
if n > 0 {
166+
for _ in 0..MAX_HTTP_ATTEMPTS {
167+
let mut stream = match self.reader.read_range(info.offset, n) {
168+
Ok(r) => r,
169+
Err(e) => {
170+
tt_warning!(status, "failure requesting \"{}\" from network", name; e);
171+
any_failed = true;
172+
continue;
173+
}
174+
};
175+
176+
if let Err(e) = stream.read_to_end(&mut buf) {
177+
tt_warning!(status, "failure downloading \"{}\" from network", name; e.into());
167178
any_failed = true;
168179
continue;
169180
}
170-
};
171181

172-
if let Err(e) = stream.read_to_end(&mut buf) {
173-
tt_warning!(status, "failure downloading \"{}\" from network", name; e.into());
174-
any_failed = true;
175-
continue;
182+
overall_failed = false;
183+
break;
176184
}
177185

178-
overall_failed = false;
179-
break;
180-
}
181-
182-
if overall_failed {
183-
bail!(
184-
"failed to retrieve \"{}\" from the network; \
185-
this most probably is not Tectonic's fault \
186-
-- please check your network connection.",
187-
name
188-
);
189-
} else if any_failed {
190-
tt_note!(status, "download succeeded after retry");
186+
if overall_failed {
187+
bail!(
188+
"failed to retrieve \"{}\" from the network; \
189+
this most probably is not Tectonic's fault \
190+
-- please check your network connection.",
191+
name
192+
);
193+
} else if any_failed {
194+
tt_note!(status, "download succeeded after retry");
195+
}
191196
}
192197

193198
Ok(buf)

crates/bundles/src/lib.rs

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,29 +95,47 @@ impl<B: Bundle + ?Sized> Bundle for Box<B> {
9595
}
9696
}
9797

98-
/// The URL of the default bundle.
98+
/// Get the URL of the default bundle.
9999
///
100-
/// This is a hardcoded URL of a default bundle that will provide some
100+
/// This is a mostly-hardcoded URL of a default bundle that will provide some
101101
/// "sensible" set of TeX support files. The higher-level `tectonic` crate
102102
/// provides a configuration mechanism to allow the user to override this
103103
/// setting, so you should use that if you are in a position to do so.
104104
///
105-
/// This URL will be embedded in the binaries that you create, which may be used
106-
/// for years into the future, so it needs to be durable and reliable. We used
107-
/// `archive.org` for a while, but it had low-level reliability problems and was
108-
/// blocked in China. We now use a custom webservice.
109-
pub const FALLBACK_BUNDLE_URL: &str = "https://relay.fullyjustified.net/default_bundle.tar";
105+
/// The URL depends on the format version supported by the engine, since that
106+
/// roughly corresponds to a TeXLive version, and the engine and TeXLive files
107+
/// are fairly closely coupled.
108+
///
109+
/// The URL template used in this function will be embedded in the binaries that
110+
/// you create, which may be used for years into the future, so it needs to be
111+
/// durable and reliable. We used `archive.org` for a while, but it had
112+
/// low-level reliability problems and was blocked in China. We now use a custom
113+
/// webservice.
114+
pub fn get_fallback_bundle_url(format_version: u32) -> String {
115+
// Format version 32 (TeXLive 2021) was when we introduced versioning to the
116+
// URL.
117+
if format_version < 32 {
118+
"https://relay.fullyjustified.net/default_bundle.tar".to_owned()
119+
} else {
120+
format!(
121+
"https://relay.fullyjustified.net/default_bundle_v{}.tar",
122+
format_version
123+
)
124+
}
125+
}
110126

111127
/// Open the fallback bundle.
112128
///
113129
/// This is essentially the default Tectonic bundle, but the higher-level
114130
/// `tectonic` crate provides a configuration mechanism to allow the user to
115-
/// override the [`FALLBACK_BUNDLE_URL`] setting, and that should be preferred
116-
/// if you’re in a position to use it.
131+
/// override the bundle URL setting, and that should be preferred if you’re in a
132+
/// position to use it.
117133
pub fn get_fallback_bundle(
134+
format_version: u32,
118135
only_cached: bool,
119136
status: &mut dyn StatusBackend,
120137
) -> Result<cache::CachingBundle<itar::IndexedTarBackend>> {
138+
let url = get_fallback_bundle_url(format_version);
121139
let mut cache = cache::Cache::get_user_default()?;
122-
cache.open(FALLBACK_BUNDLE_URL, only_cached, status)
140+
cache.open(&url, only_cached, status)
123141
}

crates/engine_xdvipdfmx/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ cc = "^1.0.66"
3030
[package.metadata.internal_dep_versions]
3131
tectonic_bridge_core = "thiscommit:2021-01-17:fohCh1sh"
3232
tectonic_errors = "5c9ba661edf5ef669f24f9904f99cca369d999e7"
33-
tectonic_pdf_io = "620fe47e87000cede22d5e5eafa0fda81f28b402"
33+
tectonic_pdf_io = "thiscommit:2022-03-29:6nizWic"

0 commit comments

Comments
 (0)