Skip to content

Building DEB packages with podman & pbuilder #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 45 commits into from
Mar 29, 2025
Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
06df6f3
Working scaffold for Pgpm::Deb::Builder where every method is a build…
Mar 1, 2025
0a1c5f2
Pgpm::Deb::Builder #prepare and #create_container methods
Mar 2, 2025
676ac4d
Generating debian files used when building a deb package with pbuilder
Mar 2, 2025
11cc4de
Pgpm::Deb::Buider#cleanup stops & removes podman container, removes t…
Mar 2, 2025
0b2dd51
Pgpm::Deb::Builder build with pbuilder, then move .deb file to the host
Mar 2, 2025
62748ff
Pgpb::Deb:Builder pull image unless it exists
Mar 2, 2025
aa0d915
Refactor: replace most hardcoded values for Pgpm::Deb::Spec with valu…
Mar 6, 2025
97d5506
Refactor: make build run all podman commands in one go, then exit
Mar 6, 2025
e26594f
Fix: hardocoded podman image name instead of using Pgpm::Deb::Builder…
Mar 7, 2025
29b258b
Choosing arch suffix for debian packages (it's not the same as in RPM!)
Mar 7, 2025
1f8b9b2
WIP: Timescaledb package with #build_info_for() for Debian and RedHat
Mar 7, 2025
3165c10
Add Package#licence which attempts to read LICENCE file in pkg root a…
Mar 7, 2025
70cb28a
Fix: email address domain name for debian packages
Mar 8, 2025
7dec4dc
Refactor: use Pgpm::Arch.in_scope to determine architecture
Mar 8, 2025
998546d
Rename Pgpm::Package::PGXN#license into #license_text, restore old #l…
Mar 8, 2025
4ac7c0f
Specify default & custom dependencies in packages
Mar 8, 2025
97581e7
Fix: dpkg-buildpackage --build=source step in Pgpm::Deb::Builder shou…
Mar 8, 2025
3b02c92
Proper changelog template for pbuilder packaging
Mar 8, 2025
0a84b1d
Assign .os and .postgres_major_version to @package in Pgpm::RPM::Spec…
Mar 8, 2025
d39f047
Refactor: simpler way to extract postgres major version
Mar 9, 2025
164cc59
Add Dockerfile to build Debian images
Mar 10, 2025
3122b37
Run build commands in podman through `podman exec` so later failed co…
Mar 11, 2025
a1ca046
Patch pbuilder for before running it: prevent cleanup
Mar 11, 2025
0b62193
Fix: use Pgpm::OS.in_scope to determine OS name at the package level
Mar 11, 2025
0e9ce56
Remove 'require "debug"'
Mar 11, 2025
f2339f8
Refactor: use @spec.sources to download and extract sources when buil…
Mar 12, 2025
71bcfdd
Rename & package versioned files into a DEB package, assign proper pa…
Mar 15, 2025
cb58e0a
Create second .deb package (default) which depends on the versioned p…
Mar 16, 2025
8de62ed
Refactor: prepare_artifacts in deb/
Mar 17, 2025
6b56207
Merge branch 'master' into deb
Mar 17, 2025
7b2aee8
Restore accidentally deleted pgpm.spec
Mar 20, 2025
775da7c
Use configure_steps, make_steps & install_steps instead of build_info…
Mar 20, 2025
4bd0cbf
Remove build-essential from the list of default build dependencies
Mar 20, 2025
a99f00b
Accept a larger diversity of filenames for License
Mar 20, 2025
2a4a708
Oops: spelling of "ubuntu"
Mar 21, 2025
de2e49d
Merge branch 'master' into deb
Mar 21, 2025
e14be75
Use Package#native? as condition to add "build-essential" to build_de…
Mar 21, 2025
8d0c175
Refactor: use completely customized debian rules file -- without call…
Mar 26, 2025
8eb2766
Fix: better way to handle custom configure, build and install steps i…
Mar 27, 2025
6fb0482
Fix: timescaledb #build_steps method with custom steps for debian
Mar 27, 2025
a9ac637
Fix: deb package names should not include _, replace them with -
Mar 28, 2025
7f4217c
Fix: os-specific dependency names for pgsodium package
Mar 28, 2025
d0a7907
Oops: remove `require "debug"`
Mar 28, 2025
79e1172
Fix: remove default dependencies for rocky/redheat packages + update …
Mar 28, 2025
3073f73
Fixing rubocop issues
Mar 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/pgpm/rpm/spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ class Spec
attr_reader :package, :release, :postgres_version, :postgres_distribution

def initialize(package)
@postgres_distribution = Pgpm::Postgres::Distribution.in_scope
@package = package
@release = 1

@postgres_distribution = Pgpm::Postgres::Distribution.in_scope
# Needed in order to return correct dependencies for the selected
# version of postgres and selected OS.
@package = package
@package.os = "redhat"
@package.postgres_major_version = @postgres_distribution.version.split(".")[0]
end

def versionless
Expand Down