From owner-svn-src-vendor@freebsd.org Sun Mar 26 16:49:22 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F139D1E6A7; Sun, 26 Mar 2017 16:49:22 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8EEB1D22; Sun, 26 Mar 2017 16:49:21 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2QGnKF9072089; Sun, 26 Mar 2017 16:49:20 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2QGnKXP072087; Sun, 26 Mar 2017 16:49:20 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201703261649.v2QGnKXP072087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Sun, 26 Mar 2017 16:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r315989 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Mar 2017 16:49:22 -0000 Author: jpaetzel Date: Sun Mar 26 16:49:20 2017 New Revision: 315989 URL: https://svnweb.freebsd.org/changeset/base/315989 Log: 7603 xuio_stat_wbuf_* should be declared (void) illumos/illumos-gate@99aa8b55058e512798eafbd71f72f916bdc10181 https://github.com/illumos/illumos-gate/commit/99aa8b55058e512798eafbd71f72f916bdc10181 https://www.illumos.org/issues/7603 The funcs are declared k&r style, where the args are not specified: void xuio_stat_wbuf_copied(); They should be declared to take no arguments: void xuio_stat_wbuf_copied(void); Need to change both .c and .h. Author: Prashanth Sreenivasa Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Reviewed by: Robert Mustacchi Approved by: Richard Lowe Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Sun Mar 26 16:46:39 2017 (r315988) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Sun Mar 26 16:49:20 2017 (r315989) @@ -1124,13 +1124,13 @@ xuio_stat_fini(void) } void -xuio_stat_wbuf_copied() +xuio_stat_wbuf_copied(void) { XUIOSTAT_BUMP(xuiostat_wbuf_copied); } void -xuio_stat_wbuf_nocopy() +xuio_stat_wbuf_nocopy(void) { XUIOSTAT_BUMP(xuiostat_wbuf_nocopy); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Sun Mar 26 16:46:39 2017 (r315988) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Sun Mar 26 16:49:20 2017 (r315989) @@ -753,8 +753,8 @@ int dmu_xuio_add(struct xuio *uio, struc int dmu_xuio_cnt(struct xuio *uio); struct arc_buf *dmu_xuio_arcbuf(struct xuio *uio, int i); void dmu_xuio_clear(struct xuio *uio, int i); -void xuio_stat_wbuf_copied(); -void xuio_stat_wbuf_nocopy(); +void xuio_stat_wbuf_copied(void); +void xuio_stat_wbuf_nocopy(void); extern boolean_t zfs_prefetch_disable; extern int zfs_max_recordsize; From owner-svn-src-vendor@freebsd.org Mon Mar 27 20:57:14 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30EC8D20376; Mon, 27 Mar 2017 20:57:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C97BBF95; Mon, 27 Mar 2017 20:57:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2RKvDEP083630; Mon, 27 Mar 2017 20:57:13 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2RKvC6w083622; Mon, 27 Mar 2017 20:57:12 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201703272057.v2RKvC6w083622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 27 Mar 2017 20:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r316058 - vendor/tzdata/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 20:57:14 -0000 Author: bapt Date: Mon Mar 27 20:57:12 2017 New Revision: 316058 URL: https://svnweb.freebsd.org/changeset/base/316058 Log: Import tzdata 2017b Modified: vendor/tzdata/dist/Makefile vendor/tzdata/dist/NEWS vendor/tzdata/dist/Theory vendor/tzdata/dist/africa vendor/tzdata/dist/antarctica vendor/tzdata/dist/asia vendor/tzdata/dist/australasia vendor/tzdata/dist/backward vendor/tzdata/dist/backzone vendor/tzdata/dist/europe vendor/tzdata/dist/iso3166.tab vendor/tzdata/dist/leap-seconds.list vendor/tzdata/dist/leapseconds vendor/tzdata/dist/northamerica vendor/tzdata/dist/southamerica vendor/tzdata/dist/version vendor/tzdata/dist/zone.tab vendor/tzdata/dist/zone1970.tab Modified: vendor/tzdata/dist/Makefile ============================================================================== --- vendor/tzdata/dist/Makefile Mon Mar 27 20:32:12 2017 (r316057) +++ vendor/tzdata/dist/Makefile Mon Mar 27 20:57:12 2017 (r316058) @@ -72,11 +72,11 @@ MANDIR= $(TOPDIR)/man LIBDIR= $(TOPDIR)/lib -# If you always want time values interpreted as "seconds since the epoch -# (not counting leap seconds)", use +# If you want only POSIX time, with time values interpreted as +# seconds since the epoch (not counting leap seconds), use # REDO= posix_only -# below. If you always want right time values interpreted as "seconds since -# the epoch" (counting leap seconds)", use +# below. If you want want only "right" time, with values interpreted +# as seconds since the epoch (counting leap seconds), use # REDO= right_only # below. If you want both sets of data available, with leap seconds not # counted normally, use @@ -85,7 +85,10 @@ LIBDIR= $(TOPDIR)/lib # normally, use # REDO= right_posix # below. POSIX mandates that leap seconds not be counted; for compatibility -# with it, use "posix_only" or "posix_right". +# with it, use "posix_only" or "posix_right". Use POSIX time on systems with +# leap smearing; this can work better than unsmeared "right" time with +# applications that are not leap second aware, and is closer to unsmeared +# "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error). REDO= posix_right @@ -165,7 +168,7 @@ GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-co -Wshadow -Wstrict-prototypes -Wsuggest-attribute=const \ -Wsuggest-attribute=format -Wsuggest-attribute=noreturn \ -Wsuggest-attribute=pure -Wtrampolines \ - -Wunused -Wwrite-strings \ + -Wundef -Wunused -Wwrite-strings \ -Wno-address -Wno-format-nonliteral -Wno-sign-compare \ -Wno-type-limits -Wno-unused-parameter # Modified: vendor/tzdata/dist/NEWS ============================================================================== --- vendor/tzdata/dist/NEWS Mon Mar 27 20:32:12 2017 (r316057) +++ vendor/tzdata/dist/NEWS Mon Mar 27 20:57:12 2017 (r316058) @@ -1,5 +1,129 @@ News for the tz database +Release 2017b - 2017-03-17 07:30:38 -0700 + + Briefly: Haiti has resumed DST. + + Changes to past and future time stamps + + Haiti resumed observance of DST in 2017. (Thanks to Steffen Thorsen.) + + Changes to past time stamps + + Liberia changed from -004430 to +00 on 1972-01-07, not 1972-05-01. + + Use "MMT" to abbreviate Liberia's time zone before 1972, as "-004430" + is one byte over the POSIX limit. (Problem reported by Derick Rethans.) + + +Release 2017a - 2017-02-28 00:05:36 -0800 + + Briefly: Southern Chile moves from -04/-03 to -03, and Mongolia + discontinues DST. + + Changes to future time stamps + + Mongolia no longer observes DST. (Thanks to Ganbold Tsagaankhuu.) + + Chile's Region of Magallanes moves from -04/-03 to -03 year-round. + Its clocks diverge from America/Santiago starting 2017-05-13 at + 23:00, hiving off a new zone America/Punta_Arenas. Although the + Chilean government says this change expires in May 2019, for now + assume it's permanent. (Thanks to Juan Correa and Deborah + Goldsmith.) This also affects Antarctica/Palmer. + + Changes to past time stamps + + Fix many entries for historical time stamps for Europe/Madrid + before 1979, to agree with tables compiled by Pere Planesas of the + National Astronomical Observatory of Spain. As a side effect, + this changes some time stamps for Africa/Ceuta before 1929, which + are probably guesswork anyway. (Thanks to Steve Allen and + Pierpaolo Bernardi for the heads-ups, and to Michael Deckers for + correcting the 1901 transition.) + + Ecuador observed DST from 1992-11-28 to 1993-02-05. + (Thanks to Alois Treindl.) + + Asia/Atyrau and Asia/Oral were at +03 (not +04) before 1930-06-21. + (Thanks to Stepan Golosunov.) + + Changes to past and future time zone abbreviations + + Switch to numeric time zone abbreviations for South America, as + part of the ongoing project of removing invented abbreviations. + This avoids the need to invent an abbreviation for the new Chilean + new zone. Similarly, switch from invented to numeric time zone + abbreviations for Afghanistan, American Samoa, the Azores, + Bangladesh, Bhutan, the British Indian Ocean Territory, Brunei, + Cape Verde, Chatham Is, Christmas I, Cocos (Keeling) Is, Cook Is, + Dubai, East Timor, Eucla, Fiji, French Polynesia, Greenland, + Indochina, Iran, Iraq, Kiribati, Lord Howe, Macquarie, Malaysia, + the Maldives, Marshall Is, Mauritius, Micronesia, Mongolia, + Myanmar, Nauru, Nepal, New Caledonia, Niue, Norfolk I, Palau, + Papua New Guinea, the Philippines, Pitcairn, Qatar, Réunion, St + Pierre & Miquelon, Samoa, Saudi Arabia, Seychelles, Singapore, + Solomon Is, Tokelau, Tuvalu, Wake, Vanuatu, Wallis & Futuna, and + Xinjiang; for 20-minute daylight saving time in Ghana before 1943; + for half-hour daylight saving time in Belize before 1944 and in + the Dominican Republic before 1975; and for Canary Islands before + 1946, for Guinea-Bissau before 1975, for Iceland before 1969, for + Indian Summer Time before 1942, for Indonesia before around 1964, + for Kenya before 1960, for Liberia before 1973, for Madeira before + 1967, for Namibia before 1943, for the Netherlands in 1937-9, for + Pakistan before 1971, for Western Sahara before 1977, and for + Zaporozhye in 1880-1924. + + For Alaska time from 1900 through 1967, instead of "CAT" use the + abbreviation "AST", the abbreviation commonly used at the time + (Atlantic Standard Time had not been standardized yet). Use "AWT" + and "APT" instead of the invented abbreviations "CAWT" and "CAPT". + + Use "CST" and "CDT" instead of invented abbreviations for Macau + before 1999 and Taiwan before 1938, and use "JST" instead of the + invented abbreviation "JCST" for Japan and Korea before 1938. + + Change to database entry category + + Move the Pacific/Johnston link from 'australasia' to 'backward', + since Johnston is now uninhabited. + + Changes to code + + zic no longer mishandles some transitions in January 2038 when it + attempts to work around Qt bug 53071. This fixes a bug affecting + Pacific/Tongatapu that was introduced in zic 2016e. localtime.c + now contains a workaround, useful when loading a file generated by + a buggy zic. (Problem and localtime.c fix reported by Bradley + White.) + + zdump -i now outputs non-hour numeric time zone abbreviations + without a colon, e.g., "+0530" rather than "+05:30". This agrees + with zic %z and with common practice, and simplifies auditing of + zdump output. + + zdump is now buildable again with -DUSE_LTZ=0. + (Problem reported by Joseph Myers.) + + zdump.c now always includes private.h, to avoid code duplication + with private.h. (Problem reported by Kees Dekker.) + + localtime.c no longer mishandles early or late timestamps + when TZ is set to a POSIX-style string that specifies DST. + (Problem reported by Kees Dekker.) + + date and strftime now cause %z to generate "-0000" instead of + "+0000" when the UT offset is zero and the time zone abbreviation + begins with "-". + + Changes to documentation and commentary + + The 'Theory' file now better documents choice of historical time + zone abbreviations. (Problems reported by Michael Deckers.) + + tz-link.htm now covers leap smearing, which is popular in clouds. + + Release 2016j - 2016-11-22 23:17:13 -0800 Briefly: Saratov, Russia moves from +03 to +04 on 2016-12-04. @@ -13,7 +137,7 @@ Release 2016j - 2016-11-22 23:17:13 -080 Changes to past time stamps The new zone Asia/Atyrau for Atyraū Region, Kazakhstan, is like - Asia/Aqtau except it switched from +04/+05 to +05/+06 in spring + Asia/Aqtau except it switched from +05/+06 to +04/+05 in spring 1999, not fall 1994. (Thanks to Stepan Golosunov.) Changes to past time zone abbreviations @@ -911,16 +1035,16 @@ Release 2014i - 2014-10-21 22:04:57 -070 been fixed. (Thanks to Christos Zoulas for reporting most of these problems and for suggesting fixes.) - If USG_COMPAT is defined and the requested time stamp is standard time, + If USG_COMPAT is defined and the requested timestamp is standard time, the tz library's localtime and mktime functions now set the extern - variable timezone to a value appropriate for that time stamp; and + variable timezone to a value appropriate for that timestamp; and similarly for ALTZONE, daylight saving time, and the altzone variable. This change is a companion to the tzname change in 2014h, and is designed to make timezone and altzone more compatible with tzname. The tz library's functions now set errno to EOVERFLOW if they fail because the result cannot be represented. ctime and ctime_r now - return NULL and set errno when a time stamp is out of range, rather + return NULL and set errno when a timestamp is out of range, rather than having undefined behavior. Some bugs associated with the new 2014g functions have been fixed. @@ -937,7 +1061,7 @@ Release 2014i - 2014-10-21 22:04:57 -070 Release 2014h - 2014-09-25 18:59:03 -0700 - Changes affecting past time stamps + Changes affecting past timestamps America/Jamaica's 1974 spring-forward transition was Jan. 6, not Apr. 28. @@ -945,8 +1069,8 @@ Release 2014h - 2014-09-25 18:59:03 -070 not 1920-01-06. The old entry was based on a misinterpretation of Shanks. Some more zones have been turned into links, when they differed - from existing zones only for older time stamps. As usual, - these changes affect UTC offsets in pre-1970 time stamps only. + from existing zones only for older timestamps. As usual, + these changes affect UTC offsets in pre-1970 timestamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Africa/Blantyre, Africa/Bujumbura, Africa/Gaborone, Africa/Harare, Africa/Kigali, Africa/Lubumbashi, @@ -958,7 +1082,7 @@ Release 2014h - 2014-09-25 18:59:03 -070 not merely on platforms defining TM_GMTOFF. The tz library's localtime and mktime functions now set tzname to a value - appropriate for the requested time stamp, and zdump now uses this + appropriate for the requested timestamp, and zdump now uses this on platforms not defining TM_ZONE, fixing a 2014g regression. (Thanks to Tim Parenti for reporting the problem.) @@ -998,13 +1122,13 @@ Release 2014h - 2014-09-25 18:59:03 -070 Release 2014g - 2014-08-28 12:31:23 -0700 - Changes affecting future time stamps + Changes affecting future timestamps Turks & Caicos is switching from US eastern time to UT -04 year-round, modeled as a switch on 2014-11-02 at 02:00. [As noted in 2014j, this switch was later delayed.] - Changes affecting past time stamps + Changes affecting past timestamps Time in Russia or the USSR before 1926 or so has been corrected by a few seconds in the following zones: Asia/Irkutsk, @@ -1014,7 +1138,7 @@ Release 2014g - 2014-08-28 12:31:23 -070 Vladimir Karpinsky.) The Portuguese decree of 1911-05-26 took effect on 1912-01-01. - This affects 1911 time stamps in Africa/Bissau, Africa/Luanda, + This affects 1911 timestamps in Africa/Bissau, Africa/Luanda, Atlantic/Azores, and Atlantic/Madeira. Also, Lisbon's pre-1912 GMT offset was -0:36:45 (rounded from -0:36:44.68), not -0:36:32. (Thanks to Stephen Colebourne for pointing to the decree.) @@ -1022,7 +1146,7 @@ Release 2014g - 2014-08-28 12:31:23 -070 Asia/Dhaka ended DST on 2009-12-31 at 24:00, not 23:59. A new file 'backzone' contains data which may appeal to - connoisseurs of old time stamps, although it is out of scope for + connoisseurs of old timestamps, although it is out of scope for the tz database, is often poorly sourced, and contains some data that is known to be incorrect. The new file is not recommended for ordinary use and its entries are not installed by default. @@ -1030,8 +1154,8 @@ Release 2014g - 2014-08-28 12:31:23 -070 Isle of Man entries.) Some more zones have been turned into links, when they differed - from existing zones only for older time stamps. As usual, - these changes affect UTC offsets in pre-1970 time stamps only. + from existing zones only for older timestamps. As usual, + these changes affect UTC offsets in pre-1970 timestamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Africa/Bangui, Africa/Brazzaville, Africa/Douala, Africa/Kinshasa, Africa/Libreville, Africa/Luanda, @@ -1082,7 +1206,7 @@ Release 2014g - 2014-08-28 12:31:23 -070 but does not cause other problems such as traps. If TM_GMTOFF is defined and UNINIT_TRAP is 0, mktime is now - more likely to guess right for ambiguous time stamps near + more likely to guess right for ambiguous timestamps near transitions where tm_isdst does not change. If HAVE_STRFTIME_L is defined to 1, the tz library now defines @@ -1155,7 +1279,7 @@ Release 2014g - 2014-08-28 12:31:23 -070 Release 2014f - 2014-08-05 17:42:36 -0700 - Changes affecting future time stamps + Changes affecting future timestamps Russia will subtract an hour from most of its time zones on 2014-10-26 at 02:00 local time. (Thanks to Alexander Krivenyshev.) @@ -1206,20 +1330,20 @@ Release 2014f - 2014-08-05 17:42:36 -070 These abbreviations are now used for time in Korea, Taiwan, and Sakhalin while controlled by Japan. - Changes affecting past time stamps + Changes affecting past timestamps China's five zones have been simplified to two, since the post-1970 differences in the other three seem to have been imaginary. The zones Asia/Harbin, Asia/Chongqing, and Asia/Kashgar have been removed; backwards-compatibility links still work, albeit with - different behaviors for time stamps before May 1980. Asia/Urumqi's + different behaviors for timestamps before May 1980. Asia/Urumqi's 1980 transition to UT +08 has been removed, so that it is now at +06 and not +08. (Thanks to Luther Ma and to Alois Treindl; Treindl sent helpful translations of two papers by Guo Qingsheng.) Some zones have been turned into links, when they differed from existing zones only for older UTC offsets where data entries were likely invented. - These changes affect UTC offsets in pre-1970 time stamps only. This is + These changes affect UTC offsets in pre-1970 timestamps only. This is similar to the change in release 2013e, except this time for western Africa. The affected zones are: Africa/Bamako, Africa/Banjul, Africa/Conakry, Africa/Dakar, Africa/Freetown, Africa/Lome, @@ -1364,7 +1488,7 @@ Release 2014f - 2014-08-05 17:42:36 -070 Release 2014e - 2014-06-12 21:53:52 -0700 - Changes affecting near-future time stamps + Changes affecting near-future timestamps Egypt's 2014 Ramadan-based transitions are June 26 and July 31 at 24:00. (Thanks to Imed Chihi.) Guess that from 2015 on Egypt will temporarily @@ -1376,7 +1500,7 @@ Release 2014e - 2014-06-12 21:53:52 -070 temporarily switch to standard time at 03:00 the last Saturday before Ramadan, and back to DST at 02:00 the first Saturday after Ramadan. - Changes affecting past time stamps + Changes affecting past timestamps The abbreviation "MSM" (Moscow Midsummer Time) is now used instead of "MSD" for Moscow's double daylight time in summer 1921. Also, a typo @@ -1394,7 +1518,7 @@ Release 2014d - 2014-05-27 21:34:40 -070 Changes affecting code - zic no longer generates files containing time stamps before the Big Bang. + zic no longer generates files containing timestamps before the Big Bang. This works around GNOME bug 730332 . (Thanks to Leonardo Chiquitto for reporting the bug, and to @@ -1407,7 +1531,7 @@ Release 2014d - 2014-05-27 21:34:40 -070 Release 2014c - 2014-05-13 07:44:13 -0700 - Changes affecting near-future time stamps + Changes affecting near-future timestamps Egypt observes DST starting 2014-05-15 at 24:00. (Thanks to Ahmad El-Dardiry and Gunther Vermier.) @@ -1421,7 +1545,7 @@ Release 2014c - 2014-05-13 07:44:13 -070 Changes affecting code zic now generates transitions for minimum time values, eliminating guesswork - when handling low-valued time stamps. (Thanks to Arthur David Olson.) + when handling low-valued timestamps. (Thanks to Arthur David Olson.) Port to Cygwin sans glibc. (Thanks to Arthur David Olson.) @@ -1432,7 +1556,7 @@ Release 2014c - 2014-05-13 07:44:13 -070 Release 2014b - 2014-03-24 21:28:50 -0700 - Changes affecting near-future time stamps + Changes affecting near-future timestamps Crimea switches to Moscow time on 2014-03-30 at 02:00 local time. (Thanks to Alexander Krivenyshev.) Move its zone.tab entry from UA to RU. @@ -1471,12 +1595,12 @@ Release 2014b - 2014-03-24 21:28:50 -070 Release 2014a - 2014-03-07 23:30:29 -0800 - Changes affecting near-future time stamps + Changes affecting near-future timestamps Turkey begins DST on 2014-03-31, not 03-30. (Thanks to Faruk Pasin for the heads-up, and to Tim Parenti for simplifying the update.) - Changes affecting past time stamps + Changes affecting past timestamps Fiji ended DST on 2014-01-19 at 02:00, not the previously-scheduled 03:00. (Thanks to Steffen Thorsen.) @@ -1540,13 +1664,13 @@ Release 2014a - 2014-03-07 23:30:29 -080 Release 2013i - 2013-12-17 07:25:23 -0800 - Changes affecting near-future time stamps: + Changes affecting near-future timestamps: Jordan switches back to standard time at 00:00 on December 20, 2013. The 2006-2011 transition schedule is planned to resume in 2014. (Thanks to Steffen Thorsen.) - Changes affecting past time stamps: + Changes affecting past timestamps: In 2004, Cuba began DST on March 28, not April 4. (Thanks to Steffen Thorsen.) @@ -1570,7 +1694,7 @@ Release 2013i - 2013-12-17 07:25:23 -080 Release 2013h - 2013-10-25 15:32:32 -0700 - Changes affecting current and future time stamps: + Changes affecting current and future timestamps: Libya has switched its UT offset back to +02 without DST, instead of +01 with DST. (Thanks to Even Scharning.) @@ -1578,7 +1702,7 @@ Release 2013h - 2013-10-25 15:32:32 -070 Western Sahara (Africa/El_Aaiun) uses Morocco's DST rules. (Thanks to Gwillim Law.) - Changes affecting future time stamps: + Changes affecting future timestamps: Acre and (we guess) western Amazonas will switch from UT -04 to -05 on 2013-11-10. This affects America/Rio_Branco and America/Eirunepe. @@ -1629,7 +1753,7 @@ Release 2013h - 2013-10-25 15:32:32 -070 Release 2013g - 2013-09-30 21:08:26 -0700 - Changes affecting current and near-future time stamps + Changes affecting current and near-future timestamps Morocco now observes DST from the last Sunday in March to the last Sunday in October, not April to September respectively. (Thanks @@ -1662,7 +1786,7 @@ Release 2013g - 2013-09-30 21:08:26 -070 Release 2013f - 2013-09-24 23:37:36 -0700 - Changes affecting near-future time stamps + Changes affecting near-future timestamps Tocantins will very likely not observe DST starting this spring. (Thanks to Steffen Thorsen.) @@ -1709,7 +1833,7 @@ Release 2013f - 2013-09-24 23:37:36 -070 Release 2013e - 2013-09-19 23:50:04 -0700 - Changes affecting near-future time stamps + Changes affecting near-future timestamps This year Fiji will start DST on October 27, not October 20. (Thanks to David Wheeler for the heads-up.) For now, guess that @@ -1727,13 +1851,13 @@ Release 2013e - 2013-09-19 23:50:04 -070 Use ART (UT -03, standard time), rather than WARST (also -03, but daylight saving time) for San Luis, Argentina since 2009. - Changes affecting Godthåb time stamps after 2037 if version mismatch + Changes affecting Godthåb timestamps after 2037 if version mismatch Allow POSIX-like TZ strings where the transition time's hour can range from -167 through 167, instead of the POSIX-required 0 through 24. E.g., TZ='FJT-12FJST,M10.3.1/146,M1.3.4/75' for the new Fiji rules. This is a more-compact way to represent - far-future time stamps for America/Godthab, America/Santiago, + far-future timestamps for America/Godthab, America/Santiago, Antarctica/Palmer, Asia/Gaza, Asia/Hebron, Asia/Jerusalem, Pacific/Easter, and Pacific/Fiji. Other zones are unaffected by this change. (Derived from a suggestion by Arthur David Olson.) @@ -1751,12 +1875,12 @@ Release 2013e - 2013-09-19 23:50:04 -070 embedded TZ-format string, and the tz file format version number has therefore been increased from 2 to 3 as a precaution. Version-2-based client code should continue to work as before for - all time stamps before 2038. Existing version-2-based client code + all timestamps before 2038. Existing version-2-based client code (tzcode, GNU/Linux, Solaris) has been tested on version-3-format - files, and typically works in practice even for time stamps after + files, and typically works in practice even for timestamps after 2037; the only known exception is America/Godthab. - Changes affecting time stamps before 1970 + Changes affecting timestamps before 1970 Pacific/Johnston is now a link to Pacific/Honolulu. This corrects some errors before 1947. @@ -1764,7 +1888,7 @@ Release 2013e - 2013-09-19 23:50:04 -070 Some zones have been turned into links, when they differ from existing zones only in older data entries that were likely invented or that differ only in LMT or transitions from LMT. These changes affect - only time stamps before 1943. The affected zones are: + only timestamps before 1943. The affected zones are: Africa/Juba, America/Anguilla, America/Aruba, America/Dominica, America/Grenada, America/Guadeloupe, America/Marigot, America/Montserrat, America/St_Barthelemy, America/St_Kitts, @@ -1774,11 +1898,11 @@ Release 2013e - 2013-09-19 23:50:04 -070 link is better for WWII-era times.) Change Kingston Mean Time from -5:07:12 to -5:07:11. This affects - America/Cayman, America/Jamaica and America/Grand_Turk time stamps + America/Cayman, America/Jamaica and America/Grand_Turk timestamps from 1890 to 1912. Change the UT offset of Bern Mean Time from 0:29:44 to 0:29:46. - This affects Europe/Zurich time stamps from 1853 to 1894. (Thanks + This affects Europe/Zurich timestamps from 1853 to 1894. (Thanks to Alois Treindl). Change the date of the circa-1850 Zurich transition from 1849-09-12 @@ -1796,7 +1920,7 @@ Release 2013e - 2013-09-19 23:50:04 -070 data can't be summarized using a TZ string, and uses a 402-year window rather than a 400-year window. For the current data, this affects only the Asia/Tehran file. It does not affect any of the - time stamps that this file represents, so zdump outputs the same + timestamps that this file represents, so zdump outputs the same information as before. (Thanks to Andrew Main (Zefram).) The 'date' command has a new '-r' option, which lets you specify @@ -1828,7 +1952,7 @@ Release 2013e - 2013-09-19 23:50:04 -070 Changes affecting the zdump utility zdump now outputs "UT" when referring to Universal Time, not "UTC". - "UTC" does not make sense for time stamps that predate the introduction + "UTC" does not make sense for timestamps that predate the introduction of UTC, whereas "UT", a more-generic term, does. (Thanks to Steve Allen for clarifying UT vs UTC.) @@ -1839,7 +1963,7 @@ Release 2013e - 2013-09-19 23:50:04 -070 Remove from zone.tab the names America/Montreal, America/Shiprock, and Antarctica/South_Pole, as they are equivalent to existing - same-country-code zones for post-1970 time stamps. The data entries for + same-country-code zones for post-1970 timestamps. The data entries for these names are unchanged, so the names continue to work as before. Changes affecting code internals @@ -1899,7 +2023,7 @@ Release 2013e - 2013-09-19 23:50:04 -070 There is a new section about the accuracy of the tz database, describing the many ways that errors can creep in, and - explaining why so many of the pre-1970 time stamps are wrong or + explaining why so many of the pre-1970 timestamps are wrong or misleading (thanks to Steve Allen, Lester Caine, and Garrett Wollman for discussions that contributed to this). @@ -1934,7 +2058,7 @@ Release 2013e - 2013-09-19 23:50:04 -070 Release 2013d - 2013-07-05 07:38:01 -0700 - Changes affecting future time stamps: + Changes affecting future timestamps: Morocco's midsummer transitions this year are July 7 and August 10, not July 9 and August 8. (Thanks to Andrew Paprocki.) @@ -1942,7 +2066,7 @@ Release 2013d - 2013-07-05 07:38:01 -070 Israel now falls back on the last Sunday of October. (Thanks to Ephraim Silverberg.) - Changes affecting past time stamps: + Changes affecting past timestamps: Specify Jerusalem's location more precisely; this changes the pre-1880 times by 2 s. @@ -1980,7 +2104,7 @@ Release 2013d - 2013-07-05 07:38:01 -070 Release 2013c - 2013-04-19 16:17:40 -0700 - Changes affecting current and future time stamps: + Changes affecting current and future timestamps: Palestine observed DST starting March 29, 2013. (Thanks to Steffen Thorsen.) From 2013 on, Gaza and Hebron both observe DST, @@ -1991,7 +2115,7 @@ Release 2013c - 2013-04-19 16:17:40 -070 by moving the end of DST to the 4th Sunday in March every year. (Thanks to Carlos Raúl Perasso.) - Changes affecting past time stamps: + Changes affecting past timestamps: Fix some historical data for Palestine to agree with that of timeanddate.com, as follows: @@ -2025,10 +2149,10 @@ Release 2013c - 2013-04-19 16:17:40 -070 Release 2013b - 2013-03-10 22:33:40 -0700 - Changes affecting current and future time stamps: + Changes affecting current and future timestamps: Haiti uses US daylight-saving rules this year, and presumably future years. - This changes time stamps starting today. (Thanks to Steffen Thorsen.) + This changes timestamps starting today. (Thanks to Steffen Thorsen.) Paraguay will end DST on March 24 this year. (Thanks to Steffen Thorsen.) For now, assume it's just this year. @@ -2052,7 +2176,7 @@ Release 2013a - 2013-02-27 09:20:35 -080 The zone offset at the end of version-2-format zone files is now allowed to be 24:00, as per POSIX.1-2008. (Thanks to Arthur David Olson.) - Changes affecting current and future time stamps: + Changes affecting current and future timestamps: Chile's 2013 rules, and we guess rules for 2014 and later, will be the same as 2012, namely Apr Sun>=23 03:00 UTC to Sep Sun>=2 04:00 UTC. @@ -2061,7 +2185,7 @@ Release 2013a - 2013-02-27 09:20:35 -080 New Zones Asia/Khandyga, Asia/Ust-Nera, Europe/Busingen. (Thanks to Tobias Conradi and Arthur David Olson.) - Many changes affect historical time stamps before 1940. + Many changes affect historical timestamps before 1940. These were deduced from: Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 . @@ -2193,7 +2317,7 @@ Release 2012e - 2012-08-02 20:44:55 -070 Release code2012c-data2012d - 2012-07-19 16:35:33 -0700 - Changes for Morocco's time stamps, which take effect in a couple of + Changes for Morocco's timestamps, which take effect in a couple of hours, along with infrastructure changes to accommodate how the tz code and data are released on IANA. @@ -2337,12 +2461,12 @@ Release 2011e - 2011-03-31 16:04:38 -040 Release 2011d - 2011-03-14 09:18:01 -0400 - changes that impact present-day time stamps in Cuba, Samoa, and Turkey + changes that impact present-day timestamps in Cuba, Samoa, and Turkey Release 2011c - 2011-03-07 09:30:09 -0500 - These do affect current time stamps in Chile and Annette Island, Canada. + These do affect current timestamps in Chile and Annette Island, Canada. Release 2011b - 2011-02-07 08:44:50 -0500 @@ -3807,7 +3931,7 @@ few (e.g., code2012c-data2012d) have tar numbers. Recent releases also come in an experimental format consisting of a single tarball tzdb-R.tar.lz with extra data. -Release time stamps are taken from the release's commit (for newer, +Release timestamps are taken from the release's commit (for newer, Git-based releases), from the newest file in the tarball (for older releases, where this info is available) or from the email announcing the release (if all else fails; these are marked with a time zone of Modified: vendor/tzdata/dist/Theory ============================================================================== --- vendor/tzdata/dist/Theory Mon Mar 27 20:32:12 2017 (r316057) +++ vendor/tzdata/dist/Theory Mon Mar 27 20:57:12 2017 (r316058) @@ -40,7 +40,7 @@ international standard for UNIX-like sys current edition of POSIX is: The Open Group Base Specifications Issue 7 - IEEE Std 1003.1, 2013 Edition + IEEE Std 1003.1-2008, 2016 Edition @@ -209,6 +209,19 @@ in decreasing order of importance: If there is no common English abbreviation, use numeric offsets like -05 and +0830 that are generated by zic's %z notation. + Use current abbreviations for older timestamps to avoid confusion. + For example, in 1910 a common English abbreviation for UT +01 + in central Europe was 'MEZ' (short for both "Middle European + Zone" and for "Mitteleuropäische Zeit" in German). Nowadays + 'CET' ("Central European Time") is more common in English, and + the database uses 'CET' even for circa-1910 timestamps as this + is less confusing for modern users and avoids the need for + determining when 'CET' supplanted 'MEZ' in common usage. + + Use a consistent style in a zone's history. For example, if a zone's + history tends to use numeric abbreviations and a particular + entry could go either way, use a numeric abbreviation. + [The remaining guidelines predate the introduction of %z. They are problematic as they mean tz data entries invent notation rather than record it. These guidelines are now @@ -226,7 +239,7 @@ in decreasing order of importance: for double summer time append 'DST'; etc. Otherwise, take the first three letters of an English place name identifying each zone and append 'T', 'ST', etc. - as before; e.g. 'VLAST' for VLAdivostok Summer Time. + as before; e.g. 'CHAST' for CHAtham Summer Time. Use UT (with time zone abbreviation '-00') for locations while uninhabited. The leading '-' is a flag that the time @@ -360,12 +373,12 @@ Errors in the tz database arise from man * Civil time was not based on atomic time before 1972, and we don't know the history of earth's rotation accurately enough to map SI seconds to historical solar time to more than about one-hour - accuracy. See: Morrison LV, Stephenson FR. - Historical values of the Earth's clock error Delta T and the - calculation of eclipses. J Hist Astron. 2004;35:327-36 - ; - Historical values of the Earth's clock error. J Hist Astron. 2005;36:339 - . + accuracy. See: Stephenson FR, Morrison LV, Hohenkerk CY. + Measurement of the Earth's rotation: 720 BC to AD 2015. + Proc Royal Soc A. 2016 Dec 7;472:20160404. + http://dx.doi.org/10.1098/rspa.2016.0404 + Also see: Espenak F. Uncertainty in Delta T (ΔT). + http://eclipse.gsfc.nasa.gov/SEhelp/uncertainty2004.html * The relationship between POSIX time (that is, UTC but ignoring leap seconds) and UTC is not agreed upon after 1972. Although the POSIX Modified: vendor/tzdata/dist/africa ============================================================================== --- vendor/tzdata/dist/africa Mon Mar 27 20:32:12 2017 (r316057) +++ vendor/tzdata/dist/africa Mon Mar 27 20:57:12 2017 (r316058) @@ -6,15 +6,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-20): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -31,39 +31,33 @@ # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # +# European-style abbreviations are commonly used along the Mediterranean. +# For sub-Saharan Africa abbreviations were less standardized. # Previous editions of this database used WAT, CAT, SAT, and EAT -# for +0:00 through +3:00, respectively, -# but Mark R V Murray reports that -# 'SAST' is the official abbreviation for +2:00 in the country of South Africa, -# 'CAT' is commonly used for +2:00 in countries north of South Africa, and -# 'WAT' is probably the best name for +1:00, as the common phrase for +# for UT +00 through +03, respectively, +# but in 1997 Mark R V Murray reported that +# 'SAST' is the official abbreviation for +02 in the country of South Africa, +# 'CAT' is commonly used for +02 in countries north of South Africa, and +# 'WAT' is probably the best name for +01, as the common phrase for # the area that includes Nigeria is "West Africa". -# He has heard of "Western Sahara Time" for +0:00 but can find no reference. # -# To make things confusing, 'WAT' seems to have been used for -1:00 long ago; -# I'd guess that this was because people needed _some_ name for -1:00, -# and at the time, far west Africa was the only major land area in -1:00. -# This usage is now obsolete, as the last use of -1:00 on the African -# mainland seems to have been 1976 in Western Sahara. -# -# To summarize, the following abbreviations seem to have some currency: -# -1:00 WAT West Africa Time (no longer used) -# 0:00 GMT Greenwich Mean Time -# 2:00 CAT Central Africa Time -# 2:00 SAST South Africa Standard Time -# and Murray suggests the following abbreviation: -# 1:00 WAT West Africa Time -# I realize that this leads to 'WAT' being used for both -1:00 and 1:00 -# for times before 1976, but this is the best I can think of -# until we get more information. +# To summarize, the following abbreviations seemed to have some currency: +# +00 GMT Greenwich Mean Time +# +02 CAT Central Africa Time +# +02 SAST South Africa Standard Time +# and Murray suggested the following abbreviation: +# +01 WAT West Africa Time +# Murray's suggestion seems to have caught on in news reports and the like. +# I vaguely recall 'WAT' also being used for -01 in the past but +# cannot now come up with solid citations. # # I invented the following abbreviations; corrections are welcome! -# 2:00 WAST West Africa Summer Time -# 2:30 BEAT British East Africa Time (no longer used) -# 2:45 BEAUT British East Africa Unified Time (no longer used) -# 3:00 CAST Central Africa Summer Time (no longer used) -# 3:00 SAST South Africa Summer Time (no longer used) -# 3:00 EAT East Africa Time +# +02 WAST West Africa Summer Time +# +03 CAST Central Africa Summer Time (no longer used) +# +03 SAST South Africa Summer Time (no longer used) +# +03 EAT East Africa Time +# 'EAT' also seems to have caught on; the others are rare but are paired +# with better-attested non-DST abbreviations. # Algeria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -121,17 +115,17 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 M # Cape Verde / Cabo Verde # -# Shanks gives 1907 for the transition to CVT. +# Shanks gives 1907 for the transition to +02. # Perhaps the 1911-05-26 Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Cape_Verde -1:34:04 - LMT 1907 # Praia - -2:00 - CVT 1942 Sep - -2:00 1:00 CVST 1945 Oct 15 - -2:00 - CVT 1975 Nov 25 2:00 - -1:00 - CVT + -2:00 - -02 1942 Sep + -2:00 1:00 -01 1945 Oct 15 + -2:00 - -02 1975 Nov 25 2:00 + -1:00 - -01 # Central African Republic # See Africa/Lagos. @@ -388,7 +382,7 @@ Rule Ghana 1920 1942 - Sep 1 0:00 0:20 Rule Ghana 1920 1942 - Dec 31 0:00 0 GMT # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Accra -0:00:52 - LMT 1918 - 0:00 Ghana %s + 0:00 Ghana GMT/+0020 # Guinea # See Africa/Abidjan. @@ -397,20 +391,20 @@ Zone Africa/Accra -0:00:52 - LMT 1918 # # Shanks gives 1911-05-26 for the transition to WAT, # evidently confusing the date of the Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # with the date that it took effect, namely 1912-01-01. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 - -1:00 - WAT 1975 + -1:00 - -01 1975 0:00 - GMT # Kenya # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul 3:00 - EAT 1930 - 2:30 - BEAT 1940 - 2:45 - BEAUT 1960 + 2:30 - +0230 1940 + 2:45 - +0245 1960 3:00 - EAT Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia Link Africa/Nairobi Africa/Asmara # Eritrea @@ -426,18 +420,25 @@ Link Africa/Nairobi Indian/Mayotte # See Africa/Johannesburg. # Liberia -# From Paul Eggert (2006-03-22): -# In 1972 Liberia was the last country to switch -# from a UTC offset that was not a multiple of 15 or 20 minutes. -# Howse reports that it was in honor of their president's birthday. -# Shank & Pottenger report the date as May 1, whereas Howse reports Jan; -# go with Shanks & Pottenger. -# For Liberia before 1972, Shanks & Pottenger report -0:44, whereas Howse and -# Whitman each report -0:44:30; go with the more precise figure. +# +# From Paul Eggert (2017-03-02): +# +# The Nautical Almanac for the Year 1970, p 264, is the source for -0:44:30. +# +# In 1972 Liberia was the last country to switch from a UTC offset +# that was not a multiple of 15 or 20 minutes. The 1972 change was on +# 1972-01-07, according to an entry dated 1972-01-04 on p 330 of: +# Presidential Papers: First year of the administration of +# President William R. Tolbert, Jr., July 23, 1971-July 31, 1972. +# Monrovia: Executive Mansion. +# +# Use the abbreviation "MMT" before 1972, as the more-accurate numeric +# abbreviation "-004430" would be one byte over the POSIX limit. +# # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Monrovia -0:43:08 - LMT 1882 -0:43:08 - MMT 1919 Mar # Monrovia Mean Time - -0:44:30 - LRT 1972 May # Liberia Time + -0:44:30 - MMT 1972 Jan 7 # approximately MMT 0:00 - GMT ############################################################################### @@ -596,7 +597,7 @@ Rule Mauritius 2008 only - Oct lastSun 2 Rule Mauritius 2009 only - Mar lastSun 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis - 4:00 Mauritius MU%sT # Mauritius Time + 4:00 Mauritius +04/+05 # Agalega Is, Rodriguez # no information; probably like Indian/Mauritius @@ -915,14 +916,14 @@ Zone Africa/Casablanca -0:30:20 - LMT 19 # since most of it was then controlled by Morocco. Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún - -1:00 - WAT 1976 Apr 14 + -1:00 - -01 1976 Apr 14 0:00 Morocco WE%sT # Mozambique # # Shanks gives 1903-03-01 for the transition to CAT. # Perhaps the 1911-05-26 Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -949,16 +950,19 @@ Link Africa/Maputo Africa/Lusaka # Zambi # the country are close to 40 minutes earlier in sunrise than the rest # of the country. # -# From Paul Eggert (2007-03-31): -# Apparently the Caprivi Strip informally observes Botswana time, but -# we have no details. In the meantime people there can use Africa/Gaborone. +# From Paul Eggert (2017-02-22): +# Although the Zambezi Region (formerly known as Caprivi) informally +# observes Botswana time, we have no details about historical practice. +# In the meantime people there can use Africa/Gaborone. +# See: Immanuel S. The Namibian. 2017-02-23. +# http://www.namibian.com.na/51480/read/Time-change-divides-lawmakers # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Namibia 1994 max - Sep Sun>=1 2:00 1:00 S Rule Namibia 1995 max - Apr Sun>=1 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 - 1:30 - SWAT 1903 Mar # SW Africa Time + 1:30 - +0130 1903 Mar 2:00 - SAST 1942 Sep 20 2:00 2:00 1:00 SAST 1943 Mar 21 2:00 2:00 - SAST 1990 Mar 21 # independence @@ -985,7 +989,7 @@ Link Africa/Lagos Africa/Porto-Novo # B # Réunion # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis - 4:00 - RET # Réunion Time + 4:00 - +04 # # Crozet Islands also observes Réunion time; see the 'antarctica' file. # @@ -1020,7 +1024,7 @@ Zone Indian/Reunion 3:41:52 - LMT 1911 J # Seychelles # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria - 4:00 - SCT # Seychelles Time + 4:00 - +04 # From Paul Eggert (2001-05-30): # Aldabra, Farquhar, and Desroches, originally dependencies of the # Seychelles, were transferred to the British Indian Ocean Territory Modified: vendor/tzdata/dist/antarctica ============================================================================== --- vendor/tzdata/dist/antarctica Mon Mar 27 20:32:12 2017 (r316057) +++ vendor/tzdata/dist/antarctica Mon Mar 27 20:57:12 2017 (r316058) @@ -110,7 +110,8 @@ Zone Antarctica/Mawson 0 - -00 1954 Feb # O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02 # Prat, -6230-05941 # Villa Las Estrellas (a town), around the Frei base, since 1984-04-09 -# These locations have always used Santiago time; use TZ='America/Santiago'. +# These locations employ Region of Magallanes time; use +# TZ='America/Punta_Arenas'. # China - year-round bases # Great Wall, King George Island, -6213-05858, since 1985-02-20 Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Mon Mar 27 20:32:12 2017 (r316057) +++ vendor/tzdata/dist/asia Mon Mar 27 20:57:12 2017 (r316058) @@ -6,15 +6,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2015-08-08): +# From Paul Eggert (2017-01-13): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -35,29 +35,24 @@ # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # -# I invented the abbreviations marked '*' in the following table; -# the rest are from earlier versions of this file, or from other sources. -# Corrections are welcome! +# The following alphabetic abbreviations appear in these tables: # std dst # LMT Local Mean Time # 2:00 EET EEST Eastern European Time # 2:00 IST IDT Israel -# 3:00 AST ADT Arabia* -# 3:30 IRST IRDT Iran* -# 4:00 GST Gulf* # 5:30 IST India -# 7:00 ICT Indochina, most times and locations* # 7:00 WIB west Indonesia (Waktu Indonesia Barat) # 8:00 WITA central Indonesia (Waktu Indonesia Tengah) # 8:00 CST China -# 8:00 IDT Indochina, 1943-45, 1947-55, 1960-75 (some locations)* -# 8:00 JWST Western Standard Time (Japan, 1896/1937)* -# 8:30 KST KDT Korea when at +0830* -# 9:00 JCST Central Standard Time (Japan, 1896/1937) +# 8:30 KST KDT Korea when at +0830 # 9:00 WIT east Indonesia (Waktu Indonesia Timur) # 9:00 JST JDT Japan *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Mar 27 20:57:45 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DADB4D203DD; Mon, 27 Mar 2017 20:57:45 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3273119; Mon, 27 Mar 2017 20:57:45 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2RKvinI083699; Mon, 27 Mar 2017 20:57:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2RKvisV083695; Mon, 27 Mar 2017 20:57:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201703272057.v2RKvisV083695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 27 Mar 2017 20:57:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r316059 - vendor/tzdata/tzdata2017b X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 20:57:46 -0000 Author: bapt Date: Mon Mar 27 20:57:44 2017 New Revision: 316059 URL: https://svnweb.freebsd.org/changeset/base/316059 Log: tag import of tzdata 2017b Added: vendor/tzdata/tzdata2017b/ - copied from r316057, vendor/tzdata/dist/ Replaced: vendor/tzdata/tzdata2017b/Makefile - copied unchanged from r316058, vendor/tzdata/dist/Makefile vendor/tzdata/tzdata2017b/NEWS - copied unchanged from r316058, vendor/tzdata/dist/NEWS vendor/tzdata/tzdata2017b/Theory - copied unchanged from r316058, vendor/tzdata/dist/Theory vendor/tzdata/tzdata2017b/africa - copied unchanged from r316058, vendor/tzdata/dist/africa vendor/tzdata/tzdata2017b/antarctica - copied unchanged from r316058, vendor/tzdata/dist/antarctica vendor/tzdata/tzdata2017b/asia - copied unchanged from r316058, vendor/tzdata/dist/asia vendor/tzdata/tzdata2017b/australasia - copied unchanged from r316058, vendor/tzdata/dist/australasia vendor/tzdata/tzdata2017b/backward - copied unchanged from r316058, vendor/tzdata/dist/backward vendor/tzdata/tzdata2017b/backzone - copied unchanged from r316058, vendor/tzdata/dist/backzone vendor/tzdata/tzdata2017b/europe - copied unchanged from r316058, vendor/tzdata/dist/europe vendor/tzdata/tzdata2017b/iso3166.tab - copied unchanged from r316058, vendor/tzdata/dist/iso3166.tab vendor/tzdata/tzdata2017b/leap-seconds.list - copied unchanged from r316058, vendor/tzdata/dist/leap-seconds.list vendor/tzdata/tzdata2017b/leapseconds - copied unchanged from r316058, vendor/tzdata/dist/leapseconds vendor/tzdata/tzdata2017b/northamerica - copied unchanged from r316058, vendor/tzdata/dist/northamerica vendor/tzdata/tzdata2017b/southamerica - copied unchanged from r316058, vendor/tzdata/dist/southamerica vendor/tzdata/tzdata2017b/version - copied unchanged from r316058, vendor/tzdata/dist/version vendor/tzdata/tzdata2017b/zone.tab - copied unchanged from r316058, vendor/tzdata/dist/zone.tab vendor/tzdata/tzdata2017b/zone1970.tab - copied unchanged from r316058, vendor/tzdata/dist/zone1970.tab Copied: vendor/tzdata/tzdata2017b/Makefile (from r316058, vendor/tzdata/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tzdata/tzdata2017b/Makefile Mon Mar 27 20:57:44 2017 (r316059, copy of r316058, vendor/tzdata/dist/Makefile) @@ -0,0 +1,797 @@ +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# Package name for the code distribution. +PACKAGE= tzcode + +# Version number for the distribution, overridden in the 'tarballs' rule below. +VERSION= unknown + +# Email address for bug reports. +BUGEMAIL= tz@iana.org + +# Change the line below for your time zone (after finding the zone you want in +# the time zone files, or adding it to a time zone file). +# Alternately, if you discover you've got the wrong time zone, you can just +# zic -l rightzone +# to correct things. +# Use the command +# make zonenames +# to get a list of the values you can use for LOCALTIME. + +LOCALTIME= GMT + +# If you want something other than Eastern United States time as a template +# for handling POSIX-style time zone environment variables, +# change the line below (after finding the zone you want in the +# time zone files, or adding it to a time zone file). +# (When a POSIX-style environment variable is handled, the rules in the +# template file are used to determine "spring forward" and "fall back" days and +# times; the environment variable itself specifies UT offsets of standard and +# summer time.) +# Alternately, if you discover you've got the wrong time zone, you can just +# zic -p rightzone +# to correct things. +# Use the command +# make zonenames +# to get a list of the values you can use for POSIXRULES. +# If you want POSIX compatibility, use "America/New_York". + +POSIXRULES= America/New_York + +# Also see TZDEFRULESTRING below, which takes effect only +# if the time zone files cannot be accessed. + +# Everything gets put in subdirectories of. . . + +TOPDIR= /usr/local + +# "Compiled" time zone information is placed in the "TZDIR" directory +# (and subdirectories). +# Use an absolute path name for TZDIR unless you're just testing the software. + +TZDIR_BASENAME= zoneinfo +TZDIR= $(TOPDIR)/etc/$(TZDIR_BASENAME) + +# Types to try, as an alternative to time_t. int64_t should be first. +TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t + +# The "tzselect", "zic", and "zdump" commands get installed in. . . + +ETCDIR= $(TOPDIR)/etc + +# If you "make INSTALL", the "date" command gets installed in. . . + +BINDIR= $(TOPDIR)/bin + +# Manual pages go in subdirectories of. . . + +MANDIR= $(TOPDIR)/man + +# Library functions are put in an archive in LIBDIR. + +LIBDIR= $(TOPDIR)/lib + +# If you want only POSIX time, with time values interpreted as +# seconds since the epoch (not counting leap seconds), use +# REDO= posix_only +# below. If you want want only "right" time, with values interpreted +# as seconds since the epoch (counting leap seconds), use +# REDO= right_only +# below. If you want both sets of data available, with leap seconds not +# counted normally, use +# REDO= posix_right +# below. If you want both sets of data available, with leap seconds counted +# normally, use +# REDO= right_posix +# below. POSIX mandates that leap seconds not be counted; for compatibility +# with it, use "posix_only" or "posix_right". Use POSIX time on systems with +# leap smearing; this can work better than unsmeared "right" time with +# applications that are not leap second aware, and is closer to unsmeared +# "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error). + +REDO= posix_right + +# If you want out-of-scope and often-wrong data from the file 'backzone', use +# PACKRATDATA= backzone +# To omit this data, use +# PACKRATDATA= + +PACKRATDATA= + +# Since "." may not be in PATH... + +YEARISTYPE= ./yearistype + +# Non-default libraries needed to link. +LDLIBS= + +# Add the following to the end of the "CFLAGS=" line as needed. +# -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c) +# -DHAVE_DECL_ASCTIME_R=0 if does not declare asctime_r +# -DHAVE_DIRECT_H if mkdir needs (MS-Windows) +# -DHAVE_DOS_FILE_NAMES if file names have drive specifiers etc. (MS-DOS) +# -DHAVE_GETTEXT=1 if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris) +# -DHAVE_INCOMPATIBLE_CTIME_R=1 if your system's time.h declares +# ctime_r and asctime_r incompatibly with the POSIX standard +# (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined). +# -DHAVE_INTTYPES_H=1 if you have a pre-C99 compiler with "inttypes.h" +# -DHAVE_LINK=0 if your system lacks a link function +# -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function +# -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz +# This defaults to 1 if a working localtime_rz seems to be available. +# localtime_rz can make zdump significantly faster, but is nonstandard. +# -DHAVE_POSIX_DECLS=0 if your system's include files do not declare +# functions like 'link' or variables like 'tzname' required by POSIX +# -DHAVE_STDINT_H=1 if you have a pre-C99 compiler with "stdint.h" +# -DHAVE_STRFTIME_L=1 if declares locale_t and strftime_l +# This defaults to 0 if _POSIX_VERSION < 200809, 1 otherwise. +# -DHAVE_STRDUP=0 if your system lacks the strdup function +# -DHAVE_SYMLINK=0 if your system lacks the symlink function +# -DHAVE_SYS_STAT_H=0 if your compiler lacks a "sys/stat.h" +# -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h" +# -DHAVE_TZSET=0 if your system lacks a tzset function +# -DHAVE_UNISTD_H=0 if your compiler lacks a "unistd.h" (Microsoft C++ 7?) +# -DEPOCH_LOCAL=1 if the 'time' function returns local time not UT +# -DEPOCH_OFFSET=N if the 'time' function returns a value N greater +# than what POSIX specifies, assuming local time is UT. +# For example, N is 252460800 on AmigaOS. +# -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU=1 +# if you do not want run time warnings about formats that may cause +# year 2000 grief +# -Dssize_t=long on ancient hosts that lack ssize_t +# -DTHREAD_SAFE=1 to make localtime.c thread-safe, as POSIX requires; +# not needed by the main-program tz code, which is single-threaded. +# Append other compiler flags as needed, e.g., -pthread on GNU/Linux. +# -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t +# -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz" +# -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory; +# the default is system-supplied, typically "/usr/lib/locale" +# -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified +# DST transitions if the time zone files cannot be accessed +# -DUNINIT_TRAP=1 if reading uninitialized storage can cause problems +# other than simply getting garbage data +# -DUSE_LTZ=0 to build zdump with the system time zone library +# Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below. +# -DZIC_MAX_ABBR_LEN_WO_WARN=3 +# (or some other number) to set the maximum time zone abbreviation length +# that zic will accept without a warning (the default is 6) +# $(GCC_DEBUG_FLAGS) if you are using recent GCC and want lots of checking +GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-common -fstrict-aliasing \ + -Wall -Wextra \ + -Wbad-function-cast -Wcast-align -Wdate-time \ + -Wdeclaration-after-statement \ + -Wdouble-promotion \ + -Wformat=2 -Winit-self -Wjump-misses-init \ + -Wlogical-op -Wmissing-prototypes -Wnested-externs \ + -Wold-style-definition -Woverlength-strings -Wpointer-arith \ + -Wshadow -Wstrict-prototypes -Wsuggest-attribute=const \ + -Wsuggest-attribute=format -Wsuggest-attribute=noreturn \ + -Wsuggest-attribute=pure -Wtrampolines \ + -Wundef -Wunused -Wwrite-strings \ + -Wno-address -Wno-format-nonliteral -Wno-sign-compare \ + -Wno-type-limits -Wno-unused-parameter +# +# If you want to use System V compatibility code, add +# -DUSG_COMPAT +# to the end of the "CFLAGS=" line. This arrange for "timezone" and "daylight" +# variables to be kept up-to-date by the time conversion functions. Neither +# "timezone" nor "daylight" is described in X3J11's work. +# +# If your system has a "GMT offset" field in its "struct tm"s +# (or if you decide to add such a field in your system's "time.h" file), +# add the name to a define such as +# -DTM_GMTOFF=tm_gmtoff +# to the end of the "CFLAGS=" line. If not defined, the code attempts to +# guess TM_GMTOFF from other macros; define NO_TM_GMTOFF to suppress this. +# Similarly, if your system has a "zone abbreviation" field, define +# -DTM_ZONE=tm_zone +# and define NO_TM_ZONE to suppress any guessing. These two fields are not +# required by POSIX, but are widely available on GNU/Linux and BSD systems. +# +# If you want functions that were inspired by early versions of X3J11's work, +# add +# -DSTD_INSPIRED +# to the end of the "CFLAGS=" line. This arranges for the functions +# "tzsetwall", "offtime", "timelocal", "timegm", "timeoff", +# "posix2time", and "time2posix" to be added to the time conversion library. +# "tzsetwall" is like "tzset" except that it arranges for local wall clock +# time (rather than the time specified in the TZ environment variable) +# to be used. +# "offtime" is like "gmtime" except that it accepts a second (long) argument +# that gives an offset to add to the time_t when converting it. +# "timelocal" is equivalent to "mktime". +# "timegm" is like "timelocal" except that it turns a struct tm into +# a time_t using UT (rather than local time as "timelocal" does). +# "timeoff" is like "timegm" except that it accepts a second (long) argument +# that gives an offset to use when converting to a time_t. +# "posix2time" and "time2posix" are described in an included manual page. +# X3J11's work does not describe any of these functions. +# Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0. +# These functions may well disappear in future releases of the time +# conversion package. +# +# If you don't want functions that were inspired by NetBSD, add +# -DNETBSD_INSPIRED=0 +# to the end of the "CFLAGS=" line. Otherwise, the functions +# "localtime_rz", "mktime_z", "tzalloc", and "tzfree" are added to the +# time library, and if STD_INSPIRED is also defined the functions +# "posix2time_z" and "time2posix_z" are added as well. +# The functions ending in "_z" (or "_rz") are like their unsuffixed +# (or suffixed-by-"_r") counterparts, except with an extra first +# argument of opaque type timezone_t that specifies the time zone. +# "tzalloc" allocates a timezone_t value, and "tzfree" frees it. +# +# If you want to allocate state structures in localtime, add +# -DALL_STATE +# to the end of the "CFLAGS=" line. Storage is obtained by calling malloc. +# +# If you want an "altzone" variable (a la System V Release 3.1), add +# -DALTZONE +# to the end of the "CFLAGS=" line. +# This variable is not described in X3J11's work. +# +# NIST-PCTS:151-2, Version 1.4, (1993-12-03) is a test suite put +# out by the National Institute of Standards and Technology +# which claims to test C and Posix conformance. If you want to pass PCTS, add +# -DPCTS +# to the end of the "CFLAGS=" line. +# +# If you want strict compliance with XPG4 as of 1994-04-09, add +# -DXPG4_1994_04_09 +# to the end of the "CFLAGS=" line. This causes "strftime" to always return +# 53 as a week number (rather than 52 or 53) for those days in January that +# before the first Monday in January when a "%V" format is used and January 1 +# falls on a Friday, Saturday, or Sunday. + +CFLAGS= + +# Linker flags. Default to $(LFLAGS) for backwards compatibility +# to release 2012h and earlier. + +LDFLAGS= $(LFLAGS) + +# For leap seconds, this Makefile uses LEAPSECONDS='-L leapseconds' in +# submake command lines. The default is no leap seconds. + +LEAPSECONDS= + +# The zic command and its arguments. + +zic= ./zic +ZIC= $(zic) $(ZFLAGS) + +ZFLAGS= + +# How to use zic to install tz binary files. + +ZIC_INSTALL= $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS) + +# The name of a Posix-compliant 'awk' on your system. +AWK= awk + +# The full path name of a Posix-compliant shell, preferably one that supports +# the Korn shell's 'select' statement as an extension. +# These days, Bash is the most popular. +# It should be OK to set this to /bin/sh, on platforms where /bin/sh +# lacks 'select' or doesn't completely conform to Posix, but /bin/bash +# is typically nicer if it works. +KSHELL= /bin/bash + +# The path where SGML DTDs are kept and the catalog file(s) to use when +# validating. The default should work on both Debian and Red Hat. +SGML_TOPDIR= /usr +SGML_DTDDIR= $(SGML_TOPDIR)/share/xml/w3c-sgml-lib/schema/dtd +SGML_SEARCH_PATH= $(SGML_DTDDIR)/REC-html401-19991224 +SGML_CATALOG_FILES= \ + $(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat:$(SGML_TOPDIR)/share/sgml/html/4.01/HTML4.cat + +# The name, arguments and environment of a program to validate your web pages. +# See for a validator, and +# for a validation library. +VALIDATE = nsgmls +VALIDATE_FLAGS = -s -B -wall -wno-unused-param +VALIDATE_ENV = \ + SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \ + SGML_SEARCH_PATH=$(SGML_SEARCH_PATH) \ + SP_CHARSET_FIXED=YES \ + SP_ENCODING=UTF-8 + +# This expensive test requires USE_LTZ. +# To suppress it, define this macro to be empty. +CHECK_TIME_T_ALTERNATIVES = check_time_t_alternatives + +# SAFE_CHAR is a regular expression that matches a safe character. +# Some parts of this distribution are limited to safe characters; +# others can use any UTF-8 character. +# For now, the safe characters are a safe subset of ASCII. +# The caller must set the shell variable 'sharp' to the character '#', +# since Makefile macros cannot contain '#'. +# TAB_CHAR is a single tab character, in single quotes. +TAB_CHAR= ' ' +SAFE_CHARSET1= $(TAB_CHAR)' !\"'$$sharp'$$%&'\''()*+,./0123456789:;<=>?@' +SAFE_CHARSET2= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_`' +SAFE_CHARSET3= 'abcdefghijklmnopqrstuvwxyz{|}~' +SAFE_CHARSET= $(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3) +SAFE_CHAR= '[]'$(SAFE_CHARSET)'-]' + +# OK_CHAR matches any character allowed in the distributed files. +# This is the same as SAFE_CHAR, except that multibyte letters are +# also allowed so that commentary can contain people's names and quote +# non-English sources. For non-letters the sources are limited to +# ASCII renderings for the convenience of maintainers whose text editors +# mishandle UTF-8 by default (e.g., XEmacs 21.4.22). +OK_CHAR= '[][:alpha:]'$(SAFE_CHARSET)'-]' + +# SAFE_LINE matches a line of safe characters. +# SAFE_SHARP_LINE is similar, except any OK character can follow '#'; +# this is so that comments can contain non-ASCII characters. +# OK_LINE matches a line of OK characters. +SAFE_LINE= '^'$(SAFE_CHAR)'*$$' +SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(OK_CHAR)'*)?$$' +OK_LINE= '^'$(OK_CHAR)'*$$' + +# Flags to give 'tar' when making a distribution. +# Try to use flags appropriate for GNU tar. +GNUTARFLAGS= --numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name +TARFLAGS= `if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \ + then echo $(GNUTARFLAGS); \ + else :; \ + fi` + +# Flags to give 'gzip' when making a distribution. +GZIPFLAGS= -9n + +############################################################################### + +#MAKE= make + +cc= cc +CC= $(cc) -DTZDIR=\"$(TZDIR)\" + +AR= ar + +# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib. +RANLIB= : + +TZCOBJS= zic.o +TZDOBJS= zdump.o localtime.o asctime.o +DATEOBJS= date.o localtime.o strftime.o asctime.o +LIBSRCS= localtime.c asctime.c difftime.c +LIBOBJS= localtime.o asctime.o difftime.o +HEADERS= tzfile.h private.h +NONLIBSRCS= zic.c zdump.c +NEWUCBSRCS= date.c strftime.c +SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \ + tzselect.ksh workman.sh +MANS= newctime.3 newstrftime.3 newtzset.3 time2posix.3 \ + tzfile.5 tzselect.8 zic.8 zdump.8 +MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.txt \ + time2posix.3.txt \ + tzfile.5.txt tzselect.8.txt zic.8.txt zdump.8.txt \ + date.1.txt +COMMON= CONTRIBUTING LICENSE Makefile NEWS README Theory version +WEB_PAGES= tz-art.htm tz-how-to.html tz-link.htm +DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES) +PRIMARY_YDATA= africa antarctica asia australasia \ + europe northamerica southamerica +YDATA= $(PRIMARY_YDATA) pacificnew etcetera backward +NDATA= systemv factory +TDATA= $(YDATA) $(NDATA) +ZONETABLES= zone1970.tab zone.tab +TABDATA= iso3166.tab leapseconds $(ZONETABLES) +LEAP_DEPS= leapseconds.awk leap-seconds.list +DATA= $(YDATA) $(NDATA) backzone $(TABDATA) \ + leap-seconds.list yearistype.sh +AWK_SCRIPTS= checklinks.awk checktab.awk leapseconds.awk +MISC= $(AWK_SCRIPTS) zoneinfo2tdf.pl +TZS_YEAR= 2050 +TZS= to$(TZS_YEAR).tzs +TZS_NEW= to$(TZS_YEAR)new.tzs +TZS_DEPS= $(PRIMARY_YDATA) asctime.c localtime.c \ + private.h tzfile.h zdump.c zic.c +ENCHILADA= $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) + +# Consult these files when deciding whether to rebuild the 'version' file. +# This list is not the same as the output of 'git ls-files', since +# .gitignore is not distributed. +VERSION_DEPS= \ + CONTRIBUTING LICENSE Makefile NEWS README Theory \ + africa antarctica asctime.c asia australasia \ + backward backzone \ + checklinks.awk checktab.awk \ + date.1 date.c difftime.c \ + etcetera europe factory iso3166.tab \ + leap-seconds.list leapseconds.awk localtime.c \ + newctime.3 newstrftime.3 newtzset.3 northamerica \ + pacificnew private.h \ + southamerica strftime.c systemv \ + time2posix.3 tz-art.htm tz-how-to.html tz-link.htm \ + tzfile.5 tzfile.h tzselect.8 tzselect.ksh \ + workman.sh yearistype.sh \ + zdump.8 zdump.c zic.8 zic.c \ + zone.tab zone1970.tab zoneinfo2tdf.pl + +# And for the benefit of csh users on systems that assume the user +# shell should be used to handle commands in Makefiles. . . + +SHELL= /bin/sh + +all: tzselect yearistype zic zdump libtz.a $(TABDATA) + +ALL: all date $(ENCHILADA) + +install: all $(DATA) $(REDO) $(MANS) + mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \ + $(DESTDIR)$(LIBDIR) \ + $(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \ + $(DESTDIR)$(MANDIR)/man8 + $(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES) + cp -f iso3166.tab $(ZONETABLES) $(DESTDIR)$(TZDIR)/. + cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/. + cp libtz.a $(DESTDIR)$(LIBDIR)/. + $(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a + cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/. + cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/. + cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/. + +INSTALL: ALL install date.1 + mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 + cp date $(DESTDIR)$(BINDIR)/. + cp -f date.1 $(DESTDIR)$(MANDIR)/man1/. + +version: $(VERSION_DEPS) + { (type git) >/dev/null 2>&1 && \ + V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ + --abbrev=7 --dirty` || \ + V=$(VERSION); } && \ + printf '%s\n' "$$V" >$@.out + mv $@.out $@ + +version.h: version + VERSION=`cat version` && printf '%s\n' \ + 'static char const PKGVERSION[]="($(PACKAGE)) ";' \ + "static char const TZVERSION[]=\"$$VERSION\";" \ + 'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";' \ + >$@.out + mv $@.out $@ + +zdump: $(TZDOBJS) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS) + +zic: $(TZCOBJS) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS) + +yearistype: yearistype.sh + cp yearistype.sh yearistype + chmod +x yearistype + +leapseconds: $(LEAP_DEPS) + $(AWK) -f leapseconds.awk leap-seconds.list >$@.out + mv $@.out $@ + +# Arguments to pass to submakes of install_data. +# They can be overridden by later submake arguments. +INSTALLARGS = \ + DESTDIR=$(DESTDIR) \ + LEAPSECONDS='$(LEAPSECONDS)' \ + PACKRATDATA='$(PACKRATDATA)' \ + TZDIR=$(TZDIR) \ + YEARISTYPE=$(YEARISTYPE) \ + ZIC='$(ZIC)' + +# 'make install_data' installs one set of tz binary files. +# It can be tailored by setting LEAPSECONDS, PACKRATDATA, etc. +install_data: zic leapseconds yearistype $(PACKRATDATA) $(TDATA) + $(ZIC_INSTALL) $(TDATA) + $(AWK) '/^Rule/' $(TDATA) | $(ZIC_INSTALL) - $(PACKRATDATA) + +posix_only: + $(MAKE) $(INSTALLARGS) LEAPSECONDS= install_data + +right_only: + $(MAKE) $(INSTALLARGS) LEAPSECONDS='-L leapseconds' \ + install_data + +# In earlier versions of this makefile, the other two directories were +# subdirectories of $(TZDIR). However, this led to configuration errors. +# For example, with posix_right under the earlier scheme, +# TZ='right/Australia/Adelaide' got you localtime with leap seconds, +# but gmtime without leap seconds, which led to problems with applications +# like sendmail that subtract gmtime from localtime. +# Therefore, the other two directories are now siblings of $(TZDIR). +# You must replace all of $(TZDIR) to switch from not using leap seconds +# to using them, or vice versa. +right_posix: right_only + rm -fr $(DESTDIR)$(TZDIR)-leaps + ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-leaps || \ + $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only + $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only + +posix_right: posix_only + rm -fr $(DESTDIR)$(TZDIR)-posix + ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-posix || \ + $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only + $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only + +# This obsolescent rule is present for backwards compatibility with +# tz releases 2014g through 2015g. It should go away eventually. +posix_packrat: + $(MAKE) $(INSTALLARGS) PACKRATDATA=backzone posix_only + +zones: $(REDO) + +$(TZS_NEW): $(TDATA) zdump zic + mkdir -p tzs.dir + $(zic) -d tzs.dir $(TDATA) + $(AWK) '/^Link/{print $$1 "\t" $$2 "\t" $$3}' \ + $(TDATA) | LC_ALL=C sort >$@.out + wd=`pwd` && \ + zones=`$(AWK) -v wd="$$wd" \ + '/^Zone/{print wd "/tzs.dir/" $$2}' $(TDATA) \ + | LC_ALL=C sort` && \ + ./zdump -i -c $(TZS_YEAR) $$zones >>$@.out + sed 's,^TZ=".*tzs\.dir/,TZ=",' $@.out >$@.sed.out + rm -fr tzs.dir $@.out + mv $@.sed.out $@ + +# If $(TZS) does not already exist (e.g., old-format tarballs), create it. +# If it exists but 'make check_tzs' fails, a maintainer should inspect the +# failed output and fix the inconsistency, perhaps by running 'make force_tzs'. +$(TZS): + $(MAKE) force_tzs + +force_tzs: $(TZS_NEW) + cp $(TZS_NEW) $(TZS) + +libtz.a: $(LIBOBJS) + rm -f $@ + $(AR) -rc $@ $(LIBOBJS) + $(RANLIB) $@ + +date: $(DATEOBJS) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS) + +tzselect: tzselect.ksh version + VERSION=`cat version` && sed \ + -e 's|#!/bin/bash|#!$(KSHELL)|g' \ + -e 's|AWK=[^}]*|AWK=$(AWK)|g' \ + -e 's|\(PKGVERSION\)=.*|\1='\''($(PACKAGE)) '\''|' \ + -e 's|\(REPORT_BUGS_TO\)=.*|\1=$(BUGEMAIL)|' \ + -e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \ + -e 's|\(TZVERSION\)=.*|\1='"$$VERSION"'|' \ + <$@.ksh >$@.out + chmod +x $@.out + mv $@.out $@ + +check: check_character_set check_white_space check_links check_sorted \ + check_tables check_tzs check_web + +check_character_set: $(ENCHILADA) + LC_ALL=en_US.utf8 && export LC_ALL && \ + sharp='#' && \ + ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \ + $(MISC) $(SOURCES) $(WEB_PAGES) \ + CONTRIBUTING LICENSE Makefile README version && \ + ! grep -Env $(SAFE_SHARP_LINE) $(TDATA) backzone \ + leapseconds yearistype.sh zone.tab && \ + ! grep -Env $(OK_LINE) $(ENCHILADA) + +check_white_space: $(ENCHILADA) + patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \ + ! grep -En "$$pat" $(ENCHILADA) + ! grep -n '[[:space:]]$$' $(ENCHILADA) + +CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } + +check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab + $(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu + $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu + $(AWK) '/^[^#]/ {print $$1}' iso3166.tab | LC_ALL=C sort -cu + $(AWK) '/^[^#]/ {print $$1}' zone.tab | LC_ALL=C sort -c + $(AWK) '/^[^#]/ {print substr($$0, 1, 2)}' zone1970.tab | \ + LC_ALL=C sort -c + $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \ + LC_ALL=C sort -cu + +check_links: checklinks.awk $(TDATA) + $(AWK) -f checklinks.awk $(TDATA) + +check_tables: checktab.awk $(PRIMARY_YDATA) $(ZONETABLES) + for tab in $(ZONETABLES); do \ + $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \ + || exit; \ + done + +check_tzs: $(TZS) $(TZS_NEW) + diff -u $(TZS) $(TZS_NEW) + +check_web: $(WEB_PAGES) + $(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) $(WEB_PAGES) + +clean_misc: + rm -f core *.o *.out \ + date tzselect version.h zdump zic yearistype libtz.a +clean: clean_misc + rm -fr *.dir tzdb-*/ $(TZS_NEW) + +maintainer-clean: clean + @echo 'This command is intended for maintainers to use; it' + @echo 'deletes files that may need special tools to rebuild.' + rm -f leapseconds version $(MANTXTS) $(TZS) *.asc *.tar.* + +names: + @echo $(ENCHILADA) + +public: check check_public $(CHECK_TIME_T_ALTERNATIVES) \ + tarballs signatures + +date.1.txt: date.1 +newctime.3.txt: newctime.3 +newstrftime.3.txt: newstrftime.3 +newtzset.3.txt: newtzset.3 +time2posix.3.txt: time2posix.3 +tzfile.5.txt: tzfile.5 +tzselect.8.txt: tzselect.8 +zdump.8.txt: zdump.8 +zic.8.txt: zic.8 + +$(MANTXTS): workman.sh + LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out + mv $@.out $@ + +# Set the time stamps to those of the git repository, if available, +# and if the files have not changed since then. +# This uses GNU 'touch' syntax 'touch -d@N FILE', +# where N is the number of seconds since 1970. +# If git or GNU 'touch' is absent, don't bother to sync with git timestamps. +# Also, set the timestamp of each prebuilt file like 'leapseconds' +# to be the maximum of the files it depends on. +set-timestamps.out: $(ENCHILADA) + rm -f $@ + if (type git) >/dev/null 2>&1 && \ + files=`git ls-files $(ENCHILADA)` && \ + touch -md @1 test.out; then \ + rm -f test.out && \ + for file in $$files; do \ + if git diff --quiet $$file; then \ + time=`git log -1 --format='tformat:%ct' $$file` && \ + touch -cmd @$$time $$file; \ + else \ + echo >&2 "$$file: warning: does not match repository"; \ + fi || exit; \ + done; \ + fi + touch -cmr `ls -t $(LEAP_DEPS) | sed 1q` leapseconds + for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \ + touch -cmr `ls -t $$file workman.sh | sed 1q` $$file.txt || \ + exit; \ + done + touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS) + touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version + touch $@ + +# The zics below ensure that each data file can stand on its own. +# We also do an all-files run to catch links to links. + +check_public: + $(MAKE) maintainer-clean + $(MAKE) "CFLAGS=$(GCC_DEBUG_FLAGS)" ALL + mkdir -p public.dir + for i in $(TDATA) ; do \ + $(zic) -v -d public.dir $$i 2>&1 || exit; \ + done + $(zic) -v -d public.dir $(TDATA) + rm -fr public.dir + +# Check that the code works under various alternative +# implementations of time_t. +check_time_t_alternatives: + if diff -q Makefile Makefile 2>/dev/null; then \ + quiet_option='-q'; \ + else \ + quiet_option=''; \ + fi && \ + wd=`pwd` && \ + zones=`$(AWK) '/^[^#]/ { print $$3 }' time_t.dir/int64_t.out && \ + time_t.dir/$$type/etc/zdump -V -t $$range $$zones \ + >time_t.dir/$$type.out && \ + diff -u time_t.dir/int64_t.out time_t.dir/$$type.out \ + || exit; \ + done + rm -fr time_t.dir + +tarballs traditional_tarballs signatures traditional_signatures: version + VERSION=`cat version` && \ + $(MAKE) VERSION="$$VERSION" $@_version + +tarballs_version: traditional_tarballs_version tzdb-$(VERSION).tar.lz +traditional_tarballs_version: \ + tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz +signatures_version: traditional_signatures_version tzdb-$(VERSION).tar.lz.asc +traditional_signatures_version: \ + tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \ + +tzcode$(VERSION).tar.gz: set-timestamps.out + LC_ALL=C && export LC_ALL && \ + tar $(TARFLAGS) -cf - \ + $(COMMON) $(DOCS) $(SOURCES) | \ + gzip $(GZIPFLAGS) >$@.out + mv $@.out $@ + +tzdata$(VERSION).tar.gz: set-timestamps.out + LC_ALL=C && export LC_ALL && \ + tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \ + gzip $(GZIPFLAGS) >$@.out + mv $@.out $@ + +tzdb-$(VERSION).tar.lz: set-timestamps.out + rm -fr tzdb-$(VERSION) + mkdir tzdb-$(VERSION) + ln $(ENCHILADA) tzdb-$(VERSION) + touch -cmr `ls -t tzdb-$(VERSION)/* | sed 1q` tzdb-$(VERSION) + LC_ALL=C && export LC_ALL && \ + tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@.out + mv $@.out $@ + +tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz + gpg --armor --detach-sign $? + +tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz + gpg --armor --detach-sign $? + +tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz + gpg --armor --detach-sign $? + +typecheck: + $(MAKE) clean + for i in "long long" unsigned; \ + do \ + $(MAKE) CFLAGS="-DTYPECHECK -D__time_t_defined -D_TIME_T \"-Dtime_t=$$i\"" ; \ + ./zdump -v Europe/Rome ; \ + $(MAKE) clean ; \ + done + +zonenames: $(TDATA) + @$(AWK) '/^Zone/ { print $$2 } /^Link/ { print $$3 }' $(TDATA) + +asctime.o: private.h tzfile.h +date.o: private.h +difftime.o: private.h +localtime.o: private.h tzfile.h +strftime.o: private.h tzfile.h +zdump.o: version.h +zic.o: private.h tzfile.h version.h + +.KEEP_STATE: + +.PHONY: ALL INSTALL all +.PHONY: check check_character_set check_links +.PHONY: check_public check_sorted check_tables +.PHONY: check_time_t_alternatives check_tzs check_web check_white_space +.PHONY: clean clean_misc force_tzs +.PHONY: install install_data maintainer-clean names +.PHONY: posix_only posix_packrat posix_right +.PHONY: public right_only right_posix signatures signatures_version +.PHONY: tarballs tarballs_version typecheck +.PHONY: zonenames zones Copied: vendor/tzdata/tzdata2017b/NEWS (from r316058, vendor/tzdata/dist/NEWS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tzdata/tzdata2017b/NEWS Mon Mar 27 20:57:44 2017 (r316059, copy of r316058, vendor/tzdata/dist/NEWS) @@ -0,0 +1,3947 @@ +News for the tz database + +Release 2017b - 2017-03-17 07:30:38 -0700 + + Briefly: Haiti has resumed DST. + + Changes to past and future time stamps + + Haiti resumed observance of DST in 2017. (Thanks to Steffen Thorsen.) + + Changes to past time stamps + + Liberia changed from -004430 to +00 on 1972-01-07, not 1972-05-01. + + Use "MMT" to abbreviate Liberia's time zone before 1972, as "-004430" + is one byte over the POSIX limit. (Problem reported by Derick Rethans.) + + +Release 2017a - 2017-02-28 00:05:36 -0800 + + Briefly: Southern Chile moves from -04/-03 to -03, and Mongolia + discontinues DST. + + Changes to future time stamps + + Mongolia no longer observes DST. (Thanks to Ganbold Tsagaankhuu.) + + Chile's Region of Magallanes moves from -04/-03 to -03 year-round. + Its clocks diverge from America/Santiago starting 2017-05-13 at + 23:00, hiving off a new zone America/Punta_Arenas. Although the + Chilean government says this change expires in May 2019, for now + assume it's permanent. (Thanks to Juan Correa and Deborah + Goldsmith.) This also affects Antarctica/Palmer. + + Changes to past time stamps + + Fix many entries for historical time stamps for Europe/Madrid + before 1979, to agree with tables compiled by Pere Planesas of the + National Astronomical Observatory of Spain. As a side effect, + this changes some time stamps for Africa/Ceuta before 1929, which + are probably guesswork anyway. (Thanks to Steve Allen and + Pierpaolo Bernardi for the heads-ups, and to Michael Deckers for + correcting the 1901 transition.) + + Ecuador observed DST from 1992-11-28 to 1993-02-05. + (Thanks to Alois Treindl.) + + Asia/Atyrau and Asia/Oral were at +03 (not +04) before 1930-06-21. + (Thanks to Stepan Golosunov.) + + Changes to past and future time zone abbreviations + + Switch to numeric time zone abbreviations for South America, as + part of the ongoing project of removing invented abbreviations. + This avoids the need to invent an abbreviation for the new Chilean + new zone. Similarly, switch from invented to numeric time zone + abbreviations for Afghanistan, American Samoa, the Azores, + Bangladesh, Bhutan, the British Indian Ocean Territory, Brunei, + Cape Verde, Chatham Is, Christmas I, Cocos (Keeling) Is, Cook Is, + Dubai, East Timor, Eucla, Fiji, French Polynesia, Greenland, + Indochina, Iran, Iraq, Kiribati, Lord Howe, Macquarie, Malaysia, + the Maldives, Marshall Is, Mauritius, Micronesia, Mongolia, + Myanmar, Nauru, Nepal, New Caledonia, Niue, Norfolk I, Palau, + Papua New Guinea, the Philippines, Pitcairn, Qatar, Réunion, St + Pierre & Miquelon, Samoa, Saudi Arabia, Seychelles, Singapore, + Solomon Is, Tokelau, Tuvalu, Wake, Vanuatu, Wallis & Futuna, and + Xinjiang; for 20-minute daylight saving time in Ghana before 1943; + for half-hour daylight saving time in Belize before 1944 and in + the Dominican Republic before 1975; and for Canary Islands before + 1946, for Guinea-Bissau before 1975, for Iceland before 1969, for + Indian Summer Time before 1942, for Indonesia before around 1964, + for Kenya before 1960, for Liberia before 1973, for Madeira before + 1967, for Namibia before 1943, for the Netherlands in 1937-9, for + Pakistan before 1971, for Western Sahara before 1977, and for + Zaporozhye in 1880-1924. + + For Alaska time from 1900 through 1967, instead of "CAT" use the + abbreviation "AST", the abbreviation commonly used at the time + (Atlantic Standard Time had not been standardized yet). Use "AWT" + and "APT" instead of the invented abbreviations "CAWT" and "CAPT". + + Use "CST" and "CDT" instead of invented abbreviations for Macau + before 1999 and Taiwan before 1938, and use "JST" instead of the + invented abbreviation "JCST" for Japan and Korea before 1938. + + Change to database entry category + + Move the Pacific/Johnston link from 'australasia' to 'backward', + since Johnston is now uninhabited. + + Changes to code + + zic no longer mishandles some transitions in January 2038 when it + attempts to work around Qt bug 53071. This fixes a bug affecting + Pacific/Tongatapu that was introduced in zic 2016e. localtime.c + now contains a workaround, useful when loading a file generated by + a buggy zic. (Problem and localtime.c fix reported by Bradley + White.) + + zdump -i now outputs non-hour numeric time zone abbreviations + without a colon, e.g., "+0530" rather than "+05:30". This agrees + with zic %z and with common practice, and simplifies auditing of + zdump output. + + zdump is now buildable again with -DUSE_LTZ=0. + (Problem reported by Joseph Myers.) + + zdump.c now always includes private.h, to avoid code duplication + with private.h. (Problem reported by Kees Dekker.) + + localtime.c no longer mishandles early or late timestamps + when TZ is set to a POSIX-style string that specifies DST. + (Problem reported by Kees Dekker.) + + date and strftime now cause %z to generate "-0000" instead of + "+0000" when the UT offset is zero and the time zone abbreviation + begins with "-". + + Changes to documentation and commentary + + The 'Theory' file now better documents choice of historical time + zone abbreviations. (Problems reported by Michael Deckers.) + + tz-link.htm now covers leap smearing, which is popular in clouds. + + +Release 2016j - 2016-11-22 23:17:13 -0800 + + Briefly: Saratov, Russia moves from +03 to +04 on 2016-12-04. + + Changes to future time stamps + + Saratov, Russia switches from +03 to +04 on 2016-12-04 at 02:00. + This hives off a new zone Europe/Saratov from Europe/Volgograd. + (Thanks to Yuri Konotopov and Stepan Golosunov.) + + Changes to past time stamps + + The new zone Asia/Atyrau for Atyraū Region, Kazakhstan, is like + Asia/Aqtau except it switched from +05/+06 to +04/+05 in spring + 1999, not fall 1994. (Thanks to Stepan Golosunov.) + + Changes to past time zone abbreviations + + Asia/Gaza and Asia/Hebron now use "EEST", not "EET", to denote + summer time before 1948. The old use of "EET" was a typo. + + Changes to code + + zic no longer mishandles file systems that lack hard links, fixing + bugs introduced in 2016g. (Problems reported by Tom Lane.) + Also, when the destination already contains symbolic links, zic + should now work better on systems where the 'link' system call + does not follow symbolic links. + + Changes to documentation and commentary + + tz-link.htm now documents the relationship between release version + numbers and development-repository commit tags. (Suggested by + Paul Koning.) + + The 'Theory' file now documents UT. + + iso3166.tab now accents "Curaçao", and commentary now mentions + the names "Cabo Verde" and "Czechia". (Thanks to Jiří Boháč.) + + +Release 2016i - 2016-11-01 23:19:52 -0700 + + Briefly: Cyprus split into two time zones on 2016-10-30, and Tonga + reintroduces DST on 2016-11-06. + + Changes to future time stamps + + Pacific/Tongatapu begins DST on 2016-11-06 at 02:00, ending on + 2017-01-15 at 03:00. Assume future observances in Tonga will be + from the first Sunday in November through the third Sunday in + January, like Fiji. (Thanks to Pulu ʻAnau.) Switch to numeric + time zone abbreviations for this zone. + + Changes to past and future time stamps + + Northern Cyprus is now +03 year round, causing a split in Cyprus + time zones starting 2016-10-30 at 04:00. This creates a zone + Asia/Famagusta. (Thanks to Even Scharning and Matt Johnson.) + + Antarctica/Casey switched from +08 to +11 on 2016-10-22. + (Thanks to Steffen Thorsen.) + + Changes to past time stamps + + Several corrections were made for pre-1975 time stamps in Italy. + These affect Europe/Malta, Europe/Rome, Europe/San_Marino, and + Europe/Vatican. + + First, the 1893-11-01 00:00 transition in Italy used the new UT + offset (+01), not the old (+00:49:56). (Thanks to Michael *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Tue Mar 28 09:58:56 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 549A2D1DF27; Tue, 28 Mar 2017 09:58:56 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1142D39; Tue, 28 Mar 2017 09:58:55 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2S9wtmR005348; Tue, 28 Mar 2017 09:58:55 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2S9wsWA005343; Tue, 28 Mar 2017 09:58:54 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201703280958.v2S9wsWA005343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Tue, 28 Mar 2017 09:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r316083 - vendor/libarchive/dist/libarchive X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 09:58:56 -0000 Author: mm Date: Tue Mar 28 09:58:54 2017 New Revision: 316083 URL: https://svnweb.freebsd.org/changeset/base/316083 Log: Update vendor/libarchive to git 13b0ed2ba504389c363cd302041fe10afa1837ad Vendor changes (FreeBSD-related): - constify variables in several places - unify platform ACL code in a single source file - fix unused variable if compiling on FreeBSD without NFSv4 ACL support Added: vendor/libarchive/dist/libarchive/archive_disk_acl_darwin.c - copied, changed from r316082, vendor/libarchive/dist/libarchive/archive_read_disk_acl_darwin.c vendor/libarchive/dist/libarchive/archive_disk_acl_freebsd.c - copied, changed from r316082, vendor/libarchive/dist/libarchive/archive_read_disk_acl_freebsd.c vendor/libarchive/dist/libarchive/archive_disk_acl_linux.c - copied, changed from r316082, vendor/libarchive/dist/libarchive/archive_read_disk_acl_linux.c vendor/libarchive/dist/libarchive/archive_disk_acl_sunos.c - copied, changed from r316082, vendor/libarchive/dist/libarchive/archive_read_disk_acl_sunos.c Deleted: vendor/libarchive/dist/libarchive/archive_acl_maps.h vendor/libarchive/dist/libarchive/archive_acl_maps_darwin.c vendor/libarchive/dist/libarchive/archive_acl_maps_freebsd.c vendor/libarchive/dist/libarchive/archive_acl_maps_linux.c vendor/libarchive/dist/libarchive/archive_acl_maps_sunos.c vendor/libarchive/dist/libarchive/archive_read_disk_acl_darwin.c vendor/libarchive/dist/libarchive/archive_read_disk_acl_freebsd.c vendor/libarchive/dist/libarchive/archive_read_disk_acl_linux.c vendor/libarchive/dist/libarchive/archive_read_disk_acl_sunos.c vendor/libarchive/dist/libarchive/archive_write_disk_acl_darwin.c vendor/libarchive/dist/libarchive/archive_write_disk_acl_freebsd.c vendor/libarchive/dist/libarchive/archive_write_disk_acl_linux.c vendor/libarchive/dist/libarchive/archive_write_disk_acl_sunos.c Modified: vendor/libarchive/dist/libarchive/CMakeLists.txt vendor/libarchive/dist/libarchive/archive_entry.c vendor/libarchive/dist/libarchive/archive_getdate.c vendor/libarchive/dist/libarchive/archive_pack_dev.c vendor/libarchive/dist/libarchive/archive_read_support_format_cab.c vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c vendor/libarchive/dist/libarchive/archive_string_sprintf.c vendor/libarchive/dist/libarchive/archive_util.c vendor/libarchive/dist/libarchive/archive_write_add_filter.c vendor/libarchive/dist/libarchive/archive_write_add_filter_by_name.c vendor/libarchive/dist/libarchive/archive_write_add_filter_lz4.c vendor/libarchive/dist/libarchive/archive_write_add_filter_program.c vendor/libarchive/dist/libarchive/archive_write_set_format.c vendor/libarchive/dist/libarchive/archive_write_set_format_by_name.c vendor/libarchive/dist/libarchive/archive_write_set_format_filter_by_ext.c vendor/libarchive/dist/libarchive/archive_write_set_format_warc.c Modified: vendor/libarchive/dist/libarchive/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/libarchive/CMakeLists.txt Tue Mar 28 09:02:42 2017 (r316082) +++ vendor/libarchive/dist/libarchive/CMakeLists.txt Tue Mar 28 09:58:54 2017 (r316083) @@ -214,25 +214,13 @@ IF(WIN32 AND NOT CYGWIN) ENDIF(WIN32 AND NOT CYGWIN) IF(ARCHIVE_ACL_DARWIN) - LIST(APPEND libarchive_SOURCES archive_acl_maps.h) - LIST(APPEND libarchive_SOURCES archive_acl_maps_darwin.c) - LIST(APPEND libarchive_SOURCES archive_read_disk_acl_darwin.c) - LIST(APPEND libarchive_SOURCES archive_write_disk_acl_darwin.c) + LIST(APPEND libarchive_SOURCES archive_disk_acl_darwin.c) ELSEIF(ARCHIVE_ACL_FREEBSD) - LIST(APPEND libarchive_SOURCES archive_acl_maps.h) - LIST(APPEND libarchive_SOURCES archive_acl_maps_freebsd.c) - LIST(APPEND libarchive_SOURCES archive_read_disk_acl_freebsd.c) - LIST(APPEND libarchive_SOURCES archive_write_disk_acl_freebsd.c) + LIST(APPEND libarchive_SOURCES archive_disk_acl_freebsd.c) ELSEIF(ARCHIVE_ACL_LIBACL) - LIST(APPEND libarchive_SOURCES archive_acl_maps.h) - LIST(APPEND libarchive_SOURCES archive_acl_maps_linux.c) - LIST(APPEND libarchive_SOURCES archive_read_disk_acl_linux.c) - LIST(APPEND libarchive_SOURCES archive_write_disk_acl_linux.c) + LIST(APPEND libarchive_SOURCES archive_disk_acl_linux.c) ELSEIF(ARCHIVE_ACL_SUNOS) - LIST(APPEND libarchive_SOURCES archive_acl_maps.h) - LIST(APPEND libarchive_SOURCES archive_acl_maps_sunos.c) - LIST(APPEND libarchive_SOURCES archive_read_disk_acl_sunos.c) - LIST(APPEND libarchive_SOURCES archive_write_disk_acl_sunos.c) + LIST(APPEND libarchive_SOURCES archive_disk_acl_sunos.c) ENDIF() # Libarchive is a shared library Copied and modified: vendor/libarchive/dist/libarchive/archive_disk_acl_darwin.c (from r316082, vendor/libarchive/dist/libarchive/archive_read_disk_acl_darwin.c) ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk_acl_darwin.c Tue Mar 28 09:02:42 2017 (r316082, copy source) +++ vendor/libarchive/dist/libarchive/archive_disk_acl_darwin.c Tue Mar 28 09:58:54 2017 (r316083) @@ -45,15 +45,49 @@ #include "archive_entry.h" #include "archive_private.h" #include "archive_read_disk_private.h" -#include "archive_acl_maps.h" +#include "archive_write_disk_private.h" +typedef struct { + const int a_perm; /* Libarchive permission or flag */ + const int p_perm; /* Platform permission or flag */ +} acl_perm_map_t; + +static const acl_perm_map_t acl_nfs4_perm_map[] = { + {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_FILE, ACL_ADD_FILE}, + {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, + {ARCHIVE_ENTRY_ACL_DELETE, ACL_DELETE}, + {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACL_APPEND_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACL_ADD_SUBDIRECTORY}, + {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACL_DELETE_CHILD}, + {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACL_READ_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACL_WRITE_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACL_READ_EXTATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACL_WRITE_EXTATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_READ_ACL, ACL_READ_SECURITY}, + {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_SECURITY}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_CHANGE_OWNER}, +#if HAVE_DECL_ACL_SYNCHRONIZE + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} +#endif +}; + +static const int acl_nfs4_perm_map_size = + (int)(sizeof(acl_nfs4_perm_map)/sizeof(acl_nfs4_perm_map[0])); + +static const acl_perm_map_t acl_nfs4_flag_map[] = { + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED}, + {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_LIMIT_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_ONLY_INHERIT} +}; + +static const int acl_nfs4_flag_map_size = + (int)(sizeof(acl_nfs4_flag_map)/sizeof(acl_nfs4_flag_map[0])); -/* - * Darwin-specific ACL functions and helper functions - * - * Exported functions: - * none - */ static int translate_guid(struct archive *a, acl_entry_t acl_entry, int *ae_id, int *ae_tag, const char **ae_name) { @@ -84,9 +118,6 @@ static int translate_guid(struct archive return (r); } -/* - * Add trivial NFSv4 ACL entries from mode - */ static void add_trivial_nfs4_acl(struct archive_entry *entry) { @@ -284,6 +315,178 @@ translate_acl(struct archive_read_disk * return (ARCHIVE_OK); } +static int +set_acl(struct archive *a, int fd, const char *name, + struct archive_acl *abstract_acl, + int ae_requested_type, const char *tname) +{ + acl_t acl; + acl_entry_t acl_entry; + acl_permset_t acl_permset; + acl_flagset_t acl_flagset; + int ret; + int ae_type, ae_permset, ae_tag, ae_id; + uuid_t ae_uuid; + uid_t ae_uid; + gid_t ae_gid; + const char *ae_name; + int entries; + int i; + + ret = ARCHIVE_OK; + entries = archive_acl_reset(abstract_acl, ae_requested_type); + if (entries == 0) + return (ARCHIVE_OK); + + if (ae_requested_type != ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + errno = ENOENT; + archive_set_error(a, errno, "Unsupported ACL type"); + return (ARCHIVE_FAILED); + } + + acl = acl_init(entries); + if (acl == (acl_t)NULL) { + archive_set_error(a, errno, + "Failed to initialize ACL working storage"); + return (ARCHIVE_FAILED); + } + + while (archive_acl_next(a, abstract_acl, ae_requested_type, &ae_type, + &ae_permset, &ae_tag, &ae_id, &ae_name) == ARCHIVE_OK) { + /* + * Mac OS doesn't support NFSv4 ACLs for + * owner@, group@ and everyone@. + * We skip any of these ACLs found. + */ + if (ae_tag == ARCHIVE_ENTRY_ACL_USER_OBJ || + ae_tag == ARCHIVE_ENTRY_ACL_GROUP_OBJ || + ae_tag == ARCHIVE_ENTRY_ACL_EVERYONE) + continue; + + if (acl_create_entry(&acl, &acl_entry) != 0) { + archive_set_error(a, errno, + "Failed to create a new ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + + switch (ae_type) { + case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: + acl_set_tag_type(acl_entry, ACL_EXTENDED_ALLOW); + break; + case ARCHIVE_ENTRY_ACL_TYPE_DENY: + acl_set_tag_type(acl_entry, ACL_EXTENDED_DENY); + break; + default: + /* We don't support any other types on MacOS */ + continue; + } + + switch (ae_tag) { + case ARCHIVE_ENTRY_ACL_USER: + ae_uid = archive_write_disk_uid(a, ae_name, ae_id); + if (mbr_uid_to_uuid(ae_uid, ae_uuid) != 0) + continue; + if (acl_set_qualifier(acl_entry, &ae_uuid) != 0) + continue; + break; + case ARCHIVE_ENTRY_ACL_GROUP: + ae_gid = archive_write_disk_gid(a, ae_name, ae_id); + if (mbr_gid_to_uuid(ae_gid, ae_uuid) != 0) + continue; + if (acl_set_qualifier(acl_entry, &ae_uuid) != 0) + continue; + break; + default: + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unsupported ACL tag"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + + if (acl_get_permset(acl_entry, &acl_permset) != 0) { + archive_set_error(a, errno, + "Failed to get ACL permission set"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (acl_clear_perms(acl_permset) != 0) { + archive_set_error(a, errno, + "Failed to clear ACL permissions"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + + for (i = 0; i < acl_nfs4_perm_map_size; ++i) { + if (ae_permset & acl_nfs4_perm_map[i].a_perm) { + if (acl_add_perm(acl_permset, + acl_nfs4_perm_map[i].p_perm) != 0) { + archive_set_error(a, errno, + "Failed to add ACL permission"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + } + } + + /* + * acl_get_flagset_np() fails with non-NFSv4 ACLs + */ + if (acl_get_flagset_np(acl_entry, &acl_flagset) != 0) { + archive_set_error(a, errno, + "Failed to get flagset from an NFSv4 ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (acl_clear_flags_np(acl_flagset) != 0) { + archive_set_error(a, errno, + "Failed to clear flags from an NFSv4 ACL flagset"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + + for (i = 0; i < acl_nfs4_flag_map_size; ++i) { + if (ae_permset & acl_nfs4_flag_map[i].a_perm) { + if (acl_add_flag_np(acl_flagset, + acl_nfs4_flag_map[i].p_perm) != 0) { + archive_set_error(a, errno, + "Failed to add flag to " + "NFSv4 ACL flagset"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + } + } + } + + if (fd >= 0) { + if (acl_set_fd_np(fd, acl, ACL_TYPE_EXTENDED) == 0) + ret = ARCHIVE_OK; + else { + if (errno == EOPNOTSUPP) { + /* Filesystem doesn't support ACLs */ + ret = ARCHIVE_OK; + } else { + archive_set_error(a, errno, + "Failed to set acl on fd: %s", tname); + ret = ARCHIVE_WARN; + } + } + } else if (acl_set_link_np(name, ACL_TYPE_EXTENDED, acl) != 0) { + if (errno == EOPNOTSUPP) { + /* Filesystem doesn't support ACLs */ + ret = ARCHIVE_OK; + } else { + archive_set_error(a, errno, "Failed to set acl: %s", + tname); + ret = ARCHIVE_WARN; + } + } +exit_free: + acl_free(acl); + return (ret); +} + int archive_read_disk_entry_setup_acls(struct archive_read_disk *a, struct archive_entry *entry, int *fd) @@ -335,3 +538,19 @@ archive_read_disk_entry_setup_acls(struc } return (ARCHIVE_OK); } + +int +archive_write_disk_set_acls(struct archive *a, int fd, const char *name, + struct archive_acl *abstract_acl, __LA_MODE_T mode) +{ + int ret = ARCHIVE_OK; + + (void)mode; /* UNUSED */ + + if ((archive_acl_types(abstract_acl) & + ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) { + ret = set_acl(a, fd, name, abstract_acl, + ARCHIVE_ENTRY_ACL_TYPE_NFS4, "nfs4"); + } + return (ret); +} Copied and modified: vendor/libarchive/dist/libarchive/archive_disk_acl_freebsd.c (from r316082, vendor/libarchive/dist/libarchive/archive_read_disk_acl_freebsd.c) ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk_acl_freebsd.c Tue Mar 28 09:02:42 2017 (r316082, copy source) +++ vendor/libarchive/dist/libarchive/archive_disk_acl_freebsd.c Tue Mar 28 09:58:54 2017 (r316083) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2003-2009 Tim Kientzle * Copyright (c) 2010-2012 Michihiro NAKAJIMA - * Copyright (c) 2016-2017 Martin Matuska + * Copyright (c) 2017 Martin Matuska * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -44,11 +44,60 @@ #include "archive_entry.h" #include "archive_private.h" #include "archive_read_disk_private.h" -#include "archive_acl_maps.h" +#include "archive_write_disk_private.h" + +typedef struct { + const int a_perm; /* Libarchive permission or flag */ + const int p_perm; /* Platform permission or flag */ +} acl_perm_map_t; + +static const acl_perm_map_t acl_posix_perm_map[] = { + {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, + {ARCHIVE_ENTRY_ACL_WRITE, ACL_WRITE}, + {ARCHIVE_ENTRY_ACL_READ, ACL_READ}, +}; + +static const int acl_posix_perm_map_size = + (int)(sizeof(acl_posix_perm_map)/sizeof(acl_posix_perm_map[0])); + +#if ARCHIVE_ACL_FREEBSD_NFS4 +static const acl_perm_map_t acl_nfs4_perm_map[] = { + {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, + {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_FILE, ACL_ADD_FILE}, + {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACL_APPEND_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACL_ADD_SUBDIRECTORY}, + {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACL_READ_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACL_WRITE_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACL_DELETE_CHILD}, + {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACL_READ_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACL_WRITE_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_DELETE, ACL_DELETE}, + {ARCHIVE_ENTRY_ACL_READ_ACL, ACL_READ_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_WRITE_OWNER}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} +}; + +static const int acl_nfs4_perm_map_size = + (int)(sizeof(acl_nfs4_perm_map)/sizeof(acl_nfs4_perm_map[0])); + +static const acl_perm_map_t acl_nfs4_flag_map[] = { + {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY}, + {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS}, + {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED} +}; + +static const int acl_nfs4_flag_map_size = + (int)(sizeof(acl_nfs4_flag_map)/sizeof(acl_nfs4_flag_map[0])); +#endif /* ARCHIVE_ACL_FREEBSD_NFS4 */ -/* - * Translate FreeBSD ACLs into libarchive internal structure - */ static int translate_acl(struct archive_read_disk *a, struct archive_entry *entry, acl_t acl, int default_entry_acl_type) @@ -56,11 +105,11 @@ translate_acl(struct archive_read_disk * #if ARCHIVE_ACL_FREEBSD_NFS4 int brand; acl_flagset_t acl_flagset; + acl_entry_type_t acl_type; #endif acl_tag_t acl_tag; acl_entry_t acl_entry; acl_permset_t acl_permset; - acl_entry_type_t acl_type; int i, entry_acl_type, perm_map_size; const acl_perm_map_t *perm_map; int r, s, ae_id, ae_tag, ae_perm; @@ -264,6 +313,248 @@ translate_acl(struct archive_read_disk * return (ARCHIVE_OK); } +static int +set_acl(struct archive *a, int fd, const char *name, + struct archive_acl *abstract_acl, + int ae_requested_type, const char *tname) +{ + int acl_type = 0; + acl_t acl; + acl_entry_t acl_entry; + acl_permset_t acl_permset; +#if ARCHIVE_ACL_FREEBSD_NFS4 + acl_flagset_t acl_flagset; + int r; +#endif + int ret; + int ae_type, ae_permset, ae_tag, ae_id; + int perm_map_size; + const acl_perm_map_t *perm_map; + uid_t ae_uid; + gid_t ae_gid; + const char *ae_name; + int entries; + int i; + + ret = ARCHIVE_OK; + entries = archive_acl_reset(abstract_acl, ae_requested_type); + if (entries == 0) + return (ARCHIVE_OK); + + + switch (ae_requested_type) { + case ARCHIVE_ENTRY_ACL_TYPE_ACCESS: + acl_type = ACL_TYPE_ACCESS; + break; + case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: + acl_type = ACL_TYPE_DEFAULT; + break; +#if ARCHIVE_ACL_FREEBSD_NFS4 + case ARCHIVE_ENTRY_ACL_TYPE_NFS4: + acl_type = ACL_TYPE_NFS4; + break; +#endif + default: + errno = ENOENT; + archive_set_error(a, errno, "Unsupported ACL type"); + return (ARCHIVE_FAILED); + } + + acl = acl_init(entries); + if (acl == (acl_t)NULL) { + archive_set_error(a, errno, + "Failed to initialize ACL working storage"); + return (ARCHIVE_FAILED); + } + + while (archive_acl_next(a, abstract_acl, ae_requested_type, &ae_type, + &ae_permset, &ae_tag, &ae_id, &ae_name) == ARCHIVE_OK) { + if (acl_create_entry(&acl, &acl_entry) != 0) { + archive_set_error(a, errno, + "Failed to create a new ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + switch (ae_tag) { + case ARCHIVE_ENTRY_ACL_USER: + ae_uid = archive_write_disk_uid(a, ae_name, ae_id); + acl_set_tag_type(acl_entry, ACL_USER); + acl_set_qualifier(acl_entry, &ae_uid); + break; + case ARCHIVE_ENTRY_ACL_GROUP: + ae_gid = archive_write_disk_gid(a, ae_name, ae_id); + acl_set_tag_type(acl_entry, ACL_GROUP); + acl_set_qualifier(acl_entry, &ae_gid); + break; + case ARCHIVE_ENTRY_ACL_USER_OBJ: + acl_set_tag_type(acl_entry, ACL_USER_OBJ); + break; + case ARCHIVE_ENTRY_ACL_GROUP_OBJ: + acl_set_tag_type(acl_entry, ACL_GROUP_OBJ); + break; + case ARCHIVE_ENTRY_ACL_MASK: + acl_set_tag_type(acl_entry, ACL_MASK); + break; + case ARCHIVE_ENTRY_ACL_OTHER: + acl_set_tag_type(acl_entry, ACL_OTHER); + break; +#if ARCHIVE_ACL_FREEBSD_NFS4 + case ARCHIVE_ENTRY_ACL_EVERYONE: + acl_set_tag_type(acl_entry, ACL_EVERYONE); + break; +#endif + default: + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unsupported ACL tag"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + +#if ARCHIVE_ACL_FREEBSD_NFS4 + r = 0; + switch (ae_type) { + case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: + r = acl_set_entry_type_np(acl_entry, + ACL_ENTRY_TYPE_ALLOW); + break; + case ARCHIVE_ENTRY_ACL_TYPE_DENY: + r = acl_set_entry_type_np(acl_entry, + ACL_ENTRY_TYPE_DENY); + break; + case ARCHIVE_ENTRY_ACL_TYPE_AUDIT: + r = acl_set_entry_type_np(acl_entry, + ACL_ENTRY_TYPE_AUDIT); + break; + case ARCHIVE_ENTRY_ACL_TYPE_ALARM: + r = acl_set_entry_type_np(acl_entry, + ACL_ENTRY_TYPE_ALARM); + break; + case ARCHIVE_ENTRY_ACL_TYPE_ACCESS: + case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: + // These don't translate directly into the system ACL. + break; + default: + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unsupported ACL entry type"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + + if (r != 0) { + archive_set_error(a, errno, + "Failed to set ACL entry type"); + ret = ARCHIVE_FAILED; + goto exit_free; + } +#endif + + if (acl_get_permset(acl_entry, &acl_permset) != 0) { + archive_set_error(a, errno, + "Failed to get ACL permission set"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (acl_clear_perms(acl_permset) != 0) { + archive_set_error(a, errno, + "Failed to clear ACL permissions"); + ret = ARCHIVE_FAILED; + goto exit_free; + } +#if ARCHIVE_ACL_FREEBSD_NFS4 + if (ae_requested_type == ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + perm_map_size = acl_nfs4_perm_map_size; + perm_map = acl_nfs4_perm_map; + } else { +#endif + perm_map_size = acl_posix_perm_map_size; + perm_map = acl_posix_perm_map; +#if ARCHIVE_ACL_FREEBSD_NFS4 + } +#endif + + for (i = 0; i < perm_map_size; ++i) { + if (ae_permset & perm_map[i].a_perm) { + if (acl_add_perm(acl_permset, + perm_map[i].p_perm) != 0) { + archive_set_error(a, errno, + "Failed to add ACL permission"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + } + } + +#if ARCHIVE_ACL_FREEBSD_NFS4 + if (ae_requested_type == ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + /* + * acl_get_flagset_np() fails with non-NFSv4 ACLs + */ + if (acl_get_flagset_np(acl_entry, &acl_flagset) != 0) { + archive_set_error(a, errno, + "Failed to get flagset from an NFSv4 " + "ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (acl_clear_flags_np(acl_flagset) != 0) { + archive_set_error(a, errno, + "Failed to clear flags from an NFSv4 " + "ACL flagset"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + for (i = 0; i < acl_nfs4_flag_map_size; ++i) { + if (ae_permset & acl_nfs4_flag_map[i].a_perm) { + if (acl_add_flag_np(acl_flagset, + acl_nfs4_flag_map[i].p_perm) != 0) { + archive_set_error(a, errno, + "Failed to add flag to " + "NFSv4 ACL flagset"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + } + } + } +#endif + } + + /* Try restoring the ACL through 'fd' if we can. */ + if (fd >= 0) { + if (acl_set_fd_np(fd, acl, acl_type) == 0) + ret = ARCHIVE_OK; + else { + if (errno == EOPNOTSUPP) { + /* Filesystem doesn't support ACLs */ + ret = ARCHIVE_OK; + } else { + archive_set_error(a, errno, + "Failed to set acl on fd: %s", tname); + ret = ARCHIVE_WARN; + } + } + } +#if HAVE_ACL_SET_LINK_NP + else if (acl_set_link_np(name, acl_type, acl) != 0) +#else + /* FreeBSD older than 8.0 */ + else if (acl_set_file(name, acl_type, acl) != 0) +#endif + { + if (errno == EOPNOTSUPP) { + /* Filesystem doesn't support ACLs */ + ret = ARCHIVE_OK; + } else { + archive_set_error(a, errno, "Failed to set acl: %s", + tname); + ret = ARCHIVE_WARN; + } + } +exit_free: + acl_free(acl); + return (ret); +} + int archive_read_disk_entry_setup_acls(struct archive_read_disk *a, struct archive_entry *entry, int *fd) @@ -369,3 +660,38 @@ archive_read_disk_entry_setup_acls(struc } return (ARCHIVE_OK); } + +int +archive_write_disk_set_acls(struct archive *a, int fd, const char *name, + struct archive_acl *abstract_acl, __LA_MODE_T mode) +{ + int ret = ARCHIVE_OK; + + (void)mode; /* UNUSED */ + + if ((archive_acl_types(abstract_acl) + & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) { + if ((archive_acl_types(abstract_acl) + & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) { + ret = set_acl(a, fd, name, abstract_acl, + ARCHIVE_ENTRY_ACL_TYPE_ACCESS, "access"); + if (ret != ARCHIVE_OK) + return (ret); + } + if ((archive_acl_types(abstract_acl) + & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) != 0) + ret = set_acl(a, fd, name, abstract_acl, + ARCHIVE_ENTRY_ACL_TYPE_DEFAULT, "default"); + + /* Simultaneous POSIX.1e and NFSv4 is not supported */ + return (ret); + } +#if ARCHIVE_ACL_FREEBSD_NFS4 + else if ((archive_acl_types(abstract_acl) & + ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) { + ret = set_acl(a, fd, name, abstract_acl, + ARCHIVE_ENTRY_ACL_TYPE_NFS4, "nfs4"); + } +#endif + return (ret); +} Copied and modified: vendor/libarchive/dist/libarchive/archive_disk_acl_linux.c (from r316082, vendor/libarchive/dist/libarchive/archive_read_disk_acl_linux.c) ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk_acl_linux.c Tue Mar 28 09:02:42 2017 (r316082, copy source) +++ vendor/libarchive/dist/libarchive/archive_disk_acl_linux.c Tue Mar 28 09:58:54 2017 (r316083) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2003-2009 Tim Kientzle * Copyright (c) 2010-2012 Michihiro NAKAJIMA - * Copyright (c) 2016-2017 Martin Matuska + * Copyright (c) 2017 Martin Matuska * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,18 +39,66 @@ #ifdef HAVE_SYS_ACL_H #include #endif -#if HAVE_SYS_RICHACL_H +#ifdef HAVE_SYS_RICHACL_H #include #endif #include "archive_entry.h" #include "archive_private.h" #include "archive_read_disk_private.h" -#include "archive_acl_maps.h" +#include "archive_write_disk_private.h" -#if HAVE_LIBACL -#include -#endif +typedef struct { + const int a_perm; /* Libarchive permission or flag */ + const int p_perm; /* Platform permission or flag */ +} acl_perm_map_t; + +#if ARCHIVE_ACL_LIBACL +static const acl_perm_map_t acl_posix_perm_map[] = { + {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, + {ARCHIVE_ENTRY_ACL_WRITE, ACL_WRITE}, + {ARCHIVE_ENTRY_ACL_READ, ACL_READ}, +}; + +static const int acl_posix_perm_map_size = + (int)(sizeof(acl_posix_perm_map)/sizeof(acl_posix_perm_map[0])); +#endif /* ARCHIVE_ACL_LIBACL */ + +#if ARCHIVE_ACL_LIBRICHACL +static const acl_perm_map_t acl_nfs4_perm_map[] = { + {ARCHIVE_ENTRY_ACL_EXECUTE, RICHACE_EXECUTE}, + {ARCHIVE_ENTRY_ACL_READ_DATA, RICHACE_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, RICHACE_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, RICHACE_WRITE_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_FILE, RICHACE_ADD_FILE}, + {ARCHIVE_ENTRY_ACL_APPEND_DATA, RICHACE_APPEND_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, RICHACE_ADD_SUBDIRECTORY}, + {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, RICHACE_READ_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, RICHACE_WRITE_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_DELETE_CHILD, RICHACE_DELETE_CHILD}, + {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, RICHACE_READ_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, RICHACE_WRITE_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_DELETE, RICHACE_DELETE}, + {ARCHIVE_ENTRY_ACL_READ_ACL, RICHACE_READ_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_ACL, RICHACE_WRITE_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, RICHACE_WRITE_OWNER}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, RICHACE_SYNCHRONIZE} +}; + +static const int acl_nfs4_perm_map_size = + (int)(sizeof(acl_nfs4_perm_map)/sizeof(acl_nfs4_perm_map[0])); + +static const acl_perm_map_t acl_nfs4_flag_map[] = { + {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, RICHACE_FILE_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, RICHACE_DIRECTORY_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, RICHACE_NO_PROPAGATE_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, RICHACE_INHERIT_ONLY_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, RICHACE_INHERITED_ACE} +}; + +static const int acl_nfs4_flag_map_size = + (int)(sizeof(acl_nfs4_flag_map)/sizeof(acl_nfs4_flag_map[0])); +#endif /* ARCHIVE_ACL_LIBRICHACL */ #if ARCHIVE_ACL_LIBACL /* @@ -240,6 +288,307 @@ translate_richacl(struct archive_read_di } #endif /* ARCHIVE_ACL_LIBRICHACL */ +#if ARCHIVE_ACL_LIBRICHACL +static int +_richacl_mode_to_mask(short mode) +{ + int mask = 0; + + if (mode & S_IROTH) + mask |= RICHACE_POSIX_MODE_READ; + if (mode & S_IWOTH) + mask |= RICHACE_POSIX_MODE_WRITE; + if (mode & S_IXOTH) + mask |= RICHACE_POSIX_MODE_EXEC; + + return (mask); +} + +static void +_richacl_mode_to_masks(struct richacl *richacl, __LA_MODE_T mode) +{ + richacl->a_owner_mask = _richacl_mode_to_mask((mode & 0700) >> 6); + richacl->a_group_mask = _richacl_mode_to_mask((mode & 0070) >> 3); + richacl->a_other_mask = _richacl_mode_to_mask(mode & 0007); +} +#endif /* ARCHIVE_ACL_LIBRICHACL */ + +#if ARCHIVE_ACL_LIBRICHACL +static int +set_richacl(struct archive *a, int fd, const char *name, + struct archive_acl *abstract_acl, __LA_MODE_T mode, + int ae_requested_type, const char *tname) +{ + int ae_type, ae_permset, ae_tag, ae_id; + uid_t ae_uid; + gid_t ae_gid; + const char *ae_name; + int entries; + int i; + int ret; + int e = 0; + struct richacl *richacl = NULL; + struct richace *richace; + + ret = ARCHIVE_OK; + entries = archive_acl_reset(abstract_acl, ae_requested_type); + if (entries == 0) + return (ARCHIVE_OK); + + if (ae_requested_type != ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + errno = ENOENT; + archive_set_error(a, errno, "Unsupported ACL type"); + return (ARCHIVE_FAILED); + } + + richacl = richacl_alloc(entries); + if (richacl == NULL) { + archive_set_error(a, errno, + "Failed to initialize RichACL working storage"); + return (ARCHIVE_FAILED); + } + + e = 0; + + while (archive_acl_next(a, abstract_acl, ae_requested_type, &ae_type, + &ae_permset, &ae_tag, &ae_id, &ae_name) == ARCHIVE_OK) { + richace = &(richacl->a_entries[e]); + + richace->e_flags = 0; + richace->e_mask = 0; + + switch (ae_tag) { + case ARCHIVE_ENTRY_ACL_USER: + ae_uid = archive_write_disk_uid(a, ae_name, ae_id); + richace->e_id = ae_uid; + break; + case ARCHIVE_ENTRY_ACL_GROUP: + ae_gid = archive_write_disk_gid(a, ae_name, ae_id); + richace->e_id = ae_gid; + richace->e_flags |= RICHACE_IDENTIFIER_GROUP; + break; + case ARCHIVE_ENTRY_ACL_USER_OBJ: + richace->e_flags |= RICHACE_SPECIAL_WHO; + richace->e_id = RICHACE_OWNER_SPECIAL_ID; + break; + case ARCHIVE_ENTRY_ACL_GROUP_OBJ: + richace->e_flags |= RICHACE_SPECIAL_WHO; + richace->e_id = RICHACE_GROUP_SPECIAL_ID; + break; + case ARCHIVE_ENTRY_ACL_EVERYONE: + richace->e_flags |= RICHACE_SPECIAL_WHO; + richace->e_id = RICHACE_EVERYONE_SPECIAL_ID; + break; + default: + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unsupported ACL tag"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + + switch (ae_type) { + case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: + richace->e_type = + RICHACE_ACCESS_ALLOWED_ACE_TYPE; + break; + case ARCHIVE_ENTRY_ACL_TYPE_DENY: + richace->e_type = + RICHACE_ACCESS_DENIED_ACE_TYPE; + break; + case ARCHIVE_ENTRY_ACL_TYPE_AUDIT: + case ARCHIVE_ENTRY_ACL_TYPE_ALARM: + break; + default: + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unsupported ACL entry type"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + + for (i = 0; i < acl_nfs4_perm_map_size; ++i) { + if (ae_permset & acl_nfs4_perm_map[i].a_perm) + richace->e_mask |= acl_nfs4_perm_map[i].p_perm; + } + + for (i = 0; i < acl_nfs4_flag_map_size; ++i) { + if (ae_permset & + acl_nfs4_flag_map[i].a_perm) + richace->e_flags |= acl_nfs4_flag_map[i].p_perm; + } + e++; + } + + /* Fill RichACL masks */ + _richacl_mode_to_masks(richacl, mode); + + if (fd >= 0) { + if (richacl_set_fd(fd, richacl) == 0) + ret = ARCHIVE_OK; + else { + if (errno == EOPNOTSUPP) { + /* Filesystem doesn't support ACLs */ + ret = ARCHIVE_OK; + } else { + archive_set_error(a, errno, + "Failed to set richacl on fd: %s", tname); + ret = ARCHIVE_WARN; + } + } + } else if (richacl_set_file(name, richacl) != 0) { + if (errno == EOPNOTSUPP) { + /* Filesystem doesn't support ACLs */ + ret = ARCHIVE_OK; + } else { + archive_set_error(a, errno, "Failed to set richacl: %s", + tname); + ret = ARCHIVE_WARN; + } + } +exit_free: + richacl_free(richacl); + return (ret); +} +#endif /* ARCHIVE_ACL_RICHACL */ + +#if ARCHIVE_ACL_LIBACL +static int +set_acl(struct archive *a, int fd, const char *name, + struct archive_acl *abstract_acl, + int ae_requested_type, const char *tname) +{ + int acl_type = 0; + int ae_type, ae_permset, ae_tag, ae_id; + uid_t ae_uid; + gid_t ae_gid; + const char *ae_name; + int entries; + int i; + int ret; + acl_t acl = NULL; + acl_entry_t acl_entry; + acl_permset_t acl_permset; + + ret = ARCHIVE_OK; + entries = archive_acl_reset(abstract_acl, ae_requested_type); + if (entries == 0) + return (ARCHIVE_OK); + + switch (ae_requested_type) { + case ARCHIVE_ENTRY_ACL_TYPE_ACCESS: + acl_type = ACL_TYPE_ACCESS; + break; + case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: + acl_type = ACL_TYPE_DEFAULT; + break; + default: + errno = ENOENT; + archive_set_error(a, errno, "Unsupported ACL type"); + return (ARCHIVE_FAILED); + } + + acl = acl_init(entries); + if (acl == (acl_t)NULL) { + archive_set_error(a, errno, + "Failed to initialize ACL working storage"); + return (ARCHIVE_FAILED); + } + + while (archive_acl_next(a, abstract_acl, ae_requested_type, &ae_type, + &ae_permset, &ae_tag, &ae_id, &ae_name) == ARCHIVE_OK) { + + if (acl_create_entry(&acl, &acl_entry) != 0) { + archive_set_error(a, errno, + "Failed to create a new ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + + switch (ae_tag) { + case ARCHIVE_ENTRY_ACL_USER: + ae_uid = archive_write_disk_uid(a, ae_name, ae_id); + acl_set_tag_type(acl_entry, ACL_USER); + acl_set_qualifier(acl_entry, &ae_uid); + break; + case ARCHIVE_ENTRY_ACL_GROUP: + ae_gid = archive_write_disk_gid(a, ae_name, ae_id); + acl_set_tag_type(acl_entry, ACL_GROUP); + acl_set_qualifier(acl_entry, &ae_gid); + break; + case ARCHIVE_ENTRY_ACL_USER_OBJ: + acl_set_tag_type(acl_entry, ACL_USER_OBJ); + break; + case ARCHIVE_ENTRY_ACL_GROUP_OBJ: + acl_set_tag_type(acl_entry, ACL_GROUP_OBJ); + break; + case ARCHIVE_ENTRY_ACL_MASK: + acl_set_tag_type(acl_entry, ACL_MASK); + break; + case ARCHIVE_ENTRY_ACL_OTHER: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Tue Mar 28 10:34:46 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47F73D2059F; Tue, 28 Mar 2017 10:34:46 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FBC7AB5; Tue, 28 Mar 2017 10:34:46 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2SAYj9x022967; Tue, 28 Mar 2017 10:34:45 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2SAYikF022960; Tue, 28 Mar 2017 10:34:44 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201703281034.v2SAYikF022960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Tue, 28 Mar 2017 10:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r316094 - in vendor/libarchive/dist: . libarchive X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 10:34:46 -0000 Author: mm Date: Tue Mar 28 10:34:44 2017 New Revision: 316094 URL: https://svnweb.freebsd.org/changeset/base/316094 Log: Update vendor/libarchive to git a04b5adede4022dd593af76cb2fc2e96cb34df91 Vendor changes (FreeBSD-related): - add missing file from previous merge - encapsulate platform ACL code in an #ifdef Modified: vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/libarchive/archive_disk_acl_darwin.c vendor/libarchive/dist/libarchive/archive_disk_acl_freebsd.c vendor/libarchive/dist/libarchive/archive_disk_acl_linux.c vendor/libarchive/dist/libarchive/archive_disk_acl_sunos.c Modified: vendor/libarchive/dist/Makefile.am ============================================================================== --- vendor/libarchive/dist/Makefile.am Tue Mar 28 10:26:27 2017 (r316093) +++ vendor/libarchive/dist/Makefile.am Tue Mar 28 10:34:44 2017 (r316094) @@ -250,32 +250,16 @@ libarchive_la_SOURCES+= \ endif if INC_LINUX_ACL -libarchive_la_SOURCES+= \ - libarchive/archive_acl_maps.h \ - libarchive/archive_acl_maps_linux.c \ - libarchive/archive_read_disk_acl_linux.c \ - libarchive/archive_write_disk_acl_linux.c +libarchive_la_SOURCES+= libarchive/archive_disk_acl_linux.c else if INC_SUNOS_ACL -libarchive_la_SOURCES+= \ - libarchive/archive_acl_maps.h \ - libarchive/archive_acl_maps_sunos.c \ - libarchive/archive_read_disk_acl_sunos.c \ - libarchive/archive_write_disk_acl_sunos.c +libarchive_la_SOURCES+= libarchive/archive_disk_acl_sunos.c else if INC_DARWIN_ACL -libarchive_la_SOURCES+= \ - libarchive/archive_acl_maps.h \ - libarchive/archive_acl_maps_darwin.c \ - libarchive/archive_read_disk_acl_darwin.c \ - libarchive/archive_write_disk_acl_darwin.c +libarchive_la_SOURCES+= libarchive/archive_disk_acl_darwin.c else if INC_FREEBSD_ACL -libarchive_la_SOURCES+= \ - libarchive/archive_acl_maps.h \ - libarchive/archive_acl_maps_freebsd.c \ - libarchive/archive_read_disk_acl_freebsd.c \ - libarchive/archive_write_disk_acl_freebsd.c +libarchive_la_SOURCES+= libarchive/archive_disk_acl_freebsd.c endif endif endif Modified: vendor/libarchive/dist/libarchive/archive_disk_acl_darwin.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_disk_acl_darwin.c Tue Mar 28 10:26:27 2017 (r316093) +++ vendor/libarchive/dist/libarchive/archive_disk_acl_darwin.c Tue Mar 28 10:34:44 2017 (r316094) @@ -25,6 +25,8 @@ #include "archive_platform.h" +#if ARCHIVE_ACL_DARWIN + #ifdef HAVE_FCNTL_H #include #endif @@ -554,3 +556,4 @@ archive_write_disk_set_acls(struct archi } return (ret); } +#endif /* ARCHIVE_ACL_DARWIN */ Modified: vendor/libarchive/dist/libarchive/archive_disk_acl_freebsd.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_disk_acl_freebsd.c Tue Mar 28 10:26:27 2017 (r316093) +++ vendor/libarchive/dist/libarchive/archive_disk_acl_freebsd.c Tue Mar 28 10:34:44 2017 (r316094) @@ -27,6 +27,8 @@ #include "archive_platform.h" +#if ARCHIVE_ACL_FREEBSD + #ifdef HAVE_ERRNO_H #include #endif @@ -695,3 +697,4 @@ archive_write_disk_set_acls(struct archi #endif return (ret); } +#endif /* ARCHIVE_ACL_FREEBSD */ Modified: vendor/libarchive/dist/libarchive/archive_disk_acl_linux.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_disk_acl_linux.c Tue Mar 28 10:26:27 2017 (r316093) +++ vendor/libarchive/dist/libarchive/archive_disk_acl_linux.c Tue Mar 28 10:34:44 2017 (r316094) @@ -27,6 +27,8 @@ #include "archive_platform.h" +#if ARCHIVE_ACL_LIBACL || ARCHIVE_ACL_LIBRICHACL + #ifdef HAVE_ERRNO_H #include #endif @@ -738,3 +740,4 @@ archive_write_disk_set_acls(struct archi #endif /* ARCHIVE_ACL_LIBACL */ return (ret); } +#endif /* ARCHIVE_ACL_LIBACL || ARCHIVE_ACL_LIBRICHACL */ Modified: vendor/libarchive/dist/libarchive/archive_disk_acl_sunos.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_disk_acl_sunos.c Tue Mar 28 10:26:27 2017 (r316093) +++ vendor/libarchive/dist/libarchive/archive_disk_acl_sunos.c Tue Mar 28 10:34:44 2017 (r316094) @@ -25,6 +25,8 @@ #include "archive_platform.h" +#if ARCHIVE_ACL_SUNOS + #ifdef HAVE_ERRNO_H #include #endif @@ -816,3 +818,4 @@ archive_write_disk_set_acls(struct archi #endif return (ret); } +#endif /* ARCHIVE_ACL_SUNOS */ From owner-svn-src-vendor@freebsd.org Wed Mar 29 03:28:10 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8DE2D22E2A; Wed, 29 Mar 2017 03:28:10 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7210F2FDD; Wed, 29 Mar 2017 03:28:10 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2T3S9Tm042270; Wed, 29 Mar 2017 03:28:09 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2T3S91r042269; Wed, 29 Mar 2017 03:28:09 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201703290328.v2T3S91r042269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 29 Mar 2017 03:28:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r316124 - vendor/libpcap/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 03:28:10 -0000 Author: delphij Date: Wed Mar 29 03:28:09 2017 New Revision: 316124 URL: https://svnweb.freebsd.org/changeset/base/316124 Log: Apply vendor revision 470df104c6f55f6d6f390df7448d8eb65c7642b9: From: Guy Harris Subject: [PATCH] Fix compilation if INET6 isn't defined. Addresses GitHub issue #541, but differently from the pull request (it defines gen_gateway() with a function prototype rather than using a pre-prototype-style definition). Modified: vendor/libpcap/dist/gencode.c Modified: vendor/libpcap/dist/gencode.c ============================================================================== --- vendor/libpcap/dist/gencode.c Wed Mar 29 02:21:05 2017 (r316123) +++ vendor/libpcap/dist/gencode.c Wed Mar 29 03:28:09 2017 (r316124) @@ -523,7 +523,8 @@ static struct block *gen_host6(compiler_ struct in6_addr *, int, int, int); #endif #ifndef INET6 -static struct block *gen_gateway(const u_char *, bpf_u_int32 **, int, int); +static struct block *gen_gateway(compiler_state_t *, const u_char *, + bpf_u_int32 **, int, int); #endif static struct block *gen_ipfrag(compiler_state_t *); static struct block *gen_portatom(compiler_state_t *, int, bpf_int32); @@ -690,7 +691,9 @@ pcap_compile(pcap_t *p, struct bpf_progr } initchunks(&cstate); cstate.no_optimize = 0; +#ifdef INET6 cstate.ai = NULL; +#endif cstate.ic.root = NULL; cstate.ic.cur_mark = 0; cstate.bpf_pcap = p; @@ -4902,11 +4905,8 @@ gen_host6(compiler_state_t *cstate, stru #ifndef INET6 static struct block * -gen_gateway(eaddr, alist, proto, dir) - const u_char *eaddr; - bpf_u_int32 **alist; - int proto; - int dir; +gen_gateway(compiler_state_t *cstate, const u_char *eaddr, bpf_u_int32 **alist, + int proto, int dir) { struct block *b0, *b1, *tmp; @@ -6470,7 +6470,7 @@ gen_scode(compiler_state_t *cstate, cons alist = pcap_nametoaddr(name); if (alist == NULL || *alist == NULL) bpf_error(cstate, "unknown host '%s'", name); - b = gen_gateway(eaddr, alist, proto, dir); + b = gen_gateway(cstate, eaddr, alist, proto, dir); free(eaddr); return b; #else