kernel posttrans and preun hooks for other packages
by Matt Domsch
https://bugzilla.redhat.com/show_bug.cgi?id=433121
DKMS would like to have the opportunity to run it's
auto-rebuilder/installer after a new kernel RPM has been installed,
without having to wait for a system restart to run it. Likewise, when
a kernel RPM is removed, it would like to be able to run to remove
modules managed by it.
Debian kernels intentionally run scripts located in
/etc/kernel/postinst.d/ following new kernel package installation,
/etc/kernel/prerm.d/ before kernel package removal. DKMS drops a
script into these directories, to perform the appropriate actions.
I want Fedora and RHEL kernels to do likewise. Patch attached.
This patch implements the same interface as that used for Debian and
Ubuntu kernels. The scripts are invoked with $1 = kernel version, and
$2 = path to vmlinuz file. (DKMS doesn't need $2, but I'm keeping the
interface the same to match so people can reuse their scriptlets.)
--
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux
--- kernel.spec.orig 2008-02-15 21:06:33.000000000 -0600
+++ kernel.spec 2008-02-16 00:07:36.000000000 -0600
@@ -1610,11 +1610,35 @@
%{nil}
#
+# This macro defines a %%posttrans script for a kernel package.
+# %%kernel_variant_posttrans [-v <subpackage>] [-s <s> -r <r>] <mkinitrd-args>
+# More text can follow to go at the end of this variant's %%posttrans.
+#
+%define kernel_variant_posttrans(v:) \
+%{expand:%%posttrans %{?-v*}}\
+for d in /etc/kernel/postinst.d /etc/kernel/postinst.d/%{KVERREL}%{?-v*} ; do \
+ if [ -d "${d}" ]; then \
+ for f in $(ls ${d}/); do \
+ [ -x "${d}/${f}" ] && "${d}/${f}" %{KVERREL}%{?-v*} /boot/vmlinuz-%{KVERREL}%{?-v*} \
+ done \
+ fi \
+done \
+exit 0\
+%{nil}
+
+#
# This macro defines a %%preun script for a kernel package.
# %%kernel_variant_preun <subpackage>
#
%define kernel_variant_preun() \
%{expand:%%preun %{?1}}\
+for d in /etc/kernel/prerm.d /etc/kernel/prerm.d/%{KVERREL}%{?1} ; do \
+ if [ -d "${d}" ]; then \
+ for f in $(ls ${d}/); do \
+ [ -x "${d}/${f}" ] && "${d}/${f}" %{KVERREL}%{?1} /boot/vmlinuz-%{KVERREL}%{?1} \
+ done \
+ fi \
+done \
/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}%{?1} || exit $?\
#if [ -x /sbin/weak-modules ]\
#then\
@@ -1624,12 +1648,15 @@
%kernel_variant_preun
%kernel_variant_post -s kernel-smp -r kernel
+%kernel_variant_posttrans
%kernel_variant_preun smp
%kernel_variant_post -v smp
+%kernel_variant_posttrans -v smp
%kernel_variant_preun PAE
%kernel_variant_post -v PAE -s kernel-smp -r kernel-PAE
+%kernel_variant_posttrans -v PAE
%kernel_variant_preun debug
%kernel_variant_post -v debug
@@ -1644,6 +1671,8 @@
/sbin/ldconfig -X || exit $?
fi
+%kernel_variant_posttrans -v xen
+
###
### file lists
###
15 years, 2 months
enable CONFIG_SECURITY_MMAP_MIN_ADDR
by Eric Paris
Looks like rawhide kernels now have the CONFIG_SECURITY_MMAP_MIN_ADDR
Kconfig option. In the past I tried to get this enabled by default
using sysctl, a fedora kernel patch, and now I've got the Kconfig option
in the upstream kernel. Lets set this equal to 65536. I've been
running with this setting on my F8 laptop for some time and haven't seen
any problems (although I do know that dosemu may be an issue for both of
the people in the world who use it, there also may be some virt issues
that I don't know about but which can be very quickly and easily sorted
out)
This sysctl hardens the kernel against null pointer bugs. Remember the
priv escalation that was all the news last weekend? Not an issue with
this enabled!
http://www.avertlabs.com/research/blog/index.php/2008/02/13/analyzing-the...
-Eric
15 years, 2 months
[PATCH] lguest: fix undefined asm-offsets symbols
by Kyle McMartin
lguest uses asm-offsets to generate ... offsets, obviously, for use
in the lguest switcher code. When the hypervisor code is built as a
module though, the asm offsets it needs won't be generated since
CONFIG_LGUEST will be undefined.
Signed-off-by: Kyle McMartin <kmcmartin(a)redhat.com>
---
diff --git a/arch/x86/kernel/asm-offsets_32.c b/arch/x86/kernel/asm-offsets_32.c
index a33d530..44bafdd 100644
--- a/arch/x86/kernel/asm-offsets_32.c
+++ b/arch/x86/kernel/asm-offsets_32.c
@@ -134,7 +134,7 @@ void foo(void)
OFFSET(LGUEST_DATA_pgdir, lguest_data, pgdir);
#endif
-#ifdef CONFIG_LGUEST
+#if defined(CONFIG_LGUEST) || defined(CONFIG_LGUEST_MODULE)
BLANK();
OFFSET(LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc);
OFFSET(LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc);
15 years, 3 months
vfat filesystem "fix" breaks rpm kernel install on ia64
by Doug Chapman
A recent kernel change has change the behavior of chmod on fat
filesystems:
commit 19c561a60ffe52df88dd63de0bff480ca094efe4
Author: Jan Engelhardt <jengelh(a)computergmbh.de>
Date: Wed Feb 6 01:36:08 2008 -0800
fs/fat/: refine chmod checks
After this change rpm installs of kernels fail on ia64. This is because
efi systems use vfat for the boot filesystem. RPM installs fail because
cpio gets a error on chmod (before this kernel change it would fail
silently).
My suggestion was to have anaconda set the "quiet" option (which makes
chmod failures silent) for /boot/efi in fstab however they disagree (see
BZ 435319).
So, it seems like the options are: revert the patch (probably not a good
idea) make "quiet" the default for fat filesystems, or, convince
anaconda to add "quiet" to the fstab. Or, hopefully someone else has a
better idea.
thanks,
- Doug
15 years, 3 months
kernel renames wlan to eth
by Adam Pribyl
I am just wondering what is going on with all this device names renaming.
hostap always used to use wlanX device names.. but well in F8 this is some
kind of different - at least on SMP system, the kernel asks for device
wlan0 to be renamed to eth1. I thought it is udev magic, so I played with
70-persistent-net.rules, but it has no efect. Then I tried the udevmonitor
and I see:
UEVENT[1203878535.039740] add /module/hostap (module)
UDEV [1203878535.042915] add /module/hostap (module)
UEVENT[1203878535.057209] add /module/hostap_pci (module)
UEVENT[1203878535.057845] add /bus/pci/drivers/hostap_pci (drivers)
UEVENT[1203878535.058343] add /class/net/wifi1 (net)
UDEV [1203878535.066578] add /bus/pci/drivers/hostap_pci (drivers)
UDEV [1203878535.069191] add /module/hostap_pci (module)
UDEV [1203878535.212557] add /class/net/wifi1 (net)
UEVENT[1203878535.269178] add /class/net/wlan0 (net)
UEVENT[1203878535.278823] move /class/net/eth1 (net)
UDEV [1203878539.946245] add /class/net/eth1 (net)
UDEV [1203878539.994233] move /class/net/eth1 (net)
So this has nothing to do with udev, it's kernel who is asking for device
to be renamed. But why?
Some details: http://forums.fedoraforum.org/showthread.php?p=968699
Adam Pribyl
15 years, 3 months
Winning Notification!!!
by Mrs.Deborah Smith
23/02/08
Ref: 435062725
Batch: 7050470902/189
Winning no: GB8101/LPRC
CONGRATULATIONS!!
We are delighted to inform you of your prize which was released on the 5th of january 2008, from the UK International Lottery programme,which
is fully based on an electronic selection of winners using their e-mail addresses from search engines. Your email address was attached to ticket
number; 47001725 07056490102 and serial number 7741134002. This batch drew the lucky numbers as follows 5-13-33-37-42 and bonus number
17,which consequently won you the lottery in the second category.
You are hereby approved a sum of US$1,300,000 (ONE MILLION THREE HUNDREDTHOUSAND DOLLARS) in cash credited to file ref:
ILP/HW 47509/09 from the total cash prize shared amongst eight lucky winners in this category.All participants were selected through a
computer balloting system drawn from a total of Nine hundred thousand E-mail addresses fromCanada,Australia,United States, Asia, Europe,
Middle East, Africa and Oceania as part of our international promotion program which is conducted annually. This Lottery was promoted and
sponsored by a conglomorate of some multinational companies as part of their social responsibility to the citizens in the communities where they
have an operational base.Furthermore, your details(e-mail address) falls within our UK representative office as indicated in your play coupon and
your prize of US$1,300,000(ONE MILLION THREE HUNDRED THOUSAND DOLLARS) will be released to you from this regional branch
office in the UK. We hope you will participate in our end of year high stakes for US$1.3 Billion
international draw.
HOW TO CLAIM YOUR PRIZE: Simply contact our fiducial agent,Mr Savvidez to file your claim .Please quote your reference, batch and
winning numbers which can be found on the top left corner of this notification in other to help in processing your winnings immediately. For
security reasons, we advice all winners to keep their winning information confidential from the public until your claim is processed and released
to you.This is part of our security measures we adopt,in other to avoid double claims and unwarranted abuse to this prestigious programme.
Note: You are advised to contact your fudiciary agent/processing officer as soon as you receive this notification.Failure to act expeditely
might render your winnings as Unclaimed and eventually directed to charity organisations.This is part of our rules/regulations in preventing
double claims by some unscrupolous elements. Please contact Mr Savvidez for a
directive on how to redeem your prize via email at
Mr.Walter Savvidez
Email:savvidezwalter2007@yahoo.fr
Once again congratulations from all staffs and members of this programe.
Yours Faithfully,
Mrs.Deborah Smith
15 years, 3 months
Reliable software only!
by Francisco Baird
Need some software urgently? Purchase, download and install right now! Software in English, German, French, Italian, and Spanish for IBM PC and Macintosh! Cheap prices give you the possibility to save or buy more software than you can afford purchasing software on a CD!
Buy software and be sure our professional customer support team will help to install it. Be also sure, if some problem occurs and your software does not run, we give your money back. You also will be able to do all the updates.
http://geocities.com/i_bruce
Check our site for discounts!
15 years, 3 months
Re: rpms/kernel/devel kernel.spec,1.445,1.446
by Dave Jones
On Thu, Feb 21, 2008 at 01:08:19PM -0500, Peter Jones wrote:
> Author: pjones
>
> Update of /cvs/extras/rpms/kernel/devel
> In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30850
>
> Modified Files:
> kernel.spec
> Log Message:
> * Thu Feb 21 2008 Peter Jones <pjones(a)redhat.com>
> - Require newer mkinitrd version.
Bah. Given rawhide has been perpetually fscked for months on end,
a lot of us have been running the F9 kernel on F8. This change breaks that
unless we --nodeps.
Any chance you can backport that mkinitrd to F8 ?
Dave
--
http://www.codemonkey.org.uk
15 years, 3 months