From nobody Mon Oct 18 16:27:56 2021 X-Original-To: mono@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C7EC117F8C2A for ; Mon, 18 Oct 2021 16:27:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HY2NX5BjTz4f0L for ; Mon, 18 Oct 2021 16:27:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8796E237CB for ; Mon, 18 Oct 2021 16:27:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 19IGRun7019146 for ; Mon, 18 Oct 2021 16:27:56 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 19IGRuVw019145 for mono@FreeBSD.org; Mon, 18 Oct 2021 16:27:56 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: mono@FreeBSD.org Subject: [Bug 258709] lang/mono6.8: cert-sync doesn't work on iocage style base jails Date: Mon, 18 Oct 2021 16:27:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: missoline@protonmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: mono@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Mono and C# applications on FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-mono List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-mono@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258709 --- Comment #5 from Misso Works --- I have identified where the problem is. Basically, certificates are stored = in the folder Environment.SpecialFolder.CommonApplicationData/.mono/certs as p= er [0]. However the path of Environment.SpecialFolder.CommonApplicationData is= set to "/usr/share" (linuxism). The mono5.10 port includes the proper patches but for some reason they have= n't been carried over to the mono6.8 port. The issue likely didn't appear earli= er as the certificates shipped by upstream were still valid. You can fix the i= ssue by adding the below two commands in the post-patch section of the Makefile = of the port: post-patch: ${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}|g' \ ${WRKSRC}/mcs/class/corlib/System/Environment.cs \ =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ${WRKSRC}/external/corefx/src/System.Runtime.Extensions/src/System/Environm= ent.Unix.cs ${REINPLACE_CMD} -e 's|/usr/share/.mono|${PREFIX}/share/mono|g' \ ${WRKSRC}/man/mono-configuration-crypto.1 \ ${WRKSRC}/man/mono.1 \ ${WRKSRC}/man/mozroots.1 I am not sure why these changes have been implemented as post-patches inste= ad of regular patch files, the maintainer may simply have run out of time at t= he time. The first command replaces "/usr/share" with /usr/local/ in the source files mcs/class/corlib/System.Environment.cs and external/corefx/src/System.Runtime.Extensions/src/System.Environment.Unix. The second command replaces /usr/share/.mono with /usr/local/share/mono for= a couple of man files. With regards to replacing "/usr/share/.mono" with "/usr/local/mono" there is also a need to copy over the following patch fil= es from the 5.10 ports: - patch-mcs_class_Mono.Security_Mono.Security.Cryptography_KeyPairPersistence= .cs=20 - patch-mcs_class_Mono.Security_Mono.Security.X509_X509StoreManager.cs - patch-mcs_tools_mono-configuration-crypto_lib_Mono.Configuration.Crypto_Key= ContainerCollection.cs=20 These files directly relate to the certificate manager so applying these patches is important. Then build from source and cert-sync should work as expected. At do not have access to a proper FreeBSD lab at the minute to implement it and propose clean files, but wanted to throw this here in the meantime in case this helps someone being stuck. --=20 You are receiving this mail because: You are the assignee for the bug.=