Bug#391915: [Pbuilder-maint] Bug#391915: pbuilder: pbuilder-uml should not overwrite network configuration

2007-03-28 Thread Junichi Uekawa
> > 
> > the patch in the following message doesn't look correct.
> > Would you care to re-send?
> 
> Humm, meaning that it doesn't apply anymore or the logic is bogus?
> Anyway I'll need some days as I'm in the middle of change country
> mess... ;)

actually, I read the bug report and found a better patch later on, so
this bug can be closed with the next upload.



regards,
junichi
-- 
[EMAIL PROTECTED],netfort.gr.jp}   Debian Project


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#391915: [Pbuilder-maint] Bug#391915: pbuilder: pbuilder-uml should not overwrite network configuration

2007-03-28 Thread Mattia Dongili
On Tue, Mar 27, 2007 at 10:44:07PM +0900, Junichi Uekawa wrote:
> Hi,
> 
> the patch in the following message doesn't look correct.
> Would you care to re-send?

Humm, meaning that it doesn't apply anymore or the logic is bogus?
Anyway I'll need some days as I'm in the middle of change country
mess... ;)

> > [...]
> > > > pbuilder copies the system's /etc/{resolv.conf,hosts,hostname} to the
> > > > build chroot. This is wrong for pbuilder-user-mode-linux, since the
> > > > host information is not necessary correct for the guest.
> > > > 
> > > > For example if the host has "nameserver 0.0.0.0" in /etc/resolv.conf,
> > > > then the UML guest will have a broken network configuration.
> > > > 
> > > > The following patch appears to fix it.
> > > 
> > > It looks quite sane to me. The only problem being that this assumes
> > > you've correctly configured the domain and nameserver directives for
> > > the [network]'s rootstrap module.
> > > So one may want to copy resolv.conf if it doesn't exist (and only
> > > resolv.conf).
> > 
> > Maybe the following is safer?
> > 
> > Index: pbuilder-modules
> > ===
> > RCS file: /cvsroot/pbuilder/pbuilder/pbuilder-modules,v
> > retrieving revision 1.103
> > diff -u -r1.103 pbuilder-modules
> > --- pbuilder-modules6 Nov 2006 20:06:25 -   1.103
> > +++ pbuilder-modules8 Dec 2006 18:28:35 -
> > @@ -327,7 +327,18 @@
> >  
> >  function copy_local_configuration () {
> >  echo " -> copying local configuration"
> > -for a in hosts hostname resolv.conf; do 
> > +# if running into an UML instance don't touch networking
> > +# configuration if already present, and eventually 
> > +# only copy resolv.conf
> > +if [ "${INTERNAL_BUILD_UML}" = "yes" ] ; then
> > +   if ! [ -f "$BUILDPLACE/etc/resolv.conf" ] ; then
> > +   echo "-> UML copy only"
> > +   BUILDPLACE_CONFFILES="resolv.conf"
> > +   fi
> > +else
> > +   BUILDPLACE_CONFFILES="hosts hostname resolv.conf"
> > +fi
> > +for a in $BUILDPLACE_CONFFILES; do 
> > rm -f "$BUILDPLACE/etc/$a"
> > if [ ! -f "/etc/$a" ]; then
> > echo "E: /etc/$a does not exist, your setup is insane. fix it" >&2

-- 
mattia
:wq!


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#391915: [Pbuilder-maint] Bug#391915: pbuilder: pbuilder-uml should not overwrite network configuration

2007-03-27 Thread Junichi Uekawa
Hi,

the patch in the following message doesn't look correct.
Would you care to re-send?

> [...]
> > > pbuilder copies the system's /etc/{resolv.conf,hosts,hostname} to the
> > > build chroot. This is wrong for pbuilder-user-mode-linux, since the
> > > host information is not necessary correct for the guest.
> > > 
> > > For example if the host has "nameserver 0.0.0.0" in /etc/resolv.conf,
> > > then the UML guest will have a broken network configuration.
> > > 
> > > The following patch appears to fix it.
> > 
> > It looks quite sane to me. The only problem being that this assumes
> > you've correctly configured the domain and nameserver directives for
> > the [network]'s rootstrap module.
> > So one may want to copy resolv.conf if it doesn't exist (and only
> > resolv.conf).
> 
> Maybe the following is safer?
> 
> Index: pbuilder-modules
> ===
> RCS file: /cvsroot/pbuilder/pbuilder/pbuilder-modules,v
> retrieving revision 1.103
> diff -u -r1.103 pbuilder-modules
> --- pbuilder-modules  6 Nov 2006 20:06:25 -   1.103
> +++ pbuilder-modules  8 Dec 2006 18:28:35 -
> @@ -327,7 +327,18 @@
>  
>  function copy_local_configuration () {
>  echo " -> copying local configuration"
> -for a in hosts hostname resolv.conf; do 
> +# if running into an UML instance don't touch networking
> +# configuration if already present, and eventually 
> +# only copy resolv.conf
> +if [ "${INTERNAL_BUILD_UML}" = "yes" ] ; then
> + if ! [ -f "$BUILDPLACE/etc/resolv.conf" ] ; then
> + echo "-> UML copy only"
> + BUILDPLACE_CONFFILES="resolv.conf"
> + fi
> +else
> + BUILDPLACE_CONFFILES="hosts hostname resolv.conf"
> +fi
> +for a in $BUILDPLACE_CONFFILES; do 
>   rm -f "$BUILDPLACE/etc/$a"
>   if [ ! -f "/etc/$a" ]; then
>   echo "E: /etc/$a does not exist, your setup is insane. fix it" >&2


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#391915: [Pbuilder-maint] Bug#391915: pbuilder: pbuilder-uml should not overwrite network configuration

2006-12-08 Thread Mattia Dongili
On Fri, Dec 08, 2006 at 04:09:44PM +0100, Mattia Dongili wrote:
> On Mon, Oct 09, 2006 at 02:31:34PM +0200, Marcus Better wrote:
[...]
> > pbuilder copies the system's /etc/{resolv.conf,hosts,hostname} to the
> > build chroot. This is wrong for pbuilder-user-mode-linux, since the
> > host information is not necessary correct for the guest.
> > 
> > For example if the host has "nameserver 0.0.0.0" in /etc/resolv.conf,
> > then the UML guest will have a broken network configuration.
> > 
> > The following patch appears to fix it.
> 
> It looks quite sane to me. The only problem being that this assumes
> you've correctly configured the domain and nameserver directives for
> the [network]'s rootstrap module.
> So one may want to copy resolv.conf if it doesn't exist (and only
> resolv.conf).

Maybe the following is safer?

Index: pbuilder-modules
===
RCS file: /cvsroot/pbuilder/pbuilder/pbuilder-modules,v
retrieving revision 1.103
diff -u -r1.103 pbuilder-modules
--- pbuilder-modules6 Nov 2006 20:06:25 -   1.103
+++ pbuilder-modules8 Dec 2006 18:28:35 -
@@ -327,7 +327,18 @@
 
 function copy_local_configuration () {
 echo " -> copying local configuration"
-for a in hosts hostname resolv.conf; do 
+# if running into an UML instance don't touch networking
+# configuration if already present, and eventually 
+# only copy resolv.conf
+if [ "${INTERNAL_BUILD_UML}" = "yes" ] ; then
+   if ! [ -f "$BUILDPLACE/etc/resolv.conf" ] ; then
+   echo "-> UML copy only"
+   BUILDPLACE_CONFFILES="resolv.conf"
+   fi
+else
+   BUILDPLACE_CONFFILES="hosts hostname resolv.conf"
+fi
+for a in $BUILDPLACE_CONFFILES; do 
rm -f "$BUILDPLACE/etc/$a"
if [ ! -f "/etc/$a" ]; then
echo "E: /etc/$a does not exist, your setup is insane. fix it" >&2

-- 
mattia
:wq!


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#391915: [Pbuilder-maint] Bug#391915: pbuilder: pbuilder-uml should not overwrite network configuration

2006-12-08 Thread Mattia Dongili
On Mon, Oct 09, 2006 at 02:31:34PM +0200, Marcus Better wrote:
> Package: pbuilder
> Version: 0.159
> Severity: normal
> Tags: patch
> 
> pbuilder copies the system's /etc/{resolv.conf,hosts,hostname} to the
> build chroot. This is wrong for pbuilder-user-mode-linux, since the
> host information is not necessary correct for the guest.
> 
> For example if the host has "nameserver 0.0.0.0" in /etc/resolv.conf,
> then the UML guest will have a broken network configuration.
> 
> The following patch appears to fix it.

It looks quite sane to me. The only problem being that this assumes
you've correctly configured the domain and nameserver directives for
the [network]'s rootstrap module.
So one may want to copy resolv.conf if it doesn't exist (and only
resolv.conf).

-- 
mattia
:wq!


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]