Skip to content

Commit 82b3424

Browse files
balasankarcClemens Beck
andcommitted
Merge branch '8341-remove-pg-13' into 'master'
Remove PostgreSQL 13 Closes #8341 See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7546 Merged-by: Balasankar 'Balu' C <[email protected]> Approved-by: Ryan Egesdahl <[email protected]> Approved-by: Balasankar 'Balu' C <[email protected]> Reviewed-by: Balasankar 'Balu' C <[email protected]> Reviewed-by: Ryan Egesdahl <[email protected]> Co-authored-by: Clemens Beck <[email protected]>
2 parents 196b5a3 + 92f7cf5 commit 82b3424

File tree

16 files changed

+33
-212
lines changed

16 files changed

+33
-212
lines changed

config/patches/postgresql/no_docs.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ index 2352fc1..0191427 100644
55
@@ -13,7 +13,7 @@ $(call recurse,all install,src config)
66
docs:
77
$(MAKE) -C doc all
8-
8+
99
-$(call recurse,world,doc src config contrib,all)
1010
+$(call recurse,world,src config contrib,all)
11-
11+
1212
# build src/ before contrib/
1313
world-contrib-recurse: world-src-recurse
1414
@@ -29,7 +29,7 @@ html man:
1515
install-docs:
1616
$(MAKE) -C doc install
17-
17+
1818
-$(call recurse,install-world,doc src config contrib,install)
1919
+$(call recurse,install-world,src config contrib,install)
20-
20+
2121
# build src/ before contrib/
2222
install-world-contrib-recurse: install-world-src-recurse

config/patches/postgresql_new/no_docs.patch

Lines changed: 0 additions & 22 deletions
This file was deleted.

config/patches/postgresql_old/no_docs.patch

Lines changed: 0 additions & 22 deletions
This file was deleted.

config/software/gitlab-exporter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
dependency 'ruby'
2525
dependency 'rubygems'
26-
dependency 'postgresql_new'
26+
dependency 'postgresql'
2727

2828
build do
2929
patch source: 'add-license-file.patch'

config/software/gitlab-rails.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
dependency 'rsync'
4949
dependency 'libicu'
5050
dependency 'postgresql'
51-
dependency 'postgresql_new'
5251
dependency 'python-docutils'
5352
dependency 'krb5'
5453
dependency 'registry'

config/software/postgresql.rb

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717

1818
name 'postgresql'
19-
default_version '13.14'
19+
default_version '14.11'
2020

2121
license 'PostgreSQL'
2222
license_file 'COPYRIGHT'
@@ -30,11 +30,11 @@
3030
dependency 'libossp-uuid'
3131
dependency 'config_guess'
3232

33-
version '13.14' do
34-
source sha256: 'b8df078551898960bd500dc5d38a177e9905376df81fe7f2b660a1407fa6a5ed'
33+
version '14.11' do
34+
source sha256: 'a670bd7dce22dcad4297b261136b3b1d4a09a6f541719562aa14ca63bf2968a8'
3535
end
3636

37-
major_version = '13'
37+
major_version = '14'
3838

3939
source url: "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2"
4040

@@ -58,6 +58,19 @@
5858

5959
make "world -j #{workers}", env: env
6060
make 'install-world', env: env
61+
62+
libpq = 'libpq.so.5'
63+
link "#{prefix}/lib/#{libpq}", "#{install_dir}/embedded/lib/#{libpq}"
64+
65+
# NOTE: There are several dependencies which require these files in these
66+
# locations and have dependency on `postgresql_new`. So when this block is
67+
# changed to be in the `postgresql` software definition for default PG
68+
# version changes, change those dependencies to `postgresql`.
69+
block 'link bin files' do
70+
Dir.glob("#{prefix}/bin/*").each do |bin_file|
71+
link bin_file, "#{install_dir}/embedded/bin/#{File.basename(bin_file)}"
72+
end
73+
end
6174
end
6275

6376
# exclude headers and static libraries from package

config/software/postgresql_new.rb

Lines changed: 0 additions & 80 deletions
This file was deleted.

config/software/postgresql_old.rb

Lines changed: 0 additions & 67 deletions
This file was deleted.

config/software/psycopg2.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
source git: version.remote
2828

2929
dependency 'python3'
30-
dependency 'postgresql_new'
30+
dependency 'postgresql'
3131

3232
pg_major_version = '14'
3333

config/templates/package-scripts/preinst.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ upgrade_check() {
6060
}
6161

6262
pg_check() {
63-
PG_MIN_VERSION=13
63+
PG_MIN_VERSION=14
6464

6565
# Fetch the currently running version from the database
6666
# If this doesn't work, assume this isn't a database node

0 commit comments

Comments
 (0)