[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-10-01 Thread Martin Pitt
Looks like there's some fallout:
[   21.974853] type=1400 audit(1380573331.014:55): apparmor=DENIED 
operation=open parent=863 profile=/sbin/dhclient 
name=/etc/writable/localtime pid=1369 comm=dhclient requested_mask=r 
denied_mask=r fsuid=0 ouid=0

Some of the AA profiles need updating for this.

** Also affects: apparmor (Ubuntu)
   Importance: Undecided
   Status: New

** Changed in: apparmor (Ubuntu)
   Importance: Undecided = High

** Changed in: apparmor (Ubuntu)
   Status: New = In Progress

** Changed in: apparmor (Ubuntu)
 Assignee: (unassigned) = Martin Pitt (pitti)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-10-01 Thread Martin Pitt
Due to the last-minute change of making the symlinks relative the
systemd patch now stopped working and needs to be adjusted.

** Changed in: systemd (Ubuntu)
   Status: Fix Released = In Progress

** Changed in: systemd (Ubuntu)
Milestone: ubuntu-13.09 = ubuntu-13.10

** Changed in: apparmor (Ubuntu)
   Status: In Progress = Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-10-01 Thread Launchpad Bug Tracker
** Branch linked: lp:ubuntu/saucy-proposed/apparmor

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-10-01 Thread Launchpad Bug Tracker
This bug was fixed in the package apparmor - 2.8.0-0ubuntu29

---
apparmor (2.8.0-0ubuntu29) saucy; urgency=low

  * Add 0070-etc-writable.patch: Allow reading time configuration from
/etc/writable, as we have it on the phone. (LP: #1227520)
 -- Martin Pitt martin.p...@ubuntu.com   Tue, 01 Oct 2013 09:55:15 +0200

** Changed in: apparmor (Ubuntu)
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-10-01 Thread Launchpad Bug Tracker
** Branch linked: lp:ubuntu/apparmor

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-10-01 Thread Martin Pitt
Updated systemd for the livecd-rootfs change in 2.191, sorry for not
spotting it earlier.

** Changed in: systemd (Ubuntu)
   Status: In Progress = Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-10-01 Thread Martin Pitt
Reopening initramfs-tools-ubuntu-touch. When flashing current devel-
proposed builds (74), /etc/writable/  is empty after boot (the symlinks
/etc/timezone etc. into it are fine, though). http://cdimage.ubuntu.com
/ubuntu-touch/daily-preinstalled/pending/saucy-preinstalled-touch-
armhf.tar.gz does have the files, so it seems the synced mode doesn't
actually copy the files?

** Changed in: initramfs-tools-ubuntu-touch (Ubuntu)
   Status: Fix Released = In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-10-01 Thread Martin Pitt
Changing to get along with absolute and relative symlinks.

** Changed in: systemd (Ubuntu)
   Status: Fix Committed = In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-10-01 Thread Martin Pitt
systemd uploaded, third time's the charm! I tested this now with
relative and absolute symlinks, as well as direct files (as on desktop).

** Changed in: systemd (Ubuntu)
   Status: In Progress = Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-10-01 Thread Martin Pitt
The empty /etc/writable/ dir should be fixed with
https://launchpad.net/ubuntu/+source/initramfs-tools-ubuntu-touch/0.52

** Changed in: initramfs-tools-ubuntu-touch (Ubuntu)
   Status: In Progress = Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-10-01 Thread Launchpad Bug Tracker
This bug was fixed in the package systemd - 204-0ubuntu15

---
systemd (204-0ubuntu15) saucy; urgency=low

  * 0029-Support-phablet-etc-writable.patch: Update patch to also work for
relative symlinks to /etc/writable, as livecd-rootfs 2.191 creates them
relative now. (LP: #1227520)
 -- Martin Pitt martin.p...@ubuntu.com   Tue, 01 Oct 2013 17:53:13 +0200

** Changed in: systemd (Ubuntu)
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-30 Thread Martin Pitt
http://bazaar.launchpad.net/~ubuntu-core-dev/livecd-
rootfs/trunk/revision/848 gets along fine with a nonexistent
/etc/adjtime, but will move it to /etc/writable if it is present. That
seems right to me, as a non-writable /etc/adjtime is totally useless. If
this isn't supposed to be in the phone images, we can throw it out of
the patch of course (just drop it from the for loop). Steve, any opinion
on that?

 I can update the timedatectl patch to get along with a missing file
(maybe it does already, need to test).

I checked this now. timedated does not touch /etc/adjtime for changing
timezones, so this isn't a concern for the purposes of this bug. It only
creates/updates /etc/adjtime when calling timedatectl set-local-rtc
yes, and removes it again on no, for storing the LOCAL flag. If we
don't want that, I'm happy to take this out, but please let's not block
this bug on that. It has already taken way more time than necessary to
land this.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-30 Thread Steve Langasek
On Mon, Sep 30, 2013 at 06:44:54AM -, Martin Pitt wrote:
 http://bazaar.launchpad.net/~ubuntu-core-dev/livecd-
 rootfs/trunk/revision/848 gets along fine with a nonexistent
 /etc/adjtime, but will move it to /etc/writable if it is present. That
 seems right to me, as a non-writable /etc/adjtime is totally useless. If
 this isn't supposed to be in the phone images, we can throw it out of
 the patch of course (just drop it from the for loop). Steve, any opinion
 on that?

Please drop it from the patch.  live-build has already been fixed not to
create it, so there's no reason for livecd-rootfs to include handling.

 I checked this now. timedated does not touch /etc/adjtime for changing
 timezones, so this isn't a concern for the purposes of this bug. It only
 creates/updates /etc/adjtime when calling timedatectl set-local-rtc
 yes, and removes it again on no, for storing the LOCAL flag. If we
 don't want that, I'm happy to take this out, but please let's not block
 this bug on that. It has already taken way more time than necessary to
 land this.

Agreed, this should be changed but should not block this bug.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-30 Thread Martin Pitt
 Please drop it from the patch.

Done: http://bazaar.launchpad.net/~ubuntu-core-dev/livecd-
rootfs/trunk/revision/849

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-30 Thread Launchpad Bug Tracker
** Branch linked: lp:ubuntu/saucy-proposed/initramfs-tools-ubuntu-touch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-30 Thread Launchpad Bug Tracker
This bug was fixed in the package initramfs-tools-ubuntu-touch - 0.50

---
initramfs-tools-ubuntu-touch (0.50) saucy; urgency=low

  * Add a new synced mode to writable-paths which will automatically copy
any new file appearing on the filesystem but won't remove any extra file
from the target (this should be used with care and with full understanding
of the consequences). (LP: #1227520)
 -- StAphane Graber stgra...@ubuntu.com   Thu, 26 Sep 2013 17:55:27 -0400

** Changed in: initramfs-tools-ubuntu-touch (Ubuntu)
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-30 Thread Martin Pitt
I uploaded lxc-android-config with stgraber's patch (plus changelog bug
ref), my livecd-rootfs changes, and systemd.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-30 Thread Launchpad Bug Tracker
This bug was fixed in the package lxc-android-config - 0.104

---
lxc-android-config (0.104) saucy; urgency=low

  * Make /etc/writable synced and drop the entries that got moved in there.
(LP: #1227520)
 -- Stephane Graber stgra...@ubuntu.com   Mon, 30 Sep 2013 13:31:37 +0200

** Changed in: lxc-android-config (Ubuntu)
   Status: Fix Committed = Fix Released

** Branch linked: lp:ubuntu/saucy-proposed/lxc-android-config

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-30 Thread Launchpad Bug Tracker
** Branch linked: lp:ubuntu/saucy-proposed/systemd

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-30 Thread Launchpad Bug Tracker
This bug was fixed in the package livecd-rootfs - 2.191

---
livecd-rootfs (2.191) saucy; urgency=low

  * ubuntu-touch: Make writable symlinks relative.
 -- Martin Pitt martin.p...@ubuntu.com   Mon, 30 Sep 2013 13:59:59 +0200

** Changed in: livecd-rootfs (Ubuntu)
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-30 Thread Launchpad Bug Tracker
This bug was fixed in the package systemd - 204-0ubuntu14

---
systemd (204-0ubuntu14) saucy; urgency=low

  * Add 0029-Support-phablet-etc-writable.patch: On Ubuntu Phone with readonly
/etc we symlink /etc/{adjtime,localtime,timezone} to /etc/writable/, so we
need to update those files instead if the original files are symlinks into
/etc/writable/. (LP: #1227520)
  * Refresh debian/extra/60-keyboard.hwdb with latest keymaps from upstream.
Among others, this fixes Samsung Ativ 9 Plus. (LP: #1229936)
  * Rename 0027-CVE-2013-4327.patch and
0028-fix-reboot-polkit-permissions.patch to -upstream-* as they are in
upstream git.
  * Ship {ata,cdrom,scsi}_id in udev-udeb. (LP: #1231230)
  * Drop 60-persistent-v4l.rules and 61-accelerometer.rules from udev-udeb, we
don't need these in the installer.
 -- Martin Pitt martin.p...@ubuntu.com   Mon, 30 Sep 2013 13:34:06 +0200

** Changed in: systemd (Ubuntu)
   Status: Fix Committed = Fix Released

** CVE added: http://www.cve.mitre.org/cgi-
bin/cvename.cgi?name=2013-4327

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-30 Thread Oliver Grawert
** Changed in: android (Ubuntu)
   Status: New = Fix Released

** Changed in: android (Ubuntu)
 Assignee: (unassigned) = Oliver Grawert (ogra)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-28 Thread Martin Pitt
I can update the timedatectl patch to get along with a missing file
(maybe it does already, need to test).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-28 Thread Iain Lane
On Fri, Sep 27, 2013 at 05:41:54PM -, Steve Langasek wrote:
  Missed this.
 
  It is on the filesystem, and from reading the code it looks as if
  timedated will error out if it is present and can't be written to.
 
  So as long as this is the case, we absolutely do.
 
 No, absolutely *not*.  Do not pile more hacks on top of hacks.  It is a bug
 that /etc/adjtime is present, and it is a bug that timedated attempts to
 manipulate it in Ubuntu.

I said as long as this is the case, which means that it's valid to
make it so that it is not the case. That's what you did, which is fine
(as long as upgrades are cleaned up too). Thanks for that.

-- 
Iain Lane  [ i...@orangesquash.org.uk ]
Debian Developer   [ la...@debian.org ]
Ubuntu Developer   [ la...@ubuntu.com ]

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-27 Thread Oliver Grawert
changes to the touch initrd require a no change upload of the android
package to pick them up, adding to the tasks


** Also affects: android (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-27 Thread Iain Lane
On Wed, Sep 25, 2013 at 02:35:46PM -, Steve Langasek wrote:
 On Wed, Sep 25, 2013 at 08:54:31AM -, Iain Lane wrote:
 
  I think you need to care for /etc/timezone and maybe also /etc/adjtime
  too.
 
 We absolutely do not need to do this for /etc/adjtime.  /etc/adjtime is not
 used in Ubuntu, and shouldn't even be on the filesystem.

Missed this.

It is on the filesystem, and from reading the code it looks as if
timedated will error out if it is present and can't be written to.

So as long as this is the case, we absolutely do.

-- 
Iain Lane  [ i...@orangesquash.org.uk ]
Debian Developer   [ la...@debian.org ]
Ubuntu Developer   [ la...@ubuntu.com ]

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-27 Thread Steve Langasek
 Missed this.

 It is on the filesystem, and from reading the code it looks as if
 timedated will error out if it is present and can't be written to.

 So as long as this is the case, we absolutely do.

No, absolutely *not*.  Do not pile more hacks on top of hacks.  It is a bug
that /etc/adjtime is present, and it is a bug that timedated attempts to
manipulate it in Ubuntu.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-27 Thread Steve Langasek
/etc/adjtime was being created by live-build, behavior inherited from
Debian where /etc/adjtime is still used.  I've uploaded live-build to
drop the file.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-27 Thread Steve Langasek
(Note that my system here, which was installed way back from an
alternate CD, doesn't have /etc/adjtime and there are no problems with
timezone setting - so there should be no risk of regression by having
the file removed.)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-26 Thread Stéphane Graber
Added a debdiff for initramfs-tools-ubuntu-touch adding the new synced
mode.

This appears to work as expected on my device. I'll let whoever lands
the reset take care of landing that one first.

** Patch added: Debdiff for initramfs-tools-ubnutu-touch
   
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-ubuntu-touch/+bug/1227520/+attachment/3843356/+files/add-synced-mode.diff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-ubuntu-touch/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-26 Thread Stéphane Graber
Since those bits don't have any dependencies between each other, we
can't fix the ordering using those, so I'd strongly suggest they all
land in the same image so it's actually possible to confirm it all
works.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-ubuntu-touch/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-26 Thread Stéphane Graber
Added a debdiff for lxc-android-config to drop the existing entries and
replace them by a new synced entry for /etc/writable.

Note that before this lands, you'll need to make sure initramfs-tools-
ubuntu-touch is uploaded and built, that android gets a no change
rebuild to pick up initramfs-tools-ubuntu-touch and that the livecd-
rootfs change has also landed.

Should any of those be missing, I'd expect the boot to still work but
/etc/writable to end up read-only (if it exists).

** Patch added: Debdiff for lxc-android-config
   
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-ubuntu-touch/+bug/1227520/+attachment/3843384/+files/add-etc-writable.diff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-ubuntu-touch/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-26 Thread Martin Pitt
Thanks Stéphane! Note, the lxc-android-config debdiff needs a bug ref in
debian/changelog, otherwise it matches what I previously pushed to the
branch (except for the new synced bit of course).

The livecd-rootfs change (http://bazaar.launchpad.net/~ubuntu-core-dev
/livecd-rootfs/trunk/revision/848) and my systemd patch (attached) are
still current.

** Changed in: initramfs-tools-ubuntu-touch (Ubuntu)
   Status: New = Fix Committed

** Changed in: initramfs-tools-ubuntu-touch (Ubuntu)
 Assignee: (unassigned) = Stéphane Graber (stgraber)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-ubuntu-touch/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-25 Thread Martin Pitt
So, to summarize my understanding what should happen (sorry, I'm still
quite new to that touch layout, so I rather make sure):

 * livecd-rootfs creates /etc/writable/ (use a generic name as we might need it 
for other cases, and please no dotfiles)
 * livecd-rootfs moves /etc/localtime to /etc/writable/localtime and adds a 
corresponding symlink
 * lxc-android-config declares /etc/writable as writable  - this would create 
a mount point, and hide the original contents of /etc/writable/ as created by 
livecd-rootfs; how does the mounted file system get /etc/writable/zoneinfo? Is 
that done magically by the transition flag in 
/etc/system-image/writable-paths?
 * timedated and tzdata's postinst check if /etc/localtime point to 
/etc/writable (i. e. not to /usr/share/zoneinfo) and do its operation on the 
symlink target instead as a fallback.

** Also affects: livecd-rootfs (Ubuntu)
   Importance: Undecided
   Status: New

** Also affects: lxc-android-config (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-25 Thread Martin Pitt
Oh, and we'd drop /etc/localtime from /etc/system-image/writable-paths
instead.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-25 Thread Martin Pitt
 how does the mounted file system get /etc/writable/zoneinfo? Is that
done magically by the transition flag in /etc/system-image/writable-
paths?

I just tested that by temporarily making the image writable, replicating
the steps that livecd-rootfs and lxc-android-config would do, and that
seems to work.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-25 Thread Iain Lane
Yeah, AFAIK it gets copied according to the transition flag the first
time it shows up. Quote from IRC:

24/09 15:42:51 stgraber so any file (or directory) listed in writable-
paths will be copied to /userdata and bind-mounted on first boot, if the
content changes in the rootfs after that, you won't see it until you do
a factory reset (which will trigger another copy from the rootfs to
/userdata)

Not sure what you mean by /etc/writable/zoneinfo though - a typo?

I think you need to care for /etc/timezone and maybe also /etc/adjtime
too.

And the code changes required in timedated too, of course.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-25 Thread Martin Pitt
** Changed in: systemd (Ubuntu)
   Status: Incomplete = Triaged

** Changed in: lxc-android-config (Ubuntu)
   Status: New = Triaged

** Changed in: livecd-rootfs (Ubuntu)
   Status: New = In Progress

** Changed in: livecd-rootfs (Ubuntu)
 Assignee: (unassigned) = Martin Pitt (pitti)

** Changed in: systemd (Ubuntu)
Milestone: None = ubuntu-13.09

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-25 Thread Launchpad Bug Tracker
** Branch linked: lp:ubuntu/lxc-android-config

** Branch linked: lp:livecd-rootfs

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-25 Thread Martin Pitt
livecd-rootfs changes pushed to 
http://bazaar.launchpad.net/~ubuntu-core-dev/livecd-rootfs/trunk/revision/848
writable-paths changes pushed to 
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/lxc-android-config/saucy/revision/102

I tested those by

 * making image writable
 * umounting /etc/{adjtime,localtime,timezone}
 * Running the new live-build/ubuntu-touch/hooks/03-etc-writable.chroot script
 * Replacing /etc/system-image/writable-paths  with the new version from above 
branch
 * making image non-writable again, reboot

Now I have

$ ls -l /etc/{adjtime,localtime,timezone}
lrwxrwxrwx 1 root root 21 Sep 25 09:22 /etc/adjtime - /etc/writable/adjtime
lrwxrwxrwx 1 root root 23 Sep 25 09:22 /etc/localtime - /etc/writable/localtime
lrwxrwxrwx 1 root root 22 Sep 25 09:22 /etc/timezone - /etc/writable/timezone

and I can create new files in /etc/writable/. So I'm fairly sure that
this is ok, but peer review highly appreciated before I actually upload
this. Also, I believe Oliver needs to add that to some google docs to
get a change request.

** Changed in: livecd-rootfs (Ubuntu)
   Status: In Progress = Fix Committed

** Changed in: lxc-android-config (Ubuntu)
   Status: Triaged = Fix Committed

** Changed in: lxc-android-config (Ubuntu)
 Assignee: (unassigned) = Martin Pitt (pitti)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-25 Thread Martin Pitt
This updates systemd's timedated to get along with those /etc/writable
symlinks. Tested with both the normal files as well as an /etc/writable/
structure.

** Patch added: debdiff for systemd's timedated
   
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1227520/+attachment/3840261/+files/systemd.debdiff

** Changed in: systemd (Ubuntu)
   Status: Triaged = Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-25 Thread Martin Pitt
So as far as I can see, all patches are ready for upload now. I tested
them, but I'd appreciate another set of eyes on it. Stephane, are you ok
with this approach? I'm ready to upload the three at any time.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-25 Thread Ubuntu Foundations Team Bug Bot
** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-25 Thread Martin Pitt
Adding initramfs-tools-ubuntu-touch tasks. Stephane says that this needs
a new mode for /etc/system-image/writable-paths:

stgraber | pitti: so as a summary, I'd agree with the change if you
change from persistent to synced (better names are welcome) and also
propose an initramfs-tools-ubuntu-touch change to introduce that new
synced mode (the code will need to recursively iterate through the
source directory and only copy files and directories that don't already
exist in the target)

I'm not sure when I'll have time to work on that; I was originally asked
to help out with timedated only, not to competely understand and
redesign our approach of handling /etc on the phone.. So help with that
from someone who already understands the initramfs magic appreciated.

** Also affects: initramfs-tools-ubuntu-touch (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-ubuntu-touch/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-25 Thread Steve Langasek
On Wed, Sep 25, 2013 at 08:54:31AM -, Iain Lane wrote:

 I think you need to care for /etc/timezone and maybe also /etc/adjtime
 too.

We absolutely do not need to do this for /etc/adjtime.  /etc/adjtime is not
used in Ubuntu, and shouldn't even be on the filesystem.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-ubuntu-touch/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-24 Thread Iain Lane
If you issue timedated's SetTimezone D-Bus call and strace the daemon,
you see that it fails because of this:

  symlink(../usr/share/zoneinfo/Europe/Berlin,
/etc/.localtime4e49606a750b8c2c) = -1 EROFS (Read-only file system)

Which means that timedated is trying, entirely sensibly, to atomically
overwrite the /etc/localtime symlink with the new timezone. This doesn't
work with our ro-/etc scheme that we have on our device images. There
will be a similar problem with updating /etc/timezone atomically too,
but that's a file instead of a symlink.

The rough workaround that we have in mind (suggested by cjwatson,
thanks) is to create a writable directory and make /etc/localtime
/etc/timezone /etc/adjtime be symlinks to files/symlinks as appropriate
inside there, which are themselves atomically updated. Do this for the
fallback case (EROFS) only.

It does mean that we'll need to play whack-a-mole with anything else
which thinks it can update these, sadly. I wonder if it'd be better to
revisit making the whole of /etc writable on our images and deal with
the conffile issues another way.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-24 Thread Sebastien Bacher
(Ccing Steve and Stéphane to get their input.)

Do you have recommendations on what's the best way forward there, to get
things working for v1, and to get things properly working on a converged
world (without too much workarounds and hacks)?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-24 Thread Martin Pitt
Please note that with a readonly /etc and the gross mount individual
files to writable partitions hack, there is no way to implement that in
a race free manner: As that setup makes it impossible to do rename() or
use symlinks, the only thing that programs like timedated or tzdata's
configure could do is to truncate() the existing /etc/localtime and
write the new data into it. That means that during that time (and until
the write cache catches up), any program which tries to determine the
current time zone will misbehave or even crash, as it can only read junk
from /etc/localtime.

I highly suggest to at least change our current hack to have a writable
/data/ partition and symlink files from /etc/ to that. This would at
least make atomic file changes possible in /data. The best way would
still be to either have a writable /etc or overlayfs/aufs on /etc,
though. There are certainly other programs which want to change /etc/,
and it seems our time would be better spent building overlayfs/aufs for
arm than with tracking down an unknown number of programs/applications
that change files in /etc?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-24 Thread Stéphane Graber
So I think your best bet here is to change those daemons to fallback to 
in-place file content changes when atomic edits fail because of writable fs.
If /etc/localtime is already a symlink in the rootfs, you should be able to 
change its target without much trouble too.

Switching those files to be symlinks in the base rootfs is a bad idea
which we initially considered. It's bad because we then have no way to
get the original value of those, so we'd need something to create the
target with a sensible content at boot time, which isn't terribly
optimal. Also symlinks have a tendency to confuse some stat checks in
various piece of software (probably not a big concern for
timezone/localtime though).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-24 Thread Martin Pitt
Stéphane Graber [2013-09-24 13:57 -]:
 So I think your best bet here is to change those daemons to fallback
 to in-place file content changes when atomic edits fail because of
 writable fs.

As I wrote above that can only be a workaround hack. Changing such
kind of files inline is a source of race conditions and program
crashes, not a solution.

 If /etc/localtime is already a symlink in the rootfs, you should be
 able to change its target without much trouble too.

Not if it points to a file in /usr/share/zoneinfo/... You don't want
to change the contents of the target file, but you want to change the
symlink itself to a new target. But the latter again doesn't work on
an r/o file system, so we'd need some intermediate file like
/etc/localtime → /data/localtime → /usr/share/zoneinfo/...

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-24 Thread Iain Lane
The u-s-s side should be fine (but if there are any unexpected issues
here then I'll take care of them).

** Changed in: ubuntu-system-settings (Ubuntu)
   Status: Confirmed = Invalid

** Changed in: ubuntu-system-settings (Ubuntu)
 Assignee: (unassigned) = Iain Lane (laney)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-24 Thread Iain Lane
We can make writable directories in /etc, so ACK for your setting (it's
what cjwatson suggested) but with s!data!etc/.timedated! (or so).

pitti agreed to work on a patch for this in #ubuntu-devel earlier;
thanks a lot.

** Changed in: systemd (Ubuntu)
 Assignee: (unassigned) = Martin Pitt (pitti)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-24 Thread Martin Pitt
Changing timedated is blocked until we actually get writable directories
in /etc/, setting to incomplete until that lands.

** Changed in: systemd (Ubuntu)
   Status: Confirmed = Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-24 Thread Iain Lane
On Tue, Sep 24, 2013 at 03:50:58PM -, Martin Pitt wrote:
 Changing timedated is blocked until we actually get writable directories
 in /etc/, setting to incomplete until that lands.

It works now; try adding it to /etc/system-image/writable-paths (not
sure if you have to make the directory first).

-- 
Iain Lane  [ i...@orangesquash.org.uk ]
Debian Developer   [ la...@debian.org ]
Ubuntu Developer   [ la...@ubuntu.com ]

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-24 Thread Stéphane Graber
On Tue, Sep 24, 2013 at 04:14:41PM -, Iain Lane wrote:
 On Tue, Sep 24, 2013 at 03:50:58PM -, Martin Pitt wrote:
  Changing timedated is blocked until we actually get writable directories
  in /etc/, setting to incomplete until that lands.
 
 It works now; try adding it to /etc/system-image/writable-paths (not
 sure if you have to make the directory first).

The path needs to exist in the rootfs, otherwise we can't bind-mount
stuff onto it. So you need to have livecd-rootfs or some touch package
create the directory, move the files from /etc to that directory and
replace them with symlinks.

I don't believe any of those are conffiles or even shipped within
packages (they're generated at postinst), so there shouldn't be any need
for dpkg-divert or similar magic to keep stuff consistent.

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-24 Thread Steve Langasek
Stéphane,

I've always been uncomfortable with using per-file bind mounts instead
of symlinks for this.  Mounts carry a small but real penalty in the
kernel; we don't want the kernel to be using memory tracking thousands
of mounts on the phone!

Why do you prefer bind mounts instead of symlinks here?  I can't see any
advantage to this, and while it wouldn't solve the /etc/localtime case,
it would help other uses where the handling tools know how to read
through symlinks.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1227520] Re: Timezone changes are not working due to ro /etc and bind mounts

2013-09-24 Thread Stéphane Graber
My main problem with symlinks are that we wouldn't be able to access the 
original file as the .tar.xz would contain a symlink instead of the file it's 
diverting.
Symlinks also come with the problem that some tests may fail (the symlink is 
typically seen as a file but may also be a directory) and some tools won't 
recurse through symlinks in the same way they do through directories.

On top of that, outside of the very small performance gain we'd gain, they 
really wouldn't solve much, this bug highlights two problematic cases:
 - Atomic file modification (by creating another file, then doing the 
rename+delete) which isn't possible as the directory itself is read-only. This 
would be no different with symlinks.
 - Symlink target changes. This actually works with bind-mounts, if you change 
the target of the target file but doesn't with symlinks as it'll instead try to 
change the original file which is read-only (unless we go through a separate 
read-write directory and add an extra step as was discussed in this bug).

So all in all, I saw symlinks as adding a lot of complexity (copying any
file/directory they replace in some other location of the rootfs, ...)
for only a barely measurable performance gain (and arguably a cleaner
/proc/mounts, if anyone cares).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227520

Title:
  Timezone changes are not working due to ro /etc and bind mounts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1227520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs