summaryrefslogtreecommitdiffstats
path: root/source/a/glibc-zoneinfo/doinst.sh
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2020-12-09 21:10:40 +0000
committer Eric Hameleers <alien@slackware.com>2020-12-10 08:59:45 +0100
commitcf14860fabf930b99a09834440cf1ae1fae695e5 (patch)
tree896eb6f3f24befe6507b3b456972feaa8d136b21 /source/a/glibc-zoneinfo/doinst.sh
parent7d1fda615bfe3ec57a0c6753082b866a09ac1af3 (diff)
downloadcurrent-cf14860fabf930b99a09834440cf1ae1fae695e5.tar.gz
current-cf14860fabf930b99a09834440cf1ae1fae695e5.tar.xz
Wed Dec 9 21:10:40 UTC 202020201209211040
a/elogind-243.7-x86_64-2.txz: Rebuilt. Moved default udev rules to /lib/udev/rules.d/. Thanks to Robby Workman. Added /usr/share/polkit-1/rules.d/10-enable-session-power.rules. a/glibc-zoneinfo-2020d-noarch-2.txz: Rebuilt. Make /etc/localtime a symlink pointing into /usr/share/zoneinfo. If you have /usr on a separate partition, this might cause time problems prior to /usr being mounted (I recommend *not* making /usr a separate partition). But if you insist for some reason, you can probably work around it by adding the pointed-to directory and timezone file to your empty pre-mounted /usr directory. a/upower-0.99.11-x86_64-2.txz: Rebuilt. Added /usr/share/polkit-1/rules.d/10-enable-upower-suspend.rules. d/autoconf-2.70-noarch-1.txz: Upgraded. d/gnucobol-3.1.1-x86_64-1.txz: Upgraded. kde/powerdevil-5.20.4-x86_64-2.txz: Rebuilt. Moved 10-enable-powerdevil-discrete-gpu.rules.new to /usr/share/polkit-1/rules.d/. Thanks to Robby Workman. Moved 10-enable-session-power.rules to the elogind package. Moved 10-enable-upower-suspend.rules to the upower package. Thanks to GazL. l/jasper-2.0.23-x86_64-1.txz: Upgraded. Fix heap-overflow in cp_create() in jpc_enc.c. For more information, see: https://github.com/jasper-software/jasper/issues/252 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-27828 (* Security fix *) l/sbc-1.5-x86_64-1.txz: Upgraded. n/curl-7.74.0-x86_64-1.txz: Upgraded. This release includes the following security related bugfixes: Inferior OCSP verification [93] FTP wildcard stack overflow [95] Trusting FTP PASV responses [97] For more information, see: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8286 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8285 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8284 (* Security fix *) xap/xscreensaver-5.45-x86_64-1.txz: Upgraded. xfce/Greybird-3.22.13-noarch-1.txz: Upgraded.
Diffstat (limited to 'source/a/glibc-zoneinfo/doinst.sh')
-rw-r--r--source/a/glibc-zoneinfo/doinst.sh47
1 files changed, 25 insertions, 22 deletions
diff --git a/source/a/glibc-zoneinfo/doinst.sh b/source/a/glibc-zoneinfo/doinst.sh
index 05f1e990b..eb776e2ff 100644
--- a/source/a/glibc-zoneinfo/doinst.sh
+++ b/source/a/glibc-zoneinfo/doinst.sh
@@ -1,14 +1,15 @@
-# In order to properly handle time before /usr is mounted (in
-# the event that /usr is a separate partition, which for a number
-# of reasons isn't really a great idea), the /etc/localtime file
-# should be a copy of the desired zoneinfo file and not a symlink
-# to a file in /usr/share/zoneinfo. But if we find a symlink here
-# we should defer to the admin's wishes and leave it alone.
-#
-# Note that setting the timezone with timeconfig will wipe both
-# /etc/localtime and /etc/localtime-copied from.
-# /etc/localtime-copied-from will be a symlink to a file under
-# /usr/share/zoneinfo, and /etc/localtime will be a copy of that file.
+# Note on configuration change (2020-12-09):
+# For the past decade and a half, this package has created a symlink
+# /etc/localtime-copied-from and a file /etc/localtime to prevent
+# time skew until /usr is mounted. But having a separate /usr partition
+# hasn't really made sense for a long time and leads to all kinds of
+# bugs these days. We're going to make /etc/localtime a symlink just
+# like everyone else does so that programs that expect it to be a link
+# can fetch the timezone without requiring any special patches.
+# If you insist on making /usr a seperate partition, you might want to
+# put the pointed-to directories and timezone file in your empty /usr
+# directory so that it is available before the real /usr is mounted.
+# Still not recommended though.
# In a special case, we will handle the removal of the US/Pacific-New
# timezone. A bit of background information on this:
@@ -32,25 +33,27 @@ if [ "$(/bin/ls -l etc/localtime-copied-from 2> /dev/null | rev | cut -f 1,2 -d
( cd etc ; rm -rf localtime-copied-from )
( cd etc ; ln -sf /usr/share/zoneinfo/US/Pacific localtime-copied-from )
fi
+# Same with any /etc/localtime symlink:
+if [ -L etc/localtime ]; then
+ if [ "$(/bin/ls -l etc/localtime 2> /dev/null | rev | cut -f 1,2 -d / | rev)" = "US/Pacific-New" ]; then
+ ( cd etc ; rm -rf localtime )
+ ( cd etc ; ln -sf /usr/share/zoneinfo/US/Pacific localtime )
+ fi
+fi
-# If we have no /etc/localtime, but we do have a localtime-copied-from
-# symlink to locate what we would want there, then add a copy now:
-if [ ! -r etc/localtime -a -L etc/localtime-copied-from ]; then
- chroot . /bin/cp etc/localtime-copied-from etc/localtime
+# If we already have a localtime-copied-from symlink, move it over as the
+# /etc/localtime symlink:
+if [ -L etc/localtime-copied-from ]; then
+ rm -f etc/localtime
+ mv etc/localtime-copied-from etc/localtime
fi
# Add the default timezone in /etc, if none exists:
-if [ ! -r etc/localtime -a ! -L etc/localtime-copied-from ]; then
+if [ ! -r etc/localtime ]; then
( cd etc ; rm -rf localtime localtime-copied-from )
( cd etc ; ln -sf /usr/share/zoneinfo/Factory localtime-copied-from )
fi
-# Make sure /etc/localtime is updated, unless it is a symlink (in which
-# case leave it alone):
-if [ ! -L etc/localtime ]; then
- chroot . /bin/cp etc/localtime-copied-from etc/localtime
-fi
-
# Add a link to the timeconfig script in /usr/share/zoneinfo:
( cd usr/share/zoneinfo ; rm -rf timeconfig )
( cd usr/share/zoneinfo ; ln -sf /usr/sbin/timeconfig timeconfig )