]> www.infradead.org Git - users/dedekind/aiaiai.git/log
users/dedekind/aiaiai.git
7 years agoaiaiai-test-patchset: Ignore checkpatch's CONST_STRUCT master
Florian Fainelli [Fri, 6 Oct 2017 21:48:07 +0000 (14:48 -0700)]
aiaiai-test-patchset: Ignore checkpatch's CONST_STRUCT

checkpatch.pl can generate a ton of false positive warnings when used
with CONST_STRUCT, so ignore those warnings to make its output useful
again.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agotest-patchset: Make a copy of const_structs.checkpatch
Daniel Thompson [Thu, 5 Oct 2017 21:33:57 +0000 (22:33 +0100)]
test-patchset: Make a copy of const_structs.checkpatch

Currently aiaiai issues the following warning for each patch under test
because recent versions of checkpatch look for a list of structures in
scripts/const_structs.checkpatch .

This patch fixes the problem by copying out the extra file (if one is
found).

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
7 years agoREADME: Provide an example hook script
Florian Fainelli [Wed, 14 Jun 2017 17:57:29 +0000 (10:57 -0700)]
README: Provide an example hook script

Provide a simple hook script that just looks at the X-Aiaiai-Project
header that could be added, with e.g:

git format-patch --add-header="X-Aiaiai-Project: foo" while formatting
patches.

This is enough to avoid per-project email addresses.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
8 years agoREADME: Improve my-email-lda script
Florian Fainelli [Wed, 12 Apr 2017 20:54:21 +0000 (13:54 -0700)]
README: Improve my-email-lda script

In case someone may want to simply copy/paste the example, make that
possible by providing the necessary shebang and properly quote the log
file argument.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
8 years agoREADME: Explain how email delivery works wrt. projects
Florian Fainelli [Wed, 12 Apr 2017 20:54:22 +0000 (13:54 -0700)]
README: Explain how email delivery works wrt. projects

Without looking at the code, it may not be entirely obvious that we may
need a custom hook just to print X-Aiaiai-Project and avoid the need for
per-project email addresses.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
8 years agoaiaiai: Include User=aiaiai in services files
Florian Fainelli [Wed, 12 Apr 2017 20:54:23 +0000 (13:54 -0700)]
aiaiai: Include User=aiaiai in services files

Most installations will certainly run with the aiaiai username for
simplicity so make these files copy/pastable into an existing
distribution's systemd directory.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
8 years agopackaging: Add a .gitignore file
Florian Fainelli [Wed, 12 Apr 2017 20:54:24 +0000 (13:54 -0700)]
packaging: Add a .gitignore file

Ignore *.tar.bz2 and *.rpm in preparation for subsequent changes.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
8 years agopackaging: Add a "rpm" make target
Florian Fainelli [Wed, 12 Apr 2017 20:54:25 +0000 (13:54 -0700)]
packaging: Add a "rpm" make target

It requires the tarball to be created and will create a source RPM in
the current directory.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
8 years agoemail: protect output of subject_m in quotes
Jacob Keller [Wed, 22 Jun 2016 17:55:52 +0000 (10:55 -0700)]
email: protect output of subject_m in quotes

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agoaiaiai-email-test-patchset: notify admin when patches can't find base
Jacob Keller [Wed, 26 Aug 2015 20:54:06 +0000 (13:54 -0700)]
aiaiai-email-test-patchset: notify admin when patches can't find base

Also notify the administrator of aiaiai when a user's patch gets
rejected by the hook.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agoaiaiai-email-lda: allow reaping of series directories
Jacob Keller [Wed, 26 Aug 2015 01:04:22 +0000 (18:04 -0700)]
aiaiai-email-lda: allow reaping of series directories

reap_old did not remove series directories, because "rm -f" does not
remove directories. However, adding just "-r" to the rm command results
in extraneous "directory does not exist" because find will be searching
more than one depth. Change reap_old to have a max depth of 1 so that it
doesn't descend into directories and will happily remove series
directories created inside of queue.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agoemail-lda: use git-apply to more accurately find patch emails
Jacob Keller [Wed, 26 Aug 2015 01:00:06 +0000 (18:00 -0700)]
email-lda: use git-apply to more accurately find patch emails

Instead of using the subject as the sole arbiter of whether an email
contains a patch, reject all emails which cannot be recognized by
git-apply. In this way, we can locate even patches with non-standard
subject lines. Use the subject line to differentiate between patch
series and individual patches when possible.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agoautodetect-project: limit search to nearest annotated tag
Jacob Keller [Tue, 25 Aug 2015 23:31:22 +0000 (16:31 -0700)]
autodetect-project: limit search to nearest annotated tag

This patch limits the search for patching patch-id commits to only check
commits since the most recent tag. This works well for the Linux kernel,
as we only worry about exact resubmissions of recent work, that may have
been applied before aiaiai could test it. This may not work for all
projects, and probably some sort of configurable setting should be
created.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agoaiaiai: don't check patch-id for revisions with no diff
Jacob Keller [Mon, 17 Aug 2015 09:30:59 +0000 (02:30 -0700)]
aiaiai: don't check patch-id for revisions with no diff

Mostly merges, but some other revisions may not include a diff so we
should skip these revisions when we check for equivalent patch ids.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agoaiaiai: document reap_archive and reap_incomplete
Jacob Keller [Fri, 14 Aug 2015 22:21:02 +0000 (15:21 -0700)]
aiaiai: document reap_archive and reap_incomplete

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agoaiaiai: specify rev-list to correctly list revisions
Jacob Keller [Fri, 14 Aug 2015 22:12:34 +0000 (15:12 -0700)]
aiaiai: specify rev-list to correctly list revisions

