Debian Bug report logs -
#431181
resolvconf: Please replace abuse of /dev/shm with /lib/init/rw and /var
Reported by: Roger Leigh <rleigh@debian.org>
Date: Sat, 30 Jun 2007 13:30:01 UTC
Severity: important
Tags: patch
Found in version resolvconf/1.37
Fixed in version resolvconf/1.38
Done: Thomas Hood <jdthood@yahoo.co.uk>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, resolvconf maintainers <resolvconf-devel@lists.alioth.debian.org>:
Bug#431181; Package resolvconf.
(full text, mbox, link).
Acknowledgement sent to Roger Leigh <rleigh@debian.org>:
New Bug report received and forwarded. Copy sent to resolvconf maintainers <resolvconf-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: resolvconf
Version: 1.37
Severity: important
resolvconf is currently making directories and files under /dev/shm.
This namespace is reserved for POSIX shared memory (as specified in
SUSv3) by functions such as shm_open(3). resolvconf's use of this
namespace is not allowed, and could potentially cause breakage.
Now that /lib/init/rw exists, resolvconf has no need to use /dev/shm
inappropriately. Please could you switch to using /lib/init/rw and
then /var after it is available?
Thanks,
Roger
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (990, 'unstable')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.18-3-powerpc
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages resolvconf depends on:
ii coreutils 5.97-5.3 The GNU core utilities
ii debconf [debconf-2.0] 1.5.13 Debian configuration management sy
ii lsb-base 3.1-23.1 Linux Standard Base 3.1 init scrip
resolvconf recommends no packages.
-- debconf information excluded
Message sent on to Roger Leigh <rleigh@debian.org>:
Bug#431181.
(full text, mbox, link).
Message #8 received at 431181-submitter@bugs.debian.org (full text, mbox, reply):
Roger Leigh wrote:
> Please could you switch to using /lib/init/rw and
> then /var after it is available?
Can you supply a patch?
--
Thomas Hood
Tags added: patch
Request was from Roger Leigh <rleigh@whinlatter.ukfsn.org>
to control@bugs.debian.org.
(Mon, 02 Jul 2007 20:57:02 GMT) (full text, mbox, link).
Acknowledgement sent to Roger Leigh <rleigh@whinlatter.ukfsn.org>:
Extra info received and filed, but not forwarded.
(full text, mbox, link).
Message #15 received at 431181-quiet@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
tags 431181 +patch
thanks
Thomas Hood <jdthood@gmail.com> writes:
> Roger Leigh wrote:
>> Please could you switch to using /lib/init/rw and
>> then /var after it is available?
>
> Can you supply a patch?
Attached. It works for me, and should allow clean install and upgrade
(upgrade tested). I added a report_info() function in the postinst.
It will only migrate an existing setup if the user hasn't customised
the /etc/resolvconf/run symlink. It also removes the devfs checks
(not needed for /lib/init/rw--it's tmpfs only).
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
[resolvconf-initrw.patch (text/x-diff, inline)]
diff -urN resolvconf-1.37.original/debian/changelog resolvconf-1.38/debian/changelog
--- resolvconf-1.37.original/debian/changelog 2006-12-13 14:14:01.000000000 +0000
+++ resolvconf-1.38/debian/changelog 2007-07-02 21:39:07.021322227 +0100
@@ -1,3 +1,13 @@
+resolvconf (1.38) unstable; urgency=low
+
+ * debian/postinst:
+ - Use /lib/init/rw instead of /dev/shm.
+ + Migrate existing users of /dev/shm/resolvconf to /lib/init/rw.
+ + Add report_info() function.
+ * README: Use /lib/init/rw instead of /dev/shm.
+
+ -- Roger Leigh <rleigh@debian.org> Mon, 02 Jul 2007 21:38:56 +0100
+
resolvconf (1.37) unstable; urgency=high
[ Thomas Hood ]
diff -urN resolvconf-1.37.original/debian/postinst resolvconf-1.38/debian/postinst
--- resolvconf-1.37.original/debian/postinst 2006-08-10 17:08:49.000000000 +0100
+++ resolvconf-1.38/debian/postinst 2007-07-02 21:37:41.259008640 +0100
@@ -8,6 +8,7 @@
MYNAME=resolvconf.postinst
report() { echo "${MYNAME}: $*" ; }
report_err() { report "Error: $*" >&2 ; }
+report_info() { report "Info: $*" >&2 ; }
### Disable rogue hook scripts ###
# This should be kept in sync with the config script
@@ -66,6 +67,18 @@
if [ -z "$RUN_CANONICALPATH" ] ; then
report_err "Deleting /etc/resolvconf/run symlink whose canonical path could not be determined"
rm -f /etc/resolvconf/run
+ elif [ "$RUN_CANONICALPATH" = "/dev/shm/resolvconf" ] && \
+ [ -d /lib/init/rw ] \
+ && [ -w /lib/init/rw ] \
+ && [ -r /proc/mounts ] \
+ && grep -qs "^tmpfs[[:space:]]\+/lib/init/rw[[:space:]]\+tmpfs[[:space:]]\+\([^[:space:]]\+,\)\?rw" /proc/mounts \
+ && { [ -d /lib/init/rw/resolvconf ] || mkdir -v /lib/init/rw/resolvconf ; } \
+ && { [ -d /lib/init/rw/resolvconf/interface ] || mkdir -v /lib/init/rw/resolvconf/interface ; }
+ then
+ report_info "Migrating /dev/shm/resolvconf to /lib/init/rw/resolvconf"
+ cp -a /dev/shm/resolvconf/* /lib/init/rw/resolvconf
+ rm -f /etc/resolvconf/run
+ ln -s /lib/init/rw/resolvconf /etc/resolvconf/run
fi
fi
# Delete it if it isn't a directory or a link to one
@@ -87,17 +100,16 @@
mkdir -v "${RUN_CANONICALPATH}/interface"
else
# It's a nonexistent
- # Use /dev/shm if possible
+ # Use /lib/init/rw if possible
if \
- [ -d /dev/shm ] \
- && [ -w /dev/shm ] \
+ [ -d /lib/init/rw ] \
+ && [ -w /lib/init/rw ] \
&& [ -r /proc/mounts ] \
- && grep -qs "^tmpfs[[:space:]]\+/dev/shm[[:space:]]\+tmpfs[[:space:]]\+\([^[:space:]]\+,\)\?rw" /proc/mounts \
- && ! grep -qs '[[:space:]]/dev[[:space:]]devfs[[:space:]]' /proc/mounts \
- && { [ -d /dev/shm/resolvconf ] || mkdir -v /dev/shm/resolvconf ; } \
- && { [ -d /dev/shm/resolvconf/interface ] || mkdir -v /dev/shm/resolvconf/interface ; }
+ && grep -qs "^tmpfs[[:space:]]\+/lib/init/rw[[:space:]]\+tmpfs[[:space:]]\+\([^[:space:]]\+,\)\?rw" /proc/mounts \
+ && { [ -d /lib/init/rw/resolvconf ] || mkdir -v /lib/init/rw/resolvconf ; } \
+ && { [ -d /lib/init/rw/resolvconf/interface ] || mkdir -v /lib/init/rw/resolvconf/interface ; }
then
- ln -s /dev/shm/resolvconf /etc/resolvconf/run
+ ln -s /lib/init/rw/resolvconf /etc/resolvconf/run
else
mkdir -v /etc/resolvconf/run
mkdir -v /etc/resolvconf/run/interface
diff -urN resolvconf-1.37.original/README resolvconf-1.38/README
--- resolvconf-1.37.original/README 2005-12-13 10:09:41.000000000 +0000
+++ resolvconf-1.38/README 2007-07-02 20:48:30.572491702 +0100
@@ -398,7 +398,7 @@
+ run/
Directory where run time files are stored. This can be replaced by
a symlink to a directory on another filesystem if the admin so
- desires -- e.g., to /dev/shm/resolvconf/ .
+ desires -- e.g., to /lib/init/rw/resolvconf/ .
+ update.d/
Scripts to run when nameserver information is updated
+ update-libc.d/
[Message part 3 (application/pgp-signature, inline)]
Message sent on to Roger Leigh <rleigh@debian.org>:
Bug#431181.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, resolvconf maintainers <resolvconf-devel@lists.alioth.debian.org>:
Bug#431181; Package resolvconf.
(full text, mbox, link).
Acknowledgement sent to Roger Leigh <rleigh@whinlatter.ukfsn.org>:
Extra info received and forwarded to list. Copy sent to resolvconf maintainers <resolvconf-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #23 received at 431181@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi folks,
Has anything happened regarding this bug? I would really like to see
this fixed for Lenny. The patch I provided has been tested, including
for Etch->Lenny upgrades.
Thanks,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
[Message part 2 (application/pgp-signature, inline)]
Information forwarded to debian-bugs-dist@lists.debian.org, resolvconf maintainers <resolvconf-devel@lists.alioth.debian.org>:
Bug#431181; Package resolvconf.
(full text, mbox, link).
Acknowledgement sent to Daniel Kahn Gillmor <dkg-debian.org@fifthhorseman.net>:
Extra info received and forwarded to list. Copy sent to resolvconf maintainers <resolvconf-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #28 received at 431181@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
tags 431181 +pending
thanks
On Mon 2007-12-31 06:10:17 -0500, Roger Leigh wrote:
> Has anything happened regarding this bug? I would really like to
> see this fixed for Lenny. The patch I provided has been tested,
> including for Etch->Lenny upgrades.
Thanks for the patch, and for the ping, Roger. I just read through
and tested your patch myself, and it works fine. I've committed it to
svn-resolvconf on alioth, so it should be present in resolvconf 1.38
when that comes out.
Other resolvconf developers: please report back if you see it creating
problems.
fwiw, I did a bit of reading to find references to this change, and
only found the selinux reference policy's switch to expecting
/lib/init/rw as of 20070507 [0]. It was added to the initscripts
package as of 2.86.ds1-23 (2006-09-22). If there is any sort of
concerted push to get all packages to switch to using that location
for their r/w files, it could probably be better-documented. I
couldn't find anything on wiki.debian.org, for example. Maybe it'd be
worth writing something up about it, so there's a reference for other
package authors to know what's going on?
Maybe try to get a guideline inserted into debian-policy?
Regards,
--dkg
[0] http://packages.debian.org/changelogs/pool/main/r/refpolicy/refpolicy_0.0.20070507-5/changelog#versionversion0.0.20070507-4
[Message part 2 (application/pgp-signature, inline)]
Tags added: pending
Request was from Daniel Kahn Gillmor <dkg-debian.org@fifthhorseman.net>
to control@bugs.debian.org.
(Mon, 31 Dec 2007 20:18:03 GMT) (full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, resolvconf maintainers <resolvconf-devel@lists.alioth.debian.org>:
Bug#431181; Package resolvconf.
(full text, mbox, link).
Acknowledgement sent to Roger Leigh <rleigh@whinlatter.ukfsn.org>:
Extra info received and forwarded to list. Copy sent to resolvconf maintainers <resolvconf-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #35 received at 431181@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Daniel Kahn Gillmor <dkg-debian.org@fifthhorseman.net> writes:
> On Mon 2007-12-31 06:10:17 -0500, Roger Leigh wrote:
>
>> Has anything happened regarding this bug? I would really like to
>> see this fixed for Lenny. The patch I provided has been tested,
>> including for Etch->Lenny upgrades.
>
> Thanks for the patch, and for the ping, Roger. I just read through
> and tested your patch myself, and it works fine. I've committed it to
> svn-resolvconf on alioth, so it should be present in resolvconf 1.38
> when that comes out.
Many thanks.
> fwiw, I did a bit of reading to find references to this change, and
> only found the selinux reference policy's switch to expecting
> /lib/init/rw as of 20070507 [0]. It was added to the initscripts
> package as of 2.86.ds1-23 (2006-09-22). If there is any sort of
> concerted push to get all packages to switch to using that location
> for their r/w files, it could probably be better-documented. I
> couldn't find anything on wiki.debian.org, for example. Maybe it'd
> be worth writing something up about it, so there's a reference for
> other package authors to know what's going on?
I don't recall seeing any formal documentation--just the discussion on
-devel which resulted in its addition. Its purpose (writable
filesystem for early boot) matches what resolvconf needs perfectly.
> Maybe try to get a guideline inserted into debian-policy?
I think this would be a useful addition to policy. However, IIRC
policy only documents existing practice, so the selinux and resolvconf
changes would probably need using as examples. The lack of users
might be what has held this back.
Thanks,
Roger
PS: Happy New Year!
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
[Message part 2 (application/pgp-signature, inline)]
Reply sent to Thomas Hood <jdthood@yahoo.co.uk>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Roger Leigh <rleigh@debian.org>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #40 received at 431181-close@bugs.debian.org (full text, mbox, reply):
Source: resolvconf
Source-Version: 1.38
We believe that the bug you reported is fixed in the latest version of
resolvconf, which is due to be installed in the Debian FTP archive:
resolvconf_1.38.dsc
to pool/main/r/resolvconf/resolvconf_1.38.dsc
resolvconf_1.38.tar.gz
to pool/main/r/resolvconf/resolvconf_1.38.tar.gz
resolvconf_1.38_all.deb
to pool/main/r/resolvconf/resolvconf_1.38_all.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 431181@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Thomas Hood <jdthood@yahoo.co.uk> (supplier of updated resolvconf package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Tue, 31 Dec 2007 12:00:00 +0100
Source: resolvconf
Binary: resolvconf
Architecture: source all
Version: 1.38
Distribution: unstable
Urgency: low
Maintainer: resolvconf maintainers <resolvconf-devel@lists.alioth.debian.org>
Changed-By: Thomas Hood <jdthood@yahoo.co.uk>
Description:
resolvconf - nameserver information handler
Closes: 412511 413752 415783 431181 451751
Changes:
resolvconf (1.38) unstable; urgency=low
.
[ Thomas Hood ]
* Remove ru versions of man pages which failed lexgrog check
* Add initscript lsb header (Closes: #451751)
* Eliminate obsolete checks for old bad hook scripts
(Addresses but does not close # 388956)
* New nscd pidfile location is /var/run/nscd/nscd.pid
(Closes: #415783) Thanks to Bob Knock.
* Add gl.po, thanks to Jacobo Tarrio (Closes: #412511)
* Add pt.po, thanks to Miguel Figueiredo (Closes: #413752)
.
[ Daniel Kahn Gillmor ]
* Use /lib/init/rw instead of /dev/shm (Closes: #431181)
Thanks, Roger Leigh!
Files:
e5f0fe7414a7775dcdf68989bc80f7a1 736 net optional resolvconf_1.38.dsc
e5ca27168f615ca3fc8b60834e6659b4 70531 net optional resolvconf_1.38.tar.gz
682388d3f3ddf0210a6dd9132bede93f 50832 net optional resolvconf_1.38_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHg6qAaGRzDfCV5eQRAqx4AJ9HG61HmmUDcDDnj76GkbuYySDCKgCgjZvc
ji8XCafOVjqppJudrZh6UkE=
=U2it
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Sun, 17 Feb 2008 07:33:34 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Thu Jan 11 10:11:48 2018;
Machine Name:
beach
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.