summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Julian Ospald <hasufell@posteo.de> 2016-10-16 00:36:55 +0200
committerAvatar Wulf C. Krueger <philantrop@exherbo.org> 2016-10-16 12:08:31 +0200
commit77a61060b6d7c19c970f7e6a4018b6b7c1209ced (patch)
treed439a08d2bb3a40664ed8f87eec07bb33b7e9803
parent637d73aa76c72349f0d2561939124af88815d9ba (diff)
downloadmono-77a61060b6d7c19c970f7e6a4018b6b7c1209ced.tar.gz
mono-77a61060b6d7c19c970f7e6a4018b6b7c1209ced.tar.xz
dev-lang/mono: initialize global certificate store
This unbreaks e.g. dev-lang/fsharp, which uses NuGet during build time, which relies on the mono provided certificate store. Also install a hook for ca-certificates. Change-Id: Ic5dc2ea501929c22d46d85156fffb253dd509744 Reviewed-on: https://galileo.mailstation.de/gerrit/7409 Reviewed-by: Jenkins <wk@mailstation.de> Reviewed-by: Wulf C. Krueger <philantrop@exherbo.org>
-rw-r--r--packages/dev-lang/mono/files/mono-cert-sync10
-rw-r--r--packages/dev-lang/mono/mono-4.2.2.30-r1.exheres-09
-rw-r--r--packages/dev-lang/mono/mono-lang.exlib26
3 files changed, 44 insertions, 1 deletions
diff --git a/packages/dev-lang/mono/files/mono-cert-sync b/packages/dev-lang/mono/files/mono-cert-sync
new file mode 100644
index 0000000..7bd625c
--- /dev/null
+++ b/packages/dev-lang/mono/files/mono-cert-sync
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+echo "mono-cert-sync> Creating the global mono certificate store"
+echo "mono-cert-sync> in /usr/share/.mono/certs"
+echo "mono-cert-sync> from /etc/ssl/certs/ca-certificates.crt."
+
+cert-sync --quiet /etc/ssl/certs/ca-certificates.crt
+
diff --git a/packages/dev-lang/mono/mono-4.2.2.30-r1.exheres-0 b/packages/dev-lang/mono/mono-4.2.2.30-r1.exheres-0
new file mode 100644
index 0000000..06cc520
--- /dev/null
+++ b/packages/dev-lang/mono/mono-4.2.2.30-r1.exheres-0
@@ -0,0 +1,9 @@
+# Copyright 2008 Saleem Abdulrasool <compnerd@compnerd.org>
+# Distributed under the temrs of the GNU General Public License v2
+
+require mono-lang
+
+PLATFORMS="~amd64 ~x86"
+
+WORK="${WORKBASE}/${PN}-$(ever range 1-3)"
+
diff --git a/packages/dev-lang/mono/mono-lang.exlib b/packages/dev-lang/mono/mono-lang.exlib
index 69c2143..2b4dee3 100644
--- a/packages/dev-lang/mono/mono-lang.exlib
+++ b/packages/dev-lang/mono/mono-lang.exlib
@@ -3,7 +3,7 @@
require mono
-export_exlib_phases src_prepare src_configure src_test
+export_exlib_phases src_prepare src_configure src_test src_install pkg_postinst pkg_postrm
SUMMARY="An opensource implementation of the .NET framework"
HOMEPAGE="http://www.mono-project.org/"
@@ -15,6 +15,7 @@ MYOPTIONS="X"
DEPENDENCIES="
build:
+ app-misc/ca-certificates
sys-devel/bison
sys-devel/gettext[>=0.10.35]
virtual/pkg-config[>=0.20]
@@ -88,3 +89,26 @@ mono-lang_src_test() {
edo popd
}
+mono-lang_src_install() {
+ default
+ exeinto /etc/ca-certificates/update.d
+ doexe "${FILES}"/mono-cert-sync
+}
+
+mono-lang_pkg_postinst() {
+ # mono has it's own way of dealing with certificates
+ # this is also required so nuget works correctly
+ einfo "Creating the global mono certificate store"
+ einfo "in /usr/share/.mono/certs"
+ einfo "from /etc/ssl/certs/ca-certificates.crt."
+ cert-sync --quiet /etc/ssl/certs/ca-certificates.crt
+}
+
+mono-lang_pkg_postrm() {
+ if [[ -z ${REPLACED_BY_ID} ]] ; then
+ elog "The global mono certificate store at"
+ elog " /usr/share/.mono"
+ elog "might still contain untracked files."
+ fi
+}
+