]> wolfpit.net Git - tool/Arch-pacman/.git/log
tool/Arch-pacman/.git
9 years agopactest: treat unknown rules as failures
Andrew Gregory [Fri, 2 Aug 2013 02:51:24 +0000 (22:51 -0400)]
pactest: treat unknown rules as failures

Tests should only be skipped when they aren't relevant, not when the
test itself is bad.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoconvert test scripts to tap output
Andrew Gregory [Thu, 18 Jul 2013 07:41:08 +0000 (03:41 -0400)]
convert test scripts to tap output

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoquery006: only set expectfailure on 32-bit systems
Andrew Gregory [Sun, 18 Aug 2013 19:06:30 +0000 (15:06 -0400)]
query006: only set expectfailure on 32-bit systems

Use the architecture of the python interpreter running the test to
detect 32bit systems.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoReport missing directory if we can not initialise alpm library
Allan McRae [Sun, 21 Jul 2013 06:48:31 +0000 (16:48 +1000)]
Report missing directory if we can not initialise alpm library

When pacman failed to initialise the alpm library due to the database
directory being missing (either via the root not existing or the database
directory itself not existing), it just printed the non-informative
message "could not find or read directory".  Add the directory
information the the error output.  E.g.:

error: failed to initialize alpm library
(could not find or read directory: /this/does/not/exist/var/lib/pacman/)

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoRemove setlocale usage from the backend
Allan McRae [Sun, 21 Jul 2013 06:38:17 +0000 (16:38 +1000)]
Remove setlocale usage from the backend

Using setlocale in the backend is bound to lead to frontend issues
and we have have been using epoch in our databases since April 2007
(commit 47622eef).  Remove support for old style times.

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoWarn when directory ownership differs between filesystem and package
Allan McRae [Sun, 21 Jul 2013 06:10:25 +0000 (16:10 +1000)]
Warn when directory ownership differs between filesystem and package

We currently only warn if a directory's permissions differ, but using -Qkk
on my system shows that directory permissions tend to change in packages
reasonably frequently without notice.  Provide a warning in such cases
so that it can be altered.  Example output:

(1/1) reinstalling nginx
warning: directory ownership differs on /var/lib/nginx/proxy/
filesystem: 33:0  package: 0:0

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoOnly note backup file changes with -Qkk
Allan McRae [Sun, 21 Jul 2013 05:38:24 +0000 (15:38 +1000)]
Only note backup file changes with -Qkk

Backup files are expected to be changed and should not be flagged by -Qkk.
Note changed back-up files in -Qkk but do not count them as altered. Do
not report backup files in -Qqkk.

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoFix whitespace in makepkg.sh.in and makepkg-template.pl.in
Jason St. John [Mon, 22 Jul 2013 01:09:58 +0000 (03:09 +0200)]
Fix whitespace in makepkg.sh.in and makepkg-template.pl.in

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>
9 years agoFix whitespace in pacsort.c and pactree.c
Jason St. John [Mon, 22 Jul 2013 01:09:57 +0000 (03:09 +0200)]
Fix whitespace in pacsort.c and pactree.c

Replace spaces with tabs.
Remove extra spaces.

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agopacdiff: provide an --output option to show any .pac* files
Jonathan Frazier [Thu, 18 Jul 2013 22:05:58 +0000 (18:05 -0400)]
pacdiff: provide an --output option to show any .pac* files

This is an option to just echo's the pacnews/pacsaves instead of merging
or removing them. This can be used to check the config status such as in
a cron job without modifying the system.

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agopacdiff: make pacmandb search the default type.
Jonathan Frazier [Thu, 18 Jul 2013 21:50:44 +0000 (17:50 -0400)]
pacdiff: make pacmandb search the default type.

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agopacdiff: improve speed, accuracy finding active configs using pacmandb
Jonathan Frazier [Thu, 18 Jul 2013 21:12:32 +0000 (17:12 -0400)]
pacdiff: improve speed, accuracy finding active configs using pacmandb

