Pacman-dev
Threads by month
- ----- 2025 -----
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
February 2012
- 26 participants
- 60 discussions
[pacman-dev] [GIT] The official pacman repository branch, master, updated. v4.0.2-147-g3849c3a
by dan@archlinux.org 20 Feb '12
by dan@archlinux.org 20 Feb '12
20 Feb '12
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The official pacman repository".
The branch, master has been updated
via 3849c3aec130601572b9e06b42bb6af5938936de (commit)
via 326c6a8eed60bfd6aa0d653dad722d8637022d68 (commit)
via 5bbe34293258c20afa636ca8f6546640af28678a (commit)
via f8892b9d087f5c60de663d107643085deaba727b (commit)
via 31d95b867919b02774f4a98b25d2f997c2985600 (commit)
via 78adb71f20ee335dff49e34d33f04817a40002b6 (commit)
via fe659153d5971e41b7483bb40c31cd40f58f9d9c (commit)
via 4899b5bd864919830fe4ce5786d37a00ab5a0da3 (commit)
via ca4142714137b16feabac09c4cda86b0a75036f8 (commit)
via 242006933d31c88b844f8f8d0c2f0806763cc51f (commit)
via 85712814cdbfa301e5827fafd6bfb8ac0886079c (commit)
via 9a1ff474f1fe03e8bfdaf81ffc9a4881a44baea9 (commit)
via edd81f3e8b505be2f7c7a18d3c28956b82264c45 (commit)
via 6c78f0d56007ae5bbbaf9f15f6399e6e2967dd76 (commit)
via 13a1d5883c9aa81ee10d61cbe4c2f2223dad9a50 (commit)
from c7321a7b80aebeacb05ad5ab9d096779403b1758 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3849c3aec130601572b9e06b42bb6af5938936de
Merge: 326c6a8 78adb71
Author: Dan McGee <dan(a)archlinux.org>
Date: Mon Feb 20 17:00:26 2012 -0600
Merge branch 'maint'
Conflicts:
contrib/pacsysclean.in
src/pacman/conf.h
commit 326c6a8eed60bfd6aa0d653dad722d8637022d68
Author: Allan McRae <allan(a)archlinux.org>
Date: Mon Feb 20 22:53:03 2012 +1000
Update copyright years
Add 2012 to the copyright range for all libalpm and pacman source files.
Signed-off-by: Allan McRae <allan(a)archlinux.org>
Signed-off-by: Dan McGee <dan(a)archlinux.org>
commit 5bbe34293258c20afa636ca8f6546640af28678a
Author: Allan McRae <allan(a)archlinux.org>
Date: Sat Jul 9 21:52:01 2011 +1000
makepkg: rework libprovides
This reworks the implmentation of libprovides for the following
benefits:
- Moves functionality from write_pkginfo() to find_libprovides()
- Only calculates the version for libraries specifically requested
and not all libraries. This has the disadvantage of running find
over the $pkgdir for as many libraries as needed, but is unlikely
to be an issue due to caching.
- The order of the provides array in the PKGBUILD is kept in the
package
- There are more warning messages when things fail and those that
were there are no longer errors (as I do not think failure of
libprovides should result in complete packaging failure)
- It is now modular so can be easy extended to other library types
other than ELF *.so.
Signed-off-by: Allan McRae <allan(a)archlinux.org>
Signed-off-by: Dan McGee <dan(a)archlinux.org>
commit f8892b9d087f5c60de663d107643085deaba727b
Author: Dave Reisner <dreisner(a)archlinux.org>
Date: Wed Feb 15 00:02:40 2012 -0500
util: reduce pointer hell in _alpm_makepath_mode
Simplify the implementation:
- allocate and manipulate a copy of the passed in path rather than
building out a path as the while loop progresses
- use simple pointer arithmetic to skip uninteresting cases
- use mkdir(3)'s return value and errno to detect failure
Signed-off-by: Dave Reisner <dreisner(a)archlinux.org>
Signed-off-by: Dan McGee <dan(a)archlinux.org>
commit 31d95b867919b02774f4a98b25d2f997c2985600
Author: Nagy Gabor <ngaba(a)bibl.u-szeged.hu>
Date: Thu Feb 9 04:14:06 2012 +0100
Print error message when to-be-downloaded file cannot be created
It can happen that the to-be-downloaded file cannot be created in cachedir.
For example, I am an -Sup user, and it is comfortable to set --cachedir to
/mnt/pendrive, which is a FAT filesystem, so files like
capseo-1:0.3-2-i686.pkg.tar.xz cannot be downloaded to there.
Before this patch, pacman didn't give clear output about what happens when
the download code could not create the necessary file. This can be confusing
with -Su. An example output:
***
$ sudo pacman -S capseo bochs --cachedir /c/TEMP
resolving dependencies...
looking for inter-conflicts...
Targets (2): bochs-2.4.6-1 capseo-1:0.3-2
Total Download Size: 0.61 MiB
Total Installed Size: 2.61 MiB
Proceed with installation? [Y/n]
:: Retrieving packages from extra...
warning: failed to retrieve some files from extra
bochs-2.4.6-1-i686 611.5 KiB 118K/s 00:05 [------------------] 97%
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.
***
After the patch, pacman will give more informative error message (and
pm_errno is set properly):
***
error: could not open file '/c/TEMP/capseo-1:0.3-2-i686.pkg.tar.xz.part': Invalid argument
error: failed to commit transaction (failed to retrieve some files)
***
Unfortunately, the "could not open file" error message is printed for
every mirror (that can be dozens of lines), which is ugly, but at least
informative... Without modifying the download logic (for example, by
introducing -2 return value for _alpm_download() to indicate giving up),
this ugliness cannot be eliminated.
Signed-off-by: Nagy Gabor <ngaba(a)bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan(a)archlinux.org>
-----------------------------------------------------------------------
Summary of changes:
contrib/pacsysclean.in | 7 ++-
doc/pacman.8.txt | 7 ---
lib/libalpm/add.c | 2 +-
lib/libalpm/add.h | 2 +-
lib/libalpm/alpm.c | 2 +-
lib/libalpm/alpm.h | 2 +-
lib/libalpm/alpm_list.c | 2 +-
lib/libalpm/alpm_list.h | 2 +-
lib/libalpm/backup.c | 2 +-
lib/libalpm/backup.h | 2 +-
lib/libalpm/be_local.c | 2 +-
lib/libalpm/be_package.c | 2 +-
lib/libalpm/be_sync.c | 2 +-
lib/libalpm/conflict.c | 2 +-
lib/libalpm/conflict.h | 2 +-
lib/libalpm/db.c | 2 +-
lib/libalpm/db.h | 2 +-
lib/libalpm/delta.c | 2 +-
lib/libalpm/delta.h | 2 +-
lib/libalpm/deps.c | 31 +-----------
lib/libalpm/deps.h | 2 +-
lib/libalpm/diskspace.c | 14 +++++-
lib/libalpm/diskspace.h | 2 +-
lib/libalpm/dload.c | 8 ++-
lib/libalpm/dload.h | 2 +-
lib/libalpm/error.c | 2 +-
lib/libalpm/graph.c | 2 +-
lib/libalpm/graph.h | 2 +-
lib/libalpm/group.c | 2 +-
lib/libalpm/group.h | 2 +-
lib/libalpm/handle.c | 2 +-
lib/libalpm/handle.h | 2 +-
lib/libalpm/log.c | 2 +-
lib/libalpm/log.h | 2 +-
lib/libalpm/package.c | 2 +-
lib/libalpm/package.h | 2 +-
lib/libalpm/pkghash.c | 2 +-
lib/libalpm/pkghash.h | 2 +-
lib/libalpm/remove.h | 2 +-
lib/libalpm/signing.h | 2 +-
lib/libalpm/sync.c | 2 +-
lib/libalpm/sync.h | 2 +-
lib/libalpm/trans.c | 2 +-
lib/libalpm/trans.h | 2 +-
lib/libalpm/util.c | 55 +++++++++++----------
lib/libalpm/util.h | 2 +-
lib/libalpm/version.c | 2 +-
scripts/library/parse_options.sh | 32 ++++--------
scripts/makepkg.sh.in | 99 +++++++++++++++++++++----------------
scripts/pacman-key.sh.in | 6 +-
scripts/pacman-optimize.sh.in | 3 +-
src/pacman/callback.c | 2 +-
src/pacman/callback.h | 2 +-
src/pacman/conf.c | 2 +-
src/pacman/conf.h | 3 +-
src/pacman/database.c | 2 +-
src/pacman/deptest.c | 2 +-
src/pacman/package.c | 2 +-
src/pacman/package.h | 2 +-
src/pacman/pacman.c | 10 +---
src/pacman/pacman.h | 2 +-
src/pacman/query.c | 2 +-
src/pacman/remove.c | 2 +-
src/pacman/sync.c | 2 -
src/pacman/upgrade.c | 2 +-
src/pacman/util.c | 10 +++-
test/pacman/tests/sync302.py | 8 ++--
test/pacman/tests/sync303.py | 3 -
test/pacman/tests/sync304.py | 2 -
test/pacman/tests/sync305.py | 3 -
test/pacman/tests/sync306.py | 1 -
test/pacman/tests/upgrade078.py | 17 +++----
72 files changed, 200 insertions(+), 225 deletions(-)
hooks/post-receive
--
The official pacman repository
1
0
[pacman-dev] [GIT] The official pacman repository branch, maint, updated. v4.0.2-11-g78adb71
by dan@archlinux.org 20 Feb '12
by dan@archlinux.org 20 Feb '12
20 Feb '12
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The official pacman repository".
The branch, maint has been updated
via 78adb71f20ee335dff49e34d33f04817a40002b6 (commit)
via fe659153d5971e41b7483bb40c31cd40f58f9d9c (commit)
via 4899b5bd864919830fe4ce5786d37a00ab5a0da3 (commit)
from ca4142714137b16feabac09c4cda86b0a75036f8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 78adb71f20ee335dff49e34d33f04817a40002b6
Author: Dan McGee <dan(a)archlinux.org>
Date: Wed Dec 21 16:42:47 2011 -0600
Don't check diskspace when using --dbonly
Mostly a waste of time. Sure, we no longer make sure your pacman
database partition has enough space, but if you are using this option
you better know what you are doing anyway.
Signed-off-by: Dan McGee <dan(a)archlinux.org>
(cherry picked from commit ee969006056c86e88d5f179a7575d64f23d5b252)
commit fe659153d5971e41b7483bb40c31cd40f58f9d9c
Author: Dan McGee <dan(a)archlinux.org>
Date: Sun Feb 19 23:24:26 2012 -0600
Give better error messages on database locking failures
This was noted when trying to perform an operation on a pacman database
on a read-only file system. Print the actual underlying errno string,
and only show the "you can remove" message if the lock file actually
exists.
Before:
$ pacman -Su
error: failed to init transaction (unable to lock database)
if you're sure a package manager is not already
running, you can remove /e/db.lck
After:
$ pacman -Su
error: failed to init transaction (unable to lock database)
error: could not lock database: Read-only file system
Signed-off-by: Dan McGee <dan(a)archlinux.org>
commit 4899b5bd864919830fe4ce5786d37a00ab5a0da3
Author: Dan McGee <dan(a)archlinux.org>
Date: Sun Feb 19 23:04:12 2012 -0600
diskspace: ensure we match only full path components
If one had a mountpoint at '/e' (don't ask), a file being installed to
'/etc' would map to it incorrectly. Ensure we do more than just prefix
matching on paths by doing some more sanity checks once the simple
strncmp() call succeeds.
Signed-off-by: Dan McGee <dan(a)archlinux.org>
-----------------------------------------------------------------------
Summary of changes:
lib/libalpm/diskspace.c | 14 +++++++++++++-
lib/libalpm/sync.c | 2 +-
src/pacman/util.c | 10 +++++++---
3 files changed, 21 insertions(+), 5 deletions(-)
hooks/post-receive
--
The official pacman repository
1
0
Add 2012 to the copyright range for all libalpm and pacman source files.
Signed-off-by: Allan McRae <allan(a)archlinux.org>
---
We are crap at keeping these updated when changes are made. Also,
according to the GNU people, updating all files like this is OK as
long as a "release" is made in that year. Here, "release" can be
defined as having the VCS publicly available:
http://lists.gnu.org/archive/html/bug-standards/2012-02/msg00003.html
lib/libalpm/add.c | 2 +-
lib/libalpm/add.h | 2 +-
lib/libalpm/alpm.c | 2 +-
lib/libalpm/alpm.h | 2 +-
lib/libalpm/alpm_list.c | 2 +-
lib/libalpm/alpm_list.h | 2 +-
lib/libalpm/backup.c | 2 +-
lib/libalpm/backup.h | 2 +-
lib/libalpm/be_local.c | 2 +-
lib/libalpm/be_package.c | 2 +-
lib/libalpm/be_sync.c | 2 +-
lib/libalpm/conflict.c | 2 +-
lib/libalpm/conflict.h | 2 +-
lib/libalpm/db.c | 2 +-
lib/libalpm/db.h | 2 +-
lib/libalpm/delta.c | 2 +-
lib/libalpm/delta.h | 2 +-
lib/libalpm/deps.c | 2 +-
lib/libalpm/deps.h | 2 +-
lib/libalpm/diskspace.h | 2 +-
lib/libalpm/dload.h | 2 +-
lib/libalpm/error.c | 2 +-
lib/libalpm/graph.c | 2 +-
lib/libalpm/graph.h | 2 +-
lib/libalpm/group.c | 2 +-
lib/libalpm/group.h | 2 +-
lib/libalpm/handle.c | 2 +-
lib/libalpm/handle.h | 2 +-
lib/libalpm/log.c | 2 +-
lib/libalpm/log.h | 2 +-
lib/libalpm/package.c | 2 +-
lib/libalpm/package.h | 2 +-
lib/libalpm/pkghash.c | 2 +-
lib/libalpm/pkghash.h | 2 +-
lib/libalpm/remove.h | 2 +-
lib/libalpm/signing.h | 2 +-
lib/libalpm/sync.c | 2 +-
lib/libalpm/sync.h | 2 +-
lib/libalpm/trans.c | 2 +-
lib/libalpm/trans.h | 2 +-
lib/libalpm/util.h | 2 +-
lib/libalpm/version.c | 2 +-
src/pacman/callback.c | 2 +-
src/pacman/callback.h | 2 +-
src/pacman/conf.c | 2 +-
src/pacman/conf.h | 2 +-
src/pacman/database.c | 2 +-
src/pacman/deptest.c | 2 +-
src/pacman/package.c | 2 +-
src/pacman/package.h | 2 +-
src/pacman/pacman.c | 2 +-
src/pacman/pacman.h | 2 +-
src/pacman/query.c | 2 +-
src/pacman/remove.c | 2 +-
src/pacman/upgrade.c | 2 +-
55 files changed, 55 insertions(+), 55 deletions(-)
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index e81d96f..b007766 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -1,7 +1,7 @@
/*
* add.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/add.h b/lib/libalpm/add.h
index 77a3d22..d1368e8 100644
--- a/lib/libalpm/add.h
+++ b/lib/libalpm/add.h
@@ -1,7 +1,7 @@
/*
* add.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 2915a05..c58a406 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -1,7 +1,7 @@
/*
* alpm.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2005 by Christian Hamar <krics(a)linuxforum.hu>
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 1d77c97..c89e73f 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -1,7 +1,7 @@
/*
* alpm.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2005 by Christian Hamar <krics(a)linuxforum.hu>
diff --git a/lib/libalpm/alpm_list.c b/lib/libalpm/alpm_list.c
index 69ea469..39eded1 100644
--- a/lib/libalpm/alpm_list.c
+++ b/lib/libalpm/alpm_list.c
@@ -1,7 +1,7 @@
/*
* alpm_list.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/alpm_list.h b/lib/libalpm/alpm_list.h
index 9f69e2c..8f743a2 100644
--- a/lib/libalpm/alpm_list.h
+++ b/lib/libalpm/alpm_list.h
@@ -1,7 +1,7 @@
/*
* alpm_list.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/backup.c b/lib/libalpm/backup.c
index 68856de..98b5f5e 100644
--- a/lib/libalpm/backup.c
+++ b/lib/libalpm/backup.c
@@ -1,7 +1,7 @@
/*
* backup.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2005 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2005 by Christian Hamar <krics(a)linuxforum.hu>
diff --git a/lib/libalpm/backup.h b/lib/libalpm/backup.h
index 0b84a68..c539406 100644
--- a/lib/libalpm/backup.h
+++ b/lib/libalpm/backup.h
@@ -1,7 +1,7 @@
/*
* backup.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 3b34a62..77aac97 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -1,7 +1,7 @@
/*
* be_local.c : backend for the local database
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index fc4a05b..6da2f8b 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -1,7 +1,7 @@
/*
* be_package.c : backend for packages
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index a124dfa..3780fd6 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -1,7 +1,7 @@
/*
* be_sync.c : backend for sync databases
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index b5c55dc..8542902 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -1,7 +1,7 @@
/*
* conflict.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2006 by David Kimpe <dnaku(a)frugalware.org>
diff --git a/lib/libalpm/conflict.h b/lib/libalpm/conflict.h
index 8b7471f..a129d8b 100644
--- a/lib/libalpm/conflict.h
+++ b/lib/libalpm/conflict.h
@@ -1,7 +1,7 @@
/*
* conflict.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 261c2a4..8bbdc90 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -1,7 +1,7 @@
/*
* db.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2005 by Christian Hamar <krics(a)linuxforum.hu>
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h
index a1249d3..94659b7 100644
--- a/lib/libalpm/db.h
+++ b/lib/libalpm/db.h
@@ -1,7 +1,7 @@
/*
* db.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2006 by Miklos Vajna <vmiklos(a)frugalware.org>
diff --git a/lib/libalpm/delta.c b/lib/libalpm/delta.c
index e3acc66..26ae5d5 100644
--- a/lib/libalpm/delta.c
+++ b/lib/libalpm/delta.c
@@ -1,7 +1,7 @@
/*
* delta.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2007-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/delta.h b/lib/libalpm/delta.h
index 37f208b..b1c8991 100644
--- a/lib/libalpm/delta.h
+++ b/lib/libalpm/delta.h
@@ -1,7 +1,7 @@
/*
* delta.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2007-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index cbd17a8..c58e667 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -1,7 +1,7 @@
/*
* deps.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos(a)frugalware.org>
diff --git a/lib/libalpm/deps.h b/lib/libalpm/deps.h
index ce25bda..c8e1bc3 100644
--- a/lib/libalpm/deps.h
+++ b/lib/libalpm/deps.h
@@ -1,7 +1,7 @@
/*
* deps.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2006 by Miklos Vajna <vmiklos(a)frugalware.org>
diff --git a/lib/libalpm/diskspace.h b/lib/libalpm/diskspace.h
index a613e23..a54aa5e 100644
--- a/lib/libalpm/diskspace.h
+++ b/lib/libalpm/diskspace.h
@@ -1,7 +1,7 @@
/*
* diskspace.h
*
- * Copyright (c) 2010-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2010-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h
index 9ab90b4..e279d56 100644
--- a/lib/libalpm/dload.h
+++ b/lib/libalpm/dload.h
@@ -1,7 +1,7 @@
/*
* dload.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c
index 528a3dc..5354a47 100644
--- a/lib/libalpm/error.c
+++ b/lib/libalpm/error.c
@@ -1,7 +1,7 @@
/*
* error.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/graph.c b/lib/libalpm/graph.c
index d080e05..69be9e3 100644
--- a/lib/libalpm/graph.c
+++ b/lib/libalpm/graph.c
@@ -1,7 +1,7 @@
/*
* graph.c - helpful graph structure and setup/teardown methods
*
- * Copyright (c) 2007-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2007-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/lib/libalpm/graph.h b/lib/libalpm/graph.h
index 2910b7d..463b2cd 100644
--- a/lib/libalpm/graph.h
+++ b/lib/libalpm/graph.h
@@ -1,7 +1,7 @@
/*
* graph.h - helpful graph structure and setup/teardown methods
*
- * Copyright (c) 2007-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2007-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/lib/libalpm/group.c b/lib/libalpm/group.c
index 8b407b2..4f4d8ce 100644
--- a/lib/libalpm/group.c
+++ b/lib/libalpm/group.c
@@ -1,7 +1,7 @@
/*
* group.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/group.h b/lib/libalpm/group.h
index 078c9af..1f776eb 100644
--- a/lib/libalpm/group.h
+++ b/lib/libalpm/group.h
@@ -1,7 +1,7 @@
/*
* group.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 534a4ed..2bf068d 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -1,7 +1,7 @@
/*
* handle.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos(a)frugalware.org>
diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h
index 4d92d11..1b9c8c8 100644
--- a/lib/libalpm/handle.h
+++ b/lib/libalpm/handle.h
@@ -1,7 +1,7 @@
/*
* handle.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c
index 14b454e..8486716 100644
--- a/lib/libalpm/log.c
+++ b/lib/libalpm/log.c
@@ -1,7 +1,7 @@
/*
* log.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/log.h b/lib/libalpm/log.h
index a43290d..22c3d06 100644
--- a/lib/libalpm/log.h
+++ b/lib/libalpm/log.h
@@ -1,7 +1,7 @@
/*
* log.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index e881a51..38f462c 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -1,7 +1,7 @@
/*
* package.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2005, 2006 by Christian Hamar <krics(a)linuxforum.hu>
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h
index 0c0973e..9a990b4 100644
--- a/lib/libalpm/package.h
+++ b/lib/libalpm/package.h
@@ -1,7 +1,7 @@
/*
* package.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2006 by David Kimpe <dnaku(a)frugalware.org>
diff --git a/lib/libalpm/pkghash.c b/lib/libalpm/pkghash.c
index e5626e8..7b38800 100644
--- a/lib/libalpm/pkghash.c
+++ b/lib/libalpm/pkghash.c
@@ -1,7 +1,7 @@
/*
* pkghash.c
*
- * Copyright (c) 2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2011-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/lib/libalpm/pkghash.h b/lib/libalpm/pkghash.h
index 64a32b2..a2c39c7 100644
--- a/lib/libalpm/pkghash.h
+++ b/lib/libalpm/pkghash.h
@@ -1,7 +1,7 @@
/*
* pkghash.h
*
- * Copyright (c) 2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2011-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/lib/libalpm/remove.h b/lib/libalpm/remove.h
index 251e454..203eccb 100644
--- a/lib/libalpm/remove.h
+++ b/lib/libalpm/remove.h
@@ -1,7 +1,7 @@
/*
* remove.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/lib/libalpm/signing.h b/lib/libalpm/signing.h
index 315d605..19ffef2 100644
--- a/lib/libalpm/signing.h
+++ b/lib/libalpm/signing.h
@@ -1,7 +1,7 @@
/*
* signing.h
*
- * Copyright (c) 2008-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2008-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index f41ecfa..dfda164 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -1,7 +1,7 @@
/*
* sync.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2005 by Christian Hamar <krics(a)linuxforum.hu>
diff --git a/lib/libalpm/sync.h b/lib/libalpm/sync.h
index 472d1df..496f525 100644
--- a/lib/libalpm/sync.h
+++ b/lib/libalpm/sync.h
@@ -1,7 +1,7 @@
/*
* sync.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos(a)frugalware.org>
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index dc75f57..fe89e40 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -1,7 +1,7 @@
/*
* trans.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2005 by Christian Hamar <krics(a)linuxforum.hu>
diff --git a/lib/libalpm/trans.h b/lib/libalpm/trans.h
index ff944b0..acde921 100644
--- a/lib/libalpm/trans.h
+++ b/lib/libalpm/trans.h
@@ -1,7 +1,7 @@
/*
* trans.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2005 by Christian Hamar <krics(a)linuxforum.hu>
diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h
index cc5ac7b..e674782 100644
--- a/lib/libalpm/util.h
+++ b/lib/libalpm/util.h
@@ -1,7 +1,7 @@
/*
* util.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien(a)chez.com>
* Copyright (c) 2005 by Christian Hamar <krics(a)linuxforum.hu>
diff --git a/lib/libalpm/version.c b/lib/libalpm/version.c
index a88b818..269a701 100644
--- a/lib/libalpm/version.c
+++ b/lib/libalpm/version.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 6387574..9fd9cc4 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -1,7 +1,7 @@
/*
* callback.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/src/pacman/callback.h b/src/pacman/callback.h
index e328a22..2215790 100644
--- a/src/pacman/callback.h
+++ b/src/pacman/callback.h
@@ -1,7 +1,7 @@
/*
* callback.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index cbf6f22..b59e64b 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -1,7 +1,7 @@
/*
* conf.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/src/pacman/conf.h b/src/pacman/conf.h
index 7447e89..d67aad5 100644
--- a/src/pacman/conf.h
+++ b/src/pacman/conf.h
@@ -1,7 +1,7 @@
/*
* conf.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/src/pacman/database.c b/src/pacman/database.c
index f8795c0..dd16013 100644
--- a/src/pacman/database.c
+++ b/src/pacman/database.c
@@ -1,7 +1,7 @@
/*
* database.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/src/pacman/deptest.c b/src/pacman/deptest.c
index ecca36e..a654c88 100644
--- a/src/pacman/deptest.c
+++ b/src/pacman/deptest.c
@@ -1,7 +1,7 @@
/*
* deptest.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/src/pacman/package.c b/src/pacman/package.c
index 4bb26b1..b175f5b 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -1,7 +1,7 @@
/*
* package.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/src/pacman/package.h b/src/pacman/package.h
index 890b4fe..1e021f4 100644
--- a/src/pacman/package.h
+++ b/src/pacman/package.h
@@ -1,7 +1,7 @@
/*
* package.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 0349726..bf83326 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -1,7 +1,7 @@
/*
* pacman.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/src/pacman/pacman.h b/src/pacman/pacman.h
index 8bb9cb2..710e8fd 100644
--- a/src/pacman/pacman.h
+++ b/src/pacman/pacman.h
@@ -1,7 +1,7 @@
/*
* pacman.h
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/src/pacman/query.c b/src/pacman/query.c
index f2ebd95..a9d186a 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -1,7 +1,7 @@
/*
* query.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 52d2c7a..472adb5 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -1,7 +1,7 @@
/*
* remove.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c
index c60649a..7fd636d 100644
--- a/src/pacman/upgrade.c
+++ b/src/pacman/upgrade.c
@@ -1,7 +1,7 @@
/*
* upgrade.c
*
- * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev(a)archlinux.org>
+ * Copyright (c) 2006-2012 Pacman Development Team <pacman-dev(a)archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet(a)zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
--
1.7.9.1
1
0
20 Feb '12
It doesn't make much sense, as we aren't going to be manipulating any
package files other than local database entries.
Signed-off-by: Dan McGee <dan(a)archlinux.org>
---
lib/libalpm/sync.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index a946a7d..185878a 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -1137,7 +1137,7 @@ int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
}
/* check available disk space */
- if(handle->checkspace) {
+ if(handle->checkspace && !(trans->flags & ALPM_TRANS_FLAG_DBONLY)) {
EVENT(handle, ALPM_EVENT_DISKSPACE_START, NULL, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "checking available disk space\n");
--
1.7.9.1
2
1
[pacman-dev] [PATCH] Give better error messages on database locking failures
by Dan McGee 20 Feb '12
by Dan McGee 20 Feb '12
20 Feb '12
This was noted when trying to perform an operation on a pacman database
on a read-only file system. Print the actual underlying errno string,
and only show the "you can remove" message if the lock file actually
exists.
Before:
$ pacman -Su
error: failed to init transaction (unable to lock database)
if you're sure a package manager is not already
running, you can remove /e/db.lck
After:
$ pacman -Su
error: failed to init transaction (unable to lock database)
error: could not lock database: Read-only file system
Signed-off-by: Dan McGee <dan(a)archlinux.org>
---
src/pacman/util.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 0b076d9..f7f8ecf 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -69,9 +69,13 @@ void trans_init_error(void)
pm_printf(ALPM_LOG_ERROR, _("failed to init transaction (%s)\n"),
alpm_strerror(err));
if(err == ALPM_ERR_HANDLE_LOCK) {
- fprintf(stderr, _(" if you're sure a package manager is not already\n"
- " running, you can remove %s\n"),
- alpm_option_get_lockfile(config->handle));
+ const char *lockfile = alpm_option_get_lockfile(config->handle);
+ pm_printf(ALPM_LOG_ERROR, _("could not lock database: %s\n"),
+ strerror(errno));
+ if(access(lockfile, F_OK) == 0) {
+ fprintf(stderr, _(" if you're sure a package manager is not already\n"
+ " running, you can remove %s\n"), lockfile);
+ }
}
}
--
1.7.9.1
1
0
[pacman-dev] [PATCH 1/3 v2] Add information on how an installed package was validated
by Allan McRae 20 Feb '12
by Allan McRae 20 Feb '12
20 Feb '12
When installing a package, store information on which validation
method was used and output this on "pacman -Qi" operations.
e.g.
Validated By : SHA256 Sum
Possible values are Unknown, None, MD5 Sum, SHA256 Sum, Signature.
Signed-off-by: Allan McRae <allan(a)archlinux.org>
---
Changed alpm_pkgvalidation_t to a bitmask
lib/libalpm/alpm.h | 15 +++++++++++++++
lib/libalpm/be_local.c | 43 +++++++++++++++++++++++++++++++++++++++++++
lib/libalpm/be_package.c | 17 +++++++++++++++++
lib/libalpm/package.c | 9 +++++++++
lib/libalpm/package.h | 2 ++
lib/libalpm/sync.c | 2 ++
src/pacman/package.c | 25 +++++++++++++++++++++++++
7 files changed, 113 insertions(+), 0 deletions(-)
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 1b3f6d7..1d77c97 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -64,6 +64,15 @@ typedef enum _alpm_pkgfrom_t {
PKG_FROM_SYNCDB
} alpm_pkgfrom_t;
+/** Location a package object was loaded from. */
+typedef enum _alpm_pkgvalidation_t {
+ ALPM_PKG_VALIDATION_UNKNOWN,
+ ALPM_PKG_VALIDATION_NONE = (1 << 0),
+ ALPM_PKG_VALIDATION_MD5SUM = (1 << 1),
+ ALPM_PKG_VALIDATION_SHA256SUM = (1 << 2),
+ ALPM_PKG_VALIDATION_SIGNATURE = (1 << 3)
+} alpm_pkgvalidation_t;
+
/** Types of version constraints in dependency specs. */
typedef enum _alpm_depmod_t {
/** No version constraint */
@@ -888,6 +897,12 @@ alpm_db_t *alpm_pkg_get_db(alpm_pkg_t *pkg);
*/
const char *alpm_pkg_get_base64_sig(alpm_pkg_t *pkg);
+/** Returns the method used to validate a package during install.
+ * @param pkg a pointer to package
+ * @return an enum member giving the validation method
+ */
+alpm_pkgvalidation_t alpm_pkg_get_validation(alpm_pkg_t *pkg);
+
/* End of alpm_pkg_t accessors */
/* @} */
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 9a8c0ec..3b34a62 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -102,6 +102,12 @@ static alpm_pkgreason_t _cache_get_reason(alpm_pkg_t *pkg)
return pkg->reason;
}
+static alpm_pkgvalidation_t _cache_get_validation(alpm_pkg_t *pkg)
+{
+ LAZY_LOAD(INFRQ_DESC, -1);
+ return pkg->validation;
+}
+
static alpm_list_t *_cache_get_licenses(alpm_pkg_t *pkg)
{
LAZY_LOAD(INFRQ_DESC, NULL);
@@ -223,6 +229,7 @@ static struct pkg_operations local_pkg_ops = {
.get_arch = _cache_get_arch,
.get_isize = _cache_get_isize,
.get_reason = _cache_get_reason,
+ .get_validation = _cache_get_validation,
.has_scriptlet = _cache_has_scriptlet,
.get_licenses = _cache_get_licenses,
.get_groups = _cache_get_groups,
@@ -603,6 +610,26 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
} else if(strcmp(line, "%REASON%") == 0) {
READ_NEXT();
info->reason = (alpm_pkgreason_t)atoi(line);
+ } else if(strcmp(line, "%VALIDATION%") == 0) {
+ alpm_list_t *i, *v = NULL;
+ READ_AND_STORE_ALL(v);
+ for(i = v; i; i = alpm_list_next(i))
+ {
+ if(strcmp(i->data, "none") == 0) {
+ info->validation |= ALPM_PKG_VALIDATION_NONE;
+ } else if(strcmp(i->data, "md5") == 0) {
+ info->validation |= ALPM_PKG_VALIDATION_MD5SUM;
+ } else if(strcmp(i->data, "sha256") == 0) {
+ info->validation |= ALPM_PKG_VALIDATION_SHA256SUM;
+ } else if(strcmp(i->data, "pgp") == 0) {
+ info->validation |= ALPM_PKG_VALIDATION_SIGNATURE;
+ } else {
+ _alpm_log(db->handle, ALPM_LOG_WARNING,
+ _("unknown validation type for package %s: %s\n"),
+ info->name, (char *)i->data);
+ }
+ }
+ FREELIST(v);
} else if(strcmp(line, "%SIZE%") == 0) {
READ_NEXT();
info->isize = _alpm_strtoofft(line);
@@ -817,6 +844,22 @@ int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, alpm_dbinfrq_t inforeq
fprintf(fp, "%%REASON%%\n"
"%u\n\n", info->reason);
}
+ if(info->validation) {
+ fputs("%VALIDATION%\n", fp);
+ if(info->validation & ALPM_PKG_VALIDATION_NONE) {
+ fputs("none\n", fp);
+ }
+ if(info->validation & ALPM_PKG_VALIDATION_MD5SUM) {
+ fputs("md5\n", fp);
+ }
+ if(info->validation & ALPM_PKG_VALIDATION_SHA256SUM) {
+ fputs("sha256\n", fp);
+ }
+ if(info->validation & ALPM_PKG_VALIDATION_SIGNATURE) {
+ fputs("pgp\n", fp);
+ }
+ fprintf(fp, "\n");
+ }
if(info->depends) {
fputs("%DEPENDS%\n", fp);
for(lp = info->depends; lp; lp = lp->next) {
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 4b43f21..0a8bbf3 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -341,6 +341,7 @@ int _alpm_pkg_validate_internal(alpm_handle_t *handle,
if(_alpm_test_checksum(pkgfile, syncpkg->md5sum, ALPM_CSUM_MD5) != 0) {
RET_ERR(handle, ALPM_ERR_PKG_INVALID_CHECKSUM, -1);
}
+ syncpkg->validation |= ALPM_PKG_VALIDATION_MD5SUM;
}
if(syncpkg->sha256sum) {
@@ -349,6 +350,7 @@ int _alpm_pkg_validate_internal(alpm_handle_t *handle,
if(_alpm_test_checksum(pkgfile, syncpkg->sha256sum, ALPM_CSUM_SHA256) != 0) {
RET_ERR(handle, ALPM_ERR_PKG_INVALID_CHECKSUM, -1);
}
+ syncpkg->validation |= ALPM_PKG_VALIDATION_SHA256SUM;
}
}
@@ -362,6 +364,13 @@ int _alpm_pkg_validate_internal(alpm_handle_t *handle,
handle->pm_errno = ALPM_ERR_PKG_INVALID_SIG;
return -1;
}
+ if (syncpkg && has_sig) {
+ syncpkg->validation |= ALPM_PKG_VALIDATION_SIGNATURE;
+ }
+ }
+
+ if (syncpkg && !syncpkg->validation) {
+ syncpkg->validation = ALPM_PKG_VALIDATION_NONE;
}
return 0;
@@ -495,6 +504,7 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle,
newpkg->ops = get_file_pkg_ops();
newpkg->handle = handle;
newpkg->infolevel = INFRQ_BASE | INFRQ_DESC | INFRQ_SCRIPTLET;
+ newpkg->validation = ALPM_PKG_VALIDATION_NONE;
if(full) {
if(files) {
@@ -539,6 +549,13 @@ int SYMEXPORT alpm_pkg_load(alpm_handle_t *handle, const char *filename, int ful
return -1;
}
+ char *sigpath = _alpm_sigpath(handle, filename);
+ if(sigpath && !_alpm_access(handle, NULL, sigpath, R_OK)) {
+ /* package validation was done with a signature */
+ (*pkg)->validation = ALPM_PKG_VALIDATION_SIGNATURE;
+ }
+ free(sigpath);
+
return 0;
}
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 68fec16..5abfd72 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -91,6 +91,7 @@ static const char *_pkg_get_packager(alpm_pkg_t *pkg) { return pkg->packager;
static const char *_pkg_get_arch(alpm_pkg_t *pkg) { return pkg->arch; }
static off_t _pkg_get_isize(alpm_pkg_t *pkg) { return pkg->isize; }
static alpm_pkgreason_t _pkg_get_reason(alpm_pkg_t *pkg) { return pkg->reason; }
+static alpm_pkgvalidation_t _pkg_get_validation(alpm_pkg_t *pkg) { return pkg->validation; }
static int _pkg_has_scriptlet(alpm_pkg_t *pkg) { return pkg->scriptlet; }
static alpm_list_t *_pkg_get_licenses(alpm_pkg_t *pkg) { return pkg->licenses; }
@@ -134,6 +135,7 @@ struct pkg_operations default_pkg_ops = {
.get_arch = _pkg_get_arch,
.get_isize = _pkg_get_isize,
.get_reason = _pkg_get_reason,
+ .get_validation = _pkg_get_validation,
.has_scriptlet = _pkg_has_scriptlet,
.get_licenses = _pkg_get_licenses,
@@ -268,6 +270,13 @@ alpm_pkgreason_t SYMEXPORT alpm_pkg_get_reason(alpm_pkg_t *pkg)
return pkg->ops->get_reason(pkg);
}
+alpm_pkgvalidation_t SYMEXPORT alpm_pkg_get_validation(alpm_pkg_t *pkg)
+{
+ ASSERT(pkg != NULL, return -1);
+ pkg->handle->pm_errno = 0;
+ return pkg->ops->get_validation(pkg);
+}
+
alpm_list_t SYMEXPORT *alpm_pkg_get_licenses(alpm_pkg_t *pkg)
{
ASSERT(pkg != NULL, return NULL);
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h
index 172d2f3..0c0973e 100644
--- a/lib/libalpm/package.h
+++ b/lib/libalpm/package.h
@@ -47,6 +47,7 @@ struct pkg_operations {
const char *(*get_arch) (alpm_pkg_t *);
off_t (*get_isize) (alpm_pkg_t *);
alpm_pkgreason_t (*get_reason) (alpm_pkg_t *);
+ alpm_pkgvalidation_t (*get_validation) (alpm_pkg_t *);
int (*has_scriptlet) (alpm_pkg_t *);
alpm_list_t *(*get_licenses) (alpm_pkg_t *);
@@ -96,6 +97,7 @@ struct __alpm_pkg_t {
int scriptlet;
alpm_pkgreason_t reason;
+ alpm_pkgvalidation_t validation;
alpm_dbinfrq_t infolevel;
alpm_pkgfrom_t origin;
/* origin == PKG_FROM_FILE, use pkg->origin_data.file
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 468438f..68630c1 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -1083,6 +1083,8 @@ static int load_packages(alpm_handle_t *handle, alpm_list_t **data,
free(filepath);
/* copy over the install reason */
pkgfile->reason = spkg->reason;
+ /* copy over validation method */
+ pkgfile->validation = spkg->validation;
i->data = pkgfile;
/* spkg has been removed from the target list, so we can free the
* sync-specific fields */
diff --git a/src/pacman/package.c b/src/pacman/package.c
index ecf5745..5f824f4 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -63,6 +63,7 @@ static void deplist_display(const char *title,
void dump_pkg_full(alpm_pkg_t *pkg, int extra)
{
const char *reason;
+ alpm_list_t *validation = NULL;
time_t bdate, idate;
char bdatestr[50] = "", idatestr[50] = "";
const char *label;
@@ -94,6 +95,27 @@ void dump_pkg_full(alpm_pkg_t *pkg, int extra)
break;
}
+ if(from == PKG_FROM_LOCALDB) {
+ alpm_pkgvalidation_t v = alpm_pkg_get_validation(pkg);
+ if(v) {
+ if(v & ALPM_PKG_VALIDATION_NONE) {
+ validation = alpm_list_add(validation, strdup(_("None")));
+ } else {
+ if(v & ALPM_PKG_VALIDATION_MD5SUM) {
+ validation = alpm_list_add(validation, strdup(_("MD5 Sum")));
+ }
+ if(v & ALPM_PKG_VALIDATION_SHA256SUM) {
+ validation = alpm_list_add(validation, strdup(_("SHA256 Sum")));
+ }
+ if(v & ALPM_PKG_VALIDATION_SIGNATURE) {
+ validation = alpm_list_add(validation, strdup(_("Signature")));
+ }
+ }
+ } else {
+ validation = alpm_list_add(validation, strdup(_("Unknown")));
+ }
+ }
+
if(extra || from == PKG_FROM_LOCALDB) {
/* compute this here so we don't get a pause in the middle of output */
requiredby = alpm_pkg_compute_requiredby(pkg);
@@ -159,6 +181,9 @@ void dump_pkg_full(alpm_pkg_t *pkg, int extra)
}
alpm_siglist_cleanup(&siglist);
}
+ if(from == PKG_FROM_LOCALDB) {
+ list_display(_("Validated By :"), validation);
+ }
string_display(_("Description :"), alpm_pkg_get_desc(pkg));
/* Print additional package info if info flag passed more than once */
--
1.7.9.1
1
2
Hi!
I've run into the following bug:
$ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 44G 30G 13G 71% /
/dev 501M 0 501M 0% /dev
/run 503M 276K 503M 1% /run
/dev/sda3 44G 30G 13G 71% /
none 503M 0 503M 0% /dev/shm
/dev/sda1 30G 29G 1.6G 95% /c
/dev/sr0 4.2G 4.2G 0 100% /e
[Don't laugh at my mountpoints.]
$ sudo pacman -Su
...
Total Installed Size: 900.93 MiB
Net Upgrade Size: 139.47 MiB
...
error: Partition /e is mounted read only
error: not enough free disk space
error: failed to commit transaction (not enough free disk space)
Errors occurred, no packages were upgraded.
What?! I think none of our packages wants to write to /e/... I've tried
with both pacman 4.0.2-1 and pacman-git, the result is the same. I've
also tried with "pacman -S randompkg", that worked fine. I don't want
to umount /e, because I am afraid of the fact that I might not be able
to reproduce this bug any more...
The relevant part of --debug log says nothing:
[04:19:41] debug: checking available disk space
[04:19:41] debug: mountpoint: /sys
[04:19:41] debug: mountpoint: /run
[04:19:41] debug: mountpoint: /root/.gvfs
[04:19:41] debug: mountpoint: /proc
[04:19:41] debug: mountpoint: /e
[04:19:41] debug: mountpoint: /dev/shm
[04:19:41] debug: mountpoint: /dev/pts
[04:19:41] debug: mountpoint: /dev
[04:19:41] debug: mountpoint: /c
[04:19:41] debug: mountpoint: /
[04:19:41] debug: mountpoint: /
[04:19:41] error: Partition /e is mounted read only
[04:19:41] debug: partition /, needed 3897, cushion 5121, free 3727796
[04:19:41] debug: returning error 7 from _alpm_check_diskspace : not enough free disk space
[04:19:41] error: not enough free disk space
[04:19:41] error: failed to commit transaction (not enough free disk space)
[04:19:41] debug: unregistering database 'local'
NG
3
3
[pacman-dev] [PATCH] Add information on how an installed package was validated
by Allan McRae 19 Feb '12
by Allan McRae 19 Feb '12
19 Feb '12
When installing a package, store information on which validation
method was used and output this on "pacman -Qi" operations.
e.g.
Validated By : SHA256 Sum
Possible values are Unknown, None, MD5 Sum, SHA256 Sum, Signature.
Signed-off-by: Allan McRae <allan(a)archlinux.org>
---
The only thing I am concerned about is setting the validation level for
"pacman -U" operations. During the actual validation step we do not have
the package struct yet so there is nowhere to store whether or not a
signature is checked. If there is a .sig file present after loading the
package (which occurs immediately after signature verification), it is
just assumed that the .sig file was checked.
lib/libalpm/alpm.h | 15 +++++++++++++++
lib/libalpm/be_local.c | 14 ++++++++++++++
lib/libalpm/be_package.c | 17 +++++++++++++++++
lib/libalpm/package.c | 9 +++++++++
lib/libalpm/package.h | 2 ++
lib/libalpm/sync.c | 2 ++
src/pacman/package.c | 24 ++++++++++++++++++++++++
7 files changed, 83 insertions(+), 0 deletions(-)
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index aeb1bb7..eafe931 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -64,6 +64,15 @@ typedef enum _alpm_pkgfrom_t {
PKG_FROM_SYNCDB
} alpm_pkgfrom_t;
+/** Location a package object was loaded from. */
+typedef enum _alpm_pkgvalidation_t {
+ ALPM_PKG_VALIDATION_UNKNOWN,
+ ALPM_PKG_VALIDATION_NONE,
+ ALPM_PKG_VALIDATION_MD5SUM,
+ ALPM_PKG_VALIDATION_SHA256SUM,
+ ALPM_PKG_VALIDATION_SIGNATURE
+} alpm_pkgvalidation_t;
+
/** Types of version constraints in dependency specs. */
typedef enum _alpm_depmod_t {
/** No version constraint */
@@ -879,6 +888,12 @@ alpm_db_t *alpm_pkg_get_db(alpm_pkg_t *pkg);
*/
const char *alpm_pkg_get_base64_sig(alpm_pkg_t *pkg);
+/** Returns the method used to validate a package during install.
+ * @param pkg a pointer to package
+ * @return an enum member giving the validation method
+ */
+alpm_pkgvalidation_t alpm_pkg_get_validation(alpm_pkg_t *pkg);
+
/* End of alpm_pkg_t accessors */
/* @} */
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 9a8c0ec..40b273d 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -102,6 +102,12 @@ static alpm_pkgreason_t _cache_get_reason(alpm_pkg_t *pkg)
return pkg->reason;
}
+static alpm_pkgvalidation_t _cache_get_validation(alpm_pkg_t *pkg)
+{
+ LAZY_LOAD(INFRQ_DESC, -1);
+ return pkg->validation;
+}
+
static alpm_list_t *_cache_get_licenses(alpm_pkg_t *pkg)
{
LAZY_LOAD(INFRQ_DESC, NULL);
@@ -223,6 +229,7 @@ static struct pkg_operations local_pkg_ops = {
.get_arch = _cache_get_arch,
.get_isize = _cache_get_isize,
.get_reason = _cache_get_reason,
+ .get_validation = _cache_get_validation,
.has_scriptlet = _cache_has_scriptlet,
.get_licenses = _cache_get_licenses,
.get_groups = _cache_get_groups,
@@ -603,6 +610,9 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
} else if(strcmp(line, "%REASON%") == 0) {
READ_NEXT();
info->reason = (alpm_pkgreason_t)atoi(line);
+ } else if(strcmp(line, "%VALIDATION%") == 0) {
+ READ_NEXT();
+ info->validation = (alpm_pkgvalidation_t)atoi(line);
} else if(strcmp(line, "%SIZE%") == 0) {
READ_NEXT();
info->isize = _alpm_strtoofft(line);
@@ -817,6 +827,10 @@ int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, alpm_dbinfrq_t inforeq
fprintf(fp, "%%REASON%%\n"
"%u\n\n", info->reason);
}
+ if(info->validation) {
+ fprintf(fp, "%%VALIDATION%%\n"
+ "%u\n\n", info->validation);
+ }
if(info->depends) {
fputs("%DEPENDS%\n", fp);
for(lp = info->depends; lp; lp = lp->next) {
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 4b43f21..06b4037 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -320,6 +320,10 @@ int _alpm_pkg_validate_internal(alpm_handle_t *handle,
RET_ERR(handle, ALPM_ERR_PKG_NOT_FOUND, -1);
}
+ if (syncpkg) {
+ syncpkg->validation = ALPM_PKG_VALIDATION_NONE;
+ }
+
/* can we get away with skipping checksums? */
has_sig = 0;
if(level & ALPM_SIG_PACKAGE) {
@@ -341,6 +345,7 @@ int _alpm_pkg_validate_internal(alpm_handle_t *handle,
if(_alpm_test_checksum(pkgfile, syncpkg->md5sum, ALPM_CSUM_MD5) != 0) {
RET_ERR(handle, ALPM_ERR_PKG_INVALID_CHECKSUM, -1);
}
+ syncpkg->validation = ALPM_PKG_VALIDATION_MD5SUM;
}
if(syncpkg->sha256sum) {
@@ -349,6 +354,7 @@ int _alpm_pkg_validate_internal(alpm_handle_t *handle,
if(_alpm_test_checksum(pkgfile, syncpkg->sha256sum, ALPM_CSUM_SHA256) != 0) {
RET_ERR(handle, ALPM_ERR_PKG_INVALID_CHECKSUM, -1);
}
+ syncpkg->validation = ALPM_PKG_VALIDATION_SHA256SUM;
}
}
@@ -362,6 +368,9 @@ int _alpm_pkg_validate_internal(alpm_handle_t *handle,
handle->pm_errno = ALPM_ERR_PKG_INVALID_SIG;
return -1;
}
+ if (syncpkg) {
+ syncpkg->validation = ALPM_PKG_VALIDATION_SIGNATURE;
+ }
}
return 0;
@@ -495,6 +504,7 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle,
newpkg->ops = get_file_pkg_ops();
newpkg->handle = handle;
newpkg->infolevel = INFRQ_BASE | INFRQ_DESC | INFRQ_SCRIPTLET;
+ newpkg->validation = ALPM_PKG_VALIDATION_NONE;
if(full) {
if(files) {
@@ -539,6 +549,13 @@ int SYMEXPORT alpm_pkg_load(alpm_handle_t *handle, const char *filename, int ful
return -1;
}
+ char *sigpath = _alpm_sigpath(handle, filename);
+ if(sigpath && !_alpm_access(handle, NULL, sigpath, R_OK)) {
+ /* package validation was done with a signature */
+ (*pkg)->validation = ALPM_PKG_VALIDATION_SIGNATURE;
+ }
+ free(sigpath);
+
return 0;
}
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 68fec16..5abfd72 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -91,6 +91,7 @@ static const char *_pkg_get_packager(alpm_pkg_t *pkg) { return pkg->packager;
static const char *_pkg_get_arch(alpm_pkg_t *pkg) { return pkg->arch; }
static off_t _pkg_get_isize(alpm_pkg_t *pkg) { return pkg->isize; }
static alpm_pkgreason_t _pkg_get_reason(alpm_pkg_t *pkg) { return pkg->reason; }
+static alpm_pkgvalidation_t _pkg_get_validation(alpm_pkg_t *pkg) { return pkg->validation; }
static int _pkg_has_scriptlet(alpm_pkg_t *pkg) { return pkg->scriptlet; }
static alpm_list_t *_pkg_get_licenses(alpm_pkg_t *pkg) { return pkg->licenses; }
@@ -134,6 +135,7 @@ struct pkg_operations default_pkg_ops = {
.get_arch = _pkg_get_arch,
.get_isize = _pkg_get_isize,
.get_reason = _pkg_get_reason,
+ .get_validation = _pkg_get_validation,
.has_scriptlet = _pkg_has_scriptlet,
.get_licenses = _pkg_get_licenses,
@@ -268,6 +270,13 @@ alpm_pkgreason_t SYMEXPORT alpm_pkg_get_reason(alpm_pkg_t *pkg)
return pkg->ops->get_reason(pkg);
}
+alpm_pkgvalidation_t SYMEXPORT alpm_pkg_get_validation(alpm_pkg_t *pkg)
+{
+ ASSERT(pkg != NULL, return -1);
+ pkg->handle->pm_errno = 0;
+ return pkg->ops->get_validation(pkg);
+}
+
alpm_list_t SYMEXPORT *alpm_pkg_get_licenses(alpm_pkg_t *pkg)
{
ASSERT(pkg != NULL, return NULL);
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h
index 172d2f3..0c0973e 100644
--- a/lib/libalpm/package.h
+++ b/lib/libalpm/package.h
@@ -47,6 +47,7 @@ struct pkg_operations {
const char *(*get_arch) (alpm_pkg_t *);
off_t (*get_isize) (alpm_pkg_t *);
alpm_pkgreason_t (*get_reason) (alpm_pkg_t *);
+ alpm_pkgvalidation_t (*get_validation) (alpm_pkg_t *);
int (*has_scriptlet) (alpm_pkg_t *);
alpm_list_t *(*get_licenses) (alpm_pkg_t *);
@@ -96,6 +97,7 @@ struct __alpm_pkg_t {
int scriptlet;
alpm_pkgreason_t reason;
+ alpm_pkgvalidation_t validation;
alpm_dbinfrq_t infolevel;
alpm_pkgfrom_t origin;
/* origin == PKG_FROM_FILE, use pkg->origin_data.file
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 468438f..68630c1 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -1083,6 +1083,8 @@ static int load_packages(alpm_handle_t *handle, alpm_list_t **data,
free(filepath);
/* copy over the install reason */
pkgfile->reason = spkg->reason;
+ /* copy over validation method */
+ pkgfile->validation = spkg->validation;
i->data = pkgfile;
/* spkg has been removed from the target list, so we can free the
* sync-specific fields */
diff --git a/src/pacman/package.c b/src/pacman/package.c
index ecf5745..2345d30 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -63,6 +63,7 @@ static void deplist_display(const char *title,
void dump_pkg_full(alpm_pkg_t *pkg, int extra)
{
const char *reason;
+ const char *validation = NULL;
time_t bdate, idate;
char bdatestr[50] = "", idatestr[50] = "";
const char *label;
@@ -94,6 +95,26 @@ void dump_pkg_full(alpm_pkg_t *pkg, int extra)
break;
}
+ if(from == PKG_FROM_LOCALDB) {
+ switch(alpm_pkg_get_validation(pkg)) {
+ case ALPM_PKG_VALIDATION_NONE:
+ validation = _("None");
+ break;
+ case ALPM_PKG_VALIDATION_MD5SUM:
+ validation = _("MD5 Sum");
+ break;
+ case ALPM_PKG_VALIDATION_SHA256SUM:
+ validation = _("SHA256 Sum");
+ break;
+ case ALPM_PKG_VALIDATION_SIGNATURE:
+ validation = _("Signature");
+ break;
+ default:
+ validation = _("Unknown");
+ break;
+ }
+ }
+
if(extra || from == PKG_FROM_LOCALDB) {
/* compute this here so we don't get a pause in the middle of output */
requiredby = alpm_pkg_compute_requiredby(pkg);
@@ -159,6 +180,9 @@ void dump_pkg_full(alpm_pkg_t *pkg, int extra)
}
alpm_siglist_cleanup(&siglist);
}
+ if(from == PKG_FROM_LOCALDB) {
+ string_display(_("Validated By :"), validation);
+ }
string_display(_("Description :"), alpm_pkg_get_desc(pkg));
/* Print additional package info if info flag passed more than once */
--
1.7.9.1
2
1
[pacman-dev] [PATCH v2] Add configuration option for Upgrade operation SigLevel
by Allan McRae 18 Feb '12
by Allan McRae 18 Feb '12
18 Feb '12
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 destintion between setting "Required" and
"PackageRequired" as there is not database options for Upgrade
operations.
Signed-off-by: Allan McRae <allan(a)archlinux.org>
---
This fixes all the issues I was concerned about in the previous patch.
Thanks to Bluewind for his idea which set me on the path to fixing it
(although I did it quite different so any crap implemenation is purely
me...).
lib/libalpm/alpm.h | 9 ++++++++
lib/libalpm/handle.c | 52 ++++++++++++++++++++++++++++++++++++++++++++-----
lib/libalpm/handle.h | 4 +++
src/pacman/conf.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++
src/pacman/conf.h | 2 +
src/pacman/upgrade.c | 21 +++++++++++++++++--
6 files changed, 131 insertions(+), 9 deletions(-)
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index eafe931..223a242 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -111,6 +111,9 @@ typedef enum _alpm_siglevel_t {
ALPM_SIG_DATABASE_MARGINAL_OK = (1 << 12),
ALPM_SIG_DATABASE_UNKNOWN_OK = (1 << 13),
+ ALPM_SIG_PACKAGE_SET = (1 << 27),
+ ALPM_SIG_PACKAGE_TRUST_SET = (1 << 28),
+
ALPM_SIG_USE_DEFAULT = (1 << 31)
} alpm_siglevel_t;
@@ -549,6 +552,12 @@ int alpm_option_set_checkspace(alpm_handle_t *handle, int checkspace);
alpm_siglevel_t alpm_option_get_default_siglevel(alpm_handle_t *handle);
int alpm_option_set_default_siglevel(alpm_handle_t *handle, alpm_siglevel_t level);
+alpm_siglevel_t alpm_option_get_local_file_siglevel(alpm_handle_t *handle);
+int alpm_option_set_local_file_siglevel(alpm_handle_t *handle, alpm_siglevel_t level);
+
+alpm_siglevel_t alpm_option_get_remote_file_siglevel(alpm_handle_t *handle);
+int alpm_option_set_remote_file_siglevel(alpm_handle_t *handle, alpm_siglevel_t level);
+
/** @} */
/** @addtogroup alpm_api_databases Database Functions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index ec4cc56..534a4ed 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -596,6 +596,18 @@ int SYMEXPORT alpm_option_set_deltaratio(alpm_handle_t *handle, double ratio)
return 0;
}
+alpm_db_t SYMEXPORT *alpm_get_localdb(alpm_handle_t *handle)
+{
+ CHECK_HANDLE(handle, return NULL);
+ return handle->db_local;
+}
+
+alpm_list_t SYMEXPORT *alpm_get_syncdbs(alpm_handle_t *handle)
+{
+ CHECK_HANDLE(handle, return NULL);
+ return handle->dbs_sync;
+}
+
int SYMEXPORT alpm_option_set_checkspace(alpm_handle_t *handle, int checkspace)
{
CHECK_HANDLE(handle, return -1);
@@ -623,16 +635,44 @@ alpm_siglevel_t SYMEXPORT alpm_option_get_default_siglevel(alpm_handle_t *handle
return handle->siglevel;
}
-alpm_db_t SYMEXPORT *alpm_get_localdb(alpm_handle_t *handle)
+int SYMEXPORT alpm_option_set_local_file_siglevel(alpm_handle_t *handle,
+ alpm_siglevel_t level)
{
- CHECK_HANDLE(handle, return NULL);
- return handle->db_local;
+ CHECK_HANDLE(handle, return -1);
+#ifdef HAVE_LIBGPGME
+ handle->localfilesiglevel = level;
+#else
+ if(level != 0 && level != ALPM_SIG_USE_DEFAULT) {
+ RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1);
+ }
+#endif
+ return 0;
}
-alpm_list_t SYMEXPORT *alpm_get_syncdbs(alpm_handle_t *handle)
+alpm_siglevel_t SYMEXPORT alpm_option_get_local_file_siglevel(alpm_handle_t *handle)
{
- CHECK_HANDLE(handle, return NULL);
- return handle->dbs_sync;
+ CHECK_HANDLE(handle, return -1);
+ return handle->localfilesiglevel;
+}
+
+int SYMEXPORT alpm_option_set_remote_file_siglevel(alpm_handle_t *handle,
+ alpm_siglevel_t level)
+{
+ CHECK_HANDLE(handle, return -1);
+#ifdef HAVE_LIBGPGME
+ handle->remotefilesiglevel = level;
+#else
+ if(level != 0 && level != ALPM_SIG_USE_DEFAULT) {
+ RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1);
+ }
+#endif
+ return 0;
+}
+
+alpm_siglevel_t SYMEXPORT alpm_option_get_remote_file_siglevel(alpm_handle_t *handle)
+{
+ CHECK_HANDLE(handle, return -1);
+ return handle->remotefilesiglevel;
}
/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h
index a090ae4..4d92d11 100644
--- a/lib/libalpm/handle.h
+++ b/lib/libalpm/handle.h
@@ -92,6 +92,10 @@ struct __alpm_handle_t {
int usesyslog; /* Use syslog instead of logfile? */ /* TODO move to frontend */
int checkspace; /* Check disk space before installing */
alpm_siglevel_t siglevel; /* Default signature verification level */
+ alpm_siglevel_t localfilesiglevel; /* Signature verification level for local file
+ upgrade operations */
+ alpm_siglevel_t remotefilesiglevel; /* Signature verification level for remote file
+ upgrade operations */
/* error code */
alpm_errno_t pm_errno;
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index bfa8cad..cbf6f22 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -56,6 +56,8 @@ config_t *config_new(void)
if(alpm_capabilities() & ALPM_CAPABILITY_SIGNATURES) {
newconfig->siglevel = ALPM_SIG_PACKAGE | ALPM_SIG_PACKAGE_OPTIONAL |
ALPM_SIG_DATABASE | ALPM_SIG_DATABASE_OPTIONAL;
+ newconfig->localfilesiglevel = ALPM_SIG_USE_DEFAULT;
+ newconfig->remotefilesiglevel = ALPM_SIG_USE_DEFAULT;
}
return newconfig;
@@ -276,6 +278,7 @@ static int process_siglevel(alpm_list_t *values, alpm_siglevel_t *storage,
if(strcmp(value, "Never") == 0) {
if(package) {
level &= ~ALPM_SIG_PACKAGE;
+ level |= ALPM_SIG_PACKAGE_SET;
}
if(database) {
level &= ~ALPM_SIG_DATABASE;
@@ -284,6 +287,7 @@ static int process_siglevel(alpm_list_t *values, alpm_siglevel_t *storage,
if(package) {
level |= ALPM_SIG_PACKAGE;
level |= ALPM_SIG_PACKAGE_OPTIONAL;
+ level |= ALPM_SIG_PACKAGE_SET;
}
if(database) {
level |= ALPM_SIG_DATABASE;
@@ -293,6 +297,7 @@ static int process_siglevel(alpm_list_t *values, alpm_siglevel_t *storage,
if(package) {
level |= ALPM_SIG_PACKAGE;
level &= ~ALPM_SIG_PACKAGE_OPTIONAL;
+ level |= ALPM_SIG_PACKAGE_SET;
}
if(database) {
level |= ALPM_SIG_DATABASE;
@@ -302,6 +307,7 @@ static int process_siglevel(alpm_list_t *values, alpm_siglevel_t *storage,
if(package) {
level &= ~ALPM_SIG_PACKAGE_MARGINAL_OK;
level &= ~ALPM_SIG_PACKAGE_UNKNOWN_OK;
+ level |= ALPM_SIG_PACKAGE_TRUST_SET;
}
if(database) {
level &= ~ALPM_SIG_DATABASE_MARGINAL_OK;
@@ -311,6 +317,7 @@ static int process_siglevel(alpm_list_t *values, alpm_siglevel_t *storage,
if(package) {
level |= ALPM_SIG_PACKAGE_MARGINAL_OK;
level |= ALPM_SIG_PACKAGE_UNKNOWN_OK;
+ level |= ALPM_SIG_PACKAGE_TRUST_SET;
}
if(database) {
level |= ALPM_SIG_DATABASE_MARGINAL_OK;
@@ -340,6 +347,30 @@ static int process_siglevel(alpm_list_t *values, alpm_siglevel_t *storage,
return ret;
}
+/**
+ * Merge the package entires of two signature verification levels.
+ * @param base initial siglevel
+ * @param over overridden siglevel, derived value is stored here
+ */
+static void merge_siglevel(alpm_siglevel_t *base, alpm_siglevel_t *over)
+{
+ alpm_siglevel_t level = *over;
+ if(level & ALPM_SIG_USE_DEFAULT) {
+ level = *base;
+ } else {
+ if(!(level & ALPM_SIG_PACKAGE_SET)) {
+ level |= *base & ALPM_SIG_PACKAGE;
+ level |= *base & ALPM_SIG_PACKAGE_OPTIONAL;
+ }
+ if(!(level & ALPM_SIG_PACKAGE_TRUST_SET)) {
+ level |= *base & ALPM_SIG_PACKAGE_MARGINAL_OK;
+ level |= *base & ALPM_SIG_PACKAGE_UNKNOWN_OK;
+ }
+ }
+
+ *over = level;
+}
+
static int process_cleanmethods(alpm_list_t *values,
const char *file, int linenum)
{
@@ -483,6 +514,22 @@ static int _parse_options(const char *key, char *value,
return 1;
}
FREELIST(values);
+ } else if(strcmp(key, "LocalFileSigLevel") == 0) {
+ alpm_list_t *values = NULL;
+ setrepeatingoption(value, "LocalFileSigLevel", &values);
+ if(process_siglevel(values, &config->localfilesiglevel, file, linenum)) {
+ FREELIST(values);
+ return 1;
+ }
+ FREELIST(values);
+ } else if(strcmp(key, "RemoteFileSigLevel") == 0) {
+ alpm_list_t *values = NULL;
+ setrepeatingoption(value, "RemoteFileSigLevel", &values);
+ if(process_siglevel(values, &config->remotefilesiglevel, file, linenum)) {
+ FREELIST(values);
+ return 1;
+ }
+ FREELIST(values);
} else {
pm_printf(ALPM_LOG_WARNING,
_("config file %s, line %d: directive '%s' in section '%s' not recognized.\n"),
@@ -605,6 +652,11 @@ static int setup_libalpm(void)
alpm_option_set_default_siglevel(handle, config->siglevel);
+ merge_siglevel(&config->siglevel, &config->localfilesiglevel);
+ merge_siglevel(&config->siglevel, &config->remotefilesiglevel);
+ alpm_option_set_local_file_siglevel(handle, config->localfilesiglevel);
+ alpm_option_set_remote_file_siglevel(handle, config->remotefilesiglevel);
+
if(config->xfercommand) {
alpm_option_set_fetchcb(handle, download_with_xfercommand);
} else if(!(alpm_capabilities() & ALPM_CAPABILITY_DOWNLOADER)) {
diff --git a/src/pacman/conf.h b/src/pacman/conf.h
index 481132f..7447e89 100644
--- a/src/pacman/conf.h
+++ b/src/pacman/conf.h
@@ -72,6 +72,8 @@ typedef struct __config_t {
unsigned int ask;
alpm_transflag_t flags;
alpm_siglevel_t siglevel;
+ alpm_siglevel_t localfilesiglevel;
+ alpm_siglevel_t remotefilesiglevel;
/* conf file options */
/* I Love Candy! */
diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c
index 87f7c39..c60649a 100644
--- a/src/pacman/upgrade.c
+++ b/src/pacman/upgrade.c
@@ -40,8 +40,7 @@
int pacman_upgrade(alpm_list_t *targets)
{
int retval = 0;
- alpm_list_t *i;
- alpm_siglevel_t level = alpm_option_get_default_siglevel(config->handle);
+ alpm_list_t *i, *remote = NULL;
if(targets == NULL) {
pm_printf(ALPM_LOG_ERROR, _("no targets specified (use -h for help)\n"));
@@ -51,6 +50,8 @@ int pacman_upgrade(alpm_list_t *targets)
/* Check for URL targets and process them
*/
for(i = targets; i; i = alpm_list_next(i)) {
+ int *r = malloc(sizeof(int));
+
if(strstr(i->data, "://")) {
char *str = alpm_fetch_pkgurl(config->handle, i->data);
if(str == NULL) {
@@ -60,8 +61,13 @@ int pacman_upgrade(alpm_list_t *targets)
} else {
free(i->data);
i->data = str;
+ *r = 1;
}
+ } else {
+ *r = 0;
}
+
+ remote = alpm_list_add(remote, r);
}
if(retval) {
@@ -75,9 +81,16 @@ int pacman_upgrade(alpm_list_t *targets)
printf(_("loading packages...\n"));
/* add targets to the created transaction */
- for(i = targets; i; i = alpm_list_next(i)) {
+ for(i = targets; i; i = alpm_list_next(i), remote = alpm_list_next(remote)) {
const char *targ = i->data;
alpm_pkg_t *pkg;
+ alpm_siglevel_t level;
+
+ if(*(int *)remote->data) {
+ level = alpm_option_get_remote_file_siglevel(config->handle);
+ } else {
+ level = alpm_option_get_local_file_siglevel(config->handle);
+ }
if(alpm_pkg_load(config->handle, targ, 1, level, &pkg) != 0) {
pm_printf(ALPM_LOG_ERROR, "'%s': %s\n",
@@ -95,6 +108,8 @@ int pacman_upgrade(alpm_list_t *targets)
config->explicit_adds = alpm_list_add(config->explicit_adds, pkg);
}
+ FREELIST(remote);
+
if(retval) {
trans_release();
return retval;
--
1.7.9.1
1
0
[pacman-dev] [PATCH] [RFC] Add configuration option for Upgrade operation SigLevel
by Allan McRae 17 Feb '12
by Allan McRae 17 Feb '12
17 Feb '12
Add LocalFileSigLevel and RemoteFileSigLevel to control the signature
checking for "pacman -U <file>" and "pacman -U <url>" operations
respectively. Both values take the default of "Optional TrustedOnly".
Signed-off-by: Allan McRae <allan(a)archlinux.org>
---
I would like to have the default level being what is set for SigLevel and
the values in {Local,Remote}FileSigLevel override this, but I can not get
that working without requiring these config options come after SigLevel.
lib/libalpm/alpm.h | 6 +++++
lib/libalpm/handle.c | 52 ++++++++++++++++++++++++++++++++++++++++++++-----
lib/libalpm/handle.h | 4 +++
src/pacman/conf.c | 20 +++++++++++++++++++
src/pacman/conf.h | 2 +
src/pacman/upgrade.c | 21 +++++++++++++++++--
6 files changed, 96 insertions(+), 9 deletions(-)
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index aeb1bb7..4afa429 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -540,6 +540,12 @@ int alpm_option_set_checkspace(alpm_handle_t *handle, int checkspace);
alpm_siglevel_t alpm_option_get_default_siglevel(alpm_handle_t *handle);
int alpm_option_set_default_siglevel(alpm_handle_t *handle, alpm_siglevel_t level);
+alpm_siglevel_t alpm_option_get_local_file_siglevel(alpm_handle_t *handle);
+int alpm_option_set_local_file_siglevel(alpm_handle_t *handle, alpm_siglevel_t level);
+
+alpm_siglevel_t alpm_option_get_remote_file_siglevel(alpm_handle_t *handle);
+int alpm_option_set_remote_file_siglevel(alpm_handle_t *handle, alpm_siglevel_t level);
+
/** @} */
/** @addtogroup alpm_api_databases Database Functions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index ec4cc56..534a4ed 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -596,6 +596,18 @@ int SYMEXPORT alpm_option_set_deltaratio(alpm_handle_t *handle, double ratio)
return 0;
}
+alpm_db_t SYMEXPORT *alpm_get_localdb(alpm_handle_t *handle)
+{
+ CHECK_HANDLE(handle, return NULL);
+ return handle->db_local;
+}
+
+alpm_list_t SYMEXPORT *alpm_get_syncdbs(alpm_handle_t *handle)
+{
+ CHECK_HANDLE(handle, return NULL);
+ return handle->dbs_sync;
+}
+
int SYMEXPORT alpm_option_set_checkspace(alpm_handle_t *handle, int checkspace)
{
CHECK_HANDLE(handle, return -1);
@@ -623,16 +635,44 @@ alpm_siglevel_t SYMEXPORT alpm_option_get_default_siglevel(alpm_handle_t *handle
return handle->siglevel;
}
-alpm_db_t SYMEXPORT *alpm_get_localdb(alpm_handle_t *handle)
+int SYMEXPORT alpm_option_set_local_file_siglevel(alpm_handle_t *handle,
+ alpm_siglevel_t level)
{
- CHECK_HANDLE(handle, return NULL);
- return handle->db_local;
+ CHECK_HANDLE(handle, return -1);
+#ifdef HAVE_LIBGPGME
+ handle->localfilesiglevel = level;
+#else
+ if(level != 0 && level != ALPM_SIG_USE_DEFAULT) {
+ RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1);
+ }
+#endif
+ return 0;
}
-alpm_list_t SYMEXPORT *alpm_get_syncdbs(alpm_handle_t *handle)
+alpm_siglevel_t SYMEXPORT alpm_option_get_local_file_siglevel(alpm_handle_t *handle)
{
- CHECK_HANDLE(handle, return NULL);
- return handle->dbs_sync;
+ CHECK_HANDLE(handle, return -1);
+ return handle->localfilesiglevel;
+}
+
+int SYMEXPORT alpm_option_set_remote_file_siglevel(alpm_handle_t *handle,
+ alpm_siglevel_t level)
+{
+ CHECK_HANDLE(handle, return -1);
+#ifdef HAVE_LIBGPGME
+ handle->remotefilesiglevel = level;
+#else
+ if(level != 0 && level != ALPM_SIG_USE_DEFAULT) {
+ RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1);
+ }
+#endif
+ return 0;
+}
+
+alpm_siglevel_t SYMEXPORT alpm_option_get_remote_file_siglevel(alpm_handle_t *handle)
+{
+ CHECK_HANDLE(handle, return -1);
+ return handle->remotefilesiglevel;
}
/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h
index a090ae4..4d92d11 100644
--- a/lib/libalpm/handle.h
+++ b/lib/libalpm/handle.h
@@ -92,6 +92,10 @@ struct __alpm_handle_t {
int usesyslog; /* Use syslog instead of logfile? */ /* TODO move to frontend */
int checkspace; /* Check disk space before installing */
alpm_siglevel_t siglevel; /* Default signature verification level */
+ alpm_siglevel_t localfilesiglevel; /* Signature verification level for local file
+ upgrade operations */
+ alpm_siglevel_t remotefilesiglevel; /* Signature verification level for remote file
+ upgrade operations */
/* error code */
alpm_errno_t pm_errno;
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index bfa8cad..723ee50 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -56,6 +56,8 @@ config_t *config_new(void)
if(alpm_capabilities() & ALPM_CAPABILITY_SIGNATURES) {
newconfig->siglevel = ALPM_SIG_PACKAGE | ALPM_SIG_PACKAGE_OPTIONAL |
ALPM_SIG_DATABASE | ALPM_SIG_DATABASE_OPTIONAL;
+ newconfig->localfilesiglevel = newconfig->siglevel;
+ newconfig->remotefilesiglevel = newconfig->siglevel;
}
return newconfig;
@@ -483,6 +485,22 @@ static int _parse_options(const char *key, char *value,
return 1;
}
FREELIST(values);
+ } else if(strcmp(key, "LocalFileSigLevel") == 0) {
+ alpm_list_t *values = NULL;
+ setrepeatingoption(value, "LocalFileSigLevel", &values);
+ if(process_siglevel(values, &config->localfilesiglevel, file, linenum)) {
+ FREELIST(values);
+ return 1;
+ }
+ FREELIST(values);
+ } else if(strcmp(key, "RemoteFileSigLevel") == 0) {
+ alpm_list_t *values = NULL;
+ setrepeatingoption(value, "RemoteFileSigLevel", &values);
+ if(process_siglevel(values, &config->remotefilesiglevel, file, linenum)) {
+ FREELIST(values);
+ return 1;
+ }
+ FREELIST(values);
} else {
pm_printf(ALPM_LOG_WARNING,
_("config file %s, line %d: directive '%s' in section '%s' not recognized.\n"),
@@ -604,6 +622,8 @@ static int setup_libalpm(void)
}
alpm_option_set_default_siglevel(handle, config->siglevel);
+ alpm_option_set_local_file_siglevel(handle, config->localfilesiglevel);
+ alpm_option_set_remote_file_siglevel(handle, config->remotefilesiglevel);
if(config->xfercommand) {
alpm_option_set_fetchcb(handle, download_with_xfercommand);
diff --git a/src/pacman/conf.h b/src/pacman/conf.h
index 481132f..7447e89 100644
--- a/src/pacman/conf.h
+++ b/src/pacman/conf.h
@@ -72,6 +72,8 @@ typedef struct __config_t {
unsigned int ask;
alpm_transflag_t flags;
alpm_siglevel_t siglevel;
+ alpm_siglevel_t localfilesiglevel;
+ alpm_siglevel_t remotefilesiglevel;
/* conf file options */
/* I Love Candy! */
diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c
index 87f7c39..c60649a 100644
--- a/src/pacman/upgrade.c
+++ b/src/pacman/upgrade.c
@@ -40,8 +40,7 @@
int pacman_upgrade(alpm_list_t *targets)
{
int retval = 0;
- alpm_list_t *i;
- alpm_siglevel_t level = alpm_option_get_default_siglevel(config->handle);
+ alpm_list_t *i, *remote = NULL;
if(targets == NULL) {
pm_printf(ALPM_LOG_ERROR, _("no targets specified (use -h for help)\n"));
@@ -51,6 +50,8 @@ int pacman_upgrade(alpm_list_t *targets)
/* Check for URL targets and process them
*/
for(i = targets; i; i = alpm_list_next(i)) {
+ int *r = malloc(sizeof(int));
+
if(strstr(i->data, "://")) {
char *str = alpm_fetch_pkgurl(config->handle, i->data);
if(str == NULL) {
@@ -60,8 +61,13 @@ int pacman_upgrade(alpm_list_t *targets)
} else {
free(i->data);
i->data = str;
+ *r = 1;
}
+ } else {
+ *r = 0;
}
+
+ remote = alpm_list_add(remote, r);
}
if(retval) {
@@ -75,9 +81,16 @@ int pacman_upgrade(alpm_list_t *targets)
printf(_("loading packages...\n"));
/* add targets to the created transaction */
- for(i = targets; i; i = alpm_list_next(i)) {
+ for(i = targets; i; i = alpm_list_next(i), remote = alpm_list_next(remote)) {
const char *targ = i->data;
alpm_pkg_t *pkg;
+ alpm_siglevel_t level;
+
+ if(*(int *)remote->data) {
+ level = alpm_option_get_remote_file_siglevel(config->handle);
+ } else {
+ level = alpm_option_get_local_file_siglevel(config->handle);
+ }
if(alpm_pkg_load(config->handle, targ, 1, level, &pkg) != 0) {
pm_printf(ALPM_LOG_ERROR, "'%s': %s\n",
@@ -95,6 +108,8 @@ int pacman_upgrade(alpm_list_t *targets)
config->explicit_adds = alpm_list_add(config->explicit_adds, pkg);
}
+ FREELIST(remote);
+
if(retval) {
trans_release();
return retval;
--
1.7.9.1
1
0