From patchwork Mon Jul 18 14:48:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10317 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6FF3CCA482 for ; Mon, 18 Jul 2022 14:49:32 +0000 (UTC) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mx.groups.io with SMTP id smtpd.web11.28045.1658155762670276198 for ; Mon, 18 Jul 2022 07:49:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=mPOtfzey; spf=softfail (domain: sakoman.com, ip: 209.85.214.182, mailfrom: steve@sakoman.com) Received: by mail-pl1-f182.google.com with SMTP id y15so4496016plp.10 for ; Mon, 18 Jul 2022 07:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=qTwciNPrJU35l+09B9K4AzP3ILJJe7qp9TvUU+uOpXw=; b=mPOtfzeyD+M+wmHz/i52SuVwfOcg6DA8SES4aaB+Cs8yWcDIZ+tDakLP7QU4lFTtxm KG4Q+deuKFbmGFXGwc8m1s+xoelhKCzyixiZRVVJbpJXVZs0z4ucvz/+0I5kkdqIQtx+ 8bz7xb3+cepCJoE8/WvnlbiVBGKB+bKYpgRw8Hm75pbyxd8JcnrIprzkb/BK6Wuoid8q 7B+KTyLr0BcvgedR8IQhHWswkg1SRf/kMMhTNK0+l7ZwfV5wH+Sy+PKdhqSvQnTzO3xB I50FzMKgYUj/gMqTbo3+pqfCj5Lfse/T0WLiQ5/Rpb0mG1a/+sR0IOPthhyh2ME9piof lNoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qTwciNPrJU35l+09B9K4AzP3ILJJe7qp9TvUU+uOpXw=; b=7/yko4N/vcG39ctCt4lTkCqhneV49bncj1NaLQvsV1cerzLtM37dNmUbyXs9DLJKHE RRK1qv/odvUCfB9awEp9oTAbT1rjseO9armBu07713NYtHFwGMm2qZseVWb8d5Rao8K6 zmY455PXnIkPSM2WCpMyeOXDZbCjS2MTAspLHeXidyn+jewEoQob6/SaUR8jfEnLhhWM y5lmgXAvQIBzU+X21eaCNxZN8So3zi86c8y1+8aKq5qcaTxMF0JS+TLriGqcwzKBCC3e 9kq1D2/OfMNqbv4zpMNsV3R4IwV2pnGFELttqFxQUAP/YjvkHtkqTJpEmn+Iv4xuEtUn oS+A== X-Gm-Message-State: AJIora+8h/tqMWOPysthgdQJS/VlKAyXZg5YrCx/FEzFyAQBk+rgYVpL aNPmn/Lo7kGoQjfxokdnSbVgxSsz/RNB+QnU X-Google-Smtp-Source: AGRyM1t7uLp5ArJax1BNz+O/1e5mezHPJnVr6d8uy3AyV5+qWxlwkV1mo3jnWhnf8b729xTrpOtdqw== X-Received: by 2002:a17:90b:1914:b0:1f0:23f8:1d3e with SMTP id mp20-20020a17090b191400b001f023f81d3emr38845914pjb.60.1658155761138; Mon, 18 Jul 2022 07:49:21 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:20 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 01/35] curl: Fix multiple CVEs Date: Mon, 18 Jul 2022 04:48:26 -1000 Message-Id: <2749916ff534aecfd2a7871268b1166e5bb5bca4.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:49:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168201 From: Robert Joslyn Backport fixes for: * CVE-2022-32205 - https://curl.se/docs/CVE-2022-32205.html * CVE-2022-32206 - https://curl.se/docs/CVE-2022-32206.html * CVE-2022-32207 - https://curl.se/docs/CVE-2022-32207.html * CVE-2022-32208 - https://curl.se/docs/CVE-2022-32208.html Signed-off-by: Robert Joslyn Signed-off-by: Steve Sakoman --- .../curl/curl/CVE-2022-32205.patch | 174 +++++++++++ .../curl/curl/CVE-2022-32206.patch | 51 ++++ .../curl/curl/CVE-2022-32207.patch | 283 ++++++++++++++++++ .../curl/curl/CVE-2022-32208.patch | 67 +++++ meta/recipes-support/curl/curl_7.82.0.bb | 4 + 5 files changed, 579 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2022-32205.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2022-32206.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2022-32207.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2022-32208.patch diff --git a/meta/recipes-support/curl/curl/CVE-2022-32205.patch b/meta/recipes-support/curl/curl/CVE-2022-32205.patch new file mode 100644 index 0000000000..165fd8af47 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2022-32205.patch @@ -0,0 +1,174 @@ +From a91c22a072cbb32e296f1efba3502f1b7775dfaf Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Sun, 26 Jun 2022 11:00:48 +0200 +Subject: [PATCH] cookie: apply limits + +- Send no more than 150 cookies per request +- Cap the max length used for a cookie: header to 8K +- Cap the max number of received Set-Cookie: headers to 50 + +Bug: https://curl.se/docs/CVE-2022-32205.html +CVE-2022-32205 +Reported-by: Harry Sintonen +Closes #9048 + +Upstream-Status: Backport [https://github.com/curl/curl/commit/48d7064a49148f0394] +Signed-off-by: Robert Joslyn +--- + lib/cookie.c | 14 ++++++++++++-- + lib/cookie.h | 21 +++++++++++++++++++-- + lib/http.c | 13 +++++++++++-- + lib/urldata.h | 1 + + 4 files changed, 43 insertions(+), 6 deletions(-) + +diff --git a/lib/cookie.c b/lib/cookie.c +index 1b8c8f9..8a6aa1a 100644 +--- a/lib/cookie.c ++++ b/lib/cookie.c +@@ -477,6 +477,10 @@ Curl_cookie_add(struct Curl_easy *data, + (void)data; + #endif + ++ DEBUGASSERT(MAX_SET_COOKIE_AMOUNT <= 255); /* counter is an unsigned char */ ++ if(data->req.setcookies >= MAX_SET_COOKIE_AMOUNT) ++ return NULL; ++ + /* First, alloc and init a new struct for it */ + co = calloc(1, sizeof(struct Cookie)); + if(!co) +@@ -816,7 +820,7 @@ Curl_cookie_add(struct Curl_easy *data, + freecookie(co); + return NULL; + } +- ++ data->req.setcookies++; + } + else { + /* +@@ -1354,7 +1358,8 @@ static struct Cookie *dup_cookie(struct Cookie *src) + * + * It shall only return cookies that haven't expired. + */ +-struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, ++struct Cookie *Curl_cookie_getlist(struct Curl_easy *data, ++ struct CookieInfo *c, + const char *host, const char *path, + bool secure) + { +@@ -1409,6 +1414,11 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, + mainco = newco; + + matches++; ++ if(matches >= MAX_COOKIE_SEND_AMOUNT) { ++ infof(data, "Included max number of cookies (%u) in request!", ++ matches); ++ break; ++ } + } + else + goto fail; +diff --git a/lib/cookie.h b/lib/cookie.h +index 0ffe08e..7411980 100644 +--- a/lib/cookie.h ++++ b/lib/cookie.h +@@ -81,10 +81,26 @@ struct CookieInfo { + */ + #define MAX_COOKIE_LINE 5000 + +-/* This is the maximum length of a cookie name or content we deal with: */ ++/* Maximum length of an incoming cookie name or content we deal with. Longer ++ cookies are ignored. */ + #define MAX_NAME 4096 + #define MAX_NAME_TXT "4095" + ++/* Maximum size for an outgoing cookie line libcurl will use in an http ++ request. This is the default maximum length used in some versions of Apache ++ httpd. */ ++#define MAX_COOKIE_HEADER_LEN 8190 ++ ++/* Maximum number of cookies libcurl will send in a single request, even if ++ there might be more cookies that match. One reason to cap the number is to ++ keep the maximum HTTP request within the maximum allowed size. */ ++#define MAX_COOKIE_SEND_AMOUNT 150 ++ ++/* Maximum number of Set-Cookie: lines accepted in a single response. If more ++ such header lines are received, they are ignored. This value must be less ++ than 256 since an unsigned char is used to count. */ ++#define MAX_SET_COOKIE_AMOUNT 50 ++ + struct Curl_easy; + /* + * Add a cookie to the internal list of cookies. The domain and path arguments +@@ -97,7 +113,8 @@ struct Cookie *Curl_cookie_add(struct Curl_easy *data, + const char *domain, const char *path, + bool secure); + +-struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, const char *host, ++struct Cookie *Curl_cookie_getlist(struct Curl_easy *data, ++ struct CookieInfo *c, const char *host, + const char *path, bool secure); + void Curl_cookie_freelist(struct Cookie *cookies); + void Curl_cookie_clearall(struct CookieInfo *cookies); +diff --git a/lib/http.c b/lib/http.c +index 4433824..2c8b0c4 100644 +--- a/lib/http.c ++++ b/lib/http.c +@@ -2709,12 +2709,14 @@ CURLcode Curl_http_bodysend(struct Curl_easy *data, struct connectdata *conn, + } + + #if !defined(CURL_DISABLE_COOKIES) ++ + CURLcode Curl_http_cookies(struct Curl_easy *data, + struct connectdata *conn, + struct dynbuf *r) + { + CURLcode result = CURLE_OK; + char *addcookies = NULL; ++ bool linecap = FALSE; + if(data->set.str[STRING_COOKIE] && + !Curl_checkheaders(data, STRCONST("Cookie"))) + addcookies = data->set.str[STRING_COOKIE]; +@@ -2732,7 +2734,7 @@ CURLcode Curl_http_cookies(struct Curl_easy *data, + !strcmp(host, "127.0.0.1") || + !strcmp(host, "[::1]") ? TRUE : FALSE; + Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); +- co = Curl_cookie_getlist(data->cookies, host, data->state.up.path, ++ co = Curl_cookie_getlist(data, data->cookies, host, data->state.up.path, + secure_context); + Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); + } +@@ -2746,6 +2748,13 @@ CURLcode Curl_http_cookies(struct Curl_easy *data, + if(result) + break; + } ++ if((Curl_dyn_len(r) + strlen(co->name) + strlen(co->value) + 1) >= ++ MAX_COOKIE_HEADER_LEN) { ++ infof(data, "Restricted outgoing cookies due to header size, " ++ "'%s' not sent", co->name); ++ linecap = TRUE; ++ break; ++ } + result = Curl_dyn_addf(r, "%s%s=%s", count?"; ":"", + co->name, co->value); + if(result) +@@ -2756,7 +2765,7 @@ CURLcode Curl_http_cookies(struct Curl_easy *data, + } + Curl_cookie_freelist(store); + } +- if(addcookies && !result) { ++ if(addcookies && !result && !linecap) { + if(!count) + result = Curl_dyn_addn(r, STRCONST("Cookie: ")); + if(!result) { +diff --git a/lib/urldata.h b/lib/urldata.h +index e006495..54faf7d 100644 +--- a/lib/urldata.h ++++ b/lib/urldata.h +@@ -707,6 +707,7 @@ struct SingleRequest { + #ifndef CURL_DISABLE_DOH + struct dohdata *doh; /* DoH specific data for this request */ + #endif ++ unsigned char setcookies; + BIT(header); /* incoming data has HTTP header */ + BIT(content_range); /* set TRUE if Content-Range: was found */ + BIT(upload_done); /* set to TRUE when doing chunked transfer-encoding diff --git a/meta/recipes-support/curl/curl/CVE-2022-32206.patch b/meta/recipes-support/curl/curl/CVE-2022-32206.patch new file mode 100644 index 0000000000..25f5b27cc7 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2022-32206.patch @@ -0,0 +1,51 @@ +From e12531340b03d242d3f892aa8797faf12b56dddf Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Mon, 16 May 2022 16:28:13 +0200 +Subject: [PATCH] content_encoding: return error on too many compression steps + +The max allowed steps is arbitrarily set to 5. + +Bug: https://curl.se/docs/CVE-2022-32206.html +CVE-2022-32206 +Reported-by: Harry Sintonen +Closes #9049 + +Upstream-Status: Backport [https://github.com/curl/curl/commit/3a09fbb7f264c67c43] +Signed-off-by: Robert Joslyn +--- + lib/content_encoding.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/lib/content_encoding.c b/lib/content_encoding.c +index c03637a..6f994b3 100644 +--- a/lib/content_encoding.c ++++ b/lib/content_encoding.c +@@ -1026,12 +1026,16 @@ static const struct content_encoding *find_encoding(const char *name, + return NULL; + } + ++/* allow no more than 5 "chained" compression steps */ ++#define MAX_ENCODE_STACK 5 ++ + /* Set-up the unencoding stack from the Content-Encoding header value. + * See RFC 7231 section 3.1.2.2. */ + CURLcode Curl_build_unencoding_stack(struct Curl_easy *data, + const char *enclist, int maybechunked) + { + struct SingleRequest *k = &data->req; ++ int counter = 0; + + do { + const char *name; +@@ -1066,6 +1070,11 @@ CURLcode Curl_build_unencoding_stack(struct Curl_easy *data, + if(!encoding) + encoding = &error_encoding; /* Defer error at stack use. */ + ++ if(++counter >= MAX_ENCODE_STACK) { ++ failf(data, "Reject response due to %u content encodings", ++ counter); ++ return CURLE_BAD_CONTENT_ENCODING; ++ } + /* Stack the unencoding stage. */ + writer = new_unencoding_writer(data, encoding, k->writer_stack); + if(!writer) diff --git a/meta/recipes-support/curl/curl/CVE-2022-32207.patch b/meta/recipes-support/curl/curl/CVE-2022-32207.patch new file mode 100644 index 0000000000..bc16b62f39 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2022-32207.patch @@ -0,0 +1,283 @@ +From 759088694e2ba68ddc5ffe042b071dadad6ff675 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Wed, 25 May 2022 10:09:53 +0200 +Subject: [PATCH] fopen: add Curl_fopen() for better overwriting of files + +Bug: https://curl.se/docs/CVE-2022-32207.html +CVE-2022-32207 +Reported-by: Harry Sintonen +Closes #9050 + +Upstream-Status: Backport [https://github.com/curl/curl/commit/20f9dd6bae50b] +Signed-off-by: Robert Joslyn +--- + CMakeLists.txt | 1 + + configure.ac | 1 + + lib/Makefile.inc | 2 + + lib/cookie.c | 19 ++----- + lib/curl_config.h.cmake | 3 ++ + lib/fopen.c | 113 ++++++++++++++++++++++++++++++++++++++++ + lib/fopen.h | 30 +++++++++++ + 7 files changed, 154 insertions(+), 15 deletions(-) + create mode 100644 lib/fopen.c + create mode 100644 lib/fopen.h + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b77de6d..a0bfaad 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1027,6 +1027,7 @@ elseif(HAVE_LIBSOCKET) + set(CMAKE_REQUIRED_LIBRARIES socket) + endif() + ++check_symbol_exists(fchmod "${CURL_INCLUDES}" HAVE_FCHMOD) + check_symbol_exists(basename "${CURL_INCLUDES}" HAVE_BASENAME) + check_symbol_exists(socket "${CURL_INCLUDES}" HAVE_SOCKET) + check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT) +diff --git a/configure.ac b/configure.ac +index d431870..7433bb9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3351,6 +3351,7 @@ AC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Se + + + AC_CHECK_FUNCS([fnmatch \ ++ fchmod \ + geteuid \ + getpass_r \ + getppid \ +diff --git a/lib/Makefile.inc b/lib/Makefile.inc +index e8f110f..5139b03 100644 +--- a/lib/Makefile.inc ++++ b/lib/Makefile.inc +@@ -133,6 +133,7 @@ LIB_CFILES = \ + escape.c \ + file.c \ + fileinfo.c \ ++ fopen.c \ + formdata.c \ + ftp.c \ + ftplistparser.c \ +@@ -263,6 +264,7 @@ LIB_HFILES = \ + escape.h \ + file.h \ + fileinfo.h \ ++ fopen.h \ + formdata.h \ + ftp.h \ + ftplistparser.h \ +diff --git a/lib/cookie.c b/lib/cookie.c +index 8a6aa1a..cb0c03b 100644 +--- a/lib/cookie.c ++++ b/lib/cookie.c +@@ -96,8 +96,8 @@ Example set of cookies: + #include "curl_get_line.h" + #include "curl_memrchr.h" + #include "parsedate.h" +-#include "rand.h" + #include "rename.h" ++#include "fopen.h" + + /* The last 3 #include files should be in this order */ + #include "curl_printf.h" +@@ -1620,20 +1620,9 @@ static CURLcode cookie_output(struct Curl_easy *data, + use_stdout = TRUE; + } + else { +- unsigned char randsuffix[9]; +- +- if(Curl_rand_hex(data, randsuffix, sizeof(randsuffix))) +- return 2; +- +- tempstore = aprintf("%s.%s.tmp", filename, randsuffix); +- if(!tempstore) +- return CURLE_OUT_OF_MEMORY; +- +- out = fopen(tempstore, FOPEN_WRITETEXT); +- if(!out) { +- error = CURLE_WRITE_ERROR; ++ error = Curl_fopen(data, filename, &out, &tempstore); ++ if(error) + goto error; +- } + } + + fputs("# Netscape HTTP Cookie File\n" +@@ -1680,7 +1669,7 @@ static CURLcode cookie_output(struct Curl_easy *data, + if(!use_stdout) { + fclose(out); + out = NULL; +- if(Curl_rename(tempstore, filename)) { ++ if(tempstore && Curl_rename(tempstore, filename)) { + unlink(tempstore); + error = CURLE_WRITE_ERROR; + goto error; +diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake +index d2a0f43..c254359 100644 +--- a/lib/curl_config.h.cmake ++++ b/lib/curl_config.h.cmake +@@ -157,6 +157,9 @@ + /* Define to 1 if you have the header file. */ + #cmakedefine HAVE_ASSERT_H 1 + ++/* Define to 1 if you have the `fchmod' function. */ ++#cmakedefine HAVE_FCHMOD 1 ++ + /* Define to 1 if you have the `basename' function. */ + #cmakedefine HAVE_BASENAME 1 + +diff --git a/lib/fopen.c b/lib/fopen.c +new file mode 100644 +index 0000000..ad3691b +--- /dev/null ++++ b/lib/fopen.c +@@ -0,0 +1,113 @@ ++/*************************************************************************** ++ * _ _ ____ _ ++ * Project ___| | | | _ \| | ++ * / __| | | | |_) | | ++ * | (__| |_| | _ <| |___ ++ * \___|\___/|_| \_\_____| ++ * ++ * Copyright (C) 1998 - 2022, Daniel Stenberg, , et al. ++ * ++ * This software is licensed as described in the file COPYING, which ++ * you should have received as part of this distribution. The terms ++ * are also available at https://curl.se/docs/copyright.html. ++ * ++ * You may opt to use, copy, modify, merge, publish, distribute and/or sell ++ * copies of the Software, and permit persons to whom the Software is ++ * furnished to do so, under the terms of the COPYING file. ++ * ++ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY ++ * KIND, either express or implied. ++ * ++ * SPDX-License-Identifier: curl ++ * ++ ***************************************************************************/ ++ ++#include "curl_setup.h" ++ ++#if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_ALTSVC) || \ ++ !defined(CURL_DISABLE_HSTS) ++ ++#ifdef HAVE_FCNTL_H ++#include ++#endif ++ ++#include "urldata.h" ++#include "rand.h" ++#include "fopen.h" ++/* The last 3 #include files should be in this order */ ++#include "curl_printf.h" ++#include "curl_memory.h" ++#include "memdebug.h" ++ ++/* ++ * Curl_fopen() opens a file for writing with a temp name, to be renamed ++ * to the final name when completed. If there is an existing file using this ++ * name at the time of the open, this function will clone the mode from that ++ * file. if 'tempname' is non-NULL, it needs a rename after the file is ++ * written. ++ */ ++CURLcode Curl_fopen(struct Curl_easy *data, const char *filename, ++ FILE **fh, char **tempname) ++{ ++ CURLcode result = CURLE_WRITE_ERROR; ++ unsigned char randsuffix[9]; ++ char *tempstore = NULL; ++ struct_stat sb; ++ int fd = -1; ++ *tempname = NULL; ++ ++ if(stat(filename, &sb) == -1 || !S_ISREG(sb.st_mode)) { ++ /* a non-regular file, fallback to direct fopen() */ ++ *fh = fopen(filename, FOPEN_WRITETEXT); ++ if(*fh) ++ return CURLE_OK; ++ goto fail; ++ } ++ ++ result = Curl_rand_hex(data, randsuffix, sizeof(randsuffix)); ++ if(result) ++ goto fail; ++ ++ tempstore = aprintf("%s.%s.tmp", filename, randsuffix); ++ if(!tempstore) { ++ result = CURLE_OUT_OF_MEMORY; ++ goto fail; ++ } ++ ++ result = CURLE_WRITE_ERROR; ++ fd = open(tempstore, O_WRONLY | O_CREAT | O_EXCL, 0600); ++ if(fd == -1) ++ goto fail; ++ ++#ifdef HAVE_FCHMOD ++ { ++ struct_stat nsb; ++ if((fstat(fd, &nsb) != -1) && ++ (nsb.st_uid == sb.st_uid) && (nsb.st_gid == sb.st_gid)) { ++ /* if the user and group are the same, clone the original mode */ ++ if(fchmod(fd, sb.st_mode) == -1) ++ goto fail; ++ } ++ } ++#endif ++ ++ *fh = fdopen(fd, FOPEN_WRITETEXT); ++ if(!*fh) ++ goto fail; ++ ++ *tempname = tempstore; ++ return CURLE_OK; ++ ++fail: ++ if(fd != -1) { ++ close(fd); ++ unlink(tempstore); ++ } ++ ++ free(tempstore); ++ ++ *tempname = NULL; ++ return result; ++} ++ ++#endif /* ! disabled */ +diff --git a/lib/fopen.h b/lib/fopen.h +new file mode 100644 +index 0000000..289e55f +--- /dev/null ++++ b/lib/fopen.h +@@ -0,0 +1,30 @@ ++#ifndef HEADER_CURL_FOPEN_H ++#define HEADER_CURL_FOPEN_H ++/*************************************************************************** ++ * _ _ ____ _ ++ * Project ___| | | | _ \| | ++ * / __| | | | |_) | | ++ * | (__| |_| | _ <| |___ ++ * \___|\___/|_| \_\_____| ++ * ++ * Copyright (C) 1998 - 2022, Daniel Stenberg, , et al. ++ * ++ * This software is licensed as described in the file COPYING, which ++ * you should have received as part of this distribution. The terms ++ * are also available at https://curl.se/docs/copyright.html. ++ * ++ * You may opt to use, copy, modify, merge, publish, distribute and/or sell ++ * copies of the Software, and permit persons to whom the Software is ++ * furnished to do so, under the terms of the COPYING file. ++ * ++ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY ++ * KIND, either express or implied. ++ * ++ * SPDX-License-Identifier: curl ++ * ++ ***************************************************************************/ ++ ++CURLcode Curl_fopen(struct Curl_easy *data, const char *filename, ++ FILE **fh, char **tempname); ++ ++#endif diff --git a/meta/recipes-support/curl/curl/CVE-2022-32208.patch b/meta/recipes-support/curl/curl/CVE-2022-32208.patch new file mode 100644 index 0000000000..9a4e398370 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2022-32208.patch @@ -0,0 +1,67 @@ +From fd2ffddec315c029e923e6e6f2c049809d01a5fc Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Thu, 9 Jun 2022 09:27:24 +0200 +Subject: [PATCH] krb5: return error properly on decode errors + +Bug: https://curl.se/docs/CVE-2022-32208.html +CVE-2022-32208 +Reported-by: Harry Sintonen +Closes #9051 + +Upstream-Status: Backport [https://github.com/curl/curl/commit/6ecdf5136b52af7] +Signed-off-by: Robert Joslyn +--- + lib/krb5.c | 18 +++++++++++------- + 1 file changed, 11 insertions(+), 7 deletions(-) + +diff --git a/lib/krb5.c b/lib/krb5.c +index 787137c..6f9e1f7 100644 +--- a/lib/krb5.c ++++ b/lib/krb5.c +@@ -140,11 +140,8 @@ krb5_decode(void *app_data, void *buf, int len, + enc.value = buf; + enc.length = len; + maj = gss_unwrap(&min, *context, &enc, &dec, NULL, NULL); +- if(maj != GSS_S_COMPLETE) { +- if(len >= 4) +- strcpy(buf, "599 "); ++ if(maj != GSS_S_COMPLETE) + return -1; +- } + + memcpy(buf, dec.value, dec.length); + len = curlx_uztosi(dec.length); +@@ -506,6 +503,7 @@ static CURLcode read_data(struct connectdata *conn, + { + int len; + CURLcode result; ++ int nread; + + result = socket_read(fd, &len, sizeof(len)); + if(result) +@@ -514,7 +512,10 @@ static CURLcode read_data(struct connectdata *conn, + if(len) { + /* only realloc if there was a length */ + len = ntohl(len); +- buf->data = Curl_saferealloc(buf->data, len); ++ if(len > CURL_MAX_INPUT_LENGTH) ++ len = 0; ++ else ++ buf->data = Curl_saferealloc(buf->data, len); + } + if(!len || !buf->data) + return CURLE_OUT_OF_MEMORY; +@@ -522,8 +523,11 @@ static CURLcode read_data(struct connectdata *conn, + result = socket_read(fd, buf->data, len); + if(result) + return result; +- buf->size = conn->mech->decode(conn->app_data, buf->data, len, +- conn->data_prot, conn); ++ nread = conn->mech->decode(conn->app_data, buf->data, len, ++ conn->data_prot, conn); ++ if(nread < 0) ++ return CURLE_RECV_ERROR; ++ buf->size = (size_t)nread; + buf->index = 0; + return CURLE_OK; + } diff --git a/meta/recipes-support/curl/curl_7.82.0.bb b/meta/recipes-support/curl/curl_7.82.0.bb index d5dfe62a39..67de0220c6 100644 --- a/meta/recipes-support/curl/curl_7.82.0.bb +++ b/meta/recipes-support/curl/curl_7.82.0.bb @@ -24,6 +24,10 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \ file://CVE-2022-27782-1.patch \ file://CVE-2022-27782-2.patch \ file://0001-openssl-fix-CN-check-error-code.patch \ + file://CVE-2022-32205.patch \ + file://CVE-2022-32206.patch \ + file://CVE-2022-32207.patch \ + file://CVE-2022-32208.patch \ " SRC_URI[sha256sum] = "0aaa12d7bd04b0966254f2703ce80dd5c38dbbd76af0297d3d690cdce58a583c" From patchwork Mon Jul 18 14:48:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10315 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1722CCA485 for ; Mon, 18 Jul 2022 14:49:32 +0000 (UTC) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mx.groups.io with SMTP id smtpd.web12.28226.1658155764587267173 for ; Mon, 18 Jul 2022 07:49:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=NRjc06sV; spf=softfail (domain: sakoman.com, ip: 209.85.214.182, mailfrom: steve@sakoman.com) Received: by mail-pl1-f182.google.com with SMTP id b2so9227365plx.7 for ; Mon, 18 Jul 2022 07:49:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=bwe8CmoQs5AlWfzKgxmqBVVKQ048oFgZLVNKG+Z1ooU=; b=NRjc06sVZdBGUprIt75cnJJCJ/WuCiD41ZoZQbUo5As/bf7lx51hnZbyGF3B80GKMj RyOnDejsBkpBQB2eZsiKvV+Eo1a4mV8rso/3C+bpW5fNmBYGNKUAwDz+Q6Rz8UXWHXmF KcMip0VQJQ2gzjvhbGlplDFv297lkfzxJgWPXyy1jvLk4Tz6LVDzPTHJ05q4D3/v/Z0C y38o3Y0YATdq2y95CHwWPT/1HJDxgV3gV69tsoXIPSYkbyUpc1Oefyccjzfbj9HxLiAg 6yKJDHihePtY0s9T4femhWVloCqXB30D0YSQAAGFYYJRrDSt46cPNUa+dPrqgjgcOaw8 DGQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bwe8CmoQs5AlWfzKgxmqBVVKQ048oFgZLVNKG+Z1ooU=; b=7xqUFd4L8o+a07Y5fOBclEbXoYjX5D970C5UqSNBjKkBBK3sYUs6VABKY7QFf37LFy 6t/s4aJGeicEA9Hc25oSXt1vAznZ7gQHmlbyy5C6EPywJtqnXPTqFjz7miRG1dmGj3ui fFb1+xievzxbdoSPcVvXhcfWRzJf3cC/3VlgGDEPPF9B1f/mRSsrVhKGqpTG06o5F0Gl yzwq2EkzUk2UxWqaBNu6YWhwx1B24z/zMjhBmaJd9jJSz9c00BtT+SMCAKiwA1f4ZbYa CdSEcsKw67W4kN+5ubDj9KzKBScHUfi84Wp5XNccsFy7/EiJVKGCIrUHPx8g5yF/5fnm tkMw== X-Gm-Message-State: AJIora+ew8FlWMyxRTIT4zmSlctBctBRMM2Z1zJSH9DR64HmBBKHpefd gUTkbRbMyOtCHYP5cee21IFnbXvU5tUeHU7a X-Google-Smtp-Source: AGRyM1twWPMrolBv0b11AwK+6/WOJFu43aVBSB/MTKwPONH8b7XAIj6oF0zmubk/YfSFVq+fDUyDNw== X-Received: by 2002:a17:90b:3a85:b0:1f1:64c4:e56a with SMTP id om5-20020a17090b3a8500b001f164c4e56amr16763031pjb.139.1658155763496; Mon, 18 Jul 2022 07:49:23 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:22 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 02/35] harfbuzz: Fix compilation with clang Date: Mon, 18 Jul 2022 04:48:27 -1000 Message-Id: <7505ac6da37ba00d4dad74a0312ca20fc17e64df.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:49:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168202 From: Pavel Zhukov Fixup commit for prevous CVE-2022-33068 fix. Fixes: | In file included from ../harfbuzz-4.0.1/src/hb-ot-face.cc:39: 4429| ../harfbuzz-4.0.1/src/hb-ot-color-sbix-table.hh:301:11: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical] 4430| if (png.IHDR.height >= 65536 | png.IHDR.width >= 65536) 4431| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4432| || 4433| ../harfbuzz-4.0.1/src/hb-ot-color-sbix-table.hh:301:11: note: cast one or both operands to int to silence this warning 4434| 1 error generated. Signed-off-by: Pavel Zhukov Signed-off-by: Steve Sakoman --- .../harfbuzz/0001-Fix-conditional.patch | 25 +++++++++++++++++++ .../harfbuzz/harfbuzz_4.0.1.bb | 5 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-graphics/harfbuzz/harfbuzz/0001-Fix-conditional.patch diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz/0001-Fix-conditional.patch b/meta/recipes-graphics/harfbuzz/harfbuzz/0001-Fix-conditional.patch new file mode 100644 index 0000000000..0f9b86973b --- /dev/null +++ b/meta/recipes-graphics/harfbuzz/harfbuzz/0001-Fix-conditional.patch @@ -0,0 +1,25 @@ +From e421613e8f825508afa9a0b54d33085557c37441 Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod +Date: Wed, 1 Jun 2022 09:07:57 -0600 +Subject: [PATCH] [sbix] Fix conditional + +Signed-off: Pavel Zhukov +Upstream-Status: Backport [e421613e8f825508afa9a0b54d33085557c37441] + +--- + src/hb-ot-color-sbix-table.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh +index 6efae43cda..d0e2235fb2 100644 +--- a/src/hb-ot-color-sbix-table.hh ++++ b/src/hb-ot-color-sbix-table.hh +@@ -298,7 +298,7 @@ struct sbix + + const PNGHeader &png = *blob->as(); + +- if (png.IHDR.height >= 65536 | png.IHDR.width >= 65536) ++ if (png.IHDR.height >= 65536 || png.IHDR.width >= 65536) + { + hb_blob_destroy (blob); + return false; diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb b/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb index 81518a53ea..b639c276db 100644 --- a/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb +++ b/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb @@ -11,8 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6ee0f16281694fb6aa689cca1e0fb3da \ UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" UPSTREAM_CHECK_REGEX = "harfbuzz-(?P\d+(\.\d+)+).tar" -SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz\ - file://CVE-2022-33068.patch" +SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz \ + file://CVE-2022-33068.patch \ + file://0001-Fix-conditional.patch" SRC_URI[sha256sum] = "98f68777272db6cd7a3d5152bac75083cd52a26176d87bc04c8b3929d33bce49" inherit meson pkgconfig lib_package gtk-doc gobject-introspection From patchwork Mon Jul 18 14:48:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10316 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1A98CCA486 for ; Mon, 18 Jul 2022 14:49:32 +0000 (UTC) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mx.groups.io with SMTP id smtpd.web09.28142.1658155766982835225 for ; Mon, 18 Jul 2022 07:49:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=NV+VTPUm; spf=softfail (domain: sakoman.com, ip: 209.85.216.44, mailfrom: steve@sakoman.com) Received: by mail-pj1-f44.google.com with SMTP id fz10so11970672pjb.2 for ; Mon, 18 Jul 2022 07:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=r1ZbsFAfHGdQp7lIohVoZQv8htuiic41RY/U+QDiKD0=; b=NV+VTPUm95CqATCJ6w6yPI3qy8nO7XKl9JOEz0tV0kGGaTgu+kmtaqO5BX1kX29nW7 PKfDtGpO8GTh8+i/v5yPs5K2YhU2ezSQ7WbAFaDc5mUBd33vo7sz9fnUG3UQiHyx3EJy 1e2JYXGUsxgWqw87ZuI9Ma8uSHaEOvBQQGFQHynhvSqxUZ053hqqm6mHdTke3VH7IErS LL/VdDWLgJb6DGhJdLNV81rKnOmZArdsGGI/7DyeetMTkIXSyHin+8WNO+uVluRFaYm9 +j4OoAOPzSgE8HJdRYs0gYhefVXEPvycLWJ2/tJgxTkGFXna0z2zjzjA+2oKrXGFRndj w4dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=r1ZbsFAfHGdQp7lIohVoZQv8htuiic41RY/U+QDiKD0=; b=TZw1qKkronvPKqKp6YAylzsI53jBhW+v1AuV9fWVuUJnLf2/HBe7Es6IPN/iQb3ph1 NXMhPgor3OsGg9Xrbbkflzgq1bK9xNqURJ4+dHVBOCbHCfHnZGQCXaG2O/3s8Ibhjpi0 EmgVG0SWQ2N9D4vuQMETveKrf3S5zpczTdabUl3J3F4GZIE8BwIxBDoqkBAcYAIy8Azt dfkgRPhoJz14Jpi8L+Wjq6TE9sVJkBnKxMBcV0LygahpnGmxnhX60pP4fWbgVhBxKwNc sO9W+NrNdViEYZpuWSbAxAN4RjlrVBfNEuFRFegkkphzkHs+T4NqtVxt5tqSjWhcTSwA qh3Q== X-Gm-Message-State: AJIora/R8QppdKUuorG6VdD862Nq6KQC7+MUHrcBdYNB4ixxCNX7xbWO v3L7h11cXpXtuql4BRUXHsv/q5rR561kqlyQ X-Google-Smtp-Source: AGRyM1sUw46TwujPNVw8IMc2wv3GEgn5jgoDA5wlgokoPuA5bjFj5KL/goCfTiExsSgcDNoIXzkXYQ== X-Received: by 2002:a17:902:7209:b0:16b:fa09:5d6 with SMTP id ba9-20020a170902720900b0016bfa0905d6mr28676450plb.120.1658155765846; Mon, 18 Jul 2022 07:49:25 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:25 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 03/35] udev-extraconf/initrdscripts/parted: Rename mount.blacklist -> mount.ignorelist Date: Mon, 18 Jul 2022 04:48:28 -1000 Message-Id: <99d9dc7c6b5149f19a315bce78784aa1753ea7be.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:49:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168203 From: Richard Purdie Signed-off-by: Richard Purdie Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie (cherry picked from commit 69e486ddb3059f80ba538e1f59c2ca8a8df0faf9) Signed-off-by: Ming Liu Signed-off-by: Steve Sakoman --- .../initrdscripts/files/init-install-efi-testfs.sh | 2 +- .../initrdscripts/files/init-install-efi.sh | 2 +- .../initrdscripts/files/init-install-testfs.sh | 2 +- meta/recipes-core/initrdscripts/files/init-install.sh | 2 +- .../{mount.blacklist => mount.ignorelist} | 0 meta/recipes-core/udev/udev-extraconf/mount.sh | 4 ++-- meta/recipes-core/udev/udev-extraconf_1.1.bb | 10 +++++----- meta/recipes-extended/parted/files/run-ptest | 6 +++--- 8 files changed, 14 insertions(+), 14 deletions(-) rename meta/recipes-core/udev/udev-extraconf/{mount.blacklist => mount.ignorelist} (100%) diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh index 1fcd29e54c..4bd6ace7b3 100644 --- a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh +++ b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh @@ -138,7 +138,7 @@ touch /ssd/etc/controllerimage if [ -d /ssd/etc/ ] ; then # We dont want udev to mount our root device while we're booting... if [ -d /ssd/etc/udev/ ] ; then - echo "/dev/${device}" >> /ssd/etc/udev/mount.blacklist + echo "/dev/${device}" >> /ssd/etc/udev/mount.ignorelist fi fi diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh index f667518b89..ffd3870199 100644 --- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh +++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh @@ -229,7 +229,7 @@ if [ -d /tgt_root/etc/ ] ; then echo "UUID=$boot_uuid /boot vfat defaults 1 2" >> /tgt_root/etc/fstab # We dont want udev to mount our root device while we're booting... if [ -d /tgt_root/etc/udev/ ] ; then - echo "${device}" >> /tgt_root/etc/udev/mount.blacklist + echo "${device}" >> /tgt_root/etc/udev/mount.ignorelist fi fi diff --git a/meta/recipes-core/initrdscripts/files/init-install-testfs.sh b/meta/recipes-core/initrdscripts/files/init-install-testfs.sh index 7b49001659..8ab74ddc5d 100644 --- a/meta/recipes-core/initrdscripts/files/init-install-testfs.sh +++ b/meta/recipes-core/initrdscripts/files/init-install-testfs.sh @@ -164,7 +164,7 @@ if [ -d /tgt_root/etc/ ] ; then echo "$bootfs /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab # We dont want udev to mount our root device while we're booting... if [ -d /tgt_root/etc/udev/ ] ; then - echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist + echo "/dev/${device}" >> /tgt_root/etc/udev/mount.ignorelist fi fi umount /tgt_root diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh index e71579631b..df33791ec7 100644 --- a/meta/recipes-core/initrdscripts/files/init-install.sh +++ b/meta/recipes-core/initrdscripts/files/init-install.sh @@ -261,7 +261,7 @@ if [ -d /tgt_root/etc/ ] ; then echo "$bootdev /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab # We dont want udev to mount our root device while we're booting... if [ -d /tgt_root/etc/udev/ ] ; then - echo "${device}" >> /tgt_root/etc/udev/mount.blacklist + echo "${device}" >> /tgt_root/etc/udev/mount.ignorelist fi fi umount /tgt_root diff --git a/meta/recipes-core/udev/udev-extraconf/mount.blacklist b/meta/recipes-core/udev/udev-extraconf/mount.ignorelist similarity index 100% rename from meta/recipes-core/udev/udev-extraconf/mount.blacklist rename to meta/recipes-core/udev/udev-extraconf/mount.ignorelist diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh index b23731870e..5ba66e98e2 100644 --- a/meta/recipes-core/udev/udev-extraconf/mount.sh +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh @@ -26,11 +26,11 @@ fi PMOUNT="/usr/bin/pmount" -for line in `grep -h -v ^# /etc/udev/mount.blacklist /etc/udev/mount.blacklist.d/*` +for line in `grep -h -v ^# /etc/udev/mount.ignorelist /etc/udev/mount.ignorelist.d/*` do if [ ` expr match "$DEVNAME" "$line" ` -gt 0 ]; then - logger "udev/mount.sh" "[$DEVNAME] is blacklisted, ignoring" + logger "udev/mount.sh" "[$DEVNAME] is marked to ignore" exit 0 fi done diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb index 2ba35b0df6..7da04379c0 100644 --- a/meta/recipes-core/udev/udev-extraconf_1.1.bb +++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb @@ -1,13 +1,13 @@ SUMMARY = "Extra machine specific configuration files" HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev" -DESCRIPTION = "Extra machine specific configuration files for udev, specifically blacklist information." +DESCRIPTION = "Extra machine specific configuration files for udev, specifically information on devices to ignore." LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" SRC_URI = " \ file://automount.rules \ file://mount.sh \ - file://mount.blacklist \ + file://mount.ignorelist \ file://autonet.rules \ file://network.sh \ file://localextra.rules \ @@ -23,8 +23,8 @@ do_install() { install -m 0644 ${WORKDIR}/autonet.rules ${D}${sysconfdir}/udev/rules.d/autonet.rules install -m 0644 ${WORKDIR}/localextra.rules ${D}${sysconfdir}/udev/rules.d/localextra.rules - install -d ${D}${sysconfdir}/udev/mount.blacklist.d - install -m 0644 ${WORKDIR}/mount.blacklist ${D}${sysconfdir}/udev/ + install -d ${D}${sysconfdir}/udev/mount.ignorelist.d + install -m 0644 ${WORKDIR}/mount.ignorelist ${D}${sysconfdir}/udev/ install -d ${D}${sysconfdir}/udev/scripts/ @@ -37,7 +37,7 @@ do_install() { FILES:${PN} = "${sysconfdir}/udev" RDEPENDS:${PN} = "udev" -CONFFILES:${PN} = "${sysconfdir}/udev/mount.blacklist" +CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist" # to replace udev-extra-rules from meta-oe RPROVIDES:${PN} = "udev-extra-rules" diff --git a/meta/recipes-extended/parted/files/run-ptest b/meta/recipes-extended/parted/files/run-ptest index c3d6fca339..096078967f 100644 --- a/meta/recipes-extended/parted/files/run-ptest +++ b/meta/recipes-extended/parted/files/run-ptest @@ -1,7 +1,7 @@ #!/bin/sh -mkdir -p /etc/udev/mount.blacklist.d -echo /dev/sda1 >> /etc/udev/mount.blacklist.d/parted-tmp +mkdir -p /etc/udev/mount.ignorelist.d +echo /dev/sda1 >> /etc/udev/mount.ignorelist.d/parted-tmp rm -f tests/*.log make -C tests test-suite.log -rm /etc/udev/mount.blacklist.d/parted-tmp +rm /etc/udev/mount.ignorelist.d/parted-tmp From patchwork Mon Jul 18 14:48:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10314 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4A87C433EF for ; Mon, 18 Jul 2022 14:49:32 +0000 (UTC) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mx.groups.io with SMTP id smtpd.web12.28226.1658155764587267173 for ; Mon, 18 Jul 2022 07:49:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=g1f/H3aW; spf=softfail (domain: sakoman.com, ip: 209.85.214.182, mailfrom: steve@sakoman.com) Received: by mail-pl1-f182.google.com with SMTP id b2so9227567plx.7 for ; Mon, 18 Jul 2022 07:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=yxgmJNG1YOZxoL1NIo+a72tJBKGHuoiRnb1LQPnuO6A=; b=g1f/H3aWs4rNRV3YGtkt079SvelByIC0UiOZhVBf+V9x+XNOF+4SjyNNPDcQg5xJsj 6bZaPG8sycwddnGTWhXGBRZqBq0LdefLgYZOWtrC6b3qaJoVrM8AI5B8080Dsik2r7M1 vxas0onsFYwGpjEqFRMlD0nUXYmaT4KcWSZmQSYRanivWWVpzqgPRvSh4OxIVAcDJGY/ 2Iyw13PzPM7G2kNLaWqcgTVa5QG6CGr+ThZ3FKHp5ltGjN9f+EKSifjTjeXrqiwMaNSL 55OUdwPOrlY3B65EnONiftB97j5wDyENtxZpSyism95IfDV0mA/9kXp1Et618CQfJTft hFKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yxgmJNG1YOZxoL1NIo+a72tJBKGHuoiRnb1LQPnuO6A=; b=PhtH6YQQdwmR+zB/06E6HVhXvG9rpTZ+y2OtdZlepIzYQGMQIVXrZ9Sx5Xwb0DnZwk 4WuzXqnET+YERoZ3w20BzmrxvUZK/VLPOZoSYC0CspFnM6eyREDHJw/Wg/dYI7VUy6vA zsjWjCsCspTS1Vu+Mbefz8oK3+Ot6dmL47ijezvHRoplwo4YvpYN/nqaSgC9ZT5oiapc j8iRX5Wy5g0U22ZJHvUMK5iuaAAB+1upcmoXqXaoD08Hd+iGF5rA7Hj1A8i5/sQx6eLs 9Da0esgEMHqQq3D58HuNPduXB5O624dFW96CQbNsKl2h6xPt66beLh6LRhe88Rbl28+i HP0Q== X-Gm-Message-State: AJIora+DchBP6IyiOXB1yTsl7wGMLMyN8yHQ6DR8C2JuhKX1pF62jAfE BLaGFn7aBBNpOd2Q1THs+8ccKj82c787ouiG X-Google-Smtp-Source: AGRyM1u/CCC4XiFRb2m/MvL2Uq4pOWGFTIA6/HvCOd1fr7ZvOCdFlV4RG8RB3ucuvmMVh7TWTaas1g== X-Received: by 2002:a17:90b:1d8a:b0:1f0:6083:5d80 with SMTP id pf10-20020a17090b1d8a00b001f060835d80mr37978767pjb.147.1658155768179; Mon, 18 Jul 2022 07:49:28 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:27 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 04/35] udev-extraconf: let automount base directory configurable Date: Mon, 18 Jul 2022 04:48:29 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:49:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168204 From: Ming Liu Dont hard-code automount base directory to '/run/media', introduce a variable MOUNT_BASE to let it configurable, like in udisks2 the mount base is also configurable by setting option: --enable-fhs-media. Signed-off-by: Ming Liu Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie (cherry picked from commit f077befd5f36ad88623aaf6a38b1a837ecb18650) Signed-off-by: Ming Liu Signed-off-by: Steve Sakoman --- .../recipes-core/udev/udev-extraconf/mount.sh | 25 ++++++++++--------- meta/recipes-core/udev/udev-extraconf_1.1.bb | 2 ++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh index 5ba66e98e2..c8b773bc07 100644 --- a/meta/recipes-core/udev/udev-extraconf/mount.sh +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh @@ -6,6 +6,7 @@ BASE_INIT="`readlink -f "@base_sbindir@/init"`" INIT_SYSTEMD="@systemd_unitdir@/systemd" +MOUNT_BASE="@MOUNT_BASE@" if [ "x$BASE_INIT" = "x$INIT_SYSTEMD" ];then # systemd as init uses systemd-mount to mount block devices @@ -40,7 +41,7 @@ automount_systemd() { # Skip already mounted partitions if [ -f /run/systemd/transient/run-media-$name.mount ]; then - logger "mount.sh/automount" "/run/media/$name already mounted" + logger "mount.sh/automount" "$MOUNT_BASE/$name already mounted" return fi @@ -53,7 +54,7 @@ automount_systemd() { grep "^[[:space:]]*$tmp" /etc/fstab && return done - [ -d "/run/media/$name" ] || mkdir -p "/run/media/$name" + [ -d "$MOUNT_BASE/$name" ] || mkdir -p "$MOUNT_BASE/$name" MOUNT="$MOUNT -o silent" @@ -70,12 +71,12 @@ automount_systemd() { ;; esac - if ! $MOUNT --no-block -t auto $DEVNAME "/run/media/$name" + if ! $MOUNT --no-block -t auto $DEVNAME "$MOUNT_BASE/$name" then - #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/run/media/$name\" failed!" - rm_dir "/run/media/$name" + #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"$MOUNT_BASE/$name\" failed!" + rm_dir "$MOUNT_BASE/$name" else - logger "mount.sh/automount" "Auto-mount of [/run/media/$name] successful" + logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] successful" touch "/tmp/.automount-$name" fi } @@ -93,7 +94,7 @@ automount() { # configured in fstab grep -q "^$DEVNAME " /proc/mounts && return - ! test -d "/run/media/$name" && mkdir -p "/run/media/$name" + ! test -d "$MOUNT_BASE/$name" && mkdir -p "$MOUNT_BASE/$name" # Silent util-linux's version of mounting auto if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ; then @@ -113,12 +114,12 @@ automount() { ;; esac - if ! $MOUNT -t auto $DEVNAME "/run/media/$name" + if ! $MOUNT -t auto $DEVNAME "$MOUNT_BASE/$name" then - #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/run/media/$name\" failed!" - rm_dir "/run/media/$name" + #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"$MOUNT_BASE/$name\" failed!" + rm_dir "$MOUNT_BASE/$name" else - logger "mount.sh/automount" "Auto-mount of [/run/media/$name] successful" + logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] successful" touch "/tmp/.automount-$name" fi } @@ -157,5 +158,5 @@ if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ] && [ # Remove empty directories from auto-mounter name="`basename "$DEVNAME"`" - test -e "/tmp/.automount-$name" && rm_dir "/run/media/$name" + test -e "/tmp/.automount-$name" && rm_dir "$MOUNT_BASE/$name" fi diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb index 7da04379c0..2b908ac05b 100644 --- a/meta/recipes-core/udev/udev-extraconf_1.1.bb +++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb @@ -15,6 +15,7 @@ SRC_URI = " \ S = "${WORKDIR}" +MOUNT_BASE = "/run/media" do_install() { install -d ${D}${sysconfdir}/udev/rules.d @@ -31,6 +32,7 @@ do_install() { install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' ${D}${sysconfdir}/udev/scripts/mount.sh sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${sysconfdir}/udev/scripts/mount.sh + sed -i 's|@MOUNT_BASE@|${MOUNT_BASE}|g' ${D}${sysconfdir}/udev/scripts/mount.sh install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts } From patchwork Mon Jul 18 14:48:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10313 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5785C43334 for ; Mon, 18 Jul 2022 14:49:32 +0000 (UTC) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mx.groups.io with SMTP id smtpd.web10.28028.1658155771495079800 for ; Mon, 18 Jul 2022 07:49:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=jxgKo349; spf=softfail (domain: sakoman.com, ip: 209.85.214.171, mailfrom: steve@sakoman.com) Received: by mail-pl1-f171.google.com with SMTP id x21so9221683plb.3 for ; Mon, 18 Jul 2022 07:49:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=f/o7W/gkXyV4zPG+OlUOssnr3f3vxIKeqzatcfnwOh4=; b=jxgKo349DnU1sSVUFnBgij4K9EYbrg/YCl2tr9bvBL0eUgGk/x/fPoGhqevdCaNqMg TkokkPl82f62RXnDWl+j5Ey+EkVSYruAOca4p9A00sKyj8BxXLW7bshegy9UU0tIWlba E7ryZiMeOrHq4G6JClN/tIRAKCJtQxyagWdUFCT6HxvElMzzVtVXL3M8DQEWGw/UqWIK dAOFaVaWLQac7CO1J8xcF80Sq2kVYapyvk8/5VX9/uXVw20Hq9qKE3/nYxa1yKdXoQWt eDc5w4aVxNd7gbnRvArXwzEGgEvCBpS0KoQs7MSDZVwDLbLDcYmiXuyLm6BnMLOCZXlI CtAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=f/o7W/gkXyV4zPG+OlUOssnr3f3vxIKeqzatcfnwOh4=; b=2mOePBr5NzdaGAsd82RQF5Gh7N7K/WZkJt0zwPCnmiugPm1WaaK7gqlDrkv2MB0oJN XLppn3Kj6HAZMkJycyQqZz+AncD/tlOHEnSAOQKBGTl/n8XyVdUZvTzc3D3KzNWhwigs il1xQa+lzF/uklELLCcb9bfNc8oP6xudUlxAep9NgTh8euq+iS3o3ddrEaGaROgYF6+Q 3CbqEKZlU0/16w8fv/1RwoYLxnvZmgqEZcAER6mbjFSKMYo016BVRuhBr5LVA29UyUA0 2DFlnkl4xAgq4gVkhIlZ0vOZtHnJsDqdR0mSZPN856phmogI3+uLhSzftaD98Fe9nmcA VbCQ== X-Gm-Message-State: AJIora+5lKScAknRp9R+hTSvGq9zF/KLUZs1o1mzGe/UJv0sNo8g3Z7d pJ2WP3kcYBrk7YBHpAUX8nS5l5s9ap43zxZP X-Google-Smtp-Source: AGRyM1sKE/7eBAKyp61yGlFtLJ3CfT0OY+AFPPZvkra+57xrqQ5wsMiI8zDFw92WzWFSUczqvoVEbw== X-Received: by 2002:a17:90b:78d:b0:1ef:c46f:19a7 with SMTP id l13-20020a17090b078d00b001efc46f19a7mr32624267pjz.216.1658155770385; Mon, 18 Jul 2022 07:49:30 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:29 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 05/35] udev-extraconf/mount.sh: add LABELs to mountpoints Date: Mon, 18 Jul 2022 04:48:30 -1000 Message-Id: <229e7a911a8b1e0223cfee0bdc2f5fc79cf300fe.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:49:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168205 From: Muhammad Hamza This alters the mountpoints such that if a device has a LABEL or a PARTLABEL, it will be mounted at e.g.: /run/media/$LABEL- /run/media/$PARTLABEL- /run/media/rootfs-sda2 otherwise the device will be mounted at e.g.: /run/media/ /run/media/sda1 The appended with LABEL or PARTLABEL makes sure that the mountpoint is unique, therefore, avoids overlapping mounts. Signed-off-by: Arsalan H. Awan Signed-off-by: Muhammad Hamza Signed-off-by: Luca Ceresoli (cherry picked from commit a9a0a0967832445f1bcc65d58f95343d1b562e1b) Signed-off-by: Ming Liu Signed-off-by: Steve Sakoman --- meta/recipes-core/udev/udev-extraconf/mount.sh | 18 ++++++++++++++++++ meta/recipes-core/udev/udev-extraconf_1.1.bb | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh index c8b773bc07..40910be8bd 100644 --- a/meta/recipes-core/udev/udev-extraconf/mount.sh +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh @@ -54,6 +54,9 @@ automount_systemd() { grep "^[[:space:]]*$tmp" /etc/fstab && return done + # Get the unique name for mount point + get_label_name "${DEVNAME}" + [ -d "$MOUNT_BASE/$name" ] || mkdir -p "$MOUNT_BASE/$name" MOUNT="$MOUNT -o silent" @@ -94,6 +97,9 @@ automount() { # configured in fstab grep -q "^$DEVNAME " /proc/mounts && return + # Get the unique name for mount point + get_label_name "${DEVNAME}" + ! test -d "$MOUNT_BASE/$name" && mkdir -p "$MOUNT_BASE/$name" # Silent util-linux's version of mounting auto if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ; @@ -134,6 +140,18 @@ rm_dir() { fi } +get_label_name() { + # Get the LABEL or PARTLABEL + LABEL=`/sbin/blkid | grep "$1:" | grep -o 'LABEL=".*"' | cut -d '"' -f2` + # If the $DEVNAME has a LABEL or a PARTLABEL + if [ -n "$LABEL" ]; then + # Set the mount location dir name to LABEL appended + # with $name e.g. label-sda. That would avoid overlapping + # mounts in case two devices have same LABEL + name="${LABEL}-${name}" + fi +} + # No ID_FS_TYPE for cdrom device, yet it should be mounted name="`basename "$DEVNAME"`" [ -e /sys/block/$name/device/media ] && media_type=`cat /sys/block/$name/device/media` diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb index 2b908ac05b..8213c1a930 100644 --- a/meta/recipes-core/udev/udev-extraconf_1.1.bb +++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb @@ -38,7 +38,7 @@ do_install() { } FILES:${PN} = "${sysconfdir}/udev" -RDEPENDS:${PN} = "udev" +RDEPENDS:${PN} = "udev util-linux-blkid" CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist" # to replace udev-extra-rules from meta-oe From patchwork Mon Jul 18 14:48:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10318 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5B03CCA479 for ; Mon, 18 Jul 2022 14:49:42 +0000 (UTC) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mx.groups.io with SMTP id smtpd.web11.28050.1658155774226720500 for ; Mon, 18 Jul 2022 07:49:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=6gpji2MX; spf=softfail (domain: sakoman.com, ip: 209.85.216.53, mailfrom: steve@sakoman.com) Received: by mail-pj1-f53.google.com with SMTP id p9so11950113pjd.3 for ; Mon, 18 Jul 2022 07:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=WFJuooYBy3WC7Y2K0PToLk6DpqsFg90VF9n74uf6yvs=; b=6gpji2MXozd4AM6DaydUlXws2jBJCtGWAQGm/reROKrrp5dN8Z1bIbhlbbT8ABeBSf AJDBc7pD+L/0SDWyVZSG4OU0pW6WIEacI/WUUH0oWupqg/an6EBbG3PrRjdIOGOBiVI9 0svgQs+pa4wGQwpkOPHWMfJM1U16aUUVbPzsT2mEeExDmYueaMuRcTDorLRW9WvQKU2u B4fGMN9nXC6970Y8giNhYevIqu755qWKPHbjh04b1B3ASwnsNyhSFHvI/kgrXUBMeUPu ALS1ihVityonFeR8kz5tOkxJB8hTTCJZkKDpaxwvBbnNCfZHpmvn5MJAYQ7EH1koaJuL FPZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WFJuooYBy3WC7Y2K0PToLk6DpqsFg90VF9n74uf6yvs=; b=CjCtmlEjUAm5lzUJ8FZoMYmpA8S9rTyroffGfA1gDOhdnM2ryxgMPLk8Gbs1WCbSH5 OJqM4QAuIUeTztUKXaAosTv7UOfI3bMG+FWS7HMDQqIkqzVe6+HcfiGsZv2cfu7NsUbZ AYQt0DAkWAm6HrZrSmk7ThcN66EKW/IYPpTDuwG2rh8ExUseFRAmLTmmnZk+TrPFkWhb eOS539XDJsMit2jlQwFIR7ym6m3qKKlqB7ZkybMks6HRKGvA1AHDiCzS+NVrCGN8r/oE rapQi09RNOKMQDsFY/kx8s6XIGTbM5vcTKac7P/LuabGmvkCmyEKlI8FUjPSDrs3Asem 5T/g== X-Gm-Message-State: AJIora+jlDcBDs/PlCBOut46hdiKYB6GZdDJfyzwCsy9mFueVU5VE+Sd D4LKqwocL78A5RPQvsxtGVPc57ZEmMFNKdm1 X-Google-Smtp-Source: AGRyM1vgzJVsgzANC5Fgqs66LiIs8EIbAqNZoP50nodu1HMjjr0M7SaXd5FKM65QBQG8NOvNk5AhFw== X-Received: by 2002:a17:90a:5904:b0:1f1:ca90:b5a8 with SMTP id k4-20020a17090a590400b001f1ca90b5a8mr6382526pji.54.1658155772934; Mon, 18 Jul 2022 07:49:32 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:32 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 06/35] udev-extraconf/mount.sh: save mount name in our tmp filecache Date: Mon, 18 Jul 2022 04:48:31 -1000 Message-Id: <55c2de8963cbaffdde4e527b044c3c3e3658924e.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:49:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168206 From: Muhammad Hamza Doing this will allow to fetch the exact name created by the auto-mounter during the remove action where depending on the scenario utilities such as the blkid might not be usable due to actual device not being present on the system. Signed-off-by: Awais Belal Signed-off-by: Muhammad Hamza Signed-off-by: Luca Ceresoli (cherry picked from commit 496b76f8775a620c1d449eb6f62a41656abf2a9b) Signed-off-by: Ming Liu Signed-off-by: Steve Sakoman --- meta/recipes-core/udev/udev-extraconf/mount.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh index 40910be8bd..c4695ee27d 100644 --- a/meta/recipes-core/udev/udev-extraconf/mount.sh +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh @@ -126,7 +126,10 @@ automount() { rm_dir "$MOUNT_BASE/$name" else logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] successful" - touch "/tmp/.automount-$name" + # The actual device might not be present in the remove event so blkid cannot + # be used to calculate what name was generated here. Simply save the mount + # name in our tmp file. + echo "$name" > "/tmp/.automount-$name" fi } From patchwork Mon Jul 18 14:48:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10320 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2D18CCA485 for ; Mon, 18 Jul 2022 14:49:42 +0000 (UTC) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mx.groups.io with SMTP id smtpd.web08.28249.1658155776297225959 for ; Mon, 18 Jul 2022 07:49:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=ruhn47qB; spf=softfail (domain: sakoman.com, ip: 209.85.215.172, mailfrom: steve@sakoman.com) Received: by mail-pg1-f172.google.com with SMTP id r186so10799837pgr.2 for ; Mon, 18 Jul 2022 07:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=udLw72HCoQCxvBEgcor/Anf7hejFjSKD4KzKxLaLyA0=; b=ruhn47qBnvKqelKUUw7cCGnxohWJ68XOfo/ttnEgowLK4PEthlLfHxFvwA04WC0fCx cJyUfaUcKUyZRi1AshKP3D78hbIqsiDs4CSsoIfXZym3yqJETCqWDStCVm2kHMNqO6rh pc8vvemN5nB+mkpDuChMmt2k4MgAYHsNGMZtu+mPLJvAugvy1RJLonwAWMM/dKRMhMVY YIcNK09jbYdYOt6sLO+LNG//19y4DXyzypIQ/ohe9yPHBPE+avkBPNQqcs/eni4n9wI6 WDsvlaQEJ070FZEjLBx7BfNy++wOxNc4QSx4nwyq79d3MM10nt1kTO2cBSIuCVOkQrpg jrsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=udLw72HCoQCxvBEgcor/Anf7hejFjSKD4KzKxLaLyA0=; b=eG9cZuFpIJy+SfYNUretw1j7pRKoktwBEHhZ+RLwnvj8OGZCGcqv2PxHWAM2Y0C5lt aMJHKwN5wfUIZg7RwELobgIcqFOlkoXdcMqu1Bz5AUu1OoLwaIKBQfFavS/68G1UZAgm k2CXCGth3vyiVuNgBi73AwT8qtTmGkUe9eZqnerodABMfSKq9eNlvyVB0pLKiOuCU81V V2OjpomtsTGaShPR477QfBGUKo2gXg3ZwBafVRLCYThf7EPsaF3rAtrstEsF87GraidQ Kix8O7VloQhAigFV0z+Flsjj1fAYJNti8gbALJLVp2laQ5u6Dg5MYTeGw6bB92EqOj8c szwA== X-Gm-Message-State: AJIora83K/Wh1Cbn016pv5wwAt81zKWZnHk5XZcB1kAujehH6Ej2xWUW l2+x/o84nHJLyTczILKCpMVwzG79XMyRNK+L X-Google-Smtp-Source: AGRyM1skBvVzmK9SOfx3cq6D/y8R/5fOcbVRrr9hcM6R52AuOr0ksBzOUyXnxJpZCu50vk8VYcsX2A== X-Received: by 2002:a63:2c89:0:b0:411:66bf:9efc with SMTP id s131-20020a632c89000000b0041166bf9efcmr24385911pgs.589.1658155775240; Mon, 18 Jul 2022 07:49:35 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:34 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 07/35] udev-extraconf/mount.sh: only mount devices on hotplug Date: Mon, 18 Jul 2022 04:48:32 -1000 Message-Id: <35b18c5721cae13eb206631ee1dc0c14d3d52046.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:49:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168207 From: Muhammad Hamza fdisk from util-linux (2.31.1) and above allows the user to manipulate an already mounted device. In order to achieve this functionality it issues a BLKRRPART (block device re-read part) ioctl and in response the kernel generates remove/change/add events if the device is not mounted (manually unmounted etc) which are caught and processed by udev. This causes our auto-mounter to remount everything because it does not keep track and things go out of control. Differentiating between types of remove events such as the one described above (generated by BLKRRPART) and one where the device is physically plugged out is only possible using the DEVPATH variable which is cleaned up only when the device is actually plugged-out. This fixes the above anomaly by only mounting a device in add event which is cleaned up properly (tmp cache deleted) in the remove event or is not present in the tmp cache while making use of the DEVPATH variable during the remove action. Signed-off-by: Awais Belal Signed-off-by: Muhammad Hamza Signed-off-by: Luca Ceresoli (cherry picked from commit 11a5e6c17535438ea1e7a8403ed260c8b3a22bc8) Signed-off-by: Ming Liu Signed-off-by: Steve Sakoman --- .../recipes-core/udev/udev-extraconf/mount.sh | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh index c4695ee27d..537828e3e3 100644 --- a/meta/recipes-core/udev/udev-extraconf/mount.sh +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh @@ -45,6 +45,13 @@ automount_systemd() { return fi + # Only go for auto-mounting when the device has been cleaned up in remove + # or has not been identified yet + if [ -e "/tmp/.automount-$name" ]; then + logger "mount.sh/automount" "[$MOUNT_BASE/$name] is already cached" + return + fi + # Skip the partition which are already in /etc/fstab grep "^[[:space:]]*$DEVNAME" /etc/fstab && return for n in LABEL PARTLABEL UUID PARTUUID; do @@ -100,6 +107,13 @@ automount() { # Get the unique name for mount point get_label_name "${DEVNAME}" + # Only go for auto-mounting when the device has been cleaned up in remove + # or has not been identified yet + if [ -e "/tmp/.automount-$name" ]; then + logger "mount.sh/automount" "[$MOUNT_BASE/$name] is already cached" + return + fi + ! test -d "$MOUNT_BASE/$name" && mkdir -p "$MOUNT_BASE/$name" # Silent util-linux's version of mounting auto if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ; @@ -172,12 +186,18 @@ if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ -n "$ID_FS_TYPE" -o "$media_t fi if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then - for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " ` - do - $UMOUNT $mnt - done - - # Remove empty directories from auto-mounter name="`basename "$DEVNAME"`" - test -e "/tmp/.automount-$name" && rm_dir "$MOUNT_BASE/$name" + tmpfile=`find /tmp | grep "\.automount-.*${name}$"` + if [ ! -e "/sys/$DEVPATH" -a -e "$tmpfile" ]; then + logger "mount.sh/remove" "cleaning up $DEVNAME, was mounted by the auto-mounter" + for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " ` + do + $UMOUNT $mnt + done + # Remove mount directory created by the auto-mounter + # and clean up our tmp cache file + mntdir=`cat "$tmpfile"` + rm_dir "$MOUNT_BASE/$mntdir" + rm "$tmpfile" + fi fi From patchwork Mon Jul 18 14:48:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10321 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4BF4C433EF for ; Mon, 18 Jul 2022 14:49:42 +0000 (UTC) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mx.groups.io with SMTP id smtpd.web08.28250.1658155778552114127 for ; Mon, 18 Jul 2022 07:49:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=TiP7sSnv; spf=softfail (domain: sakoman.com, ip: 209.85.210.172, mailfrom: steve@sakoman.com) Received: by mail-pf1-f172.google.com with SMTP id g126so10836268pfb.3 for ; Mon, 18 Jul 2022 07:49:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=x70jdLNfP0wjX4IuU+zSxMTN1n1uB7Aa6BIun9X+Hh0=; b=TiP7sSnvUXW12+0tUY82wZnsW9FbZAfYspfHcizPGjIcqeSo6gkEOpn3apGKPbn/P5 FBARKMMn1vGO97pjo+KDNUo2jeJEhDE2WMC/5/q9azylniESd4GGpmvAsheDpJ4EtFmj q7X+D2fairUJmX1J4Q+88y9M6+REF6mSrKxnned08QZik9XNsoThe1v1Oa7jJmTiRiiu AwmDbeNDqc2RLwHwA7dY5Kvm+AczoWyLxThwRMA52dma2DO5S295hfmszPWX1+EoaM/U 5wQaRpZtETWM/+6xctyoPOBjJh9VV/1oX2S4dN8gQ/LpJb7VNRRpq5JCGp9aaYfs8AC+ X9Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x70jdLNfP0wjX4IuU+zSxMTN1n1uB7Aa6BIun9X+Hh0=; b=ncUF2SnnIngRthG6chFG1glEtdkC3MIHdSnSE0B6U8SbOTLsFJaiNn2K2YQbqng753 DdL7J/i2kpYJun3JE6iA6XZvnpeVT4DYmTnAfEnxj1HbnlHb6lxfNHyhuDzcAaN8EZOh gbl/s4kASwnzNcNyMPnlPtyndoDPpWJjy+1uq0jwuZ6xpg04aNybWIIQchhBdr3lEdi/ PhqpjlDLrZ4ILygo4nHp8MKjZIYZsOqRjveJLeQtK6F2hBKbian/1oIecLOn+Oirvh7L F1m1sN/vEJbcZguOJ1OayOrGDDicZcDLIH55x3RjYKyIfLvg7NeQLBfHMWqZdh7inSc/ T8yA== X-Gm-Message-State: AJIora98IaP/dhQgGPj8K03uf9ZTwroVbqy7dFfq+1yJUhhFdyRQJn5Q AiDa2q5ey+Uif+K1dKSE/EHEfcqgOgIvH8hM X-Google-Smtp-Source: AGRyM1tlyus/4hou6Kh5OMDcggRHY9fdXPIK/C/XlHkLFdcEgmEWzsEwUTtpA6tmAxJeyImY9hlHCQ== X-Received: by 2002:a63:f355:0:b0:419:8dfd:45d0 with SMTP id t21-20020a63f355000000b004198dfd45d0mr24768520pgj.226.1658155777474; Mon, 18 Jul 2022 07:49:37 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:36 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 08/35] udev-extraconf: force systemd-udevd to use shared MountFlags Date: Mon, 18 Jul 2022 04:48:33 -1000 Message-Id: <00ea4314feb51d82f9027bf53ff627541180daca.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:49:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168208 From: Muhammad Hamza Automounting does not work cleanly in case systemd as well as udev rules are being used simultaneously and in most cases race conditions and unknown behavior can come up. In case we're running on top of systemd we need to make sure that systemd-udevd knows that udev is in play as well and mounting should be done using shared flags. Also as we're using mount from sources other than systemd-mount in current scripts this is the most manageable fix to automounting problems. Signed-off-by: Awais Belal Signed-off-by: Muhammad Hamza Signed-off-by: Luca Ceresoli (cherry picked from commit 1e770416b4c9a0468404fb64d55114d93e84763b) Signed-off-by: Ming Liu Signed-off-by: Steve Sakoman --- .../udev/udev-extraconf/systemd-udevd.service | 3 +++ meta/recipes-core/udev/udev-extraconf_1.1.bb | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-core/udev/udev-extraconf/systemd-udevd.service diff --git a/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service b/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service new file mode 100644 index 0000000000..a9b86eb6e4 --- /dev/null +++ b/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service @@ -0,0 +1,3 @@ +.include @systemd_unitdir@/system/systemd-udevd.service +[Service] +MountFlags=shared diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb index 8213c1a930..ef6019259e 100644 --- a/meta/recipes-core/udev/udev-extraconf_1.1.bb +++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb @@ -11,6 +11,7 @@ SRC_URI = " \ file://autonet.rules \ file://network.sh \ file://localextra.rules \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://systemd-udevd.service', '', d)} \ " S = "${WORKDIR}" @@ -35,9 +36,15 @@ do_install() { sed -i 's|@MOUNT_BASE@|${MOUNT_BASE}|g' ${D}${sysconfdir}/udev/scripts/mount.sh install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/systemd/system + install ${WORKDIR}/systemd-udevd.service ${D}${sysconfdir}/systemd/system/systemd-udevd.service + sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' ${D}${sysconfdir}/systemd/system/systemd-udevd.service + fi } -FILES:${PN} = "${sysconfdir}/udev" +FILES:${PN} = "${sysconfdir}/udev ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${sysconfdir}/systemd/system/systemd-udevd.service', '', d)}" RDEPENDS:${PN} = "udev util-linux-blkid" CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist" From patchwork Mon Jul 18 14:48:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10319 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A51D8C43334 for ; Mon, 18 Jul 2022 14:49:42 +0000 (UTC) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mx.groups.io with SMTP id smtpd.web08.28250.1658155778552114127 for ; Mon, 18 Jul 2022 07:49:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=BV5AKFJD; spf=softfail (domain: sakoman.com, ip: 209.85.210.172, mailfrom: steve@sakoman.com) Received: by mail-pf1-f172.google.com with SMTP id g126so10836386pfb.3 for ; Mon, 18 Jul 2022 07:49:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=P7W1Nf7AIT/UcA9V/grN2EYj/kDEw82ne4rUyQkQwtY=; b=BV5AKFJDE8LanCQeOI65SiPtVgMGDWfMxuu4AxeJRANoE87a17m4tzxHiNWenx3qvp pUndmj/mucoY1o4Eq0xvQCTn+zmr69gUKCI26DSROzTmUMBnT+DyeDZ2zFoFqZNJM/MC z8R7doZZ307Asq42V7/UTUHBqZPBU56mqdd+Q4wtkxwM060Air6Wyl2+2G2QlbV3kzmD e4xJcd+tdcLCnhnxNo6HMDfh56IWk1aUaINkLrDtEkSk2bCBrJ+AHqoMJPn1w1w+i7QC M9zSxG950Bk6nnpdcPeo/hOYKnpTopF4679/1jEqd5QG/4C1vrxVzOfhwYwy2j1IAZnK neEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P7W1Nf7AIT/UcA9V/grN2EYj/kDEw82ne4rUyQkQwtY=; b=CXYUb97iHRTtmDBKABINUwVG+gCE5Q1J58hJy2vFp+dNF8/sIGIzbeCMY9V1oWJ+kj pXifhhupuQKA+MEYcI+znl5gqqDB3zA8KESXDqru0XqIuLiDaz06AZkBUD8A0yMQ/uwM M8+0O/iPEp8jU60Pq83W58U5t0cf9JAX+s98oFe5YGpuzk1i6sjPZetHwG1GssQrDutD 4VhdJPDxiNI8DX1manCVEkGOzTAYmK9rX0G21zpoSw+M8rFbiFUFsnHEV1B3Kx6tMR9p qbPNTdByRnO+L+O7/Xfj5i4ON6XXhJmJuKU32ozRZKo3EfuTCAuSYmy0EtSltZTmKtHm ebYA== X-Gm-Message-State: AJIora8lrxcxjlYgXy2DN/Jb18MqDtk4GoIvv9NZlHOfeRfQvubxpyPA H4+9haKHqjxP/KvGeyq51GL/gWXJMchLO9G1 X-Google-Smtp-Source: AGRyM1vkvdRGRVQDiAbuS6tuyerDByHYO7IxdTo8tYuF0DdaUaQuRLqmL4/Lh4bGNAj6UDKGS+X8pg== X-Received: by 2002:a63:81c1:0:b0:415:bbd5:794f with SMTP id t184-20020a6381c1000000b00415bbd5794fmr24297643pgd.546.1658155779614; Mon, 18 Jul 2022 07:49:39 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:39 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 09/35] udev-extraconf/mount.sh: ignore lvm in automount Date: Mon, 18 Jul 2022 04:48:34 -1000 Message-Id: <9d90c89bd964bfabb31e64424e7000ac88a2697b.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:49:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168209 From: Muhammad Hamza Failure message is shown in boot logs when trying to mount lvm as automounter does not handle cases where lvm is mounted. This simply skips lvm while automounting to avoid failure message in boot logs. Signed-off-by: Ansar Rasool Signed-off-by: Muhammad Hamza Signed-off-by: Luca Ceresoli (cherry picked from commit b1d18072ed9a8b0bca0f20f8e5deefa73ab6acbe) Signed-off-by: Ming Liu Signed-off-by: Steve Sakoman --- meta/recipes-core/udev/udev-extraconf/mount.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh index 537828e3e3..8b6ce77741 100644 --- a/meta/recipes-core/udev/udev-extraconf/mount.sh +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh @@ -76,6 +76,8 @@ automount_systemd() { ;; swap) return ;; + lvm*|LVM*) + return ;; # TODO *) ;; @@ -129,6 +131,8 @@ automount() { ;; swap) return ;; + lvm*|LVM*) + return ;; # TODO *) ;; From patchwork Mon Jul 18 14:48:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10325 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6542C433EF for ; Mon, 18 Jul 2022 14:49:52 +0000 (UTC) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mx.groups.io with SMTP id smtpd.web10.28030.1658155782734633224 for ; Mon, 18 Jul 2022 07:49:42 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=cZn8EUJZ; spf=softfail (domain: sakoman.com, ip: 209.85.214.177, mailfrom: steve@sakoman.com) Received: by mail-pl1-f177.google.com with SMTP id j12so9226189plj.8 for ; Mon, 18 Jul 2022 07:49:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=iOJjmfxzG1vJGby0CkXuT78T42u+krUtsbxEObVS2WY=; b=cZn8EUJZad4V0FCpJnPK4gXEz4Ej9WxX62X3lIVklRY4z+j6HZmD/JOM6IvQSZbvk/ W0vOhClCzWIgleh11QO2uWFgVGtbltI4hamwsaLs45tq/jir/gyRXAjQRj/iF32G7qUE SJG26k66A9yLJ7KEEFc+Rh4Z+4+UsAZvVbhXnY/psFp9UVmwFCa3NFSmbFtc5T16C218 yKluZbQnqZwaW14e9MhSjCkzElruY9ptwpSh8RBFHUTWQ4EyjHeTmoyaCb7UmnlIWapE AVu8orrFPf9cGxFbfQZR2VDThvcVUaahW7NABeI35+aye8AIO3enRn3HC5aNGcIPtvpH JYmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iOJjmfxzG1vJGby0CkXuT78T42u+krUtsbxEObVS2WY=; b=f24EoTBmhr6A5nL0ZO6MW2ZFYqnB2g4PInDnenvc0AqRVyGBymHVeS0Cmd27h16nXh TQYv1qp6thcnPq9esW90XBdHZUSPxMD2WTEEfD4ut9zR6WyoFlMP7A8jGhHD3AJYMnXA J/zoPD9ogFyZm3GI5wgtmXVNiw3rbdZXqKyUVC3vV/6y/Hq9XYWBcIj/03VREfWjvhCz NBaeMVaQfYgJsf1a8VsvinNd5BY2y0N2UU/Mkenl/ykxAyQfFo6JGeU8xaWklU39GmnA 8gznMMC0gTEZsH6YNASeiXzPGOJ/0yq0UdLrjVCBUmZZGKQmHL36jj3Vt+F1ald56w3Q 0dbg== X-Gm-Message-State: AJIora/25QhGQYPW+oBLYO9UY4jcYQDMX18LQ1njP3Zp2xkMDUtwFwI0 PTxUmbkwKOVMMLnTp1JzoI337USGCif6ZNfM X-Google-Smtp-Source: AGRyM1tRssHqDXGLE2/TWknXEjHrtJSlbCE2AQT4FeQVVLyJqfwNVo4s9dHBtcIqNwOuHV+FkSDH0A== X-Received: by 2002:a17:903:281:b0:16c:4ccf:e46b with SMTP id j1-20020a170903028100b0016c4ccfe46bmr28208359plr.36.1658155781633; Mon, 18 Jul 2022 07:49:41 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:41 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 10/35] udev-extraconf: fix some systemd automount issues Date: Mon, 18 Jul 2022 04:48:35 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:49:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168210 From: Ming Liu The '.include' syntax has been dropped from latest systemd releases, we need drop the systemd-udevd.service here, introduce a postinst function to add "MountFlags=shared" to systemd-udevd.service. Also lsblk binary is being called in mount.sh automount_systemd function, add it to RDEPENDS. Signed-off-by: Ming Liu Signed-off-by: Richard Purdie (cherry picked from commit 356520d60b9429c6f62124821e42468ff2b7b1d6) Signed-off-by: Ming Liu Signed-off-by: Steve Sakoman --- .../udev/udev-extraconf/systemd-udevd.service | 3 --- meta/recipes-core/udev/udev-extraconf_1.1.bb | 20 +++++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) delete mode 100644 meta/recipes-core/udev/udev-extraconf/systemd-udevd.service diff --git a/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service b/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service deleted file mode 100644 index a9b86eb6e4..0000000000 --- a/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service +++ /dev/null @@ -1,3 +0,0 @@ -.include @systemd_unitdir@/system/systemd-udevd.service -[Service] -MountFlags=shared diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb index ef6019259e..30f1fe76d0 100644 --- a/meta/recipes-core/udev/udev-extraconf_1.1.bb +++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb @@ -11,7 +11,6 @@ SRC_URI = " \ file://autonet.rules \ file://network.sh \ file://localextra.rules \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://systemd-udevd.service', '', d)} \ " S = "${WORKDIR}" @@ -36,16 +35,21 @@ do_install() { sed -i 's|@MOUNT_BASE@|${MOUNT_BASE}|g' ${D}${sysconfdir}/udev/scripts/mount.sh install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts +} + +pkg_postinst:${PN} () { + if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then + sed -i "/\[Service\]/aMountFlags=shared" $D${systemd_unitdir}/system/systemd-udevd.service + fi +} - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/systemd/system - install ${WORKDIR}/systemd-udevd.service ${D}${sysconfdir}/systemd/system/systemd-udevd.service - sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' ${D}${sysconfdir}/systemd/system/systemd-udevd.service - fi +pkg_postrm:${PN} () { + if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then + sed -i "/MountFlags=shared/d" $D${systemd_unitdir}/system/systemd-udevd.service + fi } -FILES:${PN} = "${sysconfdir}/udev ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${sysconfdir}/systemd/system/systemd-udevd.service', '', d)}" -RDEPENDS:${PN} = "udev util-linux-blkid" +RDEPENDS:${PN} = "udev util-linux-blkid ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'util-linux-lsblk', '', d)}" CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist" # to replace udev-extra-rules from meta-oe From patchwork Mon Jul 18 14:48:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10324 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB679CCA482 for ; Mon, 18 Jul 2022 14:49:52 +0000 (UTC) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mx.groups.io with SMTP id smtpd.web12.28236.1658155784906777526 for ; Mon, 18 Jul 2022 07:49:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=P1msJFA2; spf=softfail (domain: sakoman.com, ip: 209.85.216.54, mailfrom: steve@sakoman.com) Received: by mail-pj1-f54.google.com with SMTP id b10so1057760pjq.5 for ; Mon, 18 Jul 2022 07:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=zLy5cCp+jeV9OG6RCDv/48a1ON5Rwkqd5hWJXoCG8u8=; b=P1msJFA2yXbOftZ/CL8RMZa4VLgxsh1YXyzaQT8Ok07Ry7uJEpNC7WX/iWsEz35KTm 0LGOA3Dg3IHC5LLM5tnKUMYEe80IXwmlbbe62YkLwQV8A6j1tFIOYm2LtU2FwPRUMo7W AtpDMIai+rZCEbkMlFxjrxS9IxRPjaFRp2G8sq+2ZrgtBQJC1CCjiWmvbxOteZ//mtn5 P1O2vHHR5gTRj8yuAAocZLXTaXtBgPLHAXkAyRn5f+5JiIvB7IlJbTB8O95TzQ1XAkTP me65hxSWB7frIY36QxGswoPte34Nlhvpmyu2Qy6bzV7phELE1aID+zmSDTPwmv9Aano/ x4bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zLy5cCp+jeV9OG6RCDv/48a1ON5Rwkqd5hWJXoCG8u8=; b=Q97cZ6sEex8EOB0DupqUEzvXz/JD5aviF4l7+llTRynGwE8Lp2fJV/bVhHaTKzhPMb j8wiXX+oZWnU6GcLXveqpDL2f2FGkMnLQTaRJ2MSdX2eg99pWRx2ixrIHX9/UTyS4uMm j/AdfdjrFEZT8no/Ct9zBzNDTEzAP9Ij7SvEqVmfwwyVabQ7t81OHBJLPzLmpfcij59o 7ZbE2w1mWdA6/F3gmP6eKP2NAoGbARFI9jbK29uhkUn7xMNMXW0sVu7TCJgbUC5VSkzJ QEH4RGFMKRBSxs32LVxMJQUimo6snuvuTuvqFm0B55SSWfPaJZnHHrKITKd+dy0IJWHM 7ZtA== X-Gm-Message-State: AJIora+HP4TkrunEpbhvKtOqNjASHyiKcCPu5l84MKF3fX2m8MCGtggL A9v5MPEaGSvrNzp8WLq5AcLvaGFwmgLay/J3 X-Google-Smtp-Source: AGRyM1vP0Y0CR4wYuu41dSrp2qQTS/oQv1pLshfsBd05IfQv+oYa0mMLjd+axpLripP8+bl3pTJQ8w== X-Received: by 2002:a17:90b:28d:b0:1f0:47:ca83 with SMTP id az13-20020a17090b028d00b001f00047ca83mr38372205pjb.176.1658155783799; Mon, 18 Jul 2022 07:49:43 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:43 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 11/35] udev-extraconf:mount.sh: fix path mismatching issues Date: Mon, 18 Jul 2022 04:48:36 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:49:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168211 From: Ming Liu Since commit f077befd5f36ad88623aaf6a38b1a837ecb18650: [ udev-extraconf: let automount base directory configurable ] the mount base directory was configurable, we need drop 'run-media' usage as well, change to figure it out from MOUNT_BASE. Also 'get_label_name' function needs to be called ealier in automount_systemd before checking '/tmp/.automount-$name', otherwise they would never match. (From OE-Core rev: c013b33162546fb5bd4bcc1daac75aa65d0be1a3) Signed-off-by: Ming Liu Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit 7ed210054b3e253d5a67075bb9d4768d1661bef1) Signed-off-by: Ming Liu Signed-off-by: Steve Sakoman --- meta/recipes-core/udev/udev-extraconf/mount.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh index 8b6ce77741..43acb3a7a0 100644 --- a/meta/recipes-core/udev/udev-extraconf/mount.sh +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh @@ -40,11 +40,14 @@ automount_systemd() { name="`basename "$DEVNAME"`" # Skip already mounted partitions - if [ -f /run/systemd/transient/run-media-$name.mount ]; then + if [ -f /run/systemd/transient/$(echo $MOUNT_BASE | cut -d '/' -f 2- | sed 's#/#-#g')-*$name.mount ]; then logger "mount.sh/automount" "$MOUNT_BASE/$name already mounted" return fi + # Get the unique name for mount point + get_label_name "${DEVNAME}" + # Only go for auto-mounting when the device has been cleaned up in remove # or has not been identified yet if [ -e "/tmp/.automount-$name" ]; then @@ -61,9 +64,6 @@ automount_systemd() { grep "^[[:space:]]*$tmp" /etc/fstab && return done - # Get the unique name for mount point - get_label_name "${DEVNAME}" - [ -d "$MOUNT_BASE/$name" ] || mkdir -p "$MOUNT_BASE/$name" MOUNT="$MOUNT -o silent" From patchwork Mon Jul 18 14:48:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10323 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA8E3CCA479 for ; Mon, 18 Jul 2022 14:49:52 +0000 (UTC) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mx.groups.io with SMTP id smtpd.web10.28034.1658155787184776661 for ; Mon, 18 Jul 2022 07:49:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=1H4Aju+F; spf=softfail (domain: sakoman.com, ip: 209.85.216.44, mailfrom: steve@sakoman.com) Received: by mail-pj1-f44.google.com with SMTP id 89-20020a17090a09e200b001ef7638e536so18421950pjo.3 for ; Mon, 18 Jul 2022 07:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=0F9wCgphh2RDxSmzoDZuRZPGVkNaMy7AU7AR/k1fIi8=; b=1H4Aju+F1AMoj2sYXtyqvN6ro6vV+Df4sDl37DXNxJA1jTzZ3l4W5odx2g06x+SzR/ 10hmeqFxde+BDkoayGTcRVs8nsGvdmZ2MLpPmc6BWmoloU2K5enHKsK9Emv7ausuFjaA LeUYwcs+xwnu+VL5yPN9vSGcGwg/GMacfkBvbzKeQoWDQ9IYj8bY/+6a2YoQm5X2Uhak 0C2WxRhiNQy71RLr7wv23KxVTm4C3QZz132bjqvgt7uUCepaI2YZukJY44q0vVCufvb9 xpOYGijRFURTbww18A02dkk2/2nMCRL9d3m9BWf+Pnz5pC3zVd3KmgLhn5wEbEFQetOA Yq9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0F9wCgphh2RDxSmzoDZuRZPGVkNaMy7AU7AR/k1fIi8=; b=slyfZSbsCZGjC1EhRyjtCrRGlK8vwc4Fm1ddh+LbhsIAoEndc+pFCbmfiYOommgdP9 qlZ8IOyoXTiFENb505OVLqOmYFsERYAjRwsTZjwPaNB7waWmbyfvlxF0yiI0jFOENRgV 9QaWTvYTf+Ljsj3ykBeEqGT29hM5jWRL3rernUz3JNKuGVnfWNgWtgstmRrGItVBUS07 uNrqO+kwpI4H9LHMdC18RL+4wqnFjNh2FN5YYjMYq2Ujy8tLHTYDscnbCkX7YSLLTpcr WzaZ/HNp4PhM2KSg5T+NDMp//6Q4IhE8tRnVkKjP8EMuqbADOqcgdtN2OgzJpf5Ki3Wv lzGQ== X-Gm-Message-State: AJIora9hubqhqx1Q/VGrPP3OXSfqIusAEIJuTvplpItr8qap70iMPhPE v6kjq6v5cy7FGoWdRbmd31YZ3mKRt349asDL X-Google-Smtp-Source: AGRyM1tqUaFaPY6RHtHce6L69TDuAS+f9/zgyxwh/rH8YaO6tSQUytrq1xW6IlZGnz+UUsM/S0PmGg== X-Received: by 2002:a17:90b:2496:b0:1ef:a94:7048 with SMTP id nt22-20020a17090b249600b001ef0a947048mr32784898pjb.244.1658155785866; Mon, 18 Jul 2022 07:49:45 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:45 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 12/35] python3: Backport patch to fix an issue in subinterpreters Date: Mon, 18 Jul 2022 04:48:37 -1000 Message-Id: <39d57ef7e341a048b94bc5dd9c29d58f57e06f19.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:49:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168212 From: Markus Volk This adds a backport patch that fixes a problem in subinterpreters related to the garbagecollector. Without the patch, there are random segfaults in several Kodi addons that use python3-sqlite3. Presumably there are real world issues in other programs as well. Signed-off-by: Markus Volk Signed-off-by: Steve Sakoman --- ...h-92036-Fix-gc_fini_untrack-GH-92037.patch | 54 +++++++++++++++++++ .../recipes-devtools/python/python3_3.10.4.bb | 1 + 2 files changed, 55 insertions(+) create mode 100644 meta/recipes-devtools/python/python3/0001-gh-92036-Fix-gc_fini_untrack-GH-92037.patch diff --git a/meta/recipes-devtools/python/python3/0001-gh-92036-Fix-gc_fini_untrack-GH-92037.patch b/meta/recipes-devtools/python/python3/0001-gh-92036-Fix-gc_fini_untrack-GH-92037.patch new file mode 100644 index 0000000000..6a58c35cc6 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-gh-92036-Fix-gc_fini_untrack-GH-92037.patch @@ -0,0 +1,54 @@ +From 178a238f25ab8aff7689d7a09d66dc1583ecd6cb Mon Sep 17 00:00:00 2001 +From: "Miss Islington (bot)" + <31488909+miss-islington@users.noreply.github.com> +Date: Wed, 4 May 2022 03:23:29 -0700 +Subject: [PATCH 01/40] gh-92036: Fix gc_fini_untrack() (GH-92037) + +Fix a crash in subinterpreters related to the garbage collector. When +a subinterpreter is deleted, untrack all objects tracked by its GC. +To prevent a crash in deallocator functions expecting objects to be +tracked by the GC, leak a strong reference to these objects on +purpose, so they are never deleted and their deallocator functions +are not called. +(cherry picked from commit 14243369b5f80613628a565c224bba7fb3fcacd8) + +Co-authored-by: Victor Stinner + +Upstream-Status: Backport +--- + .../2022-04-28-23-37-30.gh-issue-92036.GZJAC9.rst | 5 +++++ + Modules/gcmodule.c | 6 ++++++ + 2 files changed, 11 insertions(+) + create mode 100644 Misc/NEWS.d/next/Core and Builtins/2022-04-28-23-37-30.gh-issue-92036.GZJAC9.rst + +diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-04-28-23-37-30.gh-issue-92036.GZJAC9.rst b/Misc/NEWS.d/next/Core and Builtins/2022-04-28-23-37-30.gh-issue-92036.GZJAC9.rst +new file mode 100644 +index 0000000000..78094c5e4f +--- /dev/null ++++ b/Misc/NEWS.d/next/Core and Builtins/2022-04-28-23-37-30.gh-issue-92036.GZJAC9.rst +@@ -0,0 +1,5 @@ ++Fix a crash in subinterpreters related to the garbage collector. When a ++subinterpreter is deleted, untrack all objects tracked by its GC. To prevent a ++crash in deallocator functions expecting objects to be tracked by the GC, leak ++a strong reference to these objects on purpose, so they are never deleted and ++their deallocator functions are not called. Patch by Victor Stinner. +diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c +index 805a159d53..43ae6fa98b 100644 +--- a/Modules/gcmodule.c ++++ b/Modules/gcmodule.c +@@ -2170,6 +2170,12 @@ gc_fini_untrack(PyGC_Head *list) + for (gc = GC_NEXT(list); gc != list; gc = GC_NEXT(list)) { + PyObject *op = FROM_GC(gc); + _PyObject_GC_UNTRACK(op); ++ // gh-92036: If a deallocator function expect the object to be tracked ++ // by the GC (ex: func_dealloc()), it can crash if called on an object ++ // which is no longer tracked by the GC. Leak one strong reference on ++ // purpose so the object is never deleted and its deallocator is not ++ // called. ++ Py_INCREF(op); + } + } + +-- +2.25.1 + diff --git a/meta/recipes-devtools/python/python3_3.10.4.bb b/meta/recipes-devtools/python/python3_3.10.4.bb index 357025f856..34fd2895a3 100644 --- a/meta/recipes-devtools/python/python3_3.10.4.bb +++ b/meta/recipes-devtools/python/python3_3.10.4.bb @@ -35,6 +35,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://0001-setup.py-Do-not-detect-multiarch-paths-when-cross-co.patch \ file://deterministic_imports.patch \ file://0001-Avoid-shebang-overflow-on-python-config.py.patch \ + file://0001-gh-92036-Fix-gc_fini_untrack-GH-92037.patch \ " SRC_URI:append:class-native = " \ From patchwork Mon Jul 18 14:48:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10322 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6570C43334 for ; Mon, 18 Jul 2022 14:49:52 +0000 (UTC) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mx.groups.io with SMTP id smtpd.web12.28239.1658155789352625933 for ; Mon, 18 Jul 2022 07:49:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=eTmQBy08; spf=softfail (domain: sakoman.com, ip: 209.85.215.177, mailfrom: steve@sakoman.com) Received: by mail-pg1-f177.google.com with SMTP id q16so7694117pgq.6 for ; Mon, 18 Jul 2022 07:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=1JNhF9Lak23IrYMTuxgy6rpBPOIkleJ/SKoCCZgzqY8=; b=eTmQBy08rxUP23sngAOPFVysSh31lVk5VgxIRZVUp3VvXQW8PXMJxVetRXsI8Eebnd sW8OXe7TnnM1FrIuGe1R6pPDnl1576hNQSA82jxUrgY5PenWeog5Q5zCqIpG3STw44qv mYaGb/4pj1Zvp1mRGUv5/sE9i0KuZAdHyHvE2UG6O0d1rE2k0QbWYSn+gFY4eMWosPAh tCv+NIIdmoz4Q6yuC4PqPp8W8rVqxKQR0Arzs1ctVzCkdsoNpJP3VCKLaraP29nvvxJZ 9/fKCNrAI8UhRGxmE8/06xEhIUeNclgJ+MnYfxnkdyW/6ascJM7lFi/tUTwyeV6sqISB inOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1JNhF9Lak23IrYMTuxgy6rpBPOIkleJ/SKoCCZgzqY8=; b=s/c3b9DTInHG1QidjY5QkoPmN2ARdfsnUZocquNNjf6e7ivOZ7Nirtbdc+wt6UzyUt 0FsnKYgqGqcRZF/Ea38gYPtJBYvEG8uuPtuNaG6dgsl1eLohpGIFmw+tx6B/YPFLjoFr 9kCtxIbsJfUSLxLYJRX0JXYE8H5qCrM/1JXo7Z3mIOX+docheujBdnsTz5waASim9Acv 3oLALBfYtavRqfcxp2vPzjkQqSuK8MTuxrZalztrq+qvuyPjg3IB4SqZGlt/ZAAWFmRp H15MXa8Sz5J2GG6MBZrXPJeLsf+Zlff+Hv7BFWXp7LMGUXaUtt/mECdOnZur8CDOWQgc 9esg== X-Gm-Message-State: AJIora9nnFgei+JoAk9E07hdT+brqbflxiReUDZuSo3z3n3Ugac1Zj1X D+IIIHg+joSG8EYVsbh9jljj7guJm9XEQQu6 X-Google-Smtp-Source: AGRyM1uNTdWmY5CkR5meDayLA+R498NMlrbwXjonUc+duvnPUztSA1CQMhShYxtfgw8PNCwE+uwaCg== X-Received: by 2002:a05:6a00:230a:b0:52a:d0e8:c936 with SMTP id h10-20020a056a00230a00b0052ad0e8c936mr29194841pfh.67.1658155788184; Mon, 18 Jul 2022 07:49:48 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:47 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 13/35] package.bbclass: Fix base directory for debugsource files when using externalsrc Date: Mon, 18 Jul 2022 04:48:38 -1000 Message-Id: <2772b77c0e3d0f6226a2d7c40a59900a6d7c942f.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:49:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168213 From: Alejandro Hernandez Samaniego While executing do_package, bitbake checks for a list of debug source files and uses a pattern to match the ones to be included in copydebugsources. Previously when externalsrc was in use either directly or by using devtool, the source location changed and this pattern no longer matched, hence debug source files failed to be included in the corresponding package. Check when the source directory isnt the default (based on WORKDIR), and change the pattern used to match debug source files if that is the case, allowing us to perform do_package properly. Workaround debugsource.list containing paths from the host by moving debug source files away from the host directory structure to avoid host contamination (this seems to happen when packages use $TMPDIR/work-shared and externalsrc is in use). Test matrix included using: - devtool to use externalsrc automatically - externalsrc with a non-devtool based source directory - No externalsrc at all Tested the following packages to be working: - glibc ($TMPDIR/work-shared based) - libxcrypt ($TMPDIR/work based) [YOCTO 8015] Signed-off-by: Alejandro Enedino Hernandez Samaniego Signed-off-by: Richard Purdie (cherry picked from commit a887bd96fd0a15398e8077ea79df5070971866e4) Signed-off-by: Steve Sakoman --- meta/classes/package.bbclass | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 62050a18b8..4850134022 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -553,13 +553,25 @@ def copydebugsources(debugsrcdir, sources, d): strip = d.getVar("STRIP") objcopy = d.getVar("OBJCOPY") workdir = d.getVar("WORKDIR") + sdir = d.getVar("S") + sparentdir = os.path.dirname(os.path.dirname(sdir)) + sbasedir = os.path.basename(os.path.dirname(sdir)) + "/" + os.path.basename(sdir) workparentdir = os.path.dirname(os.path.dirname(workdir)) workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) + # If S isnt based on WORKDIR we can infer our sources are located elsewhere, + # e.g. using externalsrc; use S as base for our dirs + if workdir in sdir: + basedir = workbasedir + parentdir = workparentdir + else: + basedir = sbasedir + parentdir = sparentdir + # If build path exists in sourcefile, it means toolchain did not use # -fdebug-prefix-map to compile if checkbuildpath(sourcefile, d): - localsrc_prefix = workparentdir + "/" + localsrc_prefix = parentdir + "/" else: localsrc_prefix = "/usr/src/debug/" @@ -581,7 +593,7 @@ def copydebugsources(debugsrcdir, sources, d): processdebugsrc += "sed 's#%s##g' | " processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) + cmd = processdebugsrc % (sourcefile, basedir, localsrc_prefix, parentdir, dvar, debugsrcdir) try: subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) except subprocess.CalledProcessError: @@ -591,9 +603,22 @@ def copydebugsources(debugsrcdir, sources, d): # cpio seems to have a bug with -lL together and symbolic links are just copied, not dereferenced. # Work around this by manually finding and copying any symbolic links that made it through. cmd = "find %s%s -type l -print0 -delete | sed s#%s%s/##g | (cd '%s' ; cpio -pd0mL --no-preserve-owner '%s%s')" % \ - (dvar, debugsrcdir, dvar, debugsrcdir, workparentdir, dvar, debugsrcdir) + (dvar, debugsrcdir, dvar, debugsrcdir, parentdir, dvar, debugsrcdir) subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) + + # debugsources.list may be polluted from the host if we used externalsrc, + # cpio uses copy-pass and may have just created a directory structure + # matching the one from the host, if thats the case move those files to + # debugsrcdir to avoid host contamination. + # Empty dir structure will be deleted in the next step. + + # Same check as above for externalsrc + if workdir not in sdir: + if os.path.exists(dvar + debugsrcdir + sdir): + cmd = "mv %s%s%s/* %s%s" % (dvar, debugsrcdir, sdir, dvar,debugsrcdir) + subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) + # The copy by cpio may have resulted in some empty directories! Remove these cmd = "find %s%s -empty -type d -delete" % (dvar, debugsrcdir) subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) From patchwork Mon Jul 18 14:48:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10326 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5DFCC3F2D4 for ; Mon, 18 Jul 2022 14:50:02 +0000 (UTC) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mx.groups.io with SMTP id smtpd.web10.28037.1658155793263848263 for ; Mon, 18 Jul 2022 07:49:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=dxG5Gekl; spf=softfail (domain: sakoman.com, ip: 209.85.215.180, mailfrom: steve@sakoman.com) Received: by mail-pg1-f180.google.com with SMTP id f65so10766903pgc.12 for ; Mon, 18 Jul 2022 07:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=iPc7NocptWA32GYzrCUB/G2dZyK3h0JflmP4fVj+tA0=; b=dxG5Gekl/2w0RGyiT0k/LSvZ1YFeMQXSU/jDVNg7nseBuLdeLWy7dXvKJIawD0tHyp 1IeoaL0R2MJ1p04mOiC2mpM+rZVQn6ewJKSVHPwwI50RKxG+QnTylGvH7OTYv6qO0/1c jLFE1d8AqtgqpIdsDdbU4BAC6hzY4wXn6USsKdMFz4J30pKjuOnoQ1MdcA+TpC5ORtjI 20vtjIOJjKNCj25aDGuNqrq98VbjA7gatSV3KSKlO59yKBVW2mUZzp6JXFy53/c2Lc9X xvpKLTYMWPEvBhorIg7/RkWncdLKt8w4u2HBzvhdBO8yfbVz6+88QuNgCySXS/HVCvqt iWNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iPc7NocptWA32GYzrCUB/G2dZyK3h0JflmP4fVj+tA0=; b=kA8JDF9G8uJx4AVKnwQtIrz9YJMJeQsVjECsB90NkNO2i1vWJvfs2F9agZ4WmHSOxv +v4SfS1CTEqPumKJjIOMxLYvUvTp6JLwzVJImYEwleCiMbZ6tq2BS2kOAVrgU1eGvsvb N+HK0RdL5Wl7/m3946XI7rwi7FFoEGorcGWjVSi5Mwoo9vfXfCzpfj7mTYlXI6sTdpOU FxpSs8Zrg2Ik+a4965Xuihg61B5h/b6oWS0uaJxx3D7yvbwFQQuOThVtaGBwFY3f+BRD QtUTYWlSwKruBdbqFzbB3e3uPJHTkIEawG7ZFje/M/ZX23vjLCw+RyVKhl+9HRngHtKS jEjg== X-Gm-Message-State: AJIora/HA7QNgwBvhTnyM8vpJJuTEfmYvWxi2wIz63fmJRMuxD7Q/NOz S52YZK2VGkUv5M5F75ochyPzS2c4DX6087ER X-Google-Smtp-Source: AGRyM1u6kutlpQK7msq+xW9QtEkSmumRLIIpqMd8MAmBR4iW7df2bDqs0mGzXgdWzBkxkireHU1bLg== X-Received: by 2002:a05:6a00:99f:b0:52a:dd61:a50f with SMTP id u31-20020a056a00099f00b0052add61a50fmr28354415pfg.9.1658155792244; Mon, 18 Jul 2022 07:49:52 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:51 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 14/35] package.bbclass: Avoid stripping signed kernel modules in splitdebuginfo Date: Mon, 18 Jul 2022 04:48:39 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168214 From: Christoph Lauer Since commit d756b346f248df47b0540644adb1d0f17bcc4b6e kernel modules are stripped by the functions 'runstrip' and 'splitdebuginfo'. Signed modules must not be stripped. Function 'runstrip' avoids this by running is_kernel_module_signed. Apply the same check to splitdebuginfo. (From OE-Core rev: 6859226652339b19cbc7bdfec074fe2016cdee60) Signed-off-by: Christoph Lauer Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit dc0f0413eabfd50f78d887f73f808d40a314fbd8) Signed-off-by: Steve Sakoman --- meta/classes/package.bbclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 4850134022..63887b34f8 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -382,6 +382,11 @@ def splitdebuginfo(file, dvar, dv, d): debugfile = dvar + dest sources = [] + if file.endswith(".ko") and file.find("/lib/modules/") != -1: + if oe.package.is_kernel_module_signed(file): + bb.debug(1, "Skip strip on signed module %s" % file) + return (file, sources) + # Split the file... bb.utils.mkdirhier(os.path.dirname(debugfile)) #bb.note("Split %s -> %s" % (file, debugfile)) From patchwork Mon Jul 18 14:48:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10327 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0C7AC43334 for ; Mon, 18 Jul 2022 14:50:02 +0000 (UTC) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mx.groups.io with SMTP id smtpd.web09.28150.1658155797023633807 for ; Mon, 18 Jul 2022 07:49:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=ZrkpY0oD; spf=softfail (domain: sakoman.com, ip: 209.85.216.41, mailfrom: steve@sakoman.com) Received: by mail-pj1-f41.google.com with SMTP id i8-20020a17090a4b8800b001ef8a65bfbdso12876735pjh.1 for ; Mon, 18 Jul 2022 07:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Vg/ivvGs++S3ajIxvGc4MqYS185SB4tpaXnBIrYXZ4k=; b=ZrkpY0oDd2Xgzxze2eo5+8N588Qeyxj5P6v5vAev0y2Pu9uOirsrt0PPpUNvWVN+WG 5atev6jDzY6cTW+5/UXjvgHN06Vuj2cQ1tKqWkryHb2KP8MiMNA/Bcmk4OERVb06rYtg Yiuh8ybRMEu/6QDCUp2ucRi48nBiZQPmWQJHzG2WHNs92ZxaoYOprZ2Fpj1rVbuJihzg WCfNaO7Nfxeh4d58G9NHQ58JFFTeAaZqi+tPD+EZRDsOWL8dM14eWqbjajeUYyso0Ltf PR/HUuCOoYoPdcZnnPZUIEmJuH5qGKSowGMIoGphrjTq3rdbX1M5js2VwUdLQjoZ+pAm XyEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Vg/ivvGs++S3ajIxvGc4MqYS185SB4tpaXnBIrYXZ4k=; b=OYR+Hy74+9hLqDMhP3K+pD1Q1pf2b6CDdU+MWrPyiCL94FvvBcu3LZCG7VzMvt6you AgXpgTsBtdaKXHxGZGaUZWkkcBf6eASAfWSBXDeJj0iobqVhrri8RLJFNhxpsjD2NGqC R4Z1kIt54hXh1Ir4s4fR/oDyX4Q8iYI5YOBgOqGX2NsASEsiO2Tp6IwT0tA7w2McCjgE WZMNZpmiNnGZaocmD8zsCPV6OUa1kKMzylud5IrqQC0c+fieYaQDc9YUKXvuaCcwM0YY vzUS1a+ZsNMl46J+SObGhp0M8tJ6cAABCL1RZ+1vv/pfmZTYJWA+QMaJTQFc7/XADUJe LLDA== X-Gm-Message-State: AJIora9bQxvyqMO60MSSxWG7AStYQQluhdYrh1PuqI4hYcXEsMpASbp2 m8YkuKLMhSQAfahftyysP/0X+4aC77wwYUOs X-Google-Smtp-Source: AGRyM1uu+OOoeg1/OKB9mptDGUrW6xZmIVUPDITA874IalDnnK924Dxw2PzRaO/T+jP1CNaLdciSRA== X-Received: by 2002:a17:903:3093:b0:16b:deea:4d36 with SMTP id u19-20020a170903309300b0016bdeea4d36mr28433752plc.126.1658155795733; Mon, 18 Jul 2022 07:49:55 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:55 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 15/35] package.bbclass: Fix kernel source handling when not using externalsrc Date: Mon, 18 Jul 2022 04:48:40 -1000 Message-Id: <8efd5e31670235f7c59af2a5ee14646f029f4d18.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168215 From: Alejandro Hernandez Samaniego Previous commit c725bdb29b266 broke kernel source handling, this was due to the code expecting the sources to be in a different directory, this did not happen when using externalsrc since sources were found in the expected directories. Pass work-shared to the check to allow sources to be found in the proper directory, allowing these to be packaged in the next step. To test this we grabbed a commit where we knew the buildpaths QA test should flag a file inside the kernel sources, with the previous commit the QA warning wasnt flagged since no sources where there, with this fix the buildpaths QA warning gets flagged properly. Signed-off-by: Alejandro Enedino Hernandez Samaniego Signed-off-by: Richard Purdie (cherry picked from commit 2714a8ef8c7b3c66d50f27f4f52fe2fe4db39b00) Signed-off-by: Steve Sakoman --- meta/classes/package.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 63887b34f8..97e97d2703 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -566,7 +566,7 @@ def copydebugsources(debugsrcdir, sources, d): # If S isnt based on WORKDIR we can infer our sources are located elsewhere, # e.g. using externalsrc; use S as base for our dirs - if workdir in sdir: + if workdir in sdir or 'work-shared' in sdir: basedir = workbasedir parentdir = workparentdir else: From patchwork Mon Jul 18 14:48:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10328 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5DDACCA479 for ; Mon, 18 Jul 2022 14:50:02 +0000 (UTC) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mx.groups.io with SMTP id smtpd.web09.28153.1658155800352709237 for ; Mon, 18 Jul 2022 07:50:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=vWTUNemS; spf=softfail (domain: sakoman.com, ip: 209.85.214.179, mailfrom: steve@sakoman.com) Received: by mail-pl1-f179.google.com with SMTP id q5so9225171plr.11 for ; Mon, 18 Jul 2022 07:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=VHZkuw3nrtGohByuggbevR1ZIdWuG2Xe+MV/4WfQaOA=; b=vWTUNemS1nAkHY27/AJl2iKnFBcWapOj0APTF4v3rw+uox8WJze24ME2Eu8Grj/vHJ oxeMJxTTAhVKB6YItzW2w/aZCUGwy/Z+Xqbnc2/JYyzxxWRzA6nfj84l35Ej0rZ5WJN4 wzdcROr4OxmUEAdpmvtclBR5XxJeQYd4qN8BMxCc37u4fkXeN+g4yEdji/CWIU1mkb/3 DP1DJGEF7cAAYrr5OVRpXSl/mhusn94SQiYvdQQZKwvI4i+NJJrIKIKicnEWoDX0usGo VwLZw+uzz+OAX2u0/TA/Ggmn6+gt3Vqpg503rXdAdcFd9LSf2udh7paQnBkT8MGH1dzA Sy8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VHZkuw3nrtGohByuggbevR1ZIdWuG2Xe+MV/4WfQaOA=; b=mrGBbBCo9iqKQ7eBI19whdfGxcQ7WbK9jItAodZPsgtWJU69zkoj229A46B/llq8H6 7CuYz4DOVA7igeti01mLUEj98dQDVJZJp5gUBMl+nyyVo5tlMxVZYlxLt4p2cLzgAsFc 5ewycqXjc9bb+KwNKu/4U4TvObzJn3dZQ3Rj+WRjnu4xFpE6fs85nIwcncvnYO1ret4P YdKswT8EoN4yE1ngTwV6AWa1/j11sL1vbdFwvBhKck8oJz/+KDJJyhHvhplfNU3SQapW qP5JtnNHTd91oxjh/JjcAXFK7PUi5btoNbyziE08k2hodvlR9f9A+u5d+VljueF/pm4O OQ1Q== X-Gm-Message-State: AJIora+ZRb1zU8N9oklAjWJyn90cPfpBRN0SDof7/1QwvCo89aBk1oHf AfJTo1smfwa/UFAhgkmNjp87BmU20iWT5lxn X-Google-Smtp-Source: AGRyM1sAFTCJaOzfqNUCUmHBwfQ9zqLnTaKz+ULK28uMykxONU3PFf/mEihuZ8Va0lwt2T8F0GHbJw== X-Received: by 2002:a17:902:7611:b0:16c:5c53:d932 with SMTP id k17-20020a170902761100b0016c5c53d932mr28629986pll.1.1658155799245; Mon, 18 Jul 2022 07:49:59 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.49.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:49:58 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 16/35] insane: Fix buildpaths test to work with special devices Date: Mon, 18 Jul 2022 04:48:41 -1000 Message-Id: <1837c175d997ced1455537bb82fb86286711025c.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168216 From: Richard Purdie If enabled, the buildpaths test hangs in psplash as it tries to open a fifo and read from it, hanging indefinitely. Tweak the test to ignore fifo/socket/device files. Signed-off-by: Richard Purdie (cherry picked from commit 2567edb7e0a8c5ca9a88d6940491bf33bfe0eff9) Signed-off-by: Steve Sakoman --- meta/classes/insane.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 6f6dcb3dd5..f3f80334f6 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -444,12 +444,14 @@ def package_qa_check_buildpaths(path, name, d, elf, messages): Check for build paths inside target files and error if paths are not explicitly ignored. """ + import stat # Ignore .debug files, not interesting if path.find(".debug") != -1: return - # Ignore symlinks - if os.path.islink(path): + # Ignore symlinks/devs/fifos + mode = os.lstat(path).st_mode + if stat.S_ISLNK(mode) or stat.S_ISBLK(mode) or stat.S_ISFIFO(mode) or stat.S_ISCHR(mode) or stat.S_ISSOCK(mode): return tmpdir = bytes(d.getVar('TMPDIR'), encoding="utf-8") From patchwork Mon Jul 18 14:48:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10329 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A79E8C433EF for ; Mon, 18 Jul 2022 14:50:12 +0000 (UTC) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mx.groups.io with SMTP id smtpd.web12.28242.1658155804930223279 for ; Mon, 18 Jul 2022 07:50:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=iJm/8y8h; spf=softfail (domain: sakoman.com, ip: 209.85.210.169, mailfrom: steve@sakoman.com) Received: by mail-pf1-f169.google.com with SMTP id y9so10804933pff.12 for ; Mon, 18 Jul 2022 07:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=wWZmYtNUCrDRdeA7O8i5eqXhv5Ib9cCZmKEcxaVULEg=; b=iJm/8y8hTpMPDeWsTQVJHt/oymoLi3YdrEMW8V2RY8trFNdnocorlWTI/YJT7/qGNK K6MjWwFzNgbJisSUsSfMqDPQNYl66UqBVKZwORHZYLXoedtMM628TbXLC0VYf3lNbWfg oKn/bVbqFkp+1CehndJjv88PVoSvcLEtNCQqc5064XII8jeOhDgvR3yI6JQNISwFUMBF dpaYXoHdOICtyZ0C1U5RUpfiZOFZdmoitxIcnCVVVUwzr3SJkC/KuqwsynaraEwxERQg HtI6ja+dKwVkxrBaiEgJJWP4S5eGnluakc2f+AliIEZoTGepqrz+DlfWB+/XUWkJu3lw YmVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wWZmYtNUCrDRdeA7O8i5eqXhv5Ib9cCZmKEcxaVULEg=; b=nOjda7ITFxJj8xXHsuqZ8WttznbHKckpbGPGXXUSVVK83ce8+MvZ/UQEVIJc+5BTXh Mb/Je4fuQqbqQQE3pAhXJhrT5A46qQhk4Wj04p72KzxiTEClu1m8vtEUiIBLYyyHi/ZB TdYFyAKuFDLboHVT++gz8wF0RTifnFs6FybBzb6LabJ7krVWTdGOU9v1ayhspo/vsyve zPTd3oL0Eha6mPnDqPxF328Ebm9p5qXAwiMDl5aF7fIpsS8meZmJHIzGq5dEC9+KULEp AYBXHfKYkgCzDDzxaXayfWIZlSN/33H3nNO6wIauboN+zcsWVH4Nk2w30qi0h/zA/EaI ZNuA== X-Gm-Message-State: AJIora8As8pDnN1sZ3Dk5RnrHznrFK7uOlzj5t9S+E0tsB9mc91z1H4Y eW8gUfu8ykbPu1OZS1k698LW1JQxlWz3LHcL X-Google-Smtp-Source: AGRyM1u32ChlNLq1dn6xT6s8TKVuwXeiWcqEM2M5s5MjgIqD/8yvC77EYiyfB0NInXEQWGmoPYjQVQ== X-Received: by 2002:a63:484d:0:b0:419:cde7:a912 with SMTP id x13-20020a63484d000000b00419cde7a912mr17845454pgk.621.1658155803658; Mon, 18 Jul 2022 07:50:03 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:03 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 17/35] waffle: correctly request wayland-scanner executable Date: Mon, 18 Jul 2022 04:48:42 -1000 Message-Id: <05457e7f2a4c379082f8f39480f16b90141dc54f.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168217 From: Alexander Kanavin Signed-off-by: Alexander Kanavin Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit cd05e2543bde4175da67781ec6f3eebc143d95d0) Signed-off-by: Steve Sakoman --- ...build-request-native-wayland-scanner.patch | 27 +++++++++++++++++++ meta/recipes-graphics/waffle/waffle_1.7.0.bb | 1 + 2 files changed, 28 insertions(+) create mode 100644 meta/recipes-graphics/waffle/waffle/0001-meson.build-request-native-wayland-scanner.patch diff --git a/meta/recipes-graphics/waffle/waffle/0001-meson.build-request-native-wayland-scanner.patch b/meta/recipes-graphics/waffle/waffle/0001-meson.build-request-native-wayland-scanner.patch new file mode 100644 index 0000000000..1b62db92e9 --- /dev/null +++ b/meta/recipes-graphics/waffle/waffle/0001-meson.build-request-native-wayland-scanner.patch @@ -0,0 +1,27 @@ +From 2195cec1e5bc66128d72049c11ff381ca4516a4b Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 5 Jul 2022 11:51:39 +0200 +Subject: [PATCH] meson.build: request native wayland-scanner + +This matters in cross compilation, as otherwise meson will +try to use a cross-binary, and fail. + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/waffle/-/merge_requests/110] +Signed-off-by: Alexander Kanavin +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 0bb6128..0b6da1f 100644 +--- a/meson.build ++++ b/meson.build +@@ -108,7 +108,7 @@ else + 'wayland-egl', version : '>= 9.1', required : get_option('wayland'), + ) + dep_wayland_scanner = dependency( +- 'wayland-scanner', version : '>= 1.15', required : get_option('wayland'), ++ 'wayland-scanner', version : '>= 1.15', required : get_option('wayland'), native: true, + ) + if dep_wayland_scanner.found() + prog_wayland_scanner = find_program(dep_wayland_scanner.get_pkgconfig_variable('wayland_scanner')) diff --git a/meta/recipes-graphics/waffle/waffle_1.7.0.bb b/meta/recipes-graphics/waffle/waffle_1.7.0.bb index f1fd9e7630..dc475908d0 100644 --- a/meta/recipes-graphics/waffle/waffle_1.7.0.bb +++ b/meta/recipes-graphics/waffle/waffle_1.7.0.bb @@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4c5154407c2490750dd461c50ad94797 \ SRC_URI = "git://gitlab.freedesktop.org/mesa/waffle.git;protocol=https;branch=master \ file://0001-waffle-do-not-make-core-protocol-into-the-library.patch \ + file://0001-meson.build-request-native-wayland-scanner.patch \ " SRCREV = "905c6c10f2483adf0cbfa024e2d3c2ed541fb300" S = "${WORKDIR}/git" From patchwork Mon Jul 18 14:48:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10330 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8F36C43334 for ; Mon, 18 Jul 2022 14:50:12 +0000 (UTC) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mx.groups.io with SMTP id smtpd.web11.28064.1658155808031232534 for ; Mon, 18 Jul 2022 07:50:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=1cNXZxaS; spf=softfail (domain: sakoman.com, ip: 209.85.210.170, mailfrom: steve@sakoman.com) Received: by mail-pf1-f170.google.com with SMTP id b133so7038219pfb.6 for ; Mon, 18 Jul 2022 07:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Sf7zrHy3sQRtYUR0Aetr0Rb4uIAk/kLXPD2edu3/xgc=; b=1cNXZxaSExV+tvex64BQHPh00VwPDKzhmHUzqp8abmYKYxktMKhpePqWU0/bHp+Dej x94AP4fT+/odlvQn1UTJgkpnNailpUccTlHfgvIGYz72O2A2DgLeHK1YFg3shZubDdAb Y3oRxvRWUTN78wz9Z0jAbF3T6YEAbTPXBTCzD/8K77BAcu2ixQ26pms2TxahrXDsUpxE +AGYz/T/wdOyVIjdIB5gFhuPNP+OT9TpbNIV8KblUm8dwfUHMgicSpRSgLnfgfFpPnUJ hVhwZ3Mk9ikHk85IHYWdUmC0AgzV1TcSxKapQyNQdoyS+A7TfU0X4lxMkWGFWFlHjEMr Ot7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Sf7zrHy3sQRtYUR0Aetr0Rb4uIAk/kLXPD2edu3/xgc=; b=K9aFmlN+BLhFW+rj2RSu4DFhdKyUMqPUgHkDIYzrYzzxPdSlmlRu4P4Yh9t0gL20qi IfrooZEG1AXa0HuAnIBBxAfW+cj6/sUQWprPgSR2cjgOjH5Vz4sb1fXe6eRSjZOvbDHp /bo8IPkEqVnYL67HMMseqq9OJvWsfH3+5uywv4vAQMjvg1GCR0uFJHSeRHboBotP56kx gGZzZ3KKcSAXZi56g6j5ZSSoyk4Mv9AeBssyvgR2RlwlAYho75HR6lRsXZgN7he03Tj/ msexf2t6vW/PoxpaWU6ZYuobaGV8Eg05bAzM/Vs5ORWYqMAjZZliDyoEVxtBC8e12qat gq+g== X-Gm-Message-State: AJIora//uWr02d7yODkG2apNi/uEPy6a2jlaQ9MB0Qho97Dd1N1Z9EoW BCn2iPdSJbmgeoUb1v2DTohMXh0lKz8Arde3 X-Google-Smtp-Source: AGRyM1utKaIKvauo31Hrh1kaRoURM3bcBqJZ+VbFwEq9YqqdL+iP41vnyzaq9g8xOlWwAImkAsL5Bw== X-Received: by 2002:a63:1f4b:0:b0:41a:daa:3068 with SMTP id q11-20020a631f4b000000b0041a0daa3068mr8177763pgm.330.1658155806922; Mon, 18 Jul 2022 07:50:06 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:06 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 18/35] lua: Fix multilib buildpath reproducibility issues Date: Mon, 18 Jul 2022 04:48:43 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168218 From: Richard Purdie The .pc we install ourselves for lua has hardcoded /lib assumptions in it which means in a multilib environment, full build paths end up in users like rpm's configuration. Fix the .pc file to use a correct includedir and libdir to resolve those reproducibility issues. Signed-off-by: Richard Purdie Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit 93bee5c74b8d181adf93de4b4101e25d24780603) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/lua/lua/lua.pc.in | 5 ++--- meta/recipes-devtools/lua/lua_5.4.4.bb | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/meta/recipes-devtools/lua/lua/lua.pc.in b/meta/recipes-devtools/lua/lua/lua.pc.in index c27e86e85d..1fc288c4fe 100644 --- a/meta/recipes-devtools/lua/lua/lua.pc.in +++ b/meta/recipes-devtools/lua/lua/lua.pc.in @@ -1,6 +1,5 @@ -prefix=/usr -libdir=${prefix}/lib -includedir=${prefix}/include +libdir=@LIBDIR@ +includedir=@INCLUDEDIR@ Name: Lua Description: Lua language engine diff --git a/meta/recipes-devtools/lua/lua_5.4.4.bb b/meta/recipes-devtools/lua/lua_5.4.4.bb index d704841378..6f2cea5314 100644 --- a/meta/recipes-devtools/lua/lua_5.4.4.bb +++ b/meta/recipes-devtools/lua/lua_5.4.4.bb @@ -45,7 +45,7 @@ do_install () { install install -d ${D}${libdir}/pkgconfig - sed -e s/@VERSION@/${PV}/ ${WORKDIR}/lua.pc.in > ${WORKDIR}/lua.pc + sed -e s/@VERSION@/${PV}/ -e s#@LIBDIR@#${libdir}# -e s#@INCLUDEDIR@#${includedir}# ${WORKDIR}/lua.pc.in > ${WORKDIR}/lua.pc install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/ rmdir ${D}${datadir}/lua/5.4 rmdir ${D}${datadir}/lua From patchwork Mon Jul 18 14:48:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10335 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3EA7CCA482 for ; Mon, 18 Jul 2022 14:50:32 +0000 (UTC) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mx.groups.io with SMTP id smtpd.web08.28262.1658155811083518262 for ; Mon, 18 Jul 2022 07:50:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=PxKnav6t; spf=softfail (domain: sakoman.com, ip: 209.85.216.41, mailfrom: steve@sakoman.com) Received: by mail-pj1-f41.google.com with SMTP id cp18-20020a17090afb9200b001ef79e8484aso12594138pjb.1 for ; Mon, 18 Jul 2022 07:50:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=9tXR2qLZYHvikC9xA/SgkOiQqxHwESjdGYzyY8Z/8dI=; b=PxKnav6tit/lAOJ+OvbXM+10g63ZvihQUDHKE24p3e4wvU+Hv4oikxaBlPHYwUa7A/ Q7+u28KP/zr3bx59y/eVHUSjXdyxSk8zfK7ocUF69qqRm0gsh7zkrERYqJawAwCk2B93 dalhKPkRLRHNbFPYebGZ+76j0jZdqmKVes5QPvMVlLFipZDoReDEy3LWylE5K3Nfmrp6 zqX+5ngCqjHdH3KKpG5dDf5Tk1snEKdLXQ2ZePdRI0tx3laJ3ILFyz27ir4KZcOCSMBi notLuaU+MYEguM3L7wfkNCfVZ7NNyvBQdUB3Adjrssl944VszZX8noEXIZb2S3ZGY39n aPgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9tXR2qLZYHvikC9xA/SgkOiQqxHwESjdGYzyY8Z/8dI=; b=mqVKGBngBNqTCnGLIX/0LyA0tfoXxX0xxTaZ8UQ1t/D265p3xfThgspu5fyjYRW+eQ +w79N9Wx3yQiI0HqvpmeGBNOV20acQTQ/mFaCJjdRVcELMOdRY3mEu6fBF8LYU0HJ9Z9 XdGLcPMBNIVWv+calnGWqm6C8GRmQbk3ERl8hvDwWrXgfMJtEne4KTSF6zhgQvPZW1bp zmUlzswPYUDI44FNQRFq+RIxeVouab3M48Ky/+RyDuLcKOM/XRg86eM7AyTcM+jKpsHo GxsiEVIuEyqdwHYUt2vY8osFBl/HBVBIEql7M1h68uSclm9oYX61HBKogKynGCUI8yWF KVRQ== X-Gm-Message-State: AJIora9gPxmTp2YcBbJXdFoua3AkLgZCyZv6c3wB8fpSED/N01xp5TuT 5ySiua3HncjgFDgCJxvJBqQiHeZwbQj1azln X-Google-Smtp-Source: AGRyM1sBIZVBtPTcEjIeNOIGqsqdiNViDmiMPgCEbFDYzpZLKdCn7JmwkzzY4y79WkOr1lG+xIvEzQ== X-Received: by 2002:a17:902:eb89:b0:16c:6337:b9b4 with SMTP id q9-20020a170902eb8900b0016c6337b9b4mr28466904plg.27.1658155809952; Mon, 18 Jul 2022 07:50:09 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:09 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 19/35] vala: Fix on target wrapper buildpaths issue Date: Mon, 18 Jul 2022 04:48:44 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168219 From: Richard Purdie The on target wrapper contains paths from the host build. Remove them. Signed-off-by: Richard Purdie Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit 10980ae59f18679413f2d3fd428a9386e4d6fc3a) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/vala/vala.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta/recipes-devtools/vala/vala.inc b/meta/recipes-devtools/vala/vala.inc index 90e0b77de0..974baa33f5 100644 --- a/meta/recipes-devtools/vala/vala.inc +++ b/meta/recipes-devtools/vala/vala.inc @@ -60,3 +60,9 @@ vapigen_sysroot_preprocess() { } SSTATE_SCAN_FILES += "vapigen-wrapper" + +PACKAGE_PREPROCESS_FUNCS += "vala_package_preprocess" + +vala_package_preprocess () { + sed -i -e 's:${RECIPE_SYSROOT}::g;' ${PKGD}${bindir}/vapigen-wrapper +} From patchwork Mon Jul 18 14:48:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10331 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5F52CCA479 for ; Mon, 18 Jul 2022 14:50:22 +0000 (UTC) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mx.groups.io with SMTP id smtpd.web11.28066.1658155815349390085 for ; Mon, 18 Jul 2022 07:50:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=KRA7P9Vw; spf=softfail (domain: sakoman.com, ip: 209.85.215.177, mailfrom: steve@sakoman.com) Received: by mail-pg1-f177.google.com with SMTP id bh13so10805199pgb.4 for ; Mon, 18 Jul 2022 07:50:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=fxpJBEGf1Qz2eeO7UEVf2BMF/vtGa3Y1e3/h3fbP+fs=; b=KRA7P9VwgMbhQKE+p8VBN7swPj20pWWedR9FvptKcbgYhy1hnN2bht3qDLIeCGZwCQ KWrzLSbVKyWXGAcTgkkbyUeOo01eVfVY9nzIIqMbbJ5W1t3zpVe9Epoyi/eARdsrHTqA 7Zfzb+xWXyAmCA5zjfH6eopdaSFmZWj6gsK/UtEfs3I5IIYcdBmwLwFivtLgYLoD3YZF igbmO3ghN1SrfuCIBBR0erHvDT/G+YLU2KLmkUQP3qcT6PntG96i0EpXU0tq8J8tGWUe tvvNOjuZzA/2eF94d6DK3UCGZq6NWUK15fCTV+Ja7XJWssbZBEvrYH6foSyd7W2IrONR 666w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fxpJBEGf1Qz2eeO7UEVf2BMF/vtGa3Y1e3/h3fbP+fs=; b=UclITuzY1sbXn+gxVjX05vlwcoYvmvI8D8aAwzRks7Mk2qeoBSlMofLhnJmGTjM0K5 32NwhGTR9LdbgfevpmqaIPfReDijzDJlWUWk0qMK+y3SHcO4hO38yjTXDk6FE1cua+bt LXYQfBghVrsI198FH6KXXlXKugCjnvJjuZkM41ramLEWuPKYltlGbpc2JtwLpg5aXVrk v0fAq5lkf47APZZBMTooGRJaOfs7v+YEM8WSZAhqdf2yj6pXC545+4X9fnz4pBosqje5 WIrGuUnjg6x66/hbgxQKsFD5bFzRF6VNrI09TkQ+QPBSJ8I2MU+Tan8E1oxz6LhYhURE qlFw== X-Gm-Message-State: AJIora86wp2GVeASkZUzXCDrv5XrWls1z9CsQH6zZ4V9Hkx7Hz/mh2hF jItXXMvOclZfirI2lUqqhsdh9ny2OhKyhJva X-Google-Smtp-Source: AGRyM1vAsKxje+xLP4Lf1ruDoFU4h+BPTYUox1SagMcmrkw2k6sDJkYOozkhvsFPjwLaxMXvV8hPSg== X-Received: by 2002:a62:4e89:0:b0:52b:6c56:7aea with SMTP id c131-20020a624e89000000b0052b6c567aeamr6413345pfb.19.1658155814245; Mon, 18 Jul 2022 07:50:14 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:13 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 20/35] libmodule-build-perl: Use env utility to find perl interpreter Date: Mon, 18 Jul 2022 04:48:45 -1000 Message-Id: <3829ac3bca34a1aa5c54ba1d24d23af7a6630215.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:22 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168220 From: Khem Raj Fixes ERROR: QA Issue: : /work/x86_64-linux/libmodule-build-perl-native/0.4231-r0/sysroot-destdir/work/x86_64-linux/libmodule-build-perl-native/0.4231-r0/recipe-sysroot-native/usr/bin/config_data maximum shebang size exceeded, the maximum size is 128. [shebang-size] Signed-off-by: Khem Raj Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit 54ecb2d3f2523293383103cbe590ebdd037ee483) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/perl/libmodule-build-perl_0.4231.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-devtools/perl/libmodule-build-perl_0.4231.bb b/meta/recipes-devtools/perl/libmodule-build-perl_0.4231.bb index e2c79d962b..881d5e672e 100644 --- a/meta/recipes-devtools/perl/libmodule-build-perl_0.4231.bb +++ b/meta/recipes-devtools/perl/libmodule-build-perl_0.4231.bb @@ -37,6 +37,7 @@ EXTRA_CPAN_BUILD_FLAGS = "--create_packlist=0" do_install:append () { rm -rf ${D}${docdir}/perl/html + sed -i "s:^#!.*:#!/usr/bin/env perl:" ${D}${bindir}/config_data } do_install_ptest() { From patchwork Mon Jul 18 14:48:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10332 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0C00C43334 for ; Mon, 18 Jul 2022 14:50:22 +0000 (UTC) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mx.groups.io with SMTP id smtpd.web10.28041.1658155819324561993 for ; Mon, 18 Jul 2022 07:50:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=JcPiegew; spf=softfail (domain: sakoman.com, ip: 209.85.210.172, mailfrom: steve@sakoman.com) Received: by mail-pf1-f172.google.com with SMTP id w185so10841622pfb.4 for ; Mon, 18 Jul 2022 07:50:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=QkgZvQTFQGpFGgslZ9U3yWRFCco1Gr+jgJBGvRtAijA=; b=JcPiegewWVx5UN53USNurWRtRCyhAD+as4+7titbYiJSSrmq0Wz/vNj5mkh5PvXPMn TVTh/dfI975aXv4zXDqdta9rLNnomHgBhWY7DAvCQ/Qe5P7EMkdfJ5iLwrOSJZ8BBhxT 5U6PLW30Uorn1tV/mOI7fCohkW2Eq59f5jLjkoMp4ZYoiCfij7bUYxDfUFOwofP92tRv nQ5CMkt+sQ5LUa/CLS5+7DXTMO9FVPJSxckR0H6Nib/EXIAw84zZ/RslM+/yYnBMMAJr bGisCHXQOtppaR+MJasu1oPNw6UO4gZ09uCyCxCJC/LyycGi22bD8j4lstM73BmK7bNJ DtWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QkgZvQTFQGpFGgslZ9U3yWRFCco1Gr+jgJBGvRtAijA=; b=n130R5Ab1XE0n4ORQ/G1U7Q3W5URhBrDVnKH+iuPfA1+g+7056l138tcgwSly90elr N7GlLS9556LrOk4SzAmfyS5o8rkY9YQ8OZ9FhpDqOKQvMwn+l+fmOOxnB8miDuEcabCW 4Ys1DlQR1dfJzmE4saYo2cTSre7dhchMvigvLsWp8ZP5L+0UxOZcfVVSfRzzqJpisiBP Nrm4WOQMx3ksIMB5+8xwVFJ6fZa1+08QYC5xfDxVp0xXwiFynkxm18e0RCVQhe/85v9O vkxTlEXTVxFbhTQmlv5ICCOr2HxjQsMBPUBdgDCsVy9CfLRXDiPxC5Q0NHBoZeP5Q6OF aCEQ== X-Gm-Message-State: AJIora/V/wMAnhH3eG0DKqPAeh9Dbvj4Xgnxw2fQgcmUsNFxcMxxu8xO XmTAkqkMwVnjUZARZCcxZd3RV6VzmlvR9Yp+ X-Google-Smtp-Source: AGRyM1uqqZ+CckwGhuFf4U/j2rImE6V2804/7OqtgD32f+Cevy8ZXzxeADlTZR46vyE6RHlZoIHsBw== X-Received: by 2002:aa7:94b3:0:b0:52a:198a:e3cb with SMTP id a19-20020aa794b3000000b0052a198ae3cbmr28497208pfl.60.1658155818303; Mon, 18 Jul 2022 07:50:18 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:17 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 21/35] gtk-doc: Remove hardcoded buildpath Date: Mon, 18 Jul 2022 04:48:46 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:22 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168221 From: Richard Purdie When api-documentation is enabled, we see a hardcoded build path to xsltproc in the target python configuration file. We curate PATH carefully so we don't need the path there, tweak configure to remove it and solve the issue. Signed-off-by: Richard Purdie (cherry picked from commit f7924a85de548f9403d561b15c1f2c33d9912393) Signed-off-by: Steve Sakoman --- meta/recipes-gnome/gtk-doc/gtk-doc_1.33.2.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-gnome/gtk-doc/gtk-doc_1.33.2.bb b/meta/recipes-gnome/gtk-doc/gtk-doc_1.33.2.bb index 392913fcc6..150eca9274 100644 --- a/meta/recipes-gnome/gtk-doc/gtk-doc_1.33.2.bb +++ b/meta/recipes-gnome/gtk-doc/gtk-doc_1.33.2.bb @@ -18,6 +18,8 @@ PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "api-documentation", PACKAGECONFIG[working-scripts] = ",,libxslt-native xmlto-native python3-six python3-pygments" PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,glib-2.0" +CACHED_CONFIGUREVARS += "ac_cv_path_XSLTPROC=xsltproc" + SRC_URI[archive.sha256sum] = "cc1b709a20eb030a278a1f9842a362e00402b7f834ae1df4c1998a723152bf43" SRC_URI += "file://0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch \ file://0001-Do-not-error-out-if-xsltproc-is-not-found.patch \ From patchwork Mon Jul 18 14:48:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10336 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB376CCA485 for ; Mon, 18 Jul 2022 14:50:32 +0000 (UTC) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mx.groups.io with SMTP id smtpd.web09.28165.1658155823353833355 for ; Mon, 18 Jul 2022 07:50:23 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=7YwFXrQ6; spf=softfail (domain: sakoman.com, ip: 209.85.215.173, mailfrom: steve@sakoman.com) Received: by mail-pg1-f173.google.com with SMTP id o18so10789462pgu.9 for ; Mon, 18 Jul 2022 07:50:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=VVmXVmDmSapcmUT6HNLAeqDI5v2qBW+iP2pMmyLKmBY=; b=7YwFXrQ6llpf8sRVfb617qN3eZuW/AdUTbeJjspCtbThR/vxNQeK56ZP5HPDhgvw5P yLAe4Pk0G6qDB8LgWN2uyV03ykMmiy5jNalcLwG9wL6d+Uvc2+91Lf35IES+Gn0LBjn3 4enxBBGR6p8hRUqYovqbdVH4T43zZL/3MP7U4WlAuchnkds9PD3eBVNcjCdmHrmWpRf8 gyUIXmVOoQY3U6CR5Y5+pAy/V4aukVqadSK4RJSMS+oFJX4o30WdkWhe9EJAIRViG5ge J2o8BZlWDJik39bieN4Cb2UcQPqU80SayzMvrQBTvcWNOGCK0FyEzK23fSQExa4gMt9j OvVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VVmXVmDmSapcmUT6HNLAeqDI5v2qBW+iP2pMmyLKmBY=; b=cLICTgDzUu0NkljgSICMOXVfP/CXzO1at+o7ZFTKagpIWiwYcMFiKNVBPKHvIo7KFq 0NiBFM8OM1D9+qTbgaY19MGtVkUyK//a0wEiH0se+Dsv1xeGg6CnvJXLMo0kR6IGYyR9 Ok2jsMOFXRHZWHntjWyYdEDfio3oj7ZOEv+DEfvk7lln4huJ3t/oVcVBMVvur+DbibUX uJYRjOAg1lhuMCeOqF+fY7JnG0MfSEWtX/TaZv5Yj3C5MAT2k+O7TobZvYqnmtOfdAk0 FWOFSr2WRPQhv3YizWTHc+J0LXb1liYQ99aQi9FFV9vNEBmvo7BNC+uxZLk5yhAOf0oL qPQg== X-Gm-Message-State: AJIora+rJotx2647JrBBknycJC+W+eslBQnmo0IUKDNgBVFG761SYfpP 6MXUjGw98lija0tUVVRsPeaFL6B2SIakLVpr X-Google-Smtp-Source: AGRyM1t7EALDfwilZsB75PCe/b2DKsgSwKbBEB7lMdDSSp3pvPL8l4TePFu66O4GFjvM1UC8Q3CCZg== X-Received: by 2002:aa7:991a:0:b0:52a:c5df:e17f with SMTP id z26-20020aa7991a000000b0052ac5dfe17fmr28518868pff.52.1658155822305; Mon, 18 Jul 2022 07:50:22 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:21 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 22/35] perl: don't install Makefile.old into perl-ptest Date: Mon, 18 Jul 2022 04:48:47 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168222 From: Ross Burton We already exclude Makefile, makefile, and makefile.old from copy of the perl source tree that is used by perl-ptest, but Makefile.old is not being excluded. In a rebuild of perl with an existing source tree these files now exist but have build paths in. As they're backup files, they can just be excluded from the packages. Use range globs to clean up the expressions, and exclude Makefile.old. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie (cherry picked from commit 30a99affca7930f7fe0ddeb016b6183240b5f13c) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/perl/perl-ptest.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc index 54c7807571..c233fab545 100644 --- a/meta/recipes-devtools/perl/perl-ptest.inc +++ b/meta/recipes-devtools/perl/perl-ptest.inc @@ -10,12 +10,12 @@ do_install_ptest () { sed -e "s:\/usr\/local:${bindir}:g" -i cpan/version/t/* sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh - tar -c --exclude=try --exclude=a.out --exclude='*.o' --exclude=libperl.so* --exclude=Makefile --exclude=makefile --exclude=hostperl \ + tar -c --exclude=try --exclude=a.out --exclude='*.o' --exclude=libperl.so* --exclude=[Mm]akefile --exclude=hostperl \ --exclude=cygwin --exclude=os2 --exclude=djgpp --exclude=qnx --exclude=symbian --exclude=haiku \ --exclude=vms --exclude=vos --exclude=NetWare --exclude=amigaos4 --exclude=buildcustomize.pl \ --exclude='win32/config.*' --exclude=plan9 --exclude=README.plan9 --exclude=perlplan9.pod --exclude=Configure \ --exclude=veryclean.sh --exclude=realclean.sh --exclude=getioctlsizes \ - --exclude=dl_aix.xs --exclude=sdbm.3 --exclude='cflags.SH' --exclude=makefile.old \ + --exclude=dl_aix.xs --exclude=sdbm.3 --exclude='cflags.SH' --exclude=[Mm]akefile.old \ --exclude=miniperl --exclude=generate_uudmap --exclude=patches --exclude='config.log' * | ( cd ${D}${PTEST_PATH} && tar -x ) ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl From patchwork Mon Jul 18 14:48:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10333 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A75E9CCA479 for ; Mon, 18 Jul 2022 14:50:32 +0000 (UTC) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mx.groups.io with SMTP id smtpd.web10.28045.1658155826572144392 for ; Mon, 18 Jul 2022 07:50:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=ZvQXJ3hz; spf=softfail (domain: sakoman.com, ip: 209.85.215.175, mailfrom: steve@sakoman.com) Received: by mail-pg1-f175.google.com with SMTP id e132so10796931pgc.5 for ; Mon, 18 Jul 2022 07:50:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=CFJc+MhgF1pxZlq5ssVwDXPJaTa3J5/ctQceMD+V5TI=; b=ZvQXJ3hzVZ6/gWQe4mPWvG2cwFEZ8+tTnWKOOUzrVVqf973zZ7fdlFZhoIeV1FBviK AKy5OKCAwhISyHEA2f1VKyyoHr4e6mPvwf/tDA5IpSWs96+0Iq5W31tXTk5W57jVqrAO tXXEhEBQgq76UBBGIbbDZuetN5jtG+Pr+FN/XCMa9PXUeVjAfVtgcUgOe+qwlCnJpf7R XJURtn2Bdim3EDL0q1L4iunqVlnAaLfTtWQ1GGsQVbe9Ru8ruh1AysGbG+TDbUtfIkbf VTT46sn82tFOfhOm1EP+2nBwIVK8uMXOF/JBhASwJw8/rqhzl4Z5OemUFVexglLePdlP X+yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CFJc+MhgF1pxZlq5ssVwDXPJaTa3J5/ctQceMD+V5TI=; b=v7y+YeqShvb7Uk3rbOiyrEZ5Gi2fxZOh9OhCfgNXqyW3u4G4K0CElet+wH8mKrslyE WOU6IEr/hEt6fdUFcUe1T5EDOTuILVDaKphFXyWY5hq3GL/RyWStzWvd2RMdunDWhvf5 5F3yC6+08RdQGbRn4JEzGQX5SzwoV/7rhXFr8r4/Ll9TnyJJFxUyRwNBja8upldz3AH4 gYXE6QzF58sGPKVb0D5VDR9mdGLt9C4fBEe67JuT/5ovdVcT3QkwR9PeseORxAy9d40k LXRRdkeAsYOwth0FWYQo5R7HWcC0s3hIJ+4OiBBDzRlkx7otce500syMpG7MLRspqVM4 t+wg== X-Gm-Message-State: AJIora+wao8R5RJ2l4GISewHCiFPy+DUtYFCMN511yiuPYK2VnkTthtz 7NrpAKEJe//emNdqFh8LB9Y76nnBROEM2c8D X-Google-Smtp-Source: AGRyM1vaZUFjhMnt/zqlb910Dq7Y8kaQL4FZ7HW5LTNnl/wzqLmlR7+WKi6UXdbFtBKA8GoIIvPtSQ== X-Received: by 2002:a05:6a00:1628:b0:52a:bd79:c175 with SMTP id e8-20020a056a00162800b0052abd79c175mr28321832pfc.14.1658155825454; Mon, 18 Jul 2022 07:50:25 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:24 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 23/35] alsa-state: correct license Date: Mon, 18 Jul 2022 04:48:48 -1000 Message-Id: <7c3d9c5d72f1e832697b51a89e284e0b1e041f38.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168223 From: Peter Marko * add GPL license because of alsa-state-init file * gpl link points to gpl3, but at time of adding this file was actually pointing to gpl2, so should correspond to SPDX GPL-2.0-or-later * remove date as the file was already changed several times since then Signed-off-by: Richard Purdie (cherry picked from commit ca73ff0d9930d545ce8cb8a62e259c0b43310f99) Signed-off-by: Steve Sakoman --- meta/recipes-bsp/alsa-state/alsa-state.bb | 7 +++++-- meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/meta/recipes-bsp/alsa-state/alsa-state.bb b/meta/recipes-bsp/alsa-state/alsa-state.bb index df546633f1..27b2eccbe4 100644 --- a/meta/recipes-bsp/alsa-state/alsa-state.bb +++ b/meta/recipes-bsp/alsa-state/alsa-state.bb @@ -8,8 +8,11 @@ SUMMARY = "Alsa scenario files to enable alsa state restoration" HOMEPAGE = "http://www.alsa-project.org/" DESCRIPTION = "Alsa Scenario Files - an init script and state files to restore \ sound state at system boot and save it at system shut down." -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +LICENSE = "MIT & GPL-2.0-or-later" +LIC_FILES_CHKSUM = " \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \ + file://alsa-state-init;beginline=3;endline=4;md5=3ff7ecbf534d7d503941abe8e268ef50 \ +" PV = "0.2.0" PR = "r5" diff --git a/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init b/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init index eee59cb321..a04cc27004 100755 --- a/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init +++ b/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init @@ -1,10 +1,9 @@ #! /bin/sh # # Copyright Matthias Hentges (c) 2007 -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) +# SPDX-License-Identifier: GPL-2.0-or-later # # Filename: alsa-state -# Date: 20070308 (YMD) # source function library . /etc/init.d/functions From patchwork Mon Jul 18 14:48:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10334 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A75B9C43334 for ; Mon, 18 Jul 2022 14:50:32 +0000 (UTC) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mx.groups.io with SMTP id smtpd.web11.28072.1658155829908247914 for ; Mon, 18 Jul 2022 07:50:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=uYC2Ia1Y; spf=softfail (domain: sakoman.com, ip: 209.85.214.179, mailfrom: steve@sakoman.com) Received: by mail-pl1-f179.google.com with SMTP id y15so4498906plp.10 for ; Mon, 18 Jul 2022 07:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=LDzEmCp2bnGPvzCZFahGPBW52QUZ4J5nW+UEzQQvB7E=; b=uYC2Ia1YvwlXE7Vh8qP80UknMofOnYcao1uXOCKKPWdxVOVgVZ0xF21SSeSiuLGbvA b56GtIh4XyoyXF3MjgCCrBwR6zp2AVkanV/s22xcETm4cQmyv6EDFrRJ1IHFKzgodF4k EfCZJDQUwar0dEomPc7E6QOoawWuJE/WaV6kfC7SR2CRoE8cihEt4hfgaJ8mXFEg+8e/ yU3siBAIiwo0Kb620exiNA7n0FrXOenXr+UV29v0XOZiwl8JANaxPIm0pClMHHY6WD0d TtxqoMYxEMUdGgjQh40X59JQp2eLZAPgI2GTyqi4N9pRPSVeYQfVXAQZiPCI8/bqA2kK PvHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LDzEmCp2bnGPvzCZFahGPBW52QUZ4J5nW+UEzQQvB7E=; b=7mL1OTDEPVKRZCx1KyIVyn3ZcBCYOEgUxth3mfbePKeo9Zx+AISVptvWCY2g7cRD9/ 03dzwn+PZAdDRvW6QsWIj6Dz8kFX1TCkm3H7GHZP7fmWk7pvjI08LSoBNv1GApXhqXLj 5ejLgZ7XSnhRB1qyFk7hD5EuAcp9v0rDNfFKa/UGKSg95VnB7XV0ETPCRJpTtd/eeFed FY95bM6MH/1YWs+RB1vfiOT3ZTYm3e2FDM1OYzQk5LGIT+7id6VaEDjjzECzYklCmj+i keDZpaUlHKHxjnDH+mpazSduwbxjgZ3C4Gv6CyKWrxRjqWgSzZE6iTwaEaK0w5HCbh5x 7Dzg== X-Gm-Message-State: AJIora/Y9C/CQTGvtHiLvcd6y9Eo8YykZoVJAiEU1m8JwU708k4Lxh5v yjmsiDltccRjIRuPJaCyBfS4cAgf3xNQbFwz X-Google-Smtp-Source: AGRyM1tQn4opJNumGfAIoEQuOyVWyb/9eJXCH4tRl0Yywe62Cc6hkOQtcKxQvvBXfwyW01vepBHwfg== X-Received: by 2002:a17:902:7209:b0:16b:fa09:5d6 with SMTP id ba9-20020a170902720900b0016bfa0905d6mr28680686plb.120.1658155828842; Mon, 18 Jul 2022 07:50:28 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:28 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 24/35] kernel-arch: Fix buildpaths leaking into external module compiles Date: Mon, 18 Jul 2022 04:48:49 -1000 Message-Id: <7acc1b9b572789015619e4baea2642197b8b1950.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168224 From: Richard Purdie Building external kernel modules like lttng-modules was showing build paths inside the debug symbols for the modules and breaking build reproducibility. Fix this by adding in the mapping needed to map the kernel build directory to something more approriate on target. Signed-off-by: Richard Purdie (cherry picked from commit b56dc9009ba93174de6bf4c01e17808ef249dc5c) Signed-off-by: Steve Sakoman --- meta/classes/kernel-arch.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/kernel-arch.bbclass b/meta/classes/kernel-arch.bbclass index 07ec242e63..348a3adf22 100644 --- a/meta/classes/kernel-arch.bbclass +++ b/meta/classes/kernel-arch.bbclass @@ -61,7 +61,7 @@ HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}" TARGET_AR_KERNEL_ARCH ?= "" HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}" -KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH}" +KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} -fdebug-prefix-map=${STAGING_KERNEL_BUILDDIR}=${KERNEL_SRC_PATH}" KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}" KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}" TOOLCHAIN = "gcc" From patchwork Mon Jul 18 14:48:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5765C433EF for ; Mon, 18 Jul 2022 14:50:42 +0000 (UTC) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mx.groups.io with SMTP id smtpd.web12.28250.1658155833657729583 for ; Mon, 18 Jul 2022 07:50:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=7uWuNcbw; spf=softfail (domain: sakoman.com, ip: 209.85.216.50, mailfrom: steve@sakoman.com) Received: by mail-pj1-f50.google.com with SMTP id z12-20020a17090a7b8c00b001ef84000b8bso18445636pjc.1 for ; Mon, 18 Jul 2022 07:50:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=9kDZNi9mXz38rnPrMB81L2bcphHmMeciq35+x83HQbA=; b=7uWuNcbwWH7RbW+ChS8n11kEjwitznPqYnrE18zuPBm0RUxDVaG6SEg6rnfKNMPTaO NOGFLdKR2aTsLnE0cqBuNFTl7lmhjvHStjHCocnhvKb5QbRWgI8FL1ClgpFBhdQ8cfIh b70RxYgoi13EbdJ9BGZAXv2Eb8knRhGWyENSn5QeDYjQk88EZMYcquvZrCapJBFVHQHq RfA8gmPj9SijGS7EUOhcgPcU77DiEnT4lvgsL1CNx1Cejc5oUGqcWbo0RVNjklxYmFv7 LMtLho0Y75KhMkgPaoBDJ6sovwlMurKMDOXBSy4Q4NeAbe90lsyBb5QjeHgLM2ZYdgxQ JWqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9kDZNi9mXz38rnPrMB81L2bcphHmMeciq35+x83HQbA=; b=4g4b3WR01XWpTZGb+aMpj5zIMbsiPzBTefiXY6DOYiiZNKmQy7okjt1nVuvR1Zpylo tMdS3yGsgPf1X92kgfZhkkUJlwg5QV2JCqhqsMc5xRanZGFoxtjKJxeC48voMD1ZKSsS O01ioI70ZDeFSyYSOLvvV3XyswevwgaqaJTwdnLFopxc8pIipOwuoaCzIz0iEtaPnN/r FL0pktBVDdpZoxAq1hlUNZpOqWuq1ACBi4hhsmJoKNdxTxlX+M/htM0x6wXxenjohTFj CtiCQDzJn26jxnMisdgLxEFCsn4h++DPK/FTKr3hmGD4zjOjHRIK3aE/yv6Zxq7ui3pU FnAA== X-Gm-Message-State: AJIora9EZF6Ca3ycYVUbTKnMSDtc3RnrN13Cs+xJB4oSgyE4tJMAQLJf 8P3CLRP6fBjBD5X0QzzNldhDC9mpZYRxRewi X-Google-Smtp-Source: AGRyM1veUOZkfrCoNASHLIy0L8atp01L6LojuqvOiCL1612IUrCSt9+rZXKBQTM9A8bGW+a7/ofbOg== X-Received: by 2002:a17:903:249:b0:16b:9cf3:596e with SMTP id j9-20020a170903024900b0016b9cf3596emr28137871plh.60.1658155832641; Mon, 18 Jul 2022 07:50:32 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:32 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 25/35] devtool: ignore pn- overrides when determining SRC_URI overrides Date: Mon, 18 Jul 2022 04:48:50 -1000 Message-Id: <9beb3472624050593fc30d5a00d3d13fec4441df.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168225 From: Paul Eggleton If (perhaps foolishly) at your configuration level you have e.g. SRC_URI_append_pn-recipename = " file://patchname.patch" and then run devtool modify on a different recipe, an error occurs: INFO: SRC_URI contains some conditional appends/prepends - will create branches to represent these ... ERROR: [Errno 2] No such file or directory: '/path/to/downloads/patchname.patch' pn- overrides would not constitute an alternative configuration that we should handle in this context, so just ignore them to avoid the issue. Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie (cherry picked from commit 3f2a812ade42ece0bb59b2d303125a91b29936dd) Signed-off-by: Steve Sakoman --- scripts/lib/devtool/standard.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 4b50e3c63b..e53569c5cc 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -520,7 +520,9 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works for event in history: if not 'flag' in event: if event['op'].startswith((':append[', ':prepend[')): - extra_overrides.append(event['op'].split('[')[1].split(']')[0]) + override = event['op'].split('[')[1].split(']')[0] + if not override.startswith('pn-'): + extra_overrides.append(override) # We want to remove duplicate overrides. If a recipe had multiple # SRC_URI_override += values it would cause mulitple instances of # overrides. This doesn't play nicely with things like creating a From patchwork Mon Jul 18 14:48:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10338 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1E34C43334 for ; Mon, 18 Jul 2022 14:50:42 +0000 (UTC) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mx.groups.io with SMTP id smtpd.web12.28252.1658155837057166483 for ; Mon, 18 Jul 2022 07:50:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=bHefzCzz; spf=softfail (domain: sakoman.com, ip: 209.85.214.180, mailfrom: steve@sakoman.com) Received: by mail-pl1-f180.google.com with SMTP id b2so9230472plx.7 for ; Mon, 18 Jul 2022 07:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ba/c/kLw3NkqSnPJ8ANIcsoklydR7zyymTvSxA54BCg=; b=bHefzCzzuEjhpYkgDyGDYzZwe6aby7JsA5UF2batdwIe/IDRu5asrAVxmyX4I922E4 YWTOtDB/inh7ReJQSIqu/RdIg0g7Ck4EllfV4dRckOphbXoNmp70bTO4MC2PPf+B+W3b qx9VOlaOjkaczgSjZR+5tkWnP49XFLx6r4/Nv5lIJfyzIPLqYeGoL0QLZQJ8fOYZm41z vJNmBiofvgdFZ0qKtKWgLJ5G2xVoeTGOtT9x2aEiiJIHJoabAhcIa9jaLCmsu2Eytgsa wl+QEMOMZvodgSr11fr7REz+4W/tIUMNqjaOJf9rdEaepfgGC4lIILFFxOvp2AKjW6n/ yVjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ba/c/kLw3NkqSnPJ8ANIcsoklydR7zyymTvSxA54BCg=; b=DQqX7XpL/zIvmNYSOriy/Z0zFMLvRuTOAtmCgVAIz/kDxqM1o2/9SKeRpQRv5OfINM jS4YcArOtPltKtOe7hpQAN0OfIv1kFfgiwd3rJ2kwGC3CNvkIBmVDtpVdNHzjvpsEMR8 52806c+855r8bDx0vbpNj5Q+SfEAWclM+Xtp63vwFRW9swxV6V/iA/lI2urNrsqT4SBN GKUlkvbEFmmb4Nig5kj0nioKcRtbJhMnBBmZ+FKR8tPHQ23BByyjcMaRvxnqxTCSMD+z RJth7ZOalQdvadot1YkqIyFwDSQKhObhAArkm1x1Ray+wcCDq2yj7vSwb9FKbnay8V41 /TjQ== X-Gm-Message-State: AJIora/UiP7ne+nIVfI1S+EgZG6WyZbc52AJxa316fyz8FzG5abuIuvN jsqgmm8BofN7P97nvmzheBpC9pt+MV6hq8VF X-Google-Smtp-Source: AGRyM1uW+wBJ55fKhlIWPUlS21NmLvb9QLO+cChWGi+/A7dIxc4f7AodpSXy+VsFsKEAI97FUGuXRg== X-Received: by 2002:a17:90b:1b4f:b0:1f0:e99:ecb0 with SMTP id nv15-20020a17090b1b4f00b001f00e99ecb0mr33679841pjb.204.1658155836048; Mon, 18 Jul 2022 07:50:36 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:35 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 26/35] bin_package: install into base_prefix Date: Mon, 18 Jul 2022 04:48:51 -1000 Message-Id: <58029ca7beb6cda1c7a97f2f2cfae64888587cd6.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168226 From: Pascal Bach This makes the bin_package.bbclass work properly with the native class. Signed-off-by: Pascal Bach Signed-off-by: Richard Purdie (cherry picked from commit ad330b6d4b6e2ba051b5c6c437e07a183831f757) Signed-off-by: Steve Sakoman --- meta/classes/bin_package.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/classes/bin_package.bbclass b/meta/classes/bin_package.bbclass index c3aca20443..f0407e1329 100644 --- a/meta/classes/bin_package.bbclass +++ b/meta/classes/bin_package.bbclass @@ -30,8 +30,9 @@ bin_package_do_install () { bbfatal bin_package has nothing to install. Be sure the SRC_URI unpacks into S. fi cd ${S} + install -d ${D}${base_prefix} tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \ - | tar --no-same-owner -xpf - -C ${D} + | tar --no-same-owner -xpf - -C ${D}${base_prefix} } FILES:${PN} = "/" From patchwork Mon Jul 18 14:48:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10339 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4270CCA479 for ; Mon, 18 Jul 2022 14:50:42 +0000 (UTC) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mx.groups.io with SMTP id smtpd.web11.28077.1658155841151104615 for ; Mon, 18 Jul 2022 07:50:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=DWTQ/q2N; spf=softfail (domain: sakoman.com, ip: 209.85.215.177, mailfrom: steve@sakoman.com) Received: by mail-pg1-f177.google.com with SMTP id r186so10802737pgr.2 for ; Mon, 18 Jul 2022 07:50:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=UVSrBrhe/egJcL/f4bUFHUIqWI0C0UsvJMcJZu97zkA=; b=DWTQ/q2N4dtP+yZCdgbmrumZV5bZNldWuVr8Zgyw/c8+EeDCpetngpowQPCNzd/U5p AOnii7/TFXsZ/gF61SfgK19ib6+oYCcrHSEtSj6hGSYkNjTBdyBQg1jZFZEyrYn5lM4y +r37s44DFS4fAAnY0PD2hQlocqN2fd3KA9LVKR9JTtyGG9H1q8RBs9ElvRFxCX7ZuDp0 md0g+4uro3+kfjWOyGSwdAz4uQ5D/kD5rY7VoFlAb8ePr/EcSp0/QJJ3TL2NwcJGORd1 vmIXxNROecuKurzO9bHkyxWpU2CNx43a+81Jpx4o7ljrodMQkWE9W5gPcnWFf+VytSmj eymQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UVSrBrhe/egJcL/f4bUFHUIqWI0C0UsvJMcJZu97zkA=; b=YwBZ18a3GA0gHLYd7pyeaVDWn/QYLa1IEQIlUVBLYo+EdSBUTL9bmnnL9tHHhwUfwL eD42fE03xHCogv7NaKIwotDzjLOaZ0OjoO1ri3eTRtUAsQvNuckxYRAmLHnDQGfyoLMk zpWNkt1toPawTZvi+yqzR6XtC6fkP1x+xLa2p1Q0zdcr7J6VGtlDZjVwNhSg8EPLt48B eST5ix2xl7Ep1veTZOXPUvmEMZ+wG4GB6yfqIfbMMQRyKb0orv0hPt0NyY7NqaC7Hglc 4DmFLgTJXdVKj7Xyjn2vdhLTUbHHGtVQ4CPOOJpfd/G+bxUTBGHeDxDki5yosDzF2AHn OshQ== X-Gm-Message-State: AJIora9Gg/V+XBwkIkZK260q68mPidqvfVD2lZ7DMj3ORN6Ber+YddP+ 6PxtsHWBI2rDr7eRsQ/fR7UFsv9mFXMVgH3m X-Google-Smtp-Source: AGRyM1ugu/WWZ4j5lfBYFWCIng8hgJyDxxPg59Z0YE1In8uO4FBr1C+Y5Cfy7NKP3zVEu4sDGjbXfA== X-Received: by 2002:aa7:93a5:0:b0:51b:e0f8:97a6 with SMTP id x5-20020aa793a5000000b0051be0f897a6mr28327850pff.44.1658155840043; Mon, 18 Jul 2022 07:50:40 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:39 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 27/35] patch: handle if S points to a subdirectory of a git repo Date: Mon, 18 Jul 2022 04:48:52 -1000 Message-Id: <577a69137eac6a44869d384b9027fbfdfea5740e.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168227 From: Paul Eggleton If PATCHTOOL = "git", SRC_URI fetches from a git repo and S points to a subdirectory of the checked out sources, then we were erroneously initialising the subdirectory as its own git repo. Check if the returned top-level repo directory is a subdirectory of WORKDIR and do not run initialise the source directory if that is the case. (This was a regression introduced with OE-Core revision 6184b56a7a0fc6f5d19fdfb81e7453667f7da940, however we didn't have a test that verified the behaviour.) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie (cherry picked from commit 9cca53a2bcbf6809615ce5626c86c6ee481a7a76) Signed-off-by: Steve Sakoman --- meta/lib/oe/patch.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 95b915a6ab..4ec9caed45 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py @@ -299,10 +299,10 @@ class GitApplyTree(PatchTree): PatchTree.__init__(self, dir, d) self.commituser = d.getVar('PATCH_GIT_USER_NAME') self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL') - if not self._isInitialized(): + if not self._isInitialized(d): self._initRepo() - def _isInitialized(self): + def _isInitialized(self, d): cmd = "git rev-parse --show-toplevel" try: output = runcmd(cmd.split(), self.dir).strip() @@ -310,8 +310,8 @@ class GitApplyTree(PatchTree): ## runcmd returned non-zero which most likely means 128 ## Not a git directory return False - ## Make sure repo is in builddir to not break top-level git repos - return os.path.samefile(output, self.dir) + ## Make sure repo is in builddir to not break top-level git repos, or under workdir + return os.path.samefile(output, self.dir) or oe.path.is_path_parent(d.getVar('WORKDIR'), output) def _initRepo(self): runcmd("git init".split(), self.dir) From patchwork Mon Jul 18 14:48:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10340 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A611FCCA482 for ; Mon, 18 Jul 2022 14:50:52 +0000 (UTC) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mx.groups.io with SMTP id smtpd.web08.28267.1658155844589278461 for ; Mon, 18 Jul 2022 07:50:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=ABnGfnep; spf=softfail (domain: sakoman.com, ip: 209.85.214.177, mailfrom: steve@sakoman.com) Received: by mail-pl1-f177.google.com with SMTP id j12so9228914plj.8 for ; Mon, 18 Jul 2022 07:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3AKgjXgIJmCWXAfOmQmu1+QjMpAB628gEYBUzerptzY=; b=ABnGfnepHOHw4Rf1MbxVYtB0P9ueJ+/SEZllrz1UXKfgCO4CMc60GuZnyeC/7b7SNn rLfFIQ7UfesxQgz9S704KBo0102Zu+ppuylUvt6iuAxxnM6BTHRLssKpdnpkNqNeZa6p G1NY42ZovcNsMJkuD8hyWqWjKMOJ2OvgUzfV5xs4JB00ygvpYG6K4f5RpzZoJXGYHjG7 xt61EMVGMrjmi7gVizPiHKNHXbZc5qtr6zUWuXOoVVGQ7Pl9nAnaK4K79oH4Lc94l2jX nJDJ1VnMgdRjbAf0ZBP5lTttjusql3BgDdkrPX6nUIRIEVHetuiYjjA5+hAxv9MbJDIh mjPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3AKgjXgIJmCWXAfOmQmu1+QjMpAB628gEYBUzerptzY=; b=BARKDi/5uw663Bt2B6bcdZFdiDl2LWMAwmHY+H0asvLJAYx6xagnFO/IRegVa7qtMK +WqW/779EHToLqMfYS1rBz+yJEM+AEpJOK/OD5txfkPUX26Fwe5zZwt0DAH9UmQS95H4 kcMJP2Fbv9MuJovAZi24PiDa9qeg/o5gL2OCJECvg4ZH7UO7Wlzfv7T8sSmbALBoTH9T BPDUZrrxZmEnZHB9ntEqsSypPpOdsbXroJWnksI0dXBd2CbXZmfFNhwyNhxG90V/Yu/w gvQRBvFBreCwCBE/Hpyo0WCrHGoPHiE0MAacXsBDOUxBsOnXrfiNAQip4S0dgzqJb3dP h+Uw== X-Gm-Message-State: AJIora8fIFMYkNq/L4OCv6sySZfJkhEbpiYX0HQfVcBmq54giZgH67MP wYomGStq9xZuKwvxWTqehK1yqGd8433WStTH X-Google-Smtp-Source: AGRyM1uNXndJ3+qD+gtMi5XEQbC7pOiNGZfsQSotAjZ5xctR8WI++0KMltxgZNAGJ0zTMZMhmjxYBQ== X-Received: by 2002:a17:903:281:b0:16c:4ccf:e46b with SMTP id j1-20020a170903028100b0016c4ccfe46bmr28212366plr.36.1658155843339; Mon, 18 Jul 2022 07:50:43 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:42 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 28/35] devtool: finish: handle patching when S points to subdir of a git repo Date: Mon, 18 Jul 2022 04:48:53 -1000 Message-Id: <7cf53810b1dc3d14c4838a610b3d53170f552c19.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168228 From: Paul Eggleton If devtool finish needs to create a patch and have it applied to the sources for a recipe where S points to a subdirectory of the sources, then the patch needs to be applied at the root of the repo i.e. we need to add a patchdir= parameter to the SRC_URI entry. Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie (cherry picked from commit ad3736d9ca14cac14a7da22c1cfdeda219665e6f) Signed-off-by: Steve Sakoman --- meta/lib/oe/recipeutils.py | 9 +++++++-- scripts/lib/devtool/standard.py | 25 +++++++++++++++++++------ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 872ff97b89..b04992c66d 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py @@ -666,7 +666,7 @@ def get_bbappend_path(d, destlayerdir, wildcardver=False): return (appendpath, pathok) -def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, machine=None, extralines=None, removevalues=None, redirect_output=None): +def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, machine=None, extralines=None, removevalues=None, redirect_output=None, params=None): """ Writes a bbappend file for a recipe Parameters: @@ -696,6 +696,9 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, redirect_output: If specified, redirects writing the output file to the specified directory (for dry-run purposes) + params: + Parameters to use when adding entries to SRC_URI. If specified, + should be a list of dicts with the same length as srcfiles. """ if not removevalues: @@ -762,12 +765,14 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, copyfiles = {} if srcfiles: instfunclines = [] - for newfile, origsrcfile in srcfiles.items(): + for i, (newfile, origsrcfile) in enumerate(srcfiles.items()): srcfile = origsrcfile srcurientry = None if not srcfile: srcfile = os.path.basename(newfile) srcurientry = 'file://%s' % srcfile + if params and params[i]: + srcurientry = '%s;%s' % (srcurientry, ';'.join('%s=%s' % (k,v) for k,v in params[i].items())) # Double-check it's not there already # FIXME do we care if the entry is added by another bbappend that might go away? if not srcurientry in rd.getVar('SRC_URI').split(): diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index e53569c5cc..c98bfe8195 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -1606,6 +1606,19 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil if not os.path.exists(append): raise DevtoolError('unable to find workspace bbappend for recipe %s' % recipename) + srctreebase = workspace[recipename]['srctreebase'] + relpatchdir = os.path.relpath(srctreebase, srctree) + if relpatchdir == '.': + patchdir_params = {} + else: + patchdir_params = {'patchdir': relpatchdir} + + def srcuri_entry(fname): + if patchdir_params: + paramstr = ';' + ';'.join('%s=%s' % (k,v) for k,v in patchdir_params.items()) + else: + paramstr = '' + return 'file://%s%s' % (basepath, paramstr) initial_rev, update_rev, changed_revs, filter_patches = _get_patchset_revs(srctree, append, initial_rev, force_patch_refresh) if not initial_rev: @@ -1627,7 +1640,6 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil new_f = {} del_f = {} else: - srctreebase = workspace[recipename]['srctreebase'] upd_f, new_f, del_f = _export_local_files(srctree, rd, local_files_dir, srctreebase) remove_files = [] @@ -1663,14 +1675,15 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil removedentries, remaining = _remove_file_entries( srcuri, remove_files) if removedentries or remaining: - remaining = ['file://' + os.path.basename(item) for + remaining = [srcuri_entry(os.path.basename(item)) for item in remaining] removevalues = {'SRC_URI': removedentries + remaining} appendfile, destpath = oe.recipeutils.bbappend_recipe( rd, appendlayerdir, files, wildcardver=wildcard_version, removevalues=removevalues, - redirect_output=dry_run_outdir) + redirect_output=dry_run_outdir, + params=[patchdir_params] * len(files)) else: logger.info('No patches or local source files needed updating') else: @@ -1694,7 +1707,7 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil # replace the entry in SRC_URI with our local version logger.info('Replacing remote patch %s with updated local version' % basepath) path = os.path.join(files_dir, basepath) - _replace_srcuri_entry(srcuri, basepath, 'file://%s' % basepath) + _replace_srcuri_entry(srcuri, basepath, srcuri_entry(basepath)) updaterecipe = True else: logger.info('Updating patch %s%s' % (basepath, dry_run_suffix)) @@ -1708,7 +1721,7 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil os.path.join(files_dir, basepath), dry_run_outdir=dry_run_outdir, base_outdir=recipedir) - srcuri.append('file://%s' % basepath) + srcuri.append(srcuri_entry(basepath)) updaterecipe = True for basepath, path in new_p.items(): logger.info('Adding new patch %s%s' % (basepath, dry_run_suffix)) @@ -1716,7 +1729,7 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil os.path.join(files_dir, basepath), dry_run_outdir=dry_run_outdir, base_outdir=recipedir) - srcuri.append('file://%s' % basepath) + srcuri.append(srcuri_entry(basepath)) updaterecipe = True # Update recipe, if needed if _remove_file_entries(srcuri, remove_files)[0]: From patchwork Mon Jul 18 14:48:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10341 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A614DCCA486 for ; Mon, 18 Jul 2022 14:50:52 +0000 (UTC) Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by mx.groups.io with SMTP id smtpd.web10.28054.1658155850643119054 for ; Mon, 18 Jul 2022 07:50:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=VJ0Klqs4; spf=softfail (domain: sakoman.com, ip: 209.85.216.45, mailfrom: steve@sakoman.com) Received: by mail-pj1-f45.google.com with SMTP id p9so11954458pjd.3 for ; Mon, 18 Jul 2022 07:50:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=nGpHytKa+m6/Oyyc4A+pirJjh15BWLqcgj/Y9GTEKh8=; b=VJ0Klqs4qWlxlaSMGz7bAQcu8QIIKzX0YtX6octWFLmM/NzETEwPOXPLgxi+Ir+2QQ Ba+q7yVU3P1i9Ziny62OGv8obBG8aWpTds7QKud5aoTLNYnS1ws6eMM+5C+kktfUuhzq FrHu9Xmm9kI3kM3jH10KFeT8biumGjmF48Avi2kpFSekvMx5FsbY3Kk4exTz2vtVENzI V0lPI8AJ9SCjsoAnEnCwNZKOdZ1dK9Qr4gZFK5tkH1GWA1DMxDp0jpyqbJMbRfFHwQO9 Q/cONwqDsrkE7k2LjkT7FVIKermkO4VhDFbb038V2Il8EBuYAJma3f5ZCXSQ38RVe74G +nuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nGpHytKa+m6/Oyyc4A+pirJjh15BWLqcgj/Y9GTEKh8=; b=TRhb7440QC3JHtpYFK26JGupkqs5FykQzNTRt2kZFFrMZFMh4Bu1Npo+J7ap4Jcm+h eO4c5WSTkatvNge6AENPwv9jjDYO27fDRuo14Y2GJpqqlRo/e8swndhCQQ8SXxwIhfeS 7Dx5ZGFmtxPfqwwCrxL0n11D0MxF29SnCR2/29sHQfCP9XzoF/DyTT3XtLeD67+FwTkx gRhK6PV5mFyvgScozaWO1SEL3P12LEjKwqoZTms2Pw4pRTcj3E8NbFCwN6Zx1Zxn1DZ0 kHq/oGycNbAZEuFIMSqdg3TvML4qfjs9lWomOcqBT3dOPvZeTnmygYnLOTihZqGF8g7M PajA== X-Gm-Message-State: AJIora/JQ+mIxhmc/qf9gajsytcBc8EeixvlDsSDTydYpaHkaUoSck7w tyJtltDRlGv0Te2x4TwJerRYvMYR5pPGUOC+ X-Google-Smtp-Source: AGRyM1txEOCIs9y8BGoF/g0TQZA6XEtfkXPO/sR50eR7+rWZiPqrN8di/z92vD3DFtvmjINyBomSxQ== X-Received: by 2002:a17:90b:1004:b0:1ef:9f33:2df4 with SMTP id gm4-20020a17090b100400b001ef9f332df4mr39385309pjb.31.1658155849444; Mon, 18 Jul 2022 07:50:49 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:48 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 29/35] oe-selftest: devtool: test modify git recipe building from a subdir Date: Mon, 18 Jul 2022 04:48:54 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:50:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168229 From: Paul Eggleton Add a test that verifies that devtool modify + devtool finish do the right thing on a recipe that fetches from git and sets S to point to a subdirectory of the source tree. We have a few examples among the core recipes, dos2unix is a convenient one so let's use that. (The test first verifies that that is still true in case the recipe is changed in future.) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie (cherry picked from commit a84d9ed14173b0bf467ea78dff4f0f7bae0bc082) Signed-off-by: Steve Sakoman --- meta/lib/oeqa/selftest/cases/devtool.py | 114 ++++++++++++++++++++---- 1 file changed, 97 insertions(+), 17 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index ddf6c0c9f8..34fc791f3a 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -218,6 +218,34 @@ class DevtoolTestCase(OESelftestTestCase): filelist.append(' '.join(splitline)) return filelist + def _check_diff(self, diffoutput, addlines, removelines): + """Check output from 'git diff' matches expectation""" + remaining_addlines = addlines[:] + remaining_removelines = removelines[:] + for line in diffoutput.splitlines(): + if line.startswith('+++') or line.startswith('---'): + continue + elif line.startswith('+'): + matched = False + for item in addlines: + if re.match(item, line[1:].strip()): + matched = True + remaining_addlines.remove(item) + break + self.assertTrue(matched, 'Unexpected diff add line: %s' % line) + elif line.startswith('-'): + matched = False + for item in removelines: + if re.match(item, line[1:].strip()): + matched = True + remaining_removelines.remove(item) + break + self.assertTrue(matched, 'Unexpected diff remove line: %s' % line) + if remaining_addlines: + self.fail('Expected added lines not found: %s' % remaining_addlines) + if remaining_removelines: + self.fail('Expected removed lines not found: %s' % remaining_removelines) + class DevtoolBase(DevtoolTestCase): @@ -718,6 +746,7 @@ class DevtoolModifyTests(DevtoolBase): self.assertTrue(bbclassextended, 'None of these recipes are BBCLASSEXTENDed to native - need to adjust testrecipes list: %s' % ', '.join(testrecipes)) self.assertTrue(inheritnative, 'None of these recipes do "inherit native" - need to adjust testrecipes list: %s' % ', '.join(testrecipes)) + def test_devtool_modify_localfiles_only(self): # Check preconditions testrecipe = 'base-files' @@ -930,23 +959,7 @@ class DevtoolUpdateTests(DevtoolBase): srcurilines[0] = 'SRC_URI = "' + srcurilines[0] srcurilines.append('"') removelines = ['SRCREV = ".*"'] + srcurilines - for line in result.output.splitlines(): - if line.startswith('+++') or line.startswith('---'): - continue - elif line.startswith('+'): - matched = False - for item in addlines: - if re.match(item, line[1:].strip()): - matched = True - break - self.assertTrue(matched, 'Unexpected diff add line: %s' % line) - elif line.startswith('-'): - matched = False - for item in removelines: - if re.match(item, line[1:].strip()): - matched = True - break - self.assertTrue(matched, 'Unexpected diff remove line: %s' % line) + self._check_diff(result.output, addlines, removelines) # Now try with auto mode runCmd('cd %s; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, os.path.basename(recipefile))) result = runCmd('devtool update-recipe %s' % testrecipe) @@ -1316,6 +1329,73 @@ class DevtoolUpdateTests(DevtoolBase): expected_status = [] self._check_repo_status(os.path.dirname(recipefile), expected_status) + def test_devtool_finish_modify_git_subdir(self): + # Check preconditions + testrecipe = 'dos2unix' + bb_vars = get_bb_vars(['SRC_URI', 'S', 'WORKDIR', 'FILE'], testrecipe) + self.assertIn('git://', bb_vars['SRC_URI'], 'This test expects the %s recipe to be a git recipe' % testrecipe) + workdir_git = '%s/git/' % bb_vars['WORKDIR'] + if not bb_vars['S'].startswith(workdir_git): + self.fail('This test expects the %s recipe to be building from a subdirectory of the git repo' % testrecipe) + subdir = bb_vars['S'].split(workdir_git, 1)[1] + # Clean up anything in the workdir/sysroot/sstate cache + bitbake('%s -c cleansstate' % testrecipe) + # Try modifying a recipe + tempdir = tempfile.mkdtemp(prefix='devtoolqa') + self.track_for_cleanup(tempdir) + self.track_for_cleanup(self.workspacedir) + self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe) + self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') + result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir)) + testsrcfile = os.path.join(tempdir, subdir, 'dos2unix.c') + self.assertExists(testsrcfile, 'Extracted source could not be found') + self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created. devtool output: %s' % result.output) + self.assertNotExists(os.path.join(tempdir, subdir, '.git'), 'Subdirectory has been initialised as a git repo') + # Check git repo + self._check_src_repo(tempdir) + # Modify file + runCmd("sed -i '1s:^:/* Add a comment */\\n:' %s" % testsrcfile) + result = runCmd('git commit -a -m "Add a comment"', cwd=tempdir) + # Now try updating original recipe + recipefile = bb_vars['FILE'] + recipedir = os.path.dirname(recipefile) + self.add_command_to_tearDown('cd %s; rm -f %s/*.patch; git checkout .' % (recipedir, testrecipe)) + result = runCmd('devtool update-recipe %s' % testrecipe) + expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)), + ('??', '.*/%s/%s/$' % (testrecipe, testrecipe))] + self._check_repo_status(os.path.dirname(recipefile), expected_status) + result = runCmd('git diff %s' % os.path.basename(recipefile), cwd=os.path.dirname(recipefile)) + removelines = ['SRC_URI = "git://.*"'] + addlines = [ + 'SRC_URI = "git://.* \\\\', + 'file://0001-Add-a-comment.patch;patchdir=.. \\\\', + '"' + ] + self._check_diff(result.output, addlines, removelines) + # Put things back so we can run devtool finish on a different layer + runCmd('cd %s; rm -f %s/*.patch; git checkout .' % (recipedir, testrecipe)) + # Run devtool finish + res = re.search('recipes-.*', recipedir) + self.assertTrue(res, 'Unable to find recipe subdirectory') + recipesubdir = res[0] + self.add_command_to_tearDown('rm -rf %s' % os.path.join(self.testlayer_path, recipesubdir)) + result = runCmd('devtool finish %s meta-selftest' % testrecipe) + # Check bbappend file contents + appendfn = os.path.join(self.testlayer_path, recipesubdir, '%s_%%.bbappend' % testrecipe) + with open(appendfn, 'r') as f: + appendlines = f.readlines() + expected_appendlines = [ + 'FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n', + '\n', + 'SRC_URI += "file://0001-Add-a-comment.patch;patchdir=.."\n', + '\n' + ] + self.assertEqual(appendlines, expected_appendlines) + self.assertExists(os.path.join(os.path.dirname(appendfn), testrecipe, '0001-Add-a-comment.patch')) + # Try building + bitbake('%s -c patch' % testrecipe) + + class DevtoolExtractTests(DevtoolBase): def test_devtool_extract(self): From patchwork Mon Jul 18 14:48:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10343 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A524EC43334 for ; Mon, 18 Jul 2022 14:51:02 +0000 (UTC) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mx.groups.io with SMTP id smtpd.web10.28057.1658155854945849641 for ; Mon, 18 Jul 2022 07:50:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=NH5D8oMK; spf=softfail (domain: sakoman.com, ip: 209.85.216.47, mailfrom: steve@sakoman.com) Received: by mail-pj1-f47.google.com with SMTP id a15so12032051pjs.0 for ; Mon, 18 Jul 2022 07:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=AAJ2qhgqaL07IQKxnjsxkB2PgpkR0Y7k5SVkYAQTIzQ=; b=NH5D8oMK5zq/MAyuuX0sgUM1qlkahw9FBRY4aUQWLPcSOrZrtUDU+MlWG/RH0s66xA gGITNjKZO8+QRig2WYTlq2smBCN9ecvNs0G1eXPhIebgB4itb5CNG1mNVkVTzZ/Bkycv TTzqbsa9rQ9/RpgWWfPqODuZVdubry9QLEm1RpsgGZXmlscqgR3s1jC1fSRHuKenfDkL jYVWmwQxZQQ1vHLl8Rr0hWIHCQFMD56qLRrNh0bSEuY7SXBDcXzGKIuArxoTt2L4d/yE Oi1Io7FP+K81bBG/+NM+o7TP4Dk3zMM20ZV3JsnZc7bKl3DPpwZhGtedKAKKKg52VLIG 4t9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AAJ2qhgqaL07IQKxnjsxkB2PgpkR0Y7k5SVkYAQTIzQ=; b=hhGiewKwbooTY05VLfrPd7fOVEPvrnSQuZhFTzOiGZAQwC4/nw6V0xBcFw8wPzyhkw ldwEewM7YPrQIq7t33AmWJBKwErYSCOxeNzcNk85YH01U9QzG6T3xzaGTT7ATK+GfkgO cxkY7/SqM+2nWz81mhV3OQ7BrjU1xaqrK/N5P1yw2CRCscV1Alq9jjiDlG4VY8TbuHJz 5gPpevMVRIB8jmplBypwGmWhFz4NMgFm8ZaNVS/evQsA59HZID03EJm+AzIn7NlwuVzF +C8G8OCqcqAtyUZHTxX2MFiphNwqctL/i7CGFK1E13mrADiCF1IzznUfL/mo1F49Sy98 Lz2Q== X-Gm-Message-State: AJIora9msz6vwLmNoeWOEFWDO0hXArJ7RPQsWILKVw9Z2eB/UN0Pl3Zy sbD95e0/IPRtnjbFLycbrQUj4RjwAzEvgmdq X-Google-Smtp-Source: AGRyM1t8IinxAhRSmF+6y93pIK8gbsXW9n0BOzvMQrkNVsi8tRwy5Vs525ygCa7eS6sKqkV+BPeLeQ== X-Received: by 2002:a17:90b:8d:b0:1ef:74c8:1541 with SMTP id bb13-20020a17090b008d00b001ef74c81541mr32849042pjb.103.1658155853839; Mon, 18 Jul 2022 07:50:53 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:53 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 30/35] gcc-runtime: Fix build when using gold Date: Mon, 18 Jul 2022 04:48:55 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:51:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168230 From: Richard Purdie If gold is enabled as the default linker, it errors trying to link to our dummy library empty file and this turns off things which should be present in libstdc++. For example, _GLIBCXX_HAVE_S_ISREG isn't defined and HAVE_S_ISREG in libstdc++-v3/config.h isn't set properly. Instead of just creating an empty file, create an empty elf binary instead which addresses the issue. Signed-off-by: Richard Purdie (cherry picked from commit 2070bcd10aa3a05c96c8501c6a8c1e129fb1d440) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/gcc/gcc-runtime.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc index e9f2cf16e8..dc903c2b88 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime.inc +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc @@ -68,7 +68,8 @@ do_configure () { # libstdc++ isn't built yet so CXX would error not able to find it which breaks stdc++'s configure # tests. Create a dummy empty lib for the purposes of configure. mkdir -p ${WORKDIR}/dummylib - touch ${WORKDIR}/dummylib/libstdc++.so + touch ${WORKDIR}/dummylib/dummylib.c + ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o ${WORKDIR}/dummylib/libstdc++.so for d in libgcc ${RUNTIMETARGET}; do echo "Configuring $d" rm -rf ${B}/${TARGET_SYS}/$d/ From patchwork Mon Jul 18 14:48:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10342 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FD1EC433EF for ; Mon, 18 Jul 2022 14:51:02 +0000 (UTC) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mx.groups.io with SMTP id smtpd.web10.28060.1658155858265152909 for ; Mon, 18 Jul 2022 07:50:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=NziaTTwZ; spf=softfail (domain: sakoman.com, ip: 209.85.216.52, mailfrom: steve@sakoman.com) Received: by mail-pj1-f52.google.com with SMTP id v4-20020a17090abb8400b001ef966652a3so18411395pjr.4 for ; Mon, 18 Jul 2022 07:50:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=q3FMdemEa/tEtqviFrmf81dEI/l6OSTFG135dG0vvVY=; b=NziaTTwZIoEjHPOAXZDu4FFyakrMluzzTJHpxd2IkNWGw3WvK9YKdcZeTXIu3jkfU7 FQFbzCn1UcrMCaRRZiv+9dct1nprnbNlZGaQmT6mlUeqscixpHOVsHpuriZk234KL9dF xJenXtPrgCwN58lcYz02GDta+3pqa+w3XSekxOOKqFos415ePv3zH+SriGD5ove5EkWn GFdBtsytYOT56z3nbOvDUdCd9VNnFnnQAEISjNyi6Q0l8oOuMrdXL0pFTzIjPk2fSRIo dbqzYX5qKh+f4aBMm1gMqf0Vh08OP3zWe6jjjlDsa5qVZkaVQ42ZR+mXiB8hZ7hdSoVo h09w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q3FMdemEa/tEtqviFrmf81dEI/l6OSTFG135dG0vvVY=; b=3Tm5Jk58uSof3a+tA40TTPXaiTm61H3BD5yfyPAuN1XwYw/GiiE1AP50WV/Z3AYWqA x6nOLSXSauzvQdFF3pWwElKTHDVJhQLUIeRA8P7rtX1VGfqJlmAkGBaLzCWsSJOsjTvS GowmD+v/wD0tHIUicuk8jpjjjpDc5Mfs9L2xVHaHMmFDpgoqu7yZ8kRsRSMueOHI4fSK rMHFGXAWZ+mYKKKl4o5e3sdw8k07s2erMGQQBrvS1hHh7ZmDHTYhXEod1JktQGSvkw6I jYlv7xaM9gWNTsXIt96A9ZyS/rxDJxzyd5ckn6IEaqUXl5DOjOIdjRi0hCiTYUdYMxhA QHPw== X-Gm-Message-State: AJIora8J16N7DLzumnQhtl3BJTx8mU+wvj29wKZvHbU4LLNnQ7zJ24dp qZ4x/stQHzNRLu24Zd4mUNl2GM00JOlMa27p X-Google-Smtp-Source: AGRyM1urJVwNBvjX+5N83ZYCVcYWKwRAZSPRyjIIzlE1S/V8ZU97BLjSrPm5BYFXJpnr5i+Thje0pA== X-Received: by 2002:a17:90b:4d11:b0:1f0:414b:586e with SMTP id mw17-20020a17090b4d1100b001f0414b586emr39659310pjb.111.1658155857189; Mon, 18 Jul 2022 07:50:57 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.50.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:50:56 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 31/35] gcc-runtime: Fix missing MLPREFIX in debug mappings Date: Mon, 18 Jul 2022 04:48:56 -1000 Message-Id: <3bb7abe545be6c92b2bd4f184536b0b0e871aac6.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:51:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168231 From: Richard Purdie This fixes reproducibility issues with multilibs were a different recipe specific sysroot is used which was leaking into debug symbols in libraries. Signed-off-by: Richard Purdie (cherry picked from commit f442edf51e256bd315bd8e4ac4d9fa12b8e9e092) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/gcc/gcc-runtime.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc index dc903c2b88..c85b5888d4 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime.inc +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc @@ -53,7 +53,7 @@ RUNTIMETARGET:libc-newlib = "libstdc++-v3" REL_S = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}" DEBUG_PREFIX_MAP:class-target = " \ - -fdebug-prefix-map=${WORKDIR}/recipe-sysroot= \ + -fdebug-prefix-map=${WORKDIR}/${MLPREFIX}recipe-sysroot= \ -fdebug-prefix-map=${WORKDIR}/recipe-sysroot-native= \ -fdebug-prefix-map=${S}=${REL_S} \ -fdebug-prefix-map=${S}/include=${REL_S}/libstdc++-v3/../include \ From patchwork Mon Jul 18 14:48:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10345 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4F3ECCA479 for ; Mon, 18 Jul 2022 14:51:12 +0000 (UTC) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mx.groups.io with SMTP id smtpd.web12.28263.1658155863059189276 for ; Mon, 18 Jul 2022 07:51:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=8MLqCEiH; spf=softfail (domain: sakoman.com, ip: 209.85.215.181, mailfrom: steve@sakoman.com) Received: by mail-pg1-f181.google.com with SMTP id 72so10828374pge.0 for ; Mon, 18 Jul 2022 07:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=hFK0q7DhGAW2Z18u1V+1pM8knEKcCOWfUVv9QY9YS20=; b=8MLqCEiHN0VffU+HhJudVuVWFCT/xxpMlLv03Ub5Dzyr+8G/rMaUy3IGdIxK4uDxlO scXs+5AC6IsREPnCdao9mbbT9QOQ7oXwdQlyxd2K0Qn12zTj67CLypuSOiAEHaNnIs4q JMHtlQ1VHhKN0BcVahEO8E8VbB/ZzcoPQJFTZ+TkA80ZGbDOnHwXfjPrvMJuW3oLQ8y5 0JRG+nOH2DRHmMBDLh+fGceD9CkM9hFcy9GPYxs8kZ/5BDg+JimJtsXwC1EVZeOxF7uW Q0YllNndVNRGM52lW8bmlPoUglaHbbisquCrj6yvYFfqHX0/v5s7k2+XEPeUTRhhP+2p K74Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hFK0q7DhGAW2Z18u1V+1pM8knEKcCOWfUVv9QY9YS20=; b=zxYYp2oVP9LpQicqEAOYuDQ3+Bb9YN30qFq8OPSm9QO5LAYLsn3A1bfPRSlw0d5xgG LPpaQnkaOjLf0JOaelYl81sQ62XwVubvQtiNhN8qP3+8Ah6GxhR/r1/jN4qD0WVPcC2X sYbPxtzIPxJ+IBRx6EGu+4CqPH79h2EHCSiZmC1T2ji3qcv6kk2+VFBbjNuOWHOzpFfU kGNaDXYkGFRM6C/CWOR6sdtMShQVXCntrOCXZlxS4oe08YXY9IYaZzWffwFDi+vjEyvb TVV7SXv1bEXR0Eh0B+2Irl8wMi9tZ5tEFeOBYFu0g5NvzWbODhlNewfrQDn4uG9SIA3A S1pw== X-Gm-Message-State: AJIora9Untj+7AJHx/MtiSKp0RdE0ggCvDMiqI1Zl3E2NfFOS6V5wbFK 5s1w/q47XpCLN6D7r4Q7qcbFb5puNxStn9hO X-Google-Smtp-Source: AGRyM1seIFLa+cxxtwpTNj1wVOtuce9YUvD+KuQaHj8dzLR+Vk6iztIaaOZYYFPmVs1ZUvZa0uc6Lg== X-Received: by 2002:a05:6a00:2282:b0:52a:e79b:16e4 with SMTP id f2-20020a056a00228200b0052ae79b16e4mr28446616pfe.79.1658155862006; Mon, 18 Jul 2022 07:51:02 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.51.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:51:01 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 32/35] selftest/runtime_test/virgl: Disable for all almalinux Date: Mon, 18 Jul 2022 04:48:57 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:51:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168232 From: Richard Purdie We can't support vgem on RHEL derived distros so disable this test for all almalinux hosts rather than specific versions. Signed-off-by: Richard Purdie (cherry picked from commit e921f3c1b917072e4c5a110c7dfeeadd2e571bde) Signed-off-by: Steve Sakoman --- meta/lib/oeqa/selftest/cases/runtime_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py index 8eacde40ad..857737f730 100644 --- a/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py @@ -252,7 +252,7 @@ class TestImage(OESelftestTestCase): import subprocess, os distro = oe.lsb.distro_identifier() - if distro and distro in ['debian-9', 'debian-10', 'centos-7', 'centos-8', 'ubuntu-16.04', 'ubuntu-18.04', 'almalinux-8.5', 'almalinux-8.6']: + if distro and (distro in ['debian-9', 'debian-10', 'centos-7', 'centos-8', 'ubuntu-16.04', 'ubuntu-18.04'] or distro.startswith('almalinux')): self.skipTest('virgl headless cannot be tested with %s' %(distro)) render_hint = """If /dev/dri/renderD* is absent due to lack of suitable GPU, 'modprobe vgem' will create one suitable for mesa llvmpipe software renderer.""" From patchwork Mon Jul 18 14:48:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10344 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1D15C43334 for ; Mon, 18 Jul 2022 14:51:12 +0000 (UTC) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mx.groups.io with SMTP id smtpd.web08.28274.1658155870106823018 for ; Mon, 18 Jul 2022 07:51:10 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=TxFqrRf4; spf=softfail (domain: sakoman.com, ip: 209.85.216.54, mailfrom: steve@sakoman.com) Received: by mail-pj1-f54.google.com with SMTP id n4-20020a17090a73c400b001f1e87432c2so131306pjk.3 for ; Mon, 18 Jul 2022 07:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=KxhoLUd1N/Pey4KDwLBufK5c1ZnIqrch8OD8tWvNvew=; b=TxFqrRf4/1wFWS0UajGvLZY2YEoh7ylB/39qzcnZcuXB3ZBJRbdqgBVBl8GQVse1jT wh9SGN9UAWKJ2jPBHw1AlDpA/5ug6sLVTjwp8x9/fR8003HOg3UsLX75XT+P9bAzcKvh ESxeyagA0xIr679DYF9wSSDY4M4T53555yhQFGpdbEnU8kOP4yWSRE2px7TF7bIL7zHJ wI9CA6Ad6xCarOW1+QXIOAZFek4MrM8FabA6xEMcGnGQ2eRfAutihaq30R/SiGbVz3kh Ppv36/VQSPCKOeldJ9sIcuXEMburzrToizrfMchbED5ztBANLhCzaB3TxfGSsv1cKUgi BP7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KxhoLUd1N/Pey4KDwLBufK5c1ZnIqrch8OD8tWvNvew=; b=KAjFUvoii65JrJRNOZ8FNTBjkZ9B2wWvSmUbCwe+Nyx9FqAqsvos3IqT0421as+J7N U2eOTykTYNypFgR2ta79l9UbpUp+rzkmBUsoHqWhwGxLE/6/AWkH48++cbu25s2P43ob I1c4FDYMHRy3lwT14BD5J0CXE7puaLoWmZYYPoGabR8VD2OottakKsVBLgw5vh9b7xZm OfCHYX/CBFIZNIm2GWJpEX0ZeqsPvfO1uQaylPGXpOO+Fex2aKevOULFiDaeNFgAqFoJ 3INb5K3hlhqPVVsWNiEkPm48BeGvhXoCJRo6s+B5UTEXW61NJZ/YO8UaEPqyV2Zoth5n jnIg== X-Gm-Message-State: AJIora9RmB8thlMmrO3VpxBKUNhR6HJBAEW8re9a/T/qECQIpmKoGRgv /v1783NRftP6DWkktk7qAKllajM3xXkJ9E8z X-Google-Smtp-Source: AGRyM1uC/+BfyJ7/UWfuPy6PlSuUa1GpGswbWMuaj9amzODjOPCC4XLg2tia9igKFqyqzGvCLqK+MA== X-Received: by 2002:a17:90b:1d8f:b0:1f0:270a:b556 with SMTP id pf15-20020a17090b1d8f00b001f0270ab556mr33476055pjb.192.1658155869070; Mon, 18 Jul 2022 07:51:09 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.51.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:51:08 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 33/35] cargo_common.bbclass: enable bitbake vendoring for externalsrc Date: Mon, 18 Jul 2022 04:48:58 -1000 Message-Id: <9b2f7eb0e2108392a849dff663767f1f32552241.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:51:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168233 From: Chanho Park To support crate:// fetcher on externalsrc, we need to remove "-z ${EXTERNALSRC} check of bitbake vendoring. It is possible to disable vendoring by CARGO_DISABLE_BITBAKE_VENDORING = "1" if externalsrc-ed project does not want to enablt it. Signed-off-by: Chanho Park Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie Signed-off-by: Richard Pastrick Signed-off-by: Steve Sakoman --- meta/classes/cargo_common.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/cargo_common.bbclass b/meta/classes/cargo_common.bbclass index 90fad75415..39f32829fd 100644 --- a/meta/classes/cargo_common.bbclass +++ b/meta/classes/cargo_common.bbclass @@ -45,7 +45,7 @@ cargo_common_do_configure () { directory = "${CARGO_VENDORING_DIRECTORY}" EOF - if [ -z "${EXTERNALSRC}" ] && [ ${CARGO_DISABLE_BITBAKE_VENDORING} = "0" ]; then + if [ ${CARGO_DISABLE_BITBAKE_VENDORING} = "0" ]; then cat <<- EOF >> ${CARGO_HOME}/config [source.crates-io] From patchwork Mon Jul 18 14:48:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10347 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A831AC433EF for ; Mon, 18 Jul 2022 14:51:22 +0000 (UTC) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mx.groups.io with SMTP id smtpd.web09.28186.1658155873210798043 for ; Mon, 18 Jul 2022 07:51:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=FXel+QQB; spf=softfail (domain: sakoman.com, ip: 209.85.210.176, mailfrom: steve@sakoman.com) Received: by mail-pf1-f176.google.com with SMTP id b9so10819519pfp.10 for ; Mon, 18 Jul 2022 07:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3uOrr7pmv04opixLh6bQPRBQN7qKjxjpO6BJi15Y3FQ=; b=FXel+QQB3+ZUB/FsHalDjs81cNhxtrhF+Gk5u3g0fSWZrwERR3pMnbOdgvpY4TnL3i EXyOCrjQvYDjbNQOhLKHcZtYcEQAM4fMvRwMEkC3q6QwFAbnkAMAzoDhbINQ+87oHI6n a69jHeFm95H5vChCxoPoIe9NQbDhopvswXZh5e8DQlvm/6IdnDvEXVeY52NcVwqC1dmb QkU66nDvVcpyyWZlCIMEtT/2/Kd+zlcrzZK1lzKdPu8NsPZmwLjD1NoR4wK018bE7oXz NSYqu6j7FdHx7WL8GBWC280LBBssHJ7W7DHVfuifritHfAVnkQd1uLCymjDe+/KqBw5c 29BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3uOrr7pmv04opixLh6bQPRBQN7qKjxjpO6BJi15Y3FQ=; b=BNuRaQsxJexp91qeyxhEvf8w+J3GOYBJK2LGUu0pYJynKX9xKGMgSYmKmgHi4h22FX ht8nQH6PYXrK6yEwo304preEGOwWsQ4QvPIVokFOjpY6GN5tHr8PLGBrH6PxbtbBlq1E e6IIiTaNwkLyhRfd+eVe0rKr/kCC3qbPBLbRretR5O9cBBIf5+5FicKTWkJUfpS+Rghi vAZt2O/nCLMKbDB8III7v+Ab82/1wJmLojemChWujNCGRh+kCj2+mZ7kIdz8Zwxy/3T0 KJ11YHbAKnJDvF0t4DqOaVa4zG2wz/qQnF051VKsHhwqPQc0Lt5iyZLOA+YuoBHwQSxK 3xtA== X-Gm-Message-State: AJIora9gkieG/ywypF2d1Vy/UTK96950VWmRc0p0ZB8TDAP7cpWIRxR4 ztoBfKZOcMs+0V9bKHmPpMX7HKhf32lYSL/L X-Google-Smtp-Source: AGRyM1tjZr639W9PbHhziHu9cBPFPdBGPvtMQI1OkiBtempHWKEzTtS/BZnbPUY+2APK68d1ark20A== X-Received: by 2002:a05:6a00:2446:b0:528:5da9:cc7 with SMTP id d6-20020a056a00244600b005285da90cc7mr29153947pfj.51.1658155872148; Mon, 18 Jul 2022 07:51:12 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.51.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:51:11 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 34/35] externalsrc.bbclass: support crate fetcher on externalsrc Date: Mon, 18 Jul 2022 04:48:59 -1000 Message-Id: <73cc5a1cc62df616c2705280c8de27c38bb2ff0f.1658155579.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:51:22 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168234 From: Chanho Park To support crate:// fetcher on externalsrc, we need to make pass-through the URIs in SRC_URI. Signed-off-by: Chanho Park Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie Signed-off-by: Richard Pastrick Signed-off-by: Steve Sakoman --- meta/classes/externalsrc.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass index b2f216f361..90792a737b 100644 --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass @@ -68,7 +68,7 @@ python () { url_data = fetch.ud[url] parm = url_data.parm if (url_data.type == 'file' or - url_data.type == 'npmsw' or + url_data.type == 'npmsw' or url_data.type == 'crate' or 'type' in parm and parm['type'] == 'kmeta'): local_srcuri.append(url) From patchwork Mon Jul 18 14:49:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 10346 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3AEAC43334 for ; Mon, 18 Jul 2022 14:51:22 +0000 (UTC) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mx.groups.io with SMTP id smtpd.web12.28268.1658155877588655608 for ; Mon, 18 Jul 2022 07:51:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=ruV0aD87; spf=softfail (domain: sakoman.com, ip: 209.85.210.179, mailfrom: steve@sakoman.com) Received: by mail-pf1-f179.google.com with SMTP id e16so10810819pfm.11 for ; Mon, 18 Jul 2022 07:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=30MClMHSIKzPyo7Uemg7gIcwb5ASB7i8xN4gdDU4odk=; b=ruV0aD87hjDwpFQTygjhhKgUQnhmAjjOXERba6jG5UjTm6ol4LQyHQhLhnkUAh7QED cLuzyg84179ZbPO62ZxdWG+usC4N7wc7VlntMnL3Zq7Z7z/5MYjMpBCRUCdtIqVYBG6N IEnACXsdepGh+y4eLqPEZjKZkW6QOD1wyL99jha6rHVe2yhnk9qyes4C7ipSHdCLoMu9 9jrXKGL5t8zQxUD8GzKoAOnE5ptP1PhGOPsWwiJF2uxbDm8TcWqi2U6pzZQva8VmC5RM SYX/Eh7HFqZLjA23ZEFVoiwQ/Fq6PVqg3xni7hAhV0Ql+g82LfK8eryQf8B6uq2BC99M D5ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=30MClMHSIKzPyo7Uemg7gIcwb5ASB7i8xN4gdDU4odk=; b=C37s7bOrPo93/dlOPC+tZ4fMRyO9yUaPd4uI1nRuVs+joOUybai7yaGLTDklc6mGt2 +U3Iivr9ifk1QJUPM+dV8wwxcregkBrCS/2+yUe6M9qst1j6htPxprmpnjD1pNd8SLR8 xPLMk4RVssOeOOzJuYYB6HVYPpScvwfJEjXq+Joitv7dhDZvjzdqdMR/jRNZg0F7ZTzP wgKrPNZPgMDRVP6UYd7ue0GGV8mHIiflAHzH8es2MRnnsJDgqn/vpL+qHxKAB8Bh8cxZ IHEJLxf5SKZ7nkZ3QDxy+Or6LV0lVm7gxOyDbbcd+uPKhz6DPAwNfJZBSNe4Gm+aQD7O OxCQ== X-Gm-Message-State: AJIora+BVek1VfQJ2JMLcxJz2pmr7/YWTqqs8sGg5F44C2kRhk467Ihu /FCZcz9kwO36/HdQ1Jqv60jRHgrYteLgsAC9 X-Google-Smtp-Source: AGRyM1uMFujqnk3FJfzJg2jeD6X9FZuGpF+IKGdW1JfkWjf4tj1NfuoZLICeYSIn8sGdiC4KQMxQsg== X-Received: by 2002:a05:6a00:2446:b0:528:5f22:5b6f with SMTP id d6-20020a056a00244600b005285f225b6fmr28824683pfj.73.1658155876557; Mon, 18 Jul 2022 07:51:16 -0700 (PDT) Received: from hexa.router0800d9.com (dhcp-72-253-6-214.hawaiiantel.net. [72.253.6.214]) by smtp.gmail.com with ESMTPSA id ij8-20020a170902ab4800b0016c066e566bsm9551517plb.164.2022.07.18.07.51.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 07:51:15 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 35/35] pulseaudio: add m4-native to DEPENDS Date: Mon, 18 Jul 2022 04:49:00 -1000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Jul 2022 14:51:22 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168235 From: Ross Burton Normally m4-native ends up in the sysroot via the toolchain, but if a non-standard toolchain is used them m4-native may not be installed. However Pulseaudio explicitly checks for m4 in the meson.build, so add it to DEPENDS. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie (cherry picked from commit ddf846635783923d43520c9dd6f63ca59ed6e3b8) Signed-off-by: Steve Sakoman --- meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc index 821ce7d1df..61d5bb00ba 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc @@ -61,7 +61,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0e5cd938de1a7a53ea5adac38cc10c39 \ " # libtool is needed for libltdl, used in module loading. -DEPENDS = "libatomic-ops libsndfile1 libtool" +DEPENDS = "m4-native libatomic-ops libsndfile1 libtool" # optional DEPENDS += "udev alsa-lib glib-2.0" DEPENDS += "speexdsp libxml-parser-perl-native libcap"