Skip to content

Commit 7533c0b

Browse files
author
cranko
committed
Release commit created with Cranko.
+++ cranko-release-info-v1 [[projects]] qnames = ["tectonic_xdv", "cargo"] version = "0.2.0" age = 5 [[projects]] qnames = ["tectonic_errors", "cargo"] version = "0.2.0" age = 26 [[projects]] qnames = ["tectonic_xetex_format", "cargo"] version = "0.2.0" age = 0 [[projects]] qnames = ["tectonic_status_base", "cargo"] version = "0.2.0" age = 20 [[projects]] qnames = ["tectonic_io_base", "cargo"] version = "0.4.0" age = 5 [[projects]] qnames = ["tectonic_geturl", "cargo"] version = "0.3.1" age = 5 [[projects]] qnames = ["tectonic_docmodel", "cargo"] version = "0.1.2" age = 5 [[projects]] qnames = ["tectonic_dep_support", "cargo"] version = "0.1.0" age = 30 [[projects]] qnames = ["tectonic_cfg_support", "cargo"] version = "0.1.4" age = 5 [[projects]] qnames = ["tectonic_bundles", "cargo"] version = "0.3.0" age = 0 [[projects]] qnames = ["tectonic_bridge_icu", "cargo"] version = "0.2.0" age = 26 [[projects]] qnames = ["tectonic_bridge_graphite2", "cargo"] version = "0.2.1" age = 8 [[projects]] qnames = ["tectonic_bridge_harfbuzz", "cargo"] version = "0.2.5" age = 0 [[projects]] qnames = ["tectonic_bridge_freetype2", "cargo"] version = "0.2.0" age = 26 [[projects]] qnames = ["tectonic_bridge_flate", "cargo"] version = "0.1.5" age = 14 [[projects]] qnames = ["tectonic_bridge_core", "cargo"] version = "0.3.0" age = 8 [[projects]] qnames = ["tectonic_xetex_layout", "cargo"] version = "0.2.0" age = 0 [[projects]] qnames = ["tectonic_pdf_io", "cargo"] version = "0.2.0" age = 0 [[projects]] qnames = ["tectonic_engine_xetex", "cargo"] version = "0.2.0" age = 4 [[projects]] qnames = ["tectonic_engine_xdvipdfmx", "cargo"] version = "0.1.3" age = 12 [[projects]] qnames = ["tectonic_engine_spx2html", "cargo"] version = "0.1.1" age = 2 [[projects]] qnames = ["tectonic_engine_bibtex", "cargo"] version = "0.1.3" age = 14 [[projects]] qnames = ["tectonic", "cargo"] version = "0.8.2" age = 1 +++
2 parents dc70ec6 + 6234dd9 commit 7533c0b

140 files changed

Lines changed: 9241 additions & 6913 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.

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ serde = { version = "^1.0", features = ["derive"], optional = true }
7070
sha2 = "^0.9"
7171
structopt = "0.3"
7272
tectonic_bridge_core = { path = "crates/bridge_core", version =">=0.3.0,<1"}
73-
tectonic_bundles = { path = "crates/bundles", version =">=0.2.0,<1", default-features = false }
73+
tectonic_bundles = { path = "crates/bundles", version =">=0.3.0,<1", default-features = false }
7474
tectonic_docmodel = { path = "crates/docmodel", version =">=0.1.2,<1", optional = true }
7575
tectonic_engine_bibtex = { path = "crates/engine_bibtex", version =">=0.1.0,<1"}
7676
tectonic_engine_spx2html = { path = "crates/engine_spx2html", version =">=0.1.1,<1"}
@@ -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"

crates/bridge_harfbuzz/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# tectonic_bridge_harfbuzz 0.2.5 (2022-04-26)
2+
3+
- Update the vendored harfbuzz to 4.1.0.
4+
5+
16
# tectonic_bridge_harfbuzz 0.2.4 (2022-02-28)
27

38
- Update the vendored Harfbuzz to 3.0.0.

crates/bridge_harfbuzz/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[package]
77
name = "tectonic_bridge_harfbuzz"
8-
version = "0.2.4"
8+
version = "0.2.5"
99
authors = ["Peter Williams <peter@newton.cx>"]
1010
description = """
1111
Expose the Harfbuzz C/C++ APIs to Rust/Cargo.

crates/bridge_harfbuzz/harfbuzz

Submodule harfbuzz updated 649 files

crates/bundles/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# tectonic_bundles 0.3.0 (2022-04-26)
2+
3+
This minor bump contains a breaking change!
4+
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+
120
# tectonic_bundles 0.2.0 (2021-10-11)
221

322
This release contains a major configuration change, updating the URL of the

crates/bundles/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[package]
77
name = "tectonic_bundles"
8-
version = "0.2.0"
8+
version = "0.3.0"
99
authors = ["Peter Williams <peter@newton.cx>"]
1010
description = """
1111
Tectonic "bundle" (support file collection) implementations.

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
}

0 commit comments

Comments
 (0)