Fix a typo aiaiai-email-autodetect-project to specify rev-list command
along with branch name rather than just the branch name.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agoaiaiai: use correct backref numbers for $m and $n
Jacob Keller [Fri, 14 Aug 2015 21:59:40 +0000 (14:59 -0700)]
aiaiai: use correct backref numbers for $m and $n

Fix subject handling of X/n patches which incorrectly pulled the subject
out using the wrong prefix.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Fixes: 3531d588c7f4 ("aiaiai-email-sh-functions: allow patches without PATCH prefix")
9 years agoemail: update message on autodetect project failure
Jacob Keller [Tue, 11 Aug 2015 23:09:34 +0000 (16:09 -0700)]
email: update message on autodetect project failure

Update the message so that it is more clear why git-find-base fails
generally. The most common case is patches based on work which is not
yet applied by the maintainer. The previous message did not make this
clear, and thus users were confused.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agoemail: skip applied patches in autodetect project
Jacob Keller [Tue, 11 Aug 2015 23:07:14 +0000 (16:07 -0700)]
email: skip applied patches in autodetect project

Update the project autodetection hook to use git-patch-id to search for
patches which have already been applied. This helps ensure that patches
which have already been applied to the "branch_base" are skipped with a
different warning message. Otherwise, git-find-base will not work for
these patches, and they will be sent a more confusing message.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agosend-mail-on-failure: specify correct directory
Jacob Keller [Tue, 11 Aug 2015 22:17:48 +0000 (15:17 -0700)]
send-mail-on-failure: specify correct directory

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agoaiaiai-test-patchset: remove leftover 'wait for bisect test' code
Brian Norris [Wed, 5 Aug 2015 15:52:25 +0000 (08:52 -0700)]
aiaiai-test-patchset: remove leftover 'wait for bisect test' code

I didn't notice this code in my first (quick) pass at fixing a race
condition here. Apparently we *were* trying to wait for the bisection
test to complete, but we just weren't doing it at the right time.

Anyway, with the current code, multi-config test runs will fail, since
the second config will have a valid $pid_bisect from the previous
config, meaning we will try to 'wait' again for the same expired
process. The shell doesn't like that, so we fail.

Let's move the bisect process's PID into a function-local context, and
ensure that each config is completely finished before moving to the next
one. So there will be a single, obvious place to wait for the process
completion.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agoaiaiai-test-patchset: sync with bisection test before moving on
Brian Norris [Tue, 4 Aug 2015 23:29:24 +0000 (16:29 -0700)]
aiaiai-test-patchset: sync with bisection test before moving on

For whatever reason (parallelism, I suppose?) we fork the bisectability
test to the background and continue -- we only sync with this test after
all configs are completed. This is bad for a number of reasons.

1. commit 2115f7ff0592 ("aiaiai-test-patchset: optimize disk space")
   introduced a race condition, where we might try to blow away the
   build objects before the bisection test is complete. This is really bad.

2. Theoretically, we could have more than one bisection test forked to
   the background, if there are more than 1 running config. But we
   clobber $pid_bisect every time we run test_configuration(), so we
   effectively only sync with the last one. This is *usually* OK,
   because the prior config can likely complete by the time subsequent
   config(s) complete, but that's still technically a race.

So, let's move the 'wait $pid_bisect' into the test_configuration()
function, to make sure the test is complete before we move to the next
config (and remove the build objects). While this removes a little bit
of parallelism, I suspect that parallelism was unintentional.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agoaiaiai-email-sh-functions: allow patches without PATCH prefix
Jacob Keller [Thu, 16 Jul 2015 00:16:03 +0000 (17:16 -0700)]
aiaiai-email-sh-functions: allow patches without PATCH prefix

Not all patches are submitted with a PATCH prefix. This patch enables
the PATCH prefix to be left out, and hopefully cover more patches in
testing.

Future work should include a more robust way of determining if an email
is a patch that does not rely on the subject format, such as searching
for the diff line.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agoaiaiai: update systemd unit files
Jacob Keller [Wed, 15 Jul 2015 23:31:31 +0000 (16:31 -0700)]
aiaiai: update systemd unit files

The current approach uses user instance of systemd, instead of running
under root's instance with a "User=" blurb. Also add a README file
indicating the purpose of these scripts and service files.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
9 years agoaiaiai-project-update: ignore repos without a path
Jacob Keller [Wed, 15 Jul 2015 23:14:43 +0000 (16:14 -0700)]
aiaiai-project-update: ignore repos without a path

If the repository isn't yet checked out, don't completely fail. Future
TODO is to try and figure out a way to automatically clone the
repository. However, currently repositories are stored per-project and
multiple URLs could end up being used as remotes, which makes it
difficult to determine the right way to clone the repository. In
addition, reverse-lookup of project from path is not really easy to do.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agotest-patchset: Make a copy of the typo dictionary
Daniel Thompson [Fri, 23 Jan 2015 10:09:29 +0000 (10:09 +0000)]
test-patchset: Make a copy of the typo dictionary

Currently aiaiai issues the following warning for each patch under test:
No typos will be found - file '/tmp/aiaiai-test-patchset.32BU/checkpatch/spellin
g.txt': No such file or directory

In fact the problem can even more acute when testing older kernels that do not
have this patch:
  https://lkml.org/lkml/2014/10/22/609

This patch fixes the problem by copying out the typo dictionary if one is
found.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Tested-by: Lee Jones <lee.jones@linaro.org>
10 years agoaiaiai-email-lda: use the References mail header
Robert Jarzmik [Thu, 6 Nov 2014 18:50:28 +0000 (19:50 +0100)]
aiaiai-email-lda: use the References mail header

Aiaiai local mail delivery agent should be able to cope with forwarded
mails, not only git-send-email.