This is a new search type, using -p or --pacmandb options. It reads
config file locations directly from the local pacman db. It will find
active configs anywhere they are defined in installed packages. It is
not dependant on outside configs such as updatedb.conf or scanning a
large set of directories for find.

This will find more pacnews than find when searching with the current
default of /etc, and it is faster than both find and updatedb when
searching the entire fs. When run directly after an update, the local db
is more likely to be cached than all files in /etc or / as other methods
read. This will increase performance further post upgrade.

After a package is removed and a pacsave is created, this method will
not find these pacsaves until the base config is added to the local db
again. These files have no influence in a working system and only take
up a few blocks of disk space.

Active configs need to be dealt with immediately to keep a system
working. pacsaves related to removed configs can remain for weeks or
months without problems. I would recommend occasionally running other
methods such as --locate to remove them.

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agopacdiff: rework search type handling, add --find option
Jonathan Frazier [Tue, 16 Jul 2013 16:38:15 +0000 (12:38 -0400)]
pacdiff: rework search type handling, add --find option

Change cmd tests to if (( USE_FIND ))... as it is cleaner.  All search
cmds have an option and a variable initialized to zero. The active option
should be set to 1.  Add a switch to exclude multiple search options.
set the default when all are equal to zero.

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agopacdiff: add --nocolor option for the terminally challenged.
Jonathan Frazier [Mon, 15 Jul 2013 17:02:33 +0000 (13:02 -0400)]
pacdiff: add --nocolor option for the terminally challenged.

Allow colors to be disabled for use on broken/serial terminals.

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agopacdiff: allow multiple separated options
Jonathan Frazier [Mon, 15 Jul 2013 16:56:03 +0000 (12:56 -0400)]
pacdiff: allow multiple separated options

loop over arguments, this will allow adding options such as --nocolor

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agopacdiff: clean up and reword --help
Jonathan Frazier [Mon, 15 Jul 2013 15:00:30 +0000 (11:00 -0400)]
pacdiff: clean up and reword --help

Clean up and reword --help
get rid of all the echos to make it easier to read in source.

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agopacdiff: Search and give warnings for older pacsave.[0-9]* files
Jonathan Frazier [Sun, 7 Jul 2013 13:45:02 +0000 (09:45 -0400)]
pacdiff: Search and give warnings for older pacsave.[0-9]* files

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoCorrected return codes for Sg flag
Ashley Whetter [Tue, 16 Jul 2013 09:18:32 +0000 (10:18 +0100)]
Corrected return codes for Sg flag

Non-zero is now returned if a group is searched for that doesn't exist.
Fixes FS#36097.

Signed-off-by: Ashley Whetter <awhetter.2011@my.bristol.ac.uk>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoFix typo
Allan McRae [Mon, 15 Jul 2013 04:29:28 +0000 (14:29 +1000)]
Fix typo

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoclarified descriptions for pactree -r (--help)
Zulker Nayeen Nahiyan [Mon, 15 Jul 2013 01:37:42 +0000 (07:37 +0600)]
clarified descriptions for pactree -r (--help)

Signed-off-by: Zulker Nayeen Nahiyan <nahiyan02@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoClarify inter-conflicts message
Allan McRae [Mon, 15 Jul 2013 01:45:11 +0000 (11:45 +1000)]
Clarify inter-conflicts message

Use a clear message rather than using a made up word to describe what
we are doing.

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoInstall makedepends and checkdepends together
Ashley Whetter [Fri, 12 Jul 2013 10:06:38 +0000 (11:06 +0100)]
Install makedepends and checkdepends together

Fixes FS#31557

Signed-off-by: Ashley Whetter <awhetter.2011@my.bristol.ac.uk>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agopacdiff: Add quit to found pacnew options
Jonathan Frazier [Thu, 11 Jul 2013 17:03:36 +0000 (13:03 -0400)]
pacdiff: Add quit to found pacnew options

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoCarry a copy of gpgme.m4
Allan McRae [Wed, 10 Jul 2013 12:42:40 +0000 (22:42 +1000)]
Carry a copy of gpgme.m4

