summaryrefslogtreecommitdiff
path: root/gentree.py
AgeCommit message (Collapse)Author
2014-01-18gentree: create *.tar.gz instead of *.tar.bz for kernel.orgbackports-20131224-2Hauke Mehrtens
kernel.org does not support bzip2 any more, use gzip instead. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2014-01-18gentree: combine spatches (unless using --gitdebug)Johannes Berg
Since spatch is rather slow, but can handle multiple spatches concatenated in a single file, just do that and run it only once rather than for each spatch. That shaves off some of the runtime (startup etc. and finding affected files.) On my system, I go from real 9m42.616s user 8m48.352s sys 0m22.884s to real 9m1.948s user 8m40.108s sys 0m12.088s Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2013-10-31backports: replace netlink portid by semantic patchJohannes Berg
Introduce the infrastructure to apply semantic patches and make use of it for the (frequently breaking) portid patch for netlink. Unfortunately this is significantly slower: before: real 0m14.312s user 0m12.144s sys 0m1.784s after: real 0m25.932s user 0m21.768s sys 0m2.932s Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2013-10-28gentree.py: add v as prefix for stable folder nameHauke Mehrtens
The folder name did not started with an v. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2013-10-28genlib: add missing slash to korg_path for stableHauke Mehrtens
Without this slash it wants to use the directory /backportsstable/ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2013-10-21gentree.py: add ending slash to upload pathHauke Mehrtens
the filename in kup put should end with a slash otherwise it tried to overwrite this file. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2013-10-21gentree.py: log kup command before executingHauke Mehrtens
Add a logging of the next command to be executed. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2013-10-21gentree.py: fix directory creatingHauke Mehrtens
The full path has to be provided not just the new directory to create. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2013-10-21gentree.py: do not add full path into tarHauke Mehrtens
dir_to_tar could be the absolute path to the directory to to tar, but we do not want the full patch in the tar, just the basename. In addition the second close is not necessary. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2013-10-21gentree.py: add kernel upload supportLuis R. Rodriguez
This streamlines our release process making it easier for transitioning releases onto other backport developers. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
2013-10-21lib/bpgit.py: enable extra arguments on git describeLuis R. Rodriguez
This lets us throw at it whatever extra stuff we want. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
2013-07-29backports: enable kconfig language on dependencies fileLuis R. Rodriguez
Certain complex features that are backported may be be limitted to a certain target build configuration. An example can be if a backported feature is not yet backported with support for lockdep. In order to avoid build failures with these types of restrictions allow for specifying build configuration dependencies on backported upstream kconfig symbols other than just kernel versioning contstraints. This adds support for specifying upstream kconfig constaints other than kernel versioning by adding kconfig language extensions on the dependencies file. This will update the copied over upstream Kconfig file for the symbol specified with the kconfig constraints specified. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
2013-07-23backport: disable unused automatic backportsJohannes Berg
When an automatic backport isn't included due to not being used (see commit 6e0475b599217eceb8e01a1e572c, "gentree: add automatic backports only if needed"), selecting BACKPORT_USERSEL_BUILD_ALL will make the build fail. Avoid this by disabling such symbols in the Kconfig. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
2013-06-05gentree/git-tracker: make python 3 compatibleJohannes Berg
Make the python scripting compatible with python 3 (as tested with python 3.3). The patch library was a bit tricky. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
2013-05-28backport: move kconfig code to "kconf" directoryJohannes Berg
Having the kconfig code in a directory called "kconfig" and having a file called "Kconfig" causes issues if the code is ever stored on a case-insensitive filesystem. Avoid these by just calling the kconfig directory kconf instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
2013-05-28Revert "backport: move kconfig code to "kconf" directory"Luis R. Rodriguez
I failed to see v2 patch. This reverts commit 7f1b4e0258ade60670cf60f2bd46996005843cea.
2013-05-28backport: move kconfig code to "kconf" directoryJohannes Berg
Having the kconfig code in a directory called "kconfig" and having a file called "Kconfig" causes issues if the code is ever stored on a case-insensitive filesystem. Avoid these by just calling the kconfig directory kconf instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
2013-05-17gentree: refuse patches creating filesJohannes Berg
This doesn't make sense since we'd have no way of knowing when such a patch should be applied. Right now the patch would be ignored, but make it extra obvious and error out on such patches. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-05-08gentree.py: keep patch headers for patch refreshLuis R. Rodriguez
Without this change we were removing patch headers when refreshing patches. Cc: techtonik@gmail.com Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-05-08python support: rename git library to bpgitJohannes Berg
There's a python git library, and our name conflicts with it since it's also just called "git". I want to use the python library (optionally) to speed up the git accesses so this is now relevant. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-22backports: support make clean/mrproperJohannes Berg
The kernel's "make clean" will recurse into subdirectories, even into those that aren't enabled in Kconfig. Thus, the previous trick of changing symbols from CONFIG_* to IMPOSSIBLE_* doesn't work any more. Change this to comment out the lines instead and then support "make clean" and "make mrproper". Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-16gentree: fix typo in ignore list handlingJohannes Berg
We don't want to compare the second-to-last letter with a two-character string, that'll never be true anyway ... It should compare the last two letters. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-15backports: move header filesJohannes Berg
This first step in reorganising the header files moves all the header files into a new backport-include/ directory that gets priority over the regular include/ where we copy the files we want to backport from the kernel. This will help split all the header files into logical units. While at it, move and rename compat_2.6.h and compat_autoconf.h to backport/backport.h and backport/autoconf.h respectively. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-13gentree.py: add support to explicitly disable a configLuis R. Rodriguez
At times we may want to disable a config option completely. Add support for this. All you have to is list the config on the depdependencies file with DISABLE instead of a kernel version. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-13backports: add support for backport_srctreeLuis R. Rodriguez
The Linux kernel uses srctree to help prefix header files and scripts. When backporting we want to be able to override driver's Makefiles' usage of srctree with our own. Since we can't easily and sanely override the srctree itself without causing a lot of issues just use the python generator to do the change for us on the target Makefiles. This addresses the srctree usage case and where ccflags was used without prefixing any parent directory when used with drivers, the kernel tends to fix that with addtree command. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> [also remove now unnecessary patches] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-10backports: add udev rules if required for backported firmware_classLuis R. Rodriguez
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-10backports: add blacklist module supportLuis R. Rodriguez
This lets us provide a simple map of new drivers and old drivers that it replaces at install time. This generates a blacklist via the file: /etc/modprobe.d/backports.conf Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-09git tracker: add special version string to buildJohannes Berg
In output trees created with the git tracker, we avoid changing the "versions" file all the time and just put "(see git)" into the versions. However, it's useful to still be able to identify it, and when using this the backport is (usually) built in the git tree. Use this fact and add the git tree commit into a new variable to put it into the MODULE_VERSION and also print it at runtime. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08gentree: add automatic backports only if neededJohannes Berg
If the automatic backports aren't selected by any driver then they don't need to be added to the output, so ignore them in that case. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08gentree: make automatic backport filenames uniqueJohannes Berg
Instead of copying drivers/base/hdmi.c to just hdmi.c copy it to drivers-base-hdmi.c as there can be multiple files with the same name (e.g. "core.c"). While at it, also fix this mechanism for modules -- before having more than a single file for a module would have caused multiple modules which clearly can't work, now it's needed to give a #module-name and it will be added to the Makefile correctly. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-06gentree: apply patches on by oneJohannes Berg
Instead of trying to infer the directory structure, which was only used for verbose output and the git debug option, just apply the patches on by one in the correct order. Also warn if finding a .patch file that doesn't contain a patch, just in case the patch library doesn't understand some patches properly, for debugging purposes mostly. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-06gentree: only apply .patch filesJohannes Berg
This helps not have to ignore any other random editor backup files etc. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-05gentree: add ability to create automatic backportsJohannes Berg
Instead of manually copying code like HDMI and dma-buf, add the ability to just specify such backports in the Kconfig file for compat. This will then always update to the lastest code as well. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-05gentree: fix rename bug in --git-revision optionJohannes Berg
The --git-revision option didn't handle file/dir renames correctly, fix that. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-05gentree: fix file copying bugJohannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-05gentree: add -p option to diff when refreshing patchesJohannes Berg
This generally makes patches more readable to humans and has no impact on the tools. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-05gentree: fix describe version bugJohannes Berg
With the --git-revision option, that revision needs to be used for the output version, not 'HEAD'. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-04git tracker: override versions fileJohannes Berg
Otherwise it keeps changing. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2013-04-04gentree: fix bug in version file writingJohannes Berg
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2013-04-04add .gitignore to output directoryJohannes Berg
When using the git-tracker, this is very useful. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2013-04-04gentree: remove pointless codeJohannes Berg
There's no need to join a path with nothing ... Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2013-04-04gentree: make lib directory a python moduleJohannes Berg
That will make it easier to use gentree and/or git helpers from other scripts. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2013-04-04build: add defconfig filesJohannes Berg
This enables users to more easily select the driver that they need, and us to ship default configurations that we prefer for that driver. Add iwlwifi as the first example. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2013-04-03gentree: make output configurableJohannes Berg
It might not always have to go to stdout, so make a function to print it and use that. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2013-04-03gentree: fix return codeJohannes Berg
The recent shuffling broke the return value, return it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2013-04-03correct makefile/kconfig manglingJohannes Berg
Due to reordering the steps, the makefile and kconfig mangling needs to be changed a bit, make it more robust. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2013-04-03gentree: change to make external use possibleJohannes Berg
Change the scripting a bit to make it possible to import the gentree script as a module to call it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2013-04-03hard-code list of backport filesJohannes Berg
This avoids accidentally copying files that are in the local, possibly dirty, working directory. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2013-04-02add comments, small fixesJohannes Berg
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2013-04-02add the ability to include ALXJohannes Berg
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>