Changes between Version 3 and Version 4 of archives
- Timestamp:
- Jul 24, 2010, 12:46:42 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
archives
v3 v4 7 7 To distribute archives of your own, you need a key pair generated like so: 8 8 {{{ 9 cd ~/.ssh 9 10 openssl genrsa -des3 -out privkey.pem 2048 10 11 openssl rsa -in privkey.pem -pubout -out pubkey.pem … … 24 25 If you have lots of archives to sign, this can be done via a for loop in your shell. Here I use bash: 25 26 {{{ 26 for i in *tbz2; do openssl dgst -ripemd160 -sign ~/.ssh/privkey.pem.bare -out $i.rmd160 $i; done 27 cd /archive/repository 28 for i in */*/*/*tbz2; do openssl dgst -ripemd160 -sign ~/.ssh/privkey.pem.bare -out $i.rmd160 $i; done 27 29 }}} 28 30 Note that this saves the signatures along side the archives, by simply using `.rmd160` as a suffix. This is what MacPorts presently expects. … … 37 39 = Try It = 38 40 Your archives are now signed and MacPorts should be configured to recognize your signature. Try it out! 41 42 = Maintenance of Archive Repository = 43 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. 44 {{{ 45 cd /archive/repository 46 sudo port selfupdate 47 for i in */*/* 48 do 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 56 done 57 }}}