On systems without gpgme installed, autoreconf will fail with an unrelated
error message unless the gpgme.m4 file is present.

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoRemove autoclean.sh
Allan McRae [Sun, 30 Jun 2013 01:12:16 +0000 (11:12 +1000)]
Remove autoclean.sh

Use 'git clean' instead.

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoPatch ltmain on autoreconf
Allan McRae [Wed, 26 Jun 2013 04:37:53 +0000 (14:37 +1000)]
Patch ltmain on autoreconf

We used to carry a patched version of ltmain in our repos to fix libtools
issues with -Wl,-as-needed. Now that ltmain is "generated" by autoreconf,
we manually patch it afterwards.

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoUse autoreconf in autogen.sh
Allan McRae [Wed, 26 Jun 2013 04:21:53 +0000 (14:21 +1000)]
Use autoreconf in autogen.sh

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoUpdate gitignore files for use with autoreconf
Allan McRae [Wed, 26 Jun 2013 04:20:59 +0000 (14:20 +1000)]
Update gitignore files for use with autoreconf

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoRemove autotools files
Allan McRae [Wed, 26 Jun 2013 04:05:26 +0000 (14:05 +1000)]
Remove autotools files

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agobe_sync: avoid crashing on files in the root of a DB
Dave Reisner [Sun, 7 Jul 2013 23:52:13 +0000 (19:52 -0400)]
be_sync: avoid crashing on files in the root of a DB

If a sync DB is malformed and contains entries in the root of the
archive, load_pkg_for_entry will leave the 'filename' variable empty,
leading to a crash in the ensuing strcmp() calls which determine the DB
fragment being examined.

While this isn't a read error, this should be reported to the user so
that it can be addressed by the creator of the DB.

As seen: https://bbs.archlinux.org/viewtopic.php?pid=1297766

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
9 years agoHide unused parameter warnings when building without libcurl
Allan McRae [Wed, 10 Jul 2013 03:58:57 +0000 (13:58 +1000)]
Hide unused parameter warnings when building without libcurl

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoAdd missing header
Allan McRae [Wed, 10 Jul 2013 03:41:09 +0000 (13:41 +1000)]
Add missing header

Exposed when building with --without-libcurl

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agouse full path when checking for mountpoints
Andrew Gregory [Thu, 4 Jul 2013 10:36:20 +0000 (06:36 -0400)]
use full path when checking for mountpoints

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agodo not check error from close(2)
Dave Reisner [Thu, 4 Jul 2013 00:33:19 +0000 (20:33 -0400)]
do not check error from close(2)

On operating systems we support, the behavior is always such that the
kernel will do the right thing as far as invalidating the file
descriptor, regardless of the eventual return value. Therefore,
potentially looping and calling close multiple times is wrong.

At best, we call close again on an invalid FD and throw a spurious EBADF
error. At worst, we might close an FD which doesn't belong to us when a
multi-threaded application opens its own file descriptor between
iterations of the loop.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoConsolidate and improve table implementations
Simon Gomizelj [Thu, 4 Jul 2013 02:34:14 +0000 (22:34 -0400)]
Consolidate and improve table implementations

Implement both the VerbosePkgList and the summary message with the same
table.

Improve VerbosePkgList by caching attributes and cell's lengths instead
of recaculating them.

Right align every cell that containing a file size in both the
VerbosePkgList and the summary.

Simplify the printf statements and the alignment application.

Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoupdate to automake 1.14
Allan McRae [Fri, 21 Jun 2013 13:13:02 +0000 (23:13 +1000)]
update to automake 1.14

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoquery_fileowner: resolve trailing . or .. in paths
Andrew Gregory [Wed, 19 Jun 2013 05:23:20 +0000 (01:23 -0400)]
query_fileowner: resolve trailing . or .. in paths

The full path needs to resolved any time it ends with "." or "..", not
just when those are the entire path.  This allows strange-but-valid
paths such as: "/home/." to be queried.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoquery_fileowner: remove useless path variable
Andrew Gregory [Wed, 19 Jun 2013 05:23:19 +0000 (01:23 -0400)]
query_fileowner: remove useless path variable

We no longer need it for resolving package files and using it to
resolve root is unnecessary as alpm does that for us.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoquery_group: allow package filters
Andrew Gregory [Wed, 19 Jun 2013 05:23:18 +0000 (01:23 -0400)]
query_group: allow package filters

Relocated query_group() to allow calling filter().

Fixes FS#19716

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoskip unknown repo names for pacman -Sl
Andrew Gregory [Wed, 19 Jun 2013 05:15:02 +0000 (01:15 -0400)]
skip unknown repo names for pacman -Sl

Brings pacman -Sl behavior in line with other listing operations.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoEnable inverted patterns in NoExtract and NoUpgrade.
Patrick Steinhardt [Tue, 18 Jun 2013 15:44:15 +0000 (17:44 +0200)]
Enable inverted patterns in NoExtract and NoUpgrade.

It is now possible to invert patterns in NoExtract and NoUpgrade.
This feature allows users to whitelist certain files that were
previously blacklisted by another entry.

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agodeps.c: check for indirect deps when ordering
Andrew Gregory [Sat, 18 May 2013 19:53:32 +0000 (15:53 -0400)]
deps.c: check for indirect deps when ordering

On upgrades, indirect dependencies were not being detected if there was
a dependency in between them that was not part of the transaction.  For
example, with the dependency chain: pkg1 -> pkg2 -> pkg3, if pkg1 and
pkg3 are being upgraded but not pkg2 pacman would not order pkg1 and
pkg3 properly.

This was particularly problematic when replacements were involved
because the replaced package(s) would be removed at the start of the
transaction.  If an install script required the replacer and lacked
a direct dependency, it could fail.

Fixes FS#32764.

Partially fixes FS#23011.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoMake --unrequired filter packages that are optdep as well
Olivier Brunel [Mon, 17 Jun 2013 08:46:38 +0000 (10:46 +0200)]
Make --unrequired filter packages that are optdep as well

Specify it twice to only filter direct dependencies.

Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoInstall unchanged backup files to get correct timestamps.
Patrick Steinhardt [Tue, 4 Jun 2013 09:20:14 +0000 (11:20 +0200)]
Install unchanged backup files to get correct timestamps.

Fixes FS#35515.

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoMerge branch 'maint'
Allan McRae [Wed, 26 Jun 2013 05:30:55 +0000 (15:30 +1000)]
Merge branch 'maint'

9 years agoRespect paths with spaces on --install
Andrea Scarpino [Wed, 19 Jun 2013 20:38:57 +0000 (22:38 +0200)]
Respect paths with spaces on --install

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>
9 years agoMerge branch 'maint'
Allan McRae [Tue, 18 Jun 2013 03:59:18 +0000 (13:59 +1000)]
Merge branch 'maint'

9 years ago4.1.2 release preparation
Allan McRae [Tue, 18 Jun 2013 03:38:11 +0000 (13:38 +1000)]
4.1.2 release preparation

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agocontrib: update .gitignore
Allan McRae [Tue, 18 Jun 2013 03:26:42 +0000 (13:26 +1000)]
contrib: update .gitignore

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoPull translation updates
Allan McRae [Tue, 18 Jun 2013 03:17:30 +0000 (13:17 +1000)]
Pull translation updates

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agopacscripts: Update for pacman changes
Karol Blazewicz [Mon, 17 Jun 2013 21:48:39 +0000 (23:48 +0200)]
pacscripts: Update for pacman changes

Changes to pacman mean that -Sp can be called without root permissions
and '-d' needs passed twice to completely ignore dependencies.

Signed-off-by: Karol Błażewicz <karol.blazewicz at gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agopacscripts: don't read the whole package from cache
Karol Blazewicz [Mon, 17 Jun 2013 21:48:38 +0000 (23:48 +0200)]
pacscripts: don't read the whole package from cache

