Ignore:
Timestamp:
Jun 23, 2011, 4:00:37 AM (9 years ago)
Author:
derek@…
Message:

Merged latest trunk changes to gsoc11-statistics

Location:
branches/gsoc11-statistics/base
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/gsoc11-statistics/base

  • branches/gsoc11-statistics/base/portmgr/jobs/GuideRegen.sh

    r44179 r79672  
    1818# Other settings (probably don't need to be changed).
    1919SVN_CONFIG_DIR=${ROOT}/svnconfig
    20 REPO_BASE=http://svn.macports.org/repository/macports
     20REPO_BASE=https://svn.macports.org/repository/macports
    2121SVN="/opt/local/bin/svn -q --non-interactive --config-dir $SVN_CONFIG_DIR"
    2222# Where to checkout the source code. This needs to exist!
  • branches/gsoc11-statistics/base/portmgr/jobs/PortIndex2MySQL.tcl

    r65055 r79672  
    1010#
    1111# Copyright (c) 2007 Juan Manuel Palacios, The MacPorts Project.
    12 # Copyright (c) 2003 Apple Computer, Inc.
     12# Copyright (c) 2003 Apple Inc.
    1313# Copyright (c) 2002 Kevin Van Vechten.
    1414# All rights reserved.
     
    2222#    notice, this list of conditions and the following disclaimer in the
    2323#    documentation and/or other materials provided with the distribution.
    24 # 3. Neither the name of Apple Computer, Inc. nor the names of its contributors
     24# 3. Neither the name of Apple Inc. nor the names of its contributors
    2525#    may be used to endorse or promote products derived from this software
    2626#    without specific prior written permission.
  • branches/gsoc11-statistics/base/portmgr/jobs/mprsyncup

    r68639 r79672  
    2121# Lastly, it is required of every 3rd party mirrors to keep track of this script
    2222# and the base/portmgr/rsync.repos file and always maintain local copies in as
    23 # close sync as possible. 
     23# close sync as possible.
    2424#
    2525#
     
    3939MKDIR="/bin/mkdir"
    4040LN="/bin/ln"
     41TAR="/usr/bin/tar"
     42OPENSSL="/usr/bin/openssl"
    4143
    4244# Paths we'll work on:
     
    5557
    5658# platforms we generate indexes for
    57 PLATFORMS="8_ppc 8_i386 9_ppc 9_i386 10_i386"
     59PLATFORMS="8_powerpc 8_i386 9_powerpc 9_i386 10_i386 11_i386"
    5860# copy new index of this platform to old index location for MP v1.8 compatability
    5961OLD_INDEX_PLATFORM="9_i386"
     
    6365
    6466# Sources information:
    65 SVNURL=http://svn.macports.org/repository/macports
     67SVNURL=https://svn.macports.org/repository/macports
    6668RELEASE_URL_FILE=config/RELEASE_URL
     69
     70# private key to use for signing
     71# XXX set real path
     72PRIVKEY=""
    6773
    6874# cleanup up the working copy if it is locked
     
    98104    ${MKDIR} -p ${RSYNCROOT}/release/base
    99105fi
    100 ${RSYNC} -aIC --delete ${RBASE}/ ${RSYNCROOT}/release/base 
     106${RSYNC} -aIC --delete ${RBASE}/ ${RSYNCROOT}/release/base
    101107
    102108# clean up the working copy if it is locked
     
    107113# Update/checkout the ports tree, export it and rsync it to ${RSYNCROOT}/release/ports:
    108114if [ -d ${PORTS}/.svn ]; then
    109     ${SVN} update ${PORTS} 
     115    ${SVN} update ${PORTS}
    110116else
    111117    ${SVN} checkout ${SVNURL}/trunk/dports ${PORTS}
     
    116122# build MP trunk in a private location for indexing
    117123pushd ${ROOT}/${TMPDIR} >> /dev/null
    118 mkdir -p ${TCLPKG}
     124${MKDIR} -p ${TCLPKG}
    119125./configure \
    120126    --prefix=${PREFIX} \
    121127    --with-tclpackage=${TCLPKG} \
    122128    --with-install-user=${MP_USER} \
    123     --with-install-group=${MP_GROUP} 
    124 make clean 
     129    --with-install-group=${MP_GROUP}
     130make clean
    125131make
    126 make install 
     132make install
    127133popd
    128134
     
    147153fi
    148154
     155# generate and sign tarballs of base and dports
     156# the signature always needs to match, so we try to make this look atomic to
     157# clients by switching a symlink target
     158
     159TAR_CURDIR=${RSYNCROOT}/release/tarballs_current
     160${MKDIR} -p ${TAR_CURDIR}
     161cp -pR ${TAR_CURDIR} ${RSYNCROOT}/release/tarballs_old
     162${LN} -sfh tarballs_old ${RSYNCROOT}/release/tarballs
     163${TAR} -C ${RSYNCROOT}/release/ -cf ${TAR_CURDIR}/base.tar base
     164${TAR} --exclude 'PortIndex*' -C ${RSYNCROOT}/release/ -cf ${TAR_CURDIR}/ports.tar ports
     165cp -pR ${RSYNCROOT}/release/ports/PortIndex_* ${TAR_CURDIR}
     166# XXX needs PRIVKEY to be set above
     167#${OPENSSL} dgst -ripemd160 -sign ${PRIVKEY} -out ${TAR_CURDIR}/base.tar.rmd160 ${TAR_CURDIR}/base.tar
     168#${OPENSSL} dgst -ripemd160 -sign ${PRIVKEY} -out ${TAR_CURDIR}/ports.tar.rmd160 ${TAR_CURDIR}/ports.tar
     169for index in ${TAR_CURDIR}/PortIndex_*/PortIndex; do
     170    #${OPENSSL} dgst -ripemd160 -sign ${PRIVKEY} -out ${index}.rmd160 ${index}
     171done
     172${LN} -sfh tarballs_current ${RSYNCROOT}/release/tarballs
     173${RM} -rf ${RSYNCROOT}/release/tarballs_old
  • branches/gsoc11-statistics/base/portmgr/jobs/port_binary_distributable.tcl

    r78062 r79672  
    66# Check that binaries of a port are distributable by looking at its license
    77# and the licenses of its dependencies.
     8#
     9# Expected format: A {B C} means the license is A plus either B or C.
    810#
    911# Exit status:
     
    2022
    2123set good_licenses {agpl apache apsl artistic boost bsd cecill cpl curl \
    22                    fontconfig freebsd gfdl gpl ibmpl ijg jasper lgpl libpng \
    23                    mit mpl openssl php psf qpl public-domain ruby sleepycat \
    24                    ssleay x11 zlib zpl}
     24                   fontconfig freebsd freetype gfdl gpl ibmpl ijg jasper \
     25                   lgpl libpng mit mpl openssl php psf qpl public-domain \
     26                   ruby sleepycat ssleay x11 zlib zpl}
    2527foreach lic $good_licenses {
    2628    set license_good($lic) 1
     
    8183    }
    8284
    83     return [list $dependencyList $portInfo(license)]
     85    set ret [list $dependencyList $portInfo(license)]
     86    if {[info exists portInfo(installs_libs)]} {
     87        lappend ret $portInfo(installs_libs)
     88    } else {
     89        # when in doubt, assume code from the dep is incorporated
     90        lappend ret yes
     91    }
     92    return $ret
    8493}
    8594
     
    101110    set top_license_names {}
    102111    # check that top-level port's license(s) are good
    103     foreach full_lic $top_license {
    104         # chop off any trailing version number
    105         set lic [remove_version [string tolower $full_lic]]
    106         # add name to the list for later
    107         lappend top_license_names $lic
    108         if {![info exists license_good($lic)]} {
     112    foreach sublist $top_license {
     113        # each element may be a list of alternatives (i.e. only one need apply)
     114        set any_good 0
     115        set sub_names {}
     116        foreach full_lic $sublist {
     117            # chop off any trailing version number
     118            set lic [remove_version [string tolower $full_lic]]
     119            # add name to the list for later
     120            lappend sub_names $lic
     121            if {[info exists license_good($lic)]} {
     122                set any_good 1
     123            }
     124        }
     125        lappend top_license_names $sub_names
     126        if {!$any_good} {
    109127            if {$verbose} {
    110128                puts "'$portName' has license '$lic' which is not known to be distributable"
     
    113131        }
    114132    }
     133
    115134    # start with deps of top-level port
    116135    set portList [lindex $top_info 0]
    117136    while {[llength $portList] > 0} {
    118137        set aPort [lindex $portList 0]
     138        # mark as seen and remove from the list
     139        set portSeen($aPort) 1
     140        set portList [lreplace $portList 0 0]
     141
    119142        set aPortInfo [infoForPort $aPort $variantInfo]
    120143        set aPortLicense [lindex $aPortInfo 1]
    121         foreach full_lic $aPortLicense {
     144        set installs_libs [lindex $aPortInfo 2]
     145        if {!$installs_libs} {
     146            continue
     147        }
     148        foreach sublist $aPortLicense {
     149            set any_good 0
     150            set any_compatible 0
    122151            # check that this dependency's license(s) are good
    123             set lic [remove_version [string tolower $full_lic]]
    124             if {![info exists license_good($lic)]} {
     152            foreach full_lic $sublist {
     153                set lic [remove_version [string tolower $full_lic]]
     154                if {[info exists license_good($lic)]} {
     155                    set any_good 1
     156                } else {
     157                    # no good being compatible with other licenses if it's not distributable itself
     158                    continue
     159                }
     160
     161                # ... and that they don't conflict with the top-level port's
     162                set any_conflict 0
     163                foreach top_sublist [concat $top_license $top_license_names] {
     164                    set any_sub_compatible 0
     165                    foreach top_lic $top_sublist {
     166                        if {![info exists license_conflicts([string tolower $top_lic])]
     167                            || ([lsearch -sorted $license_conflicts([string tolower $top_lic]) $lic] == -1
     168                            && [lsearch -sorted $license_conflicts([string tolower $top_lic]) [string tolower $full_lic]] == -1)} {
     169                            set any_sub_compatible 1
     170                            break
     171                        }
     172                    }
     173                    if {!$any_sub_compatible} {
     174                        set any_conflict 1
     175                        break
     176                    }
     177                }
     178                if {!$any_conflict} {
     179                    set any_compatible 1
     180                    break
     181                }
     182            }
     183
     184            if {!$any_good} {
    125185                if {$verbose} {
    126186                    puts "dependency '$aPort' has license '$lic' which is not known to be distributable"
     
    128188                return 1
    129189            }
    130             # ... and that they don't conflict with the top-level port's
    131             foreach top_lic [concat $top_license $top_license_names] {
    132                 if {[info exists license_conflicts([string tolower $top_lic])]
    133                     && ([lsearch -sorted $license_conflicts([string tolower $top_lic]) $lic] != -1
    134                     || [lsearch -sorted $license_conflicts([string tolower $top_lic]) [string tolower $full_lic]] != -1)} {
    135                     if {$verbose} {
    136                         puts "dependency '$aPort' has license '$full_lic' which conflicts with license '$top_lic' from '$portName'"
    137                     }
    138                     return 1
    139                 }
    140             }
    141         }
    142 
    143         # mark it seen and add its deps to the list
    144         set portSeen($aPort) 1
    145         set portList [lreplace $portList 0 0]
     190            if {!$any_compatible} {
     191                if {$verbose} {
     192                    puts "dependency '$aPort' has license '$full_lic' which conflicts with license '$top_lic' from '$portName'"
     193                }
     194                return 1
     195            }
     196        }
     197
     198        # add its deps to the list
    146199        foreach possiblyNewPort [lindex $aPortInfo 0] {
    147200            if {![info exists portSeen($possiblyNewPort)]} {
  • branches/gsoc11-statistics/base/portmgr/jobs/portfile_lint.pl

    r75281 r79672  
    1515
    1616my $REPOPATH = "/svn/repositories/macports/";
    17 my $REPOHOST = "http://svn.macosforge.org/repository/macports";
     17my $REPOHOST = "https://svn.macports.org/repository/macports";
    1818my $SVNLOOK = "/opt/local/bin/svnlook";
    1919
     
    9797             From => 'noreply@macports.org',
    9898             Subject => "[$rev] $port Lint Report",
    99              Message => "Change: http://trac.macports.org/changeset/$rev\nPortfile: $port\n\n$errors \n\n",
     99             Message => "Change: https://trac.macports.org/changeset/$rev\nPortfile: $port\n\n$errors \n\n",
    100100             smtp => 'relay.apple.com',
    101101             );
  • branches/gsoc11-statistics/base/portmgr/jobs/portfile_mirror.pl

    r53280 r79672  
    1212
    1313my $REPOPATH = "/svn/repositories/macports/";
    14 my $REPOHOST = "http://svn.macosforge.org/repository/macports";
     14my $REPOHOST = "https://svn.macports.org/repository/macports";
    1515my $SVNLOOK = "/opt/local/bin/svnlook";
    1616my $PORTCMD = "/opt/local/bin/port";
Note: See TracChangeset for help on using the changeset viewer.