Ticket #35474: patch-add-certsync

File patch-add-certsync, 7.2 KB (added by landonf (Landon Fuller), 11 years ago)
Line 
1Index: devel/mercurial/Portfile
2===================================================================
3--- devel/mercurial/Portfile    (revision 106056)
4+++ devel/mercurial/Portfile    (working copy)
5@@ -6,6 +6,7 @@
6 PortGroup           bitbucket 1.0
7 
8 bitbucket.setup     mirror mercurial 2.5.2
9+revision            1
10 categories          devel python
11 license             GPL-2+
12 maintainers         deric sean
13@@ -28,7 +29,7 @@
14 platforms           darwin
15 checksums           rmd160  e818da7123ae4b12b3ae612d0a40bff413a47388 \
16                     sha256  82c587a447fd93e804844a703df4c39d28781af183095ed9ef50a5c12867b6c4
17-depends_run         port:curl-ca-bundle
18+depends_run         port:certsync
19 
20 patchfiles          patch-setup.py.diff
21 
22Index: devel/osc/Portfile
23===================================================================
24--- devel/osc/Portfile  (revision 106056)
25+++ devel/osc/Portfile  (working copy)
26@@ -5,6 +5,7 @@
27 
28 name                osc
29 version             0.130.1
30+revision            1
31 
32 categories          devel python
33 platforms           darwin
34@@ -20,7 +21,7 @@
35 
36 python.default_version 25
37 
38-depends_lib-append  port:curl-ca-bundle \
39+depends_lib-append  port:certsync \
40                     port:py25-elementtree \
41                     port:py25-urlgrabber \
42                     port:py25-m2crypto
43Index: gnome/glib-networking/Portfile
44===================================================================
45--- gnome/glib-networking/Portfile      (revision 106056)
46+++ gnome/glib-networking/Portfile      (working copy)
47@@ -5,7 +5,7 @@
48 
49 name            glib-networking
50 version         2.36.0
51-revision        1
52+revision        2
53 set branch      [join [lrange [split ${version} .] 0 1] .]
54 description     Network-related giomodules for glib
55 long_description ${description}
56@@ -24,7 +24,7 @@
57                 port:gnutls \
58                 port:libproxy
59 
60-depends_run     port:curl-ca-bundle
61+depends_run     port:certsync
62 
63 use_xz         yes
64 
65Index: net/curl/Portfile
66===================================================================
67--- net/curl/Portfile   (revision 106056)
68+++ net/curl/Portfile   (working copy)
69@@ -178,12 +178,12 @@
70 }
71 
72 subport curl-ca-bundle {
73-    revision                    0
74+    revision                    1
75     categories                  net
76     license                     {MPL-2 LGPL-2.1+}
77     supported_archs             noarch
78     installs_libs               no
79-    conflicts                   certsync
80+    replaced_by                 certsync
81 
82     description                 CA certificate bundle for curl
83 
84@@ -191,58 +191,8 @@
85                                 (CA certs) which curl (when linked with OpenSSL) uses to \
86                                 verify the authenticity of secure web and FTP servers.
87 
88-    depends_build               path:bin/perl:perl5
89-
90-    set certdata_file           certdata.txt
91-    set certdata_version        1.87
92-    set certdata_date           2012-12-29
93-    set certdata_distfile       certdata-${certdata_version}.txt
94-    set certdata_path           security/nss/lib/ckfw/builtins/${certdata_file}
95-
96-    # Set this to the UTC date when an update to certdata.txt is committed.
97-    set commit_date_utc         2013-01-11
98-
99-    # Avoid most of the checksum errors that inevitably occur whenever upstream
100-    # updates certdata.txt by only using the upstream site on the day the latest
101-    # update is committed. After that time, use only our mirrors, which should
102-    # have copied the file by then. The success of this strategy relies on
103-    # upstream not updating the file again on that day.
104-    set days_since_commit [expr {[expr {[clock seconds] - [clock format [clock scan ${commit_date_utc} -gmt yes] -format %s]}] / 86400}]
105-    if {${days_since_commit} > 0} {
106-        master_sites-append http://distfiles.macports.org/curl/:certdata
107-    } else {
108-        master_sites-append http://mxr.mozilla.org/mozilla/source/${certdata_path}?raw=1&dummy=:certdata
109-    }
110-
111-    extract.only                ${distfiles}
112-    extract.post_args-append    ${worksrcdir}/Makefile ${worksrcdir}/lib/mk-ca-bundle.pl
113-
114-    distfiles-append            ${certdata_distfile}:certdata
115-
116-    checksums-append            ${certdata_distfile} \
117-                                rmd160  bc21321abe4cf27418880c4ce8e6ebd329df82a1 \
118-                                sha256  5b28c27582f302c4bf34ddb114266e143d6d685a688357651be9c9db000d822d
119-
120-    post-extract {
121-        xinstall ${distpath}/${certdata_distfile} ${worksrcpath}/${certdata_file}
122-    }
123-
124-    patchfiles                  patch-no-autodownload.diff
125-
126-    use_configure               no
127-
128-    build.target                ca-bundle
129-
130-    destroot {
131-        set ca_bundle_dir ${prefix}/share/curl
132-        set openssl_dir ${prefix}/etc/openssl
133-        xinstall -d ${destroot}${ca_bundle_dir} ${destroot}${openssl_dir}
134-        xinstall -m 644 ${worksrcpath}/lib/ca-bundle.crt ${destroot}${ca_bundle_dir}/curl-ca-bundle.crt
135-        ln -s ${ca_bundle_dir}/curl-ca-bundle.crt ${destroot}${openssl_dir}/cert.pem
136-    }
137-
138-    livecheck.type              regex
139-    livecheck.url               http://bonsai.mozilla.org/cvsquery.cgi?file=mozilla/${certdata_path}&date=explicit&mindate=${certdata_date}
140-    livecheck.version           ${certdata_version}
141-    livecheck.regex             '${certdata_file}','(\[0-9.\]+)'
142+   pre-configure {
143+      ui_error "${name} has been renamed to ${replaced_by}. Please install ${replaced_by} instead."
144+      return -code error "obsolete port"
145+   }
146 }
147Index: net/vantages/Portfile
148===================================================================
149--- net/vantages/Portfile       (revision 106056)
150+++ net/vantages/Portfile       (working copy)
151@@ -4,7 +4,7 @@
152 
153 name                    vantages
154 version                 0.8.8b
155-revision                1
156+revision                2
157 categories              net
158 platforms               darwin
159 maintainers             nomaintainer
160@@ -36,7 +36,7 @@
161 # /usr/bin/ranlib: library member: libshttpd.a(compat_unix.c) is not an object file (not allowed in a library with multiple architectures)
162 universal_variant       no
163 
164-depends_lib             port:curl-ca-bundle \
165+depends_lib             port:certsync \
166                         port:expat \
167                         port:gnupg \
168                         port:gpgme \
169Index: security/certsync/Portfile
170===================================================================
171--- security/certsync/Portfile  (revision 106056)
172+++ security/certsync/Portfile  (working copy)
173@@ -3,8 +3,8 @@
174 PortSystem 1.0
175 name                   certsync
176 version                        1.0.2
177+revision               1
178 categories             security
179-conflicts              curl-ca-bundle
180 maintainers            landonf openmaintainer
181 description            Export x509 CAs from the Mac OS X Keychain.
182 long_description       The package implements exporting of x509 CAs from \
183@@ -45,6 +45,15 @@
184        ln -s ${prefix}/etc/openssl/cert.pem ${destroot}${prefix}/share/curl/curl-ca-bundle.crt
185 }
186 
187+pre-activate {
188+    # Ensure that curl-ca-bundle is deactivated, as we replace a number of files it has
189+    # installed.
190+    # http://trac.macports.org/wiki/PortfileRecipes#deactivatehack
191+    if {![catch {set installed [lindex [registry_active curl-ca-bundle] 0]}]} {
192+        registry_deactivate_composite kerberos5 "" [list ports_nodepcheck 1]
193+    }
194+}
195+
196 post-activate {
197        system "${prefix}/bin/update-ca-certificates"
198 }