Commit Graph

8 Commits

Author SHA1 Message Date
Moshe Kaplan 87ca8c227a tools: Port to Python 2022-07-11 14:44:23 +00:00
John Thacker 81c67b3e05 packaging: Provide workaround for rpm-package from source tarball
Users might want to download a source tarball and build an RPM
package from it.

Have use git-archive's 'export-subst' feature
so that it can detect whether it is being run from a git repository
versus run from source extracted from a tarball produced by git-archive.

In the latter case, produce a helpful console message telling the
user to copy the downloaded tarball into the binary directory so
that the rpm-package target can succeed. Also update the Developer's
Guide to suggest this as well.

We could try to create our own archive using tar, but there are
several possible gotchas, such as in-source builds, excluding a build
directory that is a subdirectory of the source dir, excluding unknown
different build directories from previous builds, dealing with different
options in different versions of tar, etc. This is good enough for
the common case, and anyone who wants something more complicated can
hopefully create their own tarball.

Fix #15167
2022-05-06 00:13:28 +00:00
Peter Wu a68627ae96 version: include version information for tarballs from git
Embed the git commit hash as well as the tag information for tarballs
produced by 'git archive' (this includes the Github tarball). Example:

    TShark (Wireshark) 3.0.1 (Git commit ea351cd80516)

Note that the embedded git ref names can include branch information, see
for example `git log -n1 -s --format=%D v3.0.1`:

    tag: wireshark-3.0.1, tag: v3.0.1
    HEAD -> bug/15544, tag: v99.99
    HEAD, origin/master, origin/HEAD, master

Thus, when creating release tarballs, I would recommend using the above
command to see whether unnecessary branch information is present. If so,
create a new post-release commit first on the same branch. This way, the
release tarballs should be reproducible.

While at it, increase the commit abbreviation length from 8 to 12.
Currently git describe abbreviates to 10 by default. The default length
is at minimum 7 and is dependent on the number of objects:

    git count-objects -v | perl -lne 'print int(log($1)/log(2)/2)+1 if /^in-pack: (\d+)/'

Bug: 15544
Change-Id: Ifd1ed636b69f7687a7272775686f51387040a596
Petri-Dish: Peter Wu <>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <>
Reviewed-by: Alexis La Goutte <>
2019-05-16 17:31:50 +00:00
Peter Wu 1a26b56c26 Ensure test directories are included with git archive
"make dist" will currently fail with "git archive" archives because
dftestfiles and dftestlib is missing. To encourage distributors to run
tests, ensure that these files (1.64MiB uncompressed, 688KiB
gzip-compressed) are bundled.

Change-Id: I1fc2bd6df45db40e64e7691235f716bbf3562f87
Petri-Dish: Peter Wu <>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <>
2018-04-26 15:09:12 +00:00
Pascal Quantin c62546ac58 Ensure that run_and_catch_crashes has UNIX/POSIX line endings
Change-Id: If7b5047c15c747ac306960003c60a3ccd35f3e51
Reviewed-by: Pascal Quantin <>
2015-06-04 21:06:12 +00:00
Gerald Combs 58cde5c74a Add tests for the Qt UI.
Make sure the Qt UI quits if WIRESHARK_QUIT_AFTER_CAPTURE is set. Make
sure Bourne shell scripts (*.sh) have UNIX/POSIX line endings. Reduce
some time values so that the tests run faster.

Change-Id: I81df7c6f72d7d807d1856863cbea1bb6326ca711
Tested-by: Gerald Combs <>
Reviewed-by: Gerald Combs <>
2014-10-01 22:30:33 +00:00
Balint Reczey 85499fbbc6 Add simple script to export release tarball right from Git
The files not to be present in the release tarballs are filetered based
on the contents of the .gitattributes files

Change-Id: If12eb00cf174f5d5b6dfffd56685b078a4593bf8
Reviewed-by: Evan Huus <>
Reviewed-by: Gerald Combs <>
2014-06-19 00:35:02 +00:00
Pascal Quantin b1bea543d9 Introduce end-of-line normalization
Change-Id: Ie6991af2432b193fbdc23bbbd335f83c091f14e8
Reviewed-by: Evan Huus <>
Reviewed-by: Pascal Quantin <>
Tested-by: Pascal Quantin <>
2014-02-05 22:28:01 +00:00