One popular method of forwarding a mail thread is to have it embedded in
a single mulitpart mail in rfc822 format. But this transformation
changes the In-Reply-To: headers into References: headers.

The goal of this patch is to teach aiaiai LDA to understand both
In-Reply-To and References in its mail handling. This enables mail
forwarding.

Jacob:
  Fix up variable quotes in the README example.
  Fix up style for mail headers, and fix a typo.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agoTRIVIAL: fix spacing issue in aiaiai-test-patchset
Jacob Keller [Thu, 13 Nov 2014 18:35:05 +0000 (10:35 -0800)]
TRIVIAL: fix spacing issue in aiaiai-test-patchset

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agoaiaiai-test-patchset: optimize disk space
Robert Jarzmik [Thu, 6 Nov 2014 19:46:50 +0000 (20:46 +0100)]
aiaiai-test-patchset: optimize disk space

When compiling multiple defconfigs, remove the build tree between
each compilation to spare disk space.

In this way the build trees don't accumulate on the disk while
testing the same patchset, and the patchset scales with the
number of defconfigs, which is not limiting the build anymore.

Jacob:
  Honor preserve variable, so that when requested we maintain files.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agoaiaiai: merge development work
Jacob Keller [Thu, 13 Nov 2014 18:27:23 +0000 (10:27 -0800)]
aiaiai: merge development work

The development branch has been stable in my test environment for a
while now. I think now is a good time to get these changes back into
master.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agotest-patchset: add [no] options for each checker
Jacob Keller [Wed, 24 Sep 2014 18:23:15 +0000 (11:23 -0700)]
test-patchset: add [no] options for each checker

Also, enable checkpatch.pl by default unless otherwise disabled. This
fixes a compatibility regression introduced by 33c41203f0c9
("aiaiai-test-patchset: make checkpatch optional like other checkers")
as well as provides disable options for once aiaiai-test-patchset
supports a configuration file.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agoaiaiai-test-patchset: document --checkpatch option
Brian Norris [Thu, 18 Sep 2014 00:08:00 +0000 (17:08 -0700)]
aiaiai-test-patchset: document --checkpatch option

commit 33c41203f0c9 ("aiaiai-test-patchset: make checkpatch optional
like other checkers") added the --checkpatch, and disabled its
functionality by default. The least we can do is document it!

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agoaiaiai-diff-log-helper: spelling
Brian Norris [Thu, 18 Sep 2014 00:07:59 +0000 (17:07 -0700)]
aiaiai-diff-log-helper: spelling

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agoaiaiai: update TODO.txt to include note about randconfig
Jacob Keller [Tue, 9 Sep 2014 21:40:14 +0000 (14:40 -0700)]
aiaiai: update TODO.txt to include note about randconfig

Currently there is no good way to add an attachment to the email, and so
we don't really have a way to add the random configuration as an
attachment. Update the TODO to indicate that we need a solution for this
issue. (Random configurations failures are less useful if we can't show
how to reproduce them in our response email).

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agoaiaiai: test all patches when testing bisection
Jacob Keller [Mon, 8 Sep 2014 23:55:08 +0000 (16:55 -0700)]
aiaiai: test all patches when testing bisection

Instead of only testing until a patch series fails, we should test every
patch. This provides more information, and does not seriously harm the
output. To take advantage of this, we also have to modify our check for
"base commit failed but it is fixed in the first patch". We simply say
that the base commit failed and is fixed as long as the series has no
failures.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agoaiaiai: cleanup display of randconfig builds
Jacob Keller [Mon, 8 Sep 2014 23:53:06 +0000 (16:53 -0700)]
aiaiai: cleanup display of randconfig builds

This patch removes some code attempting to show the random configuration
generated for the build. It does not correctly show up in the email, so
I need to spend some time figuring out where to display the
configuration file.

Additionally, clean up some display about generating the random config
so that we don't see the errors. Also we do a make mrproper to cleanup
any generated files so that builds will be clean when we start.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agoREADME: spelling
Brian Norris [Sun, 7 Sep 2014 06:55:09 +0000 (23:55 -0700)]
README: spelling

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
10 years agotest-patchset: allow proper support for randconfig
Jacob Keller [Thu, 10 Jul 2014 23:36:37 +0000 (16:36 -0700)]
test-patchset: allow proper support for randconfig

Make randconfig pre-generate a configuration so that the pre and post
patch series builds use the same configuration (vs using random configs
each time). In addition, append the random configuration whenever there
is a build diff, so that the user can see.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agolibshell: use a git submodule to track upstream libshell project
Jacob Keller [Wed, 18 Jun 2014 20:43:52 +0000 (13:43 -0700)]
libshell: use a git submodule to track upstream libshell project

Rather than inlining the various libshell code we need, just add a git
submodule pointing to the upstream tree. This makes it easier to manage
changes rather than having to hand merge them. This brings with it
several bug fixes and changes from the upstream project, so may require
some patience to work out any subtle changes.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agoemail-test-configuration: add helper program to debug configuration
Jacob Keller [Tue, 27 May 2014 21:54:02 +0000 (14:54 -0700)]
email-test-configuration: add helper program to debug configuration

This script is very useful for debugging the configuration file. It
takes a snapshot of the environment before and after parse_config and
after each parse_prj_config, and then uses diff to display the output.
This makes it very easy to see if the configuration is being read as
desired. This script has already helped debug an issue in the
shell_ini_config parser.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agoemail-test-patchset: fix typo for the bisectability flag
Jacob Keller [Tue, 27 May 2014 21:51:58 +0000 (14:51 -0700)]
email-test-patchset: fix typo for the bisectability flag

The bisectability flag had a typo, and thus was never getting enabled.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agoconfig_check_boolean: add _ to yes and no markers
Jacob Keller [Tue, 27 May 2014 21:50:55 +0000 (14:50 -0700)]
config_check_boolean: add _ to yes and no markers

The config_check_boolean function had a bug, since no and yes were not
properly prefixed.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agodoc: drop reference to 'make'
Brian Norris [Wed, 18 Jun 2014 07:38:56 +0000 (00:38 -0700)]
doc: drop reference to 'make'

We don't have a top-level Makefile any more, and we automatically build
the helper tools if they aren't present, so drop the README reference.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
10 years agohelpers: track dependencies in Makefile
Brian Norris [Wed, 18 Jun 2014 07:43:38 +0000 (00:43 -0700)]
helpers: track dependencies in Makefile

Updates to remap-log.c and aiaiai-locker.c won't trigger rebuilds. Fix
that. Also use the pattern-matching shorthand '%'.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
10 years agoaiaiai-test-patchset: make checkpatch optional like other checkers
Jacob Keller [Thu, 17 Apr 2014 23:27:35 +0000 (16:27 -0700)]
aiaiai-test-patchset: make checkpatch optional like other checkers

This modifies behavior of aiaiai such that checkpatch will be an option
much like sparse and coccinelle. In addition, only work if checkpatch.pl
is found in the project at the requested location. Will disable
checkpatch if it cannot be found.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agoaiaiai-test-patchset: check for coccinelle scripts first
Jacob Keller [Thu, 17 Apr 2014 23:26:19 +0000 (16:26 -0700)]
aiaiai-test-patchset: check for coccinelle scripts first

Rather than always archiving the coccinelle scripts, check to ensure
they exist first. This prevents issues when attempting to build a
non-kernel tree, (ie: ethtool). Will display a warning if coccinelle was
requested but no scripts were found.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
10 years agoaiaiai: merge development branch to master
Jacob Keller [Tue, 27 May 2014 18:02:59 +0000 (11:02 -0700)]
aiaiai: merge development branch to master

Finally merge the development changes after some fairly serious use in
the email environment. I have appended the shortlog below, as well as a
helpful short summary of the large changes in no particular order.

* Moved as much as possible for configuring email setup to the cfgfile
* Added several options previously not configurable at all
* Add support for "hooks" framework, including a simple dispatcher hook
* Add hook which automatically detects project based on git-index info
* Add systemd scripts for the email setup
* Allow default values for project configuration
* Add script to help keep project repos up to date

These changes hopefully make configuration and setup of the email
workflow easier. In addition, the hook enabling automatic project
detection makes handling multiple project kernel trees much easier.

Artem Bityutskiy (6):
      test-pattchet: add a couple quotes
      aiaiai-test-patchset: move --targets option down
      aiaiai-diff-log-helper: fix logs diffing for gcc-4.8
      aiaiai-checker: use --no-data for smatch
      aiaiai-checker: ignore debugging output from spatch
      TODO: remove a completed item

Jacob Keller (51):
      Add support for choosing build targets
      aiaiai-sh-functions: remove extra quotes in call to ini_config_get
      aiaiai-test-patchset: use merge_addresses only once
      aiaiai-sh-functions: remove [email] section from cfgfile
      aiaiai-sh-functions: re-order options to match example config
      aiaiai-email: add [defaults] section to config
      aiaiai-email: move test-patchset options into the configuration file
      aiaiai: don't allow arbitrary validator command
      aiaiai-email: move -J bigjobs into configuration file
      aiaiai-test-patchset: add missing colon on targets option
      aiaiai-email-dispatcher-helper: fix typo on aiaiai
      aiaiai-email-test-patchset: fix parameter substitution
      aiaiai-email-test-patchset: move -- to end of all options
      email: add "debug" section to configuration file
      email-test-patchset: parse general configuration settings earlier
      sh-function: add insert_header function
      doc: add CONFIGURATION file describing the cfgfile
      aiaiai: add initial support for dispatcher hook
      hook: add support for X-Aiaiai-Project
      aiaiai: fixup srcdir in email and gerrit scripts
      dispatcher: add aiaiai-email-sh-functions to source list
      doc: rename CONFIGURATION to configuration.txt
      email: don't allow pcfg_branch to default
      email: add canonical_url variable for list_projects
      aiaiai: split sed project listing from list_projects
      email: rename error_test_patchset_failed
      aiaiai: change dispatcher hook to email hook
      aiaiai: add git-find-base utility for finding base commit from mbox
      email: example hook for aiaiai-email-test-patchset
      aiaiai: use fail_usage on incorrect number of arguments
      apply-patch: prefix diff output with '> '
      autodetect-project: fix change of function name
      systemd: add scripts for running the aiaiai processes
      email-hook: remove options that can't be used
      git-find-base: Add authorship, copyright, and license notice
      git-find-base: add detection for possible duplicate patches
      git-find-base: add help text to the program
      send-mail-on-failure: generalize email address
      aiaiai-project-update: fix srcdir line from location change
      aiaiai-project-update: fix typo of printf in usage statement
      aiaiai-project-update: correct function to upstream change
      git-find-base: rewritten to use newer design
      aiaiai-email-test-patchset: correct hook calling to actually grab error
      aiaiai: extract patches from email prior to using git-am
      aiaiai-diff-log-helper: explicitely call out python2
      aiaiai: add checks to configuration file
      aiaiai-email-lda: move reap options to cfgfile
      email: fix incorrect variable name in email for hook rejection
      aiaiai: don't display log output from git-find-base
      aiaiai: don't cat the $mbox file at begining of email-testpatchset
      aiaiai: don't hardcode KCFLAGS or W=1

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
11 years agoTODO: remove a completed item
Artem Bityutskiy [Sat, 26 Apr 2014 00:32:59 +0000 (17:32 -0700)]
TODO: remove a completed item

I've fixed the gcc 4.8 issue in

d4b585c aiaiai-diff-log-helper: fix logs diffing for gcc-4.8

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: don't hardcode KCFLAGS or W=1
Jacob Keller [Wed, 9 Apr 2014 22:26:13 +0000 (15:26 -0700)]
aiaiai: don't hardcode KCFLAGS or W=1

This patch fixes the TODO item regarding hardcoded kernel make
parameters. We now default -M to be "KCFLAGS='-Wno-missing-initializers
-Wno-sign-compare' W=1", and allow redefining the option via the email
configuration line or the command line setting for aiaiai-test-patchset

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: don't cat the $mbox file at begining of email-testpatchset
Jacob Keller [Wed, 9 Apr 2014 22:26:12 +0000 (15:26 -0700)]
aiaiai: don't cat the $mbox file at begining of email-testpatchset

This patch corrects an inadverdent addition of cat "$mbox" which apears
to come from commit bbf0119cbfc0. Possibly originating as some sort of
debugging code, it has essentially been lost in a rebase most likely.
However, this cat of the mbox contents is quite annoying. Possibly add
this back as a feature, since it sometimes proves useful, but generally
slows down aiaiai due to sometimes printing an exceptional amount of
data to stdout! Also fixes a typo of private.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Fixes: bbf0119cbfc0 ("email-lda: use cover letter subject if available")
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: don't display log output from git-find-base
Jacob Keller [Wed, 9 Apr 2014 22:26:11 +0000 (15:26 -0700)]
aiaiai: don't display log output from git-find-base

git-find-base outputs a large amount of data, given the number of
projects in a cfgfile. This can cause systemd to overload with too much
information. This patch alleviates the issue by only displaying the
output of git-find-base if it fails.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail: fix incorrect variable name in email for hook rejection
Jacob Keller [Wed, 9 Apr 2014 22:26:10 +0000 (15:26 -0700)]
email: fix incorrect variable name in email for hook rejection

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-email-lda: move reap options to cfgfile
Jacob Keller [Wed, 9 Apr 2014 22:26:09 +0000 (15:26 -0700)]
aiaiai-email-lda: move reap options to cfgfile

This patch moves the last few options of the LDA email program into the
configuration file, so that all email scripts don't require options for
configuration.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: add checks to configuration file
Jacob Keller [Wed, 9 Apr 2014 22:26:08 +0000 (15:26 -0700)]
aiaiai: add checks to configuration file

This patch adds configuration check functions and performs some basic
checks against the configuration file. A future effort may be to clean
up these checks so that it outputs a bit more error cases.

The main value of these checks is to prevent weird errors later when we
assume that values have some standard meaning. In addition, it allows
cleaning up boolean values to always be canonicalized into 0 or 1.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-diff-log-helper: explicitely call out python2
Jacob Keller [Wed, 9 Apr 2014 22:26:07 +0000 (15:26 -0700)]
aiaiai-diff-log-helper: explicitely call out python2

Since this script is not a python3 script, (it runs in python2!) then we
shouldn't rely on "/usr/bin/env python" to always land us on a python2
installation, as some machines may have installed python3, and
configured their default python to be the python3 executable.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: extract patches from email prior to using git-am
Jacob Keller [Wed, 9 Apr 2014 22:26:06 +0000 (15:26 -0700)]
aiaiai: extract patches from email prior to using git-am

Some patch authors submit patches directly attached via git-format-patch
output as an attachment. Sometimes they include both the patch and the
inline diff. This is problematic because it causes aiaiai to fail to
apply the patch, due to git being confused about the attached patch.
This patch modifies how aiaiai reads the commits, using a python script
which is capable of extracting the patches from the mbox (including
attachments) before calling git-am.

This helps aiaiai more easily handle this weird patch case, and still
works great for regular patch submissions. In addition, turn on 3-way
merge of git-am, so that duplicate patches will be properly ignored (as
in the case with inlined and attached patches)

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-email-test-patchset: correct hook calling to actually grab error
Jacob Keller [Wed, 9 Apr 2014 22:26:05 +0000 (15:26 -0700)]
aiaiai-email-test-patchset: correct hook calling to actually grab error

We can't grab the $? value from inside an if block, as the if statement
already changed the return code. Instead, we just call the hook script
without an error section, and then check for errors afterwards. This
corrects an issue where the return code would always be 0, even if the
command failed.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-checker: ignore debugging output from spatch
Artem Bityutskiy [Thu, 24 Apr 2014 23:49:36 +0000 (16:49 -0700)]
aiaiai-checker: ignore debugging output from spatch

spatch is a great tool, but it is still not very stable and crashes sometimes,
in which case it prints a lot of debugging stuff to stderr, which we do not
want in out logs. Normal warnings go to stdout. Therefore, ignore stderr output
of spatch.

And switch to the new style options format instead of using the old style.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-checker: use --no-data for smatch
Artem Bityutskiy [Thu, 24 Apr 2014 23:15:10 +0000 (16:15 -0700)]
aiaiai-checker: use --no-data for smatch

Otherwise smatch complains about missing data, which will show up in diff-log
when new files are added.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-diff-log-helper: fix logs diffing for gcc-4.8
Artem Bityutskiy [Thu, 24 Apr 2014 22:55:38 +0000 (15:55 -0700)]
aiaiai-diff-log-helper: fix logs diffing for gcc-4.8

gcc 4.8 changed its output format a bit. Now it appends lines like this to the
warning messages:

net/ipv4/ip_tunnel.c:394:25: warning: variable â€˜fbt’ set but not used [-Wunused-but-set-variable]
  struct ip_tunnel *nt, *fbt;
                         ^

Which made aiaiai output very messy. This patch fixes the problem.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-test-patchset: move --targets option down
Artem Bityutskiy [Thu, 24 Apr 2014 22:17:35 +0000 (15:17 -0700)]
aiaiai-test-patchset: move --targets option down

This patch has no functional changes. It is just a clean-up which makes the
help output a tiny bit easier to follow by moving --target out of the
block of options related to checkers. Also, it changes the orger of option
handling to match the order in the help output.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agogit-find-base: rewritten to use newer design
Jacob Keller [Fri, 4 Apr 2014 22:06:52 +0000 (15:06 -0700)]
git-find-base: rewritten to use newer design

Instead of just checking a few extra headers, add support for all header
types that git can output, and be a bit more robust about renames and
deletes. For now, assume a rename won't attempt to overwrite an existing
file.. Ideally we should do a full check on the base as well..

This model should allow support of all git commit types, not just simple
ones. In addition, in order to allow a certain patch format, we add an
option to remove duplicates. Do it by default, but enable option to keep
duplicate diff chunks. Primarily useful for patches which contain both
an inline and attachment.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-project-update: correct function to upstream change
Jacob Keller [Fri, 4 Apr 2014 22:06:49 +0000 (15:06 -0700)]
aiaiai-project-update: correct function to upstream change

Upstream used get_cfgfile_projects_list as the name of the function that
determined the full project listing. aiaiai-project-update was missed
in the change.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-project-update: fix typo of printf in usage statement
Jacob Keller [Fri, 4 Apr 2014 22:06:48 +0000 (15:06 -0700)]
aiaiai-project-update: fix typo of printf in usage statement

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-project-update: fix srcdir line from location change
Jacob Keller [Fri, 4 Apr 2014 22:06:47 +0000 (15:06 -0700)]
aiaiai-project-update: fix srcdir line from location change

The new location of aiaiai-project requires a new srcdir line, as I
forgot to update this when moving the path.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agosend-mail-on-failure: generalize email address
Jacob Keller [Fri, 4 Apr 2014 22:06:46 +0000 (15:06 -0700)]
send-mail-on-failure: generalize email address

Rather than using a personal email address (oops!) generalize the
address in the script as an argument. In addition, modify the systemd
script to use root@localhost. The user *is* expected to modify the
systemd script in their own copy to point to the correct address.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agogit-find-base: add help text to the program
Jacob Keller [Mon, 31 Mar 2014 22:24:03 +0000 (15:24 -0700)]
git-find-base: add help text to the program

This patch adds a help-text output and the -h or -? option to
git-find-base in order to allow user to request help for how to use
the utility.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agogit-find-base: add detection for possible duplicate patches
Jacob Keller [Mon, 31 Mar 2014 22:24:02 +0000 (15:24 -0700)]
git-find-base: add detection for possible duplicate patches

Some users send a patch which includes both an attachment and inline of
the diff. This confuses git-find-base, because it will see equivalent
patch blobs. If we see the same diff hunk with identical git-index
information, print a warning, and ignore it.

This patch also rewords some of the other warnings to be more consistent
and always show the intial -> modified blobs for possible debugging.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agogit-find-base: Add authorship, copyright, and license notice
Jacob Keller [Mon, 31 Mar 2014 22:24:01 +0000 (15:24 -0700)]
git-find-base: Add authorship, copyright, and license notice

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-hook: remove options that can't be used
Jacob Keller [Mon, 31 Mar 2014 22:24:00 +0000 (15:24 -0700)]
email-hook: remove options that can't be used

Hooks don't really support options, so just remove them. Also, use
fail_usage instead of die for the exit message, so that we actually show
the usage when wrong number of arguments is given.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agosystemd: add scripts for running the aiaiai processes
Jacob Keller [Mon, 31 Mar 2014 22:23:59 +0000 (15:23 -0700)]
systemd: add scripts for running the aiaiai processes

This patch adds 3 service files for use with aiaiai

1) aiaiai.service which runs the aiaiai email dispatcher
2) aiaiai-project-update.service which runs aiaiai-project-update which
   will update remotes for all projects in the configuration file
