summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAge
* 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>
* contrib: Make pacdiff colors the same as makepkgWilliam Giokas2013-03-08
| | | | | | | Added an `ask` message function that emulates pacman's appearance. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* scripts: Add color to repo-addWilliam Giokas2013-03-08
| | | | | Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* scripts: Add color to pkgdeltaWilliam Giokas2013-03-08
| | | | | Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* scripts: Add color to pacman-optimizeWilliam Giokas2013-03-08
| | | | | | | Color enabled by default, use --nocolor to disable colored output. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* scripts: Add color to pacman-keyWilliam Giokas2013-03-08
| | | | | | | | Use --nocolor to suppress colored output from pacman-key, otherwise output will be in color. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* scripts: Add color to pacman-db-upgradeWilliam Giokas2013-03-08
| | | | | | | Color enabled by default, use --nocolor to turn off colors. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* scripts: Add color to library/output_format.shWilliam Giokas2013-03-08
| | | | | | | | | | | Use the same colors as makepkg in messages. Add in the 'plain' function as well. To use the colors, you need to include the term_colors.sh file, or add definitions for the colors explicitly. 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>
* pacman-key: reduce verbosity of --populatePierre Schmitz2013-01-04
| | | | | | | Do not bother the user with gpg's verbose output. Signed-off-by: Pierre Schmitz <pierre@archlinux.de> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman-key: handle local signing of multiple keysAllan McRae2013-01-04
| | | | | | gpg --lsign-key does not like being given multiple keys to sign. Signed-off-by: Allan McRae <allan@archlinux.org>
* Add a -n option to repo-add to only add new packagesDanny George2013-01-03
| | | | | | | | | Packages are already in the pkg db were given a warning, and then readded anyway. With -n specified, the warning is printed, but skips readding it. Signed-off-by: Danny George <dangets@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Print out full version on pkgver updateWilliam Giokas2013-01-03
| | | | | | | | | | | When building sources with a pkgver function, makepkg will print out the original version before pkgver() is run, claiming that that is the package that will be built. This patch simply re-prints the output later, after pkgver() has been run so people can see which package they are actually building. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: use --apparent-size when du supports itAllan McRae2013-01-03
| | | | | | | | | | | Amazingly, using "sleep 1" to convince btrfs to report correct file sizes is only a 90% fix. Sometimes more sleep is needed. Instead we use the --apparent-size argument to du to get actual file sizes. This is used only on Linux as the various BSDs do not support this argument. Signed-off-by: Allan McRae <allan@archlinux.org>
* parseopts: remove superfluous continue/shift statementsDave Reisner2013-01-03
| | | | | | | | | | | | | | | | | | Fun fact about bash: the below is valid and will only ever print 'a'! fn() { continue 2 } for x in {1..5}; do for y in {a..e}; do echo "$y" fn done done Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Update copyright year for 2013Allan McRae2013-01-03
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add mtree file into packageAllan McRae2012-12-14
| | | | | | | | Add an mtree file to the package with all file information. This can be added to the local pacman database on install allowing full package verification. Signed-off-by: Allan McRae <allan@archlinux.org>
* Added LOGDEST variableWilliam Giokas2012-12-14
| | | | | | | | | | 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>
* makepkg: normalize whitespace in $pkgdesc when writing .PKGINFODave Reisner2012-12-14
| | | | | | | | | | | | Specifically, we shouldn't allow newlines in the pkgdesc field, as pacman will ignore the continuation and end the description prematurely as written to the local DB. Normalize ALL whitespace, replacing it with single whitespace characters. Fixes strange errors as seen by FS#32852. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* pkgdelta: avoid use of eval and IFS manipulationDave Reisner2012-12-14
| | | | | | | | | | | Instead of blindly consuming data from the .PKGINFO file, parse it more closely and only declare variables as needed. Should help to avoid nonsensical errors and possibly dangerous command execution as seen in FS#32852. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: install debug symbol packages if requestedAllan McRae2012-11-27
| | | | | | | When using "makepkg -i", install the debugging symbol packages too if present. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: assign debugging symbol directory to a variableAllan McRae2012-11-27
| | | | | | Simplifies the stripping of files a lot. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: allow debug package suffix to be configurableAllan McRae2012-11-27
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: create package from stripped debug symbolsAllan McRae2012-11-27
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: output the name of the package being createdAllan McRae2012-11-27
| | | | | | | | | | Although it should be currently quite obvious what package is being created when "Creating package..." is printed, it will not be in the future when a debug package is potentially created too. Also, given $pkgname is always correctly set when split packaging now, we no longer need to pass that around. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: strip debugging symbols into separate folderAllan McRae2012-11-27
| | | | | | | | | | | When using the "debug" option in combination with "strip", move the debugging symbols into a separate directory ($pkgdir-debug/usr/lib/debug) suitable for creating a package from. Create hardlinks between debugging symbols of hardlinked files and add symlinks in the .build_id directory if the binary has a build ID. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: always use pkg/$pkgname as $pkgdirAllan McRae2012-11-27
| | | | | | | | Unify split and single packages to always use a folder within pkg/ as thier $pkgdir. This will allow a folder for storing a package with stripped debug symbols to be added within pkg/ too. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: move debug symbol stripping to separate functionAllan McRae2012-11-27
| | | | | | | Move stripping of files to a spearate function that will be expanded for the handling of creating debug symbol packages. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add option to include debugging compiler flagsAllan McRae2012-11-27
| | | | | | | | Add a "debug" option that appends the compiler flags specified in the variables DEBUG_CFLAGS and DEBUG_CXXFLAGS in makepkg.conf to their counterpart buildflags. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: always run tidy_install on repackagingAllan McRae2012-11-27
| | | | | | | | | | When using "makepkg -R" without a packge function, we should still run tidy_install as the user might have added other packaging options such as (e.g.) '!emptydir' to remove empty directories on repackaging. Of course we can not revert some options when repackaging without a package function. Signed-off-by: Allan McRae <allan@archlinux.org>
* Add --needed option to makepkgwgiokas2012-11-27
| | | | | | | | | | | | Simply add the option to pass the --needed flag to pacman when using -i with makepkg. When using makepkg in scripts, particularly for git packages with the new version functions and not just a date, this can save disk io and time instead of reinstalling. This would mostly be useful with the --noconfirm option. Signed-off-by: wgiokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Use sentence case in makepkgJason St. John2012-11-27
| | | | | | | | Most of makepkg already uses sentence case. This cleans up the last few stragglers. Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: save path to PACMAN and test availabilityAllan McRae2012-11-27
| | | | | | | | | | | | After we install dependencies, we source /etc/profile so that new elements get added to the path. As this can override any local setting of PATH, we store the full path of the PACMAN variable passed to makepkg. Also, add a check for PACMAN availability if it is needed to deal with any dependency operations. Reported-by: Martin Panter <vadmium à gmail·com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove last traces of handling command arguments in $PACMANMartin Panter2012-11-27
| | | | | | | | | | | | | | | This resolves an inconsistency with how the $PACMAN variable was interpreted. Previously “makepkg” would extract the first word from the $PACMAN variable and check that it existed as a command. This appears to have been happening ever since the variable was implemented in revision 66c6d28 (makepkg: allow to specify an alternative pacman command). Thus it looks like command arguments were originally allowed in the variable. However the run_pacman() function now quotes $PACMAN, so the whole variable has to be just the command name. This quoting was introduced more recently, perhaps in revision 622326b (makepkg: fix sudo/su calling of pacman). Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix signing built packageChristian Hesse2012-11-27
| | | | | | Fixes issue introduced in 9dd42dc0 Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: deprecate PKGBUILDs without a package() functionAllan McRae2012-11-27
| | | | | | | | | The package() function has been around since pacman-3.3 and has significant advantages including limited fakeroot usage and correct repackaging. The ability to use PKGBUILDs without a package function will be removed in a future release. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: print "SKIP" for signature checksumsAllan McRae2012-11-27
| | | | | | | | | | | | There are valid reasons for a source files PGP signature to be changed (expired key, expired signature, additional person signing...). Thus providing a checksum for signature files can potentially cause a PKGBUILD to require unnecessary updating. Avoid this issue by using "SKIP" for the signature checksum. Fixes FS#31590. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: use last match in BUILDENV/OPTIONS arrayAllan McRae2012-11-27
| | | | | | | | | | Using the last match in the BUILDENV and OPTIONS arrays allows the user to easily override these values without specifying the entire array. For example add "BUILDENV+=(sign)" in ~/.makepkg.conf. Fixes FS#26701. Signed-off-by: Allan McRae <allan@archlinux.org>
* repo-add: quote filename for consistent output styleAllan McRae2012-11-27
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix incorrect bracket usageAllan McRae2012-09-18
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>