From nobody@FreeBSD.org  Sat Dec 10 22:53:50 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E87FE16A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 10 Dec 2005 22:53:50 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B09BE43D4C
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 10 Dec 2005 22:53:50 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id jBAMroH8091382
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 10 Dec 2005 22:53:50 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id jBAMro35091381;
	Sat, 10 Dec 2005 22:53:50 GMT
	(envelope-from nobody)
Message-Id: <200512102253.jBAMro35091381@www.freebsd.org>
Date: Sat, 10 Dec 2005 22:53:50 GMT
From: SANETO Takanori <sanewo@ba2.so-net.ne.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: emulators/linux_base-8 Makefile typo cause install error
X-Send-Pr-Version: www-2.3

>Number:         90220
>Category:       ports
>Synopsis:       emulators/linux_base-8 Makefile typo cause install error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-emulation
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 10 23:00:23 GMT 2005
>Closed-Date:    Mon Dec 26 02:49:55 GMT 2005
>Last-Modified:  Mon Dec 26 02:49:55 GMT 2005
>Originator:     SANETO Takanori
>Release:        7.0-CURRENT
>Organization:
an individual
>Environment:
FreeBSD muse.sanewo.ddo.jp 7.0-CURRENT FreeBSD 7.0-CURRENT #764: Tue Nov 15 06:19:53 JST 2005     root@muse.sanewo.ddo.jp:/export/usr/obj/usr/src/sys/MUSE  i386
>Description:
              Due to typo in Makefile, emulators/linux_base-8 installation fails with following message:

mv: /compat/linux/etcnsswitch.conf.dist: No such file or directory

>How-To-Repeat:
              cd /usr/ports/emulators/linux_base-8; make install

>Fix:
              Following patch should fix this:

--- Makefile    4 Dec 2005 13:12:08 -0000       1.112
+++ Makefile    10 Dec 2005 22:16:45 -0000
@@ -145,7 +145,7 @@
                ${ECHO} $$R; \
                ${RPM} -U ${RPMFLAGS} ${RPMDIR}/$$R; \
        done
-       @${MV} ${PREFIX}/etcnsswitch.conf.dist ${PREFIX}/etc/nsswitch.conf.dist
+       @${MV} ${PREFIX}/etc/nsswitch.conf.dist ${PREFIX}/etc/nsswitch.conf.dist
        @test -f ${PREFIX}/etc/nsswitch.conf || cp ${PREFIX}/etc/nsswitch.conf.dist \
                ${PREFIX}/etc/nsswitch.conf
        @${FIND} ${PREFIX}/bin ${PREFIX}/sbin/ ${PREFIX}/usr/bin \

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-emulation 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Dec 10 23:03:19 UTC 2005 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90220 

From: Alexander Leidinger <Alexander@Leidinger.net>
To: bug-followup@FreeBSD.org, sanewo@ba2.so-net.ne.jp
Cc:  
Subject: Re: ports/90220: emulators/linux_base-8 Makefile typo cause install
 error
Date: Sun, 11 Dec 2005 17:28:36 +0100

 Hi,
 
 I can't reproduce this. Here it works just fine. The
 etcnsswitch.conf.dist file is created (have a look at the "FIXME"
 comment in the makefile) and moved to the right directory.
 
 Can you please do a "portupgrade -f linux_base-8" and report back if
 the error persists?
 
 Which version of the rpm port are you using?
 
 Bye,
 Alexander.
 
 -- 
                   Weird enough for government work.
 
 http://www.Leidinger.net                       Alexander @ Leidinger.net
   GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7

From: SANETO Takanori <sanewo@ba2.so-net.ne.jp>
To: Alexander Leidinger <Alexander@Leidinger.net>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/90220: emulators/linux_base-8 Makefile typo cause install
 error
Date: Mon, 12 Dec 2005 08:33:01 +0900

 Hi,
 My rpm port was rpm-4.0.4_3 (archivers/rpm4).
 With rpm-3.0.6_10, it worked just fine (no installation error, at least).
 
 I now realize that my patch was meaningless.
 (I thought it moves from WRKDIR to PREFIX, but...)
 
 Sorry for confusion.
 
 Alexander Leidinger wrote:
 > Hi,
 > 
 > I can't reproduce this. Here it works just fine. The
 > etcnsswitch.conf.dist file is created (have a look at the "FIXME"
 > comment in the makefile) and moved to the right directory.
 > 
 > Can you please do a "portupgrade -f linux_base-8" and report back if
 > the error persists?
 > 
 > Which version of the rpm port are you using?
 > 
 > Bye,
 > Alexander.
 > 
 

From: Alexander Leidinger <Alexander@Leidinger.net>
To: SANETO Takanori <sanewo@ba2.so-net.ne.jp>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/90220: emulators/linux_base-8 Makefile typo cause
	install error
Date: Mon, 12 Dec 2005 10:47:20 +0100

 SANETO Takanori <sanewo@ba2.so-net.ne.jp> wrote:
 
 > Hi,
 > My rpm port was rpm-4.0.4_3 (archivers/rpm4).
 > With rpm-3.0.6_10, it worked just fine (no installation error, at least).
 >
 > I now realize that my patch was meaningless.
 > (I thought it moves from WRKDIR to PREFIX, but...)
 
 Your patch: yes.
 Your bogreport: not at all.
 
 I try to get time this week to fix the issue for rpm-4.
 
 Bye,
 Alexander.
 
 -- 
 http://www.Leidinger.net  Alexander @ Leidinger.net: PGP ID = B0063FE7
 http://www.FreeBSD.org     netchild @ FreeBSD.org  : PGP ID = 72077137
 It pays to be obvious, especially if you have a reputation for subtlety.
 
 

From: Ulrich Spoerlein <q@galgenberg.net>
To: Alexander Leidinger <Alexander@Leidinger.net>
Cc: freebsd-emulation@freebsd.org, FreeBSD-gnats-submit@freebsd.org,
	SANETO Takanori <sanewo@ba2.so-net.ne.jp>
Subject: Re: ports/90220: emulators/linux_base-8 Makefile typo cause install error
Date: Tue, 13 Dec 2005 20:57:00 +0100

 >  I try to get time this week to fix the issue for rpm-4.
 
 Since I made the mess, attached is a patch that fixes it for both rpm3
 and rpm4. Just did a install/deinstall with both rpms, I hope this
 really fixes it.
 
 Ulrich Spoerlein
 
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/emulators/linux_base-8/Makefile,v
 retrieving revision 1.112
 diff -u -p -r1.112 Makefile
 --- Makefile	4 Dec 2005 13:12:08 -0000	1.112
 +++ Makefile	13 Dec 2005 19:55:08 -0000
 @@ -125,8 +125,8 @@ FALLBACK_ELF_MIB=	kern.fallback_elf_bran
  LINUX_ELF=		3
  PREVIOUS_ELF!=		/sbin/sysctl -n ${FALLBACK_ELF_MIB}
  
 -# FIXME. This will result in a file at /compat/linux/etcnsswitch.conf.dist (sic!)
 -RPMFLAGS+=	--relocate /etc/nsswitch.conf=/etc/nsswitch.conf.dist --badreloc
 +# FIXME: The double-// can go away, once we deprecate rpm-3
 +RPMFLAGS+=	--relocate /etc/nsswitch.conf=/etc//nsswitch.conf.dist --badreloc
  
  do-install:
  #
 @@ -145,7 +145,6 @@ do-install:
  		${ECHO} $$R; \
  		${RPM} -U ${RPMFLAGS} ${RPMDIR}/$$R; \
  	done
 -	@${MV} ${PREFIX}/etcnsswitch.conf.dist ${PREFIX}/etc/nsswitch.conf.dist
  	@test -f ${PREFIX}/etc/nsswitch.conf || cp ${PREFIX}/etc/nsswitch.conf.dist \
  		${PREFIX}/etc/nsswitch.conf
  	@${FIND} ${PREFIX}/bin ${PREFIX}/sbin/ ${PREFIX}/usr/bin \

From: SANETO Takanori <sanewo@ba2.so-net.ne.jp>
To: Alexander Leidinger <Alexander@Leidinger.net>,
        freebsd-emulation@freebsd.org, FreeBSD-gnats-submit@FreeBSD.org,
        SANETO Takanori <sanewo@ba2.so-net.ne.jp>
Cc:  
Subject: Re: ports/90220: emulators/linux_base-8 Makefile typo cause install
 error
Date: Sat, 17 Dec 2005 18:16:08 +0900

 It worked fine with me, except that when rpm4 is used, pkg-plist does
 not match actual files installed.
 
 From pkg-plist,
 
 var/lib/rpm/conflictsindex.rpm
 var/lib/rpm/fileindex.rpm
 var/lib/rpm/groupindex.rpm
 var/lib/rpm/nameindex.rpm
 var/lib/rpm/packages.rpm
 var/lib/rpm/providesindex.rpm
 var/lib/rpm/requiredby.rpm
 var/lib/rpm/triggerindex.rpm
 
 
 
 Ulrich Spoerlein wrote:
 >>  I try to get time this week to fix the issue for rpm-4.
 > 
 > Since I made the mess, attached is a patch that fixes it for both rpm3
 > and rpm4. Just did a install/deinstall with both rpms, I hope this
 > really fixes it.
 > 
 > Ulrich Spoerlein
 > 
 > Index: Makefile
 > ===================================================================
 > RCS file: /home/ncvs/ports/emulators/linux_base-8/Makefile,v
 > retrieving revision 1.112
 > diff -u -p -r1.112 Makefile
 > --- Makefile	4 Dec 2005 13:12:08 -0000	1.112
 > +++ Makefile	13 Dec 2005 19:55:08 -0000
 > @@ -125,8 +125,8 @@ FALLBACK_ELF_MIB=	kern.fallback_elf_bran
 >  LINUX_ELF=		3
 >  PREVIOUS_ELF!=		/sbin/sysctl -n ${FALLBACK_ELF_MIB}
 >  
 > -# FIXME. This will result in a file at /compat/linux/etcnsswitch.conf.dist (sic!)
 > -RPMFLAGS+=	--relocate /etc/nsswitch.conf=/etc/nsswitch.conf.dist --badreloc
 > +# FIXME: The double-// can go away, once we deprecate rpm-3
 > +RPMFLAGS+=	--relocate /etc/nsswitch.conf=/etc//nsswitch.conf.dist --badreloc
 >  
 >  do-install:
 >  #
 > @@ -145,7 +145,6 @@ do-install:
 >  		${ECHO} $$R; \
 >  		${RPM} -U ${RPMFLAGS} ${RPMDIR}/$$R; \
 >  	done
 > -	@${MV} ${PREFIX}/etcnsswitch.conf.dist ${PREFIX}/etc/nsswitch.conf.dist
 >  	@test -f ${PREFIX}/etc/nsswitch.conf || cp ${PREFIX}/etc/nsswitch.conf.dist \
 >  		${PREFIX}/etc/nsswitch.conf
 >  	@${FIND} ${PREFIX}/bin ${PREFIX}/sbin/ ${PREFIX}/usr/bin \
 

From: SANETO Takanori <sanewo@ba2.so-net.ne.jp>
To: SANETO Takanori <sanewo@ba2.so-net.ne.jp>
Cc: Alexander Leidinger <Alexander@Leidinger.net>,
        freebsd-emulation@freebsd.org, FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/90220: emulators/linux_base-8 Makefile typo cause install
 error
Date: Sat, 17 Dec 2005 18:20:16 +0900

 Oops, I've sent unfinished mail.
 
 In /compat/linux/var/lib/rpm, I see followings:
 
 % ls -l /compat/linux/var/lib/rpm
 total 2268
 -rw-r--r--  1 root  wheel   348160 Dec 15 23:45 Basenames
 -rw-r--r--  1 root  wheel    12288 Dec 15 23:45 Conflictname
 -rw-r--r--  1 root  wheel    94208 Dec 15 23:45 Dirnames
 -rw-r--r--  1 root  wheel   643072 Dec 15 23:45 Filemd5s
 -rw-r--r--  1 root  wheel    12288 Dec 15 23:45 Group
 -rw-r--r--  1 root  wheel     8192 Dec 15 23:45 Installtid
 -rw-r--r--  1 root  wheel    12288 Dec 15 23:45 Name
 -rw-r--r--  1 root  wheel  1327104 Dec 15 23:45 Packages
 -rw-r--r--  1 root  wheel    24576 Dec 15 23:45 Providename
 -rw-r--r--  1 root  wheel    12288 Dec 15 23:45 Provideversion
 -rw-r--r--  1 root  wheel    12288 Dec 15 23:45 Requirename
 -rw-r--r--  1 root  wheel    12288 Dec 15 23:45 Requireversion
 -rw-r--r--  1 root  wheel    12288 Dec 15 23:45 Sigmd5
 -rw-r--r--  1 root  wheel    12288 Dec 15 23:45 Triggername
 
 The contents of pkg-plist should be tailored for each rpm version, I think.
 
 Regards,
 
 SANETO Takanori wrote:
 > It worked fine with me, except that when rpm4 is used, pkg-plist does
 > not match actual files installed.
 > 
 >>From pkg-plist,
 > 
 > var/lib/rpm/conflictsindex.rpm
 > var/lib/rpm/fileindex.rpm
 > var/lib/rpm/groupindex.rpm
 > var/lib/rpm/nameindex.rpm
 > var/lib/rpm/packages.rpm
 > var/lib/rpm/providesindex.rpm
 > var/lib/rpm/requiredby.rpm
 > var/lib/rpm/triggerindex.rpm
 > 
 > 
 > 
 > Ulrich Spoerlein wrote:
 >>>  I try to get time this week to fix the issue for rpm-4.
 >> Since I made the mess, attached is a patch that fixes it for both rpm3
 >> and rpm4. Just did a install/deinstall with both rpms, I hope this
 >> really fixes it.
 >>
 >> Ulrich Spoerlein
 >>
 >> Index: Makefile
 >> ===================================================================
 >> RCS file: /home/ncvs/ports/emulators/linux_base-8/Makefile,v
 >> retrieving revision 1.112
 >> diff -u -p -r1.112 Makefile
 >> --- Makefile	4 Dec 2005 13:12:08 -0000	1.112
 >> +++ Makefile	13 Dec 2005 19:55:08 -0000
 >> @@ -125,8 +125,8 @@ FALLBACK_ELF_MIB=	kern.fallback_elf_bran
 >>  LINUX_ELF=		3
 >>  PREVIOUS_ELF!=		/sbin/sysctl -n ${FALLBACK_ELF_MIB}
 >>  
 >> -# FIXME. This will result in a file at /compat/linux/etcnsswitch.conf.dist (sic!)
 >> -RPMFLAGS+=	--relocate /etc/nsswitch.conf=/etc/nsswitch.conf.dist --badreloc
 >> +# FIXME: The double-// can go away, once we deprecate rpm-3
 >> +RPMFLAGS+=	--relocate /etc/nsswitch.conf=/etc//nsswitch.conf.dist --badreloc
 >>  
 >>  do-install:
 >>  #
 >> @@ -145,7 +145,6 @@ do-install:
 >>  		${ECHO} $$R; \
 >>  		${RPM} -U ${RPMFLAGS} ${RPMDIR}/$$R; \
 >>  	done
 >> -	@${MV} ${PREFIX}/etcnsswitch.conf.dist ${PREFIX}/etc/nsswitch.conf.dist
 >>  	@test -f ${PREFIX}/etc/nsswitch.conf || cp ${PREFIX}/etc/nsswitch.conf.dist \
 >>  		${PREFIX}/etc/nsswitch.conf
 >>  	@${FIND} ${PREFIX}/bin ${PREFIX}/sbin/ ${PREFIX}/usr/bin \
 > 
 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Mon Dec 26 02:49:09 UTC 2005 
State-Changed-Why:  
I committed the double-slash patch. 

As for changing plist for rpm3/rpm4, that would be a bit tricky, because today 
Ports framework have no idea of actual version of a dependencies... hmm. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90220 
>Unformatted:
