Changes between Version 3 and Version 4 of archives


Ignore:
Timestamp:
Jul 24, 2010, 12:46:42 PM (14 years ago)
Author:
nerdling (Jeremy Lavergne)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • archives

    v3 v4  
    77To distribute archives of your own, you need a key pair generated like so:
    88{{{
     9cd ~/.ssh
    910openssl genrsa -des3 -out privkey.pem 2048
    1011openssl rsa -in privkey.pem -pubout -out pubkey.pem
     
    2425If you have lots of archives to sign, this can be done via a for loop in your shell. Here I use bash:
    2526{{{
    26 for i in *tbz2; do openssl dgst -ripemd160 -sign ~/.ssh/privkey.pem.bare -out $i.rmd160 $i; done
     27cd /archive/repository
     28for i in */*/*/*tbz2; do openssl dgst -ripemd160 -sign ~/.ssh/privkey.pem.bare -out $i.rmd160 $i; done
    2729}}}
    2830Note that this saves the signatures along side the archives, by simply using `.rmd160` as a suffix. This is what MacPorts presently expects.
     
    3739 = Try It =
    3840Your archives are now signed and MacPorts should be configured to recognize your signature. Try it out!
     41
     42 = Maintenance of Archive Repository =
     43As 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.
     44{{{
     45cd /archive/repository
     46sudo port selfupdate
     47for i in */*/*
     48do
     49    port -q info --index --version `basename $i` | while read j
     50    do
     51        ls $i | grep -v $j | while read k
     52        do
     53            sudo rm -v $i/$k
     54        done
     55    done
     56done
     57}}}