[MacPorts] archives modified

MacPorts noreply at macports.org
Sat Jul 24 05:46:42 PDT 2010


Changed page "archives" by snc at macports.org from 98.216.103.178*
Page URL: <http://trac.macports.org/wiki/archives>
Diff URL: <http://trac.macports.org/wiki/archives?action=diff&version=4>
Revision 4

-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: archives
=========================================================================
--- archives (version: 3)
+++ archives (version: 4)
@@ -6,6 +6,7 @@
 
 To distribute archives of your own, you need a key pair generated like so:
 {{{
+cd ~/.ssh
 openssl genrsa -des3 -out privkey.pem 2048
 openssl rsa -in privkey.pem -pubout -out pubkey.pem
 }}}
@@ -23,7 +24,8 @@
 
 If you have lots of archives to sign, this can be done via a for loop in your shell. Here I use bash:
 {{{
-for i in *tbz2; do openssl dgst -ripemd160 -sign ~/.ssh/privkey.pem.bare -out $i.rmd160 $i; done
+cd /archive/repository
+for i in */*/*/*tbz2; do openssl dgst -ripemd160 -sign ~/.ssh/privkey.pem.bare -out $i.rmd160 $i; done
 }}}
 Note that this saves the signatures along side the archives, by simply using `.rmd160` as a suffix. This is what MacPorts presently expects.
 
@@ -36,3 +38,20 @@
 
  = Try It =
 Your archives are now signed and MacPorts should be configured to recognize your signature. Try it out!
+
+ = Maintenance of Archive Repository =
+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.
+{{{
+cd /archive/repository
+sudo port selfupdate
+for i in */*/*
+do
+    port -q info --index --version `basename $i` | while read j
+    do
+        ls $i | grep -v $j | while read k
+        do
+            sudo rm -v $i/$k
+        done
+    done
+done
+}}}

-------8<------8<------8<------8<------8<------8<------8<------8<--------

* The IP shown here might not mean anything if the user or the server is
behind a proxy.

--
MacPorts <http://www.macports.org/>
Ports system for Mac OS

This is an automated message. Someone at http://www.macports.org/ added your email
address to be notified of changes on archives. If it was not you, please
report to .


More information about the macports-changes mailing list