public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Alexander Kanavin" <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex.kanavin@gmail.com>
Subject: [PATCH] dnf: add a patch for base-files installation failures
Date: Tue, 28 Apr 2020 16:20:28 +0200	[thread overview]
Message-ID: <20200428142028.28813-1-alex.kanavin@gmail.com> (raw)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 .../0001-dnf-write-the-log-lock-to-root.patch | 29 +++++++++++++++++++
 meta/recipes-devtools/dnf/dnf_4.2.21.bb       |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch

diff --git a/meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch b/meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch
new file mode 100644
index 0000000000..21b50dee01
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch
@@ -0,0 +1,29 @@
+From 5e07c16a506b19cbb107d5e99fca41d679b23b9a Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 28 Apr 2020 15:55:00 +0200
+Subject: [PATCH] dnf: write the log lock to root
+
+Writing it to /var/log appears to be racing with installation
+of base-files, and if lock is created first, base-files
+will refuse to install (due to the target directory
+already existing, and base-files creating it as a symlink).
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ dnf/logging.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dnf/logging.py b/dnf/logging.py
+index bd660470..a9d808b1 100644
+--- a/dnf/logging.py
++++ b/dnf/logging.py
+@@ -94,7 +94,7 @@ class MultiprocessRotatingFileHandler(logging.handlers.RotatingFileHandler):
+     def __init__(self, filename, mode='a', maxBytes=0, backupCount=0, encoding=None, delay=False):
+         super(MultiprocessRotatingFileHandler, self).__init__(
+             filename, mode, maxBytes, backupCount, encoding, delay)
+-        self.rotate_lock = dnf.lock.build_log_lock("/var/log/", True)
++        self.rotate_lock = dnf.lock.build_log_lock("/", True)
+ 
+     def emit(self, record):
+         while True:
diff --git a/meta/recipes-devtools/dnf/dnf_4.2.21.bb b/meta/recipes-devtools/dnf/dnf_4.2.21.bb
index 8f7757b72f..44dab1d8a6 100644
--- a/meta/recipes-devtools/dnf/dnf_4.2.21.bb
+++ b/meta/recipes-devtools/dnf/dnf_4.2.21.bb
@@ -14,6 +14,7 @@ SRC_URI = "git://github.com/rpm-software-management/dnf.git \
            file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
            file://0030-Run-python-scripts-using-env.patch \
            file://0001-set-python-path-for-completion_helper.patch \
+           file://0001-dnf-write-the-log-lock-to-root.patch \
            "
 
 SRCREV = "864c381baabf024c299dca75abfda96139b8f583"
-- 
2.26.1


             reply	other threads:[~2020-04-28 14:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 14:20 Alexander Kanavin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-04-28 14:04 [PATCH] dnf: add a patch for base-files installation failures Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200428142028.28813-1-alex.kanavin@gmail.com \
    --to=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox