summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAge
* makepkg: create source package inside fakerootAllan McRae2011-06-15
| | | | | | | | | | Create source package files inside the fakeroot environment to ensure reasonable ownership of files within the archive. Fixes FS#24330. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Clean up makefile for script generationAllan McRae2011-06-15
| | | | | | | | We no longer have any python scripts in our scripts/ directory so we can simplify the makefile a bit. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* parse_options: adjust error messagesAllan McRae2011-06-15
| | | | | | | | Provide consistent error messages for unknown long and short options. Also get full string translation for the messages. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* scripts/library: add README fileAllan McRae2011-06-15
| | | | | | | | Add a README file to briefly document the code snippets in the scripts library folder. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* scripts: refactor output formatting functionsAllan McRae2011-06-15
| | | | | | | | | Move the common output formatting functions into a separate library file and import that into each script. makepkg is excluded due to its additional color formatting. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: move option parsing code to separate fileAllan McRae2011-06-15
| | | | | | | | | | | | This move the getopt replacement function parse_options out of makepkg.sh.in and into a separate file. The code is inserted into the relevant place in makepkg using m4. This will allow the reuse of the option parsing code in other scripts (i.e. pacman-key) while avoiding code duplication. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: reword purge messageAllan McRae2011-06-15
| | | | | | | | Clarfiy that it is unwanted files are being removed rather than "other" files (whatever they are...). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge remote-tracking branch 'florian/sodeps'Dan McGee2011-06-14
|\
| * makepkg: add libdepends supportFlorian Pritz2011-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The user adds libaries to the depends array without a version. These must end with .so. Example: depends=(glibc libc.so) find_libdepends() looks for ELF files (not symlinks because these could point outside of pkgdir) in $pkgdir, extracts the library sonames the binary links to and outputs depends seperated by spaces. This list contains all libraries needed by the package. Example: libfoo.so=3-64 write_pkginfo() only keeps .so depends with version information and warns the user about unneded ones. Support-by: Thomas Bächler <thomas@archlinux.org> Support-by: Christoph Schied <Christoph.Schied@uni-ulm.de> Signed-off-by: Florian Pritz <bluewind@server-speed.net>
| * makepkg: add libprovides supportFlorian Pritz2011-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The user adds libaries to the provides array without a version. These must end with .so. Example: provides=(readline libreadline.so) find_libprovides() looks for .so files (not symlinks because these could point outside of pkgdir) in $pkgdir, extracts the library soname (ld links the binary to this name) and outputs provides seperated by spaces. This list contains all libraries provided by the package. Example: libfoo.so=3-64 write_pkginfo() only keeps .so provides with version information and warns the user about unneded ones. Support-by: Thomas Bächler <thomas@archlinux.org> Support-by: Christoph Schied <Christoph.Schied@uni-ulm.de> Signed-off-by: Florian Pritz <bluewind@server-speed.net>
* | Fix bracket type in makefileAllan McRae2011-06-09
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Fix name of original files in scriptsAllan McRae2011-06-08
| | | | | | | | | | | | | | | | | | | | Our scripts all currently say: Generated from foo.in; do not edit by hand. Fix this to say foo.sh.in, which is the actual original file name. Signed-off-by: Allan McRae <allan@archlinux.org>
* | pacman-key: add vim modeline and fix whitespace issuesAllan McRae2011-06-08
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | pkgdelta: add vim modelineAllan McRae2011-06-08
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-06-07
|\ \ | | | | | | | | | | | | Conflicts: lib/libalpm/add.c
| * | makepkg: fix creation of source package with -pAllan McRae2011-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a source package using an non-local buildscript via the -p option, the inclusion of changelog and install files would fail. Fixes FS#24567. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | pacman-key: update copyrightAllan McRae2011-06-07
| | | | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | | Merge branch 'maint'Dan McGee2011-06-02
|\| | | | | | | | | | | | | | Conflicts: src/pacman/callback.c
| * | repo-add: anchor exclusion pattern when generating filelistDan McGee2011-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes FS#24534. Dotfiles, such as /etc/skel/.bash_profile, were not being included in generated files entries. bsdtar --exclude option supports anchors on the pattern, so using "^.*" instead of ".*" solves our problem and still excludes all root-level dotfiles (e.g. .PKGINFO). Signed-off-by: Dan McGee <dan@archlinux.org>
* | | pacman-key: print default gpgdir in usagePang Yan Han2011-06-01
| |/ |/| | | | | | | Signed-off-by: Pang Yan Han <pangyanhan@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-05-04
|\|
| * makepkg: quote variable that may contain spacesAllan McRae2011-05-02
| | | | | | | | | | | | | | | | Prevents failures when $PKGDEST contains spaces (FS#24002) Patch-by: Sebastien Duthil Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add: update copyright messageAllan McRae2011-04-24
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add: check for gpg earlyAllan McRae2011-04-24
| | | | | | | | | | | | | | Check for the presence of gpg as soon as we know we need it. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add: check for valid key when signing is requestedAllan McRae2011-04-24
| | | | | | | | | | | | | | Follow the example of makepkg Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add: add option to specify a different key to sign withDenis A. Altoé Falqueto2011-04-24
| | | | | | | | | | | | | | | | | | Add -k/--key option to specify a non-default key for signing a package database. Original-patch-by: Denis A. Altoé Falqueto <denisfalqueto@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add: simplify usage messageAllan McRae2011-04-24
| | | | | | | | | | | | | | | | | | | | | | Listing every option on the usage line becomes unweildly as more options get added so simplify it. Also, provide a standard package name in the repo-add example. Dan: just use 'options' as we use elsewhere, not 'option(s)'. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-key: improved reading of the configuration fileIvan Kanakarakis2011-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit replaces the find_config() function with the get_from() function. get_from expects two arguments, the first is the file to read and the second is the key to look for in the given file. get_from returns the first matching value for the given key. The file is expected to be in the format: key = value Each of 'key' 'equal sign' 'value' can be surrounded be random whitespace. Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-key: display the unsupported command to the userIvan Kanakarakis2011-04-21
| | | | | | | | | | | | | | | | If the user provides an unsupported command, inform the user that this switch is unknown, display usage and exit. Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg, pacman-key: unify help message with other scriptsIvan Kanakarakis2011-04-21
| | | | | | | | | | | | | | | | The help message changed to match the one rankmirrors script has. It's clearer as to what the --help switch does. Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add configure option to specify package signing keyAllan McRae2011-04-20
| | | | | | | | | | | | | | | | | | Add the "GPGKEY" option to makepkg.conf for specifying signing packages with the non-default key from the keyring. Is overridded by makepkg's --key option. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-04-15
|\| | | | | | | | | | | | | | | Conflicts: lib/libalpm/alpm.h lib/libalpm/trans.c Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg.sh.in: fix a GNU-ism in su invocationRémy Oudompheng2011-04-13
| | | | | | | | | | | | | | | | | | | | | | | | GNU su supports the -c option to specify a command to execute. However, other flavours of su may have a different interpretation of the '-c' flag (e.g. FreeBSD and OpenBSD). The behaviour is correct when '-c' follows an explicit username. Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-04-05
|\| | | | | | | | | | | | | Conflicts: lib/libalpm/be_sync.c lib/libalpm/db.c src/pacman/util.c
| * makepkg: fix a GNU-ism in awk usageRémy Oudompheng2011-04-04
| | | | | | | | | | | | | | | | | | | | A non-GNU version of awk may not support the (|...) syntax for an optional group and require '()' to match an empty string. The (...)? syntax is more appropriate for this usage. Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: improve parsing for sanity checksAllan McRae2011-04-04
| | | | | | | | | | | | | | | | | | Trailing backslahses can lead to additional spaces at the front of extracted entries. See FS#23524. Strip these while parsing the PKGBUILD entries. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: remove unnecessary tr usageAllan McRae2011-03-30
| | | | | | | | | | | | | | | | The use of "tr" only leads to trouble. Remove unnecessary usage of it from within makepkg. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: avoid usage of tr to sidestep locale issuesDave Reisner2011-03-30
| | | | | | | | | | | | | | | | | | to quote dan: "turkish will FUCK YOU UP. this is not the first or the last time" Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: command line options for signing packagesDenis A. Altoé Falqueto2011-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Three new command line options were added: --sign: forces the generation of a signature for the resulting package, taking precedence over the value in makepkg.conf --nosign: do not sign the resulting package --key <key>: use a different key than the user's default for signing the package. A check is performed to ensure the user has (provided) a valid gpg key for signing. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Create pacman keyring directory if missingRay Kohler2011-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use mode 755, so non-root users can see inside. Add "--no-permission-warning" to GPG_PACMAN to suppress the noise that otherwise comes of not using mode 700 - this is not private data. GPGme turns out not to issue this warning itself, so no problem there. TODO: should non-root users be allowed to use the read-only operations (--list, --export, --finger)? Signed-off-by: Ray Kohler <ataraxia937@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Clean up repo-add usage messageRay Kohler2011-03-27
| | | | | | | | | | | | | | | | This now includes -s and -v, tailors itself to the current command, and is formatted more like that of other pacman commands. Signed-off-by: Ray Kohler <ataraxia937@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-03-27
|\| | | | | | | | | Conflicts: lib/libalpm/deps.c
| * Clarify error message in pacman-db-upgradeDan McGee2011-03-27
| | | | | | | | | | | | Addresses FS#23451. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Sign database even if emptyRay Kohler2011-03-27
| | | | | | | | | | | | | | | | Move the create_signature() call outside the case of non-empty databases, so it will be called regardless. Signed-off-by: Ray Kohler <ataraxia937@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: allow PKGEXT and SRCEXT to be overridden by env variablesRay Kohler2011-03-27
| | | | | | | | | | | | Signed-off-by: Ray Kohler <ataraxia937@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Rely on the return value of type instead of its outputDave Reisner2011-03-27
| | | | | | | | | | Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-03-24
|\|
| * Make log redirection sanerJan Steffens2011-03-24
| | | | | | | | | | | | | | | | | | My main motivation was to remove the "sync", which can stall for minutes on a busy machine (FS#23378). I also cleaned up the redirection. Signed-off-by: Jan Steffens <jan.steffens@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Fix use of relative paths for packages in repo-addRay Kohler2011-03-24
| | | | | | | | | | | | | | | | | | Move checksum and pgpsig calcluation before changing into the tmpdir, otherwise we can't find the files if a relative path was used. Signed-off-by: Ray Kohler <ataraxia937@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'gpg-build-tools'Dan McGee2011-03-23
|\ \