summaryrefslogtreecommitdiffstats
path: root/scripts/t/dpkg_buildpackage
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:35:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:35:28 +0000
commitea314d2f45c40a006c0104157013ab4b857f665f (patch)
tree3ef2971cb3675c318b8d9effd987854ad3f6d3e8 /scripts/t/dpkg_buildpackage
parentInitial commit. (diff)
downloaddpkg-ea314d2f45c40a006c0104157013ab4b857f665f.tar.xz
dpkg-ea314d2f45c40a006c0104157013ab4b857f665f.zip
Adding upstream version 1.22.4.upstream/1.22.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/t/dpkg_buildpackage')
-rw-r--r--scripts/t/dpkg_buildpackage/dpkgdb/status0
-rwxr-xr-xscripts/t/dpkg_buildpackage/hook25
-rw-r--r--scripts/t/dpkg_buildpackage/test-source_0.dsc15
-rw-r--r--scripts/t/dpkg_buildpackage/test-source_0_all.changes26
-rw-r--r--scripts/t/dpkg_buildpackage/test-source_0_all.hook18
-rw-r--r--scripts/t/dpkg_buildpackage/test-source_0_any.changes26
-rw-r--r--scripts/t/dpkg_buildpackage/test-source_0_any.hook18
-rw-r--r--scripts/t/dpkg_buildpackage/test-source_0_binary.changes30
-rw-r--r--scripts/t/dpkg_buildpackage/test-source_0_binary.hook18
-rw-r--r--scripts/t/dpkg_buildpackage/test-source_0_full.changes36
-rw-r--r--scripts/t/dpkg_buildpackage/test-source_0_full.hook18
-rw-r--r--scripts/t/dpkg_buildpackage/test-source_0_source.changes26
-rw-r--r--scripts/t/dpkg_buildpackage/test-source_0_source.hook16
13 files changed, 272 insertions, 0 deletions
diff --git a/scripts/t/dpkg_buildpackage/dpkgdb/status b/scripts/t/dpkg_buildpackage/dpkgdb/status
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/scripts/t/dpkg_buildpackage/dpkgdb/status
diff --git a/scripts/t/dpkg_buildpackage/hook b/scripts/t/dpkg_buildpackage/hook
new file mode 100755
index 0000000..9623311
--- /dev/null
+++ b/scripts/t/dpkg_buildpackage/hook
@@ -0,0 +1,25 @@
+#!/bin/sh
+self="$(basename "$0")"
+from="$(dirname "$0")"
+case "$DPKG_BUILDPACKAGE_HOOK_NAME" in
+source)
+ echo "$self: source-opts=$DPKG_BUILDPACKAGE_HOOK_SOURCE_OPTIONS"
+ ;;
+build)
+ echo "$self: build-target=$DPKG_BUILDPACKAGE_HOOK_BUILD_TARGET"
+ ;;
+binary)
+ echo "$self: binary-target=$DPKG_BUILDPACKAGE_HOOK_BINARY_TARGET"
+ ;;
+buildinfo)
+ echo "$self: buildinfo-opts=$DPKG_BUILDPACKAGE_HOOK_BUILDINFO_OPTIONS" \
+ | perl -p -E "s{\Q$from\E}{<ROOT>}g"
+ ;;
+changes)
+ echo "$self: changes-opts=$DPKG_BUILDPACKAGE_HOOK_CHANGES_OPTIONS"
+ ;;
+check)
+ echo "$self: check-opts=$DPKG_BUILDPACKAGE_HOOK_CHECK_OPTIONS"
+ ;;
+esac
+echo "$self: n=$DPKG_BUILDPACKAGE_HOOK_NAME $*"
diff --git a/scripts/t/dpkg_buildpackage/test-source_0.dsc b/scripts/t/dpkg_buildpackage/test-source_0.dsc
new file mode 100644
index 0000000..fe5b4f8
--- /dev/null
+++ b/scripts/t/dpkg_buildpackage/test-source_0.dsc
@@ -0,0 +1,15 @@
+Format: 3.0 (native)
+Source: test-source
+Binary: test-binary-all, test-binary-any
+Architecture: any all
+Version: 0
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Package-List:
+ test-binary-all deb test optional arch=all
+ test-binary-any deb test optional arch=any
+Checksums-Sha1:
+ 0000000000000000000000000000000000000000 0 test-source_0.tar.xz
+Checksums-Sha256:
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-source_0.tar.xz
+Files:
+ 00000000000000000000000000000000 0 test-source_0.tar.xz
diff --git a/scripts/t/dpkg_buildpackage/test-source_0_all.changes b/scripts/t/dpkg_buildpackage/test-source_0_all.changes
new file mode 100644
index 0000000..c6c444f
--- /dev/null
+++ b/scripts/t/dpkg_buildpackage/test-source_0_all.changes
@@ -0,0 +1,26 @@
+Format: 1.8
+Date: Thu, 30 Jun 2016 20:15:12 +0200
+Source: test-source
+Binary: test-binary-all
+Architecture: all
+Version: 0
+Distribution: unstable
+Urgency: low
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Changed-By: Dpkg Developers <debian-dpkg@lists.debian.org>
+Description:
+ test-binary-all - architecture independent binary package
+Closes: 12345
+Changes:
+ test-source (0) unstable; urgency=low
+ .
+ * Entry. Closes: #12345
+Checksums-Sha1:
+ 0000000000000000000000000000000000000000 0 test-binary-all_0_all.deb
+ 0000000000000000000000000000000000000000 0 test-source_0_all.buildinfo
+Checksums-Sha256:
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-binary-all_0_all.deb
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-source_0_all.buildinfo
+Files:
+ 00000000000000000000000000000000 0 test optional test-binary-all_0_all.deb
+ 00000000000000000000000000000000 0 test optional test-source_0_all.buildinfo
diff --git a/scripts/t/dpkg_buildpackage/test-source_0_all.hook b/scripts/t/dpkg_buildpackage/test-source_0_all.hook
new file mode 100644
index 0000000..4dc28d8
--- /dev/null
+++ b/scripts/t/dpkg_buildpackage/test-source_0_all.hook
@@ -0,0 +1,18 @@
+hook: n=preinit a=1 p= v= s= u=
+hook: n=init a=1 p=test-source v=0 s=0 u=0
+hook: n=preclean a=1 p=test-source v=0 s=0 u=0
+hook: source-opts=
+hook: n=source a=0 p=test-source v=0 s=0 u=0
+hook: build-target=build-indep
+hook: n=build a=1 p=test-source v=0 s=0 u=0
+hook: binary-target=binary-indep
+hook: n=binary a=1 p=test-source v=0 s=0 u=0
+hook: buildinfo-opts=--build=all --admindir=<ROOT>/dpkgdb -O../test-source_0_all.buildinfo
+hook: n=buildinfo a=1 p=test-source v=0 s=0 u=0
+hook: changes-opts=--build=all -O../test-source_0_all.changes
+hook: n=changes a=1 p=test-source v=0 s=0 u=0
+hook: n=postclean a=0 p=test-source v=0 s=0 u=0
+hook: check-opts=
+hook: n=check a=0 p=test-source v=0 s=0 u=0
+hook: n=sign a=0 p=test-source v=0 s=0 u=0
+hook: n=done a=1 p=test-source v=0 s=0 u=0
diff --git a/scripts/t/dpkg_buildpackage/test-source_0_any.changes b/scripts/t/dpkg_buildpackage/test-source_0_any.changes
new file mode 100644
index 0000000..d67460c
--- /dev/null
+++ b/scripts/t/dpkg_buildpackage/test-source_0_any.changes
@@ -0,0 +1,26 @@
+Format: 1.8
+Date: Thu, 30 Jun 2016 20:15:12 +0200
+Source: test-source
+Binary: test-binary-any
+Architecture: amd64
+Version: 0
+Distribution: unstable
+Urgency: low
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Changed-By: Dpkg Developers <debian-dpkg@lists.debian.org>
+Description:
+ test-binary-any - architecture dependent binary package
+Closes: 12345
+Changes:
+ test-source (0) unstable; urgency=low
+ .
+ * Entry. Closes: #12345
+Checksums-Sha1:
+ 0000000000000000000000000000000000000000 0 test-binary-any_0_amd64.deb
+ 0000000000000000000000000000000000000000 0 test-source_0_amd64.buildinfo
+Checksums-Sha256:
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-binary-any_0_amd64.deb
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-source_0_amd64.buildinfo
+Files:
+ 00000000000000000000000000000000 0 test optional test-binary-any_0_amd64.deb
+ 00000000000000000000000000000000 0 test optional test-source_0_amd64.buildinfo
diff --git a/scripts/t/dpkg_buildpackage/test-source_0_any.hook b/scripts/t/dpkg_buildpackage/test-source_0_any.hook
new file mode 100644
index 0000000..430fbcd
--- /dev/null
+++ b/scripts/t/dpkg_buildpackage/test-source_0_any.hook
@@ -0,0 +1,18 @@
+hook: n=preinit a=1 p= v= s= u=
+hook: n=init a=1 p=test-source v=0 s=0 u=0
+hook: n=preclean a=1 p=test-source v=0 s=0 u=0
+hook: source-opts=
+hook: n=source a=0 p=test-source v=0 s=0 u=0
+hook: build-target=build-arch
+hook: n=build a=1 p=test-source v=0 s=0 u=0
+hook: binary-target=binary-arch
+hook: n=binary a=1 p=test-source v=0 s=0 u=0
+hook: buildinfo-opts=--build=any --admindir=<ROOT>/dpkgdb -O../test-source_0_amd64.buildinfo
+hook: n=buildinfo a=1 p=test-source v=0 s=0 u=0
+hook: changes-opts=--build=any -O../test-source_0_amd64.changes
+hook: n=changes a=1 p=test-source v=0 s=0 u=0
+hook: n=postclean a=0 p=test-source v=0 s=0 u=0
+hook: check-opts=
+hook: n=check a=0 p=test-source v=0 s=0 u=0
+hook: n=sign a=0 p=test-source v=0 s=0 u=0
+hook: n=done a=1 p=test-source v=0 s=0 u=0
diff --git a/scripts/t/dpkg_buildpackage/test-source_0_binary.changes b/scripts/t/dpkg_buildpackage/test-source_0_binary.changes
new file mode 100644
index 0000000..7470ce5
--- /dev/null
+++ b/scripts/t/dpkg_buildpackage/test-source_0_binary.changes
@@ -0,0 +1,30 @@
+Format: 1.8
+Date: Thu, 30 Jun 2016 20:15:12 +0200
+Source: test-source
+Binary: test-binary-all test-binary-any
+Architecture: all amd64
+Version: 0
+Distribution: unstable
+Urgency: low
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Changed-By: Dpkg Developers <debian-dpkg@lists.debian.org>
+Description:
+ test-binary-all - architecture independent binary package
+ test-binary-any - architecture dependent binary package
+Closes: 12345
+Changes:
+ test-source (0) unstable; urgency=low
+ .
+ * Entry. Closes: #12345
+Checksums-Sha1:
+ 0000000000000000000000000000000000000000 0 test-binary-all_0_all.deb
+ 0000000000000000000000000000000000000000 0 test-binary-any_0_amd64.deb
+ 0000000000000000000000000000000000000000 0 test-source_0_amd64.buildinfo
+Checksums-Sha256:
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-binary-all_0_all.deb
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-binary-any_0_amd64.deb
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-source_0_amd64.buildinfo
+Files:
+ 00000000000000000000000000000000 0 test optional test-binary-all_0_all.deb
+ 00000000000000000000000000000000 0 test optional test-binary-any_0_amd64.deb
+ 00000000000000000000000000000000 0 test optional test-source_0_amd64.buildinfo
diff --git a/scripts/t/dpkg_buildpackage/test-source_0_binary.hook b/scripts/t/dpkg_buildpackage/test-source_0_binary.hook
new file mode 100644
index 0000000..cf5be4f
--- /dev/null
+++ b/scripts/t/dpkg_buildpackage/test-source_0_binary.hook
@@ -0,0 +1,18 @@
+hook: n=preinit a=1 p= v= s= u=
+hook: n=init a=1 p=test-source v=0 s=0 u=0
+hook: n=preclean a=1 p=test-source v=0 s=0 u=0
+hook: source-opts=
+hook: n=source a=0 p=test-source v=0 s=0 u=0
+hook: build-target=build
+hook: n=build a=1 p=test-source v=0 s=0 u=0
+hook: binary-target=binary
+hook: n=binary a=1 p=test-source v=0 s=0 u=0
+hook: buildinfo-opts=--build=binary --admindir=<ROOT>/dpkgdb -O../test-source_0_amd64.buildinfo
+hook: n=buildinfo a=1 p=test-source v=0 s=0 u=0
+hook: changes-opts=--build=binary -O../test-source_0_amd64.changes
+hook: n=changes a=1 p=test-source v=0 s=0 u=0
+hook: n=postclean a=0 p=test-source v=0 s=0 u=0
+hook: check-opts=
+hook: n=check a=0 p=test-source v=0 s=0 u=0
+hook: n=sign a=0 p=test-source v=0 s=0 u=0
+hook: n=done a=1 p=test-source v=0 s=0 u=0
diff --git a/scripts/t/dpkg_buildpackage/test-source_0_full.changes b/scripts/t/dpkg_buildpackage/test-source_0_full.changes
new file mode 100644
index 0000000..fef013c
--- /dev/null
+++ b/scripts/t/dpkg_buildpackage/test-source_0_full.changes
@@ -0,0 +1,36 @@
+Format: 1.8
+Date: Thu, 30 Jun 2016 20:15:12 +0200
+Source: test-source
+Binary: test-binary-all test-binary-any
+Architecture: source all amd64
+Version: 0
+Distribution: unstable
+Urgency: low
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Changed-By: Dpkg Developers <debian-dpkg@lists.debian.org>
+Description:
+ test-binary-all - architecture independent binary package
+ test-binary-any - architecture dependent binary package
+Closes: 12345
+Changes:
+ test-source (0) unstable; urgency=low
+ .
+ * Entry. Closes: #12345
+Checksums-Sha1:
+ 0000000000000000000000000000000000000000 0 test-source_0.dsc
+ 0000000000000000000000000000000000000000 0 test-source_0.tar.xz
+ 0000000000000000000000000000000000000000 0 test-binary-all_0_all.deb
+ 0000000000000000000000000000000000000000 0 test-binary-any_0_amd64.deb
+ 0000000000000000000000000000000000000000 0 test-source_0_amd64.buildinfo
+Checksums-Sha256:
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-source_0.dsc
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-source_0.tar.xz
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-binary-all_0_all.deb
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-binary-any_0_amd64.deb
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-source_0_amd64.buildinfo
+Files:
+ 00000000000000000000000000000000 0 test optional test-source_0.dsc
+ 00000000000000000000000000000000 0 test optional test-source_0.tar.xz
+ 00000000000000000000000000000000 0 test optional test-binary-all_0_all.deb
+ 00000000000000000000000000000000 0 test optional test-binary-any_0_amd64.deb
+ 00000000000000000000000000000000 0 test optional test-source_0_amd64.buildinfo
diff --git a/scripts/t/dpkg_buildpackage/test-source_0_full.hook b/scripts/t/dpkg_buildpackage/test-source_0_full.hook
new file mode 100644
index 0000000..086300d
--- /dev/null
+++ b/scripts/t/dpkg_buildpackage/test-source_0_full.hook
@@ -0,0 +1,18 @@
+hook: n=preinit a=1 p= v= s= u=
+hook: n=init a=1 p=test-source v=0 s=0 u=0
+hook: n=preclean a=1 p=test-source v=0 s=0 u=0
+hook: source-opts=
+hook: n=source a=1 p=test-source v=0 s=0 u=0
+hook: build-target=build
+hook: n=build a=1 p=test-source v=0 s=0 u=0
+hook: binary-target=binary
+hook: n=binary a=1 p=test-source v=0 s=0 u=0
+hook: buildinfo-opts=--build=full --admindir=<ROOT>/dpkgdb -O../test-source_0_amd64.buildinfo
+hook: n=buildinfo a=1 p=test-source v=0 s=0 u=0
+hook: changes-opts=--build=full -O../test-source_0_amd64.changes
+hook: n=changes a=1 p=test-source v=0 s=0 u=0
+hook: n=postclean a=0 p=test-source v=0 s=0 u=0
+hook: check-opts=
+hook: n=check a=0 p=test-source v=0 s=0 u=0
+hook: n=sign a=0 p=test-source v=0 s=0 u=0
+hook: n=done a=1 p=test-source v=0 s=0 u=0
diff --git a/scripts/t/dpkg_buildpackage/test-source_0_source.changes b/scripts/t/dpkg_buildpackage/test-source_0_source.changes
new file mode 100644
index 0000000..8c2f3d1
--- /dev/null
+++ b/scripts/t/dpkg_buildpackage/test-source_0_source.changes
@@ -0,0 +1,26 @@
+Format: 1.8
+Date: Thu, 30 Jun 2016 20:15:12 +0200
+Source: test-source
+Architecture: source
+Version: 0
+Distribution: unstable
+Urgency: low
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Changed-By: Dpkg Developers <debian-dpkg@lists.debian.org>
+Closes: 12345
+Changes:
+ test-source (0) unstable; urgency=low
+ .
+ * Entry. Closes: #12345
+Checksums-Sha1:
+ 0000000000000000000000000000000000000000 0 test-source_0.dsc
+ 0000000000000000000000000000000000000000 0 test-source_0.tar.xz
+ 0000000000000000000000000000000000000000 0 test-source_0_source.buildinfo
+Checksums-Sha256:
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-source_0.dsc
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-source_0.tar.xz
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-source_0_source.buildinfo
+Files:
+ 00000000000000000000000000000000 0 test optional test-source_0.dsc
+ 00000000000000000000000000000000 0 test optional test-source_0.tar.xz
+ 00000000000000000000000000000000 0 test optional test-source_0_source.buildinfo
diff --git a/scripts/t/dpkg_buildpackage/test-source_0_source.hook b/scripts/t/dpkg_buildpackage/test-source_0_source.hook
new file mode 100644
index 0000000..eb7387a
--- /dev/null
+++ b/scripts/t/dpkg_buildpackage/test-source_0_source.hook
@@ -0,0 +1,16 @@
+hook: n=preinit a=1 p= v= s= u=
+hook: n=init a=1 p=test-source v=0 s=0 u=0
+hook: n=preclean a=1 p=test-source v=0 s=0 u=0
+hook: source-opts=
+hook: n=source a=1 p=test-source v=0 s=0 u=0
+hook: build-target=
+hook: n=build a=0 p=test-source v=0 s=0 u=0
+hook: buildinfo-opts=--build=source --admindir=<ROOT>/dpkgdb -O../test-source_0_source.buildinfo
+hook: n=buildinfo a=1 p=test-source v=0 s=0 u=0
+hook: changes-opts=--build=source -O../test-source_0_source.changes
+hook: n=changes a=1 p=test-source v=0 s=0 u=0
+hook: n=postclean a=0 p=test-source v=0 s=0 u=0
+hook: check-opts=
+hook: n=check a=0 p=test-source v=0 s=0 u=0
+hook: n=sign a=0 p=test-source v=0 s=0 u=0
+hook: n=done a=1 p=test-source v=0 s=0 u=0