# Where's ck-sources-r4?

## charlieg

The latest ck-sources in portage is r2, which emerges linux-2.6.7-ck2, and is 2 versions behind the latest ck-sources, linux-2.6.7-ck4.

I want ck4 because that has staircase 7.8 rather than 7.4 or 7.7 which have known issues (7.4) and is slower (7.7).

----------

## AliceDiee

Just copy the 2.6.7-r2 ebuild to your overlay and rename it to ck-sources-2.6.7-r4.ebuild.

----------

## charlieg

 *AliceDiee wrote:*   

> Just copy the 2.6.7-r2 ebuild to your overlay and rename it to ck-sources-2.6.7-r4.ebuild.

 

Doesn't work.  These kinda ebuilds are very, very patch sensitive.  The patches in ck2 are not completely the same as in ck4, hence the above approach fails.

----------

## markfl

 *charlieg wrote:*   

>  *AliceDiee wrote:*   Just copy the 2.6.7-r2 ebuild to your overlay and rename it to ck-sources-2.6.7-r4.ebuild. 
> 
> Doesn't work.  These kinda ebuilds are very, very patch sensitive.  The patches in ck2 are not completely the same as in ck4, hence the above approach fails.

 

There's your answer maybe. The new versions might be pretty hard to write an ebuild for so maybe it still in progress.

Mark

----------

## nxsty

Try this!

http://snigel.no-ip.com/~nxsty/ck-sources-2.6.7-r4.ebuild

----------

## yuza

Renaming the ebuild worked here when i I installed ck4 some days ago...

----------

## garyd9

Just copying the ebuild (and renaming) to the overlay directory does NOT work.  Here's what I had to do to get this to work (this all assumes that your accepting ~x86 for ck-sources):

```

cp /usr/portage/sys-kernel/ck-sources/ck-sources-2.6.7-r2.ebuild /usr/local/portage/sys-kernel/ck-sources/ck-sources-2.6.7-r4.ebuild

emerge -f =ck-sources-2.6.7-r2

cp /usr/portage/sys-kernel/ck-sources/files /usr/local/portage/sys-kernel/ck-sources/files

emerge -v =ck-sources-2.6.7-r2

```

----------

## teilo

You could alway try patching manually.

I am using mm6-ck4 right now.

Get the patches here: http://ck.kolivas.org/patches/2.6/2.6.7/

----------

## wrc1944

I just got an email from Con ( I was mentioning what I thought was a typo on the mm6 staircase7.8 patch still being named mm5), and I also asked him about reiser4 not being in his recent work, as I'm running a pure reiser4 box with Redeeman and my own kernels. Here's the reply.

"Lately the nightly reiser4 patches have been quite unstable, and only 

work with the vm changes that go into -mm so I'm going to hold off for a 

while."

Cheers,

Con

I guess when reiser4 becomes final, he'll add it back to his patch set.

wrc1944

----------

## fallow

wrc1944...that answer explains my troubles with swap and  reiser4 . thanks for this  :Smile: 

btw. staircase 7.9 is out

----------

## swimmer

 *garyd9 wrote:*   

> Just copying the ebuild (and renaming) to the overlay directory does NOT work.  Here's what I had to do to get this to work (this all assumes that your accepting ~x86 for ck-sources):
> 
> ```
> 
> cp /usr/portage/sys-kernel/ck-sources/ck-sources-2.6.7-r2.ebuild /usr/local/portage/sys-kernel/ck-sources/ck-sources-2.6.7-r4.ebuild
> ...

 

You simply forgot one step between the copy of the ebuild and the emerge  :Wink: 

```
cd /usr/local/portage/sys-kernel/ck-sources/

ebuild ck-sources-2.6.7-r4.ebuild digest
```

HTH

swimmer

----------

## Halcy0n

All you need to do is copy the ebuild and rename it, it works fine.  There are no patches applied inside the ebuild besides the one it download's off of Con's site.  Try the following: 

```
cp /usr/portage/sys-kernel/ck-sources/ck-sources-2.6.7-r2.ebuild /usr/local/portage/sys-kernel/ck-sources/ck-sources-2.6.7-r4.ebuild

ebuild /usr/local/portage/sys-kernel/ck-sources/ck-sources-2.6.7-r4.ebuild digest
```

----------

## Halcy0n

You might want to change the -r4 to an -r5 in my previous comment, since ck5 is now out  :Smile: 

----------

## charlieg

 *nxsty wrote:*   

> Try this!
> 
> http://snigel.no-ip.com/~nxsty/ck-sources-2.6.7-r4.ebuild

 

That ebuild didn't work.  However, I had a look at it, saw what you were doing, and basically used the same method to create a working r4 ebuild and that emerged fine.

----------

## charlieg

 *HaLCy0n wrote:*   

> You might want to change the -r4 to an -r5 in my previous comment, since ck5 is now out 

 

Yeah, did do, and working well.  :Smile: 

----------

## kerframil

 *Quote:*   

> There's your answer maybe. The new versions might be pretty hard to write an ebuild for so maybe it still in progress.

 

On the contrary, it is incredibly trivial to write a kernel ebuild (due largely in part to the kernel-2.eclass). The problems that a few may have encountered are likely due to supplemental patches being applied by Gentoo which are no longer relevant in later releases of the patchset concerned.

For example, I recently suggested to Con that he might consider including very important security fixes in his patchset due to its popularity and because not everyone uses distributions like Gentoo which have good mechanisms to contend with these issues. As of -ck5 he has done exactly that, and incorporated three security patches (see the recent GLSA) which were actually taken directly from genpatches (the repository of patches which goes into gentoo-dev-sources, hardened sources and others).

So, simply renaming the old -r2 ebuild to -r5 is not going to work; the -r2 ebuild applies an iptables DoS fix which is now included in -ck5 anyway. In situations like these the solution is simply to remove the offending patch from UNIPATCH_LIST. Here's a quote of a post I made recently to the mailing list which should shed more light on the matter:

```