3) send-mail-on-failure for notifying an administrator of service errors

The services are primarily useful for tracking aiaiai output as well as
keeping remotes that aiaiai needs up to date.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoautodetect-project: fix change of function name
Jacob Keller [Tue, 1 Apr 2014 20:40:24 +0000 (13:40 -0700)]
autodetect-project: fix change of function name

One of the function names changed upstream, so we need to fix it in the
hook also.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoapply-patch: prefix diff output with '> '
Jacob Keller [Fri, 28 Mar 2014 16:08:32 +0000 (09:08 -0700)]
apply-patch: prefix diff output with '> '

When aiaiai responds to a mailing list that is monitored by patchwork, a
failure to apply a diff can cause patchwork to generate false positive
"patches" due to the diff in the email. This patch modifies aiaiai so
that it prefixes the output of the command with a '> ' which will
prevent patchwork from recognizing this as a diff with a patch inlined
to the reply.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: use fail_usage on incorrect number of arguments
Jacob Keller [Fri, 28 Mar 2014 16:08:31 +0000 (09:08 -0700)]
aiaiai: use fail_usage on incorrect number of arguments

We should display the full usage with an error message when we have an
incorrect number of arguments, rather than just die. The advantage is
that the user will see what the actual usage of the program is, rather
than just a somewhat cryptic error message.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail: example hook for aiaiai-email-test-patchset
Jacob Keller [Thu, 27 Mar 2014 18:40:08 +0000 (11:40 -0700)]
email: example hook for aiaiai-email-test-patchset

This commit introduces an example hook which uses git-find-base to
determine what project (and even what commit inside that project!) the
patch is based on. This can be used so that patches automatically go to
the correct project, without having to specify the project in the email
address.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: add git-find-base utility for finding base commit from mbox
Jacob Keller [Thu, 27 Mar 2014 18:40:07 +0000 (11:40 -0700)]
aiaiai: add git-find-base utility for finding base commit from mbox

This patch adds a helper utility for git, git-find-base which works by
checking the index information provided by git-diff's output. It works
by parsing the mbox for diff lines, and extracting the index line. This
is the shortblob of the file in git's database that this patch
originally applied to.

The general flow of this perl tool is:

1) Extract all the files and base blob indexes that the patch modifies,
   using a regular expression.
2) Run git log with all arguments directly passed through
3) For each commit returned by git log, check the ls-tree output for the
   modified file. If any of them fail to match, then this patch cannot
   apply cleanly to the commit.
4) print the sha1sum of the first commit which passes the check blobs
   test.

This tool can be used to automatically determine if a commit can be
applied cleanly to a branch, and even detect which commit it should be
applied to. Various options passed to the log can change how much
detection it does.

If a patch series is applied, it will check each modification of a file,
and ensure that it could apply in sequence generating the final result.
This allows finding the first commit at which a series will apply. If a
series is not self-consistent, then git-find-base will fail to supply
the base commit, and may output errors regarding the nature of the
inconsistency.

