Changes between Version 6 and Version 7 of archives


Ignore:
Timestamp:
Jul 3, 2011, 3:52:13 PM (13 years ago)
Author:
nerdling (Jeremy Lavergne)
Comment:

update information for beta/trunk

Legend:

Unmodified
Added
Removed
Modified
  • archives

    v6 v7  
    11 = Using Your Own Archives =
    2 MacPorts recently added the ability to verify archives when `archivemode` is enabled. Signing archives is basically a requirement now. This page will serve as a guide showing how to do this.
     2MacPorts verifies archives when `archivemode` is enabled, making the signing archives a requirement. This page will serve as a guide showing how to do this.
    33
    44 = Create Keys =
     
    2626{{{
    2727cd /archive/repository
    28 for i in */*/*/*tbz2; do openssl dgst -ripemd160 -sign ~/.ssh/privkey.pem.bare -out $i.rmd160 $i; done
     28for i in */*tbz2; do openssl dgst -ripemd160 -sign ~/.ssh/privkey.pem.bare -out $i.rmd160 $i; done
    2929}}}
    30 Note that this saves the signatures along side the archives, by simply using `.rmd160` as a suffix. This is what MacPorts presently expects.
     30Note that this saves the signatures along side the archives, by simply using `.rmd160` as a suffix. This is what MacPorts expects.
    3131
    3232 = Configure MacPorts =
     
    3535 * add path to this copy in pubkeys.conf
    3636
    37 I saved my key as `/opt/local/etc/macports/snc.pub` for simplicity. To avoid naming collisions I suggest adding all custom keys to just one file.
     37I used `${prefix}/etc/macports/snc.pub` for simplicity.
    3838
    3939 = Try It =
     
    4343Each day (really, every 30 minutes) new ports arrive and several are updated. Rather than rebuilding the whole tree you'll want to go after the ones with changes. This is easily achieved by the `find` command.
    4444{{{
    45 cd /opt/local/var/macports/sources/rsync.macports.org/release/ports
     45cd ${prefix}/var/macports/sources/rsync.macports.org/release/ports
    4646sudo port selfupdate
    4747find . -name Portfile -mtime -1d  | while read i
     
    5151}}}
    5252
    53 As you build archives, you'll eventually come across an instance where you're upgrading an older version. Keeping these outdated archives around might be less than ideal. We can wipe them out by looping through the repository checking the versions against what's current.
     53As you build archives, you'll eventually come across an instance where you're upgrading an older version. Keeping these outdated archives around might be less than ideal. We can wipe them out as we build the updates in the repository, checking the versions against what's current.
    5454{{{
    5555cd /archive/repository
    5656sudo port selfupdate
    57 for i in */*/*
     57for i in *
    5858do
    5959    port -q info --index --version `basename $i` | while read j
    6060    do
    61         ls $i | grep -v $j | while read k
     61        ls "$i" | grep -v "$j" | while read k
    6262        do
    63             sudo rm -v $i/$k
     63            sudo rm -v "$i/$k"
    6464        done
    6565    done
    6666done
    6767}}}
     68
     69This can also be accomplished using `rsync` between a build box and a web server. After syncing you'd run a `sign_archives` routine described above.
     70{{{
     71for i in ${prefix}/var/macports/software/*
     72do
     73    port -q info --index --version `basename $i` | while read j
     74    do
     75        rsync -az --delete --filter "P *$j*" "$i" snc@tazamahal.com:/var/www/macports/
     76    done
     77done
     78ssh snc@tazamahal.com sign_archives.sh
     79}}}