Age | Commit message (Collapse) | Author |
|
Validate the new pkgver efore blindly ramming it into the PKGBUILD.
This gives us good feedback and prevents corrupting the PKGBUILD, e.g.
==> Starting pkgver()...
==> ERROR: pkgver is not allowed to contain colons, hyphens or whitespace.
==> ERROR: pkgver() generated an invalid version: a horse is not a pkgver
As an additional failsafe, exchange a valid for invalid character as
command separator in @SEDINPLACE@ expressions. For even more paranoia,
exit if sed fails for any reason.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
After updating the pkgver, we still need to safely source the BUILDFILE.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
This points makepkg to where is library is located. Can be
overridden by value in the environment.
Signed-off-by: Allan McRae <allan@archlinux.org>
[Ashley: Rebased]
Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Use $srcdir and $pkgdir instead.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
a package.
Implements FS#17175.
[Allan: Minor changes to output strings, fix removing of source directory]
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
The separation between downloading and extracting for non-vsc sources
was incomplete due to symlinks being made in $srcdir during the download
stage. Have download_{local,file} just ensure the presence of the files
in $startdir or $SRCDEST (downloading if needed) and then have
extract_file symlink these files into $srcdir.
Also replace "continue" with "return" in extract_file to make it clearer
what is happening.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
There is little reason for this field to be checked over all other
fields.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
This allows scripts to safely capture the output of "makepkg -g".
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
These loops already maintain an independent loop counter, so cut out
the middle man. While this change doesn't necessarily require that we
drop support for sparse arrays, we do via this patch. A new lint check
is added in check_sanity to abort when a sparse array is encountered.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
These are all cases where we're reading filenames -- any backslashes
are intentional and should not be interpreted.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
With some simple math and printf formatting tokens, we can create the
whitespace necessary for this without the need for a loop and string
concatentation.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Implements FS#36776.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Unifying this list makes adding new algorithms easier. There's also
some menial cleanup in this patch to avoid use of eval and properly
treat lists of data as array instead of simple strings.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
This allows for VAR=value and VAR+=value variable declarations.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
These references to bug numbers assume we will forever be using that bug
tracker. It is better to properly comment the code instead (which was
done in almost all cases anyway).
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Replace spaces with tabs in one instance.
Remove extra spaces.
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Fixes FS#31557
Signed-off-by: Ashley Whetter <awhetter.2011@my.bristol.ac.uk>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
makepkg --install doesn't quote the absolute path, so if the path contains
spaces pacman -U fails.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
Introduced in commit 9dd42dc0. Fixes FS#35741.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
Adding this restriction means we can filter any FILENAME entry from
starting with a "/" or a ".". Use the term "dot" as it is more
computing relevant compared to "full stop" or "period" which vary
depending on English locale.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Add support for overriding configuration in /etc/makepkg.conf and
~/.makepkg.conf by setting the environment variable CARCH similar to
how SRCDEST and PKGDEST behave.
Fixes FS#35030.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Not having a package() function means all building occurs as root
and repackaging can lose permissions. Given the use of package()
functions has been around for years and we deprecated not having
one in pacman-4.1, we can remove support for PKGBUILDs without
package() functions altogether. However, keep PKGBUILDs that have
neither a build() or package() function working.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Using PKGBUILDs from stdin means that we can not use pkgver() in
packages. Given we have the "-p" option to pass any file to
makepkg and passing a PKGBUILD in the form "cat foo | makepkg"
does not work, this feature is unneeded.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
If LOGDEST is set, we may not check that $startdir is writable. Store
the log pipe in LOGDEST instead.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
bzr support "worked", but didn't handle any of the actual features we
wanted with makepkg. This moves the revision specification to the proper
place (extraction, rather than download), and fixes an additional broken
reference to $repo which was never set.
Fixes FS#35281.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
This new option disables the prepare function. Useful in combination
with -o to get an unpatched copy of the sources for testing purpose.
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
If stdout is already redirected, redirecting stderr to stdout can lead
to undesirable results.
Fixes FS#34974.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Copy SVN repos rather than using "svn export" to keep all anotation
files in the repo for build scripts that use (e.g.) "svin info".
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Using the checkout directory for the SVN config can result in clashes
between config files and files from the SVN checkout. Instead, use
a ".makepkg" directory within the checkout.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Add support for all bzr URLs, including "lp:" URLs, in the source array.
This, however, requires an internet connection and will fall back to the
current behavior for offline builds. In that case, only the URL reported
by 'bzr config parent_location' run inside the local repo can be used,
and is outputted.
Signed-off-by: Maxime Gauduin <alucryd@gmail.com>
|
|
remove_deps already has a check and won't run unless -r is specified, so
if this was meant to remove dependencies of a failure no matter what,
then it's not doing it, and with -r it is run twice on a failure for no
real reason.
Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
All those extra '\e[1;'s were just setting bold redundantly or
immediately being cancelled.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Bug exposed by a6291858cc1570e56204c4a1e7a68f76c4853336
popd doesn't run in the for loop in download_sources() if the continue
in download_files is executed. Causing the extract_files to extract
everything into $SRCDEST instead of $srcdir
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
grep allows options to be set from the environment with GREP_OPTIONS.
Many of these options will alter grep's output, breaking makepkg.
GREP_OPTIONS=--line-number breaks installed dependency removal, for
instance.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
When VCS sources were updated, we changed into their root directory.
Any following source was then downloaded to an incorrect place causing
a failure in makepkg. Ensure we are always in the $SRCDEST directory
before starting any download.
Fixes FS#34488.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
The "skippgpcheck" option was specified twice. Also, fix alphabetical
ordering.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
This reverts commit 8b03b1a8776043978aeac31682f94d65b4f3e514.
It is much better to download the submodules using separate source entries
and adjust the submodule configs to point at these versions in the
prepare() function.
See https://mailman.archlinux.org/pipermail/pacman-dev/2013-March/016771.html
for an example.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Because --noextract also implies to not download/verify source files, it wasn't
possible to simply do that, without either extracting and/or building.
(Note: --verifysource takes precedence over --noextract)
Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|