'-q' means "Exit as soon as each specified pattern or filename has
been matched." There is no reason to keep reading the whole package
from the cache when the install script has already been printed to
stdout.

Signed-off-by: Karol Błażewicz <karol.blazewicz at gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agocheckupdates: Consistency in environmental variable name
Allan McRae [Tue, 18 Jun 2013 02:53:26 +0000 (12:53 +1000)]
checkupdates: Consistency in environmental variable name

Use CHECKUPDATES_DB rather than CHECKUPDATE_DB for consistency with the
script name.

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agocontrib/checkupdates: fix typo
Allan McRae [Sun, 16 Jun 2013 06:36:20 +0000 (16:36 +1000)]
contrib/checkupdates: fix typo

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agomakepkg: fix typo for distcc test
Allan McRae [Sun, 16 Jun 2013 06:33:39 +0000 (16:33 +1000)]
makepkg: fix typo for distcc test

Introduced in commit 9dd42dc0.  Fixes FS#35741.

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoCorrect INODECMD for BSD and Darwin
Allan McRae [Thu, 6 Jun 2013 03:57:06 +0000 (13:57 +1000)]
Correct INODECMD for BSD and Darwin

Fixes FS#35469.

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agopaccache: make --help output look nice on 80 width terminal
Allan McRae [Tue, 4 Jun 2013 04:51:54 +0000 (14:51 +1000)]
paccache: make --help output look nice on 80 width terminal

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agorepo-add; add option to remove existing package files from disk
Phillip Smith [Mon, 3 Jun 2013 05:05:10 +0000 (15:05 +1000)]
repo-add; add option to remove existing package files from disk

When maintaining a custom repo, often it is undesirable to retain older
versions of packages. This patch adds the --remove option to remove the
current package file and it's signature from disk before adding the new
one to the database. Documentation is also updated. This is an optional
flag and default behaviour (leaving ondisk files alone) is not changed.

Signed-off-by: Phillip Smith <fukawi2@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoDocument alpm_list files are to be stand alone
Allan McRae [Mon, 3 Jun 2013 04:15:31 +0000 (14:15 +1000)]
Document alpm_list files are to be stand alone

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agodie if '-' is given with empty stdin
Andrew Gregory [Mon, 3 Jun 2013 03:45:05 +0000 (23:45 -0400)]
die if '-' is given with empty stdin

Several operations default to all packages/repos/etc if no targets are
provided.  If a user provides '-' they almost certainly expect there to
be targets on stdin and will be surprised if pacman falls back to the
default because there are none.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoMerge branch 'maint'
Allan McRae [Thu, 6 Jun 2013 03:47:26 +0000 (13:47 +1000)]
Merge branch 'maint'

9 years agoPull translation updates and regenerate
Allan McRae [Thu, 6 Jun 2013 03:12:20 +0000 (13:12 +1000)]
Pull translation updates and regenerate

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agopacman-key: Do not reinterpret keys from revoked keyrings
Dave Reisner [Mon, 3 Jun 2013 18:13:08 +0000 (14:13 -0400)]
pacman-key: Do not reinterpret keys from revoked keyrings

Given a revoked keyring containing only:

  BC1FBE4D2826A0B51E47ED62E2539214C6C11350

We should only disable this specific keyid. This change enforces that the
contents of the -revoked keyring file are full fingerprints which can uniquely
identify a key.

Before:

  # pacman-key --populate archlinux
  ==> Appending keys from archlinux.gpg...
  ==> Locally signing trusted keys in keyring...
    -> Locally signing key 0E8B644079F599DFC1DDC3973348882F6AC6A4C2...
    -> Locally signing key 684148BB25B49E986A4944C55184252D824B18E8...
    -> Locally signing key 44D4A033AC140143927397D47EFD567D4C7EA887...
    -> Locally signing key 27FFC4769E19F096D41D9265A04F9397CDFD6BB0...
    -> Locally signing key AB19265E5D7D20687D303246BA1DFB64FFF979E7...
  ==> Importing owner trust values...
  ==> Disabling revoked keys in keyring...
    -> Disabling key 1390420191...
    -> Disabling key E2539214C6C11350...
    -> Disabling key 8544EA82113502DE...
  ==> Updating trust database...
  gpg: next trustdb check due at 2014-01-22

