Two issues break reproducibility; the time and hostname get embedded
in the resulting seabios binary.
Simply drop the hostname from the embedded version string, as it
shouldn't be needed in Debian package builds.
Use the SOURCE_DATE_EPOCH environment variable to set the build date
rather than the current time:
https://reproducible-builds.org/docs/source-date-epoch/
Gbp-Pq: Name seabios-hppa-use-consistent-date-and-remove-hostname.patch
Signed-off-by: Cong Liu <liucong2@kylinos.cn>
Embedding the build time breaks reproducibility. Instead, use the date
specified by the SOURCE_DATE_EPOCH environment variable:
https://reproducible-builds.org/docs/source-date-epoch/
This patch relies on features of GNU date, and will need further
changes for portability to other systems.
Gbp-Pq: Name openbios-use-source_date_epoch-in-makefile.patch
Signed-off-by: Cong Liu <liucong2@kylinos.cn>
gcc-12.2 produces an apparently wrong warning for this file:
roms/openbios/arch/ppc/qemu/init.c:400:10: error: \
array subscript 0 is outside array bounds of ‘uint32_t[0]’ {aka ‘unsigned int[]’} \
[-Werror=array-bounds]
400 | *dsi = 0x48002002;
| =====^===========
Turn this particular -Werror back into warning. Gcc is apparently wrong here.
index e40385a70b..2e214aa079 100644
Gbp-Pq: Name openbios-array-bounds-gcc12.patch
Signed-off-by: Cong Liu <liucong2@kylinos.cn>
Debian ships different modules in different packages.
By default qemu ignores the fact that it can not load
a module, pretending this module never existed.
Give a useful hint about the package where the module
in question resides.
This is a hack, but it makes qemu a bit more user-friendly.
Gbp-Pq: Name note-missing-module-pkg-name.diff
Signed-off-by: Cong Liu <liucong2@kylinos.cn>
Updated: Wed, 31 Aug 2022 12:30:17 +0300
A hackish way to distinguish the case when qemu-user binary is executed
using in-kernel binfmt-misc subsystem with P flag (preserve argv).
We register binfmt interpreter under name /usr/libexec/qemu-binfmt/qemu-foo-binfmt-P
(which is just a symlink to ../../bin/qemu-foo), and if run like that,
qemu-user binary will "know" it should interpret argv[1] & argv[2]
in a special way.
Gbp-Pq: Name linux-user-binfmt-P.diff
Signed-off-by: Cong Liu <liucong2@kylinos.cn>
pc-bios/meson.build tries to link various firmware files to the build
directory, but we DFSG-removed them so the build fails to find them.
Just disable entering the subdir entirely since we buile all the
necessary firmware in d/rules anyway.
Gbp-Pq: Name skip-meson-pc-bios.diff
Signed-off-by: Cong Liu <liucong2@kylinos.cn>