Skip to content

bug: openshell.spec packages Python protobuf stubs without generating them #3513

Description

@politerealism

Part of: #3511

User Story

As a Fedora packager building the python3-openshell subpackage, I want the Python protobuf stubs to be generated as part of the build, so the package doesn't silently ship stale or missing files.

Problem Statement

python/openshell/_proto/*.py (the generated gRPC/protobuf stubs consumed by the Python SDK) is .gitignored and produced by tasks/scripts/generate_python_proto.py, not committed to the repo. openshell.spec's %install copies python/%{name}/_proto/*.py into the buildroot, but nothing in %prep/%build generates these files first.

Impact / Why This Matters

Without this fix, the python3-openshell subpackage either fails to build from a clean source tree, or worse, silently packages stale stubs left over from an unrelated local build — a correctness risk, not just a build failure.

Acceptance Criteria

  • %prep or %build runs tasks/scripts/generate_python_proto.py (or equivalent) against the vendored proto/*.proto files, offline
  • New BuildRequires added for whatever protoc/grpc-tools package this needs (e.g. python3-grpcio-tools or a protobuf-compiler equivalent)
  • Build succeeds from a clean checkout with no pre-existing generated files
  • %check verifies the generated stub files exist and are importable (mirroring the existing Python SDK smoke test already in %check)

Reproduction Steps

  1. Check out a clean tree (or extract a git archive-style source tarball) with no prior local build artifacts.
  2. Run rpmbuild -bb openshell.spec.
  3. %install's install -pm 0644 python/%{name}/_proto/*.py ... fails — the files don't exist.

Environment

  • Any environment building from a clean checkout/source tarball rather than a local dev tree that has already run proto generation

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-neededOpened without agent diagnostics and needs triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions