Skip to content

fix(samba): drop winexe subpackage#17102

Open
PawelWMS wants to merge 1 commit intotomls/base/mainfrom
pawelwi/samba-drop-winexe
Open

fix(samba): drop winexe subpackage#17102
PawelWMS wants to merge 1 commit intotomls/base/mainfrom
pawelwi/samba-drop-winexe

Conversation

@PawelWMS
Copy link
Copy Markdown
Contributor

@PawelWMS PawelWMS commented May 8, 2026

Fixes: AB#19863

Summary

Disables the optional samba-winexe subpackage so the rest of the samba component can ship without rebuilding the Wine-derived Windows winexe.exe cross-host process-launch tool.

Why

samba-winexe packages mingw32/mingw64-cross-compiled Windows PE binaries shipped inside a Linux RPM. Generic .NET / Windows-PE malware-scan heuristics consistently flag those binaries when the RPM is run through our automated package-signing pipeline, irrespective of source provenance. The rest of samba (server, libs, client, dc, vfs modules, ctdb) signs cleanly without winexe.

Mechanism

The upstream samba.spec already gates BuildRequires, %package winexe, and %files winexe behind %if %{with winexe}. Adding build.without = ["winexe"] to base/comps/samba/samba.comp.toml causes azldev to pass --without winexe to rpmbuild and unconditionally drop the subpackage. No spec mutation is needed — which means zero overlay maintenance burden across upstream samba uplifts and full reversibility (just delete the build.without line).

This PR pairs the build.without toggle with a deletion of the now-dangling "samba-winexe" line from base/packages/base.packages.toml so the image manifest does not reference a subpackage the build no longer produces.

The release calculation in base/comps/samba/samba.comp.toml is also switched from "manual" to "autorelease" so azldev can derive the Release tag from the upstream spec's rpmautospec directives instead of carrying a manual override.

Dependency-impact analysis

Repo-wide grep of base/comps/**/*.{toml,comp.toml} and specs/**/*.spec for BuildRequires:.*samba-winexe, Requires:.*samba-winexe, and winexe (excluding the gating %bcond winexe lines and the %package winexe declaration inside samba.spec itself) returns zero consumers. Independently re-confirmed by a dependency-impact reviewer pass. samba-winexe therefore has no reverse dependencies in this distro, and dropping the subpackage is safe.

Functionality lost

Only the optional samba-winexe subpackage containing the Wine-derived Windows winexe.exe cross-host process-launch tool. Niche use case — modern alternatives include OpenSSH on Windows, WinRM, and PowerShell Remoting. The rest of the samba component (server, libs, client, dc, vfs modules, ctdb) is unaffected.

Validation

  • Render: azldev-in-container comp render -p samba (rendered files refreshed under specs/s/samba/).
  • Lock: azldev-in-container comp update -p samba (lock file refreshed in locks/samba.lock).
  • Koji build.

Copilot AI review requested due to automatic review settings May 8, 2026 22:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the samba component configuration to stop producing the optional samba-winexe subpackage (which embeds Windows PE .exe artifacts that trip automated malware-scanning during signing), while keeping the rest of Samba shippable.

Changes:

  • Disable the winexe build conditional for samba via component build configuration (build.without) and switch release handling to autorelease.
  • Remove samba-winexe from the base package manifest so images/manifests don’t reference a no-longer-built RPM.
  • Refresh rendered artifacts for the component (rendered spec/macros/changelog) and update the lock fingerprint accordingly.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
base/comps/samba/samba.comp.toml Disables the winexe subpackage via build.without and switches release calculation to autorelease.
base/packages/base.packages.toml Removes samba-winexe from the base package set.
specs/s/samba/samba.spec Rendered spec refresh reflecting the build config (loads generated macros, Source9999, release/changelog bump).
specs/s/samba/samba.azl.macros New rendered macros file defining %_without_winexe 1 to enforce the disabled subpackage.
locks/samba.lock Updated input fingerprint after component config changes.

Comment thread base/comps/samba/samba.comp.toml
@PawelWMS PawelWMS changed the title samba: drop winexe subpackage fix(samba): drop winexe subpackage May 9, 2026
Disables the optional `samba-winexe` subpackage so the rest of the
`samba` component can ship without rebuilding the Wine-derived
Windows `winexe.exe` cross-host process-launch tool.

Why
---
`samba-winexe` packages mingw32/mingw64-cross-compiled Windows PE
binaries shipped inside a Linux RPM. Generic .NET / Windows-PE
malware-scan heuristics consistently flag those binaries when the
RPM is run through our automated package-signing pipeline,
irrespective of source provenance. The rest of `samba` (server,
libs, client, dc, vfs modules, ctdb) signs cleanly without winexe.

Mechanism
---------
The upstream `samba.spec` already gates BuildRequires,
`%package winexe`, and `%files winexe` behind `%if %{with winexe}`.
Adding `build.without = ["winexe"]` to
`base/comps/samba/samba.comp.toml` causes `azldev` to pass
`--without winexe` to rpmbuild and unconditionally drop the
subpackage. **No spec mutation is needed** -- which means zero
overlay maintenance burden across upstream samba uplifts and full
reversibility (just delete the `build.without` line).

Dependency-impact analysis
--------------------------
Repo-wide grep of `base/comps/**/*.{toml,comp.toml}` and
`specs/**/*.spec` for `BuildRequires:.*samba-winexe`,
`Requires:.*samba-winexe`, and `winexe` (excluding the gating
`%bcond winexe` lines and the `%package winexe` declaration inside
`samba.spec` itself) returns **zero consumers**. Independently
re-confirmed by the dependency-impact verifier. `samba-winexe`
therefore has no reverse dependencies in this distro and dropping
the subpackage is safe.

Pairs with a deletion of the now-dangling `"samba-winexe"` line
from `base/packages/base.packages.toml` so the image manifest does
not reference a sub-package the build no longer produces.

Functionality lost
------------------
Only the optional `samba-winexe` sub-package containing the
Wine-derived Windows `winexe.exe` cross-host process-launch tool.
Niche use case -- modern alternatives include OpenSSH on Windows,
WinRM, and PowerShell Remoting. The rest of the `samba` component
(server, libs, client, dc, vfs modules, ctdb) is unaffected.
@PawelWMS PawelWMS force-pushed the pawelwi/samba-drop-winexe branch from fe9955d to b9bf4bf Compare May 9, 2026 02:11
[components.samba]
# Release: %{samba_release}
release = { calculation = "manual" }
release = { calculation = "autorelease" }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for the change? Any context?

Copy link
Copy Markdown
Collaborator

@christopherco christopherco May 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same question and @dmcilvaney did work with @PawelWMS on this.

Samba's release indirectly has Release: %autorelease (via Release: %{samba_release} and %global samba_release %autorelease), but our tools can't easily follow that, so the calculation = "autorelease" was used

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.

4 participants