the SRCDEST may be shared by multiple builders and apparently cargo does
not seem to handle that well. There are also no good way to do clean-up
of the cache for purging things that is no longer in use.
This reverts commit af0c88e6ab.
Store exit code in the variable 'e', then return it, if there are no
errors then it will return 0 as that is the default value, otherwise it
will return 1 and error out as previously
This commit broke abuild-rmtemp which has a prefix check to ensure it
doesn't remove non-abuild directories. Revert the commit instead of
adjusting the prefix check for now.
This reverts commit d0828c0655.
This is the only appearance of `apk` in the source. Appears accidental.
Fixes: 41343329 ("abuild: fix dependency tracing for cross builds")
Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
This will warn then paths for certain shells that have completions are
found and tell the user to add a subpackage for it.
In a future date we also want to warn the user to move certain
directories where packages have completions to those directories so our
default_ functions can move them without problems
CARGO_HOME tells cargo where to store installed dependencies, save it to
a directory in $SRCDEST so we don't need to download all dependencies
again when compiling a rust package.
This makes it easier to figure out to which build the directory belongs
to. Occasionally, I have many failed abuild rootblds in my /var/tmp and
including the $pkgname in the directory would help me associating the
directories with failed builds I recently executed.
Fixes the error:
df: .: can't find mount point
When running abuild inside a chroot when the root file system
mountpoint information is not necessarily directly available.
Without this change abuild rootbld would fail with:
touch: invalid date '@'
Because SOURCE_DATE_EPOCH wasn't set when abuild rootbld was used. This
is a bug introduced in 71d9d5233b. Instead
of reverting the aforementioned commit move the SOURCE_DATE_EPOCH
initialization to a custom function and also call it from the abuild
rootbld function.
Fixes#9978
moving files and directories from $pkgdir to $subpkgdir is a common
pattern, so make a helper function for this.
usage: amove FILESPEC...
FILESPEC is a list of files or patterns/globs that will be exanded by
the shell.
amove will clean up empty directories after moving the files/dirs.
Example usage:
amove 'usr/lib/lib*.a'
amove 'etc/*.d' # moves both etc/conf.d and etc/init.d
amove 'lib/*.so' 'usr/lib/*.so'
cd "$pkgdir"
find usr -name '*.h' | xargs amove
This is based on the work of Chloe Kudryavtsev:
https://github.com/alpinelinux/abuild/pull/92
- set PATH in the rootbld environment so ccache is actually used.
- drop the check for command -v ccache. ccache will be pulled in as
build dependency so we don't need to die if its missing.
- create ~/.ccache if missing rather than die. This directory will
normally be created by ccache itself, but we need to create it so we
can bind mount it incase of rootbld.
- don't die if ccache.conf is missing. ccache will create it.
avoid install ccache and bind mount ~/.ccache when USE_CCACHE is not
set.
This fixes bind mount error when ~/.ccache is missing and USE_CCACHE is
unset.
This introduces basic support for ccache, during packaging builds.
If you are building many packages, it is recommended to manually
increase the maximum size of the ccache cache. This is typically
achieved by modifying `~/.ccache/ccache.conf` and adjusting the
`max_size` setting.
Signed-off-by: Joseph Benden <joe@benden.us>