Skip to content

(WIP) fix: experimental sqlite driver patch - #638

Closed
DuckBoss wants to merge 2 commits into
mainfrom
jajerome/fix/rpm-build-sqlite-driver
Closed

DuckBoss wants to merge 2 commits into
mainfrom
jajerome/fix/rpm-build-sqlite-driver

Conversation

@DuckBoss

@DuckBoss DuckBoss commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Pull in the revision providing the combined package-profile APIs
(SendPackageProfile, ProfileNotSupportedError); no rhc code uses them
yet. Adapt RefreshContent to the API changes of the newer revision:
UpdateEntitlementCertificate now returns the certificate and key paths,
and signals an up-to-date (304) certificate with a typed error instead
of nil, which must not surface as a failure.

The new transitive pure-Go SQLite driver (go-rpmdb ->
github.com/glebarez/go-sqlite) ends up in the vendor tree and breaks
the Fedora RPM build; the next commit fixes that.

Assisted-by: GLM 5.3
Signed-off-by: Jason Jerome <jajerome@redhat.com>
The rhsm2 bump pulled in github.com/glebarez/go-sqlite (the pure-Go
SQLite driver used by go-rpmdb), which breaks the Fedora RPM build in
two ways:

* The driver's sources carry a '// import "modernc.org/sqlite"' vanity
  import comment. Module mode ignores it, but Fedora's %gobuild runs in
  GOPATH mode (GO111MODULE=off), which enforces the declared import
  path and fails on the mismatch with the directory. Strip the comment
  with a patch applied to the vendored sources in %prep, so it covers
  vendor tarballs regardless of how they were generated.
* The driver ships SQLITE-LICENSE, the SQLite public-domain dedication.
  askalono cannot map it to an SPDX identifier, which fails
  %go_vendor_license_check even though the computed expression matches
  the spec's License tag. Exclude the file from the licensing
  calculation: it is a grant, not a license of the compiled code, which
  is covered by the detected BSD-3-Clause license files.

Verified by running the rpmbuild workflow steps in a fedora:latest
container: the build, the license check and the unit tests all pass
with both changes in place.

Assisted-by: GLM 5.3
Signed-off-by: Jason Jerome <jajerome@redhat.com>
@jirihnidek

Copy link
Copy Markdown
Contributor

I have probably better solution here: jirihnidek/rhsm2#118

@jirihnidek

Copy link
Copy Markdown
Contributor

And one more PR for go-rpmdb: knqyf263/go-rpmdb#64

@DuckBoss DuckBoss closed this Nov 6, 2026
@DuckBoss

Copy link
Copy Markdown
Contributor Author

I've closed this branch as it served only to experiment with different approaches to manage a new dependency.

@DuckBoss
DuckBoss deleted the jajerome/fix/rpm-build-sqlite-driver branch November 11, 2026 14:47
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.

2 participants