ca-certificates-vl.spec 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. # certdata.txt is generated by extracting it from Mozilla CVS.
  2. # This is done by running:
  3. #
  4. # cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot \
  5. # co -p mozilla/security/nss/lib/ckfw/builtins/certdata.txt \
  6. # > certdata.txt
  7. #
  8. # Keep the RCS version in sync with the spec Version.
  9. %define pkidir %{_sysconfdir}/pki
  10. Summary: The Mozilla CA root certificate bundle
  11. Summary(ja): Mozilla の CA ルート証明書バンドル
  12. Name: ca-certificates
  13. Version: 2013.1.94
  14. Release: 1%{?_dist_release}
  15. License: Public Domain
  16. Group: System Environment/Base
  17. URL: http://www.mozilla.org/
  18. Source0: certdata.txt
  19. Source1: blacklist.txt
  20. Source2: generate-cacerts.pl
  21. Source3: certdata2pem.py
  22. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  23. BuildRequires: perl, java-openjdk, python, rcs
  24. BuildArch: noarch
  25. %description
  26. This package contains the set of CA certificates chosen by the
  27. Mozilla Foundation for use with the Internet PKI.
  28. %prep
  29. rm -rf %{name}
  30. mkdir %{name} %{name}/certs %{name}/java
  31. %build
  32. pushd %{name}/certs
  33. cp %{SOURCE0} %{SOURCE1} .
  34. python %{SOURCE3}
  35. popd
  36. pushd %{name}
  37. (
  38. cat <<EOF
  39. # This is a bundle of X.509 certificates of public Certificate
  40. # Authorities. It was generated from the Mozilla root CA list.
  41. #
  42. # Source: mozilla/security/nss/lib/ckfw/builtins/certdata.txt
  43. #
  44. # Generated from:
  45. EOF
  46. ident -q %{SOURCE0} | sed '1d;s/^/#/';
  47. echo '#';
  48. ) > ca-bundle.crt
  49. (
  50. cat <<EOF
  51. # This is a bundle of X.509 certificates of public Certificate
  52. # Authorities. It was generated from the Mozilla root CA list.
  53. # These certificates are in the OpenSSL "TRUSTED CERTIFICATE"
  54. # format and have trust bits set accordingly.
  55. #
  56. # Source: mozilla/security/nss/lib/ckfw/builtins/certdata.txt
  57. #
  58. # Generated from:
  59. EOF
  60. ident -q %{SOURCE0} | sed '1d;s/^/#/';
  61. echo '#';
  62. ) > ca-bundle.trust.crt
  63. for f in certs/*.crt; do
  64. tbits=`sed -n '/^# openssl-trust/{s/^.*=//;p;}' $f`
  65. case $tbits in
  66. *serverAuth*) openssl x509 -text -in "$f" >> ca-bundle.crt ;;
  67. esac
  68. if [ -n "$tbits" ]; then
  69. targs=""
  70. for t in $tbits; do
  71. targs="${targs} -addtrust $t"
  72. done
  73. openssl x509 -text -in "$f" -trustout $targs >> ca-bundle.trust.crt
  74. fi
  75. done
  76. popd
  77. pushd %{name}/java
  78. test -s ../ca-bundle.crt || exit 1
  79. %{__perl} %{SOURCE2} %{_bindir}/keytool ../ca-bundle.crt
  80. touch -r %{SOURCE0} cacerts
  81. popd
  82. %install
  83. rm -rf $RPM_BUILD_ROOT
  84. mkdir -p $RPM_BUILD_ROOT{%{pkidir}/tls/certs,%{pkidir}/java}
  85. install -p -m 644 %{name}/ca-bundle.crt $RPM_BUILD_ROOT%{pkidir}/tls/certs/ca-bundle.crt
  86. install -p -m 644 %{name}/ca-bundle.trust.crt $RPM_BUILD_ROOT%{pkidir}/tls/certs/ca-bundle.trust.crt
  87. ln -s certs/ca-bundle.crt $RPM_BUILD_ROOT%{pkidir}/tls/cert.pem
  88. touch -r %{SOURCE0} $RPM_BUILD_ROOT%{pkidir}/tls/certs/ca-bundle.crt
  89. touch -r %{SOURCE0} $RPM_BUILD_ROOT%{pkidir}/tls/certs/ca-bundle.trust.crt
  90. # Install Java cacerts file.
  91. mkdir -p -m 700 $RPM_BUILD_ROOT%{pkidir}/java
  92. install -p -m 644 %{name}/java/cacerts $RPM_BUILD_ROOT%{pkidir}/java/
  93. # /etc/ssl/certs symlink for 3rd-party tools
  94. mkdir -p -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/ssl
  95. ln -s ../pki/tls/certs $RPM_BUILD_ROOT%{_sysconfdir}/ssl/certs
  96. %clean
  97. rm -rf $RPM_BUILD_ROOT
  98. %files
  99. %defattr(-,root,root,-)
  100. %dir %{pkidir}/java
  101. %config(noreplace) %{pkidir}/java/cacerts
  102. %dir %{pkidir}/tls
  103. %dir %{pkidir}/tls/certs
  104. %config(noreplace) %{pkidir}/tls/certs/ca-bundle.*crt
  105. %{pkidir}/tls/cert.pem
  106. %dir %{_sysconfdir}/ssl
  107. %{_sysconfdir}/ssl/certs
  108. %changelog
  109. * Wed Sep 25 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 2013.1.94-1
  110. - update to 1.94
  111. * Wed Jul 25 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2012.85-1
  112. - update to r1.85
  113. * Mon Mar 26 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2012.81-1
  114. - initial build for Vine Linux
  115. * Mon Feb 13 2012 Joe Orton <jorton@redhat.com> - 2012.81-1
  116. - update to r1.81
  117. * Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2011.80-2
  118. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  119. * Wed Nov 9 2011 Joe Orton <jorton@redhat.com> - 2011.80-1
  120. - update to r1.80
  121. - fix handling of certs with dublicate Subject names (#733032)
  122. * Thu Sep 1 2011 Joe Orton <jorton@redhat.com> - 2011.78-1
  123. - update to r1.78, removing trust from DigiNotar root (#734679)
  124. * Wed Aug 3 2011 Joe Orton <jorton@redhat.com> - 2011.75-1
  125. - update to r1.75
  126. * Wed Apr 20 2011 Joe Orton <jorton@redhat.com> - 2011.74-1
  127. - update to r1.74
  128. * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2011.70-2
  129. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  130. * Wed Jan 12 2011 Joe Orton <jorton@redhat.com> - 2011.70-1
  131. - update to r1.70
  132. * Tue Nov 9 2010 Joe Orton <jorton@redhat.com> - 2010.65-3
  133. - update to r1.65
  134. * Wed Apr 7 2010 Joe Orton <jorton@redhat.com> - 2010.63-3
  135. - package /etc/ssl/certs symlink for third-party apps (#572725)
  136. * Wed Apr 7 2010 Joe Orton <jorton@redhat.com> - 2010.63-2
  137. - rebuild
  138. * Wed Apr 7 2010 Joe Orton <jorton@redhat.com> - 2010.63-1
  139. - update to certdata.txt r1.63
  140. - use upstream RCS version in Version
  141. * Fri Mar 19 2010 Joe Orton <jorton@redhat.com> - 2010-4
  142. - fix ca-bundle.crt (#575111)
  143. * Thu Mar 18 2010 Joe Orton <jorton@redhat.com> - 2010-3
  144. - update to certdata.txt r1.58
  145. - add /etc/pki/tls/certs/ca-bundle.trust.crt using 'TRUSTED CERTICATE' format
  146. - exclude ECC certs from the Java cacerts database
  147. - catch keytool failures
  148. - fail parsing certdata.txt on finding untrusted but not blacklisted cert
  149. * Fri Jan 15 2010 Joe Orton <jorton@redhat.com> - 2010-2
  150. - fix Java cacert database generation: use Subject rather than Issuer
  151. for alias name; add diagnostics; fix some alias names.
  152. * Mon Jan 11 2010 Joe Orton <jorton@redhat.com> - 2010-1
  153. - adopt Python certdata.txt parsing script from Debian
  154. * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2009-2
  155. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  156. * Wed Jul 22 2009 Joe Orton <jorton@redhat.com> 2009-1
  157. - update to certdata.txt r1.53
  158. * Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2008-8
  159. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  160. * Tue Oct 14 2008 Joe Orton <jorton@redhat.com> 2008-7
  161. - update to certdata.txt r1.49
  162. * Wed Jun 25 2008 Thomas Fitzsimmons <fitzsim@redhat.com> - 2008-6
  163. - Change generate-cacerts.pl to produce pretty aliases.
  164. * Mon Jun 2 2008 Joe Orton <jorton@redhat.com> 2008-5
  165. - include /etc/pki/tls/cert.pem symlink to ca-bundle.crt
  166. * Tue May 27 2008 Joe Orton <jorton@redhat.com> 2008-4
  167. - use package name for temp dir, recreate it in prep
  168. * Tue May 27 2008 Joe Orton <jorton@redhat.com> 2008-3
  169. - fix source script perms
  170. - mark packaged files as config(noreplace)
  171. * Tue May 27 2008 Joe Orton <jorton@redhat.com> 2008-2
  172. - add (but don't use) mkcabundle.pl
  173. - tweak description
  174. - use /usr/bin/keytool directly; BR java-openjdk
  175. * Tue May 27 2008 Joe Orton <jorton@redhat.com> 2008-1
  176. - Initial build (#448497)