summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/README.source18
-rw-r--r--debian/changelog509
-rw-r--r--debian/control36
-rw-r--r--debian/copyright34
-rw-r--r--debian/dmidecode-udeb.install1
-rw-r--r--debian/dmidecode.docs2
-rw-r--r--debian/dmidecode.install1
-rw-r--r--debian/patches/0001-hurd.patch16
-rw-r--r--debian/patches/0005-build.patch25
-rw-r--r--debian/patches/0100-ansi-c.patch18
-rw-r--r--debian/patches/0105-dmidecode-avoid-sigbus.patch50
-rw-r--r--debian/patches/0110-nosysfs.patch32
-rw-r--r--debian/patches/0115-no_smbios_DMI_entry_point.patch55
-rw-r--r--debian/patches/0120-return_actual_data_size.patch103
-rw-r--r--debian/patches/0125-use_read_file_to_read_DMI_table_from_sysfs.patch78
-rw-r--r--debian/patches/0130-use_DWORD_for_table_max_size.patch27
-rw-r--r--debian/patches/0135-hide_fixup_msg.patch46
-rw-r--r--debian/patches/0140-Fix_scan_entry_point.patch54
-rw-r--r--debian/patches/series11
-rwxr-xr-xdebian/rules24
-rw-r--r--debian/source/format1
-rw-r--r--debian/source/include-binaries1
-rw-r--r--debian/tests/control4
-rw-r--r--debian/upstream/metadata6
-rw-r--r--debian/upstream/signing-key.asc68
-rw-r--r--debian/watch3
26 files changed, 1223 insertions, 0 deletions
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..e4f2b3d
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,18 @@
+Hello,
+
+now I use the branching model from Vincent Driessen[1].
+
+I use the gitflow-avh[2]. with the Documentation[3].
+The Debian package can be found here[4].
+
+Please upload unattended uploads use a branch feature/<your title>.
+
+
+Many thanks.
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Fri, 02 Jun 2017 19:00:40 +0200
+
+[1] http://nvie.com/posts/a-successful-git-branching-model/
+[2] https://github.com/petervanderdoes/gitflow-avh
+[3] https://github.com/petervanderdoes/gitflow-avh/wiki
+[4] https://tracker.debian.org/pkg/git-flow
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..93c7256
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,509 @@
+dmidecode (3.2-4) unstable; urgency=medium
+
+ * Add "Restrictions: superficial" to debian/tests/control (Closes: #969819).
+
+ -- Jörg Frings-Fürst <debian@jff.email> Mon, 14 Sep 2020 14:18:46 +0200
+
+dmidecode (3.2-3) unstable; urgency=medium
+
+ * Fix Scan only /dev/mem for entry point on x86 (Closes: #946911):
+ - New debian/patches/0140-Fix_scan_entry_point.patch (Cherry picked from
+ upstream Commit e12ec26e19e02281d3e7258c3aabb88a5cf5ec1d.
+ * Declare compliance with Debian Policy 4.4.1.2 (No changes needed).
+ * Add Smoketest:
+ - New debian/tests/control.
+ * Switch to debhelper-compat:
+ - debian/control: Replace debhelper with debhelper-compat.
+ - Remove debian/compat.
+ * debian/control: Add Rules-Requires-Root.
+ * Refresh debian/copyright.
+
+ -- Jörg Frings-Fürst <debian@jff.email> Mon, 23 Dec 2019 18:56:41 +0100
+
+dmidecode (3.2-2) unstable; urgency=medium
+
+ * Mark dmidecode Multi-Arch: foreign (Closes: #929455).
+ - Thanks to: Helmut Grohne <helmut@subdivi.de>.
+ * Declare compliance with Debian Policy 4.4.0 (No changes needed).
+ * debian/copyright:
+ - Add year 2019 to debian/*.
+ * Migrate to debhelper 12:
+ - Change debian/compat to 12.
+ - Bump minimum debhelper version in debian/control to >= 12.
+ - debian/rules: Remove obsolete dh_install --fail-missing.
+
+ -- Jörg Frings-Fürst <debian@jff.email> Thu, 11 Jul 2019 20:30:31 +0200
+
+dmidecode (3.2-1) unstable; urgency=medium
+
+ * New upstream release:
+ - Refresh patches.
+ * Declare compliance with Debian Policy 4.2.1 (No changes needed).
+ * debian/dmidecode.docs:
+ - Add README.
+ * debian/copyright:
+ - Add year 2018 to * for Jean Delvare <jdelvare@suse.de>.
+
+ -- Jörg Frings-Fürst <debian@jff.email> Sun, 07 Oct 2018 06:05:15 +0200
+
+dmidecode (3.1-2) unstable; urgency=medium
+
+ * debian/control:
+ - Change to my new email address.
+ - Use secure homepage URI.
+ - Switch Vcs-* to new location (Closes: #902259).
+ * debian/copyright:
+ - Change to my new email address.
+ - Use secure copyright format URI.
+ - Add year 2018 to debian/*.
+ * debian/rules:
+ - Add "export DEB_CFLAGS_MAINT_APPEND = -fPIE" and
+ "export DEB_LDFLAGS_MAINT_APPEND = -fPIE -pie" to fix missing CFLAGS
+ and LDFLAGS.
+ * debian/watch:
+ - Use secure URI.
+ - Switch to version 4.
+ * Declare compliance with Debian Policy 4.1.5 (No changes needed).
+ * Migrate to debhelper 11:
+ - Change debian/compat to 11.
+ - Bump minimum debhelper version in debian/control to >= 11.
+
+ -- Jörg Frings-Fürst <debian@jff.email> Sun, 05 Aug 2018 20:22:07 +0200
+
+dmidecode (3.1-1) unstable; urgency=medium
+
+ * New upstream release (LP: #1688162) (Closes: #860897):
+ - Remove applied patches:
+ + debian/patches/0110-nosysfs.patch
+ + debian/patches/0115-no_smbios_DMI_entry_point.patch
+ + debian/patches/0120-return_actual_data_size.patch
+ + debian/patches/0125-use_read_file_to_read_DMI_table_from_sysfs.patch
+ + debian/patches/0130-use_DWORD_for_table_max_size.patch
+ + debian/patches/0135-hide_fixup_msg.patch
+ * debian/copyright:
+ - Add year 2017.
+ - Change upstream email address.
+ * debian/control:
+ - Change Homepage.
+ * Migrate to debhelper 10:
+ - Change debian/compat to 10.
+ - Bump minimum debhelper version in debian/control to >= 10.
+ * Use the automatic debug symbol packages:
+ - Remove dmidecode-dbg section from debian/control.
+ - Remove override_dh_strip from debian/rules.
+ * New README.source to explain the branching model used.
+ * Declare compliance with Debian Policy 4.0.0. (No changes needed).
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Sat, 24 Jun 2017 23:21:09 +0200
+
+dmidecode (3.0-4) unstable; urgency=medium
+
+ * debian/rules: Fix FTCBFS to pass suitable CC to make. (Closes: #835921).
+ Thanks to Helmut Grohne <helmut@subdivi.de>.
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Thu, 01 Sep 2016 04:59:53 +0200
+
+dmidecode (3.0-3) unstable; urgency=medium
+
+ * Rename patches.
+ * Add recommended patches from upstream (Closes: #824180):
+ - debian/patches/0110-nosysfs.patch
+ - debian/patches/0115-no_smbios_DMI_entry_point.patch
+ - debian/patches/0120-return_actual_data_size.patch
+ - debian/patches/0125-use_read_file_to_read_DMI_table_from_sysfs.patch
+ - debian/patches/0130-use_DWORD_for_table_max_size.patch
+ - debian/patches/0135-hide_fixup_msg.patch
+ * debian/control:
+ - Bump Standards-Version to 3.9.8 (no changes required).
+ - Change Vcs-* to secure URIs.
+ * debian/copyright:
+ - Add year 2016.
+ - Add new upstream author Xie XiuQi <xiexiuqi@huawei.com>.
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Sun, 15 May 2016 18:33:09 +0200
+
+dmidecode (3.0-2) unstable; urgency=medium
+
+ * New debian/patches/05-dmidecode-avoid-sigbus.patch (Closes: #796963):
+ - Avoid SIGBUS on mmap failure
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Thu, 01 Oct 2015 10:01:04 +0200
+
+dmidecode (3.0-1) unstable; urgency=medium
+
+ * Correct typo at debian/changelog.
+ * New upstream release.
+ - Refresh patches:
+ + debian/patches/02-hurd.patch
+ + debian/patches/03-build.patch
+ - Remove applied patches:
+ + debian/patches/04-manpage-hyphen.patch
+ + debian/patches/05-supported-smbios-ver.patch
+ * debian/watch:
+ - Add opts for signing key.
+ - Force upload as xz archive.
+ * New debian/upstream/signing-key.pgp.
+ * New debian/source/include-binaries:
+ - Add debian/upstream/signing-key.pgp.
+ * New debian/upstream/metadata:
+ - Add some DEP-12 upstream metadata.
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Tue, 29 Sep 2015 05:42:43 +0200
+
+dmidecode (2.12-4) unstable; urgency=low
+
+ * debian/control:
+ - Bump Standards-Version to 3.9.6 (no changes required).
+ - Add arm64 to Architecture (Closes: #767965 ).
+ - Remove unwanted debian/source/options.
+ - Change Vcs-* to new cgit based repository viewer.
+ * debian/copyright:
+ - Add year 2015.
+ * debian/rules:
+ - Remove override_dh_builddeb because compression xz is now standard.
+ * debian/patches/05-supported-smbios-ver.patch:
+ - Add description.
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Mon, 27 Apr 2015 12:05:44 +0200
+
+dmidecode (2.12-3) unstable; urgency=medium
+
+ * debian/control
+ - bump Standards-Version to 3.9.5
+ - add Vcs-*
+ * New Maintainer ( Closes: #748486)
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Mon, 19 May 2014 18:01:43 +0200
+
+dmidecode (2.12-2) unstable; urgency=low
+
+ * Also build for armhf (Closes: #715139).
+
+ -- Luk Claes <luk@debian.org> Thu, 15 Aug 2013 11:24:31 +0200
+
+dmidecode (2.12-1) unstable; urgency=low
+
+ * New upstream version.
+ * Add watch file.
+ * Add upstream patch to kill warnings (Closes: #706004).
+
+ -- Luk Claes <luk@debian.org> Tue, 07 May 2013 08:52:36 +0200
+
+dmidecode (2.11+20120326-3) unstable; urgency=low
+
+ * Take over maintenance with maintainer's consent.
+
+ -- Luk Claes <luk@debian.org> Sun, 10 Mar 2013 21:55:43 +0100
+
+dmidecode (2.11+20120326-2) unstable; urgency=low
+
+ * Updating GPL boilerplate in copyright file.
+ * Switching to xz compression.
+
+ -- Daniel Baumann <daniel.baumann@progress-technologies.net> Fri, 29 Jun 2012 04:59:24 +0200
+
+dmidecode (2.11+20120326-1) unstable; urgency=low
+
+ * Merging upstream version 2.11+20120326.
+ * Removing chassis-type.patch, included upstream.
+ * Removing type16-fix.patch, including upstream.
+ * Removing smbios-271.patch, included upstream.
+ * Rediffing manpage-hyphen.patch.
+ * Renumbering patches.
+
+ -- Daniel Baumann <daniel.baumann@progress-technologies.net> Tue, 26 Jun 2012 01:07:02 +0200
+
+dmidecode (2.11-9) unstable; urgency=low
+
+ * Adding debug package.
+
+ -- Daniel Baumann <daniel.baumann@progress-technologies.net> Fri, 18 May 2012 13:29:25 +0200
+
+dmidecode (2.11-8) unstable; urgency=low
+
+ * Using package type instead of custom field for udeb package.
+ * Adding patch to escape hypens in manpage.
+ * Also passing cppflags to make (Closes: #655891).
+
+ -- Daniel Baumann <daniel.baumann@progress-technologies.net> Fri, 18 May 2012 12:36:27 +0200
+
+dmidecode (2.11-7) unstable; urgency=low
+
+ * Updating compression handling for udeb with newer debhelper.
+
+ -- Daniel Baumann <daniel.baumann@progress-technologies.net> Fri, 18 May 2012 08:00:01 +0200
+
+dmidecode (2.11-6) unstable; urgency=low
+
+ * Also passing ldflags to configure to enable all hardening build
+ flags (Closes: #655891).
+ * Updating to standards version 3.9.3.
+ * Updating copyright file machine-readable format version 1.0.
+
+ -- Daniel Baumann <daniel.baumann@progress-technologies.net> Mon, 16 Apr 2012 09:23:37 +0000
+
+dmidecode (2.11-5) unstable; urgency=low
+
+ * Updating year in copyright file.
+ * Updating to debhelper version 9.
+ * Adding patch to avoid overwriting build environment rather than to
+ just extend it.
+ * Simplifying CFLAGS handing in rules.
+ * Enabling hardening build options (Closes: #655891).
+
+ -- Daniel Baumann <daniel.baumann@progress-technologies.net> Sat, 21 Jan 2012 11:16:31 +0100
+
+dmidecode (2.11-4) unstable; urgency=low
+
+ * Using compression level 9 also for binary packages.
+ * Adding patch from Jean Delvare <khali@linux-fr.org> to fix boundary
+ checks of memory array location codes (DMI type 16).
+ * Adding patch from Jean Delvare <khali@linux-fr.org> to update to
+ support SMBIOS specification version 2.7.1.
+ * Sorting overrides in rules alphabetically.
+
+ -- Daniel Baumann <daniel.baumann@progress-technologies.net> Fri, 28 Oct 2011 21:54:37 +0200
+
+dmidecode (2.11-3) unstable; urgency=low
+
+ * Adding patch from Svante Signell <svante.signell@telia.com> to
+ enable build of all targets on GNU/Hurd (Closes: #643649).
+
+ -- Daniel Baumann <daniel.baumann@progress-technologies.net> Wed, 28 Sep 2011 13:03:50 +0200
+
+dmidecode (2.11-2) unstable; urgency=low
+
+ * Adding patch from Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
+ to correctly decode the chassis-type (Closes: #637028).
+
+ -- Daniel Baumann <daniel.baumann@progress-technologies.net> Wed, 28 Sep 2011 06:42:29 +0200
+
+dmidecode (2.11-1) unstable; urgency=low
+
+ * Taking over package from Petter with thanks for his past work on the
+ package.
+ * Merging upstream version 2.11 (Closes: #531843, #639169).
+ * Removing useless whitespaces at EOL and EOF.
+ * Updating to debhelper version 8.
+ * Updating to standards version 3.9.2.
+ * Adding homepage field.
+ * Switching to source format 3.0 (quilt).
+ * Removing pre-squeeze conflict against lm-sensors.
+ * Using architecture patterns (Closes: #480571).
+ * Sorting depends.
+ * Adding misc-depends to udeb.
+ * Removing watch file.
+ * Rewriting package descriptions.
+ * Rewriting copyright file in machine-interpretable format.
+ * Prefixing debhelper files with package name.
+ * Adding authors file to docs.
+ * Minimizing rules file.
+ * Sorting fields in control.
+ * Removing unused debhelper dirs files.
+ * Adding debhelper install files.
+ * Avoid installing readme file, no additional useful content.
+
+ -- Daniel Baumann <daniel.baumann@progress-technologies.net> Tue, 27 Sep 2011 21:23:46 +0200
+
+dmidecode (2.9-1.2) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Correctly set package type for the udeb. Allows to simplify debian/rules
+ and ensures a correct dependency on libc6-udeb. Closes: #562014.
+ * Update debhelper compat to version 6.
+ * Don't ignore errors during 'make clean'.
+
+ -- Frans Pop <fjp@debian.org> Tue, 22 Dec 2009 05:13:24 +0100
+
+dmidecode (2.9-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Fix FTBFS on kfreebsd-amd64 by adding it to the list of supported
+ architectures for the second package (Closes: #493385). Thanks to
+ Petr Salinger.
+
+ -- Cyril Brulebois <kibi@debian.org> Tue, 30 Jun 2009 01:49:22 +0200
+
+dmidecode (2.9-1) unstable; urgency=low
+
+ * New upstream release (Closes: #413747).
+ - Drop patch 30_upstream_20060601 included upstream.
+ - Reintroduce -ansi and extend 20_ansi_c.dpatch to make the source
+ ANSI C compliant again. (Closes: #406031)
+
+ -- Petter Reinholdtsen <pere@debian.org> Fri, 18 May 2007 11:33:24 +0200
+
+dmidecode (2.8-4) unstable; urgency=low
+
+ * Update CFLAGS line, drop -ansi to avoid build failure on
+ ia64 (Closes: #406031), and add -Winline -Wundef to
+ match the upstream makefile. Thanks to Dann Frazier for the clue.
+
+ -- Petter Reinholdtsen <pere@debian.org> Tue, 9 Jan 2007 09:11:26 +0100
+
+dmidecode (2.8-3) unstable; urgency=low
+
+ * New patch 30_upstream_20060601 from upstream CVS.
+ - Detect EFI support at run time, to work properly on x86-based
+ Mac (Closes: #375997)
+ - Avoids unaligned memory access on ia64 and other archs. (Closes: #398473)
+ * Drop the patch to remove the product name lookup table from vpddecode,
+ to avoid user visible changes this late in the debian release.
+ * Drop patch to fix typo in Chassis height, to avoid user visible change.
+ * Update standards-version from 2.6.2 to 2.7.2. No change needed.
+
+ -- Petter Reinholdtsen <pere@debian.org> Sun, 7 Jan 2007 20:07:42 +0100
+
+dmidecode (2.8-2) unstable; urgency=low
+
+ * Add kfreebsd-amd64 to the architecture list. It is claimed to
+ work. (Closes: #355454)
+
+ -- Petter Reinholdtsen <pere@debian.org> Wed, 29 Mar 2006 22:44:20 +0200
+
+dmidecode (2.8-1) unstable; urgency=low
+
+ * New upstream release.
+ * Increased debhelper compat level from 3 to 4.
+ * Add ${misc:Depends} as a dependency.
+
+ -- Petter Reinholdtsen <pere@debian.org> Fri, 10 Feb 2006 21:52:51 +0100
+
+dmidecode (2.7-2) unstable; urgency=low
+
+ * Change priority for dmidecode from optional to important to
+ match override file.
+
+ -- Petter Reinholdtsen <pere@debian.org> Sat, 20 Aug 2005 23:39:08 +0200
+
+dmidecode (2.7-1) unstable; urgency=low
+
+ * New upstream release.
+ - Include new command line interface making it easier for scripts
+ to extract the values they want.
+ - Default output format is slightly changed. This might break existing
+ scripts, which should use the new command line options instead.
+ - Added supprt for more products in vpddecode.
+ * Remove David Z. Maze as uploader on request from Jeroen van
+ Wolffelaar. David is giving up package maintainence.
+ * Removing 30_upstream_20050605 now included in release 2.7.
+ * Updated Standards-Version to 3.6.2. No changes.
+
+ -- Petter Reinholdtsen <pere@debian.org> Sat, 20 Aug 2005 23:20:14 +0200
+
+dmidecode (2.6-2) unstable; urgency=low
+
+ * Add new archs kfreebsd-i386 knetbsd-i386. (Closes: #303511)
+ * Add 30_upstream_20050605.dpatch to get the latest changes
+ from upstream CVS.
+
+ -- Petter Reinholdtsen <pere@debian.org> Sun, 5 Jun 2005 13:51:55 +0200
+
+dmidecode (2.6-1) unstable; urgency=low
+
+ * New Upstream version 2.6.
+ - Fixes signed issue. Dropping obsolete 10_highmem.dpatch.
+ * Updated build rules. Removed -DUSE_MMAP from CFLAGS, as this define is
+ in config.h now.
+ * Update the list of compile flags in the rules tile to match the
+ ones used by upstream.
+ * Add 20_ansi_c.dpatch to get code to compile using -ansi.
+
+ -- Petter Reinholdtsen <pere@debian.org> Thu, 3 Mar 2005 21:24:37 +0100
+
+dmidecode (2.5-2) unstable; urgency=low
+
+ * Fix signed/unsigned issue making dmidecode fail on machines with
+ lots of ram. New patch 10_highmem.dpatch.
+
+ -- Petter Reinholdtsen <pere@debian.org> Sat, 19 Feb 2005 22:55:58 +0100
+
+dmidecode (2.5-1) unstable; urgency=low
+
+ * New upstream version 2.5.
+ - Obsoletes 10_from_upstream_20040716.dpatch. Removed.
+ - Changes in 20_typo_main.dpatch is now in upstream tarball. Removed.
+
+ -- Petter Reinholdtsen <pere@debian.org> Mon, 22 Nov 2004 10:32:13 +0100
+
+dmidecode (2.4-3) unstable; urgency=low
+
+ * Patch main() to avoid compile failure. (Closes: #261322)
+ * Add some compiler flags to get more warnings.
+
+ -- Petter Reinholdtsen <pere@debian.org> Sun, 25 Jul 2004 08:51:16 +0200
+
+dmidecode (2.4-2) unstable; urgency=low
+
+ * Add amd64 as a build architecture. (Closes: #252318)
+ * Add patch 10_from_upstream_20040716.dpatch fetched from
+ upstream CVS. Removed patch 10_install_rules.dpatch now included
+ in upstream CVS.
+ * Build dmidecode-udeb. Not using debhelper udeb support to make
+ sure the package is still buildable in Woody. Stole some code
+ from discover1 to make sure the udeb is really an
+ udeb. (Closes: #259265)
+
+ -- Petter Reinholdtsen <pere@debian.org> Tue, 20 Jul 2004 09:56:28 +0200
+
+dmidecode (2.4-1) unstable; urgency=low
+
+ * New upstream version 2.4.
+ - Includes manual pages. (Closes: #221681)
+ * Start using dpatch instead of home-grown patching system. Add
+ build dependency on dpatch. Move local changes into
+ 10-enable-ia64.dpatch.
+ * Add debian/watch to make it easier to discover new versions
+ of the source.
+ * Get rid of lintian warnings.
+ * Changed to use latest standard version (3.6.1.0). No modifications
+ needed.
+ * Remove 10-enable-ia64.dpatch. It is no longer needed, as ia64
+ builds are detected at automatically compile time now.
+ * New 10_install_rules.dpatch making the install rules easier to
+ override, making sure the manual pages are installed in the
+ correct location.
+
+ -- Petter Reinholdtsen <pere@debian.org> Fri, 19 Mar 2004 23:49:07 +0100
+
+dmidecode (2.3-5) unstable; urgency=low
+
+ * Move debian specific patches into debian/patches/, and apply
+ them at build time.
+ * Drop useless BIGENDIAN patch, as this program is untested
+ on big endian machines.
+
+ -- Petter Reinholdtsen <pere@debian.org> Tue, 2 Dec 2003 23:53:19 +0100
+
+dmidecode (2.3-4) unstable; urgency=low
+
+ * Add support for ia64. Patch from Dann Frazier. (Closes: #221782).
+
+ -- Petter Reinholdtsen <pere@debian.org> Thu, 20 Nov 2003 11:30:39 +0100
+
+dmidecode (2.3-3) unstable; urgency=low
+
+ * Conflict with lm-sensors << 2.8.1-2, not <= 2.8.1-2.
+ (Closes: #221071).
+
+ -- Petter Reinholdtsen <pere@debian.org> Mon, 17 Nov 2003 09:19:29 +0100
+
+dmidecode (2.3-2) unstable; urgency=low
+
+ * Remember to include the upstream README in the binary package.
+ * Add David Z. Maze as uploader and co-maintainer.
+ * Add conflict on lm-sensors (<= 2.8.1-2), as the current and
+ previous versions of lm-sensors contained an old version of
+ dmidecode. The next version will depend on dmidecode instead.
+
+ -- Petter Reinholdtsen <pere@debian.org> Tue, 11 Nov 2003 09:55:25 +0100
+
+dmidecode (2.3-1) unstable; urgency=low
+
+ * Initial Release. (Closes: #169842)
+ * Limit arch to i386 for now. I'm not sure if other archs
+ can use these tools.
+ * Upstream is missing manual pages. Patches are welcome. :)
+ * Use <endian.h> to detect if BIGENDIAN should be defined.
+
+ -- Petter Reinholdtsen <pere@debian.org> Sun, 9 Nov 2003 09:54:14 +0100
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..81ebc58
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,36 @@
+Source: dmidecode
+Section: utils
+Priority: optional
+Maintainer: Jörg Frings-Fürst <debian@jff.email>
+Build-Depends: debhelper-compat (= 12)
+Standards-Version: 4.4.1.2
+Rules-Requires-Root: no
+Vcs-Git: git://jff.email/opt/git/dmidecode.git
+Vcs-Browser: https://jff.email/cgit/dmidecode.git/
+Homepage: https://nongnu.org/dmidecode/
+
+Package: dmidecode
+Priority: important
+Architecture: any-amd64 arm64 armhf ia64 any-i386
+Multi-Arch: foreign
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: SMBIOS/DMI table decoder
+ Dmidecode reports information about the system's hardware as described in the
+ system BIOS according to the SMBIOS/DMI standard.
+ .
+ This information typically includes system manufacturer, model name, serial
+ number, BIOS version, asset tag as well as a lot of other details of varying
+ level of interest and reliability depending on the manufacturer. This will
+ often include usage status for the CPU sockets, expansion slots (e.g. AGP, PCI,
+ ISA) and memory module slots, and the list of I/O ports (e.g. serial, parallel,
+ USB).
+ .
+ Beware that DMI data have proven to be too unreliable to be blindly trusted.
+ Dmidecode does not scan the hardware, it only reports what the BIOS told it to.
+
+Package: dmidecode-udeb
+Section: debian-installer
+Architecture: any-amd64 arm64 armhf ia64 any-i386
+Package-Type: udeb
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: SMBIOS/DMI table decoder (udeb)
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..2578c43
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,34 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: dmidecode
+Upstream-Contact: dmidecode-devel@nongnu.org
+Source: http://download.savannah.gnu.org/releases/demidecode/
+
+Files: *
+Copyright: 2002-2019 Jean Delvare <jdelvare@suse.de>
+ 2002 Alan Cox <alan@redhat.com>
+ 2010 Anton Arapov <anton@redhat.com>
+ 2015 Xie XiuQi <xiexiuqi@huawei.com>
+License: GPL-2+
+
+Files: debian/*
+Copyright: 2003-2007 Petter Reinholdtsen <pere@debian.org>
+ 2011-2012 Daniel Baumann <daniel.baumann@progress-technologies.net>
+ 2014-2019 Jörg Frings-Fürst <debian@jff.email>
+License: GPL-2+
+
+License: GPL-2+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ The complete text of the GNU General Public License
+ can be found in /usr/share/common-licenses/GPL-2 file.
diff --git a/debian/dmidecode-udeb.install b/debian/dmidecode-udeb.install
new file mode 100644
index 0000000..ab9f594
--- /dev/null
+++ b/debian/dmidecode-udeb.install
@@ -0,0 +1 @@
+usr/sbin/dmidecode
diff --git a/debian/dmidecode.docs b/debian/dmidecode.docs
new file mode 100644
index 0000000..6f12db5
--- /dev/null
+++ b/debian/dmidecode.docs
@@ -0,0 +1,2 @@
+AUTHORS
+README
diff --git a/debian/dmidecode.install b/debian/dmidecode.install
new file mode 100644
index 0000000..73752c9
--- /dev/null
+++ b/debian/dmidecode.install
@@ -0,0 +1 @@
+usr
diff --git a/debian/patches/0001-hurd.patch b/debian/patches/0001-hurd.patch
new file mode 100644
index 0000000..236cdea
--- /dev/null
+++ b/debian/patches/0001-hurd.patch
@@ -0,0 +1,16 @@
+Author: Svante Signell <svante.signell@telia.com>
+Description: Enable build of all targets on GNU/Hurd (Closes: #643649).
+
+Index: trunk/Makefile
+===================================================================
+--- trunk.orig/Makefile
++++ trunk/Makefile
+@@ -43,7 +43,7 @@ INSTALL_PROGRAM := $(INSTALL) -m 755
+ RM := rm -f
+
+ # BSD make provides $MACHINE, but GNU make doesn't
+-MACHINE ?= $(shell uname -m 2>/dev/null)
++MACHINE ?= $(shell uname -m 2>/dev/null | cut - -d- -f 1)
+
+ # These programs are only useful on x86
+ PROGRAMS-i386 := biosdecode ownership vpddecode
diff --git a/debian/patches/0005-build.patch b/debian/patches/0005-build.patch
new file mode 100644
index 0000000..b9361eb
--- /dev/null
+++ b/debian/patches/0005-build.patch
@@ -0,0 +1,25 @@
+Author: Daniel Baumann <daniel.baumann@progress-technologies.net>
+Description: Avoid overwriting build environment rather than to just extend it.
+
+Index: trunk/Makefile
+===================================================================
+--- trunk.orig/Makefile
++++ trunk/Makefile
+@@ -13,7 +13,7 @@
+ #
+
+ CC = gcc
+-CFLAGS = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
++CFLAGS += -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
+ -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef
+
+ # Let lseek and mmap support 64-bit wide offsets
+@@ -27,7 +27,7 @@ CFLAGS += -O2
+ #CFLAGS += -g
+
+ # Pass linker flags here
+-LDFLAGS =
++#LDFLAGS =
+
+ DESTDIR =
+ prefix = /usr/local
diff --git a/debian/patches/0100-ansi-c.patch b/debian/patches/0100-ansi-c.patch
new file mode 100644
index 0000000..9a2345c
--- /dev/null
+++ b/debian/patches/0100-ansi-c.patch
@@ -0,0 +1,18 @@
+Author: Petter Reinholdtsen <pere@hungry.com>
+Description:
+ Make sure the code compiles when using -ansi. Renames non-ANSI C 'inline' to
+ '__inline'.
+
+Index: trunk/types.h
+===================================================================
+--- trunk.orig/types.h
++++ trunk/types.h
+@@ -31,7 +31,7 @@ typedef struct {
+ #endif
+
+ #if defined(ALIGNMENT_WORKAROUND) || defined(BIGENDIAN)
+-static inline u64 U64(u32 low, u32 high)
++static __inline u64 U64(u32 low, u32 high)
+ {
+ u64 self;
+
diff --git a/debian/patches/0105-dmidecode-avoid-sigbus.patch b/debian/patches/0105-dmidecode-avoid-sigbus.patch
new file mode 100644
index 0000000..518d972
--- /dev/null
+++ b/debian/patches/0105-dmidecode-avoid-sigbus.patch
@@ -0,0 +1,50 @@
+Description: Avoid SIGBUS on mmap failure
+ mmap will fail with SIGBUS if trying to map a non-existent portion of
+ a file. While this should never happen with /dev/mem, it can happen if
+ passing a regular file with option -d. While people should no longer
+ do that, failure gracefully seems better than crashing. So check for
+ the file size before calling mmap.
+Author: Jean Delvare <jdelvare@suse.de>
+Origin: https://savannah.nongnu.org/bugs/download.php?file_id=35008
+Bug: https://savannah.nongnu.org/bugs/index.php?46066
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=796963
+Last-Update: 2015-10-01
+----
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- dmidecode.orig/util.c 2015-09-29 11:27:02.136566009 +0200
++++ dmidecode/util.c 2015-09-29 11:37:24.746191083 +0200
+@@ -152,6 +152,7 @@ void *mem_chunk(off_t base, size_t len,
+ void *p;
+ int fd;
+ #ifdef USE_MMAP
++ struct stat statbuf;
+ off_t mmoffset;
+ void *mmp;
+ #endif
+@@ -169,6 +170,26 @@ void *mem_chunk(off_t base, size_t len,
+ }
+
+ #ifdef USE_MMAP
++ if (fstat(fd, &statbuf) == -1)
++ {
++ fprintf(stderr, "%s: ", devmem);
++ perror("stat");
++ free(p);
++ return NULL;
++ }
++
++ /*
++ * mmap() will fail with SIGBUS if trying to map beyond the end of
++ * the file.
++ */
++ if (S_ISREG(statbuf.st_mode) && base + (off_t)len > statbuf.st_size)
++ {
++ fprintf(stderr, "mmap: Can't map beyond end of file %s\n",
++ devmem);
++ free(p);
++ return NULL;
++ }
++
+ #ifdef _SC_PAGESIZE
+ mmoffset = base % sysconf(_SC_PAGESIZE);
+ #else
diff --git a/debian/patches/0110-nosysfs.patch b/debian/patches/0110-nosysfs.patch
new file mode 100644
index 0000000..04c710a
--- /dev/null
+++ b/debian/patches/0110-nosysfs.patch
@@ -0,0 +1,32 @@
+From 33b5aafc6ee6b5de9f2526fb1cf4b14d1e16e4f0 Mon Sep 17 00:00:00 2001
+From: Roy Franz <roy.franz@linaro.org>
+Date: Thu, 01 Oct 2015 06:41:43 +0000
+Subject: Add "--no-sysfs" option description to -h output
+
+A description of --no-sysfs was not added to the output of "-h" when
+the feature was added, so add it now.
+---
+Index: trunk/CHANGELOG
+===================================================================
+--- trunk.orig/CHANGELOG
++++ trunk/CHANGELOG
+@@ -1,3 +1,7 @@
++2015-10-01 Roy Franz <roy.franz@linaro.org>
++
++ * dmiopt.c: Add "--no-sysfs" option description to -h output.
++
+ 2015-09-03 Jean Delvare <jdelvare@suse.de>
+
+ * version.h: Set version to 3.0.
+Index: trunk/dmiopt.c
+===================================================================
+--- trunk.orig/dmiopt.c
++++ trunk/dmiopt.c
+@@ -314,6 +314,7 @@ void print_help(void)
+ " -u, --dump Do not decode the entries\n"
+ " --dump-bin FILE Dump the DMI data to a binary file\n"
+ " --from-dump FILE Read the DMI data from a binary file\n"
++ " --no-sysfs Do not attempt to read DMI data from sysfs files\n"
+ " -V, --version Display the version and exit\n";
+
+ printf("%s", help);
diff --git a/debian/patches/0115-no_smbios_DMI_entry_point.patch b/debian/patches/0115-no_smbios_DMI_entry_point.patch
new file mode 100644
index 0000000..ecbfc11
--- /dev/null
+++ b/debian/patches/0115-no_smbios_DMI_entry_point.patch
@@ -0,0 +1,55 @@
+From bf7bad24ce141dab5b5acc3ffb98ce5fe4a8e0f9 Mon Sep 17 00:00:00 2001
+From: Xie XiuQi <xiexiuqi@huawei.com>
+Date: Wed, 21 Oct 2015 13:12:50 +0000
+Subject: Fix 'No SMBIOS nor DMI entry point found' on SMBIOS3
+
+address_from_efi may return a SMBIOS or SMBIOS3 format entry
+point, so add this condition.
+---
+Index: trunk/AUTHORS
+===================================================================
+--- trunk.orig/AUTHORS
++++ trunk/AUTHORS
+@@ -19,6 +19,7 @@ Jarod Wilson <jarod@redhat.com>
+ Anton Arapov <anton@redhat.com>
+ Roy Franz <roy.franz@linaro.org>
+ Tyler Bell <tyler.bell@hp.com>
++Xie XiuQi <xiexiuqi@huawei.com>
+
+ MANY THANKS TO (IN CHRONOLOGICAL ORDER)
+ Werner Heuser
+Index: trunk/CHANGELOG
+===================================================================
+--- trunk.orig/CHANGELOG
++++ trunk/CHANGELOG
+@@ -1,3 +1,7 @@
++2015-10-21 Xie XiuQi <xiexiuqi@huawei.com>
++
++ * dmidecode.c: Handle SMBIOS 3.0 entry points on EFI systems.
++
+ 2015-10-01 Roy Franz <roy.franz@linaro.org>
+
+ * dmiopt.c: Add "--no-sysfs" option description to -h output.
+Index: trunk/dmidecode.c
+===================================================================
+--- trunk.orig/dmidecode.c
++++ trunk/dmidecode.c
+@@ -4864,8 +4864,16 @@ int main(int argc, char * const argv[])
+ goto exit_free;
+ }
+
+- if (smbios_decode(buf, opt.devmem, 0))
+- found++;
++ if (memcmp(buf, "_SM3_", 5) == 0)
++ {
++ if (smbios3_decode(buf, opt.devmem, 0))
++ found++;
++ }
++ else if (memcmp(buf, "_SM_", 4) == 0)
++ {
++ if (smbios_decode(buf, opt.devmem, 0))
++ found++;
++ }
+ goto done;
+
+ memory_scan:
diff --git a/debian/patches/0120-return_actual_data_size.patch b/debian/patches/0120-return_actual_data_size.patch
new file mode 100644
index 0000000..dc539d9
--- /dev/null
+++ b/debian/patches/0120-return_actual_data_size.patch
@@ -0,0 +1,103 @@
+From de9a74e1c60210bee229fcf55b1678a99d1b44dd Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Mon, 02 Nov 2015 08:45:26 +0000
+Subject: Let read_file return the actual data size
+
+Let read_file return the actual data size to the caller. This gives
+the caller the possibility to check that the data size is as expected
+and large enough for the purpose, and report to the user if not.
+---
+Index: trunk/CHANGELOG
+===================================================================
+--- trunk.orig/CHANGELOG
++++ trunk/CHANGELOG
+@@ -1,3 +1,8 @@
++2015-11-02 Jean Delvare <jdelvare@suse.de>
++
++ * dmidecode.c, util.c, util.h: Let read_file return the actual data
++ size.
++
+ 2015-10-21 Xie XiuQi <xiexiuqi@huawei.com>
+
+ * dmidecode.c: Handle SMBIOS 3.0 entry points on EFI systems.
+Index: trunk/dmidecode.c
+===================================================================
+--- trunk.orig/dmidecode.c
++++ trunk/dmidecode.c
+@@ -4748,6 +4748,7 @@ int main(int argc, char * const argv[])
+ int ret = 0; /* Returned value */
+ int found = 0;
+ off_t fp;
++ size_t size;
+ int efi;
+ u8 *buf;
+
+@@ -4817,8 +4818,9 @@ int main(int argc, char * const argv[])
+ * contain one of several types of entry points, so read enough for
+ * the largest one, then determine what type it contains.
+ */
++ size = 0x20;
+ if (!(opt.flags & FLAG_NO_SYSFS)
+- && (buf = read_file(0x20, SYS_ENTRY_FILE)) != NULL)
++ && (buf = read_file(&size, SYS_ENTRY_FILE)) != NULL)
+ {
+ if (!(opt.flags & FLAG_QUIET))
+ printf("Getting SMBIOS data from sysfs.\n");
+Index: trunk/util.c
+===================================================================
+--- trunk.orig/util.c
++++ trunk/util.c
+@@ -94,10 +94,11 @@ int checksum(const u8 *buf, size_t len)
+ * needs to be freed by the caller.
+ * This provides a similar usage model to mem_chunk()
+ *
+- * Returns pointer to buffer of max_len bytes, or NULL on error
++ * Returns pointer to buffer of max_len bytes, or NULL on error, and
++ * sets max_len to the length actually read.
+ *
+ */
+-void *read_file(size_t max_len, const char *filename)
++void *read_file(size_t *max_len, const char *filename)
+ {
+ int fd;
+ size_t r2 = 0;
+@@ -115,7 +116,7 @@ void *read_file(size_t max_len, const ch
+ return(NULL);
+ }
+
+- if ((p = malloc(max_len)) == NULL)
++ if ((p = malloc(*max_len)) == NULL)
+ {
+ perror("malloc");
+ return NULL;
+@@ -123,7 +124,7 @@ void *read_file(size_t max_len, const ch
+
+ do
+ {
+- r = read(fd, p + r2, max_len - r2);
++ r = read(fd, p + r2, *max_len - r2);
+ if (r == -1)
+ {
+ if (errno != EINTR)
+@@ -140,6 +141,8 @@ void *read_file(size_t max_len, const ch
+ while (r != 0);
+
+ close(fd);
++ *max_len = r2;
++
+ return p;
+ }
+
+Index: trunk/util.h
+===================================================================
+--- trunk.orig/util.h
++++ trunk/util.h
+@@ -25,7 +25,7 @@
+ #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
+
+ int checksum(const u8 *buf, size_t len);
+-void *read_file(size_t len, const char *filename);
++void *read_file(size_t *len, const char *filename);
+ void *mem_chunk(off_t base, size_t len, const char *devmem);
+ int write_dump(size_t base, size_t len, const void *data, const char *dumpfile, int add);
+ u64 u64_range(u64 start, u64 end);
diff --git a/debian/patches/0125-use_read_file_to_read_DMI_table_from_sysfs.patch b/debian/patches/0125-use_read_file_to_read_DMI_table_from_sysfs.patch
new file mode 100644
index 0000000..fe01f63
--- /dev/null
+++ b/debian/patches/0125-use_read_file_to_read_DMI_table_from_sysfs.patch
@@ -0,0 +1,78 @@
+From 364055211b1956539c6a6268e111e244e1292c8c Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Mon, 02 Nov 2015 08:45:31 +0000
+Subject: dmidecode: Use read_file() to read the DMI table from sysfs
+
+We shouldn't use mem_chunk() to read the DMI table from sysfs. This
+will fail for SMBIOS v3 implementations which specify a maximum length
+for the table rather than its exact length. The kernel will trim the
+table to the actual length, so the DMI file will be shorter than the
+length announced in entry point.
+
+read_file() fits the bill in this case, as it deals with end of file
+nicely.
+
+This also helps with corrupted DMI tables, as the kernel will not
+export the part of the table that it wasn't able to parse, effectively
+trimming it.
+
+This fixes bug #46176:
+https://savannah.nongnu.org/bugs/?46176
+Unexpected end of file error
+---
+Index: trunk/CHANGELOG
+===================================================================
+--- trunk.orig/CHANGELOG
++++ trunk/CHANGELOG
+@@ -2,6 +2,9 @@
+
+ * dmidecode.c, util.c, util.h: Let read_file return the actual data
+ size.
++ * dmidecode.c: Use read_file to read the DMI table from sysfs.
++ This fixes Savannah bug #46176:
++ https://savannah.nongnu.org/bugs/?46176
+
+ 2015-10-21 Xie XiuQi <xiexiuqi@huawei.com>
+
+Index: trunk/dmidecode.c
+===================================================================
+--- trunk.orig/dmidecode.c
++++ trunk/dmidecode.c
+@@ -4521,16 +4521,29 @@ static void dmi_table(off_t base, u32 le
+ printf("\n");
+ }
+
+- /*
+- * When we are reading the DMI table from sysfs, we want to print
+- * the address of the table (done above), but the offset of the
+- * data in the file is 0. When reading from /dev/mem, the offset
+- * in the file is the address.
+- */
+ if (flags & FLAG_NO_FILE_OFFSET)
+- base = 0;
++ {
++ /*
++ * When reading from sysfs, the file may be shorter than
++ * announced. For SMBIOS v3 this is expcted, as we only know
++ * the maximum table size, not the actual table size. For older
++ * implementations (and for SMBIOS v3 too), this would be the
++ * result of the kernel truncating the table on parse error.
++ */
++ size_t size = len;
++ buf = read_file(&size, devmem);
++ if (!(opt.flags & FLAG_QUIET) && num && size != (size_t)len)
++ {
++ printf("Wrong DMI structures length: %u bytes "
++ "announced, only %lu bytes available.\n",
++ len, (unsigned long)size);
++ }
++ len = size;
++ }
++ else
++ buf = mem_chunk(base, len, devmem);
+
+- if ((buf = mem_chunk(base, len, devmem)) == NULL)
++ if (buf == NULL)
+ {
+ fprintf(stderr, "Table is unreachable, sorry."
+ #ifndef USE_MMAP
diff --git a/debian/patches/0130-use_DWORD_for_table_max_size.patch b/debian/patches/0130-use_DWORD_for_table_max_size.patch
new file mode 100644
index 0000000..715d137
--- /dev/null
+++ b/debian/patches/0130-use_DWORD_for_table_max_size.patch
@@ -0,0 +1,27 @@
+From ab02b117511230e46bbef7febbd854b9c832c13c Mon Sep 17 00:00:00 2001
+From: Xie XiuQi <xiexiuqi@huawei.com>
+Date: Mon, 01 Feb 2016 08:30:31 +0000
+Subject: Use DWORD for Structure table maximum size in SMBIOS3
+
+0Ch DWORD "Structure table maximum size"
+
+Maximum size of SMBIOS Structure Table, pointed to by
+the Structure Table Address, in bytes. The actual size is
+guaranteed to be less or equal to the maximum size.
+
+Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+---
+Index: trunk/dmidecode.c
+===================================================================
+--- trunk.orig/dmidecode.c
++++ trunk/dmidecode.c
+@@ -4612,7 +4612,7 @@ static int smbios3_decode(u8 *buf, const
+ }
+
+ dmi_table(((off_t)offset.h << 32) | offset.l,
+- WORD(buf + 0x0C), 0, ver, devmem, flags | FLAG_STOP_AT_EOT);
++ DWORD(buf + 0x0C), 0, ver, devmem, flags | FLAG_STOP_AT_EOT);
+
+ if (opt.flags & FLAG_DUMP_BIN)
+ {
diff --git a/debian/patches/0135-hide_fixup_msg.patch b/debian/patches/0135-hide_fixup_msg.patch
new file mode 100644
index 0000000..ff3122c
--- /dev/null
+++ b/debian/patches/0135-hide_fixup_msg.patch
@@ -0,0 +1,46 @@
+From cff11afa886a0147d734b650755d232b5e7f2099 Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Tue, 03 May 2016 13:32:21 +0000
+Subject: dmidecode: Hide irrelevant fixup message
+
+Only display the message about type 34 length fixup if the entry in
+question is going to be displayed. Otherwise it's only confusing.
+
+This fixes bug #109024:
+http://savannah.nongnu.org/support/?109024
+
+Fixes: 3f70b3515d91 ("dmidecode: Fix up invalid DMI type 34 structure length")
+---
+Index: trunk/dmidecode.c
+===================================================================
+--- trunk.orig/dmidecode.c
++++ trunk/dmidecode.c
+@@ -2946,7 +2946,7 @@ static void dmi_64bit_memory_error_addre
+ * first 5 characters of the device name to be trimmed. It's easy to
+ * check and fix, so do it, but warn.
+ */
+-static void dmi_fixup_type_34(struct dmi_header *h)
++static void dmi_fixup_type_34(struct dmi_header *h, int display)
+ {
+ u8 *p = h->data;
+
+@@ -2954,7 +2954,9 @@ static void dmi_fixup_type_34(struct dmi
+ if (h->length == 0x10
+ && is_printable(p + 0x0B, 0x10 - 0x0B))
+ {
+- printf("Invalid entry length (%u). Fixed up to %u.\n", 0x10, 0x0B);
++ if (!(opt.flags & FLAG_QUIET) && display)
++ printf("Invalid entry length (%u). Fixed up to %u.\n",
++ 0x10, 0x0B);
+ h->length = 0x0B;
+ }
+ }
+@@ -4443,7 +4445,7 @@ static void dmi_table_decode(u8 *buf, u3
+
+ /* Fixup a common mistake */
+ if (h.type == 34)
+- dmi_fixup_type_34(&h);
++ dmi_fixup_type_34(&h, display);
+
+ /* look for the next handle */
+ next = data + h.length;
diff --git a/debian/patches/0140-Fix_scan_entry_point.patch b/debian/patches/0140-Fix_scan_entry_point.patch
new file mode 100644
index 0000000..4183af5
--- /dev/null
+++ b/debian/patches/0140-Fix_scan_entry_point.patch
@@ -0,0 +1,54 @@
+Description: Cherry picked fix Only scan /dev/mem for entry point on x86
+Author: <name and email of author, optional>
+Origin: upstream, http://git.savannah.nongnu.org/cgit/dmidecode.git/commit/?id=e12ec26e19e02281d3e7258c3aabb88a5cf5ec1d
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946911
+Last-Update: 2019-12-19
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/dmidecode.c
+===================================================================
+--- trunk.orig/dmidecode.c
++++ trunk/dmidecode.c
+@@ -2,7 +2,7 @@
+ * DMI Decode
+ *
+ * Copyright (C) 2000-2002 Alan Cox <alan@redhat.com>
+- * Copyright (C) 2002-2018 Jean Delvare <jdelvare@suse.de>
++ * Copyright (C) 2002-2019 Jean Delvare <jdelvare@suse.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -5534,7 +5534,7 @@ int main(int argc, char * const argv[])
+ off_t fp;
+ size_t size;
+ int efi;
+- u8 *buf;
++ u8 *buf = NULL;
+
+ /*
+ * We don't want stdout and stderr to be mixed up if both are
+@@ -5638,7 +5638,7 @@ int main(int argc, char * const argv[])
+ printf("Failed to get SMBIOS data from sysfs.\n");
+ }
+
+- /* Next try EFI (ia64, Intel-based Mac) */
++ /* Next try EFI (ia64, Intel-based Mac, arm64) */
+ efi = address_from_efi(&fp);
+ switch (efi)
+ {
+@@ -5671,6 +5671,7 @@ int main(int argc, char * const argv[])
+ goto done;
+
+ memory_scan:
++#if defined __i386__ || defined __x86_64__
+ if (!(opt.flags & FLAG_QUIET))
+ printf("Scanning %s for entry point.\n", opt.devmem);
+ /* Fallback to memory scan (x86, x86_64) */
+@@ -5713,6 +5714,7 @@ memory_scan:
+ }
+ }
+ }
++#endif
+
+ done:
+ if (!found && !(opt.flags & FLAG_QUIET))
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..fb5d205
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,11 @@
+0100-ansi-c.patch
+0001-hurd.patch
+0005-build.patch
+#0105-dmidecode-avoid-sigbus.patch
+#0110-nosysfs.patch
+#0115-no_smbios_DMI_entry_point.patch
+#0120-return_actual_data_size.patch
+#0125-use_read_file_to_read_DMI_table_from_sysfs.patch
+#0130-use_DWORD_for_table_max_size.patch
+#0135-hide_fixup_msg.patch
+0140-Fix_scan_entry_point.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..dd31875
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,24 @@
+#!/usr/bin/make -f
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_CFLAGS_MAINT_APPEND = -fPIE
+export DEB_LDFLAGS_MAINT_APPEND = -fPIE -pie
+
+
+include /usr/share/dpkg/architecture.mk
+ifeq ($(origin CC),default)
+CC = $(DEB_HOST_GNU_TYPE)-gcc
+endif
+
+%:
+ dh ${@}
+
+override_dh_auto_build:
+ dh_auto_build -- CC=$(CC) CFLAGS="$(CFLAGS) $(CPPFLAGS) -Os -ansi" LDFLAGS="$(LDFLAGS)"
+
+override_dh_auto_install:
+ dh_auto_install -- prefix=/usr
+
+ # remove useless files
+ rm -f debian/tmp/usr/share/doc/dmidecode/CHANGELOG
+ rm -f debian/tmp/usr/share/doc/dmidecode/README
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/include-binaries b/debian/source/include-binaries
new file mode 100644
index 0000000..a610508
--- /dev/null
+++ b/debian/source/include-binaries
@@ -0,0 +1 @@
+debian/upstream/signing-key.pgp
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..1b92f83
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,4 @@
+# smoke test
+Test-Command: /usr/sbin/dmidecode -V
+Depends: dmidecode
+Restrictions: superficial
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..63eaf46
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,6 @@
+Bug-Database: http://savannah.nongnu.org/bugs/?group=dmidecode
+Bug-Submit: http://savannah.nongnu.org/bugs/?func=additem&group=dmidecode
+Contact: http://savannah.nongnu.org/mail/?group=dmidecode
+Name: dmidecode
+Repository: git://git.savannah.nongnu.org/dmidecode.git
+Repository-Browse: http://git.savannah.nongnu.org/cgit/dmidecode.git
diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc
new file mode 100644
index 0000000..1242392
--- /dev/null
+++ b/debian/upstream/signing-key.asc
@@ -0,0 +1,68 @@
+-----BEGIN PGP ARMORED FILE-----
+Comment: Use "gpg --dearmor" for unpacking
+
+mQGiBD74a5cRBACWiGIxhDFQ9K7tpD9sKVKxGNDj8D1vY53EUYBc3AheLvnevVjv
+LlUQA2v/X6z4u0ack7BI3eTtkav2sjl5XdO3BX/XtsqzAwOb/73WlvDXFygP2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sPMxy8poLyF
+mRG5PD8pYmoQd1nCzqMDp5gNNqIqqQzio1x2xGL2YTa+sOeSAan0augyVJZOmSWq
+vroPUO67dnqfQCvE7JSp6GY08QqXsIfOyQTHKDqVAIWjuXOCtzTUJojscbZp/MM4
+j6/Ywn+hXMUxDwRYWEWL7UJDkUE8/sRRQPA1Qop7qxNOmLlzKo+vVN4yrVDGumQu
+sbhnHd8Lr4/m3Rl+xD0Zx+MufZFXCToxpTxt5nATGCNlIm/EpVFrfSMElcncNwAR
+AQABiQFoBBgRAgAJBQJE00lIAhsCASkJEBCMfXPsxj5NwF0gBBkBAgAGBQJE00lI
+AAoJELc62klZYsi7HWYIALcqnb4rbk0YgYzvcFticGfmzhV+f7WawCdHezFBi7i1
+GBfxkKgx0850a8/KYPHqcMB+1flGxB7XCgz0O3SX0Ofbl2mZwLB+YMSFMM9AGYA5
+0eQD/lbuHRPDJf3DBK3DrUwflLakuV8GvsihveGs4BrG+qkrMlWZfNcOoX7tLJEw
+D1U4JpKeB3fJXZfbargbIYK2GfZEfkSvw8ezR21w5AcogzflrpMWzUdYaQPpUV2c
+2ABVWY4w4RLhIm56tb+S79fiW9JvHF3SOeT0i8mkD6sQrXHrJqwmCfRVeh/g+5XH
+w+emf1fCktHvJdODPsiwb9N9IMakjKR5EqrO/zxQs3CagQCbBTVy+ykO3IAH7uHI
+5d4LcLETGSoAnRc59G0iSX/GOBQMeldSjbw4Bo0o
+=9biY
+-----END PGP ARMORED FILE-----
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..fec0f68
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=4
+opts=dversionmangle=s/\+dfsg\d*$//,uversionmangle=s/_/./g;s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)[\-\.]?\d*)$/$1~$2/,pgpsigurlmangle=s/$/.sig/ \
+https://download.savannah.gnu.org/releases/dmidecode/dmidecode-(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:bz2|xz))