summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-02-07Document fakeroot and fakechroot as dependenciesChirantan Ekbote1-0/+8
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07Remove outdated instructions in pactest READMEAllan McRae1-15/+0
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07Remove conditional checks for fakechroot from test filesChirantan Ekbote2-8/+0
We don't want test files to do any checks for fakechroot since we will print a warning if it is not found. Signed-off-by: Chirantan Ekbote <chirantan.ekbote@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07Print a warning if fakechroot is not foundChirantan Ekbote1-1/+3
Fixes FS#33551. Signed-off-by: Chirantan Ekbote <chirantan.ekbote@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07use strtok_r to parse multi-value config optionsAndrew Gregory1-9/+6
This prevents multiple spaces between values from being parsed as empty values. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07document that stdin must not be a tty to read from itAndrew Gregory1-2/+2
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07Better error message with "-" is specified without stdinAllan McRae1-44/+51
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07doc: update PKGBUILD man pageAllan McRae1-49/+52
Rearrange the functions section of the PKGBUILD man package. Clarify that the package() function is a requirement and the rest are all optional. Note that $pkgdir should only be used in the package() function. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07makepkg: make $pkgdir non-accessible during build()Allan McRae1-18/+24
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>
2013-02-07make test/scripts/human_to_size.sh executableAndrew Gregory1-0/+0
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07add missing utilities to contrib/READMEAndrew Gregory1-4/+14
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07unset executable bit on updpkgsums.sh.inAndrew Gregory1-0/+0
No other contrib script is executable. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07inline libarchive compat wrappersDave Reisner3-76/+51
Suggested-by: Dan McGee <dan@archlinux.org> Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07Document LocalFileSigLevel and RemoteFileSigLevelAllan McRae1-0/+8
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07Add configuration option for Upgrade operation SigLevelAllan McRae6-9/+131
Add LocalFileSigLevel and RemoteFileSigLevel to control the signature checking for "pacman -U <file>" and "pacman -U <url>" operations respectively. The starting value for both these options is SigLevel, if it is specified in the [options] section, or the built-in system default. The specified values override and/or supplement this initial value. Note there is no distinction between setting "Required" and "PackageRequired" as there are no database options for Upgrade operations. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-29Restore libarchive 2.8.x compatibilityDan McGee2-2/+2
We still call some of these 'deprecated' methods elsewhere, so this shouldn't present a problem. When we decide 2.x support is to be dropped, we should update all of the code to not call deprecated methods. Allan: Adjusted with respect to previous patches adding libarchive compatibilty layer. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-29Use libarchive compat header for relevant symbolsDave Reisner5-16/+21
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-29add libarchive compatability objectDave Reisner3-0/+99
This allows us to support both libarchive 2.8.x as well as 3.x without deprecation warnings on compile. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-29makepkg: Integrate check_install into tidy_installChirantan Ekbote1-33/+26
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>
2013-01-29dload: pass back the effective URL to callers of _alpm_downloadDave Reisner4-12/+16
I suspect that eventually we're going to end up returning a pointer to an allocated struct to describe the download result, but that's for another patch when the need arises... Fixes FS#33508. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-29Relax requirement of what constitutes a dead connectionLANGLOIS Olivier PIS -EXT1-1/+1
Users have hit issues behind corporate firewalls that initially throttle downloads to ~1B/sec. Signed-off-by: Olivier Langlois < olivier.pis.langlois@transport.alstom.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-29Consolidate --foreign/--native filteringSimon Gomizelj3-14/+17
Also fix a small bug where pacman won't check if the sync dbs are first downloaded when invoked with --native (it should). Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28Make sed follow symlinks on LinuxMaxime Gauduin1-1/+1
Signed-off-by: Maxime Gauduin <alucryd@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28paclog-pkglist: parse entries with caller infoAndrew Gregory1-7/+17
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28add caller prefix to alpm_logactionAndrew Gregory11-50/+68
prefix defaults to "UNKOWN" if null or an empty string is provided. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28Update "missing" fileAllan McRae1-311/+150
The latest automake release causes complaints about an out of date 'missing' file during configure. Sync with upstream. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28Fix printing of pathsWilliam Giokas1-4/+4
Originally printed a leading \ before all path names as the `' would be removed during the make. Using '' should be just as good as using `'. paccache.sh.in: die "cachedir \`%s' does not exist or is not a directory" "$cachedir" paccache die "cachedir \%s does not exist or is not a directory" "$cachedir" Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28add doxygen comments to conflict.cAndrew Gregory1-14/+80
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28paccache: pass the --file option to pacsortDave Reisner1-2/+2
Resolves FS#33455. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28pacsort: add -f, --files option for sorting filenamesDave Reisner2-3/+67
Teach pacsort to understand package filenames and optionally strip away some of the context. alpm_pkg_vercmp() intentionally only understands pure versions, so strings such as '18.0-2-x86_64' and '18.0.1-1-x86_64' will be compared wrongly. Partially addresses FS#33455. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28Make path to ldconfig configurableAllan McRae5-5/+21
The FHS (2.3) says having ldconfig in /sbin is optional and it is usually located in /usr/sbin. So /sbin/ldconfig should not be hard coded in pacman. Instead, provide a configure option --with-ldconfig that defaults to the current path. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28Remove leading / for pactest pathsAllan McRae4-4/+4
The leading / makes the pactest suite look for the file in the users filesystem. This meant the ldconfig tests always passed (even when broken in pacman...). Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28pactest: handle non-default scriptlet shellsAllan McRae9-3/+21
pacman can be configured to use a different shell than /bin/sh for scriplets. Pass the cnfigured value to the pactest suite and make the necessary "copy" of the shell in the test root. Also update all copyright years in the pactest suite. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28Revert execvp and related commitsAllan McRae6-36/+16
This reverts commit 4a8c2852a887d2b1aaa43be3071ab586eb24b9e3. This reverts commit 993700bc6b12cd291544d2a22845f480e8a7925e. This reverts commit bb4d2b72c1d35ab9d65d632be0dcaf00cfa7d600. This reverts commit 60b192e3836a150eb6950ce52241efebbee00f11. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-17makepkg: Formatting consistency in write_pkginfoWilliam Giokas1-7/+5
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>
2013-01-17dload: avoid showing progress bars on some redirectsDave Reisner2-5/+17
RFC 2616 doesn't forbid a 301 or 302 repsonse from having a body, and servers exist in the wild that show this behavior. In order to prevent pacman from showing a progress bar when we aren't actually downloading a package (and merely following one of these pain in the butt redirects), capture the server response code in the response header, rather than waiting to peel it off the handle after the download has finished. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Reported-by: Alexandre Filgueira <alexfilgueira@cinnarch.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-17Fix release datesAllan McRae1-2/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-17pmtest: resolve path to scriptlet shellAllan McRae4-3/+26
In order to support a variety of values for the --with-scriptlet-shell configure flag, pmtest has to be aware of what kind of path was passed, be it an absolute path or a fragment for a path lookup. For absolute paths, leave the path alone. For fragments, search the PATH environment var for the resolved path to the binary. In both cases, join the resultant path to the root directory defined for the test, not a pre-determined bin directory. Fixes FS#31552. With-contribution-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-17Do not require full path for scriptlet shellAllan McRae1-3/+3
This increases robustness to the shell location changing paths. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-17Do not use full path for ldconfigAllan McRae1-7/+4
The ldconfig binary is not guaranteed to be in /sbin. Change to calling just "ldconfig" rather than using the full path. This removed the check that the ldconfig binary exists. However, it is a reasonable assumption that it will exist if its configuration file does. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-17Use execvp for running programs in chrootAllan McRae1-3/+3
This makes us more robust to utilities changing paths. There is no functional change when a full path is specified. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-04Allow querying directory ownershipAndrew Gregory1-19/+41
The restriction of not checking the ownership of a directory is unnecessary given that all the package filelists contain this information. Remove this restriction, with the expectation that you might get multiple packages returned for a given directory. Additionally attempt to minimise the number of files getting through to the slow realpath call. Original-work-by: Dan McGee <dan@archlinux.org> Original-work-by: Allan McRae <allan@archlinux.org> Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-04query_fileowner: don't append '/' if path is "/"Andrew Gregory1-2/+4
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-04pacman-key: reduce verbosity of --populatePierre Schmitz1-1/+1
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>
2013-01-04pacman-key: handle local signing of multiple keysAllan McRae1-8/+14
gpg --lsign-key does not like being given multiple keys to sign. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-04Fix space between control structure and open parensGerardo Exequiel Pozzi8-28/+28
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-04Fix open braces styleGerardo Exequiel Pozzi8-16/+29
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-04Fix missing spaces in operatorsGerardo Exequiel Pozzi7-17/+17
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-04fix comment style // -> /* */Gerardo Exequiel Pozzi2-2/+2
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-04Fix spacing in HACKING spacing exampleAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>