Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 846049 Details for
Bug 1048826
[PATCH] Log host kernel
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
host_kernel plugin
0001-Add-host_kernel-log-file.patch (text/plain), 3.19 KB, created by
Vít Ondruch
on 2014-01-06 12:01:08 UTC
(
hide
)
Description:
host_kernel plugin
Filename:
MIME Type:
Creator:
Vít Ondruch
Created:
2014-01-06 12:01:08 UTC
Size:
3.19 KB
patch
obsolete
>From ae32312b626caca11661c5964ab1d3b3cfb35112 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com> >Date: Mon, 23 Dec 2013 14:26:05 +0100 >Subject: [PATCH] Add host_kernel log file. > >This file contains information about kernel used during build, since >the version of host kernel may differ (and it usually differs) from the >kernel version available in build root. >--- > py/mockbuild/plugins/host_kernel.py | 44 +++++++++++++++++++++++++++++++++++++ > py/mockbuild/util.py | 4 +++- > 2 files changed, 47 insertions(+), 1 deletion(-) > create mode 100644 py/mockbuild/plugins/host_kernel.py > >diff --git a/py/mockbuild/plugins/host_kernel.py b/py/mockbuild/plugins/host_kernel.py >new file mode 100644 >index 0000000..5683a07 >--- /dev/null >+++ b/py/mockbuild/plugins/host_kernel.py >@@ -0,0 +1,44 @@ >+# vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=python:textwidth=0:fileencoding=utf-8 >+# License: GPL2 or later see COPYING >+# Written by VÃt Ondruch >+# Copyright (C) 2013 Red Hat, Inc >+ >+# This plugin dumps kernel version of builder into host_kernel log file. >+# >+# Example of host_kernel content: >+# >+# ('Linux', 'unused-4-191.brq.redhat.com', '3.12.5-301.fc20.x86_64', '#1 SMP Fri Dec 13 22:33:23 UTC 2013', 'i686') >+ >+ >+ >+# our imports >+from mockbuild.trace_decorator import decorate, traceLog >+import os >+ >+requires_api_version = "1.0" >+ >+# plugin entry point >+decorate(traceLog()) >+def init(rootObj, conf): >+ HostKernel(rootObj, conf) >+ >+# classes >+class HostKernel(object): >+ """dumps out host kernel version""" >+ decorate(traceLog()) >+ def __init__(self, rootObj, conf): >+ self.rootObj = rootObj >+ rootObj.addHook("prebuild", self._host_kernel) >+ >+ decorate(traceLog()) >+ def _host_kernel(self): >+ outputversion = "Outputting version of host Kernel" >+ self.rootObj.start(outputversion) >+ >+ out_file = os.path.join(self.rootObj.resultdir, 'host_kernel') >+ >+ fo = open(out_file, "w") >+ fo.write(str(os.uname())) >+ fo.close >+ >+ self.rootObj.finish(outputversion) >diff --git a/py/mockbuild/util.py b/py/mockbuild/util.py >index d21dad2..7570de1 100644 >--- a/py/mockbuild/util.py >+++ b/py/mockbuild/util.py >@@ -500,7 +500,7 @@ def setup_default_config_opts(unprivUid, version, pkgpythondir): > # after that, any plugins that must create dirs (yum_cache) > # any plugins without preinit hooks should be last. > config_opts['plugins'] = ['tmpfs', 'root_cache', 'yum_cache', 'bind_mount', 'ccache', 'selinux', >- 'package_state', 'chroot_scan'] >+ 'package_state', 'host_kernel', 'chroot_scan'] > config_opts['plugin_dir'] = os.path.join(pkgpythondir, "plugins") > config_opts['plugin_conf'] = { > 'ccache_enable': True, >@@ -544,6 +544,8 @@ def setup_default_config_opts(unprivUid, version, pkgpythondir): > 'selinux_opts': {}, > 'package_state_enable' : True, > 'package_state_opts' : {}, >+ 'host_kernel_enable' : True, >+ 'host_kernel_opts' : {}, > 'chroot_scan_enable': False, > 'chroot_scan_opts': { 'regexes' : [ > "\\bcore(\\.\\d+)?$", >-- >1.8.4.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1048826
: 846049