summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-10-14 08:16:18 -0500
committerDan McGee <dan@archlinux.org>2011-10-14 08:16:18 -0500
commita33424f87955c43652a61fcef5817df07e17bee3 (patch)
tree2688165e953384b89d472dc887c876bd88306223
parentdbd54c0cb95c5d9c914e5d99b23556d2528ee9b9 (diff)
parent020bdb4298cd1bc53df7ca4d911cda7aaa65329c (diff)
downloadpacman-a33424f87955c43652a61fcef5817df07e17bee3.tar.xz
Merge branch 'maint'
-rw-r--r--doc/.gitignore4
-rw-r--r--doc/Makefile.am12
-rw-r--r--doc/asciidoc-override.css7
-rw-r--r--doc/index.txt135
-rw-r--r--lib/libalpm/dload.c24
-rw-r--r--lib/libalpm/dload.h2
-rw-r--r--scripts/makepkg.sh.in20
-rw-r--r--src/pacman/util.c10
8 files changed, 141 insertions, 73 deletions
diff --git a/doc/.gitignore b/doc/.gitignore
index a7f33e55..5625735a 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -9,7 +9,9 @@ pkgdelta.8
repo-add.8
repo-remove.8
vercmp.8
-*.css
+asciidoc-manpage.css
+asciidoc.css
+asciidoc.js
*.html
*.xml
man3
diff --git a/doc/Makefile.am b/doc/Makefile.am
index aa27b506..f449e727 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -41,6 +41,7 @@ HTML_DOCS = \
EXTRA_DIST = \
asciidoc.conf \
+ asciidoc-override.css \
pacman.8.txt \
makepkg.8.txt \
repo-add.8.txt \
@@ -91,8 +92,9 @@ html: $(HTML_DOCS)
website: html
bsdtar czf website.tar.gz $(HTML_DOCS) \
+ asciidoc-override.css \
-C /etc/asciidoc/stylesheets/ \
- asciidoc.css asciidoc-manpage.css \
+ asciidoc.css \
-C /etc/asciidoc/javascripts/ \
asciidoc.js \
-C /etc/asciidoc/ \
@@ -116,7 +118,7 @@ A2X_OPTS = \
--destination-dir='./'
# These rules are due to the includes and files of the asciidoc text
-$(ASCIIDOC_MANS): asciidoc.conf footer.txt
+$(ASCIIDOC_MANS): asciidoc.conf footer.txt Makefile
a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS) --out-file=./$@.xml" $(srcdir)/$@.txt
%.html: %.txt
@@ -128,9 +130,9 @@ HACKING.html: ../HACKING
dos2unix $@
# Customizations for certain HTML docs
-$(HTML_MANPAGES): asciidoc.conf footer.txt
-$(HTML_OTHER): asciidoc.conf
-%.html: ASCIIDOC_OPTS += -a linkcss -a toc -a icons
+$(HTML_MANPAGES): asciidoc.conf footer.txt Makefile
+$(HTML_OTHER): asciidoc.conf Makefile
+%.html: ASCIIDOC_OPTS += -a linkcss -a toc -a icons -a max-width=960px -a stylesheet=asciidoc-override.css
%.8.html: ASCIIDOC_OPTS += -d manpage
%.5.html: ASCIIDOC_OPTS += -d manpage
%.3.html: ASCIIDOC_OPTS += -d manpage
diff --git a/doc/asciidoc-override.css b/doc/asciidoc-override.css
new file mode 100644
index 00000000..328c8fcd
--- /dev/null
+++ b/doc/asciidoc-override.css
@@ -0,0 +1,7 @@
+table th, table td {
+ padding: 0.2em 1em;
+}
+
+table td p.table {
+ margin: 0;
+}
diff --git a/doc/index.txt b/doc/index.txt
index 5e903e25..359b47fa 100644
--- a/doc/index.txt
+++ b/doc/index.txt
@@ -28,6 +28,9 @@ being able to handle a much wider variety of cases. The switch to a
library-based program should also make it easier in the future to develop
alternative front ends.
+Version 4.0 added package signing and verification capabilities to the entire
+makepkg/repo-add/pacman toolchain via GNUPG and GPGME.
+
Documentation
-------------
@@ -62,47 +65,97 @@ contain the biggest changes in a format more concise than the commit log.
Releases
--------
-`------------`-------
-Date Version
----------------------
-2011-08-10 v3.5.4
-2011-06-07 v3.5.3
-2011-04-18 v3.5.2
-2011-03-23 v3.5.1
-2011-03-16 v3.5.0
-2011-01-22 v3.4.3
-2010-12-29 v3.4.2
-2010-09-03 v3.4.1
-2010-06-16 v3.4.0
-2009-11-10 v3.3.3
-2009-10-05 v3.3.2
-2009-09-22 v3.3.1
-2009-08-02 v3.3.0
-2009-01-05 v3.2.2
-2008-08-26 v3.2.1
-2008-07-30 v3.2.0
-2008-04-01 v3.1.4
-2008-03-06 v3.1.3
-2008-02-20 v3.1.2
-2008-01-20 v3.1.1
-2008-01-09 v3.1.0
-2007-09-16 v3.0.6
-2007-06-17 v3.0.5
-2007-05-08 v3.0.4
-2007-04-28 v3.0.3
-2007-04-23 v3.0.2
-2007-04-04 v3.0.1
-2007-03-25 v3.0.0
-2006-02-02 v2.9.8
-2005-09-16 v2.9.7
-2005-06-10 v2.9.6
-2005-01-11 v2.9.5
-2004-12-19 v2.9.4
-2004-12-18 v2.9.3
-2004-09-25 v2.9.2
-2004-09-24 v2.9.1
-2004-09-18 v2.9
----------------------
+[frame="none",grid="none",options="autowidth",cols="3*a"]
+|======
+|
+[frame="topbot",grid="none",options="header,autowidth"]
+!======
+!Version !Date
+!4.0.0 !2011-09-13
+!4.0.0rc2 !2011-09-22
+!4.0.0rc1 !2011-08-11
+!3.5.4 !2011-08-10
+!3.5.3 !2011-06-07
+!3.5.2 !2011-04-18
+!3.5.1 !2011-03-23
+!3.5.0 !2011-03-16
+!3.4.3 !2011-01-22
+!3.4.2 !2010-12-29
+!3.4.1 !2010-09-03
+!3.4.0 !2010-06-16
+!3.3.3 !2009-11-10
+!3.3.2 !2009-10-05
+!3.3.1 !2009-09-22
+!3.3.0 !2009-08-02
+!3.2.2 !2009-01-05
+!3.2.1 !2008-08-26
+!3.2.0 !2008-07-30
+!3.1.4 !2008-04-01
+!3.1.3 !2008-03-06
+!3.1.2 !2008-02-20
+!3.1.1 !2008-01-20
+!3.1.0 !2008-01-09
+!======
+|
+[frame="topbot",grid="none",options="header,autowidth"]
+!======
+!Version !Date
+!2.9.8 !2006-02-02
+!2.9.7 !2005-09-16
+!2.9.7-TEST3 !2005-09-11
+!2.9.7-TEST2 !2005-09-07
+!2.9.7-TEST !2005-08-19
+!2.9.6 !2005-06-10
+!2.9.5 !2005-01-11
+!2.9.4 !2004-12-20
+!2.9.3 !2004-12-19
+!2.9.2 !2004-09-25
+!2.9.1 !2004-09-25
+!2.9 !2004-09-18
+!2.8.4 !2004-08-23
+!2.8.3 !2004-08-04
+!2.8.2 !2004-07-22
+!2.8.1 !2004-07-17
+!2.8 !2004-07-03
+!2.7.9 !2004-04-30
+!2.7.8 !2004-04-29
+!2.7.7 !2004-04-15
+!2.7.6 !2004-04-04
+!2.7.5 !2004-03-02
+!2.7.4 !2004-02-18
+!2.7.3 !2004-02-07
+!======
+|
+[frame="topbot",grid="none",options="header,autowidth"]
+!======
+!Version !Date
+!2.7.2 !2004-01-04
+!2.7.1 !2003-12-21
+!2.7 !2003-11-25
+!2.6.4 !2003-10-17
+!2.6.3 !2003-10-01
+!2.6.2 !2003-09-29
+!2.6.1 !2003-09-15
+!2.6 !2003-09-03
+!2.5.1 !2003-07-12
+!2.5 !2003-05-30
+!2.4.1 !2003-04-19
+!2.4 !2003-04-11
+!2.3.2 !2003-03-17
+!2.3.1 !2003-03-14
+!2.3 !2003-02-27
+!2.2 !2002-12-11
+!2.1 !2002-09-16
+!2.0 !2002-08-09
+!1.23 !2002-04-30
+!1.22 !2002-04-12
+!1.21 !2002-04-03
+!1.2 !2002-03-18
+!1.1 !2002-03-10
+!1.0 !2002-02-25
+!======
+
+|======
Source code for all releases is available at
link:ftp://ftp.archlinux.org/other/pacman/[]. To install, download the newest
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 83060f97..cd2857c3 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -127,13 +127,14 @@ static int curl_progress(void *file, double dltotal, double dlnow,
return 0;
}
-static int curl_gethost(const char *url, char *buffer)
+static int curl_gethost(const char *url, char *buffer, size_t buf_len)
{
size_t hostlen;
char *p, *q;
if(strncmp(url, "file://", 7) == 0) {
- strcpy(buffer, _("disk"));
+ p = _("disk");
+ hostlen = strlen(p);
} else {
p = strstr(url, "//");
if(!p) {
@@ -154,13 +155,14 @@ static int curl_gethost(const char *url, char *buffer)
hostlen -= q - p + 1;
p = q + 1;
}
+ }
- if(hostlen > 255) {
- /* buffer overflow imminent */
- return 1;
- }
- snprintf(buffer, hostlen + 1, "%s", p);
+ if(hostlen > buf_len - 1) {
+ /* buffer overflow imminent */
+ return 1;
}
+ memcpy(buffer, p, hostlen);
+ buffer[hostlen] = '\0';
return 0;
}
@@ -310,14 +312,16 @@ static FILE *create_tempfile(struct dload_payload *payload, const char *localpat
return fp;
}
+/* RFC1123 states applications should support this length */
+#define HOSTNAME_SIZE 256
+
static int curl_download_internal(struct dload_payload *payload,
const char *localpath, char **final_file)
{
int ret = -1;
FILE *localf = NULL;
char *effective_url;
- /* RFC1123 states applications should support this length */
- char hostname[256];
+ char hostname[HOSTNAME_SIZE];
char error_buffer[CURL_ERROR_SIZE] = {0};
struct stat st;
long timecond, respcode = 0, remote_time = -1;
@@ -332,7 +336,7 @@ static int curl_download_internal(struct dload_payload *payload,
if(!payload->remote_name) {
payload->remote_name = strdup(get_filename(payload->fileurl));
}
- if(!payload->remote_name || curl_gethost(payload->fileurl, hostname) != 0) {
+ if(!payload->remote_name || curl_gethost(payload->fileurl, hostname, sizeof(hostname)) != 0) {
_alpm_log(handle, ALPM_LOG_ERROR, _("url '%s' is invalid\n"), payload->fileurl);
RET_ERR(handle, ALPM_ERR_SERVER_BAD_URL, -1);
}
diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h
index 57a69f93..27d865d6 100644
--- a/lib/libalpm/dload.h
+++ b/lib/libalpm/dload.h
@@ -38,7 +38,9 @@ struct dload_payload {
int allow_resume;
int errors_ok;
int unlink_on_fail;
+#ifdef HAVE_LIBCURL
CURLcode curlerr; /* last error produced by curl */
+#endif
};
void _alpm_dload_payload_reset(struct dload_payload *payload);
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 09c1e963..3085bf59 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -174,17 +174,6 @@ clean_up() {
}
-##
-# Signal Traps
-##
-set -E
-trap 'clean_up' 0
-for signal in TERM HUP QUIT; do
- trap "trap_exit \"$(gettext "%s signal caught. Exiting...")\" \"$signal\"" "$signal"
-done
-trap 'trap_exit "$(gettext "Aborted by user! Exiting...")"' INT
-trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR
-
enter_fakeroot() {
msg "$(gettext "Entering %s environment...")" "fakeroot"
@@ -1956,6 +1945,15 @@ while true; do
shift
done
+# setup signal traps
+trap 'clean_up' 0
+for signal in TERM HUP QUIT; do
+ trap "trap_exit \"$(gettext "%s signal caught. Exiting...")\" \"$signal\"" "$signal"
+done
+trap 'trap_exit "$(gettext "Aborted by user! Exiting...")"' INT
+trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR
+set -E
+
# preserve environment variables and canonicalize path
[[ -n ${PKGDEST} ]] && _PKGDEST=$(canonicalize_path ${PKGDEST})
[[ -n ${SRCDEST} ]] && _SRCDEST=$(canonicalize_path ${SRCDEST})
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 2696451e..3f52500d 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -1043,19 +1043,19 @@ void print_packages(const alpm_list_t *packages)
char *string = strdup(config->print_format);
char *temp = string;
/* %n : pkgname */
- if(strstr(temp,"%n")) {
+ if(strstr(temp, "%n")) {
string = strreplace(temp, "%n", alpm_pkg_get_name(pkg));
free(temp);
temp = string;
}
/* %v : pkgver */
- if(strstr(temp,"%v")) {
+ if(strstr(temp, "%v")) {
string = strreplace(temp, "%v", alpm_pkg_get_version(pkg));
free(temp);
temp = string;
}
/* %l : location */
- if(strstr(temp,"%l")) {
+ if(strstr(temp, "%l")) {
char *pkgloc = pkg_get_location(pkg);
string = strreplace(temp, "%l", pkgloc);
free(pkgloc);
@@ -1063,7 +1063,7 @@ void print_packages(const alpm_list_t *packages)
temp = string;
}
/* %r : repo */
- if(strstr(temp,"%r")) {
+ if(strstr(temp, "%r")) {
const char *repo = "local";
alpm_db_t *db = alpm_pkg_get_db(pkg);
if(db) {
@@ -1074,7 +1074,7 @@ void print_packages(const alpm_list_t *packages)
temp = string;
}
/* %s : size */
- if(strstr(temp,"%s")) {
+ if(strstr(temp, "%s")) {
char *size;
pm_asprintf(&size, "%jd", (intmax_t)pkg_get_size(pkg));
string = strreplace(temp, "%s", size);