[arch-general] Makepkg: Incremental builds
Hi everyone, I'm currently building ungoogled-chromium from AUR, which is running for 6 hrs now on my 6-core i7-9750H laptop and almost done. However, I'm thinking about what happens when the next version will be released. From my understanding, when running git pull to fetch the latest version from AUR and afterwards makepkg -sri, the old binaries will be deleted prior to starting the build, which will probably require to build everything from scratch. Am I right? However, I'm sure that only parts of the source change between versions. Therefore, only parts of the binary files would need to be built again, which would dramatically decrease build time. Correct? How can I make use of incremental builds using makepkg? I'm aware of the -e switch, but that would skip the prepare function, which might be required as e.g. new patch files from AUR would need to be applied. Furthermore, the timestamps of the source files all seem to be set to the archival date. This would probably also require a full build, even if only parts of the source changed. Correct? If yes, is there a way to fix that? Having to spend 6-7 hrs of build time on each new release would make frequent updating impractical. Thanks in advance! LuKaRo
On Mon, Nov 2, 2020, 12:40 PM LuKaRo <lists@lrose.de> wrote:
Hi everyone,
I'm currently building ungoogled-chromium from AUR, which is running for 6 hrs now on my 6-core i7-9750H laptop and almost done. However, I'm thinking about what happens when the next version will be released. From my understanding, when running git pull to fetch the latest version from AUR and afterwards makepkg -sri, the old binaries will be deleted prior to starting the build, which will probably require to build everything from scratch. Am I right?
However, I'm sure that only parts of the source change between versions.
Therefore, only parts of the binary files would need to be built again, which would dramatically decrease build time. Correct? How can I make use of incremental builds using makepkg? I'm aware of the -e switch, but that would skip the prepare function, which might be required as e.g. new patch files from AUR would need to be applied.
Furthermore, the timestamps of the source files all seem to be set to the archival date. This would probably also require a full build, even if only parts of the source changed. Correct? If yes, is there a way to fix that?
Having to spend 6-7 hrs of build time on each new release would make
frequent updating impractical.
There are binary packages available on the ungoogled-chromium-archlinux GitHub page[1], however, downloading binaries from untrusted sources is usually frowned upon. [1]: https://github.com/ungoogled-software/ungoogled-chromium-archlinux -- Yash Thanks in advance! LuKaRo
On 11/2/20 1:39 PM, LuKaRo wrote:
Hi everyone,
I'm currently building ungoogled-chromium from AUR, which is running for 6 hrs now on my 6-core i7-9750H laptop and almost done. However, I'm thinking about what happens when the next version will be released. From my understanding, when running git pull to fetch the latest version from AUR and afterwards makepkg -sri, the old binaries will be deleted prior to starting the build, which will probably require to build everything from scratch. Am I right?
However, I'm sure that only parts of the source change between versions. Therefore, only parts of the binary files would need to be built again, which would dramatically decrease build time. Correct? How can I make use of incremental builds using makepkg? I'm aware of the -e switch, but that would skip the prepare function, which might be required as e.g. new patch files from AUR would need to be applied.
makepkg --noextract will continue a build you have interrupted using CTRL+C, it does not perform "incremental" builds for the next version of the software.
Furthermore, the timestamps of the source files all seem to be set to the archival date. This would probably also require a full build, even if only parts of the source changed. Correct? If yes, is there a way to fix that?
The source extraction naturally overwrites every single file in the current source archive, and updates timestamps in the process. Otherwise, how would you get the new source code? ;) Using bsdtar to unpack a tarball doesn't exactly know which files should be skipped due to not changing...
Having to spend 6-7 hrs of build time on each new release would make frequent updating impractical.
You have two options: - use ccache to cache compiler results, for unchanged source files and unchanged recursive includes you often won't need to recompile and ccache's gcc wrapper will instead output the file from the cache for significant speedup - use git+https:// based sources, since git *can* (and does) figure out which files need to be modified on disk in order to be updated to the desired revision. makepkg -sri for git-based source code does indeed play quite nicely with incremental builds -- Eli Schwartz Bug Wrangler and Trusted User
Am 02.11.20 um 19:39 schrieb LuKaRo:
How can I make use of incremental builds using makepkg?
participants (4)
-
Björn Fries
-
Eli Schwartz
-
karx
-
LuKaRo