After:

  # pacman-key --populate archlinux
  ==> Appending keys from archlinux.gpg...
  ==> Locally signing trusted keys in keyring...
    -> Locally signing key 0E8B644079F599DFC1DDC3973348882F6AC6A4C2...
    -> Locally signing key 684148BB25B49E986A4944C55184252D824B18E8...
    -> Locally signing key 44D4A033AC140143927397D47EFD567D4C7EA887...
    -> Locally signing key 27FFC4769E19F096D41D9265A04F9397CDFD6BB0...
    -> Locally signing key AB19265E5D7D20687D303246BA1DFB64FFF979E7...
  ==> Importing owner trust values...
  ==> Disabling revoked keys in keyring...
    -> Disabling key BC1FBE4D2826A0B51E47ED62E2539214C6C11350...
  ==> Updating trust database...
  gpg: next trustdb check due at 2014-01-22

Partially addresses FS#35478. This does nothing to confirm whether or not the
key was successfully disabled -- a ridiculously simple request which appears to
be far too difficult for gpg to manage.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agovalidate %FILEPATH% when parsing repo dbs
Simon Gomizelj [Wed, 22 May 2013 04:43:11 +0000 (00:43 -0400)]
validate %FILEPATH% when parsing repo dbs

Currently we make no effort to validate the %FILENAME% field in the
repo db. This allows for relative paths to be considered valid.

A carefully crafted db entry with a malicious relative path,
(e.g. `../../../../etc/passwd`) will cause pacman to to
overwrite _any_ file on the target's machine.

Add the following validation:

- doesn't start with '.'
- doesn't contain a '/'
- won't overflow PATH_MAX

Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoRestrict pkgname from starting with a dot.
Allan McRae [Tue, 4 Jun 2013 03:38:48 +0000 (13:38 +1000)]
Restrict pkgname from starting with a dot.

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>
9 years agoimprove dir->file transition conflict resolution
Andrew Gregory [Sat, 13 Apr 2013 02:26:14 +0000 (22:26 -0400)]
improve dir->file transition conflict resolution

Packages removed due to conflicts are always removed at the beginning of
the transaction and as such can be included in the check for whether all
owners of a directory will be removed in a transaction.  Installed
versions of packages being upgraded, other than the one with the
conflict, cannot be used because our transaction ordering is not
intelligent enough to ensure that they are removed prior to the
installation of the conflicted package.

Also, return false from dir_belongsto_pkgs on errors.  Previously, we
simply continued which could return true even if we were unable to
actually establish that the package owned the entire tree.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoquery_fileowner: remove symlink support
Andrew Gregory [Sat, 13 Apr 2013 21:31:08 +0000 (17:31 -0400)]
query_fileowner: remove symlink support

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agounlink_file: treat symlinks like normal files
Andrew Gregory [Sun, 10 Mar 2013 19:25:49 +0000 (15:25 -0400)]
unlink_file: treat symlinks like normal files

We always want to work with the package file itself, not its target if
it's a symlink.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoextract_single_file: consolidate symlink cases
Andrew Gregory [Sun, 10 Mar 2013 19:34:52 +0000 (15:34 -0400)]
extract_single_file: consolidate symlink cases

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoconflict.c: check for file -> dir replacements
Andrew Gregory [Fri, 10 May 2013 20:26:19 +0000 (16:26 -0400)]
conflict.c: check for file -> dir replacements

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoconflict.c: exclude trailing slash from file path
Andrew Gregory [Fri, 10 May 2013 20:44:33 +0000 (16:44 -0400)]
conflict.c: exclude trailing slash from file path