The primary intention for this tool will be an example hook for aiaiai
which automatically detects which project a patch was originally based
on.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: change dispatcher hook to email hook
Jacob Keller [Thu, 27 Mar 2014 18:40:06 +0000 (11:40 -0700)]
aiaiai: change dispatcher hook to email hook

This patch modifies the current dispatcher hook to the new model of hook
(reading hook contents from stdout of hook). In addition, it also moves
the hook into aiaiai-email-test-patchset instead of putting it in the
dispatcher-helper. This helps simplify the hook process overall.

Amended by Artem.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail: rename error_test_patchset_failed
Jacob Keller [Thu, 27 Mar 2014 18:40:05 +0000 (11:40 -0700)]
email: rename error_test_patchset_failed

Since this function could be used to generically refer to any internal
error, modify the name and description. We will be using this function
in a later patch to indicate an internal error in a hook as well.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: split sed project listing from list_projects
Jacob Keller [Thu, 27 Mar 2014 18:40:04 +0000 (11:40 -0700)]
aiaiai: split sed project listing from list_projects

In order to allow other places such as hooks to list the projects,
seperate out the sed script into its own function. This enables less
code duplication if another script wants to list all projects in a
cfgfile.

Artem: re-named the function for a bit better readability.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail: add canonical_url variable for list_projects
Jacob Keller [Thu, 27 Mar 2014 18:40:03 +0000 (11:40 -0700)]
email: add canonical_url variable for list_projects

If supplied, this url can be used to add a [git clone -b <branch> <url>]
section to the list_projects output, which indicates to the user how to
clone the specified project. This can be useful to enable users to more
easily see how to start working on a project.

The canonical url is not used by aiaiai as an access point. It mainly is
useful if the local clones that aiaiai uses are setup as --mirror
clones.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail: don't allow pcfg_branch to default
Jacob Keller [Thu, 27 Mar 2014 18:40:02 +0000 (11:40 -0700)]
email: don't allow pcfg_branch to default

Since we don't allow pcfg_path to default, it makes little sense to
allow pcfg_branch to default. Also, it would be better to have a die
check on branch, so that we fail if the project doesn't specify the
branch.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agodoc: rename CONFIGURATION to configuration.txt
Jacob Keller [Thu, 27 Mar 2014 18:40:01 +0000 (11:40 -0700)]
doc: rename CONFIGURATION to configuration.txt

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agodispatcher: add aiaiai-email-sh-functions to source list
Jacob Keller [Thu, 27 Mar 2014 18:40:00 +0000 (11:40 -0700)]
dispatcher: add aiaiai-email-sh-functions to source list

We need the email-sh-functions in the source list in order to parse
configuration files.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: fixup srcdir in email and gerrit scripts
Jacob Keller [Thu, 27 Mar 2014 18:39:59 +0000 (11:39 -0700)]
aiaiai: fixup srcdir in email and gerrit scripts

$srcdir should represent the current directory where the actual shell
file is located. This requires also updating $PATH so that it points to
the correct directories. This is somewhat confusing since we have to add
'..' to a section, but it fixes the switch to dash check for email
scripts which previously was broken. It also makes everything more
consistent.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agohook: add support for X-Aiaiai-Project
Jacob Keller [Sat, 15 Mar 2014 00:16:01 +0000 (17:16 -0700)]
hook: add support for X-Aiaiai-Project

Rather than determining the project strictly from the +project portion
of the aiaiai address, also allow the dispatcher hook to insert the
project hook into the mbox header. This could be used to allow advanced
configuration of the project, such as by checking patch diffs to see
which files are modified.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai: add initial support for dispatcher hook
Jacob Keller [Sat, 15 Mar 2014 00:16:00 +0000 (17:16 -0700)]
aiaiai: add initial support for dispatcher hook

This patch adds some initial support for a dispatcher hook which could
be used to add custom headers, which will (later) be interpreted by
aiaiai to include specialized settings. A follow-on patch will add the
first initial custom header.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agodoc: add CONFIGURATION file describing the cfgfile
Jacob Keller [Sat, 15 Mar 2014 00:15:59 +0000 (17:15 -0700)]
doc: add CONFIGURATION file describing the cfgfile

