Commit graph

212 commits

Author SHA1 Message Date
Allan McRae
3e557af72f makepkg.conf: add NPROC configuration value
Useful for controlling (future) parallel jobs within makepkg.

Signed-off-by: Allan McRae <allan@archlinux.org>
2024-12-12 13:31:36 +00:00
Allan McRae
8d22f991f9 Add download sandbox related options to example config file
Signed-off-by: Allan McRae <allan@archlinux.org>
2024-07-05 09:53:52 +10:00
loqs
dba383f092 makepkg: Add support for Fortran build flags
Signed-off-by: Allan McRae <allan@archlinux.org>
2024-02-25 09:33:29 +10:00
Allan McRae
2a0dd9ec09 makepkg: move rust related documentation into the configuration file
Adding more and more languages will make the man page become increasingly
difficult to navigate.  Move documentation into the configuration file
where variables are defined.

Signed-off-by: Allan McRae <allan@archlinux.org>
2024-02-25 09:32:57 +10:00
Robin Candau
76b140c72a Replace the bzr package by breezy for the bzr protocol in makepkg.conf 2023-09-11 19:11:40 +02:00
Allan McRae
55da1a01b6 makepkg.conf.in: strip leading slash from LIB_DIRS
Signed-off-by: Allan McRae <allan@archlinux.org>
2023-05-22 18:55:23 +10:00
Allan McRae
71764b6d4c makepkg.conf: allow configuration additions via a subdirectory
Move rust related buildflags to their own configuration file to
provide an example of how other languages could be supported.

Signed-off-by: Allan McRae <allan@archlinux.org>
2023-01-17 10:26:07 +10:00
Allan McRae
e7806a43e0 pacman.conf.in: adjust example custom repo path for consistency
The example makepkg.conf.in suggests using "PKGDEST=/home/packages". It makes
sense to use the same path for the custom repo example in pacman.conf.in.

Fixes FS#48497.

Signed-off-by: Allan McRae <allan@archlinux.org>
2022-12-04 20:11:43 +10:00
Evangelos Foutras
e1ce2351f5 Make link time optimization flags configurable
We want to use -flto=auto in Arch Linux to speed up building, but we
can't hardcode it in buildenv/lto.sh because other downstreams might
have clang < 13.0.0 which did not recognize -flto=auto as equivalent
to -flto=full.

Introducing an LTOFLAGS variable to makepkg.conf seems the way to go.

Signed-off-by: Allan McRae <allan@archlinux.org>
2022-03-06 14:45:36 +10:00
Allan McRae
b234280083 libmakepkg: automatically add library sonames to provides
When the option "autodeps" is enabled, makepkg will add provides
entries for libraries found in the directories specified in LIB_DIRS
in makepkg.conf.  The entries LIB_DIRS array have the format
"prefix:directory".  For example, the entry "lib:usr/lib" will search
$pkgdir/usr/lib for library sonames and add "lib:libfoo.so.1" to the
provides array.

Signed-off-by: Allan McRae <allan@archlinux.org>
2021-12-29 15:20:05 +10:00
Allan McRae
060ab4a289 libmakepkg: add framework for autodeps
Signed-off-by: Allan McRae <allan@archlinux.org>
2021-12-29 15:20:05 +10:00
Evangelos Foutras
fed522775d makepkg.conf: Pass -q as the first option to curl
As per curl(1), the -q (--disable) option must be first on the command
line to disable reading the curlrc config file. Without being first it
does not appear to have any effect.

Signed-off-by: Evangelos Foutras <evangelos@foutrelis.com>
2021-11-20 12:38:57 -08:00
morganamilo
41f9c50abf Always enable TotalDownload
Previously TotalDownload would switch the % download from per package to
overall. Meaning you had a choice of which information to dispplay.

Now with parallel downloads TotalDownload adds an extra progress bar.
There's no reason to have this an off by default feature. Let's just
make it always on.

Signed-off-by: Allan McRae <allan@archlinux.org>
2021-04-23 09:43:30 +10:00
Eli Schwartz
2535611d6c makepkg: add PACMAN_AUTH configurable setting for sudo elevation
If specified, this will be used no matter what. If not, then we check if
sudo exists and use that, or else fall back on su.

Implements FS#32621

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2021-04-07 22:41:54 +10:00
Allan McRae
4a0891f49d Add link time optimization support to makepkg
Add the 'lto' option to enable building with link time optimization
by adding '-flto' to both CFLAGS and CXXFLAGS.  The 'lto' option can
be specificed both in the PKGBUILD or by setting the default in
makepkg.conf.

Signed-off-by: Allan McRae <allan@archlinux.org>
2021-03-03 14:35:45 +10:00
Ivy Foster
08f4ae709c Add fossil scm support to makepkg
Signed-off-by: Ivy Foster <escondida@iff.ink>
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-11-26 21:58:40 +10:00
Allan McRae
f235cea733 makepkg.conf: Reword "Defaults"
FS#61661 notes that we have a comment "Defaults" value for BUILDENV and OPTIONS
but that does not necessarily correspond to what the example makepkg.conf sets.

