summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/changelog94
-rw-r--r--debian/control19
-rw-r--r--debian/copyright18
-rw-r--r--debian/debian-package-notes.specs2
-rw-r--r--debian/dh-package-notes.install2
-rw-r--r--debian/dh-package-notes.manpages1
-rw-r--r--debian/dh_package_notes.1172
-rw-r--r--debian/package-notes.mk21
-rwxr-xr-xdebian/rules4
-rw-r--r--debian/source/format1
10 files changed, 334 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..bcf0c61
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,94 @@
+package-notes (0.9) unstable; urgency=medium
+
+ * Switch to --package-metadata linker flag via specs file
+
+ -- Luca Boccassi <bluca@debian.org> Sun, 27 Nov 2022 16:43:58 +0000
+
+package-notes (0.8) unstable; urgency=medium
+
+ * use LONG instead of BYTEs for binary fields
+
+ -- Luca Boccassi <bluca@debian.org> Mon, 04 Apr 2022 19:52:18 +0100
+
+package-notes (0.7) unstable; urgency=medium
+
+ * dh: derive distro name at build time
+ * dh: pick debuginfod from DEBUGINFOD_URLS env var if available
+ * dh: install makefile include to automatically set LDFLAGS
+
+ -- Luca Boccassi <bluca@debian.org> Mon, 07 Mar 2022 11:40:22 +0000
+
+package-notes (0.6) unstable; urgency=medium
+
+ * Mark package as Multi-Arch: foreign
+
+ -- Luca Boccassi <bluca@debian.org> Sun, 20 Feb 2022 22:16:03 +0000
+
+package-notes (0.5) unstable; urgency=medium
+
+ [ Zbigniew Jędrzejewski-Szmek ]
+ * generator: add a hint how to use the output to the output
+ * generator: allow disabling READONLY
+ * rpm: skip (READONLY) with older linker versions
+ * Use -Wl,-dT
+ * generator: add help strings
+
+ [ Luca Boccassi ]
+ * Initial packaging (Closes: #1004357)
+ * Add architecture field
+ * Skip fields without value
+ * Debian: use -Wl,dT
+
+ [ Zbigniew Jędrzejewski-Szmek ]
+ * generator: add description in help output
+ * generator: add --version argument
+ * generator: disallow abbreviated option names
+ * generator: rename program to not have .py suffix
+ * generator: fix two minor issues reported by pylint
+ * debian: stop using dh-exec
+
+ [ Mark Wielaard ]
+ * generate-package-notes.py: Add --debuginfod argument
+
+ [ Victor Westerhuis ]
+ * Add Debian debuginfod server in dh_package_notes
+ * Provide dh-sequence-package_notes
+ * Fix Python installation
+ * Add manpage for generate-package-notes
+
+ [ Zbigniew Jędrzejewski-Szmek ]
+ * rpm: rename srpm macros file
+ * rpm: fix filename in macro
+ * rpm: conditionalize all macros on %_package_note_file being defined
+ * rpm: make _generate_package_note_file always recreate the file
+ * rpm: use $RPM_PACKAGE_VERSION variable to refer to the package version
+ * rpm: also voidify the macros if we're on a noarch build
+ * rpm: use %{buildsubdir} in %_package_note_file if defined
+ * rpm: allow unsetting %_package_note_readonly to drop the READONLY
+ attribute
+ * rpm: add %_package_note_linker and document everything (rhbz#2043178,
+ rhbz#2043368)
+ * rpm: disable notes with linkers other than bfd
+ * rpm: disable notes when clang toolchain is used on arm
+ * generator: do not write zeroes to the linker script
+
+ [ Frantisek Sumsal ]
+ * ci: update repos before installing packages
+
+ [ Zbigniew Jędrzejewski-Szmek ]
+ * rpm: use named arguments
+
+ [ Luca Boccassi ]
+ * python: add --cpe auto
+ * shell: add --cpe auto
+ * man: document new --cpe auto option
+ * shell: add --root option
+ * python: add --root option
+ * man: document new --root option
+ * python: parse files in gather_data rather than parse_args
+ * tests: add resources and tests for --auto-cpe and --root
+ * rpm: use --cpe auto
+ * debian: bump debhelper-compat version to 13
+ * README: note we have both python and shell implementations
+
+ -- Luca Boccassi <bluca@debian.org> Mon, 31 Jan 2022 23:43:02 +0000
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..1ca23da
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,19 @@
+Source: package-notes
+Section: admin
+Priority: optional
+Rules-Requires-Root: no
+Maintainer: Luca Boccassi <bluca@debian.org>
+Build-Depends: debhelper-compat (= 13),
+Standards-Version: 4.6.1
+Homepage: https://systemd.io/ELF_PACKAGE_METADATA/
+Vcs-Git: https://github.com/systemd/package-notes.git
+Vcs-Browser: https://github.com/systemd/package-notes
+
+Package: dh-package-notes
+Architecture: all
+Multi-Arch: foreign
+Enhances: debhelper
+Depends: ${misc:Depends}, debhelper,
+Description: Debian Helper for adding package metadata to ELF binaries
+ Provides a linker specs file to add package metadata to the ELF binaries being
+ built. See: https://systemd.io/ELF_PACKAGE_METADATA/
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..0962154
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,18 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+
+Files: *
+Copyright: 2021-2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
+ 2021-2022 Luca Boccassi <bluca@debian.org>
+ 2021 Victor Westerhuis <victor@westerhu.is>
+ 2021 Mark Wielaard <mark@klomp.org>
+ 2022 Frantisek Sumsal <fsumsal@redhat.com>
+License: CC0-1.0
+ To the extent possible under law, the author(s) have dedicated all copyright
+ and related and neighboring rights to this software to the public domain
+ worldwide. This software is distributed without any warranty.
+ .
+ You should have received a copy of the CC0 Public Domain Dedication along with
+ this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
+ .
+ On Debian systems, the complete text of the CC0 1.0 Universal license can be
+ found in ‘/usr/share/common-licenses/CC0-1.0’.
diff --git a/debian/debian-package-notes.specs b/debian/debian-package-notes.specs
new file mode 100644
index 0000000..9045a9a
--- /dev/null
+++ b/debian/debian-package-notes.specs
@@ -0,0 +1,2 @@
+*link:
++ --package-metadata={\"type\":\"deb\",\"os\":\"%:getenv(DEB_VENDOR \",\"name\":\"%:getenv(DEB_SOURCE_PACKAGE_NAME \",\"version\":\"%:getenv(DEB_SOURCE_PACKAGE_VERSION \",\"architecture\":\"%:getenv(DEB_HOST_ARCH \",\"debugInfoUrl\":\"%:getenv(DEBUGINFOD_URLS \"})))))
diff --git a/debian/dh-package-notes.install b/debian/dh-package-notes.install
new file mode 100644
index 0000000..215cc86
--- /dev/null
+++ b/debian/dh-package-notes.install
@@ -0,0 +1,2 @@
+debian/package-notes.mk usr/share/debhelper/dh_package_notes/
+debian/debian-package-notes.specs usr/share/debhelper/dh_package_notes/
diff --git a/debian/dh-package-notes.manpages b/debian/dh-package-notes.manpages
new file mode 100644
index 0000000..6c26efd
--- /dev/null
+++ b/debian/dh-package-notes.manpages
@@ -0,0 +1 @@
+debian/dh_package_notes.1
diff --git a/debian/dh_package_notes.1 b/debian/dh_package_notes.1
new file mode 100644
index 0000000..8942874
--- /dev/null
+++ b/debian/dh_package_notes.1
@@ -0,0 +1,172 @@
+.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+. ds C`
+. ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is >0, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{\
+. if \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. if !\nF==2 \{\
+. nr % 0
+. nr F 2
+. \}
+. \}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "DH_PACKAGE_NOTES 1"
+.TH DH_PACKAGE_NOTES 1 "2022-11-27"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+dh_package_notes \- Add package metadata to ELF header
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fBdh_package_notes\fR
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBdh_package_notes\fR provides a linker specs file to include package metadata in
+\&\s-1ELF\s0 binaries built by packages.
+.PP
+The package metadata specification for \s-1ELF\s0 binaries can be found at
+<https://systemd.io/ELF_PACKAGE_METADATA/>.
+.PP
+\&\fBdh_package_notes\fR provides a linker specs file at
+\&\fB/usr/share/debhelper/dh_package_notes/debian\-package\-notes.specs\fR which can be
+used by including \fB/usr/share/debhelper/dh_package_notes/debian\-package\-notes.mk\fR
+at the dop of \fBdebian/rules\fR. This will export the right environment variables
+that will result in a package note \s-1ELF\s0 section being added to all packaged \s-1ELF\s0
+files, with the package type set to \fBdeb\fR, the package name and version set to
+the source package name and version respectively, the \s-1OS\s0 set to \fBDebian\fR and
+debuginfod \s-1URL\s0 set to \fBhttps://debuginfod.debian.net\fR. On Ubuntu, the \s-1OS\s0
+will be set to \fBUbuntu\fR and debuginfod \s-1URL\s0 will be set to
+\&\fBhttps://debuginfod.ubuntu.com\fR.
+.PP
+Note that it is not sufficient to build-depend on this package, the \fBinclude\fR
+must be used at the top of \fBdebian/rules\fR for this to be enabled.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fBdebhelper\fR\|(7)
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Luca Boccassi <bluca@debian.org>
diff --git a/debian/package-notes.mk b/debian/package-notes.mk
new file mode 100644
index 0000000..aabc6dc
--- /dev/null
+++ b/debian/package-notes.mk
@@ -0,0 +1,21 @@
+# SPDX-License-Identifier: CC0-1.0
+# Include from debian/rules to use with dh_package_notes.
+# See dh_package_notes(1) for details
+
+# binutils 2.39 is required for --package-metadata=
+ifeq (0, $(shell dpkg --compare-versions $$(dpkg-query -f '$${Version}' -W binutils) ge 2.39; echo $$?))
+include /usr/share/dpkg/vendor.mk
+ifeq (, $(filter nocheck, $(DEBUGINFOD_URLS)))
+ifeq ($(DEB_VENDOR),Ubuntu)
+export DEBUGINFOD_URLS=https://debuginfod.ubuntu.com
+else
+export DEBUGINFOD_URLS=https://debuginfod.debian.net
+endif
+endif
+export DEB_SOURCE_PACKAGE_VERSION=$(shell dpkg-parsechangelog -S Version)
+export DEB_SOURCE_PACKAGE_NAME=$(shell dpkg-parsechangelog -S Source)
+# Set by /usr/share/dpkg/vendor.mk
+export DEB_VENDOR
+export DEB_LDFLAGS_MAINT_APPEND+= -specs=/usr/share/debhelper/dh_package_notes/debian-package-notes.specs
+endif
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..2d33f6a
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)