Failed to backport from from Linux 4.4 drivers to Linux 3.10.108
I am trying to backport from Linux 4.4 drivers to Linux 3.10.108 with backports.
These are my commands.
----
$ cd ~/git $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
$ cd ~/git $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git $ cd linux-stable $ git checkout v3.10.108
$ cd ~/git $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git $ cd backports $ git checkout linux-4.4.y $ ./gentree.py --copy-list ./copy-list --integrate --clean --git-revision v4.4 ~/git/linux-next ~/git/linux-stable ----
The gentree.py command resulted in these messages.
----
Get original source files from git ...
Applying patches from patches to /home/honma/git/linux-stable/backports/ ... Failed to process SmPL patch collateral-evolutions/network/0027-genl-const/genl-const.cocci Traceback (most recent call last):
File "./gentree.py", line 1091, in <module>
ret = _main()
File "./gentree.py", line 724, in _main
logwrite=logwrite)
File "./gentree.py", line 906, in process
apply_patches(args, "backport", source_dir, 'patches',
bpid.target_dir, logwrite)
File "./gentree.py", line 605, in apply_patches
raise Exception('SmPL patch failed')
Exception: SmPL patch failed
----
Is this caused by my invalid procedure ?
If so, please tell me right way.
Regards,
Masashi Honma.
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 1 line · Masashi Honma
I am trying to backport from Linux 4.4
This will probably not work unless you use an old backports git tree snapshot.
Quoted 13 lines
The
gentree.pycommand resulted in these messages.
----
Get original source files from git ...
Applying patches from patches to/home/honma/git/linux-stable/backports/... Failed to process SmPL patchcollateral-evolutions/network/0027-genl-const/genl-const.cocciTraceback (most recent call last):File "./gentree.py", line 1091, in <module> ret = _main() File "./gentree.py", line 724, in _main logwrite=logwrite) File "./gentree.py", line 906, in process apply_patches(args, "backport", source_dir, 'patches',
Quoted 4 lines
bpid.target_dir, logwrite)
File "./gentree.py", line 605, inapply_patches
raise Exception('SmPL patch failed')
Exception: SmPL patch failed
Then again, this shouldn't happen.
Quoted 2 lines
Is this caused by my invalid procedure ?
If so, please tell me right way.
No, looks fine - perhaps your spatch version isn't right? What version do you have, and what does it say if you run
mkdir /tmp/xyz && spatch --sp-file .../genl-const.cocci --dir /tmp/xyz
or something like that?
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 5 lines · Johannes Berg
Quoted 1 line · Masashi Honma
I am trying to backport from Linux 4.4
This will probably not work unless you use an old backports git tree snapshot.
Thank you.
I am using linux-4.4.y branch of backports.
Do you mean older branch (like linux-4.2.y or linux-3.19.y or something) should be used ?
Quoted 2 lines
No, looks fine - perhaps your spatch version isn't right? What version do you have,
I am using a spatch binary build with latest git source because the package is not enough fresh to build the backports. The version is this.
commit f9d474787c57f1d3cc3a73217e0f5d14ed958631
Author: julia <[email protected]> Date: Mon Apr 30 08:10:06 2018 +0200
make pragmas more flexible, improve positioning of eoln when pragma
at the end of a file
Quoted 5 lines
and what does it say if you run
mkdir
/tmp/xyz&& spatch --sp-file.../genl-const.cocci--dir/tmp/xyzor something like that?
This is the result.
------------------
$ mkdir /tmp/xyz && spatch --sp-file ./patches/collateral-evolutions/network/0027-genl-const/genl-const.cocci --dir /tmp/xyz init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h meta: parse error: File "./patches/collateral-evolutions/network/0027-genl-const/genl-const.cocci", line 2, column 10, charpos = 13 around = '__genl_const', whole content = attribute __genl_const; ------------------
Regards,
Masashi Honma.
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 3 lines · Masashi Honma
I am using linux-4.4.y branch of backports.
Do you mean older branch (like linux-4.2.y or linux-3.19.y or something) should be used ?
No, that should be OK then.
Quoted 22 lines
Quoted 2 lines
No, looks fine - perhaps your spatch version isn't right? What version do you have,
I am using a spatch binary build with latest git source because the package is not enough fresh to build the backports. The version is this.
commit
f9d474787c57f1d3cc3a73217e0f5d14ed958631Author: julia <[email protected]> Date: Mon Apr 30 08:10:06 2018 +0200make pragmas more flexible, improve positioning of eoln when pragma
at the end of a fileQuoted 5 lines
and what does it say if you run
mkdir
/tmp/xyz&& spatch --sp-file.../genl-const.cocci--dir/tmp/xyzor something like that?
This is the result.
------------------
Quoted 11 lines
$ mkdir /tmp/xyz && spatch --sp-file ./patches/collateral-evolutions/network/0027-genl-const/genl-const.cocci --dir /tmp/xyz init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h meta: parse error: File "./patches/collateral-evolutions/network/0027-genl-const/genl-const.cocci", line 2, column 10, charpos = 13 around = '__genl_const', whole content = attribute __genl_const; ------------------
Yeah, thought so. You actually need to change the syntax here a bit, I don't remember but you can search the mailing list here for the details. Look for "Parse error with genl-const.cocci".
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 3 lines · Johannes Berg
Yeah, thought so. You actually need to change the syntax here a bit, I don't remember but you can search the mailing list here for the details. Look for "Parse error with
genl-const.cocci".
Thank you.
It looks regression of latest(1.0.6+) coccinelle.
This works with coccinelle 1.0.4.
Regards,
Masashi Honma.
--
To unsubscribe from this list: send the line "unsubscribe backports" in
On 2018/05/09 06:42, Masashi Honma wrote:> It looks regression of latest(1.0.6+) coccinelle.
Quoted 1 line
This works with coccinelle 1.0.4.
I asked about this to coccinelle.
https://github.com/coccinelle/coccinelle/issues/135
julia says this notation is deprecated from 1.0.6.
@@
attribute __genl_const;
@@
from 1.0.6, "name" field is required.
@@
attribute name __genl_const;
@@
The coccinelle made a backward incompatible change...
Regards,
Masashi Honma.
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 14 lines · Masashi Honma
On 2018/05/09 06:42, Masashi Honma wrote:> It looks regression of latest(1.0.6+) coccinelle.
Quoted 1 line
This works with coccinelle 1.0.4.
I asked about this to coccinelle.
https://github.com/coccinelle/coccinelle/issues/135
julia says this notation is deprecated from 1.0.6.
@@
attribute__genl_const;
@@
Quoted 7 lines
from 1.0.6, "name" field is required.
@@
attribute name__genl_const;
@@The coccinelle made a backward incompatible change...
Yes, I'm aware.
Just don't know how to solve it :)
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 21 lines · Johannes Berg
Quoted 20 lines · Masashi Honma
On 2018/05/09 06:42, Masashi Honma wrote:> It looks regression of latest(1.0.6+) coccinelle.
Quoted 1 line
This works with coccinelle 1.0.4.
I asked about this to coccinelle.
https://github.com/coccinelle/coccinelle/issues/135
julia says this notation is deprecated from 1.0.6.
@@
attribute__genl_const;
@@from 1.0.6, "name" field is required.
@@
attribute name__genl_const;
@@
Quoted 5 lines
Quoted 1 line
The coccinelle made a backward incompatible change...
Yes, I'm aware.
Just don't know how to solve it :)
Actually, since 1.0.6 has hit the distros, I'll just solve it by requiring 1.0.6 and changing the spatch.
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 2 lines · Johannes Berg
Actually, since 1.0.6 has hit the distros, I'll just solve it by requiring 1.0.6 and changing the spatch.
Great !
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 3 lines · Masashi Honma
Quoted 2 lines · Johannes Berg
Actually, since 1.0.6 has hit the distros, I'll just solve it by requiring 1.0.6 and changing the spatch.
Though of course this doesn't apply to the older branches :)
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 1 line · Johannes Berg
Though of course this doesn't apply to the older branches :)
How about setting upper limitation to the older branches by attached patch ?
Masashi Honma.
lib/bpreqs.py +3 -2
@@ -190,10 +190,11 @@ class Req: sys.stdout.write("Try installing the package: %s\n" % package_hint) return False def coccinelle(self, version): - if self.require_version('spatch', '--version', version, 2, self.linux_version_cmp): + if self.linux_version_cmp('1.0.6', self.req_get_prog_version('spatch', '--version', 2)) == -1 and \ + self.require_version('spatch', '--version', version, 2, self.linux_version_cmp): return True sys.stdout.write("Try installing the package: coccinelle\n") - sys.stdout.write("If that is too old go grab the code from source:\n\n") + sys.stdout.write("If that is less than " + version + " or more than 1.0.6 go grab the code from source:\n\n") sys.stdout.write("git clone https://github.com/coccinelle/coccinelle.git\n\n") sys.stdout.write("To build you will need: ocaml ncurses-devel\n\n") sys.stdout.write("If on SUSE / OpenSUSE you will also need: ocaml-ocamldoc\n\n")
Quoted 4 lines · Masashi Honma
Quoted 1 line · Johannes Berg
Though of course this doesn't apply to the older branches :)
How about setting upper limitation to the older branches by attached patch ?
We could also cherry-pick my trivial patch to the older branches I guess. That'd still be simpler?
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
2018/5/9 18:03 Johannes Berg <[email protected]>:
Quoted 5 lines
We could also cherry-pick my trivial patch to the older branches I guess. That'd still be simpler?
Oh, you already have a plan.
Then drop my plan.
Masashi Honma.
Quoted 2 lines · Johannes Berg
We could also cherry-pick my trivial patch to the older branches I guess. That'd still be simpler?
Oh, you already have a plan.
Then drop my plan.
Masashi Honma.
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 6 lines · Masashi Honma
Quoted 2 lines · Johannes Berg
We could also cherry-pick my trivial patch to the older branches I guess. That'd still be simpler?
Oh, you already have a plan.
Then drop my plan.
Well, I wasn't really planning on doing it, but I could? :)
I guess it's easy enough though.
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 11 lines · Johannes Berg
Quoted 6 lines · Masashi Honma
Quoted 2 lines · Johannes Berg
We could also cherry-pick my trivial patch to the older branches I guess. That'd still be simpler?
Oh, you already have a plan.
Then drop my plan.Well, I wasn't really planning on doing it, but I could? :)
I guess it's easy enough though.
That'd be my vote.
I haven't looked at the docs in a long time - do we note a minimum required version of coccinelle?
- Steve
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 13 lines · Steve deRosier
Quoted 9 lines · Johannes Berg
Quoted 6 lines · Masashi Honma
Quoted 2 lines · Johannes Berg
We could also cherry-pick my trivial patch to the older branches I guess. That'd still be simpler?
Oh, you already have a plan.
Then drop my plan.Well, I wasn't really planning on doing it, but I could? :)
Quoted 7 lines
Quoted 1 line
I guess it's easy enough though.
That'd be my vote.
I haven't looked at the docs in a long time - do we note a minimum required version of coccinelle?
Do we have docs :-p Anyway, the gentree script checks the spatch version and seems Johannes already took care of the script as well [1]
Gr. AvS
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 3 lines · Arend van Spriel
Do we have docs :-p Anyway, the gentree script checks the spatch version and seems Johannes already took care of the script as well [1]
Yeah I didn't apply it to any other branches though.
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in