summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
Commit message (Collapse)AuthorAge
* makepkg: use c-style for loops for integrity checksDave Reisner2013-09-18
| | | | | | | | | | 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>
* makepkg: always use read's -r flag with filenamesDave Reisner2013-09-18
| | | | | | | | 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>
* makepkg: inline creation of checksum indentingDave Reisner2013-09-18
| | | | | | | | | 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>
* makepkg: cleanup a few format string injectionsDave Reisner2013-09-18
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add support for sha224 checksumsDave Reisner2013-09-04
| | | | | | | Implements FS#36776. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: unify list of known hash algorithmsDave Reisner2013-09-04
| | | | | | | | | 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>
* makepkg: allow make-style environment var overridesDave Reisner2013-08-21
| | | | | | | 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>
* Do not refer to FlySpray numbersAllan McRae2013-08-21
| | | | | | | | 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>
* Fix whitespace in makepkg.sh.in and makepkg-template.pl.inJason St. John2013-07-30
| | | | | | | | 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>
* Install makedepends and checkdepends togetherAshley Whetter2013-07-22
| | | | | | | Fixes FS#31557 Signed-off-by: Ashley Whetter <awhetter.2011@my.bristol.ac.uk> Signed-off-by: Allan McRae <allan@archlinux.org>
* Merge branch 'maint'Allan McRae2013-06-26
|\
| * Respect paths with spaces on --installAndrea Scarpino2013-06-23
| | | | | | | | | | | | | | 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>
* | Merge branch 'maint'Allan McRae2013-06-18
|\|
| * makepkg: fix typo for distcc testAllan McRae2013-06-16
| | | | | | | | | | | | Introduced in commit 9dd42dc0. Fixes FS#35741. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Allan McRae2013-06-06
|\|
| * Restrict pkgname from starting with a dot.Allan McRae2013-06-04
| | | | | | | | | | | | | | | | | | 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>
* | makepkg: add support for CARCH environment varPhillip Smith2013-05-29
| | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: remove support for PKGBUILDs without a package() functionAllan McRae2013-05-29
| | | | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: Add helper to test for functions in build scriptAllan McRae2013-05-29
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: remove sourcing PKGBUILD from stdinAllan McRae2013-05-29
| | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'maint'Allan McRae2013-05-29
|\|
| * makepkg: Use LOGDEST for logpipeAllan McRae2013-05-18
| | | | | | | | | | | | | | 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>
| * makepkg: fixup broken revision and repo referencesDave Reisner2013-05-18
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'maint'Allan McRae2013-05-07
|\|
| * Add -V/--version option to makepkg's usage function and man pageEric Bélanger2013-04-30
| | | | | | | | | | Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * makepkg: avoid redirecting stdoutDave Reisner2013-04-28
| | | | | | | | | | | | | | | | | | | | 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>
| * makepkg: fix svn repo extractionAllan McRae2013-04-12
| | | | | | | | | | | | | | 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>
| * Do not use checkout directory for SVN configAllan McRae2013-04-12
| | | | | | | | | | | | | | | | 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 in the PKGBUILD source arrayMaxime Gauduin2013-04-11
| | | | | | | | | | | | | | | | | | | | 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>
| * makepkg: don't run remove_deps twice when unneededWilliam Giokas2013-04-11
| | | | | | | | | | | | | | | | | | | | 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>
* | Add --noprepare option to makepkgEric Bélanger2013-04-30
| | | | | | | | | | | | | | | | 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>
* | makepkg: avoid file|grep dependency for CRLF checkDave Reisner2013-04-06
| | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: remove extra ansi color codesAndrew Gregory2013-04-06
|/ | | | | | | | 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>
* remove continue from download_localDaniel Wallace2013-04-01
| | | | | | | | | | 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>
* makepkg: unset GREP_OPTIONSAndrew Gregory2013-03-31
| | | | | | | | | | 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>
* Ensure we are always in $SRCDEST before downloadingAllan McRae2013-03-30
| | | | | | | | | | | 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>
* Remove duplicate optionAllan McRae2013-03-26
| | | | | | | The "skippgpcheck" option was specified twice. Also, fix alphabetical ordering. Signed-off-by: Allan McRae <allan@archlinux.org>
* Revert "makepkg: Use a recursive git clone."Allan McRae2013-03-14
| | | | | | | | | | | | | 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>
* makepkg: Add --verifysource to only download/verify source filesOlivier Brunel2013-03-10
| | | | | | | | | 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>
* makepkg: Make VCS download functions use get_filenameNeer Sighted2013-03-10
| | | | | | | | | | | | Make all VCS download functions uses get_filename to get the repo name. In addition, creating a working directory from a Bazaar repository now shows the short-name of the repository, not the full path on disk. I'm not sure if the name of the variable that holds the basename of the local clone should still be `repo`, but I have left the variable name for simplicity. Signed-off-by: Neer Sighted <neersighted@myopera.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Separate vcs download and extractWilliam Giokas2013-03-10
| | | | | | | | | | | | | Previously makepkg would clone vcs sources in the download function, regardless of the noextract settings. Now the download_* functions only download or update the vcs sources, and the new extract_* functions just create working copies using the specified protocols. The extract_sources function will call the needed extract function for the protocol specified. The tarball extraction has also been moved into its own extract_file function to keep things consistent. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Use a recursive git clone.Neer Sighted2013-03-07
| | | | | | | Make makepkg use a recursive clone when creating the working directory. This will initialize submodules Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Avoid find to fork for each rm callSébastien Luttringer2013-03-07
| | | | | | Reported-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Allan McRae <allan@archlinux.org>
* Add staticlibs option in PKGBUILDSébastien Luttringer2013-03-07
| | | | | | | | | | 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>
* makepkg: add support for .pkg.tar.lzoDave Reisner2013-02-16
| | | | | | | | Supported by libarchive as of version 3.1.0 when compiled against lzo2 or in the presence of the lzop binary. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix -r and --needed conflictWilliam Giokas2013-02-13
| | | | | | | | | | | In makepkg, passing -sr --needed causes there to be a conflict when pacman goes to remove the dependencies, as the --needed flag is not an option for pacman -R. This patch makes --needed not get added to the PACMAN_OPTS array, but it acts like ASDEPS, and is only added to an install function. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add lrzip compression supportAllan McRae2013-02-13
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: make $pkgdir non-accessible during build()Allan McRae2013-02-07
| | | | | | | | | | | | | | | The idea of having separate build() and package() functions is that build() is run as a normal uses and package() as (fake)root. Any files placed in $pkgdir during build() can have the wrong permissions. Restrict access to $pkgdir during build() - unless there is no package() function. Also, set $pkgdir to something "useful" during build(). For split packages, this uses "<path>/pkg/$pkgbase" because it is not obvious which $pkgdir is being referred to. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Integrate check_install into tidy_installChirantan Ekbote2013-01-29
| | | | | | | | | | | | Rearrange tidy_install so we first remove docs, unwanted files, libtool files, and empty directories. Then check for missing backup files and references to $srcdir and $pkgdir. Finally compress manpages, strip debug symbols, and compress executables with upx. Fixes FS33318 Signed-off-by: Chirantan Ekbote <chirantan.ekbote@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Formatting consistency in write_pkginfoWilliam Giokas2013-01-17
| | | | | | | | | | | The difference between the echo and the printf's in write_pkginfo seemed to be somewhat sporadic. Also, the INFAKEROOT check was doing the same exact thing as the SPLITPKG check, but formatted much differently and consuming two extra lines. I think this makes it more readable than it was previously, if nothing else. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>