diff options
author | root <root@rshg054.dnsready.net> | 2012-09-21 00:28:31 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-09-21 00:28:31 -0700 |
commit | 7bcc3e9d12b9294024067ecaf8ab28a9fe83ab6c (patch) | |
tree | b3960814ca09f169fed5fd65f01497cb38fc3cf4 /testing | |
parent | 005a14f92ef5d35e4c47d970cb7e69367a835958 (diff) |
Fri Sep 21 00:28:30 PDT 2012
Diffstat (limited to 'testing')
-rw-r--r-- | testing/libarchive/PKGBUILD | 38 | ||||
-rw-r--r-- | testing/libarchive/libarchive-3.0.x-fix-mtree-writer.patch | 34 | ||||
-rw-r--r-- | testing/util-linux/PKGBUILD | 24 | ||||
-rw-r--r-- | testing/util-linux/hwclock-systz.patch | 96 |
4 files changed, 182 insertions, 10 deletions
diff --git a/testing/libarchive/PKGBUILD b/testing/libarchive/PKGBUILD new file mode 100644 index 000000000..44fdad7ff --- /dev/null +++ b/testing/libarchive/PKGBUILD @@ -0,0 +1,38 @@ +# $Id: PKGBUILD 166896 2012-09-21 02:03:06Z allan $ +# Maintainer: Dan McGee <dan@archlinux.org> + +pkgname=libarchive +pkgver=3.0.4 +pkgrel=2 +pkgdesc="library that can create and read several streaming archive formats" +arch=('i686' 'x86_64') +url="http://libarchive.googlecode.com/" +license=('BSD') +depends=('zlib' 'bzip2' 'xz>=5.0.0' 'acl' 'openssl>=1.0.0' 'expat') +source=("https://github.com/downloads/libarchive/libarchive/libarchive-${pkgver}.tar.gz" + libarchive-3.0.x-fix-mtree-writer.patch) +md5sums=('af443ca9a10ddbcbf00f7ae34ca7fc16' + '6d36a50a7282db6576bd1fbc23f08055') +sha256sums=('76e8d7c7b100ec4071e48c1b7d3f3ea1d22b39db3e45b7189f75b5ff4df90fac' + 'f0081c0d7d7875fc91c683b14fe4876d56b6585f45be9181c755eba4b522f5b9') + + +build() { + cd "$srcdir/$pkgname-$pkgver" + patch -Np1 -i $srcdir/libarchive-3.0.x-fix-mtree-writer.patch + ./configure --prefix=/usr --without-xml2 + make +} + +check() { + cd "$srcdir/$pkgname-$pkgver" + + make check +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + + install -D -m644 COPYING "$pkgdir"/usr/share/licenses/libarchive/COPYING +} diff --git a/testing/libarchive/libarchive-3.0.x-fix-mtree-writer.patch b/testing/libarchive/libarchive-3.0.x-fix-mtree-writer.patch new file mode 100644 index 000000000..dbc89686a --- /dev/null +++ b/testing/libarchive/libarchive-3.0.x-fix-mtree-writer.patch @@ -0,0 +1,34 @@ +--- a/libarchive/archive_write_set_format_mtree.c ++++ b/libarchive/archive_write_set_format_mtree.c +@@ -887,6 +887,19 @@ write_entry(struct archive_write *a, struct mtree_entry *me) + + archive_string_empty(&mtree->ebuf); + str = (mtree->indent)? &mtree->ebuf : &mtree->buf; ++ ++ /* If the pathname does not have a path separator, we have to ++ * add "./" to the head of the pathename because mtree reader ++ * will suppose that it is v1(a.k.a classic) mtree format and ++ * change the directory unexpectedly and so it will make a wrong ++ * path. */ ++ if (strchr(me->pathname, '/') == NULL && ++ strcmp(me->pathname, ".") != 0) { ++ archive_strcat(str, "./"); ++ } ++ /* mtree reader does not accept an absolute path. */ ++ else if (me->pathname[0] == '/') ++ archive_strappend_char(str, '.'); + mtree_quote(str, me->pathname); + keys = get_keys(mtree, me); + if ((keys & F_NLINK) != 0 && +--- a/libarchive/test/test_read_format_mtree.c ++++ b/libarchive/test/test_read_format_mtree.c +@@ -37,7 +37,8 @@ test_read_format_mtree1(void) + * without relying on overflow. This assumes that long long + * is at least 64 bits. */ + static const long long max_int64 = ((((long long)1) << 62) - 1) + (((long long)1) << 62); +- time_t min_time, t; ++ time_t min_time; ++ volatile time_t t; + + extract_reference_file(reffile); +
\ No newline at end of file diff --git a/testing/util-linux/PKGBUILD b/testing/util-linux/PKGBUILD index a35d951e4..e9316da7f 100644 --- a/testing/util-linux/PKGBUILD +++ b/testing/util-linux/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 166533 2012-09-09 18:34:10Z dreisner $ +# $Id: PKGBUILD 166886 2012-09-20 22:22:35Z tomegun $ # Maintainer: Tom Gundersen <teg@jklm.no> # Contributor: judd <jvinet@zeroflux.org> pkgname=util-linux pkgver=2.22 -pkgrel=5 +pkgrel=6 pkgdesc="Miscellaneous system utilities for Linux" url="http://www.kernel.org/pub/linux/utils/util-linux/" arch=('i686' 'x86_64') @@ -20,25 +20,22 @@ source=(ftp://ftp.kernel.org/pub/linux/utils/${pkgname}/v2.22/${pkgname}-${pkgve uuidd.tmpfiles pam-login pam-common - pam-su) + pam-su + hwclock-systz.patch) backup=(etc/pam.d/chfn etc/pam.d/chsh etc/pam.d/login etc/pam.d/su etc/pam.d/su-l) install=util-linux.install -md5sums=('ba2d8cc12a937231c80a04f7f7149303' - '7f524538dcf57284a86f03a98e624f04' - 'a39554bfd65cccfd8254bb46922f4a67' - '4368b3f98abd8a32662e094c54e7f9b1' - 'a31374fef2cba0ca34dfc7078e2969e4' - 'fa85e5cce5d723275b14365ba71a8aad') build() { cd "${srcdir}/${pkgname}-${pkgver}" + patch -p1 -i ../hwclock-systz.patch + # unbreak --localstatedir - # TODO(dreisner): find out what sami hand in mind with these heuristics + # TODO(dreisner): find out what sami had in mind with these heuristics sed -i '71,75d' configure.ac ./autogen.sh @@ -91,3 +88,10 @@ package() { # TODO(dreisner): offer this upstream? install -Dm644 "$srcdir/uuidd.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/uuidd.conf" } +md5sums=('ba2d8cc12a937231c80a04f7f7149303' + '7f524538dcf57284a86f03a98e624f04' + 'a39554bfd65cccfd8254bb46922f4a67' + '4368b3f98abd8a32662e094c54e7f9b1' + 'a31374fef2cba0ca34dfc7078e2969e4' + 'fa85e5cce5d723275b14365ba71a8aad' + '19eaa197a0cfb046661dede2e991120b') diff --git a/testing/util-linux/hwclock-systz.patch b/testing/util-linux/hwclock-systz.patch new file mode 100644 index 000000000..79ed1a5f3 --- /dev/null +++ b/testing/util-linux/hwclock-systz.patch @@ -0,0 +1,96 @@ +From 46a8834c2eb9b0c37d92e30d1a262e41306cf36f Mon Sep 17 00:00:00 2001 +From: Tom Gundersen <teg@jklm.no> +Date: Wed, 19 Sep 2012 18:10:34 +0200 +Subject: [PATCH 1/2] hwclock: don't warp the systemtime if it is in UTC + +A sideeffect of 839be2ba6b44fa9dc927f081d547ebadec9de19c is that we now +warp the systemtime according to the timezone, on the first call of +--systz. This is not always the correct thing to do, and causes a +regression for us in Arch Linux. + +This is the correct thing to do if the RTC, and hence the systemtime is +set in localtime. However, if the systemtime is already in UTC we don't +want to touch it when we set the kernel timezone (which we still need to +do as e.g. FAT stores timestamps in localtime). + +An almost identical issue was also fixed in systemd commit +72edcff5db936e54cfc322d9392ec46e2428fd9b. + +Fixes: +Signed-off-by: Tom Gundersen <teg@jklm.no> +--- + sys-utils/hwclock.8 | 11 +++++++---- + sys-utils/hwclock.c | 17 +++++++++++++++-- + 2 files changed, 22 insertions(+), 6 deletions(-) + +diff --git a/sys-utils/hwclock.8 b/sys-utils/hwclock.8 +index 07d9fc0..5c599ad 100644 +--- a/sys-utils/hwclock.8 ++++ b/sys-utils/hwclock.8 +@@ -58,10 +58,12 @@ This is a good option to use in one of the system startup scripts. + Set the Hardware Clock to the current System Time. + .TP + .B \-\-systz +-Reset the System Time based on the current timezone. ++Set the kernel's timezone and reset the System Time based on the current timezone. + +-Also set the kernel's timezone value to the local timezone +-as indicated by the TZ environment variable and/or ++The system time is only reset on the first call after boot. ++ ++The local timezone is taken to be what is ++indicated by the TZ environment variable and/or + .IR /usr/share/zoneinfo , + as + .BR tzset (3) +@@ -74,7 +76,8 @@ This is an alternate option to + .B \-\-hctosys + that does not read the hardware clock, and may be used in system startup + scripts for recent 2.6 kernels where you know the System Time contains +-the Hardware Clock time. ++the Hardware Clock time. If the Hardware Clock is already in UTC, it is ++not reset. + .TP + .B \-\-adjust + Add or subtract time from the Hardware Clock to account for systematic +diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c +index 5a4c87e..351ce1f 100644 +--- a/sys-utils/hwclock.c ++++ b/sys-utils/hwclock.c +@@ -772,7 +772,6 @@ static int set_system_clock_timezone(const bool universal, const bool testing) + struct timeval tv; + struct tm *broken; + int minuteswest; +- int rc; + + gettimeofday(&tv, NULL); + if (debug) { +@@ -818,10 +817,24 @@ static int set_system_clock_timezone(const bool universal, const bool testing) + ("Not setting system clock because running in test mode.\n")); + retcode = 0; + } else { ++ const struct timezone tz_utc = { 0, 0 }; + const struct timezone tz = { minuteswest, 0 }; + const struct timeval *tv_null = NULL; ++ int rc = 0; ++ ++ /* The first call to settimeofday after boot will assume the systemtime ++ * is in localtime, and adjust it according to the given timezone to ++ * compensate. If the systemtime is in fact in UTC, then this is wrong ++ * so we first do a dummy call to make sure the time is not shifted. ++ */ ++ if (universal) ++ rc = settimeofday(tv_null, &tz_utc); ++ ++ /* Now we set the real timezone. Due to the above dummy call, this will ++ * only warp the systemtime if the RTC is not in UTC. */ ++ if (!rc) ++ rc = settimeofday(tv_null, &tz); + +- rc = settimeofday(tv_null, &tz); + if (rc) { + if (errno == EPERM) { + warnx(_ +-- +1.7.12.1 + |