DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Debian wheezy(amd64): fail to configure tzdata -> everything got stuck.
Hya,
situation
This week, after dist-upgrade,
Code:
Setting up tzdata (2012c-1) ...
dpkg: error processing tzdata (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
tzdata
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up tzdata (2012c-1) ...
dpkg: error processing tzdata (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
tzdata
and many other things got stuck.
This happened with 2 penguins (amd64 wheezy).
I have checked 1. bug report for tzdata, dpkg, 2. changelog for tzdata (2012c-1), 3. aptitude with -v option. So far, no solution.
These two penguins have different apt source files.
The file (tzdata) is a kind of essential and I have not tried to remove (purge) and install.
After setting "set -x" on the second line, "dpkg --configure tzdata" runs without error, (exit status is 0). I am not sure what went on, however, no error.
hmm maybe I know. Did you delete a line with "set -e"? A "set -e" would have caused the script to exit if any of the commands it runs run turn non-zero. If this is the case something may have failed to be setup correctly. If you did delete it please add "set -x" and "set -e" and rerun the configuration.
# cat tzdata.postinst
#! /bin/sh
set -x
set -e
LC_ALL=C
LANG=C
unset TZ
umask 022
. /usr/share/debconf/confmodule
db_version 2.0
if [ "$1" = configure ]; then
# If the user prefers to manage the time zone by itself, let him doing that.
if ! [ -e /etc/timezone ] && [ -z "$DEBCONF_RECONFIGURE" ] ; then
db_stop
echo
echo "User defined time zone, leaving /etc/localtime unchanged."
else
# Get the values from debconf
AREA=Etc
ZONE=UTC
db_get tzdata/Areas && AREA="$RET"
db_get tzdata/Zones/$AREA && ZONE="$RET"
db_stop
# Update the time zone
echo $AREA/$ZONE > /etc/timezone
cp -f /usr/share/zoneinfo/$AREA/$ZONE /etc/localtime.dpkg-new && \
mv -f /etc/localtime.dpkg-new /etc/localtime
which restorecon >/dev/null 2>&1 && restorecon /etc/localtime
echo
echo "Current default time zone: '$AREA/$ZONE'"
fi
# Show the new setting to the user
TZBase=$(LC_ALL=C TZ=UTC0 date)
UTdate=$(LC_ALL=C TZ=UTC0 date -d "$TZBase")
TZdate=$(unset TZ ; LANG=C date -d "$TZBase")
echo "Local time is now: $TZdate."
echo "Universal Time is now: $UTdate."
if [ -z "$DEBCONF_RECONFIGURE" ] ; then
echo "Run 'dpkg-reconfigure tzdata' if you wish to change it."
fi
echo
fi
exit 0
this is a little strange I wonder if it is shell related. If /bin/sh is not linked to your login shell, can you please try changing the "#! /bin/sh" to "#! /bin/bash" and try again?
Another thing is that restorecon seems to be SELinux related (from the policycoreutils package): are you actually using SELinux? If not, you should probably remove policycoreutils. I guess simply commenting out that line in the postinst script will work for you (if you don't use selinux), but it doesn't answer the underlying question.
Looking like it could be time to think about filing a but report.
It may be a good idea to file bug report, I agree. However, I am not sure which one of tzdata or selinux (policycoreutils) is to blame. I will try to pinpoint a little further.
I checked another penguin, which does not choke, and found that "CONFIG_SECURITY_SELINUX_DISABLE" was "Y". I reinstalled policicoreutils, and see what happens. No problem!
Troubleshoot is not complete, however, practically it is solved.
Following what I did to get out of trouble.
1. tzdata package failed to configure.
2. tweak tzdata.postinst file, suggested by post #7. So other files upgraded.
3. policycoreutil package failed to configure.
4. purge policycoreutil package.
5. reinstall policycoreutil package.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.