Date: Thu, 26 Mar 2009 02:25:04 GMT From: Stef Walter <stef@memberwebs.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/133081: PYEASYINSTALL_ARCHDEP=yes makes broken packages Message-ID: <200903260225.n2Q2P4Pd045437@www.freebsd.org> Resent-Message-ID: <200903260230.n2Q2U3K8002680@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 133081 >Category: ports >Synopsis: PYEASYINSTALL_ARCHDEP=yes makes broken packages >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 26 02:30:03 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Stef Walter >Release: 7.0-RELEASE-p3 >Organization: >Environment: FreeBSD dev-srv0.ws.local 7.0-RELEASE-p3 FreeBSD 7.0-RELEASE-p3 #2: Wed Aug 27 01:11:37 UTC 2008 root@dev-srv0.local:/usr/obj/usr/src/sys/DEVSRV0 i386 >Description: The PYEASYINSTALL_ARCHDEP=YES port option makes packages that can only be installed on the same specific patch level of FreeBSD. For example if you build net/py-ldap2 as a package on FreeBSD 7.1-RELEASE-p3 then it won't install on a FreeBSD 7.1-RELEASE-p4 system. The following ports are affected: audio/py-tagpy databases/py-MySQLdb-devel databases/py-pg_pqueue devel/py-jsonlib devel/py-pylib devel/py-lxml devel/py-cheetah devel/py-fusefs devel/py-ruledispatch devel/py-Jinja devel/py-ll-core devel/py-rbtree devel/py-durus devel/py-rtree devel/py-Jinja2 devel/py-traits devel/py-protocols-devel devel/py-xattr devel/py-icu devel/py-simplejson devel/py-zopeInterface devel/py-mwlib.ext devel/py-mwlib math/py-igraph net/py-ldap2 net/py-zopeproxy security/py-m2crypto security/py-pycryptopp security/py-posix1e textproc/py-rdflib textproc/py-genshi www/py-amf www/xist >How-To-Repeat: Build any of the above ports. >Fix: Attached are two patches that help fix this problem. patch-python-distutils-osrel.diff * place in /usr/ports/lang/python25/files * Should eventually go upstream, but should be patched in python port. * Haven't tested with other pythons but patch will be similar. bsd-python-osrel.diff * patch for Mk/bsd.python.mk The result of these two patches is that PYEASYINSTALL_ARCHDEP packages built on any 7.x system will install on any 7.x system as expected. Patch attached with submission follows: #!/bin/sh # This is a shell archive (produced by GNU sharutils 4.6.3). # To extract the files from this archive, save it to some FILE, remove # everything before the `#!/bin/sh' line above, then type `sh FILE'. # lock_dir=_sh09385 # Made on 2009-03-25 09:23 UTC by <stef@stef>. # Source directory was `/data/Desktop'. # # Existing files will *not* be overwritten, unless `-c' is specified. # # This shar contains: # length mode name # ------ ---------- ------------------------------------------ # 885 -rw-r--r-- bsd-python-osrel.diff # 520 -rw-r--r-- patch-python-distutils-osrel.diff # MD5SUM=${MD5SUM-md5sum} f=`${MD5SUM} --version | egrep '^md5sum .*(core|text)utils'` test -n "${f}" && md5check=true || md5check=false ${md5check} || \ echo 'Note: not verifying md5sums. Consider installing GNU coreutils.' save_IFS="${IFS}" IFS="${IFS}:" gettext_dir=FAILED locale_dir=FAILED first_param="$1" for dir in $PATH do if test "$gettext_dir" = FAILED && test -f $dir/gettext \ && ($dir/gettext --version >/dev/null 2>&1) then case `$dir/gettext --version 2>&1 | sed 1q` in *GNU*) gettext_dir=$dir ;; esac fi if test "$locale_dir" = FAILED && test -f $dir/shar \ && ($dir/shar --print-text-domain-dir >/dev/null 2>&1) then locale_dir=`$dir/shar --print-text-domain-dir` fi done IFS="$save_IFS" if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED then echo=echo else TEXTDOMAINDIR=$locale_dir export TEXTDOMAINDIR TEXTDOMAIN=sharutils export TEXTDOMAIN echo="$gettext_dir/gettext -s" fi if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null then if (echo -n test; echo 1,2,3) | grep n >/dev/null then shar_n= shar_c=' ' else shar_n=-n shar_c= ; fi else shar_n= shar_c='\c' ; fi f=shar-touch.$$ st1=200112312359.59 st2=123123592001.59 st2tr=123123592001.5 # old SysV 14-char limit st3=1231235901 if touch -am -t ${st1} ${f} >/dev/null 2>&1 && \ test ! -f ${st1} && test -f ${f}; then shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"' elif touch -am ${st2} ${f} >/dev/null 2>&1 && \ test ! -f ${st2} && test ! -f ${st2tr} && test -f ${f}; then shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"' elif touch -am ${st3} ${f} >/dev/null 2>&1 && \ test ! -f ${st3} && test -f ${f}; then shar_touch='touch -am $3$4$5$6$2 "$8"' else shar_touch=: echo ${echo} 'WARNING: not restoring timestamps. Consider getting and' ${echo} 'installing GNU `touch'\'', distributed in GNU coreutils...' echo fi rm -f ${st1} ${st2} ${st2tr} ${st3} ${f} # if test ! -d ${lock_dir} then : ; else ${echo} 'lock directory '${lock_dir}' exists' exit 1 fi if mkdir ${lock_dir} then ${echo} 'x - created lock directory `'${lock_dir}\''.' else ${echo} 'x - failed to create lock directory `'${lock_dir}\''.' exit 1 fi # ============= bsd-python-osrel.diff ============== if test -f 'bsd-python-osrel.diff' && test "$first_param" != -c; then ${echo} 'x -SKIPPING bsd-python-osrel.diff (file already exists)' else ${echo} 'x - extracting bsd-python-osrel.diff (text)' sed 's/^X//' << 'SHAR_EOF' > 'bsd-python-osrel.diff' && --- Mk/bsd.python.mk.orig 2009-03-26 00:57:49.000000000 +0000 +++ Mk/bsd.python.mk 2009-03-26 01:06:38.000000000 +0000 @@ -175,7 +175,7 @@ X # X # PYEASYINSTALL_OSARCH X # - Platform identifier for easy_install. -# default: -${OPSYS:L}-${_OSRELEASE}-${ARCH} +# default: -${OPSYS:L}-${_OSRELEASE:R}-${ARCH} X # if PYEASYINSTALL_ARCHDEP is defined. X # X # PYEASYINSTALL_CMD - Full file path to easy_install command. @@ -470,7 +470,7 @@ X .if !defined(_OSRELEASE) X _OSRELEASE!= ${UNAME} -r X .endif -PYEASYINSTALL_OSARCH?= -${OPSYS:L}-${_OSRELEASE}-${ARCH} +PYEASYINSTALL_OSARCH?= -${OPSYS:L}-${_OSRELEASE:R}-${ARCH} X .endif X PYEASYINSTALL_EGG?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-${PYTHON_VERSION:S/thon//}${PYEASYINSTALL_OSARCH}.egg X PYEASYINSTALL_CMD?= ${LOCALBASE}/bin/easy_install-${PYTHON_VER} SHAR_EOF (set 20 09 03 26 01 09 22 'bsd-python-osrel.diff'; eval "$shar_touch") && chmod 0644 'bsd-python-osrel.diff' if test $? -ne 0 then ${echo} 'restore of bsd-python-osrel.diff failed' fi if ${md5check} then ( ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'bsd-python-osrel.diff: MD5 check failed' ) << SHAR_EOF 8c4d79c13cae52c2b426c342c2422cb7 bsd-python-osrel.diff SHAR_EOF else test `LC_ALL=C wc -c < 'bsd-python-osrel.diff'` -ne 885 && \ ${echo} 'restoration warning: size of bsd-python-osrel.diff is not 885' fi fi # ============= patch-python-distutils-osrel.diff ============== if test -f 'patch-python-distutils-osrel.diff' && test "$first_param" != -c; then ${echo} 'x -SKIPPING patch-python-distutils-osrel.diff (file already exists)' else ${echo} 'x - extracting patch-python-distutils-osrel.diff (text)' sed 's/^X//' << 'SHAR_EOF' > 'patch-python-distutils-osrel.diff' && --- Lib/distutils/util.py.orig 2009-03-26 01:08:25.000000000 +0000 +++ Lib/distutils/util.py 2009-03-26 00:55:08.000000000 +0000 @@ -52,6 +52,9 @@ X # i386, etc. X # XXX what about Alpha, SPARC, etc? X return "%s-%s" % (osname, machine) + elif osname[:7] == "freebsd": + release = release.split('.')[0] + return "%s-%s-%s" % (osname, release, machine) X elif osname[:5] == "sunos": X if release[0] >= "5": # SunOS 5 == Solaris 2 X osname = "solaris" SHAR_EOF (set 20 09 03 26 01 29 00 'patch-python-distutils-osrel.diff'; eval "$shar_touch") && chmod 0644 'patch-python-distutils-osrel.diff' if test $? -ne 0 then ${echo} 'restore of patch-python-distutils-osrel.diff failed' fi if ${md5check} then ( ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'patch-python-distutils-osrel.diff: MD5 check failed' ) << SHAR_EOF 41a5c35ac728b8707c1f942ce9d70a57 patch-python-distutils-osrel.diff SHAR_EOF else test `LC_ALL=C wc -c < 'patch-python-distutils-osrel.diff'` -ne 520 && \ ${echo} 'restoration warning: size of patch-python-distutils-osrel.diff is not 520' fi fi if rm -fr ${lock_dir} then ${echo} 'x - removed lock directory `'${lock_dir}\''.' else ${echo} 'x - failed to remove lock directory `'${lock_dir}\''.' exit 1 fi exit 0 >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903260225.n2Q2P4Pd045437>