Rename the list of programs installed by coreutils
to PKG_PROGRAMS, which will create a stampfile for each
through a new feature in host-build.mk.
Also, cleanup a bit to save lines
regarding the usage of this list.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
(cherry picked from commit 14a85d929b)
Define the variable PKG_PROGRAMS for the list
of programs installed by findutils,
which will create a stampfile for each
through a new feature in host-build.mk.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
(cherry picked from commit 04053e3f20)
Always initialize header with zeros as otherwise we may end up with
uninitialized memory which ruins reproducibility.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Noteworthy changes in this release:
* New option --ignore-dirnlink
Valid in copy-out mode, it instructs cpio to ignore the actual number
of links reported for each directory member and always store 2
instead.
* Changes in --reproducible option
The --reproducible option implies --ignore-dirlink. In other words,
it is equivalent to --ignore-devno --ignore-dirnlink --renumber-inodes.
* Use GNU ls algorithm for deciding timestamp format in -tv mode
* Bugfixes
** Fix cpio header verification.
** Fix handling of device numbers on copy out.
** Fix calculation of CRC in copy-out mode.
** Rewrite the fix for CVE-2015-1197.
** Fix combination of --create --append --directory.
** Fix appending to archives bigger than 2G.
Removed upstreamed:
- 001-duplicate-program-name.patch
- 010-clang.patch
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
Using the local gnulib source during bootstrap
allows for fine-grained control over the macros
and source files for use with coreutils
but part of gnulib instead of coreutils,
without having to wait for a release
or deal with gnulib as a git submodule.
In this case, the execution of autotools
must be skipped by force.
Autoconf and Automake during bootstrap on coreutils
only works right when using directly checked-out source.
There is a symbol in gnulib, @GNULIB_TIME@
that is not yet defined in coreutils source,
so we use the backup of lib/time.in.h instead
of the one provided by gnulib source.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Using the local gnulib source during bootstrap
allows for fine-grained control over the macros
and source files for use with libtool
but part of gnulib instead of libtool,
without having to wait for a release
or deal with gnulib as a git submodule.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Instead of editing the SUBDIRS variable with a patch,
it can be overriden at the end of the command line when invoking Make.
This tool has a series of recursive Makefiles in each subdirectory,
therefore SUBDIRS is set to a pattern of Make functions
so that the result is variable depending on the current subdirectory
that Make is being invoked in.
By eliminating the patch, autoreconf is no longer required.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Instead of editing the SUBDIRS variable with a patch,
it can be overriden at the end of the command line when invoking Make.
Skip the build for po files as well, which is causing a conflict
depending on the version of gettext detected, and macros present.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
GNU standards requires certain files at the top-level directory
of a package that automake is used with, mostly documentation.
If one of these files happens to be missing, autoreconf would fail.
Move these file requirements to the more strict 'GNITS' setting.
Link: https://www.gnu.org/software/automake/manual/html_node/Strictness.html
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Some new releases of GNU tools are checking for a higher version
of makeinfo than what our scripted alternative shows
when working with checked-out sources instead of releases.
Since this is a "fake" makeinfo we can also just fake the version.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
These 7 macro files are provided by gnulib,
so we can now replace these statically stored copies
with the latest copy from GNU sources.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
By having a local copy of gnulib, we can:
import the latest macro fixes into any package,
get rid of some statically stored macros that were otherwise missing,
bootstrap GNU tools with the latest relevant source
without having to wait for a release or rely on git submodules,
and possibly more...
The patch assists in bootstrapping by ignoring
the building of po files using gettext,
and also to allow a user-defined path to a program
to include parameters.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Due to us keeping a patch around for years and never proposing it to
squashfs4 repository, we resulted in having the same squashfs4 version
but with different supported options. (openwrt patched -- upstream)
To workaround this problem, a non-standard option was required.
To not have surprise on tool bump, backport the patch and add the new
config option required to enable these extended non-standard options.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
`bzip2` is the standard executable for bzip2 compression
this includes development includes and both static and shared libs
(libbz2) which can be used by other packages
the initramfs generator offers the BZIP2 option but there was no
executable to support it, and worked only via side effect of having a
system-installed version of bzip2, which could be less predictable
Signed-off-by: Tony Butler <spudz76@gmail.com>
[ remove unintended change ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This reverts commit 394d7134ec.
The commit has unintentded change that cause compilation error with SDK
or LZO compression.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
`bzip2` is the standard executable for bzip2 compression
this includes development includes and both static and shared libs
(libbz2) which can be used by other packages
the initramfs generator offers the BZIP2 option but there was no
executable to support it, and worked only via side effect of having a
system-installed version of bzip2, which could be less predictable
Signed-off-by: Tony Butler <spudz76@gmail.com>
Refresh multiple lzma configuration option patch with new version
proposed upstream. (Reintroduce -Xe option and add more checks and
general better code quality)
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
When using alpine as host, things start to fail. Lets pull in the
upstream alpine patches to make things work. This should not affect
other hosts.
Note, that Alpine has the '_GNU_SOURCE' define in the APKBUILD file, but
here we add this flag to the needed fix flags patch, which does similar
things too.
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
This resolves an error when building toolchain/musl on macOS due to
improper hole-detection caused by a bug in macOS/APFS [1].
As long as we don't reconfigure, 001-m4.patch is not needed.
If we keep it, it will force reconfigure the project,
since m4 files are changed. This works, but may not be optimal,
because the build should use files from coreutils/m4, but
OpenWRT uses legacy files from staging_dir/host/share/aclocal [2].
backport a couple of upstream patches
date: diagnose -f read errors
copy: fix --reflink=auto to fallback in more cases
[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61386
[2] https://github.com/openwrt/openwrt/pull/12233#issuecomment-1481097456
Co-developed-by: Michael Pratt <mcpratt@pm.me>
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Run `time make tools/squashfs4/{clean,compile} -j$(nproc)`
Before:
real 0m8.803s
user 0m12.415s
sys 0m1.317s
After:
real 0m13.781s
user 0m13.290s
sys 0m1.528s
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
Host/Clean/Default is no longer defined.
Use the uninstall makefile target
to remove the obsolete m4 files, and more.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Remove the specialized copy of libtool
which was used for linking to uClibc++, which is now removed.
Also remove references to the deprecated fixup targets
that invoked this specialized libtool, which no package uses.
Ref: 6b2ed6101 ("uclibc++: remove")
Ref: c10515db6 ("re-enable the libtool PKG_BUILD_DEPENDS for PKG_FIXUP")
Ref: 246a5b334 ("More libtool madness")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
An old patch attempted to harmonize the way that
both Openwrt and Automake uses the $(V) variable.
However, it was reverted because of the side-effects.
This method is more simple and just
allows Automake to accept any string
as part of the verbosity toggle,
falling back to the default if null.
Ref: e6901bf90 ("tools/automake: Revert "Do not use $(V) - force AM_V=1"")
Ref: 43365ca66 ("Do not use $(V) - force AM_V=1")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
OpenWrt contains a 2012 copy of glibc's elf.h, which predates the
introduction of some newer architectures like Arm64 and RISC-V.
Linux 5.13 introduced the "gen-hyprel" tool into the kernel compile
(when virtualization/KVM is enabled) which requires EM_AARCH64 to be
defined.
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c: In function 'init_elf':
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:289:43: error: 'EM_AARCH64'
undeclared (first use in this function); did you mean 'EM_IA_64'?
289 | assert_eq(elf16toh(elf.ehdr->e_machine), EM_AARCH64, "%u");
| ^~~~~~~~~~
Update the copy of elf.h from the latest glibc to fix this.
Compile-tested: ath79, armvirt, mpc85xx, x86
Run-tested: armvirt
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Upstream introduced a new `trailer.m4` macro file referenced by the
absolute build path of autoconf. Make sure that this is covered by
the `000-relocatable.patch` as well.
This should fix various SDK build failures related to autoconf.
Fixes: 030447b8f4 ("tools/autoconf: bump to 2.71")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>