[26375] in Source-Commits

home help back first fref pref prev next nref lref last post

Re: /svn/athena r25538 - trunk/debathena/config/reactivate/debian

daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Thu May 31 18:10:06 2012

Date: Thu, 31 May 2012 18:10:02 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Jonathan D Reed <jdreed@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <201205302144.q4ULiD5O021783@drugstore.mit.edu>
Message-ID: <alpine.GSO.1.10.1205311805360.18441@multics.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Wed, 30 May 2012, Jonathan D Reed wrote:

> Author: jdreed
> Date: 2012-05-30 17:44:13 -0400 (Wed, 30 May 2012)
> New Revision: 25538
>
> Added:
>   trunk/debathena/config/reactivate/debian/mount-athena.in
> Removed:
>   trunk/debathena/config/reactivate/debian/mount-athena
> Modified:
>   trunk/debathena/config/reactivate/debian/changelog
>   trunk/debathena/config/reactivate/debian/debathena-reactivate.install
>   trunk/debathena/config/reactivate/debian/script-athena
> Log:
> In reactivate:
>  * Transform the schroot fstab in the schroot config script to deal with
>    the /run transition
>
>
> Modified: trunk/debathena/config/reactivate/debian/changelog
> ===================================================================
> --- trunk/debathena/config/reactivate/debian/changelog	2012-05-30 19:57:58 UTC (rev 25537)
> +++ trunk/debathena/config/reactivate/debian/changelog	2012-05-30 21:44:13 UTC (rev 25538)
> @@ -1,4 +1,4 @@
> -debathena-reactivate (2.0.31) UNRELEASED; urgency=low
> +debathena-reactivate (2.0.31) unstable; urgency=low
>
>   * Stop creating a symlink from /var/run/athena-nologin to /etc/nologin,
>     because other thinks like to clobber /etc/nologin.  Our greeter (which
> @@ -15,8 +15,10 @@
>     bug (Debian: 623828)
>   * Also divert lightdm-session (lightdm's session wrapper) and wrap it in
>     snapshot-run
> +  * Transform the schroot fstab in the schroot config script to deal with
> +    the /run transition
>
> - -- Jonathan Reed <jdreed@mit.edu>  Wed, 30 May 2012 14:41:10 -0400
> + -- Jonathan Reed <jdreed@mit.edu>  Wed, 30 May 2012 17:44:07 -0400
>
> debathena-reactivate (2.0.30) unstable; urgency=low
>
>
> Modified: trunk/debathena/config/reactivate/debian/debathena-reactivate.install
> ===================================================================
> --- trunk/debathena/config/reactivate/debian/debathena-reactivate.install	2012-05-30 19:57:58 UTC (rev 25537)
> +++ trunk/debathena/config/reactivate/debian/debathena-reactivate.install	2012-05-30 21:44:13 UTC (rev 25538)
> @@ -9,7 +9,7 @@
> debian/su-warning etc/athena
> debian/login etc/schroot/chroot.d
> debian/script-athena etc/schroot
> -debian/mount-athena etc/schroot
> +debian/mount-athena.in etc/schroot
> debian/snapshot-run usr/lib/debathena-reactivate
> debian/reactivate usr/lib/debathena-reactivate
> debian/dbus-daemon-launch-helper lib/debathena-reactivate
>
> Copied: trunk/debathena/config/reactivate/debian/mount-athena.in (from rev 25500, trunk/debathena/config/reactivate/debian/mount-athena)
> ===================================================================
> --- trunk/debathena/config/reactivate/debian/mount-athena.in	                        (rev 0)
> +++ trunk/debathena/config/reactivate/debian/mount-athena.in	2012-05-30 21:44:13 UTC (rev 25538)
> @@ -0,0 +1,18 @@
> +# Note that the mount point will be prefixed by the chroot path
> +# (CHROOT_PATH)
> +#
> +# <file system>	<mount point>	<type>	<options>	<dump>	<pass>
> +/proc		/proc		none	rw,bind		0	0
> +/sys		/sys		none	rw,bind		0	0
> +/dev		/dev		none	rw,bind		0	0
> +_DEVSHM_	_DEVSHM_	none	rw,bind		0	0
> +/dev/pts	/dev/pts	none	rw,bind		0	0
> +_VARRUN_	_VARRUN_	none	rw,bind		0	0
> +_VARLOCK_	_VARLOCK_	none	rw,bind		0	0

Doing the edits as a separate commit from the copy would probably make the 
history easier to follow N years from now, but nor is this particularly 
complicated.

> +/var/log	/var/log	none	rw,bind		0	0
> +/var/tmp	/var/tmp	none	rw,bind		0	0
> +/afs		/afs		none	rw,bind		0	0
> +/mit		/mit		none	rw,bind		0	0
> +/tmp		/tmp		none	rw,bind		0	0
> +/media		/media		none	rw,rbind	0	0
> +/boot		/boot		none	ro,bind		0	0
>
> Modified: trunk/debathena/config/reactivate/debian/script-athena
> ===================================================================
> --- trunk/debathena/config/reactivate/debian/script-athena	2012-05-30 19:57:58 UTC (rev 25537)
> +++ trunk/debathena/config/reactivate/debian/script-athena	2012-05-30 21:44:13 UTC (rev 25538)
> @@ -1,3 +1,9 @@
> FSTAB="/etc/schroot/mount-athena"
> COPYFILES=""
> NSSDATABASES=""
> +
> +rm -f "${FSTAB}"
> +cp "${FSTAB}.in" "${FSTAB}"
> +sed -i -e "s|_VARRUN_|$(readlink -f /var/run)|g" \
> +       -e "s|_VARLOCK_|$(readlink -f /var/lock)|g" \
> +       -e "s|_DEVSHM_|$(readlink -f /dev/shm)|g" ${FSTAB}

This should work, but I would think that
sed -e foo -e bar -e baz < ${FSTAB}.in > ${FSTAB}
would be more ... portable, or something.
I guess maybe it would be a bit more efficient on the read/write syscalls.

But ... if you don't want to change it, I'll ack it anyway.

-Ben

home help back first fref pref prev next nref lref last post