diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-04-19 11:19:17 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-04-19 11:21:26 +0000 |
commit | f867986f602459d4c73e6e2247738ea3804ea05e (patch) | |
tree | caca5e0c133900e79c8bdd141de40d70ce0c17fd /pkgs/os-specific/linux/chromium-os | |
parent | 400628aa729e96d3585cce34b1e871280ccecc3c (diff) | |
download | nixpkgs-f867986f602459d4c73e6e2247738ea3804ea05e.tar nixpkgs-f867986f602459d4c73e6e2247738ea3804ea05e.tar.gz nixpkgs-f867986f602459d4c73e6e2247738ea3804ea05e.tar.bz2 nixpkgs-f867986f602459d4c73e6e2247738ea3804ea05e.tar.lz nixpkgs-f867986f602459d4c73e6e2247738ea3804ea05e.tar.xz nixpkgs-f867986f602459d4c73e6e2247738ea3804ea05e.tar.zst nixpkgs-f867986f602459d4c73e6e2247738ea3804ea05e.zip |
chromiumOSPackages.{libchrome,libbrillo}: drop
These aren't needed for anything apart from the Sommelier demos (which we never build anyway) and are annoying and hard to keep building.
Diffstat (limited to 'pkgs/os-specific/linux/chromium-os')
13 files changed, 3 insertions, 567 deletions
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/default.nix b/pkgs/os-specific/linux/chromium-os/common-mk/default.nix index aad997b882c..946b2e73d2a 100644 --- a/pkgs/os-specific/linux/chromium-os/common-mk/default.nix +++ b/pkgs/os-specific/linux/chromium-os/common-mk/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitiles, upstreamInfo, gn, pkgconfig, python3, ninja -, libchrome +# , libchrome }: { platformSubdir @@ -73,7 +73,7 @@ stdenv.mkDerivation ({ ar = "ar"; cc = "cc"; cxx = "c++"; - libbase_ver = libchrome.version; + # libbase_ver = libchrome.version; libdir = placeholder "out"; pkg_config = "pkg-config"; platform2_root = "."; diff --git a/pkgs/os-specific/linux/chromium-os/default.nix b/pkgs/os-specific/linux/chromium-os/default.nix index cbe3c6ede1b..862e6f27b7b 100644 --- a/pkgs/os-specific/linux/chromium-os/default.nix +++ b/pkgs/os-specific/linux/chromium-os/default.nix @@ -25,10 +25,6 @@ let passthru.updateScript = ./update.py; }; - libbrillo = callPackage ./libbrillo { }; - - libchrome = callPackage ./libchrome { }; - linux_4_19 = callPackage ../kernel/linux-cros.nix { inherit (linux_4_19) kernelPatches; }; diff --git a/pkgs/os-specific/linux/chromium-os/libbrillo/0003-libbrillo-Use-a-unique_ptr-for-EVP_MD_CTX.patch b/pkgs/os-specific/linux/chromium-os/libbrillo/0003-libbrillo-Use-a-unique_ptr-for-EVP_MD_CTX.patch deleted file mode 100644 index 98257d98254..00000000000 --- a/pkgs/os-specific/linux/chromium-os/libbrillo/0003-libbrillo-Use-a-unique_ptr-for-EVP_MD_CTX.patch +++ /dev/null @@ -1,86 +0,0 @@ -From d79343f36918fd99861426f658fdfb53237661f0 Mon Sep 17 00:00:00 2001 -From: Daniel Kurtz <djkurtz@chromium.org> -Date: Thu, 17 Oct 2019 20:45:53 +1100 -Subject: [PATCH 03/10] libbrillo: Use a unique_ptr for EVP_MD_CTX - -In OpenSSL 1.1, the EVP_MD_CTX struct will become opaque, and therefore -it will not be possible to allocate on the stack. - -Replace this stack allocation with a heap allocated EVP_MD_CTX using the -existing OpenSSL 1.0.2 create/destroy APIs, and manage its lifetime using -a unique_ptr<>. - -Note: There are cases (sludge, tael, tatl), where libbrillo is built -against a libchrome that has been built w/out libbase-crypto (ie, -USE="-crypto"). For this reason, we don't use the equivalent -crypto::ScopedEVP_MD_CTX type for this one instance of this in libbrillo. - -BUG=chromium:737445 -TEST=cros_workon --board=sarien start libbrillo -TEST=w/ openssl-1.0.2t: FEATURES=test emerge-sarien libbrillo -TEST=w/ openssl-1.1.0j: FEATURES=test emerge-sarien libbrillo - => Both build and pass all unittests - -Change-Id: Ic0a43b9c85fcb967c1b381b1602c03f48ac5dcef -Reviewed-on: https://chromium-review.googlesource.com/1866378 -Tested-by: Daniel Kurtz <djkurtz@chromium.org> -Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> -Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> -Reviewed-by: Mike Frysinger <vapier@chromium.org> -Reviewed-by: Nick Crews <ncrews@chromium.org> ---- - libbrillo/policy/device_policy_impl.cc | 18 ++++++++---------- - 1 file changed, 8 insertions(+), 10 deletions(-) - -diff --git a/libbrillo/policy/device_policy_impl.cc b/libbrillo/policy/device_policy_impl.cc -index 958b7ebb7..eaf90c96a 100644 ---- a/libbrillo/policy/device_policy_impl.cc -+++ b/libbrillo/policy/device_policy_impl.cc -@@ -55,36 +55,34 @@ bool ReadPublicKeyFromFile(const base::FilePath& key_file, - bool VerifySignature(const std::string& signed_data, - const std::string& signature, - const std::string& public_key) { -- EVP_MD_CTX ctx; -- EVP_MD_CTX_init(&ctx); -+ std::unique_ptr<EVP_MD_CTX, void (*)(EVP_MD_CTX *)> ctx(EVP_MD_CTX_create(), -+ EVP_MD_CTX_destroy); -+ if (!ctx) -+ return false; - - const EVP_MD* digest = EVP_sha1(); - - char* key = const_cast<char*>(public_key.data()); - BIO* bio = BIO_new_mem_buf(key, public_key.length()); -- if (!bio) { -- EVP_MD_CTX_cleanup(&ctx); -+ if (!bio) - return false; -- } - - EVP_PKEY* public_key_ssl = d2i_PUBKEY_bio(bio, nullptr); - if (!public_key_ssl) { - BIO_free_all(bio); -- EVP_MD_CTX_cleanup(&ctx); - return false; - } - - const unsigned char* sig = - reinterpret_cast<const unsigned char*>(signature.data()); -- int rv = EVP_VerifyInit_ex(&ctx, digest, nullptr); -+ int rv = EVP_VerifyInit_ex(ctx.get(), digest, nullptr); - if (rv == 1) { -- EVP_VerifyUpdate(&ctx, signed_data.data(), signed_data.length()); -- rv = EVP_VerifyFinal(&ctx, sig, signature.length(), public_key_ssl); -+ EVP_VerifyUpdate(ctx.get(), signed_data.data(), signed_data.length()); -+ rv = EVP_VerifyFinal(ctx.get(), sig, signature.length(), public_key_ssl); - } - - EVP_PKEY_free(public_key_ssl); - BIO_free_all(bio); -- EVP_MD_CTX_cleanup(&ctx); - - return rv == 1; - } --- -2.24.1 - diff --git a/pkgs/os-specific/linux/chromium-os/libbrillo/0004-libbrillo-Update-for-OpenSSL-1.1.patch b/pkgs/os-specific/linux/chromium-os/libbrillo/0004-libbrillo-Update-for-OpenSSL-1.1.patch deleted file mode 100644 index 555daf7478c..00000000000 --- a/pkgs/os-specific/linux/chromium-os/libbrillo/0004-libbrillo-Update-for-OpenSSL-1.1.patch +++ /dev/null @@ -1,218 +0,0 @@ -From ad7338d648cfeffbd595e9a7681f746ce834d59e Mon Sep 17 00:00:00 2001 -From: Daniel Kurtz <djkurtz@chromium.org> -Date: Mon, 3 Jun 2019 16:46:17 -0600 -Subject: [PATCH 04/10] libbrillo: Update for OpenSSL 1.1 - -OpenSSL 1.1 has made significant non-backwards compatible changes to its -API as outlined in: -https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes - -Note: There are cases (sludge, tael, tatl), where libbrillo is built -against a libchrome that has been built w/out libbase-crypto (ie, -USE="-crypto"). For this reason, we don't use its libcrypto-compat.h. - -BUG=chromium:737445 -TEST=cros_workon --board=sarien start libbrillo -TEST=w/ openssl-1.0.2t: FEATURES=test emerge-sarien libbrillo -TEST=w/ openssl-1.1.0j: FEATURES=test emerge-sarien libbrillo - => Both build and pass all unittests - -Change-Id: I911c733e63ccbe58b7d9ef6d8e84c9e121056725 -Reviewed-on: https://chromium-review.googlesource.com/1641754 -Tested-by: Daniel Kurtz <djkurtz@chromium.org> -Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> -Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> -Reviewed-by: Mike Frysinger <vapier@chromium.org> -Reviewed-by: Nick Crews <ncrews@chromium.org> ---- - .../brillo/streams/openssl_stream_bio.cc | 75 ++++++++++++++++--- - libbrillo/brillo/streams/tls_stream.cc | 7 +- - libbrillo/policy/device_policy_impl.cc | 10 ++- - 3 files changed, 77 insertions(+), 15 deletions(-) - -diff --git a/libbrillo/brillo/streams/openssl_stream_bio.cc b/libbrillo/brillo/streams/openssl_stream_bio.cc -index a63d9c0cc..478b11233 100644 ---- a/libbrillo/brillo/streams/openssl_stream_bio.cc -+++ b/libbrillo/brillo/streams/openssl_stream_bio.cc -@@ -13,9 +13,32 @@ namespace brillo { - - namespace { - -+// TODO(crbug.com/984789): Remove once support for OpenSSL <1.1 is dropped. -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+static void BIO_set_data(BIO* a, void* ptr) { -+ a->ptr = ptr; -+} -+ -+static void* BIO_get_data(BIO* a) { -+ return a->ptr; -+} -+ -+static void BIO_set_init(BIO* a, int init) { -+ a->init = init; -+} -+ -+static int BIO_get_init(BIO* a) { -+ return a->init; -+} -+ -+static void BIO_set_shutdown(BIO* a, int shut) { -+ a->shutdown = shut; -+} -+#endif -+ - // Internal functions for implementing OpenSSL BIO on brillo::Stream. - int stream_write(BIO* bio, const char* buf, int size) { -- brillo::Stream* stream = static_cast<brillo::Stream*>(bio->ptr); -+ brillo::Stream* stream = static_cast<brillo::Stream*>(BIO_get_data(bio)); - size_t written = 0; - BIO_clear_retry_flags(bio); - if (!stream->WriteNonBlocking(buf, size, &written, nullptr)) -@@ -30,7 +53,7 @@ int stream_write(BIO* bio, const char* buf, int size) { - } - - int stream_read(BIO* bio, char* buf, int size) { -- brillo::Stream* stream = static_cast<brillo::Stream*>(bio->ptr); -+ brillo::Stream* stream = static_cast<brillo::Stream*>(BIO_get_data(bio)); - size_t read = 0; - BIO_clear_retry_flags(bio); - bool eos = false; -@@ -49,16 +72,16 @@ int stream_read(BIO* bio, char* buf, int size) { - // NOLINTNEXTLINE(runtime/int) - long stream_ctrl(BIO* bio, int cmd, long /* num */, void* /* ptr */) { - if (cmd == BIO_CTRL_FLUSH) { -- brillo::Stream* stream = static_cast<brillo::Stream*>(bio->ptr); -+ brillo::Stream* stream = static_cast<brillo::Stream*>(BIO_get_data(bio)); - return stream->FlushBlocking(nullptr) ? 1 : 0; - } - return 0; - } - - int stream_new(BIO* bio) { -- bio->shutdown = 0; // By default do not close underlying stream on shutdown. -- bio->init = 0; -- bio->num = -1; // not used. -+ // By default do not close underlying stream on shutdown. -+ BIO_set_shutdown(bio, 0); -+ BIO_set_init(bio, 0); - return 1; - } - -@@ -66,13 +89,17 @@ int stream_free(BIO* bio) { - if (!bio) - return 0; - -- if (bio->init) { -- bio->ptr = nullptr; -- bio->init = 0; -+ if (BIO_get_init(bio)) { -+ BIO_set_data(bio, nullptr); -+ BIO_set_init(bio, 0); - } - return 1; - } - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+// TODO(crbug.com/984789): Remove #ifdef once support for OpenSSL <1.1 is -+// dropped. -+ - // BIO_METHOD structure describing the BIO built on top of brillo::Stream. - BIO_METHOD stream_method = { - 0x7F | BIO_TYPE_SOURCE_SINK, // type: 0x7F is an arbitrary unused type ID. -@@ -87,13 +114,37 @@ BIO_METHOD stream_method = { - nullptr, // callback function, not used - }; - -+BIO_METHOD* stream_get_method() { -+ return &stream_method; -+} -+ -+#else -+ -+BIO_METHOD* stream_get_method() { -+ static BIO_METHOD* stream_method; -+ -+ if (!stream_method) { -+ stream_method = BIO_meth_new(BIO_get_new_index() | BIO_TYPE_SOURCE_SINK, -+ "stream"); -+ BIO_meth_set_write(stream_method, stream_write); -+ BIO_meth_set_read(stream_method, stream_read); -+ BIO_meth_set_ctrl(stream_method, stream_ctrl); -+ BIO_meth_set_create(stream_method, stream_new); -+ BIO_meth_set_destroy(stream_method, stream_free); -+ } -+ -+ return stream_method; -+} -+ -+#endif -+ - } // anonymous namespace - - BIO* BIO_new_stream(brillo::Stream* stream) { -- BIO* bio = BIO_new(&stream_method); -+ BIO* bio = BIO_new(stream_get_method()); - if (bio) { -- bio->ptr = stream; -- bio->init = 1; -+ BIO_set_data(bio, stream); -+ BIO_set_init(bio, 1); - } - return bio; - } -diff --git a/libbrillo/brillo/streams/tls_stream.cc b/libbrillo/brillo/streams/tls_stream.cc -index 603bd1d54..cc63258db 100644 ---- a/libbrillo/brillo/streams/tls_stream.cc -+++ b/libbrillo/brillo/streams/tls_stream.cc -@@ -68,6 +68,11 @@ const char kCACertificatePath[] = - - namespace brillo { - -+// TODO(crbug.com/984789): Remove once support for OpenSSL <1.1 is dropped. -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#define TLS_client_method() TLSv1_2_client_method() -+#endif -+ - // Helper implementation of TLS stream used to hide most of OpenSSL inner - // workings from the users of brillo::TlsStream. - class TlsStream::TlsStreamImpl { -@@ -342,7 +347,7 @@ bool TlsStream::TlsStreamImpl::Init(StreamPtr socket, - const base::Closure& success_callback, - const Stream::ErrorCallback& error_callback, - ErrorPtr* error) { -- ctx_.reset(SSL_CTX_new(TLSv1_2_client_method())); -+ ctx_.reset(SSL_CTX_new(TLS_client_method())); - if (!ctx_) - return ReportError(error, FROM_HERE, "Cannot create SSL_CTX"); - -diff --git a/libbrillo/policy/device_policy_impl.cc b/libbrillo/policy/device_policy_impl.cc -index eaf90c96a..3f96d12ee 100644 ---- a/libbrillo/policy/device_policy_impl.cc -+++ b/libbrillo/policy/device_policy_impl.cc -@@ -30,6 +30,12 @@ namespace em = enterprise_management; - - namespace policy { - -+// TODO(crbug.com/984789): Remove once support for OpenSSL <1.1 is dropped. -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#define EVP_MD_CTX_new EVP_MD_CTX_create -+#define EVP_MD_CTX_free EVP_MD_CTX_destroy -+#endif -+ - // Maximum value of RollbackAllowedMilestones policy. - const int kMaxRollbackAllowedMilestones = 4; - -@@ -55,8 +61,8 @@ bool ReadPublicKeyFromFile(const base::FilePath& key_file, - bool VerifySignature(const std::string& signed_data, - const std::string& signature, - const std::string& public_key) { -- std::unique_ptr<EVP_MD_CTX, void (*)(EVP_MD_CTX *)> ctx(EVP_MD_CTX_create(), -- EVP_MD_CTX_destroy); -+ std::unique_ptr<EVP_MD_CTX, void (*)(EVP_MD_CTX *)> ctx(EVP_MD_CTX_new(), -+ EVP_MD_CTX_free); - if (!ctx) - return false; - --- -2.24.1 - diff --git a/pkgs/os-specific/linux/chromium-os/libbrillo/0005-libbrillo-fix-build-with-relative-platform2_root.patch b/pkgs/os-specific/linux/chromium-os/libbrillo/0005-libbrillo-fix-build-with-relative-platform2_root.patch deleted file mode 100644 index a4f24ae02a4..00000000000 --- a/pkgs/os-specific/linux/chromium-os/libbrillo/0005-libbrillo-fix-build-with-relative-platform2_root.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ee36a284641d9ac2b412bba3738729fd5b969f42 Mon Sep 17 00:00:00 2001 -From: Alyssa Ross <hi@alyssa.is> -Date: Sun, 1 Dec 2019 22:11:39 +0000 -Subject: [PATCH 05/10] libbrillo: fix build with relative platform2_root - ---- - libbrillo/BUILD.gn | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/libbrillo/BUILD.gn b/libbrillo/BUILD.gn -index 6739def9c..75b6da6f2 100644 ---- a/libbrillo/BUILD.gn -+++ b/libbrillo/BUILD.gn -@@ -360,7 +360,8 @@ shared_library("libpolicy-${libbase_ver}") { - "openssl", - "protobuf-lite", - ] -- ldflags = [ "-Wl,--version-script,${platform2_root}/libbrillo/libpolicy.ver" ] -+ libpolicy_ver = rebase_path("//libbrillo/libpolicy.ver") -+ ldflags = [ "-Wl,--version-script,${libpolicy_ver}" ] - sources = [ - "policy/device_policy.cc", - "policy/device_policy_impl.cc", --- -2.24.1 - diff --git a/pkgs/os-specific/linux/chromium-os/libbrillo/0006-libbrillo-don-t-leak-source-absolute-paths.patch b/pkgs/os-specific/linux/chromium-os/libbrillo/0006-libbrillo-don-t-leak-source-absolute-paths.patch deleted file mode 100644 index 964f8b1f8c3..00000000000 --- a/pkgs/os-specific/linux/chromium-os/libbrillo/0006-libbrillo-don-t-leak-source-absolute-paths.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 5c95aae10ef7968ab2d9cbdf1456798dc8f94890 Mon Sep 17 00:00:00 2001 -From: Alyssa Ross <hi@alyssa.is> -Date: Sun, 1 Dec 2019 14:55:21 +0000 -Subject: [PATCH 06/10] libbrillo: don't leak source-absolute paths - ---- - libbrillo/BUILD.gn | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -diff --git a/libbrillo/BUILD.gn b/libbrillo/BUILD.gn -index 75b6da6f2..a3a25865b 100644 ---- a/libbrillo/BUILD.gn -+++ b/libbrillo/BUILD.gn -@@ -265,10 +265,9 @@ action("libbrillo-${libbase_ver}") { - deps += [ ":lib" + sublib.library_name ] - } - script = "//common-mk/write_args.py" -- outputs = [ -- "${root_out_dir}/lib/libbrillo-${libbase_ver}.so", -- ] -- args = [ "--output" ] + outputs + [ "--" ] + [ -+ lib_path = "${root_out_dir}/lib/libbrillo-${libbase_ver}.so" -+ outputs = [ lib_path ] -+ args = [ "--output", rebase_path(lib_path), "--", - "GROUP", - "(", - "AS_NEEDED", --- -2.24.1 - diff --git a/pkgs/os-specific/linux/chromium-os/libbrillo/0007-libbrillo-fix-build-with-no-__has_feature.patch b/pkgs/os-specific/linux/chromium-os/libbrillo/0007-libbrillo-fix-build-with-no-__has_feature.patch deleted file mode 100644 index bdd8ed296e7..00000000000 --- a/pkgs/os-specific/linux/chromium-os/libbrillo/0007-libbrillo-fix-build-with-no-__has_feature.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 268494087143b570af36bf7c4fe891108ea839db Mon Sep 17 00:00:00 2001 -From: Alyssa Ross <hi@alyssa.is> -Date: Sun, 1 Dec 2019 14:57:01 +0000 -Subject: [PATCH 07/10] libbrillo: fix build with no __has_feature - ---- - libbrillo/brillo/asan.h | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/libbrillo/brillo/asan.h b/libbrillo/brillo/asan.h -index d29932a82..0d707467f 100644 ---- a/libbrillo/brillo/asan.h -+++ b/libbrillo/brillo/asan.h -@@ -7,13 +7,17 @@ - #ifndef LIBBRILLO_BRILLO_ASAN_H_ - #define LIBBRILLO_BRILLO_ASAN_H_ - --#if defined(__has_feature) && __has_feature(address_sanitizer) -+#if defined(__has_feature) -+#if __has_feature(address_sanitizer) - // ASan is enabled. - #define BRILLO_ASAN_BUILD 1 - // Provide BRILLO_DISABLE_ASAN hook to disable ASan. - // Put this in front on functions or global variables where required. - #define BRILLO_DISABLE_ASAN __attribute__((no_sanitize("address"))) --#else -+#endif -+#endif -+ -+#ifndef BRILLO_DISABLE_ASAN - #define BRILLO_DISABLE_ASAN - #endif - --- -2.24.1 - diff --git a/pkgs/os-specific/linux/chromium-os/libbrillo/default.nix b/pkgs/os-specific/linux/chromium-os/libbrillo/default.nix deleted file mode 100644 index b5eda91ffb8..00000000000 --- a/pkgs/os-specific/linux/chromium-os/libbrillo/default.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ common-mk, lib -, dbus_cplusplus, go-protobuf, protofiles, dbus-interfaces -, libchrome, curl, minijail, protobuf, glib, gtest, modp_b64 -}: - -common-mk { - platformSubdir = "libbrillo"; - - platform2Patches = [ - ./0003-libbrillo-Use-a-unique_ptr-for-EVP_MD_CTX.patch - ./0004-libbrillo-Update-for-OpenSSL-1.1.patch - ./0005-libbrillo-fix-build-with-relative-platform2_root.patch - ./0006-libbrillo-don-t-leak-source-absolute-paths.patch - ./0007-libbrillo-fix-build-with-no-__has_feature.patch - ]; - - nativeBuildInputs = [ dbus_cplusplus go-protobuf ]; - buildInputs = [ libchrome curl minijail protobuf glib gtest modp_b64 ]; - - NIX_CFLAGS_COMPILE = [ - "-Wno-error=sign-compare" - "-Wno-error=stringop-truncation" - ]; - - postPatch = '' - substituteInPlace common-mk/external_dependencies/BUILD.gn \ - --replace '"''${sysroot}/usr/share/policy_tools"' '"${protofiles}/share/policy_tools"' \ - --replace '"''${sysroot}/usr/share/policy_resources"' '"${protofiles}/share/policy_resources"' \ - --replace '"''${sysroot}/usr/share/dbus-1/interfaces/"' '"${dbus-interfaces}/share/dbus-1/interfaces/"' \ - --replace '"''${sysroot}/usr/include/proto"' '"${protofiles}/include/proto"' \ - --replace '"''${sysroot}/usr/share/protofiles"' '"${protofiles}/share/protofiles"' - ''; - - installPhase = '' - mkdir -p $out/lib/pkgconfig $out/include/install_attributes - - install lib/*.so $out/lib - install libbrillo*.a $out/lib - install -m 0644 obj/libbrillo/*.pc $out/lib/pkgconfig - - pushd ../../libbrillo - find brillo policy -name '*.h' -print0 \ - | xargs -t -0 tar -c \ - | tar -C $out/include -x - install -m 0644 install_attributes/libinstallattributes.h \ - $out/include/install_attributes - popd - ''; - - meta = with lib; { - description = "Chromium OS utility library"; - maintainers = with maintainers; [ qyliss ]; - }; -} diff --git a/pkgs/os-specific/linux/chromium-os/libchrome/0001-Don-t-leak-source-absolute-paths-to-subprocesses.patch b/pkgs/os-specific/linux/chromium-os/libchrome/0001-Don-t-leak-source-absolute-paths-to-subprocesses.patch deleted file mode 100644 index da58c4b15a7..00000000000 --- a/pkgs/os-specific/linux/chromium-os/libchrome/0001-Don-t-leak-source-absolute-paths-to-subprocesses.patch +++ /dev/null @@ -1,40 +0,0 @@ -From a4499cdec93f1b1fd8c2a9db02244d667d9c7e11 Mon Sep 17 00:00:00 2001 -From: Alyssa Ross <hi@alyssa.is> -Date: Wed, 27 Nov 2019 17:10:18 +0000 -Subject: [PATCH] Don't leak source-absolute paths to subprocesses - ---- - BUILD.gn | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/BUILD.gn b/BUILD.gn -index 4477a86..5869e1f 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -466,8 +466,9 @@ action("base") { - } - - script = "//common-mk/write_args.py" -- outputs = [ "${root_out_dir}/lib/lib${target_name}-${libbase_ver}.so" ] -- args = [ "--output" ] + outputs + [ "--" ] + [ -+ lib_path = "${root_out_dir}/lib/lib${target_name}-${libbase_ver}.so" -+ outputs = [ lib_path ] -+ args = [ "--output", rebase_path(lib_path), "--" ] + [ - "GROUP", "(", "AS_NEEDED", "(", - ] - foreach(attr, libbase_sublibs) { -@@ -524,8 +525,9 @@ action("base-test") { - } - - script = "//common-mk/write_args.py" -- outputs = [ "${root_out_dir}/lib${target_name}-${libbase_ver}.a" ] -- args = [ "--output" ] + outputs + [ "--" ] + [ -+ lib_path = "${root_out_dir}/lib/lib${target_name}-${libbase_ver}.so" -+ outputs = [ lib_path ] -+ args = [ "--output", rebase_path(lib_path), "--" ] + [ - "GROUP", "(", "AS_NEEDED", "(", - ] - foreach(attr, libbase_sublibs) { --- -2.23.0 - diff --git a/pkgs/os-specific/linux/chromium-os/libchrome/default.nix b/pkgs/os-specific/linux/chromium-os/libchrome/default.nix deleted file mode 100644 index 3aae238e243..00000000000 --- a/pkgs/os-specific/linux/chromium-os/libchrome/default.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ common-mk, stdenv, lib, fetchFromGitiles, upstreamInfo -, glib, libevent, gmock, modp_b64, chromiumos-overlay -}: - -let - versionData = upstreamInfo.components."aosp/platform/external/libchrome"; -in - -common-mk rec { - platformSubdir = "libchrome"; - inherit (versionData) version; - - src = fetchFromGitiles { inherit (versionData) name url rev sha256; }; - - NIX_CFLAGS_COMPILE = [ - "-Wno-error=attributes" - "-Wno-error=dangling-else" - "-Wno-error=implicit-fallthrough" - "-Wno-error=unused-function" - ]; - - buildInputs = [ glib libevent gmock modp_b64 ]; - - patches = [ - ./0001-Don-t-leak-source-absolute-paths-to-subprocesses.patch - "${chromiumos-overlay}/chromeos-base/libchrome/files/libchrome-462023-Introduce-ValueReferenceAdapter-for-gracef.patch" - "${chromiumos-overlay}/chromeos-base/libchrome/files/libchrome-462023-libchrome-add-alias-from-base-Location-base-GetProgr.patch" - ]; - - postPatch = '' - substituteInPlace libchrome/BUILD.gn \ - --replace '/usr/include/base-''${libbase_ver}' \ - "$out/include/base-\''${libbase_ver}" - '' + (if stdenv.cc.isClang then '' - substituteInPlace libchrome/BUILD.gn \ - --replace '"-Xclang-only=-Wno-char-subscripts",' "" - '' else '' - substituteInPlace libchrome/BUILD.gn \ - --replace "-Xclang-only=" "" \ - --replace '"-Wno-deprecated-register",' "" - ''); - - installPhase = '' - mkdir -p $out/lib/pkgconfig - install lib/libbase*-$version.so $out/lib - install obj/libchrome/libchrome*-$version.pc $out/lib/pkgconfig - - pushd ../../libchrome - mkdir -p $out/include/base-$version - find . -name '*.h' -print0 \ - | xargs -0 tar -c \ - | tar -C $out/include/base-$version -x - popd - ''; - - meta = with lib; { - description = "Chromium project utility library"; - license = licenses.bsd3; - maintainers = with maintainers; [ qyliss ]; - platform = platforms.all; - }; -} diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/default.nix b/pkgs/os-specific/linux/chromium-os/sommelier/default.nix index 2a1790bfa6d..6a5e292b3fb 100644 --- a/pkgs/os-specific/linux/chromium-os/sommelier/default.nix +++ b/pkgs/os-specific/linux/chromium-os/sommelier/default.nix @@ -1,6 +1,6 @@ { common-mk, lib , mesa, grpc, openssl, libdrm, xlibs, protobuf, wayland, libxkbcommon, vm_protos -, libbrillo, libchrome, linuxHeaders, c-ares, zlib +, linuxHeaders, c-ares, zlib }: common-mk { diff --git a/pkgs/os-specific/linux/chromium-os/update.py b/pkgs/os-specific/linux/chromium-os/update.py index 2601aaabaca..cf3072d2315 100755 --- a/pkgs/os-specific/linux/chromium-os/update.py +++ b/pkgs/os-specific/linux/chromium-os/update.py @@ -14,7 +14,6 @@ from urllib.request import urlopen # ChromiumOS components used in Nixpkgs components = [ - 'aosp/platform/external/libchrome', 'aosp/platform/external/modp_b64', 'chromiumos/overlays/chromiumos-overlay', 'chromiumos/platform/crosvm', diff --git a/pkgs/os-specific/linux/chromium-os/upstream-info.json b/pkgs/os-specific/linux/chromium-os/upstream-info.json index ad71bb0f0a3..180da1b85c3 100644 --- a/pkgs/os-specific/linux/chromium-os/upstream-info.json +++ b/pkgs/os-specific/linux/chromium-os/upstream-info.json @@ -1,13 +1,6 @@ { "version": "79.12607.0.0-rc4", "components": { - "aosp/platform/external/libchrome": { - "name": "libchrome", - "url": "https://chromium.googlesource.com/aosp/platform/external/libchrome", - "rev": "78e77b7f04d2d1be4868a9696c30e38be73b37cc", - "sha256": "0fq394hwdfi7zfiakcr4nqr40v6lajznq7ix6pgngd8fa8wrjmkr", - "version": "462023" - }, "aosp/platform/external/modp_b64": { "name": "modp_b64", "url": "https://chromium.googlesource.com/aosp/platform/external/modp_b64", |