Change the comment to "Makepkg defaults" to indicate this is what makepkg will
do unless told otherwise.

Signed-off-by: Allan McRae <allan@archlinux.org>
2020-09-03 12:44:24 +10:00
Allan McRae
454ea02438 Remove autotools support
This removes support for autotools in favour of meson.
2020-06-01 10:59:08 +10:00
Anatol Pomozov
fe8e13341b Add config option to specify amount of parallel download streams
It includes pacman.conf new 'ParallelDownloads' option that
specifies how many concurrent downloads cURL starts in parallel.

Add alpm_option_set_parallel_downloads() ALPM function that
allows to set this config option programmatically.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-05-09 11:58:21 +10:00
Ivy Foster
969e1ab996 Add NoProgressbar to pacman.conf options
This is useful for dumb terminals that do not support escape
sequences.

Signed-off-by: Ivy Foster <escondida@iff.ink>
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-04-29 13:57:53 +10:00
Allan McRae
21af798604 makepkg: add CRC checksums and set these to be the default
Checksums arrays should be filled with values provided by upstream.  We
currently have md5 set as an unsecure default, and are constantly asked to
change it to sha2.  However, just changing the default to a stronger checksum
gives the user the impression that "makepkg -g" checksums are perfect.

Instead, change the default checksum to a CRC, to make it clear that any
checksum generated purely by "makepkg -g" is not ideal.

Signed-off-by: Allan McRae <allan@archlinux.org>
2020-01-28 10:46:26 +10:00
Eli Schwartz
bcacb00fc8 makepkg: add rust support for *FLAGS and debug-prefix-map
The rust language supports $RUSTFLAGS to be used automatically in all
rustc invocations. Allow setting this in makepkg.conf (e.g. for
optimization or debuginfo support), and teach debug+strip to pass the
rustc command line argument necessary to rewrite source file paths in
the debugging symbols.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-07 11:48:41 +10:00
Eli Schwartz
5caf45cdbb doc: update SRCEXT/PKGEXT to reduce needlessly scary warnings
Currently this tells people that the settings should not be touched, but
we should just rely on the description of what it should be set to, and
leave it up to the user.  With the previous patch, makepkg aborts if an
invalid value is set, greatly reducing the danger of it being badly
configured.

Also make this clearer by indicating when it would be useful to change
the settings -- i.e. disable compression -- and ensure their described
defaults are based on the ones established during ./configure or meson
setup.

Reported-by: Jouke Witteveen <j.witteveen@gmail.com>
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-05-28 11:18:04 +10:00
Allan McRae
e7bb0f8824 Make pacman forget deltas exist
Dummy callbacks are still present to prevent compiler warnings until
libalpm is delta free.

Also remove Delta parsing from pacman.conf.

Signed-off-by: Allan McRae <allan@archlinux.org>
2019-03-07 11:12:12 +10:00
Eli Schwartz
e03752e6ad makepkg: add new checksum algorithm via coreutils b2sum
coreutils 8.26 in December 2016 added this new hashing method which is
compatible with the existing md5sum and sha*sum tool usage, while using
the blake2 hash algorithm.

makepkg uses coreutils to provide source file integrity checks via
${integ}sum binaries and it makes sense to offer this as an additional
option.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-03-07 11:12:12 +10:00
Chloe Kudryavtsev
776fbe1cde libmakepkg: Add lzip ext support
lzip is a lossless data compressor designed to replace gzip and bzip2 as
the standard general-purpose compressed format.
- add .lz (lzip) support to libmakepkg/util/compress.sh:compress_as
- add COMPRESSLZ to makepkg.conf.in
- document COMPRESSLZ
- document PKGEXT with `.tar.lz`

Signed-off-by: Chloe Kudryavtsev <toast@toastin.space>
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-30 10:06:55 +10:00
Eli Schwartz
bae74c8e9e makepkg: add support for the zst format
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-09-19 18:15:29 +10:00
Alex Butler
0cbb128818 Add lz4 compression support to makepkg
Adds opt-in lz4 compression of *pkg.tar files with makepkg.
This is nice to have as an option for very fast compression
and is already installed with libarchive.

Signed-off-by: Alex Butler<alexheretic@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-08-10 12:37:19 +10:00
Michael Straube
757e85b21d makepkg.conf: add missing sha224 sums
Add missing sha224 sums to makepkg.conf and it's man page.

Signed-off-by: Michael Straube <michael.straube@posteo.de>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-07-27 10:21:58 +10:00
Luke Shumaker
b37a6063d0 pacman.conf: Fixup the XferCommand example for curl
1. Without `-L`, curl doesn't follow redirects.  This is different than
    both the default behavior of pacman, and from the wget example.  So add
    `-L`.

 2. It uses `-C -` to supposedly allow resuming partial downloads; but that
    doesn't work if we use `> %o` to direct the output to the file.
    Instead, use `-o %o` so that `-C -` actually works.

