summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAge
* makepnd-v2makepndJari Vetoniemi2017-08-08
|
* makepkg: add more information to .BUILDINFOLevente Polyak2017-07-06
| | | | | | | | The .BUILDINFO file should retain all the information needed to reproducibly build a package. Add some extra information to the file and also provide a version number to keep track of future changes. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: set default value for PACKAGERAllan McRae2017-07-06
| | | | | | | In write_pkginfo, we checked if $PACKAGER was undefined, and gave a default value if not. Just do this upfront to simplify this function. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: always write pkgbaseAllan McRae2017-07-06
| | | | | | | | There is little savings in only writing pkgbase when different to pkgname, and it makes determining the pkgbase by parsing .PKGINFO slightly easier. Lets just write it... Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: do not write baseverAllan McRae2017-07-06
| | | | | | Since 8a02abcf19, this attribute will never exist. Remove check to write it. Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: Fix improperly spelled local variable declarationEli Schwartz2017-07-06
| | | | | Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg/integrity: Fix error message not sent to stderrEli Schwartz2017-07-06
| | | | | Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: fix unsanitized source filenamesEli Schwartz2017-07-06
| | | | | | | | | There were a couple places where filenames beginning with "-" were not properly guarded against by passing them after "--". Some PKGBUILD authors are crazy, but we still take those into account. Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: introduce SOURCE_DATE_EPOCHAllan McRae2017-05-16
| | | | | | | | | | | | | | | This patch introduces the SOURCE_DATE_EPOCH environmental variable. All files in a package are adjusted to have their modification dates set to the value of SOURCE_DATE_EPOCH, which defaults to "date +%s". Setting this variable allows a package that is built twice in the same environment to be (potentially) reproducible in that the checksum of the generated package file will be the same. Also adjust the compression of the mtree file to avoid gzip embedding a timestamp. Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
* makepkg: remove build date from .PKGINFO headerAllan McRae2017-05-16
| | | | | | | | This information is duplicated (in less friendly format) in the "builddate" entry and removing it improves reproducible packaging. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
* makepkg: create signature files outside of fakerootAllan McRae2017-05-08
| | | | | | | | | | With recent version of gpg, signing within fakeroot works on the first invocation, but fails on later runs. Sign all packages outside of fakeroot to avoid this issue. Fixes FS#49946. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: do not create symlinks in build directoryAllan McRae2017-04-17
| | | | | | | | Setting PKGDEST and friends enables us to keep all built packages in a single location. Symlinking these files into the build directory creates unnecessary clutter and requires clean-up in multiple places when removing old version. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: clean up pkgver and prepare log filesMichael Straube2017-04-17
| | | | | | | | | | | | Delete log files for the pkgver and prepare functions if -c,--clean is passed. Fixes FS#51039 and FS#51075 Includes patch submitted by Christian Braun. Signed-off-by: Michael Straube <straubem@gmx.de> Signed-off-by: Allan McRae <allan@archlinux.org>
* Replace @SIZECMD@ with POSIX-compatible commandDrew DeVault2017-04-04
| | | | | | | | Now uses wc -c $file | cut -d' ' -f1, which works using only POSIX commands and removes the need for any platform-specific usages. Signed-off-by: Drew DeVault <sir@cmpwn.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Provide source files for useful debug packagesAllan McRae2017-01-04
| | | | | | | | | | | Debug packages are fairly useless currently because the soucre files needed for stepping through code etc are not packaged with them. This patch adds the needed source files to the debug package and adjusts the debug info to look at the /usr/src/debug/ directory for them rather than the build location. This requires using the "debugedit" program which is provided as part of the RPM sources. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Verify git signaturesEli Schwartz2017-01-04
| | | | | | | | | | | A git repository is marked as signed if it contains the query "signed" as defined by https://tools.ietf.org/html/rfc3986 Adds two utility functions in util/source.sh.in to extract fragments and queries, and modifies source/git.sh.in to use them. Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg/integrity: Verify file signatures in a separate functionEli Schwartz2017-01-04
| | | | | | | This makes it easier to add signature verification for new protos. Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* repo-add: sort file list entriesAndrew Gregory2017-01-04
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: sort package contentsAndrew Gregory2017-01-04
| | | | | | | | | | By passing a NUL-separated filelist, this also fixes a bug where files that look like bsdtar options in the package root could break the package ("-C" was particularly troublesome because bsdtar interprets it as an option anywhere in the file list, even following "--"). Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: warn about dotfiles in package rootAndrew Gregory2017-01-04
| | | | | | | | libalpm reserves paths starting with '.' for its own use and will not extract any other than those it recognizes. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Update copyright yearsAllan McRae2017-01-04
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Disallow forward slashes in pkgverSteef Hegeman2017-01-04
| | | | | | | | | | | scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in now raises an error when pkgver contains forward slashes. pkgver containing a forward slash results in a package filename containing a forward slash, which isn't a valid filename. Signed-off-by: Steef Hegeman <steefhegeman@hotmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Build a single debug package for all packages from a PKGBUILDAllan McRae2016-12-05
| | | | | | | | | | | | | | | | | | We want to provide source files with debug symbol packages to allow easy stepping through the program. This becomes difficult with split packages due to the binaries in many of these sharing source files across packages. There are (at least) two solutions to this problem. #1: ensure common source files are located in the debug package for the package lowest in the dependency chain and add dependencies to the debug packages so all require source files are present, or #2: create one debug package for all split packages in a PKGBUILD. The second is a more robust approach despite potentially creating very large debug packages. This patch creates a single $pkgbase-debug package and adds provides such that installing $pkgname-debug will always work. Signed-off-by: Allan McRae <allan@archlinux.org>
* add generated scripts to gitignoreChristian Hesse2016-12-05
| | | | | | | These files are generated at build time. Ignore in git. Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: reject packages with newlines in pathsAndrew Gregory2016-12-05
| | | | | | | libalpm's local database format does not support paths with newlines. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: abort on lint_package errorsAndrew Gregory2016-12-05
| | | | | | | Allows lint_package to prevent makepkg from creating an invalid package. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: reject package data with newlinesAndrew Gregory2016-12-05
| | | | | | | The PKGINFO format cannot handle values that contain newlines. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix find_lib{depends, provides} resultsAndrew Gregory2016-12-05
| | | | | | | | | Neither function was checking for the existence of actual results before calling printf, resulting in them returning a list with a single empty value if there were no depends/provides. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: unset potentially architecture-specific varsDave Reisner2016-12-05
| | | | | | I'm not convinced this is a worthwhile goal, but let's follow suit. Since we can't know the names of all the vars that might exist, unset them by pattern.
* makepkg: fix quoting in calls to dependency checkingDave Reisner2016-12-05
|
* makepkg: fix quoting in calls to check_depsDave Reisner2016-12-05
| | | | | The inside needs quoting, and this is separate from the declartion, which does not (in these cases).
* makepkg: make run_function_safe more robustDave Reisner2016-12-05
| | | | | | | | | | | | | | | | | | | Use shopt to set/reset errexit and errtrace, which lets us: 1) be more vigilant, resetting anything the user might do to us in PKGBUILD functions. 2) use human-readable words (errexit vs. -e) On top of this, introduce a new save/restore for the shell's other shopts. A user should not have any expectations that what happens in one function is available in another function, if it isn't explicitly defined in the PKGBUILD. While this change does not make that assertion, it gets us closer. We also replace a variable which comes from out of nowhere (pkgfunc) with the positional parameter containing the same value. Quoting is adjusted to make the expansion happen at the time the trap is set, rather than later on.
* makepkg: remove vestiges of global errexitDave Reisner2016-12-05
| | | | | These 'set +E' diversions haven't been needed since global errexit was disabled in dca10b062f2 (January 2012).
* Make sure all proper scripts are installed instead of the wrappersJohannes Löthberg2016-12-05
| | | | | | | | | | After 1f8f0bd9ac4c11cdc1b9506f9f64d8192ecad4ee all scripts that were changed to using the wrapper for in-tree use have the wrappers installed to the system instead of the actual script, so change the install command to support all wrapped scripts instead of just makepkg. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Revert "[RFC] Provide source files for useful debug packages"Allan McRae2016-12-05
| | | | | | This reverts commit a79c0038ae84c38fe063bd7426a839f3c01c10e8. I merged the wrong branch into master...
* [RFC] Provide source files for useful debug packagesAllan McRae2016-11-02
| | | | | | | | | | | Debug packages are fairly useless currently because the soucre files needed for stepping through code etc are not packaged with them. This patch adds the needed source files to the debug package and adjusts the debug info to look at the /usr/src/debug/ directory for them rather than the build location. This requires using the "debugedit" program which is provided as part of the RPM sources. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: print files with refs to $srcdir/$pkgdirIvy Foster2016-10-22
| | | | | | | | Since rewriting build_references() anyway, tweaked quoting. Implements FS#31558. Signed-off-by: Ivy Foster <ivy.foster@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Use coreutils binaries for checking/generating checksumsAllan McRae2016-10-22
| | | | | | | | | | | | | | | | | If pacman is build against a crypto library other than openssl, it makes no sense to require makepkg to use it. The only currently considered alternative to openssl is nettle, which has no binary for base64 encode/decode. This means that we could replace the hashing cacluations with nettle-hash, but would require base64 from coreutils. Given makepkg already relies heavily on coreutils, we might as well use all the coreutils hashing binaries too. This patch also improves the checking of required binaries for hashing operations. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Move parseopts from library to libmakepkgAlad Wenter2016-10-22
| | | | | | | | | | | | | | | parseopts is used in makepkg and other scripts such as pacman-key as a getopt replacement. Instead of including it in those scripts via a macro, move it to libmakepkg/util/parseopts.sh and have scripts source this file where appropriate. To keep the parseopts test, a new variable was introduced: PM_LIBMAKEPKG_DIR Signed-off-by: Alad Wenter <alad@archlinux.info> Signed-off-by: Allan McRae <allan@archlinux.org>
* Generalise makepkg-wrapper to handle any script using libmakepkgAllan McRae2016-10-22
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: generate all scriptsAlad Wenter2016-10-22
| | | | | | | | | In order for the scripts to be used in testsuites, it is easiest to generate all of them so they are found in the build directory (which may be different to the source directory). Signed-off-by: Alad Wenter <alad@archlinux.info> Signed-off-by: Allan McRae <allan@archlinux.org>
* Ensure makepkg-wrapper is built after makepkgAllan McRae2016-10-11
| | | | | | | | makepkg-wrapper did not get rebuilt if makepkg was regenerated due to library changes. Ensure makepkg-wrapper is always generated and linked any time makepkg changes. Signed-off-by: Allan McRae <allan@archlinux.org>
* lint_pkgbuild/pkgname: pkgname is not allowed to be emptyChristian Hesse2016-10-10
| | | | | | | | We checked for empty array elements, but did not catch empty array. Add a check for that case as well. Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: Allan McRae <allan@archlinux.org>
* Move bash/zsh completion out of contribAllan McRae2016-10-10
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove pacman-optimizeAllan McRae2016-10-10
| | | | | | | The people who believe that pacman-optimize is actually doing something useful are the same people who are voting for Trump. Signed-off-by: Allan McRae <allan@archlinux.org>
* fix --printsrcinfo unify arch and non-arch specific variablesLevente Polyak2016-10-10
| | | | | | | | | | This fixes the issue with --printsrcinfo that all arch specific variants of a variable get merged into their non arch specific variant. The .SRCINFO file ends up having $depends containing $depends_x86_64 and omitting the latter. Signed-off-by: Allan McRae <allan@archlinux.org>
* repo-add: fix error in directories with a space in their nameFabio Castell2016-09-09
| | | | | | Fixes FS#50285 Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix typo in pacman-db-upgrade usage messageAllan McRae2016-09-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix file name in scripts potfileAllan McRae2016-08-30
|
* libmakepkg: look for architecture-specific hashes in get_integlistJack O'Connor2016-08-30
| | | | | | | | | | | | `makepkg -g` looks for existing checksums in the PKGBUILD file, so that it can generate new sums of the same type. Previously it only checked variables of the form "sha256sums", and not "sha256sums_x86_64". That meant it would always fall back to MD5 for packages with only architecture-specific sources. This change makes it look at architecture-specific checksums too to determine the type. Signed-off-by: Jack O'Connor <oconnor663@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>