ports/82824: portupgrade fails to build due to ruby-populated variable handling
David D.W. Downey
pgpkeys at pgpnet.us
Thu Jun 30 15:20:17 UTC 2005
>Number: 82824
>Category: ports
>Synopsis: portupgrade fails to build due to ruby-populated variable handling
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jun 30 15:20:16 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: David D.W. Downey
>Release: FreeBSD 5.4-RELEASE-p2 i386
>Organization:
CyberSpace Technologies
>Environment:
System: FreeBSD CyberspaceTech 5.4-RELEASE-p2 FreeBSD 5.4-RELEASE-p2 #0: Wed Jun 29 03:49:45 EDT 2005 root at CyberspaceTech:/usr/obj/usr/src/sys/FIREWALL i386
Intel Celeron 700
CPU: Intel Celeron (701.60-MHz 686-class CPU)
Origin = "GenuineIntel" Id = 0x686 Stepping = 6
Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
RUBY INFO
---------
CyberspaceTech# pkg_info | grep ruby
ruby-1.8.2_3 An object-oriented interpreted scripting language
ruby18-bdb1-0.2.2 Ruby interface to Berkeley DB revision 1.8x with full featu
ruby18-bdb4-0.5.3 Ruby interface to Sleepycat's Berkeley DB revision 2 or lat
* NOTE: problem occurs regardless if both ruby-bdb ports are installed, or either/or are installed
PORTUPGRADE INFO
------------------
CyberspaceTech# pkg_info | grep portupgrade
portupgrade-20041226_4 FreeBSD ports/packages administration and management tool s
COMPLETE DEPENDANCY LIST OF ALL PORTS INVOLVED
----------------------------------------------
db4-4.0.14_1,1
ruby18-bdb4-0.5.3
perl-5.8.7 (*NOTE: problem existed when perl was v5.8.6 as well)
ruby-1.8.2_3
portupgrade-20041226_5
LAST TIME CVSUP'D
-----------------
Thu Jun 30 11:02:45 EDT 2005
>Description:
COMPLETE BUILD PROCESS OUTPUT (With portupgrade all ready installed, see below for further info)
------------------------------------------------------------------------------------------------
CyberspaceTech# make clean && cvsup -gz -L2 /usr/sup/ports-supfile
===> Cleaning for db4-4.0.14_1,1
===> Cleaning for ruby18-bdb4-0.5.3
===> Cleaning for perl-5.8.7
===> Cleaning for ruby-1.8.2_3
===> Cleaning for portupgrade-20041226_5
Parsing supfile "/usr/sup/ports-supfile"
Connecting to 141.149.128.140
Connected to 141.149.128.140
Server software version: SNAP_16_1h
Negotiating file attribute support
Exchanging collection information
Establishing multiplexed-mode data connection
Running
[ Rest is snipped for unrelated ports, portupgrade and other dependancies had no updates ]
CyberspaceTech# make -DFORCE_PKG_REGISTER install
===> Found saved configuration for portupgrade-20041226_5
===> Extracting for portupgrade-20041226_5
=> Checksum OK for pkgtools-20041224.tar.bz2.
=> Checksum OK for pkgtools-20041224-20041226.diff.bz2.
===> portupgrade-20041226_5 depends on file: /usr/local/bin/ruby18 - found
===> Patching for portupgrade-20041226_5
===> portupgrade-20041226_5 depends on file: /usr/local/bin/ruby18 - found
===> Applying distribution patches for portupgrade-20041226_5
===> Applying FreeBSD patches for portupgrade-20041226_5
===> portupgrade-20041226_5 depends on file: /usr/local/bin/ruby18 - found
===> Configuring for portupgrade-20041226_5
===> Building for portupgrade-20041226_5
===> bin
Warning: Object directory not changed from original /usr/ports/sysutils/portupgrade/work/pkgtools-20041224/bin
/usr/local/bin/ruby18 -wc pkg_fetch
Syntax OK
/usr/local/bin/ruby18 -pe ' if $. == 1; if /^#!/; sub /^#!\s*\S*(\benv\s+)?\bruby/, "#!/usr/local/bin/ruby18"; else; $_ = "#!/usr/local/bin/ruby18\n" + $_; end; end' pkg_fetch > .build/pkg_fetch
/usr/local/bin/ruby18 -wc pkg_glob
Syntax OK
/usr/local/bin/ruby18 -pe ' if $. == 1; if /^#!/; sub /^#!\s*\S*(\benv\s+)?\bruby/, "#!/usr/local/bin/ruby18"; else; $_ = "#!/usr/local/bin/ruby18\n" + $_; end; end' pkg_glob > .build/pkg_glob
/usr/local/bin/ruby18 -wc pkg_sort
Syntax OK
/usr/local/bin/ruby18 -pe ' if $. == 1; if /^#!/; sub /^#!\s*\S*(\benv\s+)?\bruby/, "#!/usr/local/bin/ruby18"; else; $_ = "#!/usr/local/bin/ruby18\n" + $_; end; end' pkg_sort > .build/pkg_sort
/usr/local/bin/ruby18 -wc pkgdb
Syntax OK
/usr/local/bin/ruby18 -pe ' if $. == 1; if /^#!/; sub /^#!\s*\S*(\benv\s+)?\bruby/, "#!/usr/local/bin/ruby18"; else; $_ = "#!/usr/local/bin/ruby18\n" + $_; end; end' pkgdb > .build/pkgdb
/usr/local/bin/ruby18 -wc portcvsweb
Syntax OK
/usr/local/bin/ruby18 -pe ' if $. == 1; if /^#!/; sub /^#!\s*\S*(\benv\s+)?\bruby/, "#!/usr/local/bin/ruby18"; else; $_ = "#!/usr/local/bin/ruby18\n" + $_; end; end' portcvsweb > .build/portcvsweb
/usr/local/bin/ruby18 -wc portsclean
Syntax OK
/usr/local/bin/ruby18 -pe ' if $. == 1; if /^#!/; sub /^#!\s*\S*(\benv\s+)?\bruby/, "#!/usr/local/bin/ruby18"; else; $_ = "#!/usr/local/bin/ruby18\n" + $_; end; end' portsclean > .build/portsclean
/usr/local/bin/ruby18 -wc portsdb
Syntax OK
/usr/local/bin/ruby18 -pe ' if $. == 1; if /^#!/; sub /^#!\s*\S*(\benv\s+)?\bruby/, "#!/usr/local/bin/ruby18"; else; $_ = "#!/usr/local/bin/ruby18\n" + $_; end; end' portsdb > .build/portsdb
/usr/local/bin/ruby18 -wc portupgrade
Syntax OK
/usr/local/bin/ruby18 -pe ' if $. == 1; if /^#!/; sub /^#!\s*\S*(\benv\s+)?\bruby/, "#!/usr/local/bin/ruby18"; else; $_ = "#!/usr/local/bin/ruby18\n" + $_; end; end' portupgrade > .build/portupgrade
/usr/local/bin/ruby18 -wc portversion
Syntax OK
/usr/local/bin/ruby18 -pe ' if $. == 1; if /^#!/; sub /^#!\s*\S*(\benv\s+)?\bruby/, "#!/usr/local/bin/ruby18"; else; $_ = "#!/usr/local/bin/ruby18\n" + $_; end; end' portversion > .build/portversion
gzip -cn pkg_deinstall.1 > pkg_deinstall.1.gz
gzip -cn pkg_fetch.1 > pkg_fetch.1.gz
gzip -cn pkg_glob.1 > pkg_glob.1.gz
gzip -cn pkg_sort.1 > pkg_sort.1.gz
gzip -cn pkgdb.1 > pkgdb.1.gz
gzip -cn portcvsweb.1 > portcvsweb.1.gz
gzip -cn portsclean.1 > portsclean.1.gz
gzip -cn portsdb.1 > portsdb.1.gz
gzip -cn portupgrade.1 > portupgrade.1.gz
gzip -cn portversion.1 > portversion.1.gz
===> etc
Warning: Object directory not changed from original /usr/ports/sysutils/portupgrade/work/pkgtools-20041224/etc
/usr/local/bin/ruby18 -p -e 'sub(%r:/usr/local:, "/usr/local")' -e 'sub(%r:(/etc/rc\.subr):, "/usr/local\\1") if !File.exist?("/etc/rc.subr")' pkgtools.sh > .build/pkgtools.sh
/usr/local/bin/ruby18 -p -e 'sub(%r:/usr/local:, "/usr/local")' -e 'sub(%r:(/etc/rc\.subr):, "/usr/local\\1") if !File.exist?("/etc/rc.subr")' status-pkg.sh > .build/status-pkg.sh
gzip -cn pkgtools.conf.5 > pkgtools.conf.5.gz
===> lib
Warning: Object directory not changed from original /usr/ports/sysutils/portupgrade/work/pkgtools-20041224/lib
/usr/local/bin/ruby18 -wc pkg.rb
Syntax OK
/usr/local/bin/ruby18 -p -e 'sub %r:/usr/local:, "/usr/local"' pkg.rb > .build/pkg.rb
/usr/local/bin/ruby18 -wc pkgdb.rb
Syntax OK
/usr/local/bin/ruby18 -p -e 'sub %r:/usr/local:, "/usr/local"' pkgdb.rb > .build/pkgdb.rb
/usr/local/bin/ruby18 -wc pkginfo.rb
Syntax OK
/usr/local/bin/ruby18 -p -e 'sub %r:/usr/local:, "/usr/local"' pkginfo.rb > .build/pkginfo.rb
/usr/local/bin/ruby18 -wc pkgmisc.rb
Syntax OK
/usr/local/bin/ruby18 -p -e 'sub %r:/usr/local:, "/usr/local"' pkgmisc.rb > .build/pkgmisc.rb
/usr/local/bin/ruby18 -wc pkgtools.rb
Syntax OK
/usr/local/bin/ruby18 -p -e 'sub %r:/usr/local:, "/usr/local"' pkgtools.rb > .build/pkgtools.rb
/usr/local/bin/ruby18 -wc pkgtsort.rb
Syntax OK
/usr/local/bin/ruby18 -p -e 'sub %r:/usr/local:, "/usr/local"' pkgtsort.rb > .build/pkgtsort.rb
/usr/local/bin/ruby18 -wc pkgversion.rb
Syntax OK
/usr/local/bin/ruby18 -p -e 'sub %r:/usr/local:, "/usr/local"' pkgversion.rb > .build/pkgversion.rb
/usr/local/bin/ruby18 -wc portinfo.rb
Syntax OK
/usr/local/bin/ruby18 -p -e 'sub %r:/usr/local:, "/usr/local"' portinfo.rb > .build/portinfo.rb
/usr/local/bin/ruby18 -wc ports.rb
Syntax OK
/usr/local/bin/ruby18 -p -e 'sub %r:/usr/local:, "/usr/local"' ports.rb > .build/ports.rb
/usr/local/bin/ruby18 -wc portsdb.rb
Syntax OK
/usr/local/bin/ruby18 -p -e 'sub %r:/usr/local:, "/usr/local"' portsdb.rb > .build/portsdb.rb
===> misc
===> misc/bash
Warning: Object directory not changed from original /usr/ports/sysutils/portupgrade/work/pkgtools-20041224/misc/bash
===> misc/tcsh
Warning: Object directory not changed from original /usr/ports/sysutils/portupgrade/work/pkgtools-20041224/misc/tcsh
===> misc/zsh
Warning: Object directory not changed from original /usr/ports/sysutils/portupgrade/work/pkgtools-20041224/misc/zsh
===> Installing for portupgrade-20041226_5
===> portupgrade-20041226_5 depends on file: /usr/local/lib/ruby/site_ruby/1.8/i386-freebsd5/bdb.so - found
===> portupgrade-20041226_5 depends on file: /usr/local/bin/perl5.8.6 - found
===> Generating temporary packing list
===> bin
install -C -o root -g wheel -m 555 .build/pkg_fetch /usr/local/sbin/pkg_fetch
install -C -o root -g wheel -m 555 .build/pkg_glob /usr/local/sbin/pkg_glob
install -C -o root -g wheel -m 555 .build/pkg_sort /usr/local/sbin/pkg_sort
install -C -o root -g wheel -m 555 .build/pkgdb /usr/local/sbin/pkgdb
install -C -o root -g wheel -m 555 .build/portcvsweb /usr/local/sbin/portcvsweb
install -C -o root -g wheel -m 555 .build/portsclean /usr/local/sbin/portsclean
install -C -o root -g wheel -m 555 .build/portsdb /usr/local/sbin/portsdb
install -C -o root -g wheel -m 555 .build/portupgrade /usr/local/sbin/portupgrade
install -C -o root -g wheel -m 555 .build/portversion /usr/local/sbin/portversion
install -C -o root -g wheel -m 444 pkg_deinstall.1.gz /usr/local/man/man1
install -C -o root -g wheel -m 444 pkg_fetch.1.gz /usr/local/man/man1
install -C -o root -g wheel -m 444 pkg_glob.1.gz /usr/local/man/man1
install -C -o root -g wheel -m 444 pkg_sort.1.gz /usr/local/man/man1
install -C -o root -g wheel -m 444 pkgdb.1.gz /usr/local/man/man1
install -C -o root -g wheel -m 444 portcvsweb.1.gz /usr/local/man/man1
install -C -o root -g wheel -m 444 portsclean.1.gz /usr/local/man/man1
install -C -o root -g wheel -m 444 portsdb.1.gz /usr/local/man/man1
install -C -o root -g wheel -m 444 portupgrade.1.gz /usr/local/man/man1
install -C -o root -g wheel -m 444 portversion.1.gz /usr/local/man/man1
/usr/local/man/man1/pkg_which.1.gz -> /usr/local/man/man1/pkgdb.1.gz
/usr/local/man/man1/portinstall.1.gz -> /usr/local/man/man1/portupgrade.1.gz
/usr/local/man/man1/ports_glob.1.gz -> /usr/local/man/man1/portsdb.1.gz
/usr/local/sbin/pkg_deinstall -> /usr/local/sbin/pkg_glob
/usr/local/sbin/pkg_which -> /usr/local/sbin/pkgdb
/usr/local/sbin/portinstall -> /usr/local/sbin/portupgrade
/usr/local/sbin/ports_glob -> /usr/local/sbin/portsdb
===> etc
install -C -o root -g wheel -m 555 .build/pkgtools.sh /usr/local/etc/rc.d/000.pkgtools.sh
install -C -o root -g wheel -m 555 .build/status-pkg.sh /usr/local/etc/pkgtools.status-pkg.sh
install -C -o root -g wheel -m 444 pkgtools.conf /usr/local/etc/pkgtools.conf.sample
install -C -o root -g wheel -m 444 pkgtools.conf.5.gz /usr/local/man/man5
===> lib
install -C -o root -g wheel -m 444 .build/pkg.rb .build/pkgdb.rb .build/pkginfo.rb .build/pkgmisc.rb .build/pkgtools.rb .build/pkgtsort.rb .build/pkgversion.rb .build/portinfo.rb .build/ports.rb .build/portsdb.rb `/usr/local/bin/ruby18 -rrbconfig -e 'puts "%s/%s.%s" % %w[sitedir MAJOR MINOR].map { |k| Config::CONFIG[k] }'`
install: wrong number or types of arguments
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 file2
install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 ... fileN directory
install -d [-v] [-g group] [-m mode] [-o owner] directory ...
*** Error code 64
Stop in /usr/ports/sysutils/portupgrade/work/pkgtools-20041224/lib.
*** Error code 1
Stop in /usr/ports/sysutils/portupgrade/work/pkgtools-20041224.
*** Error code 1
Stop in /usr/ports/sysutils/portupgrade.
CyberspaceTech#
DISCUSSION TRAFFIC FROM #freebsdhelp on EFNet REGARDING ISSUE
==============================================================
10:16:08 <@ Deryl> i have this regardless of what i do. I've even pkg_delete -a to reset the box and start over
10:16:50 <@ Deryl> deleted the ports tree immediately after the package reset, verified that all files were deleted for packages related to this package, recvsup'd and tried again
10:16:55 <@ Deryl> no matter what i do it does this
10:17:07 <@ Deryl> in that instance it was an upgrade
10:17:36 <@ Deryl> but i did a pkg reset, deleted /usr/ports and tried again
10:17:38 <@ Deryl> same thing
10:17:49 <@ Deryl> which tells me it's port related
10:18:08 <@ Deryl> and pkgtools is a subbuild (built only during a portupgrade build/upgrade)
10:19:01 <@ Deryl> now if i change the relevant line in the Makefile for pkgtools to the absolute directory name that the ruby code creates, it works perfectly
10:19:21 <@ Deryl> but if i let ruby build the line as it defaults to using the codeline you see, it fails
10:19:26 <@ Deryl> every. single. time.
10:28:58 <@ Deryl> don't even know how to report it because I'm at the end of my debug skills on this
10:29:10 <@ Deryl> don't know what else to include or how to proceed
10:30:08 >> sparc^<< Deryl: chuck a -v in there see if you get any more verbose output?
10:30:16 <@ Deryl> ./usr/local/bin/ruby was installed by package ruby-1.8.2_3
10:30:23 <@ Deryl> ./usr/local/bin/ruby18 was installed by package ruby-1.8.2_3
10:30:33 < sparc^> for install command
10:30:48 <@ Deryl> yeah, it's not getting the dir name
10:30:53 <@ Deryl> from ruby
10:31:02 <@ Deryl> which is why i guess it works with the hardcoded dir
10:31:05 <@ Deryl> err dirname
10:31:18 < sparc^> $env possibly?
10:31:29 < sparc^> it has full path in there so wouldn't think it would be a prob
10:31:43 <@ Deryl> yeah if I put the full path it works
10:31:57 <@ Deryl> so it's an issue with that ruby command or how the data is fed back to make
10:32:08 <@ Deryl> and i don't know make or ruby enough to figure out the issue
10:32:13 <@ Deryl> thus why i'm stuck
10:32:41 < sparc^> see what you mean.
10:32:44 < sparc^> :/
10:32:48 <@ Deryl> i wouldn't mind just leaving the dirname hardcoded, but each subsequest cvsup will modify it back
10:32:59 <@ Deryl> err subsequent
10:38:33 <@ Deryl> i just don't know how to modify the variable interaction in such a way that it ensures either ruby definitely passes on the var value or make definitely recieves it
[10:38] [@Deryl(+iw)] [2 #FreeBSDHelp (+npst) || EFNet/irc.efnet.nl ] [Act: 8,14] [[258 o/21 h/0 v/27 n/210]]
10:39:35 < sparc^> the command that returns the path works fine tho.....
10:40:11 <@ Deryl> right. so it's either ruby is not passing it on even though it retrieves the var or make isn't reading the var
10:41:04 <@ Deryl> know what i mean? either the technical sequence that fills out the var between ruby and the Makefile var (either ruby's side or make's side) or make is ignoring the var all together
10:42:01 < sparc^> yup
10:44:33 <@ Deryl> now to research how to send a pr on this
10:44:38 < sparc^> wait
10:44:51 < sparc^> do you get /usr/local/lib/ruby/site_ruby/1.8 ?
10:44:56 <@ Deryl> neko - hehe when *actual* technical work or debuggin processes are done, I'm *always* nice
10:44:57 < sparc^> when you run /usr/local/bin/ruby18 -rrbconfig -e 'puts "%s/%s.%s" % %w[sitedir MAJOR MINOR].map { |k| Config::CONFIG[k] }'
10:45:03 <@ Deryl> yes
10:45:17 < sparc^> don't take offence but that path does exist right :p
10:45:26 <@ Deryl> CyberspaceTech# ls -d /usr/local/lib/ruby/site_ruby/1.8
10:45:26 <@ Deryl> /usr/local/lib/ruby/site_ruby/1.8
(The path he's referencing is what the ruby code is supposed to be returning, which if run at the commandline, is.)
=============================
END DISCUSSION TRAFFIC
Any ideas?
>How-To-Repeat:
A) UPGRADE: cd /usr/ports/sysutils/portupgrade && make -DFORCE_PKG_REGISTER install clean
B) AFTER COMPLETE SYSTEM RESET WITH pkg_delete -a && rm -rf /usr/ports && cvsup -gz -L2 /usr/sup/ports-supfile
cd /usr/ports/sysutils/portupgrade && make install
>Fix:
Unknown at this time
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list