> I'm on gentoo here, and just copied the ck2 ebuild to ck5, and it missed

> on a patch called ck-sources-2.6.IPTables-RDoS.  Any idea what this is,

> and is it already in?

Change:

UNIPATCH_LIST="${DISTDIR}/patch-${KV}.bz2

${FILESDIR}/${PN}-2.6.IPTables-RDoS.patch"

To:

UNIPATCH_LIST="${DISTDIR}/patch-${KV}.bz2"

It is already in -ck5, just by a different name.
```

Furthermore, I've filed a bug request to have the sources bumped. In general this approach is more likely to yield a successful update in portage, I suspect  :Wink: 

----------

## beandog

 *teilo wrote:*   

> You could alway try patching manually.
> 
> I am using mm6-ck4 right now.
> 
> Get the patches here: http://ck.kolivas.org/patches/2.6/2.6.7/

 

How do you do that anyway?  I always get nervous patching things manually ... <sheepish>

----------

## wrc1944

Place both the patches (.bz2) in the linux-2.6.7 directory.

Then for the mm patch, do:

bunzip2 -dc 2.6.7-mm6.bz2 | patch -p1

Then do the correct ck patch (the one for -mm6) the same way. (The -p option is usually -p1 with mm and ck patches, but might vary with others, like the Redeeman reiser4 patch is now -p3). If the patch is a .tar.gz type, you would use gunzip.

Then do "make mrproper," and and continue on with make xconfig, and a regular kernel compile.

wrc1944

----------

## wrc1944

Sorry- forgot to mention you have to cd into the linux-2.6.7 directory first, before you patch. You don't have to put the patches in the kernel directory, but then you have to type in the full path to the patch every time. Seems simpler just to make it a habit of putting them there.

----------

## teilo

 *wrc1944 wrote:*   

> 
> 
> Then do "make mrproper," and and continue on with make xconfig, and a regular kernel compile.
> 
> wrc1944

 

I do not recommend ever doing a "make mrproper", unless you really feel like reconfiguring your kernel from scratch. mrproper erases your .config.

A much better way: copy your old .config into the newly patched linux src directory, and do a "make oldconfig".

Anyway, to further answer the original question: Con does not release a single pach for MM sources. Instead, he includes a few separate patches which add his own CPU scheduler and vm updates.

The complete patching procedure involves the following:

1) Start with a clean 2.6.x codebase. If in doubt, download the latest sources, and untar to /usr/src.

2) Patch to the current mm. The above instructions will work.

3) Obtain the various patches from Con's website. Read the "series" text file. This lists the order in which you need to apply the patches. Some of the patches have a .diff extension. Some do not.

The basic command to apply these patches (one at a time), from inside your /usr/src/linux-2.6.x directory is:

```
patch -p1 < patchname
```

Personally, I prefer to store all my patches in a /usr/src subdirectory. In this case, all my patches are in /usr/src/mm6-ck4.

In this case, the command would be as follows:

```
cd /usr/src/linux-2.6.7

patch -p1 < ../mm6-ck4/patchname
```

----------

## wrc1944

Teilo,

I was in a hurry, and left a few things out, as I kind assumed he knew how to compile kernels and was only asking about patching, and knew about keeping a copy of his config files, etc. Your additional more in-depth info should get him going for sure.

Personally, I always do make mrproper after patching, to clean up, as I have    many kernels and copies of my generic config file for each box I'm on at the time. I never compile in /usr/src, but always in /home/wrc/linux-xxx, as user, then su to do make modules_install and copy bzImage to kernel-whatever.

It's more convenient for me that way, as I'm constantly testing many kernels.

I also never use make oldconfig anymore- for me, it's much easier just to do make xconfig or menuconfig, and load my generic hardware-specific config file, and make minor adjustments then. Sometimes, I might just edit my generic text config file first, then load it, save, and compile. Of course for those new to kernel compiling, and not familiar with what all the options are, that may not be the easiest method. 

I guess the bottom line is that there are many variations and methods to arrive at the same place, and as long as it works and is convenient, it's the "correct" method for you.

wrc1944

----------

## ed0n

Yes, Con's right (this time too), reiser4 is being unstable lately. 

In the -cko patchset there is a reiser4 patch which for unknown reason makes reiser4 crush after some cpu load I think. Reiser4 users that like con's work, I suggest the latest autosnapshot from namesys which applies from mm4 (and mm5 I think), and patch the con's work including staircase  :Smile:  .

----------

## kerframil

I'm not usually of the habit of pimping other posts, but if anyone is interested in desktop related performance issues and the 2.6 kernel I would very much appreciate it if they could have a look at this thread and consider helping out. Many thanks.

----------

