Commit Graph

203 Commits

Author SHA1 Message Date
Eric Engestrom 16be271c6e git_sha1_gen: use git_sha1.h.in on all build systems
Meson already uses this, let's get the other build sys to use it too.

Note: rstrip() was dropped, as truncating to the first 10 chars already
gets rid of the terminating newline (not an issue with the env var
either, unless maliciously crafted to break the build... not sure this
is a real-world issue).

Verified to work and give the same output as before on both python 2
and 3 :)

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2017-10-16 18:52:35 +01:00
Brian Paul a3b2e60aa0 git_sha1_gen: accept MESA_GIT_SHA1_OVERRIDE env var
If one uses a parent build script to download/build Mesa we may not
have a full git repository (maybe a tar archive) so the 'git rev-parse'
command will fail.

This updates the script to look for a MESA_GIT_SHA1_OVERRIDE env var.
If it's set, use that sha1 instead of using git rev-parse.  With this
change we can put a git hash in the GL_VERSION string even when we
don't have a git repo.

v2: incorporate Dylan's suggestions to simplify the code

Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2017-10-10 11:28:31 -06:00
Dylan Baker 3218056e0e meson: Build i965 and dri stack
This gets pretty much the entire classic tree building, as well as
i965, including the various glapis. There are some workarounds for bugs
that are fixed in meson 0.43.0, which is due out on October 8th.

I have tested this with piglit using glx.

v2: - fix typo "vaule" -> "value"
    - use gtest dep instead of linking to libgtest (rebase error)
    - use gtest dep instead of linking against libgtest (rebase error)
    - copy the megadriver, then create hard links from that, then delete
      the megadriver. This matches the behavior of the autotools build.
      (Eric A)
    - Use host_machine instead of target_machine (Eric A)
    - Put a comment in the right place (Eric A)
    - Don't have two variables for the same information (Eric A)
    - Put pre_args at top of file in this patch (Eric A)
    - Fix glx generators in this patch instead of next (Eric A)
    - Remove -DMESON hack (Eric A)
    - add sha1_h to mesa in this patch (Eric A)
    - Put generators in loops when possible to reduce code in
      mapi/glapi/gen (Eric A)
v3: - put HAVE_X11_PLATFORM in this patch

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-09 13:42:44 -07:00
Eric Engestrom adea68a8a2 git_sha1_gen: fix output on python3
String handling has changed on python3.

Before this patch, on python3:
	#define MESA_GIT_SHA1 "git-b'b99dcbfeb3'"
After:
	#define MESA_GIT_SHA1 "git-b99dcbfeb3"

(No change on python2, it always looked ok)

Cc: Jose Fonseca <jfonseca@vmware.com>
Fixes: b99dcbfeb3 "build: Convert git_sha1_gen script to Python."
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-09-25 14:58:26 +01:00
Eric Engestrom aab0649487 git_sha1_gen: catch any error the same way
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-08-02 14:57:54 +01:00
Tobias Klausmann 44828e99f9 build: Don't bail on OSError in git_sha1_gen.py
When building sandboxed, we may encounter additional errors. Ignore the errors,
as we are in a constrained environment.

This can be observed when building latest git with OBS.

Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-08-02 14:28:58 +01:00
Jose Fonseca b99dcbfeb3 build: Convert git_sha1_gen script to Python.
Python is the scripting language we've been using for scripts that need
to run across all supported platforms.

Shell is *not* a portable language for scripts.

Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-08-01 15:24:39 +01:00
Eric Engestrom 076faf8764 build systems: move git_sha1_gen.sh to bin/
There was no reason for this script to live outside the scripts
directory.

Suggested-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Brian Paul <brianp@vmware.com>
2017-07-06 22:59:39 +01:00
Andres Gomez 5d87667fed bin/get-fixes-pick-list.sh: better identify multiple "fixes:" tags
We were not considering as multiple fixes lines with:
Fixes: $sha_1, Fixes: $sha_2