After the initial checks, we either use the path as a directory and have
to append the trailing slash anyway or use it as a file in which case
the trailing slash should be excluded.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoconflict.c: do not ignore symlink<->dir conflicts
Andrew Gregory [Sat, 13 Apr 2013 00:45:00 +0000 (20:45 -0400)]
conflict.c: do not ignore symlink<->dir conflicts

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoalpm_filelist: remove resolved_path
Andrew Gregory [Sat, 13 Apr 2013 00:37:56 +0000 (20:37 -0400)]
alpm_filelist: remove resolved_path

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoupdate tests for symlink support removal
Andrew Gregory [Sun, 3 Mar 2013 04:26:56 +0000 (23:26 -0500)]
update tests for symlink support removal

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoRevise pacman(8)
Jason St. John [Wed, 29 May 2013 12:03:29 +0000 (14:03 +0200)]
Revise pacman(8)

Resolve several grammatical errors and minor formatting consistency issues
in pacman(8). Generalize the "FTP servers" and package file extension
information.

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoRevise PKGBUILD(5)
Jason St. John [Wed, 29 May 2013 12:26:25 +0000 (14:26 +0200)]
Revise PKGBUILD(5)

Resolve several grammatical errors and minor formatting consistency issues
in PKGBUILD(5).

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agomakepkg-template: add --version and some license info
Florian Pritz [Wed, 29 May 2013 12:51:24 +0000 (14:51 +0200)]
makepkg-template: add --version and some license info

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoRemove backslash typo from makepkg man page
Eric Bélanger [Mon, 29 Apr 2013 02:00:17 +0000 (22:00 -0400)]
Remove backslash typo from makepkg man page

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
9 years agomakepkg-template: Stop using given/when
Florian Pritz [Wed, 22 May 2013 14:35:23 +0000 (16:35 +0200)]
makepkg-template: Stop using given/when

given/when has been marked experimental in perl 5.18 because it will
change it 5.20. if/else is ugly, but hiding the generated warning is no
good solution either, so we us if/else for now.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agomakepkg-template: Add gettext support
Florian Pritz [Sun, 19 May 2013 10:17:57 +0000 (12:17 +0200)]
makepkg-template: Add gettext support

This also slighty changes the word order in the description for
--newest.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoAdd makepkg-template
Florian Pritz [Tue, 30 Apr 2013 22:18:17 +0000 (00:18 +0200)]
Add makepkg-template

This allows for somewhat easy templating for PKGBUILDs.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoUpdate example PKGBUILD
Jason St. John [Tue, 28 May 2013 11:39:56 +0000 (13:39 +0200)]
Update example PKGBUILD

Update doc/PKGBUILD-example.txt with several changes from the official
Arch Linux package for patch-2.7.1-1, including other changes shown below:

-- replaces spaces with tabs in functions
-- replaces 'make prefix=' with 'make DESTDIR='
-- improves quoting of the "cd" command in functions

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoQuote sources in PKGBUILD prototypes and example PKGBUILD
Jason St. John [Tue, 28 May 2013 10:54:52 +0000 (12:54 +0200)]
Quote sources in PKGBUILD prototypes and example PKGBUILD

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoImprove error message when package is missing required signature
Allan McRae [Sun, 19 May 2013 12:41:01 +0000 (22:41 +1000)]
Improve error message when package is missing required signature

When attempting to install a package (either via -S or -U) and the
signature is missing, the current error message "invalid or corrupted
package (PGP signature)" is very unclear.  Instead inform the user
that the package is missing the required signature.

Partial fix for FS#34741.

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agopacman.8: document .pacorig files
Andrew Gregory [Sat, 18 May 2013 23:39:36 +0000 (19:39 -0400)]
pacman.8: document .pacorig files

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoadd.c: refactor backup file modification checks
Andrew Gregory [Sat, 18 May 2013 23:37:59 +0000 (19:37 -0400)]
add.c: refactor backup file modification checks

