aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2022-02-10 11:17:23 -0800
committerGerald Combs <gerald@wireshark.org>2022-02-13 13:21:58 -0800
commit79da670bd1b4f91eebee5c96b19eaf1f33c94777 (patch)
treee5089f650f8c52aa9710ed71ca1891c9fcbbff58 /tools
parent4e3b2ec007872ffe13ffb2b0b3236a227d358ace (diff)
Packaging+GitLab CI: Move debian to the packaging directory.
We keep our various packaging assets in the "packaging" directory. Move the Debian assets there. dpkg-buildpackage doesn't seem appear to have a "debian directory path" option, but symlinking worked in my test container.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/asn2deb14
-rwxr-xr-xtools/debian-nightly-package.sh5
-rwxr-xr-xtools/idl2deb14
-rwxr-xr-xtools/make-version.pl6
-rw-r--r--tools/pre-commit-ignore.conf7
-rwxr-xr-xtools/release-update-debian-soversions.sh6
6 files changed, 27 insertions, 25 deletions
diff --git a/tools/asn2deb b/tools/asn2deb
index 72d9e4a8a7..926d34e2e5 100755
--- a/tools/asn2deb
+++ b/tools/asn2deb
@@ -42,21 +42,21 @@ def create_files(version, deb, email, asn, name, iso, rfc):
"""Create all files for the .deb build process."""
base = asn.lower()[:-5]
- if not os.path.isdir("debian"):
- os.mkdir("debian")
+ if not os.path.isdir("packaging/debian"):
+ os.mkdir("packaging/debian")
- create_file("debian/rules", """#!/usr/bin/make -f
+ create_file("packaging/debian/rules", """#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
-PREFIX=`pwd`/debian/wireshark-asn1-%s
+PREFIX=`pwd`/packaging/debian/wireshark-asn1-%s
binary-post-install/wireshark-asn1-%s::
rm -f $(PREFIX)/usr/lib/wireshark/plugins/%s/*.a
""" % (base, base, version), 0o755)
- create_file("debian/control", """Source: wireshark-asn1-%s
+ create_file("packaging/debian/control", """Source: wireshark-asn1-%s
Section: net
Priority: optional
Maintainer: %s <%s>
@@ -72,7 +72,7 @@ Description: ASN.1/BER dissector for %s
Notation 1) file '%s.asn1'.
""" % (base, name, email, base, deb, base, base))
- create_file("debian/changelog",
+ create_file("packaging/debian/changelog",
"""wireshark-asn1-%s (0.0.1-1) unstable; urgency=low
* Automatically created package.
@@ -80,7 +80,7 @@ Description: ASN.1/BER dissector for %s
-- %s <%s> %s
""" % (base, name, email, rfc + "\n (" + iso + ")"))
- create_file("debian/copyright",
+ create_file("packaging/debian/copyright",
"""This package has been created automatically be asn2deb on
%s for Debian GNU/Linux.
diff --git a/tools/debian-nightly-package.sh b/tools/debian-nightly-package.sh
index ca56394322..c07185a683 100755
--- a/tools/debian-nightly-package.sh
+++ b/tools/debian-nightly-package.sh
@@ -17,7 +17,8 @@ fi
DIST=$1
VERSION=$(git describe --tags | sed 's/v//;s/-/~/g;s/rc/~rc/')
-rm debian/changelog || true
+ln --symbolic --no-dereference --force packaging/debian ./debian
+rm packaging/debian/changelog || true
EDITOR=touch dch -p --package wireshark --create --force-distribution -v${VERSION}~${DIST}1 -D $DIST
-sed -i 's/\* Initial release.*/* Nightly build for '${DIST^}'/' debian/changelog
+sed -i 's/\* Initial release.*/* Nightly build for '${DIST^}'/' packaging/debian/changelog
dpkg-buildpackage -S -d
diff --git a/tools/idl2deb b/tools/idl2deb
index 72ed6c86db..18f1b05647 100755
--- a/tools/idl2deb
+++ b/tools/idl2deb
@@ -34,21 +34,21 @@ def create_files(version, deb, email, idl, name, preserve, iso, rfc):
"""Create all files for the .deb build process."""
base = os.path.basename(idl.lower().split(".idl")[0])
- if not os.path.isdir("debian"):
- os.mkdir("debian")
+ if not os.path.isdir("packaging/debian"):
+ os.mkdir("packaging/debian")
- create_file(preserve, "debian/rules", """#!/usr/bin/make -f
+ create_file(preserve, "packaging/debian/rules", """#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
-PREFIX=`pwd`/debian/wireshark-giop-%s
+PREFIX=`pwd`/packaging/debian/wireshark-giop-%s
binary-post-install/wireshark-giop-%s::
rm -f $(PREFIX)/usr/lib/wireshark/plugins/%s/*.a
""" % (base, base, version), 0o755)
- create_file(preserve, "debian/control", """Source: wireshark-giop-%s
+ create_file(preserve, "packaging/debian/control", """Source: wireshark-giop-%s
Section: net
Priority: optional
Maintainer: %s <%s>
@@ -65,7 +65,7 @@ Description: GIOP dissector for CORBA interface %s
in the IDL (Interface Definition Language) file '%s.idl'.
""" % (base, name, email, base, deb, base, base))
- create_file(preserve, "debian/changelog",
+ create_file(preserve, "packaging/debian/changelog",
"""wireshark-giop-%s (0.0.1-1) unstable; urgency=low
* Automatically created package.
@@ -73,7 +73,7 @@ Description: GIOP dissector for CORBA interface %s
-- %s <%s> %s
""" % (base, name, email, rfc))
- create_file(preserve, "debian/copyright",
+ create_file(preserve, "packaging/debian/copyright",
"""This package has been created automatically by idl2deb on
%s for Debian GNU/Linux.
diff --git a/tools/make-version.pl b/tools/make-version.pl
index b3074bdc08..7984ec5eba 100755
--- a/tools/make-version.pl
+++ b/tools/make-version.pl
@@ -506,13 +506,13 @@ sub update_docinfo_asciidoc
}
}
-# Read debian/changelog, then write back out an updated version.
+# Read packaging/debian/changelog, then write back out an updated version.
sub update_debian_changelog
{
my $line;
my $contents = "";
my $version = "";
- my $filepath = "$src_dir/debian/changelog";
+ my $filepath = "$src_dir/packaging/debian/changelog";
open(CHANGELOG, "< $filepath") || die "Can't read $filepath!";
while ($line = <CHANGELOG>) {
@@ -782,7 +782,7 @@ Print the vcs version to standard output
Set the major, minor, and micro versions in the top-level
CMakeLists.txt, configure.ac, docbook/attributes.adoc,
-debian/changelog, and the CMakeLists.txt for all libraries
+packaging/debian/changelog, and the CMakeLists.txt for all libraries
to the provided version number.
=item --set-release, -r
diff --git a/tools/pre-commit-ignore.conf b/tools/pre-commit-ignore.conf
index db95fb0a0c..a34cbe3273 100644
--- a/tools/pre-commit-ignore.conf
+++ b/tools/pre-commit-ignore.conf
@@ -9,18 +9,19 @@
# The pathname wildcards allowed are: '*', '?', character set '[abc]' or
# negated with '[!abc]'.
+cli_main.c
doc/packet-PROTOABBREV.c
-epan/dissectors/asn1/*/packet-*-template.c
epan/dissectors/asn1/*/*asn
+epan/dissectors/asn1/*/packet-*-template.c
+epan/dissectors/packet-http.c
epan/nghttp2/*
epan/wmem/wmem_strbuf.c
epan/wmem/wmem_strutil.c
epan/wslua/init_wslua.c
extcap/*
image/stock_icons/*
-cli_main.c
mmdbresolve.c
+packaging/*
tools/lemon/*
wsutil/file_util.h
wsutil/strptime.c
-epan/dissectors/packet-http.c
diff --git a/tools/release-update-debian-soversions.sh b/tools/release-update-debian-soversions.sh
index fb2b8895cc..e788d718eb 100755
--- a/tools/release-update-debian-soversions.sh
+++ b/tools/release-update-debian-soversions.sh
@@ -17,7 +17,7 @@ set -e
for i in codecs wireshark wiretap wsutil; do
NEW_VERSION=$(grep SOVERSION "$(grep -l lib${i} ./*/CMakeLists.txt)" | sed 's/.*SOVERSION \([0-9]*\).*/\1/')
- rename "s/0\\./${NEW_VERSION}./" debian/lib${i}0.*
- grep -l -R "lib${i}0" debian/ | xargs sed -i "s/lib${i}0/lib${i}${NEW_VERSION}/"
- grep -l -R "lib${i}\\.so\\.0" debian/ | xargs sed -i "s/lib${i}\\.so\\.0/lib${i}.so.${NEW_VERSION}/"
+ rename "s/0\\./${NEW_VERSION}./" packaging/debian/lib${i}0.*
+ grep -l -R "lib${i}0" packaging/debian/ | xargs sed -i "s/lib${i}0/lib${i}${NEW_VERSION}/"
+ grep -l -R "lib${i}\\.so\\.0" packaging/debian/ | xargs sed -i "s/lib${i}\\.so\\.0/lib${i}.so.${NEW_VERSION}/"
done