* I don't understand what goes where, very confused about POM-ng @ 2004-05-05 17:14 Martijn Lievaart 2004-05-05 18:00 ` Martijn Lievaart 2004-05-05 18:33 ` Jozsef Kadlecsik 0 siblings, 2 replies; 5+ messages in thread From: Martijn Lievaart @ 2004-05-05 17:14 UTC (permalink / raw) To: Netfilter Developers List Hi, Using CVS of today 5/5/2004. I'm trying to port the psd match to 2.6. The C code is ready (not much of a change needed). However POM will not apply the headerfile from the linux/ tree, I need to copy it to the linux-2.6 tree. I would expect that everything in the linux tree would also be applied, eventually overridden by something in the linux-2.6 tree. Why else have seperate linux-2.4 trees? By now I gather that POM-ng tries to find a best match, and does this independently for the ladds and the files (and the patches as well?). I find this very confusing, but I think this is by design? Anyhow, I looked at a couple of other patches and many have their header file only in the linux-tree. Many are also base, so probably already applied to any 2.6 kernel, but the why have a linux-2.6 tree in that case? One patch where this really breaks is the XOR patch, it does not apply to 2.6 because POM-ng does not copy the header. As an alternative, would it be possible to just create a linux-2.6.patch file that applies after the 2.4 patch has applied? This would be a good solution because many patches need only minor modifications to newly added files (especially only ipt_xxx.c) to make them run under 2.6. TIA, Martijn Lievaart ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: I don't understand what goes where, very confused about POM-ng 2004-05-05 17:14 I don't understand what goes where, very confused about POM-ng Martijn Lievaart @ 2004-05-05 18:00 ` Martijn Lievaart 2004-05-05 18:33 ` Jozsef Kadlecsik 1 sibling, 0 replies; 5+ messages in thread From: Martijn Lievaart @ 2004-05-05 18:00 UTC (permalink / raw) To: Martijn Lievaart; +Cc: Netfilter Developers List Martijn Lievaart wrote: > As an alternative, would it be possible to just create a > linux-2.6.patch file that applies after the 2.4 patch has applied? > This would be a good solution because many patches need only minor > modifications to newly added files (especially only ipt_xxx.c) to make > them run under 2.6. Damn, that does not work. The test before applying fails because the new file is not there yet. Seems like a nice feature to add though, but that would require a lot of trickery I think. Regards, Martijn Lievaart ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: I don't understand what goes where, very confused about POM-ng 2004-05-05 17:14 I don't understand what goes where, very confused about POM-ng Martijn Lievaart 2004-05-05 18:00 ` Martijn Lievaart @ 2004-05-05 18:33 ` Jozsef Kadlecsik 2004-05-05 19:28 ` Martijn Lievaart 1 sibling, 1 reply; 5+ messages in thread From: Jozsef Kadlecsik @ 2004-05-05 18:33 UTC (permalink / raw) To: Martijn Lievaart; +Cc: Netfilter Developers List Hi Martijn, On Wed, 5 May 2004, Martijn Lievaart wrote: > Using CVS of today 5/5/2004. > > I'm trying to port the psd match to 2.6. The C code is ready (not much > of a change needed). However POM will not apply the headerfile from the > linux/ tree, I need to copy it to the linux-2.6 tree. I would expect > that everything in the linux tree would also be applied, eventually > overridden by something in the linux-2.6 tree. Why else have seperate > linux-2.4 trees? No, every tree is for their own version(s) and they must contain everything which is needed for a patch to be complete installed. The reason for this is that there can be missing/added files in different kernel trees. For example how could a program figure out in the case linux/include/linux/netfilter_foo.h linux/include/linux/netfilter_bar.h linux-2.6/include/linux/netfilter_foo.h that linux/include/linux/netfilter_bar.h is required for linux-2.6 or not? > By now I gather that POM-ng tries to find a best match, and does this > independently for the ladds and the files (and the patches as well?). I > find this very confusing, but I think this is by design? Yes, this is by design. Or call it a feature :-). > Anyhow, I looked at a couple of other patches and many have their header > file only in the linux-tree. Many are also base, so probably already > applied to any 2.6 kernel, but the why have a linux-2.6 tree in that > case? One patch where this really breaks is the XOR patch, it does not > apply to 2.6 because POM-ng does not copy the header. Then those patches are broken in pom-ng and have to be fixed. > As an alternative, would it be possible to just create a linux-2.6.patch > file that applies after the 2.4 patch has applied? This would be a good > solution because many patches need only minor modifications to newly > added files (especially only ipt_xxx.c) to make them run under 2.6. No, that won't go either. What should we do when linux-2.7 comes out and from some reason there are 2.4, 2.6 versions supported? Should the linux-2.7.patch depend on linux-2.4.patch and linux-2.6.patch then? I believe the current behaviour is the most simple and straightforward: every three contains everything which is required. No cross-dependency. No magic between trees. Simpler pom scripts. Also, we support broken out patches. How could that fitted into other designs easily? I hope that helps and makes pom-ng clear. Best regards, Jozsef - E-mail : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt Address : KFKI Research Institute for Particle and Nuclear Physics H-1525 Budapest 114, POB. 49, Hungary ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: I don't understand what goes where, very confused about POM-ng 2004-05-05 18:33 ` Jozsef Kadlecsik @ 2004-05-05 19:28 ` Martijn Lievaart 2004-05-05 21:19 ` Jozsef Kadlecsik 0 siblings, 1 reply; 5+ messages in thread From: Martijn Lievaart @ 2004-05-05 19:28 UTC (permalink / raw) To: Netfilter Developers List; +Cc: Jozsef Kadlecsik Jozsef Kadlecsik wrote: >Hi Martijn, > > Hi, thanks for taking the time to answer my questions. >On Wed, 5 May 2004, Martijn Lievaart wrote: > > > >>Using CVS of today 5/5/2004. >> >>I'm trying to port the psd match to 2.6. The C code is ready (not much >>of a change needed). However POM will not apply the headerfile from the >>linux/ tree, I need to copy it to the linux-2.6 tree. I would expect >>that everything in the linux tree would also be applied, eventually >>overridden by something in the linux-2.6 tree. Why else have seperate >>linux-2.4 trees? >> >> > >No, every tree is for their own version(s) and they must contain >everything which is needed for a patch to be complete installed. The >reason for this is that there can be missing/added files in different >kernel trees. For example how could a program figure out in the case > > linux/include/linux/netfilter_foo.h > linux/include/linux/netfilter_bar.h > > linux-2.6/include/linux/netfilter_foo.h > >that linux/include/linux/netfilter_bar.h is required for linux-2.6 or not? > > > Well, there are also linux-2.4 trees. So at first sight it would seem that linux-<version>/ is specific to that version and plain linux/ is for any version. But it seemes the linux/ is a synonym for linux-2.4 right? >>By now I gather that POM-ng tries to find a best match, and does this >>independently for the ladds and the files (and the patches as well?). I >>find this very confusing, but I think this is by design? >> >> > >Yes, this is by design. Or call it a feature :-). > > Confusing, but I see the value, yes. > > >>Anyhow, I looked at a couple of other patches and many have their header >>file only in the linux-tree. Many are also base, so probably already >>applied to any 2.6 kernel, but the why have a linux-2.6 tree in that >>case? One patch where this really breaks is the XOR patch, it does not >>apply to 2.6 because POM-ng does not copy the header. >> >> > >Then those patches are broken in pom-ng and have to be fixed. > > Clear. Someone, please copy XOR/linux/include/linux/netfilter_ipv4/ipt_XOR.h to XOR/linux-2.6/include/linux/netfilter_ipv4/ipt_XOR.h in CVS. >>As an alternative, would it be possible to just create a linux-2.6.patch >>file that applies after the 2.4 patch has applied? This would be a good >>solution because many patches need only minor modifications to newly >>added files (especially only ipt_xxx.c) to make them run under 2.6. >> >> > >No, that won't go either. What should we do when linux-2.7 comes out and >from some reason there are 2.4, 2.6 versions supported? Should the >linux-2.7.patch depend on linux-2.4.patch and linux-2.6.patch then? > > Not what I ment, but never mind. If I can find time I'll express it in code and submit it. >I believe the current behaviour is the most simple and straightforward: >every three contains everything which is required. No cross-dependency. >No magic between trees. Simpler pom scripts. Also, we support broken out >patches. How could that fitted into other designs easily? > > > It makes maintenance of the patches more difficult, you have exactly the same files multiple times, because only one or a few from a set are different. And those that are different are often only different in a few lines. Having a way to say "for 2.6, copy this file from linux-2.4, then patch with this patchfile" (or vice versa for those that are on 2.6) seems a nice feature. But I can live without it. Thanks, Martijn Lievaart ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: I don't understand what goes where, very confused about POM-ng 2004-05-05 19:28 ` Martijn Lievaart @ 2004-05-05 21:19 ` Jozsef Kadlecsik 0 siblings, 0 replies; 5+ messages in thread From: Jozsef Kadlecsik @ 2004-05-05 21:19 UTC (permalink / raw) To: Martijn Lievaart; +Cc: Netfilter Developers List On Wed, 5 May 2004, Martijn Lievaart wrote: > Well, there are also linux-2.4 trees. So at first sight it would seem > that linux-<version>/ is specific to that version and plain linux/ is > for any version. But it seemes the linux/ is a synonym for linux-2.4 right? No, that's a catch-all for all versions not matched by any linux-x.x directories (same for linux.patch). But practically, yes. :-) README.newpatches is a little bit terse, probably... The logic behind the version matching is as follows: First, we have got branches (see the config) file. A branch is a collection of versions where theoretically a single patch is always applicable for all versions in the branch. For linux kernel trees, currently we have got two branches: linux-2.4.x and linux-2.6.x (linux-2.5.x not supported). If we want to patch a kernel by pom, then the kernel version must be in one of the branches otherwise the kernel is not supported by pom, and additionally the oldest kernel patch in the updates directory for the given branch gives us the oldest supported kernel in that branch. There might be that even in a branch, there are kernel releases which requires different patch versions of a patch. So when matching a patch with the kernel we want to patch, the biggest smaller or equal patch version than the kernel version wins. Let's see an example: kernel versions we want to patch are from 2.4.27 to 2.4.31, but patch versions we have got are linux.patch, linux-2.4.28.patch and linux-2.4.30.patch. Then the result of the matching is kernel version matched patch version linux-2.4.27 linux.patch linux-2.4.28 linux-2.4.28.patch linux-2.4.29 linux-2.4.28.patch linux-2.4.30 linux-2.4.30.patch linux-2.4.31 linux-2.4.30.patch Patches from different branches are of course exluded as candidates from the matching. When searching for the best match, the patch candidate must also fulfil the version requirements specified for it in the info file. Just to cite the example from README.newpatches: if we have got linux.patch and linux-2.4.25.patch where the latter is valid for kernel 2.4.25 only, but linux.patch can be applied for kernels before and after 2.4.25 too, then one must specify the following in the info file: Requires: linux-2.4.25.patch == 2.4.25 Otherwise linux-2.4.25.patch would match kernels >= 2.4.25 as well. The same version matching logic is applied for the directory tree with the ladds/whole-files. pom supports multiple projects, like linux kernel tree and iptables source tree patches stored in the same pom. Of course the version matching logic is valid for all projects. The updates directory handled in a special way: patches are implicitly dependent from all the previous patches in the same branch. All patches for a branch are applicable for any project version matching the branch and have got equal or greater version than the oldest patch for the branch in the updates directory. > Clear. Someone, please copy > XOR/linux/include/linux/netfilter_ipv4/ipt_XOR.h to > XOR/linux-2.6/include/linux/netfilter_ipv4/ipt_XOR.h in CVS. OK, I'll do that. Best regards, Jozsef - E-mail : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt Address : KFKI Research Institute for Particle and Nuclear Physics H-1525 Budapest 114, POB. 49, Hungary ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-05-05 21:19 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2004-05-05 17:14 I don't understand what goes where, very confused about POM-ng Martijn Lievaart 2004-05-05 18:00 ` Martijn Lievaart 2004-05-05 18:33 ` Jozsef Kadlecsik 2004-05-05 19:28 ` Martijn Lievaart 2004-05-05 21:19 ` Jozsef Kadlecsik
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.