Skip to content

build(win): sign rsession.dll alongside the launcher stubs (backport) - #18562

Merged
gtritchie merged 1 commit into
rel-yellow-yarrowfrom
bugfix/yellow-yarrow-sign-rsession-dll
Aug 14, 2026
Merged

gtritchie merged 1 commit into
rel-yellow-yarrowfrom
bugfix/yellow-yarrow-sign-rsession-dll

Conversation

@gtritchie

Copy link
Copy Markdown
Member

Backport of #18516 (06473dc67a) to Yellow Yarrow 2026.08.1.

This branch carries the rsession-shared library from #18070, so rsession.exe and
rsession-utf8.exe are thin launcher stubs and rsession.dll holds essentially all of the
session implementation. %EXECUTABLES% in the Sign Executables stage of
jenkins/Jenkinsfile.windows named only the .exe files, so the shipped DLL was unsigned:
the signed stubs load an unsigned module that policies verifying every loaded image -- WDAC,
AppLocker publisher rules, some EDR configurations -- can block or flag.

Both build-tree copies of the DLL are added to the signing list: the x64 one next to the
stubs, and the x86 one the multiarch build installs into src/cpp/session/x86 alongside
x86/rsession.exe. Signing runs before the Package stage, so the installer picks up the
signed DLLs.

The NEWS entry is in version/news/os/NEWS-2026.08.1-yellow-yarrow.md rather than NEWS.md,
which is not carried on this branch.

Signing runs only in the Windows pipeline, so this needs manual verification on a Yellow
Yarrow daily build: signtool verify /pa (or the Digital Signatures tab) on the installed
rsession.dll.

Addresses #18557

Backport of #18516 (06473dc) to Yellow Yarrow. This branch carries the
rsession-shared library from #18070, so rsession.exe and rsession-utf8.exe are
thin launcher stubs and rsession.dll holds essentially all of the session
implementation -- but %EXECUTABLES% in the Sign Executables stage still named
only the .exe files, so the shipped DLL was unsigned.

Add both build-tree copies of the DLL: the x64 one next to the stubs, and the
x86 one that the multiarch build installs into src/cpp/session/x86 alongside
x86/rsession.exe. Signing runs before the Package stage, so the installer picks
up the signed DLLs.

The NEWS entry goes in version/news/os/NEWS-2026.08.1-yellow-yarrow.md, since
NEWS.md is not carried on this branch.

Addresses #18557
@gtritchie gtritchie added this to the Patch 2026.08.1 milestone Aug 14, 2026
@gtritchie
gtritchie merged commit 999de99 into rel-yellow-yarrow Aug 14, 2026
6 checks passed
@gtritchie
gtritchie deleted the bugfix/yellow-yarrow-sign-rsession-dll branch August 14, 2026 18:01
gtritchie added a commit that referenced this pull request Aug 14, 2026
Backport of #18519 (9e0e8e9) to Yellow Yarrow. The multiarch Windows
Desktop build installs the 32-bit session into <build>/src/cpp/session/x86,
and the 64-bit build had an install rule that collected that directory into
resources/app/bin/x86 at package time. That rule sat inside an "install winpty
on windows" block and was deleted with it in 04db3f5 (#17814), so the
shipped installer has resources/app/bin/x86 with only the x86 VC runtime DLLs
-- no rsession.exe, and since #18070 no rsession.dll. With a 32-bit R,
session-launcher.ts finds no x86/rsession.exe and falls back to the 64-bit
session, which cannot load a 32-bit R.dll.

Restore the rule under a comment that names its actual source, and keep the
file(MAKE_DIRECTORY) call: install(DIRECTORY) errors on a missing source
directory, and non-multiarch builds never create it.

This is what makes the x86 binaries signed by 999de99 (#18562) actually
reach the installer.

The NEWS entry goes in version/news/os/NEWS-2026.08.1-yellow-yarrow.md, since
NEWS.md is not carried on this branch.

Addresses #18558
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant