# A way to apply the gentoo kernel patchset to pf-sources?

## as.gentoo

Hello,

since sys-kernel/pf-sources is an "unsupported kernel package" the gentoo kernel patchset is not applied (right?).

What would have to be done to do that on a manual way?

A script like

```
apply_gentoo_patches.sh /usr/src/<kernel_source>
```

doesn't exist, does it?

I really need the functionality of tuxonice. The sys-kernel/tuxonice-4.5.4 package seems to be the latest in the portage-tree. Since sys-kernel/pf-sources-4.8_p8 is more recent and contains the tuxonice functionality and some more goodies (e.g. for gaming) I think this would be the best choice for me.

What should I do to switch from gentoo-sources to pf-sources?

I read https://forums.gentoo.org/viewtopic-t-1029336-highlight-tuxonice+patch.html but I really can't read any way to go in there.

----------

## 188562

With this, you can apply any patch to any kernel source. Sad but true - these features are not interested in almost anyone.

----------

## Juippisi

I made my own pf-sources ebuild since it wasnt being updated in main portage for a long time. I just added 

```
SRC_URI="${KERNEL_URI} ${PF_URI}

   http://kerneldedup.org/download/uksm/${UKSMV}/uksm-${UKSMV}-for-v${PV/_p*/}.patch

   https://dev.gentoo.org/~mpagano/genpatches/trunk/${PV/_p*/}/1500_XATTR_USER_PREFIX.patch"

```

to any gentoo patches I wanted. Then, 

```

src_prepare(){

   epatch "${DISTDIR}/${PF_FILE}"

   epatch "${DISTDIR}/1500_XATTR_USER_PREFIX.patch"

   if use uksm ; then

      epatch "${DISTDIR}/uksm-${UKSMV}-for-v${PV/_p*/}.patch"

   fi

```

I didnt want to download the experimental.tar.gz patch set, since BFQ is already applied in pf-sources, so I thought I'd bring troubles. 

But yeah, there might be an easier way. You could maybe try updating geek-sources ebuild manually...?

----------

## as.gentoo

 *Juippisi wrote:*   

> You could maybe try updating geek-sources ebuild manually...?

 The author of geek-sources just wrote above. Maybe he's the better address fo updating the ebuilds.  :Wink: 

----------

## as.gentoo

 *init_6 wrote:*   

> With this, you can apply any patch to any kernel source. Sad but true - these features are not interested in almost anyone.

 Thanks for those links! I have two questions:

Why is BFS commented out in the latest ebuild geek-sources-4.2? Is that a "selecting" patches and avoiding USE flags, kind of a personalised ebuild?

PF and LQX would partly apply the same or similar(?) patches (BFQ). Is that the reason why pf doesn't appear in the ebuild but here: https://github.com/init6/init_6/blob/97eb614b1b148dc4092d5de21aee588efaa66995/README.md (the other link you sent)? As far as I can see there is no xor statement(s) regarding USE flags.

----------

## 188562

 *Quote:*   

> Why is BFS commented out in the latest ebuild geek-sources-4.2?

 

All patch{sets} get default pach URl/file name from eclass.

In some ebuild`s version sometimes need change URL or file name.

 *Quote:*   

> PF and LQX would partly apply the same or similar(?) patches (BFQ)

 

USE="pf" apply PF USE="lqx" apply LQX patchest.

 *Quote:*   

> As far as I can see there is no xor statement(s) regarding USE flags

 

All logic defined in wiki Read it.

----------