Now, we split the lines so we will consider them individually, as in:
Fixes: $sha_1,
Fixes: $sha_2

Additionally, we try to get the SHA from split lines so:
Fixes:
$sha_1

Will be considered as:
Fixes: $sha_1

v2:
 - Treat empty spaces earlier in fix lines (Emil)
 - Fold 2 lines into one to gather fix commit ids (Emil)

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Emil Velikov <emli.velikov@collabora.com>
2017-06-15 15:53:21 +03:00
Andres Gomez f1590363c9 bin/get-fixes-pick-list.sh: parse just the commit message
We were parsing the whole diff, although the candidates were
identified only by the commit message.

Now, we only use the commit message for parsing.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Emil Velikov <emli.velikov@collabora.com>
2017-06-15 15:53:21 +03:00
Andres Gomez b7af0ddfef bin/get-fixes-pick-list.sh: bring back the warning
We warn again if there are more than one line with the "fixes:" tag.

The warning is silenced when the commit has already landed or each
fixes tag reference a commit that is in branch.

v2:
 - Warn if any of the fixes tags has not landed (Emil)

v3:
 - Remove unnecessary head command
 - Clarify commit message (Emil)
 - Skip already picked commits sooner (Emil)

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-05-13 00:52:34 +03:00
Andres Gomez bac80635af bin/*py: honor editorconfig formatting
Replace the two stray tabs with respective space.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-05-09 14:06:52 +03:00
Andres Gomez d823440fed bin: use tabs for coding style on *.sh files
v2: Instead of changing *.sh, adapt the editorconfig file (Emil).

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-05-09 14:05:00 +03:00
Andres Gomez 77306e2afc bin/get-fixes-pick-list.sh: don't warn if more than one, go over them
If an identified commit was having more than one fix, we would warn
about that and only treat the first.

Now, we don't warn but treat all of them.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2017-05-08 11:28:17 +03:00
Juan A. Suarez Romero 3af7f8275b bin/get-{extra,fixes}-pick-list.sh: improve output
Show the commit hash and the title in a way that it is easier to copy
and paste in the bin/.cherry-ignore-extra file if we want to ignore
those commits for the future.

v2:
- Use printf instead echo (Eric Engestrom)

Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-20 10:28:54 +02:00
Juan A. Suarez Romero 99b41631bb bin/get-{extra,fixes}-pick-list.sh: add support for ignore list
Both scripts does not use a file with the commits to ignore. So if we
have handled one of the suggested commits and decided we won't pick it,
the scripts will continue suggesting them.

v2:
- Mark the candidates in bin/get-extra-pick-list.sh (Juan A. Suarez)
- Use bin/.cherry-ignore to store rejected patches (Emil)

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-20 10:28:21 +02:00
Juan A. Suarez Romero 1bcdf74cdd bin/get-fixes-pick-list.sh: fix typo
Replace "nore" by "more".

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-04-04 09:05:44 +02:00
Emil Velikov 32be87852b bin/get-fixes-pick-list.sh: do not mandate bash
Silly thinko on my end, as I was writing the script. There is nothing
bash specific in there.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-03-10 14:12:49 +00:00
Emil Velikov 0e94217999 bin/shortlog_mesa.sh: remove the final bashism
Remove the typeset built-in and toggle to /bin/sh

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-03-10 14:12:48 +00:00
Emil Velikov 3aa5f51c27 bin/bugzilla_mesa.sh: rework the looping method
We don't use DRYRUN (and no others scripts have one) so just drop it.

This allows us to rework the loop to the more commonly used "git .... |
while read foo; do ... done"

That in itself gets rid of the only remaining bashism and we can toggle
the shebang to /bin/sh.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-03-10 14:12:48 +00:00
Emil Velikov d73603fcdd bin/perf-annotate-jit: add .py suffix
To provide direct feedback about the file in question.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-03-10 14:12:47 +00:00
Emil Velikov 389478c4e9 bin/get-fixes-pick-list.sh: add new script
The script parses the "Fixes" tags and nominates respective commit if
applicable.

Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-02-16 15:17:52 +00:00
Emil Velikov f1b0b75099 bin/get-pick-list.sh: remove ancient way of nominating patches
The old way of nominating patches [NOTE: .*[Cc]andidate] was
deprecated and has been unused for approx. 3 years.

Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-02-16 15:17:52 +00:00
Emil Velikov d6b1d11d4f bin/get-pick-list.sh: limit `git grep ...' only as needed
Analogous to previous commit.

Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-02-16 15:17:52 +00:00
Emil Velikov d292f12d94 bin/get-typod-pick-list.sh: limit `git grep ...' to only as needed
The currently used range HEAD..origin/master is far too broad. It looks
for nominations within the already_landed list (branchpoint..HEAD).

Similarly we look for already_landed whiting the [possible] nominations
Rand branchpoint..origin/master.

Improve things by limiting the look ups to the branch point.

Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-02-16 15:17:52 +00:00
Emil Velikov 71e00d62ed bin/get-extra-pick-list: rework to use already_picked list
Currently we loop (git log --grep) to check if the fix has landed. We
can simplify and make things faster by storing the already_picked list
and grep ping through it.

Slim down the message while we're here.

Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-02-16 15:17:52 +00:00
Emil Velikov cb1947eac7 bin/get-extra-pick-list: use git merge-base to get the branchpoint
Since mesa development history is linear and the only diversion is at
the branchpoint. Thus we can drop the ad-hoc parsing and use git
merge-base to retrieve it.

Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-02-16 15:17:51 +00:00
Emil Velikov f0bdd13fdb get-typod-pick-list.sh: add new script
Typos do happen as people nominate patches for stable. This script aims
to catch most of those.

Due to the subtle nature of things, one has to pay special attention to
the output, similar to get-extra-pick-list.sh.

At the moment only the following is handled:
 grep -i "CC:.*mesa-dev"

Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-01-13 03:07:48 +00:00
Eric Engestrom 3bd885d09c Introduce .editorconfig
A few weeks ago, Jose Fonseca suggested [0] we use .editorconfig files
to try and enforce the formatting of the code, to which Michel Dänzer
suggested [1] we start by importing the existing .dir-locals.el
settings. The first draft was discussed in the RFC [2].

These .editorconfig are a first step, one that has the advantage of
requiring little to no intervention from the devs once the settings
files are in place, but the settings are very limited. This does have
the advantage of applying while the code is being written.
This doesn't replace the need for more comprehensive formatting tools
such as clang-format & clang-tidy, but those reformat the code after
the fact.

[0] https://lists.freedesktop.org/archives/mesa-dev/2016-June/121545.html
[1] https://lists.freedesktop.org/archives/mesa-dev/2016-June/121639.html
[2] https://lists.freedesktop.org/archives/mesa-dev/2016-July/123431.html

Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2016-08-31 17:06:54 -07:00
Emil Velikov f35f8464ec bugzilla_mesa.sh: Drop "Bug " from sed command
After a recent Bugzilla update the word is no longer in the title. Thus
the script ended up producing bogus HTML.

Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-07-07 15:58:46 +01:00
Emil Velikov c212a70cd9 mesa; add get-extra-pick-list.sh script into bin/
This is a very rudimentary script that checks if any of the applied
cherry-picks have been referenced (fixed?) by another patch. With the
latter either missing the stable tag or hasn't yet been picked.

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-02-29 11:25:35 +00:00
Emil Velikov c505064b2c bugzilla_mesa.sh: sort the bugs list by number
v2: Use change sed/sort based on Ilia's suggestion.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-13 20:02:09 +01:00
Carl Worth c6f3036179 get-pick-list: Allow for non-whitespace between "CC:" and "mesa-stable"
We recently proposed a new syntax for stable-patch nominations such as:

	CC: "9.2 and 9.1" <mesa-stable@lists.freedesktop.org>

and this has already appeared in the wild.

So we extend the regular expression to pick this up as well.
2013-07-31 15:49:48 -07:00
Carl Worth 122d8d2f5a get-pick-list.sh: Include commits mentionining "CC: mesa-stable..." in pick list
We recently adopted a new convention that patches can be nominated for the
stable branch by including a line in the commit message as follows:

	CC: mesa-stable@lists.freedesktop.org

This is a convenient syntax as "git send-email" will notice this line and
automatically copy the resulting patch email to the mesa-stable mailing list.

Here we extend the regular expression in the get-pick-list.sh script to also
notice this pattern, (as well as the traditional "NOTE: This patch is a
candidate..." form.
2013-07-30 12:36:37 -07:00
Andreas Boll b8e41db053 mesa: add usage examples to get-pick-list and shortlog scripts
NOTE: This is a candidate for the stable branches.
2013-05-01 21:42:02 +02:00
Andreas Boll ca79b72c00 mesa: Add a script to generate the list of fixed bugs
This list appears in the fixed bugs section of the release notes.

v2: Add usage examples

NOTE: This is a candidate for the stable branches.
2013-05-01 21:42:02 +02:00
José Fonseca b8f6858fcb gallivm: JIT symbol resolution with linux perf.
Details on docs/llvmpipe.html

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-04-17 16:50:52 +01:00
Ian Romanick 674f9239b9 mesa: Modify candidate search string
Several commits on master for the 9.1 branch had "NOTE" messages in a
slightly different format.

NOTE: This is a candidate for stable branches

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2013-03-05 14:54:11 -08:00
Matt Turner f1d229ee94 Remove installmesa 2013-01-10 22:01:31 +01:00
Matt Turner b585c0059c Remove minstall 2013-01-10 22:01:31 +01:00
Matt Turner 8f8e85e703 Remove mklib 2013-01-10 22:01:31 +01:00
Paul Berry b8b1d61e76 Add new .gitignore entries for Automake 1.13 tests
Automake 1.13 creates a bunch of new build artefacts:
- bin/test-driver, a script for running tests.
- *.trs files for every "make check" test result.
- *.log files containing the output of every test run by "make check".

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-03 15:24:45 -08:00
Andreas Boll ca8988673b mesa: use .cherry-ignore in the get-pick-list.sh script
NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-11-14 20:45:33 +01:00
Andreas Boll 3e3ff4cd73 mesa: fix indentation in get-pick-list.sh script
NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-10-23 19:26:56 +02:00
Andreas Boll 135ec3a1db mesa: grep for commits with cherry picked in commit message only once
and save them temporary in already_picked

NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-10-23 19:26:56 +02:00
Andreas Boll b2991526ed mesa: optimize get-pick-list.sh script
cuts down the while loop iterations from 4600 to 380 commits at the
moment

NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-10-23 19:26:56 +02:00
Andreas Boll fa27a0db43 mesa: simplify get-pick-list.sh script
and add a description for the script

NOTE: This is a candidate for the stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-10-23 19:26:56 +02:00
Ian Romanick 2d95db660e mesa: add get-pick-list.sh script into bin/
NOTE: This is a candidate for the stable branches.
2012-10-23 19:26:56 +02:00
Mike Frysinger 8f9bae615d mklib: clean up abi flags for x86 targets
The current code is duplicated in two places and relies on `uname` to
detect the flags.  This is no good for cross-compiling, and the current
logic uses -m64 for the x32 ABI which breaks things.

Unify the code in one place, avoid `uname` completely, and add support
for the new x32 ABI.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-09-14 15:27:16 -07:00
Andreas Boll 3becf98424 mesa: remove obsolete confdiff.sh
this script is obsolete since
0cc216676c
2012-06-20 01:51:38 -07:00