Signed-off-by: Luke Shumaker <lukeshu@parabola.nu>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-06-18 13:15:51 +10:00
Eli Schwartz
076b6184de Ensure better text editor automatic filetype detection
Since we no longer use vim-specific modelines, use the .asciidoc file
extension which is, well, reserved for asciidoc formatted files. This
should presumably work everywhere without needing editor-specific
workarounds and configuration.

Also add a shebang to makepkg.conf to indicate it contains bash content.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-05-14 09:59:17 +10:00
Eli Schwartz
860e4c4943 Remove all modelines from the project
Many of these are pointless (e.g. there is no need to explicitly turn on
spellchecking and language dictionaries for the manpages by default).

The only useful modelines are the ones enforcing the project coding
standards for indentation style (and "maybe" filetype/syntax, but
everything except the asciidoc manpages and makepkg.conf is already
autodetected), and indent style can be applied more easily with
.editorconfig

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-05-14 09:59:15 +10:00
Eli Schwartz
9aec7c3c72 makepkg.conf: add default protocol handler for file:// urls.
This is a common URI scheme (in general if not in makepg) and we should
provide a handler for it. We already allow its use for locally sourced
git repositories, so it makes sense to not leave files out.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-05-14 09:58:16 +10:00
Eli Schwartz
259d521e37 makepkg: Add a config option to specify the location of debug sources
In commit 8b0d59b83a support was added for
storing the source files of binaries in debug packages. Allow the user
to specify where those source files should be stored via makepkg.conf

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2017-12-07 15:52:39 +10:00
Eli Schwartz
44f3a15798 makepkg.conf: correct the documentation on the default options
The documentation for OPTIONS and BUILDENV listed some incorrect
defaults for undefined options. The defaults are implementation-defined
in the source code for makepkg itself (e.g. it depends whether we use
`check_option "opt" "y"` or `check_option "opt" "n"`) but were
erroneously declared to be "whatever we *define* in the default
makepkg.conf".

Fixes FS#55754

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2017-12-07 14:58:53 +10:00
Dave Reisner
e7fc560866 makepkg.conf: add -g to default curl options
This disables globbing, which should never be used in source URL
specifications as it would lead to mismatches in the checksum mapping
and un-checked sources.
2016-12-05 15:20:08 +10:00
Allan McRae
1a29744d0d makepkg: Remove upx and optipng support
These options were added before libmakepkg allowed passes like this to be
dropped in.  I prefer only real core packaging tasks to be included in
makepkg and additional things like this to be dropped in by a user or
distribution that wants to support them.

Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-26 15:18:43 +10:00
Allan McRae
5343ec7661 Add HookDir to example pacman.conf
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-29 09:50:11 +10:00
Christian Hesse
9917930ae1 add option to optimize PNG images with optipng
This can decrease package size by optimizing PNG image size. Images are
just stored with better compression and/or filter options. The actual
image content is not altered.

Additionally this can automatically fix broken PNG images which caused
some trouble lately.

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:19:04 +10:00
Jason St. John
89b9e9d1dc Fix typo in a comment in makepkg.conf
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-02 21:43:28 +10:00
Allan McRae
a7c1b7a914 add VCSCLIENTS to etc/makepkg.conf
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-22 14:01:27 +10:00
Allan McRae
d8ee8d0c99 makepkg: enforce fakeroot usage
Packaging outside of fakeroot can result in incorrect permissions for
package files.  It has been years since fakeroot issues during packaging
were common, so it is safe to enforce fakeroot usage.  If using fakeroot
is impossible for some reason, a two line wrapper script will suffice to
fool makepkg.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-12 13:13:49 +10:00
Florian Pritz
cd2370754a Remove ts and sw from vim modeline when noet is set
Forcing vim users to view files with a tabstop of 2 seems really
unnecessary when noet is set. I find it much easier to read code with
ts=4 and I dislike having to override the modeline by hand.

Command run:
find . -type f -exec sed -i '/vim.* noet/s# ts=2 sw=2##' {} +

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-28 20:19:25 +10:00
Allan McRae
f3f257405b Add compression defaults for lrzip and lzo
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-14 11:47:12 +10:00
Allan McRae
d5a06e964c Add Local/RemoteFileSigLevel to example config
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-14 11:47:12 +10:00
Eric Bélanger
9ec049f518 pacman.conf: Remove empty line at end of file
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-14 11:47:12 +10:00
Eric Bélanger
0d99b54ba2 makepkg.conf: Add staticlibs to default OPTIONS array in comments
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-14 11:47:11 +10:00
Simon Gomizelj
e292b1b5a2 update documentation and config files
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07 15:55:04 +10:00
Sébastien Luttringer
a03f5f55cd Add staticlibs option in PKGBUILD
This option helps to removes static library files in packages.

Related to the thread:
https://mailman.archlinux.org/pipermail/arch-dev-public/2013-March/024552.html

Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07 15:38:48 +10:00
William Giokas
0c74ffd6b6 Added LOGDEST variable
Places logs in a pre-defined location. The logs are always neatly
labeled with package names and numbers, and this way can be more easily
sent to network shares as they are written or compressed/cleaned en
masse.

Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2012-12-14 12:35:34 +10:00