This patch adds a CONFIGURATION file which describes the aiaiai
configuration file. This will be expanded upon in future commits which
introduce the aiaiai hooks.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agosh-function: add insert_header function
Jacob Keller [Sat, 15 Mar 2014 00:15:58 +0000 (17:15 -0700)]
sh-function: add insert_header function

Since we use a special trick to insert header information into the mbox,
this could be extraced into a function in aiaiai-sh-functions. This will
help future work which will want to add multiple headers into this mbox
file, using the same file descriptor trick.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail-test-patchset: parse general configuration settings earlier
Jacob Keller [Mon, 10 Mar 2014 23:46:14 +0000 (16:46 -0700)]
email-test-patchset: parse general configuration settings earlier

This patch modifies the email patch testing program so that it parses
the general configuration settings as soon as it reads the configuration
file location. It also modifies the script so that it will use readlink
on the path instead of just blindly using the path. This is taken from
the LDA which does this as well.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoemail: add "debug" section to configuration file
Jacob Keller [Mon, 10 Mar 2014 23:46:13 +0000 (16:46 -0700)]
email: add "debug" section to configuration file

This patch further extends the configuration file so that it has a debug
section which currently includes replacements for test-mode and preserve
options. These options are very useful for debugging aiaiai, but today
cannot easily be changed without modifying the command line. Instead,
remove them from the options and include them via the configuration
file.

I chose not to add "verbose" to this list, because we actually use
verbose earlier than we parse the configuration. It may still be worth
coming up with some interface where command line options overwrite
configuration options, but I wasn't sure the best way to handle this
yet.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-email-test-patchset: move -- to end of all options
Jacob Keller [Mon, 10 Mar 2014 23:46:12 +0000 (16:46 -0700)]
aiaiai-email-test-patchset: move -- to end of all options

A previous patch added kmake_opts to the configuration file, and when
passing this into aiaiai-test-patchset, the -- field which ends option
scanning was not correctly moved to the end of the options arguments.
This would result in incorrect behavior if anyone tried to use this
option.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-email-test-patchset: fix parameter substitution
Jacob Keller [Mon, 10 Mar 2014 23:46:11 +0000 (16:46 -0700)]
aiaiai-email-test-patchset: fix parameter substitution

The targets parameter was incorrectly failing to add the --targets,
because the substitution did not have a +. This patch corrects the
parameter substitution so that the targets will correctly include the
required option for use with aiaiai-test-patchset directly.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-email-dispatcher-helper: fix typo on aiaiai
Jacob Keller [Mon, 10 Mar 2014 23:46:10 +0000 (16:46 -0700)]
aiaiai-email-dispatcher-helper: fix typo on aiaiai

This patch fixes a typo on aiaiai-email-test-patchset, which prevented
the validator from being called, as it was misspelled.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-test-patchset: add missing colon on targets option
Jacob Keller [Mon, 10 Mar 2014 23:46:09 +0000 (16:46 -0700)]
aiaiai-test-patchset: add missing colon on targets option

The targets option recently added was broken. It did not properly handle
a value for the argument, because no colon was present. This patch fixes
the getopt line so that target will infact select an option.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
11 years agoaiaiai-email: move -J bigjobs into configuration file
Jacob Keller [Fri, 7 Mar 2014 01:21:31 +0000 (17:21 -0800)]
aiaiai-email: move -J bigjobs into configuration file

This modifies aiaiai-email-dispatcher to use the configuration file
instead of the command line for the bigjobs parameter.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
11 years agoaiaiai: don't allow arbitrary validator command
Jacob Keller [Sat, 1 Mar 2014 00:00:19 +0000 (16:00 -0800)]
aiaiai: don't allow arbitrary validator command

Since aiaiai-email-test-patchset is the only validator that makes sense,
and we should extend it if new features are desired, we don't need to
support multiple validators, as this is clunky, and difficult to
configure for the user. Now that the configuration file supports all the
options from the aiaiai-email-test-patchset, we can just directly call
it instead of having to use a passed in parameter.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
11 years agoaiaiai-email: move test-patchset options into the configuration file
Jacob Keller [Fri, 7 Mar 2014 01:12:51 +0000 (17:12 -0800)]
aiaiai-email: move test-patchset options into the configuration file

This patch modifies the configuration file to include most of the
options around the validator command, so that those no longer have to be
specified manually. This does break compatability with the current
validator setup, since those old options must now be specified on the
command line.

- v2
* Fix typo in coccinelle variable

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
11 years agoaiaiai-email: add [defaults] section to config
Jacob Keller [Fri, 7 Mar 2014 00:31:12 +0000 (16:31 -0800)]
aiaiai-email: add [defaults] section to config

This patch adds a [defaults] section for the configuration file which
allows setting shared project settings which might be overridden
per-project. This will be used more in a follow-on patch which adds
additional configuration options.

- v2
* put ini_config_is_set into the libshell file
* use __ instead of _ to indicate internal variable
* update comment to better reflect per-project and default variable
  interaction

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
11 years agoaiaiai-sh-functions: re-order options to match example config
Jacob Keller [Fri, 7 Mar 2014 00:22:58 +0000 (16:22 -0800)]
aiaiai-sh-functions: re-order options to match example config

This patch re-orders the parsing for the standard configuration
variables, in order to match what is in our example configuration. It
also updates the header comment to match.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
11 years agoaiaiai-sh-functions: remove [email] section from cfgfile
Jacob Keller [Thu, 6 Mar 2014 22:08:48 +0000 (14:08 -0800)]
aiaiai-sh-functions: remove [email] section from cfgfile

This patch is part of a series to improve user friendliness regarding
options for aiaiai-email-test-patchset, and improving use of the
configuration file. This patch removes the seperate [email] section, as
it really doesn't have any use. Just put these inside the global
section, since email and global really have no different meaning.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>