From d19050e06d2ecc5218e50e9ef3a5279afa0daff8 Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Mon, 4 Apr 2022 16:56:28 +0000 Subject: [PATCH 1/2] build: Replace missing crates.io dependency with Purism-hosted one --- Cargo.deps | 2 +- Cargo.deps.online | 4 ++++ debian/cargo/config | 1 - debian/rules | 2 +- meson.build | 12 ++++++++---- meson_options.txt | 4 ++++ 6 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 Cargo.deps.online diff --git a/Cargo.deps b/Cargo.deps index 04f99e68..31bc0dc1 100644 --- a/Cargo.deps +++ b/Cargo.deps @@ -29,4 +29,4 @@ features = ["v3_22"] [dependencies.gtk-sys] version = "0.9" -features = ["v3_22"] +features = ["v3_22"] \ No newline at end of file diff --git a/Cargo.deps.online b/Cargo.deps.online new file mode 100644 index 00000000..df73d805 --- /dev/null +++ b/Cargo.deps.online @@ -0,0 +1,4 @@ +# Dependencies which are only used with online, crates.io builds. +[patch.crates-io] +# Dependency was yanked, but gio 0.7 needs it. +fragile = { git = "https://source.puri.sm/dorota.czaplejewicz/fragile.git", tag = "0.3.0" } \ No newline at end of file diff --git a/debian/cargo/config b/debian/cargo/config index 6c73885a..22f26415 100644 --- a/debian/cargo/config +++ b/debian/cargo/config @@ -9,4 +9,3 @@ replace-with = 'vendored-sources' [source.vendored-sources] directory = '/usr/share/cargo/registry' - diff --git a/debian/rules b/debian/rules index a1fd6b49..c9ca998c 100755 --- a/debian/rules +++ b/debian/rules @@ -38,6 +38,6 @@ endif # causing Cargo to refuse to build with a crates.io copy override_dh_auto_configure: [ ! -f Cargo.lock ] || rm Cargo.lock - dh_auto_configure -- -Dnewer=$(newer) + dh_auto_configure -- -Dnewer=$(newer) -Donline=false override_dh_autoreconf: diff --git a/meson.build b/meson.build index 9928afc5..99e90443 100644 --- a/meson.build +++ b/meson.build @@ -96,19 +96,23 @@ cargo_toml_base = configure_file( configuration: path_data, ) - -cargo_deps = files('Cargo.deps') +cargo_patch = [] if get_option('newer') == true cargo_build_flags += ['--features', 'glib_v0_14'] cargo_deps = files('Cargo.deps.newer') +else + cargo_deps = files('Cargo.deps') + if get_option('online') == true + cargo_patch = [files('Cargo.deps.online')] + endif endif - + cat = find_program('cat') cargo_toml = custom_target( 'Cargo.toml', output: 'Cargo.toml', - command: [cat, cargo_toml_base, cargo_deps], + command: [cat, cargo_toml_base, cargo_deps] + cargo_patch, capture: true, ) diff --git a/meson_options.txt b/meson_options.txt index 16e9ae94..3e62b7be 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -11,6 +11,10 @@ option('newer', type: 'boolean', value: false, description: 'Build with dependencies newer than those of Byzantium') +option('online', + type: 'boolean', value: true, + description: 'Pull packages from the internet while building, as opposed to a local regstry.') + option('strict', type: 'boolean', value: true, description: 'Turn more warnings into errors') From 7f4c823c1ecd5a12f47d02b17354a9b493977f5a Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Mon, 4 Apr 2022 17:54:31 +0000 Subject: [PATCH 2/2] ci: Allow failure on sid --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 75d707d1..ea10ccb2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -74,6 +74,7 @@ build_deb:arm64: build_deb:future: image: debian:sid + allow_failure: true tags: - aarch64 stage: build