From ArchWiki
Jump to navigation Jump to search


A feature to be aware of: do not be surprised if the UPX option does not compress your gcc binary because it only detects files that are of mime type 'application/x-executable' | 'application/x-dosexec' while gcc unless instructed otherwise would create by default a binary 'application/x-sharedlib'. This is visible in /usr/share/makepkg/tidy/ Kewl (talk) 15:33, 1 January 2018 (UTC)

Indeed, but also note that upx will not be included in pacman in the future, which is why I am providing it with makepkg-optimizeAUR. I am willing to add other mimetypes to this list, provided we can establish that it is in fact safe to compress them with upx. I've found very little about the matter by searching, so we'll probably have to conduct our own tests.
Note, you could do such tests for yourself by appending | 'application/x-sharedlib', etc to the list in /usr/share/makepkg/tidy/, before the ) at the end of the line. This seems relevant. quequotion (talk) 12:25, 16 February 2019 (UTC)

Tips and Tricks: Reduce {packaging,download} times

Considering relocating Soloturn's tip to a subsection of Tips and Tricks here. quequotion (talk) 11:47, 13 July 2020 (UTC)

#Reduce packaging times could be merged with Makepkg#Use other compression algorithms. The other section looks good. -- Lahwaacz (talk) 13:39, 14 July 2020 (UTC)
Redrafted as a new version of "Use other compression algorithms"; basically just reworded the explanation of the first example. Is the old title still appropriate? This section could give general information on using various compression algorithms, but at the moment it is focused on giving information about saving time. "Reduce compression times"? quequotion (talk) 23:49, 17 July 2020 (UTC)
Feel free to rename the section. -- Lahwaacz (talk) 06:31, 18 July 2020 (UTC)
I merged the proposed sections. If you have more ideas, feel free to improve the page further. -- Lahwaacz (talk) 07:49, 17 August 2020 (UTC)
Thank you! I most certainly will do that. quequotion (talk) 17:38, 23 August 2020 (UTC)


Use other compression algorithms

To speed up both packaging and installation, with the tradeoff of having larger package archives, you can change PKGEXT.

For example, the following skips compression of the package file, which will in turn have no need to be decompressed on install:

$ PKGEXT='.pkg.tar' makepkg

As another example, the following uses the lzop algorithm, with the lzop package required:

$ PKGEXT='.pkg.tar.lzo' makepkg

To make one of these settings permanent, set PKGEXT in /etc/makepkg.conf.

Reduce source download and extraction times

  • Make use of SRCDEST, especially when building VCS packages, to save time acquiring and unpacking sources in subsequent rebuilds.