[RFC PATCH] Switch to including config-* instead of kernel-*.config
by Jarod Wilson
The attached patch switches the kernel rpm over from including the
current static kernel-*.config files to instead including the config-*
files that are actually in cvs.
It means we don't leave kernel-*.config droppings all over the place
(following a rebase, its entirely too easy to end up with
kernel-2.6.21-*.config and kernel-2.6.22-*.config files laying about,
which can sometimes cause odd things to happen), and we don't modify
SOURCE files in %prep (see bug 232602), which could otherwise result in
repacking an srpm with the same n-v-r with different kernel-*.config
files. As a bonus, along the way, this cleans up a number of rpmlint
warnings (though there are still a TON to poke at).
In the future, this would also make life easier for the RHEL6 and later
maintainers, as we typically prefer config changes against the config-*
files, rather than against the kernel-*.config files, but (most) non-rh
folks don't have cvs access to get at the config-* files right now.
Thus far, the only real downside is that it requires moving all the
config-* files up to the root of the kernel cvs dir, which is 1) a bit
messy and 2) results in losing prior versioning history on those files,
since cvs blows.
(For the record, I've also done a number of successful builds w/this
patch now.)
Comments appreciated!
--
Jarod Wilson
jwilson(a)redhat.com
16 years, 8 months
2.6.22 rebase.
by Dave Jones
Last night/this morning, I've rebased FC6 and F7 CVS to 2.6.22
There are a few things worth mentioning.
* I neglected to note that Xen still built from kernel/
in FC-6. kernel-xen was only F-7 aparently.
As it would have likely needed decoupling anyway, I'll
leave the Xen team to fix this in kernel-xen in whatever
manner they see fit.
* nouveau needs rebasing. Ajax?
Not sure where to pull that from right now.
(add url to scripts/pull-upstreams.sh)
* No idea just how solid the wireless stuff is right now.
I picked up whatever we had in rawhide as of yesterday,
so it's "shiny and new", but for all I know that could
translate to "shiny and broken".
* Some of the experimental bits (like tickless), I've left enabled
right now. Depending on how things look from the first round
of testing will decide whether we keep it on for release.
* There's a bunch of 'new bits' scheduled for .23 that we had in
rawhide at the time of rebase that I feel are "ready", and make
for nice bonus goodies. So there's CFS and cpuidle in there too
for good measure.
As always, RPMs will appear on http://people.redhat.com/davej/ periodically.
(right now just F7/rawhide, but I'll see if I have enough quota to
squeeze FC6 there too).
When will they hit updates-testing?
I anticipate we'll do a couple of builds before it goes out just to work
out the really stupid bugs, but hopefully in the next few days.
Dave
--
http://www.codemonkey.org.uk
16 years, 8 months
how kernel distinguish threads
by Feng Xian
Hi, I am working on a project about reducing page faults of multi-threaded
programs. I am using latest Fedora core (Linux 2.6) and pthread library. In
this project, each user-level thread (created by pthread_create() function)
needs to pass a value to the task structure in the kernel which corresponds
to the thread. The first step is getting a unique id of the task structure
of each thread. But what is this unique id?
I tried to use getpid() to get the process id of each thread and use it as
unique id. But this didnt work out since all threads in a process share the
same pid. I tried to use the thread_id returned by pthread_create() function
but this id is meaningless to the kernel. Could anyone help me out on this?
Thanks!
--
Addr: 1025N, 23rd str, APT 33,
Lincoln, NE, 68503
Phone: (402)310-9826
WWW: cse.unl.edu/~fxian
16 years, 8 months
Kernel rpm versioning changes
by Jarod Wilson
Okay, here's the first draft of spec changes to alter the kernel rpm
version and release fields to more closely match what the actual
upstream kernel base is. Its heavily commented at the moment to try to
explain what's going on.
The basic approach is this:
1st fedora build of 2.6.21.5:
kernel-2.6.21.5-1.fc7
2nd fedora build of 2.6.21.5:
kernel-2.6.21.5-2.fc7
1st fedora build of 2.6.22-rc6-git3:
kernel-2.6.22-0.rc6.git3.1.fc8
2nd fedora build of 2.6.22-rc7:
kernel-2.6.22-0.rc7.2.fc8
...and so on. Added bonus on rc/git builds: you set the rc and git
revisions near the top of the spec, and the needed patches are
automagically generated in the right place.
At least from spectool's point of view, I've got this working perfectly
from the generated n-v-r standpoint for all of the above combos and then
some. A test build of kernel-2.6.22-0.rc7.1.fc8 just finished building
with one error, which I've traced the source of -- debug files come from
the source tree, which is still versioned with the base kernel version.
This should be fixed in the attached diff, but the build is still
underway to verify that. Regardless of that, I'd like some feedback
before going much further down the current path. Everything between
"hey, that looks good!" and "what in the blue hell are you thinking?"
welcomed. :) (Even better if you have suggestions for improvement).
--
Jarod Wilson
jwilson(a)redhat.com
16 years, 9 months
spec hacks for vanilla and git-based kernel rpm builds
by Roland McGrath
Here I am again with those hacks to do alternate builds from the kernel
spec file. Can I commit at least the spec parts to rawhide now?
The diff is only this:
--- kernel-2.6.spec 08 Jun 2007 12:55:12 -0700 1.3213
+++ kernel-2.6.spec 08 Jun 2007 12:55:05 -0700
@@ -63,7 +63,8 @@ Summary: The Linux kernel (the core of t
%define sublevel 21
%define kversion 2.6.%{sublevel}
%define rpmversion 2.6.%{sublevel}
-%define release %(R="$Revision: 1.3213 $"; RR="${R##: }"; echo ${RR%%?})%{?dist}%{?buildid}
+%define specrelease %(R="$Revision: 1.3213 $"; RR="${R##: }"; echo ${RR%%?})%{?dist}%{?buildid}
+%define release %{specrelease}
%define make_target bzImage
%define kernel_image x86
@@ -76,6 +77,24 @@ Summary: The Linux kernel (the core of t
%define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE}
%define hdrarch %_target_cpu
+%if 0%{!?nopatches:1}
+%define nopatches 0
+%endif
+
+%if %{nopatches}
+%define includexen 0
+%define variant -vanilla
+%else
+%define variant_fedora -fedora
+%endif
+
+%define using_upstream_branch 0
+%if 0%{?upstream_branch:1}
+%define using_upstream_branch 1
+%define variant -%{upstream_branch}%{?variant_fedora}
+%define release %{upstream_branch_release}.%{specrelease}
+%endif
+
# if requested, only build base kernel
%if %{with_baseonly}
%define with_smp 0
@@ -248,6 +267,15 @@ Summary: The Linux kernel (the core of t
%define kernel_image vmlinux
%endif
+%if %{nopatches}
+%define with_modsign 0
+# Ignore unknown options in our config-* files.
+# Some options go with patches we're not applying.
+%define oldconfig_target loose_nonint_oldconfig
+%else
+%define oldconfig_target nonint_oldconfig
+%endif
+
# To temporarily exclude an architecture from being built, add it to
# %nobuildarches. Do _NOT_ use the ExclusiveArch: line, because if we
# don't build kernel-headers then the new build system will no longer let
@@ -297,7 +325,7 @@ Summary: The Linux kernel (the core of t
#
%define kernel_prereq fileutils, module-init-tools, initscripts >= 8.11.1-1, mkinitrd >= 6.0.9-1
-Name: kernel
+Name: kernel%{?variant}
Group: System Environment/Kernel
License: GPLv2
Version: %{rpmversion}
@@ -332,7 +360,9 @@ BuildPreReq: bzip2, findutils, gzip, m4,
BuildPreReq: gnupg
%endif
BuildRequires: gcc >= 3.4.2, binutils >= 2.12, redhat-rpm-config
+%if %{usesparse}
BuildRequires: sparse >= 0.3
+%endif
BuildConflicts: rhbuildsys(DiskFree) < 500Mb
@@ -380,7 +410,16 @@ Source80: config-rhel-generic
Source81: config-rhel-x86-generic
Source82: config-olpc-generic
+%if %{using_upstream_branch}
+### BRANCH PATCH ###
+%else
+# Here should be only the patches up to the upstream canonical Linus tree.
Patch00: patch-2.6.22-rc4.bz2
+%endif
+
+%if !%{nopatches}
+
+# Patches 10 through 99 are for things that are going upstream really soon.
Patch10: linux-2.6-utrace.patch
Patch20: nouveau-drm.patch
Patch30: linux-2.6-sysrq-c.patch
@@ -849,10 +888,16 @@ ApplyPatch()
patch -p1 -F1 -s < $RPM_SOURCE_DIR/$1
}
+%if %{using_upstream_branch}
+### BRANCH APPLY ###
+%else
# Update to latest upstream.
bzcat $RPM_SOURCE_DIR/patch-2.6.22-rc4.bz2 | patch -p1 -F1 -s
+%endif
+%if !%{nopatches}
+
# Patches 10 through 100 are meant for core subsystem upgrades
# Roland's utrace ptrace replacement.
@@ -895,12 +940,14 @@ ApplyPatch linux-2.6-pmac-zilog.patch
#
# Bugfixes to the core system and patches related to how RPMs are build
#
+%endif
# This patch adds a "make nonint_oldconfig" which is non-interactive and
# also gives a list of missing options at the end. Useful for automated
# builds (as used in the buildsystem).
-ApplyPatch linux-2.6-build-nonintconfig.patch
+ApplyPatch linux-2.6.17-build-nonintconfig.patch
+%if !%{nopatches}
# Exec shield
ApplyPatch linux-2.6-execshield.patch
@@ -1076,6 +1123,7 @@ ApplyPatch linux-2.6-warnings-emptymacro
ApplyPatch linux-2.6-warnings-register.patch
# END OF PATCH APPLICATIONS
+%endif
cp %{SOURCE10} Documentation/
@@ -1098,7 +1146,7 @@ for i in *.config
do
mv $i .config
Arch=`head -1 .config | cut -b 3-`
- make ARCH=$Arch nonint_oldconfig > /dev/null
+ make ARCH=$Arch %{oldconfig_target} > /dev/null
echo "# $Arch" > configs/$i
cat .config >> configs/$i
done
@@ -1184,7 +1232,7 @@ BuildKernel() {
KernelImage=arch/$Arch/boot/bzImage
fi
- make -s ARCH=$Arch nonint_oldconfig > /dev/null
+ make -s ARCH=$Arch %{oldconfig_target} > /dev/null
make -s ARCH=$Arch %{?_smp_mflags} $MakeTarget %{?sparse_mflags}
make -s ARCH=$Arch %{?_smp_mflags} modules %{?sparse_mflags} || exit 1
16 years, 9 months