The previous implementation was overly complex with unnecessary checks
and nested conditionals.  By reordering the tests and changing them to
all be checks for positive hash matches rather than non-matches, we can
collapse several cases and make the process much more linear.  This
removes the need to set hash_orig = "" just to reach some of the checks
and corrects a faulty assumption that files are equivalent when the
hashing process fails.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agomakepkg: add support for CARCH environment var
Phillip Smith [Mon, 29 Apr 2013 23:10:08 +0000 (09:10 +1000)]
makepkg: add support for CARCH environment var

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>
9 years agoClean partial downloads from cache
Allan McRae [Sat, 18 May 2013 14:20:01 +0000 (00:20 +1000)]
Clean partial downloads from cache

When using "pacman -Sc" to clean the cache, it make sense to also remove
partially downloaded files.

Fixes FS#34317.

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agomakepkg: remove support for PKGBUILDs without a package() function
Allan McRae [Sat, 18 May 2013 14:03:36 +0000 (00:03 +1000)]
makepkg: remove support for PKGBUILDs without a package() function

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>
9 years agomakepkg: Add helper to test for functions in build script
Allan McRae [Sat, 18 May 2013 13:43:27 +0000 (23:43 +1000)]
makepkg: Add helper to test for functions in build script

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agomakepkg: remove sourcing PKGBUILD from stdin
Allan McRae [Sat, 18 May 2013 12:47:35 +0000 (22:47 +1000)]
makepkg: remove sourcing PKGBUILD from stdin

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>
9 years agopmtest: set LC_ALL=C in subprocess.call
Andrew Gregory [Fri, 10 May 2013 18:19:05 +0000 (14:19 -0400)]
pmtest: set LC_ALL=C in subprocess.call

LC_ALL=C is required to force pacman's output to English for tests that
rely on that output, but setting it in Makefile.am results in those
tests breaking under different locales when pactest.py is run directly.
This will also ease an eventual transition to python3 which LC_ALL=C
causes to default to ascii encoded strings, creating problems for tests
with unicode strings.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoMerge branch 'maint'
Allan McRae [Wed, 29 May 2013 04:02:56 +0000 (14:02 +1000)]
Merge branch 'maint'

9 years agoFix various typos in NEWS
Jason St. John [Tue, 28 May 2013 13:58:00 +0000 (15:58 +0200)]
Fix various typos in NEWS

imporve -> improve
diskspace -> disk space
BTRFS -> Btrfs
filelists -> file lists
filesize -> file size

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoRemove incorrect bug number from NEWS
Allan McRae [Sun, 19 May 2013 12:53:06 +0000 (22:53 +1000)]
Remove incorrect bug number from NEWS

The wrong bug number is mentioned in commit 32327dc8 and this was
perpetuated into the NEWS file.

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agomakepkg: Use LOGDEST for logpipe
Allan McRae [Sat, 18 May 2013 13:11:41 +0000 (23:11 +1000)]
makepkg: Use LOGDEST for logpipe

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>
9 years agoFix comment typo
Allan McRae [Sat, 18 May 2013 12:43:12 +0000 (22:43 +1000)]
Fix comment typo

Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agocontrib: Remove harcoded /etc/pacman.conf
William Giokas [Wed, 15 May 2013 16:25:58 +0000 (11:25 -0500)]
contrib: Remove harcoded /etc/pacman.conf

Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agoRevert "paccache: avoid subshell in calling runcmd"
Dave Reisner [Wed, 15 May 2013 13:58:43 +0000 (09:58 -0400)]
Revert "paccache: avoid subshell in calling runcmd"

su is terribad. In addition to reverting, this also removes support for
privilege escalation via su. If you want to use paccache as root and
fail to comprehend how much better sudo is than su, then run paccache
directly via su.

Fixes FS#35173.

This reverts commit 597286eb258f841dfc00f65474138fc6192f0092.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
9 years agomakepkg: fixup broken revision and repo references
Dave Reisner [Wed, 15 May 2013 13:58:42 +0000 (09:58 -0400)]
makepkg: fixup broken revision and repo references

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>