Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gitlab-org/omnibus-gitlab
  • jacobvosmaer/omnibus-gitlab
  • thorrsson/omnibus-gitlab
  • Drahamim/omnibus-gitlab
  • neonlex/omnibus-gitlab
  • csschwe/omnibus-gitlab
  • dblessing/omnibus-gitlab
  • mwessel/omnibus-gitlab
  • goniz/omnibus-gitlab
  • puiterwijk/omnibus-gitlab
  • roidelapluie/omnibus-gitlab
  • digital.pardoe/omnibus-gitlab
  • mnestor/omnibus-gitlab
  • e29qwg/omnibus-gitlab
  • michaelfenn87/omnibus-gitlab
  • sque/omnibus-gitlab
  • portman.chris/omnibus-gitlab
  • kay.strobach/omnibus-gitlab
  • deshke/omnibus-gitlab
  • axil/omnibus-gitlab
  • hatta0713/omnibus-gitlab
  • nmeth/omnibus-gitlab
  • derric/omnibus-gitlab
  • chjwdzhr/omnibus-gitlab
  • arunwizz/omnibus-gitlab
  • loushang001/omnibus-gitlab
  • jvrplmlmn/omnibus-gitlab
  • razer6/omnibus-gitlab
  • kode/omnibus-gitlab
  • 344208651/omnibus-gitlab
  • dionysiusmarquis/omnibus-gitlab
  • nfeliciano/omnibus-gitlab
  • mike12489/omnibus-gitlab
  • JobV/omnibus-gitlab
  • ashby/omnibus-gitlab
  • DavidS/omnibus-gitlab
  • alexandreab/omnibus-gitlab
  • ph1ll/omnibus-gitlab
  • bbodenmiller/omnibus-gitlab
  • kevwilde/omnibus-gitlab
  • Taylor1791/omnibus-gitlab
  • shen390s/omnibus-gitlab
  • Roger.Bai/omnibus-gitlab
  • sanderboom/omnibus-gitlab
  • genezys/omnibus-gitlab
  • nathansamson/omnibus-gitlab
  • boy12371/omnibus-gitlab
  • john-l-stechschulte/omnibus-gitlab
  • toalexjin/omnibus-gitlab
  • mattes/omnibus-gitlab
  • Thireus/omnibus-gitlab
  • stanhu/omnibus-gitlab
  • bdwyertech/omnibus-gitlab
  • hierarchy/omnibus-gitlab
  • LongLiveCHIEF/omnibus-gitlab
  • ssube/omnibus-gitlab
  • gabeio/omnibus-gitlab
  • petracvv/omnibus-gitlab
  • unixmediasrl/omnibus-gitlab
  • mryanb/omnibus-gitlab
  • masonjm/omnibus-gitlab
  • geoffrey-grebert/omnibus-gitlab
  • salsa-dev/omnibus-gitlab
  • karengc/omnibus-gitlab
  • matt-firtion/omnibus-gitlab
  • esemplare/omnibus-gitlab
  • owenspencer/omnibus-gitlab
  • headdetect/omnibus-gitlab
  • rdoursenaud/omnibus-gitlab
  • tduehr/omnibus-gitlab
  • liulu/omnibus-gitlab
  • codename/omnibus-gitlab
  • myovchev/omnibus-gitlab
  • hiroponz/omnibus-gitlab
  • wakin/omnibus-gitlab
  • jasonwbarnett/omnibus-gitlab
  • flesser/omnibus-gitlab
  • DennisRichard/omnibus-gitlab
  • luyh/omnibus-gitlab
  • nell/omnibus-gitlab
  • TomikoDemby/omnibus-gitlab
  • szechyjs/omnibus-gitlab
  • aussieaggie/omnibus-gitlab
  • chn/omnibus-gitlab
  • bjoernr-de/omnibus-gitlab
  • antons-/omnibus-gitlab
  • jurisdesk/omnibus-gitlab
  • jnijhof/omnibus-gitlab
  • matterbot/omnibus-gitlab
  • nvan/omnibus-gitlab
  • dzaporozhets/omnibus-gitlab
  • seweryn.zeman/omnibus-gitlab
  • ElsaSchmidlin/omnibus-gitlab
  • slovell/omnibus-gitlab
  • david.gammon/omnibus-gitlab
  • pdeffendol/omnibus-gitlab
  • tnir/omnibus-gitlab
  • rburgst/omnibus-gitlab
  • azahadsyed/omnibus-gitlab
  • pbouillet/omnibus-gitlab
  • tpdownes/omnibus-gitlab
  • franciscocg/omnibus-gitlab
  • Urchin/omnibus-gitlab
  • keson/omnibus-gitlab
  • jubianchi/omnibus-gitlab
  • clement.moyroud/omnibus-gitlab
  • mcfedr/omnibus-gitlab
  • patricio/omnibus-gitlab
  • blckshrk/omnibus-gitlab
  • mmonaco/omnibus-gitlab
  • mzaideel/omnibus-gitlab
  • dawg/omnibus-gitlab
  • kohenkatz/omnibus-gitlab
  • badloop/omnibus-gitlab
  • rkmylo/omnibus-gitlab
  • rannen/omnibus-gitlab
  • jicehef/omnibus-gitlab
  • Pascual/omnibus-gitlab
  • scottyates/omnibus-gitlab
  • rosiv/omnibus-gitlab
  • khiem291/omnibus-gitlab
  • lfbrock/omnibus-gitlab
  • yaohonv/omnibus-gitlab
  • jerez-leo13/omnibus-gitlab
  • mrexodia/omnibus-gitlab
  • sanjay_hp/omnibus-gitlab
  • chaosaffe/omnibus-gitlab
  • Kevin-Bannier/omnibus-gitlab
  • jeroenj/omnibus-gitlab
  • stevenorman/omnibus-gitlab
  • chrisruffalo/omnibus-gitlab
  • Kaoshae/omnibus-gitlab
  • francoisprunier/omnibus-gitlab
  • artem-forks/omnibus-gitlab
  • 0bject.destroy/omnibus-gitlab
  • bomba/omnibus-gitlab
  • lajfox/omnibus-gitlab
  • TC01/omnibus-gitlab
  • florian.hustede/omnibus-gitlab
  • bevin/omnibus-gitlab
  • 00dav00/omnibus-gitlab
  • manojskdm/omnibus-gitlab
  • 1beb/omnibus-gitlab
  • oova/omnibus-gitlab
  • frennkie/omnibus-gitlab
  • zwvc/omnibus-gitlab
  • glensc/omnibus-gitlab
  • ghasrfakhri/omnibus-gitlab
  • penweizgx/omnibus-gitlab
  • Dyscrete/omnibus-gitlab
  • aral/omnibus-gitlab
  • mxhcxp/omnibus-gitlab
  • wu0407/omnibus-gitlab
  • jmcgeheeiv/omnibus-gitlab
  • usr01/omnibus-gitlab
  • phsteve/omnibus-gitlab
  • jbyrd/omnibus-gitlab
  • stepheny038/omnibus-gitlab
  • andyGitlab/omnibus-gitlab
  • Pitel/omnibus-gitlab
  • nartamonov/omnibus-gitlab
  • ericidema/omnibus-gitlab
  • shockerli/omnibus-gitlab
  • MrChrisW/omnibus-gitlab
  • it33/omnibus-gitlab
  • cwz8202/omnibus-gitlab
  • MrEhbr/omnibus-gitlab
  • lupine/omnibus-gitlab
  • mattermost/omnibus-gitlab
  • esclear/omnibus-gitlab
  • jstsch/omnibus-gitlab
  • ei-grad/omnibus-gitlab
  • barodeur/omnibus-gitlab
  • brunsa2/omnibus-gitlab
  • jakob-englisch/omnibus-gitlab
  • widerin/omnibus-gitlab
  • permalance/omnibus-gitlab
  • luichan/omnibus-gitlab
  • sknolin/omnibus-gitlab
  • jamaya/omnibus-gitlab
  • slewis/omnibus-gitlab
  • gaariacg/omnibus-gitlab
  • Zorth/omnibus-gitlab
  • jacobvosmaer-gitlab/omnibus-gitlab
  • florianb1/omnibus-gitlab
  • paul.tath/omnibus-gitlab
  • truppproject/omnibus-gitlab
  • markpundsack/omnibus-gitlab
  • X0nic/omnibus-gitlab
  • joernhees/omnibus-gitlab
  • hedgehog/omnibus-gitlab
  • LTheobald/omnibus-gitlab
  • ousmaneTra/omnibus-gitlab
  • oyarzun/omnibus-gitlab
  • libresoftsolutions/omnibus-gitlab
  • kingcody/omnibus-gitlab
  • broftkd/omnibus-gitlab
  • dandunckelman/omnibus-gitlab
  • sluc23/omnibus-gitlab
  • abuango/omnibus-gitlab
  • sascha97915/omnibus-gitlab
  • bartlaarhoven/omnibus-gitlab
  • ngpestelos/omnibus-gitlab
  • gtrafimenkov/omnibus-gitlab
  • grenouillounette/omnibus-gitlab
  • clantant/omnibus-gitlab
  • Ferrisbane/omnibus-gitlab
  • cataphract/omnibus-gitlab
  • leebenson/omnibus-gitlab
  • ernetas/omnibus-gitlab
  • zeiv/omnibus-gitlab
  • narakuphoenix/omnibus-gitlab
  • Grey2k/omnibus-gitlab
  • akabir/omnibus-gitlab
  • OliverHrdz/omnibus-gitlab
  • rut2/omnibus-gitlab
  • jsk-txt/omnibus-gitlab
  • WarheadsSE/omnibus-gitlab
  • SuperPaintman/omnibus-gitlab
  • jasonblais/omnibus-gitlab
  • WheresAlice/omnibus-gitlab
  • ruvasik/omnibus-gitlab
  • ddude/omnibus-gitlab
  • Dantevolk/omnibus-gitlab
  • bronzdoc/omnibus-gitlab
  • nlaveck/omnibus-gitlab
  • halfgaar/omnibus-gitlab
  • ivadim/omnibus-gitlab
  • jgsqware/omnibus-gitlab
  • dserodio/omnibus-gitlab
  • hvlad/omnibus-gitlab
  • saucissound/omnibus-gitlab
  • whywaita/omnibus-gitlab
  • ianbaum/omnibus-gitlab
  • ampedandwired/omnibus-gitlab
  • furoka/omnibus-gitlab
  • benjma/omnibus-gitlab
  • asziranyi/omnibus-gitlab
  • gaveen/omnibus-gitlab
  • gecgooden/omnibus-gitlab
  • philippe.lafoucriere/omnibus-gitlab
  • andreyevbr/omnibus-gitlab
  • phil7/omnibus-gitlab
  • dmytro.protsyk/omnibus-gitlab
  • dcmspe/omnibus-gitlab
  • tjaart/omnibus-gitlab
  • Horgix/omnibus-gitlab
  • juliusmore/omnibus-gitlab
  • w_hayes/omnibus-gitlab
  • davidsan/omnibus-gitlab
  • cmtonkinson/omnibus-gitlab
  • MarkHerhold/omnibus-gitlab
  • kamalbctg/omnibus-gitlab
  • costincaraivan/omnibus-gitlab
  • phoenigmatic/omnibus-gitlab
  • balasankarc/omnibus-gitlab
  • joergi/omnibus-gitlab
  • visualrobots/omnibus-gitlab
  • philip.wood/omnibus-gitlab
  • brammeleman/omnibus-gitlab
  • tulipsnepal/omnibus-gitlab
  • davidhrbac/omnibus-gitlab
  • slawdan/omnibus-gitlab
  • mkungla/omnibus-gitlab
  • Rencs/omnibus-gitlab
  • ReSearchITEng/omnibus-gitlab
  • Olivier87/omnibus-gitlab
  • fuxu/omnibus-gitlab
  • oschwede/omnibus-gitlab
  • CorbanR/omnibus-gitlab
  • kay54088/omnibus-gitlab
  • daxelrod/omnibus-gitlab
  • ofaurax/omnibus-gitlab
  • criloz/omnibus-gitlab
  • balasankarc/myrandomitem
  • webframp/omnibus-gitlab
  • ramaraju/omnibus-gitlab
  • zaunerc/omnibus-gitlab
  • denkweite/omnibus-gitlab
  • attx/omnibus-gitlab
  • JSMenezes/omnibus-gitlab
  • Riztazz/omnibus-gitlab
  • Rudikza/omnibus-gitlab
  • tyranron/omnibus-gitlab
  • anwar.yagoub/omnibus-gitlab
  • jasonroehm/omnibus-gitlab
  • gbraad/omnibus-gitlab
  • twang2218/omnibus-gitlab
  • lloeki/omnibus-gitlab
  • rosanocangussu1/omnibus-gitlab
  • ktou/omnibus-gitlab
  • onophris/omnibus-gitlab
  • jabber/omnibus-gitlab
  • mschaeben/omnibus-gitlab
  • hu19891110/omnibus-gitlab
  • nick.thomas/omnibus-gitlab
  • ibaum/omnibus-gitlab
  • bruxy/omnibus-gitlab
  • gagern/omnibus-gitlab
  • omarmohsen/omnibus-gitlab
  • aumayr/omnibus-gitlab
  • underyx/omnibus-gitlab
  • jacksonpieper/omnibus-gitlab
  • LipperZack/omnibus-gitlab
  • manni9281/omnibus-gitlab
  • mozill32/omnibus-gitlab
  • haad/omnibus-gitlab
  • TomasDuda/omnibus-gitlab
  • technostar98/omnibus-gitlab
  • marin-group/omnibus-gitlab
  • sokchanny7/omnibus-gitlab
  • baparici/omnibus-gitlab
  • mihai.lazar/omnibus-gitlab
  • TamasBarta/omnibus-gitlab
  • taebong0905/omnibus-gitlab
  • nerro/omnibus-gitlab
  • hiyang/omnibus-gitlab
  • chulkilee/omnibus-gitlab
  • guilhermeborgesti/omnibus-gitlab
  • DaAwesomeP/omnibus-gitlab
  • robvl66/omnibus-gitlab
  • siemens/omnibus-gitlab
  • zagaluke/omnibus-gitlab
  • smircea/omnibus-gitlab
  • nils.werner/omnibus-gitlab
  • doomsayer13/omnibus-gitlab
  • andre82hh/omnibus-gitlab
  • ayufan/omnibus-gitlab
  • jasonsuzhou/omnibus-gitlab
  • Yakhlef/omnibus-gitlab
  • TRPmwiesen/omnibus-gitlab
  • RapidSport/omnibus-gitlab
  • lguzzon/omnibus-gitlab
  • oatberrycrunch/omnibus-gitlab
  • fzied/omnibus-gitlab
  • alejdg/omnibus-gitlab
  • kaiohenrique/omnibus-gitlab
  • bahadyr/omnibus-gitlab
  • rfcardenas92/omnibus-gitlab
  • kahbenya/omnibus-gitlab
  • parruda/omnibus-gitlab
  • denimamab/omnibus-gitlab
  • senk/omnibus-gitlab
  • dosuken123/omnibus-gitlab
  • BenoitKnecht/omnibus-gitlab
  • fabrice.herbeaux/omnibus-gitlab
  • jeremyyin/omnibus-gitlab
  • Rockyspade/omnibus-gitlab
  • justincenteno99/omnibus-gitlab
  • mariotr/omnibus-gitlab
  • alanchia2000/omnibus-gitlab
  • voitJ/omnibus-gitlab
  • pchojnacki/omnibus-gitlab
  • Mattlk13/omnibus-gitlab
  • mkubenka/omnibus-gitlab
  • zebek/omnibus-gitlab
  • PServers/omnibus-gitlab
  • brentjanderson/omnibus-gitlab
  • mowijo/omnibus-gitlab
  • timbavati/omnibus-gitlab
  • tanyan2004/omnibus-gitlab
  • jkeys/omnibus-gitlab
  • sedzisz/omnibus-gitlab
  • KevinSS/omnibus-gitlab
  • phlbrz/omnibus-gitlab
  • Zoubeyer/omnibus-gitlab
  • BSCheshir/omnibus-gitlab
  • 42pre/omnibus-gitlab
  • hexagon6/omnibus-gitlab
  • lamto/omnibus-gitlab
  • wuxyyin/omnibus-gitlab
  • gabothep/omnibus-gitlab
  • YahirAlejandro/omnibus-gitlab
  • Cong5/omnibus-gitlab
  • MacDonald/omnibus-gitlab
  • hanslemuet/omnibus-gitlab
  • dfy167/omnibus-gitlab
  • xer0x/omnibus-gitlab
  • larsla/omnibus-gitlab
  • jyunfan2015/omnibus-gitlab
  • techguru/omnibus-gitlab
  • okulygin/omnibus-gitlab
  • rkgarcia/omnibus-gitlab
  • anapsix/omnibus-gitlab
  • sonnt/omnibus-gitlab
  • zpallin/omnibus-gitlab
  • Krijger/omnibus-gitlab
  • jfcoz/omnibus-gitlab
  • songww/omnibus-gitlab
  • ravisorg/omnibus-gitlab
  • GitHK/omnibus-gitlab
  • caleno/omnibus-gitlab
  • esethna/omnibus-gitlab
  • jaksd/omnibus-gitlab
  • colinmollenhour/omnibus-gitlab
  • kavurmam/omnibus-gitlab
  • asmolero/omnibus-gitlab
  • shalithakaru/omnibus-gitlab
  • ouattchidi/omnibus-gitlab
  • 275John/omnibus-gitlab
  • nick.volynkin/omnibus-gitlab
  • admc/omnibus-gitlab
  • rawlingsj/omnibus-gitlab
  • JeffSchering/omnibus-gitlab
  • nifan/omnibus-gitlab
  • sjenning/omnibus-gitlab
  • Macioszek/omnibus-gitlab
  • jboyles/omnibus-gitlab
  • pfrayer/omnibus-gitlab
  • ryehle/omnibus-gitlab
  • ATMartin/omnibus-gitlab
  • esethna2/omnibus-gitlab
  • cbrucks/omnibus-gitlab
  • sylvainb1/omnibus-gitlab
  • charlenchen/omnibus-gitlab
  • tjuerge/omnibus-gitlab
  • twk3/omnibus-gitlab
  • thedanielhanke/omnibus-gitlab
  • robogunslinger/omnibus-gitlab
  • offdutypirate/omnibus-gitlab
  • wlamal855/omnibus-gitlab
  • PrakashSinghRawat/omnibus-gitlab
  • genichin/omnibus-gitlab
  • SuriyaaKudoIsc/omnibus-gitlab
  • ewan.ramsay36/omnibus-gitlab
  • stratosgear/omnibus-gitlab
  • hh1/omnibus-gitlab
  • dinglianju/omnibus-gitlab
  • chg1995/omnibus-gitlab
  • galen_liu/omnibus-gitlab
  • mohammadeslami/omnibus-gitlab
  • INT-ZC/omnibus-gitlab
  • kkirsche/omnibus-gitlab
  • shazbot89/omnibus-gitlab
  • liulantao/omnibus-gitlab
  • sinichkin/omnibus-gitlab
  • fingnet/omnibus-gitlab
  • tclaff/omnibus-gitlab
  • joustie/omnibus-gitlab
  • alexkeramidas/omnibus-gitlab
  • gitlab-contrib/omnibus-gitlab
  • AdrianGPrado/omnibus-gitlab
  • ralphg6/omnibus-gitlab
  • loai.net/omnibus-gitlab
  • claudio.vellage/omnibus-gitlab
  • realsobek/omnibus-gitlab
  • s_c/omnibus-gitlab
  • zeb/omnibus-gitlab
  • HaPPyWaLLaCe/omnibus-gitlab
  • albundy83/omnibus-gitlab
  • ediaz-inteliti/omnibus-gitlab
  • gvieira37/omnibus-gitlab
  • ricardona/omnibus-gitlab
453 results
Show changes
Commits on Source (24)
Showing
with 427 additions and 40 deletions
Loading
Loading
@@ -3,6 +3,26 @@
The latest version of this file can be found at the master branch of the
omnibus-gitlab repository.
 
## 13.4.7 (2020-12-07)
### Security (3 changes)
- Update GnuPG to version 2.2.23.
- Update libxml2 to version 2.9.10.
- Update GraphicsMagick to 1.3.35 and patch PNG vulnerability.
## 13.4.6 (2020-11-03)
### Fixed (1 change)
- Geo: Perform point-in-time recovery before promotion of secondary node. !4636
## 13.4.5 (2020-11-02)
- No changes.
## 13.4.4 (2020-10-15)
 
### Fixed (1 change)
Loading
Loading
13.4.4
\ No newline at end of file
13.4.7
\ No newline at end of file
13.4.4-ee
\ No newline at end of file
13.4.7-ee
\ No newline at end of file
Patch adapted from https://sourceforge.net/p/graphicsmagick/code/ci/50395430a37188d0d197e71bd85ed6dd0f649ee3/.
diff --git a/coders/png.c b/coders/png.c
index 60ce8dc..5878e60 100644
--- a/coders/png.c
+++ b/coders/png.c
@@ -5304,7 +5304,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,
if (logging)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"MAGN chunk (%lu bytes): "
- "First_magnified_object_id=%u, Last_magnified_object_id=%u, "
+ "First_magnified_object_id=%u, Las t_magnified_object_id=%u, "
"MB=%u, ML=%u, MR=%u, MT=%u, MX=%u, MY=%u, "
"X_method=%u, Y_method=%u",
length,
@@ -5679,6 +5679,8 @@ static Image *ReadMNGImage(const ImageInfo *image_info,
/*
If magnifying and a supported method is requested then
magnify the image.
+
+ http://www.libpng.org/pub/mng/spec/mng-1.0-20010209-pdg.html#mng-MAGN
*/
if (((mng_info->magn_methx > 0) && (mng_info->magn_methx <= 5)) &&
((mng_info->magn_methy > 0) && (mng_info->magn_methy <= 5)))
@@ -5689,7 +5691,28 @@ static Image *ReadMNGImage(const ImageInfo *image_info,
if (logging)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Processing MNG MAGN chunk");
+ " Processing MNG MAGN chunk: MB=%u, ML=%u,"
+ " MR=%u, MT=%u, MX=%u, MY=%u,"
+ " X_method=%u, Y_method=%u",
+ mng_info->magn_mb,mng_info->magn_ml,
+ mng_info->magn_mr,mng_info->magn_mt,
+ mng_info->magn_mx,mng_info->magn_my,
+ mng_info->magn_methx,
+ mng_info->magn_methy);
+
+ /*
+ If the image width is 1, then X magnification is done
+ by simple pixel replication.
+ */
+ if (image->columns == 1)
+ mng_info->magn_methx = 1;
+
+ /*
+ If the image height is 1, then Y magnification is done
+ by simple pixel replication.
+ */
+ if (image->rows == 1)
+ mng_info->magn_methy = 1;
if (mng_info->magn_methx == 1)
{
@@ -5734,12 +5757,10 @@ static Image *ReadMNGImage(const ImageInfo *image_info,
Image
*large_image;
- int
- yy;
-
long
m,
- y;
+ y,
+ yy;
register long
x;
From 50f06b3efb638efb0abd95dc62dca05ae67882c2 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Fri, 7 Aug 2020 21:54:27 +0200
Subject: [PATCH] Fix out-of-bounds read with 'xmllint --htmlout'
Make sure that truncated UTF-8 sequences don't cause an out-of-bounds
array access.
Thanks to @SuhwanSong and the Agency for Defense Development (ADD) for
the report.
Fixes #178.
---
xmllint.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/xmllint.c b/xmllint.c
index f6a8e4636..c647486f3 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -528,6 +528,12 @@ static void
xmlHTMLEncodeSend(void) {
char *result;
+ /*
+ * xmlEncodeEntitiesReentrant assumes valid UTF-8, but the buffer might
+ * end with a truncated UTF-8 sequence. This is a hack to at least avoid
+ * an out-of-bounds read.
+ */
+ memset(&buffer[sizeof(buffer)-4], 0, 4);
result = (char *) xmlEncodeEntitiesReentrant(NULL, BAD_CAST buffer);
if (result) {
xmlGenericError(xmlGenericErrorContext, "%s", result);
--
GitLab
\ No newline at end of file
Loading
Loading
@@ -15,7 +15,7 @@
#
 
name 'gnupg'
default_version '2.2.22'
default_version '2.2.23'
 
dependency 'libassuan'
dependency 'npth'
Loading
Loading
@@ -30,7 +30,7 @@ license_file 'COPYING.LGPL3'
skip_transitive_dependency_licensing true
 
source url: "https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-#{version}.tar.bz2",
sha256: '7c1370565e1910b9d8c4e0fb57b9de34aa062ec7bb91abad5803d791f38d855b'
sha256: '10b55e49d78b3e49f1edb58d7541ecbdad92ddaeeb885b6f486ed23d1cd1da5c'
 
relative_path "gnupg-#{version}"
 
Loading
Loading
Loading
Loading
@@ -15,7 +15,7 @@
#
 
name 'graphicsmagick'
default_version '1.3.34'
default_version '1.3.35'
 
license 'MIT'
license_file 'Copyright.txt'
Loading
Loading
@@ -28,13 +28,15 @@ dependency 'libtiff'
dependency 'zlib'
 
source url: "https://ftp.icm.edu.pl/pub/unix/graphics/GraphicsMagick/1.3/GraphicsMagick-#{version}.tar.gz",
sha256: '4717f7a32d964c515d83706fd52d34e089c2ffa35f8fbf43c923ce19343cf2f4'
sha256: 'd96d5ce2ef7e0e90166551e38742713728bfd33d6f18495a9ddda938700fc055'
 
relative_path "GraphicsMagick-#{version}"
 
build do
env = with_standard_compiler_flags(with_embedded_path)
 
patch source: "png-vulnerability-fix.patch"
configure_command = [
'./configure',
"--prefix=#{install_dir}/embedded",
Loading
Loading
Loading
Loading
@@ -15,7 +15,7 @@
#
 
name 'libxml2'
default_version '2.9.9'
default_version '2.9.10'
 
license 'MIT'
license_file 'COPYING'
Loading
Loading
@@ -27,8 +27,8 @@ dependency 'libiconv'
dependency 'liblzma'
dependency 'config_guess'
 
version '2.9.9' do
source md5: 'c04a5a0a042eaa157e8e8c9eabe76bd6'
version '2.9.10' do
source sha256: 'aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f'
end
 
source url: "ftp://xmlsoft.org/libxml2/libxml2-#{version}.tar.gz"
Loading
Loading
@@ -38,6 +38,8 @@ relative_path "libxml2-#{version}"
build do
env = with_standard_compiler_flags(with_embedded_path)
 
patch source: '50f06b3efb638efb0abd95dc62dca05ae67882c2.patch', env: env
configure_command = [
"--with-zlib=#{install_dir}/embedded",
"--with-iconv=#{install_dir}/embedded",
Loading
Loading
require 'rainbow/ext/string'
module Geo
# PromoteDb promotes standby database as usual "pg-ctl promote" but
# if point-in-time LSN file is found, the database will be recovered to that state first
class PromoteDb
PITR_FILE_NAME = 'geo-pitr-file'.freeze
attr_accessor :base_path, :data_path
def initialize(ctl)
@base_path = ctl.base_path
@data_path = ctl.data_path
end
def execute
return true if recovery_to_point_in_time
puts
puts 'Promoting the PostgreSQL read-only replica to primary...'.color(:yellow)
puts
run_command('/opt/gitlab/embedded/bin/gitlab-pg-ctl promote', live: true).error!
success_message
end
private
def postgresql_version
@postgresql_version ||= GitlabCtl::PostgreSQL.postgresql_version(data_path)
end
def recovery_to_point_in_time
lsn = lsn_from_pitr_file
return if lsn.nil?
puts
puts "Recovery to point #{lsn} and promoting...".color(:yellow)
puts
write_recovery_settings(lsn)
run_command('gitlab-ctl restart postgresql', live: true).error!
success_message
true
end
def lsn_from_pitr_file
geo_pitr_file = "#{data_path}/postgresql/data/#{PITR_FILE_NAME}"
return nil unless File.exist?(geo_pitr_file)
lsn = File.read(geo_pitr_file)
lsn.empty? ? nil : lsn
end
def built_recovery_setting_for_pitr(lsn)
<<-EOF
recovery_target_lsn = '#{lsn}'
recovery_target_action = 'promote'
EOF
end
def write_recovery_settings(lsn)
settings = built_recovery_setting_for_pitr(lsn)
if postgresql_version >= 12
puts "PostgreSQL 12 or newer. Writing settings to postgresql.conf...".color(:green)
write_geo_config_file(settings)
else
puts "Writing recovery.conf...".color(:green)
write_recovery_conf(settings)
end
end
def write_geo_config_file(settings)
geo_conf_file = "#{data_path}/postgresql/data/gitlab-geo.conf"
File.open(geo_conf_file, "w", 0640) do |file|
file.write(settings)
end
end
def write_recovery_conf(settings)
recovery_conf = "#{data_path}/postgresql/data/recovery.conf"
File.open(recovery_conf, 'a', 0640) do |file|
file.write(settings)
end
end
def run_command(cmd, live: false)
GitlabCtl::Util.run_command(cmd, live: live)
end
def success_message
puts
puts 'The database is successfully promoted!'.color(:green)
end
end
end
Loading
Loading
@@ -3,8 +3,11 @@ require 'rainbow/ext/string'
 
module Geo
class PromoteToPrimaryNode
def initialize(base_path, options)
@base_path = base_path
attr_accessor :ctl, :base_path
def initialize(ctl, options)
@ctl = ctl
@base_path = @ctl.base_path
@options = options
end
 
Loading
Loading
@@ -61,11 +64,7 @@ module Geo
end
 
def promote_postgresql_to_primary
puts
puts 'Promoting the PostgreSQL to primary...'.color(:yellow)
puts
run_command('/opt/gitlab/embedded/bin/gitlab-pg-ctl promote', live: true).error!
Geo::PromoteDb.new(ctl).execute
end
 
def reconfigure
Loading
Loading
require_relative "./replication_process"
require_relative "./promote_db"
require 'optparse'
require 'English'
 
Loading
Loading
@@ -19,6 +20,8 @@ module Geo
 
def execute!
@replication_process.send(@action.to_sym)
process_pitr_file
rescue Geo::PsqlError => e
puts "Postgres encountered an error: #{e.message}"
exit 1
Loading
Loading
@@ -33,6 +36,30 @@ module Geo
 
private
 
attr_reader :action, :ctl
def process_pitr_file
geo_pitr_file_path = "#{ctl.data_path}/postgresql/data/#{Geo::PromoteDb::PITR_FILE_NAME}"
if action == 'pause'
puts "* Create Geo point-in-time recovery file".color(:green)
File.write(geo_pitr_file_path, current_lsn)
elsif action == 'resume'
puts "* Remove Geo point-in-time recovery file".color(:green)
File.delete(geo_pitr_file_path) if File.exist?(geo_pitr_file_path)
end
end
def current_lsn
run_query('SELECT pg_last_wal_replay_lsn()')
end
def run_query(query)
GitlabCtl::Util.get_command_output("gitlab-psql -d postgres -c '#{query}' -q -t").strip
end
def parse_options!
opts_parser = OptionParser.new do |opts|
opts.banner = "Usage: gitlab-ctl replication-process-#{@action} [options]"
Loading
Loading
require "#{base_path}/embedded/service/omnibus-ctl-ee/lib/geo/promote_db"
#
# Copyright:: Copyright (c) 2020 GitLab Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
add_command_under_category('promote-db', 'gitlab-geo', 'Promote secondary PostgreSQL database', 2) do |cmd_name, *args|
Geo::PromoteDb.new(self).execute
end
Loading
Loading
@@ -18,26 +18,26 @@ require "#{base_path}/embedded/service/omnibus-ctl-ee/lib/geo/promote_to_primary
#
 
add_command_under_category('promote-to-primary-node', 'gitlab-geo', 'Promote to primary node', 2) do |cmd_name, *args|
Geo::PromoteToPrimaryNode.new(base_path, get_ctl_options).execute
end
def get_ctl_options
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: gitlab-ctl promote-to-primary-node [options]"
 
def get_ctl_options
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: gitlab-ctl promote-to-primary-node [options]"
opts.on('-p', '--[no-]confirm-primary-is-down', 'Do not ask for confirmation that primary is down') do |p|
options[:confirm_primary_is_down] = p
end
 
opts.on('-p', '--[no-]confirm-primary-is-down', 'Do not ask for confirmation that primary is down') do |p|
options[:confirm_primary_is_down] = p
end
opts.on('-m', '--skip-preflight-checks', 'Perform promotion without running any preflight checks') do |m|
options[:skip_preflight_checks] = m
end
 
opts.on('-m', '--skip-preflight-checks', 'Perform promotion without running any preflight checks') do |m|
options[:skip_preflight_checks] = m
end
opts.on('-f', '--force', 'Proceed even if preflight checks fail') do |f|
options[:force] = f
end
end.parse!(ARGV.dup)
 
opts.on('-f', '--force', 'Proceed even if preflight checks fail') do |f|
options[:force] = f
end
end.parse!(ARGV.dup)
options
end
 
options
Geo::PromoteToPrimaryNode.new(self, get_ctl_options).execute
end
require 'spec_helper'
require 'geo/promote_db'
require 'gitlab_ctl/util'
RSpec.describe Geo::PromoteDb, '#execute' do
let(:instance) { double(base_path: '/opt/gitlab/embedded', data_path: '/var/opt/gitlab/postgresql/data') }
subject(:command) { described_class.new(instance) }
before do
allow($stdout).to receive(:puts)
allow($stdout).to receive(:print)
allow(command).to receive(:run_command).with(any_args)
allow(command).to receive(:run_command).and_return(double('error!' => nil))
end
context 'when PITR file does not exist' do
it 'does not run PITR recovery' do
expect(command).not_to receive(:write_recovery_settings)
command.execute
end
end
context 'when PITR file exists' do
let(:lsn) { '16/B374D848' }
before do
allow(command).to receive(:lsn_from_pitr_file).and_return(lsn)
end
it 'runs PITR recovery' do
expect(command).to receive(:write_recovery_settings).with(lsn)
expect { command.execute }.to output(
/Recovery to point #{lsn} and promoting.../).to_stdout
end
context 'PG version 11' do
it 'runs PITR recovery' do
allow(command).to receive(:postgresql_version).and_return(11)
expect(command).to receive(:write_recovery_conf)
expect { command.execute }.to output(
/Writing recovery.conf/).to_stdout
end
end
context 'PG version 12' do
it 'runs PITR recovery' do
allow(command).to receive(:postgresql_version).and_return(12)
expect(command).to receive(:write_geo_config_file)
expect { command.execute }.to output(
/PostgreSQL 12 or newer. Writing settings to postgresql.conf/).to_stdout
end
end
end
end
require 'spec_helper'
require 'fileutils'
require 'geo/promote_to_primary_node'
require 'geo/promote_db'
require 'geo/promotion_preflight_checks'
require 'gitlab_ctl/util'
 
RSpec.describe Geo::PromoteToPrimaryNode, '#execute' do
let(:options) { { skip_preflight_checks: true } }
 
subject(:command) { described_class.new(nil, options) }
let(:instance) { double(base_path: '/opt/gitlab/embedded', data_path: '/var/opt/gitlab/postgresql/data') }
subject(:command) { described_class.new(instance, options) }
 
let(:temp_directory) { Dir.mktmpdir }
let(:gitlab_config_path) { File.join(temp_directory, 'gitlab.rb') }
Loading
Loading
@@ -23,6 +26,23 @@ RSpec.describe Geo::PromoteToPrimaryNode, '#execute' do
FileUtils.rm_rf(temp_directory)
end
 
describe '#promote_postgresql_to_primary' do
before do
allow(STDIN).to receive(:gets).and_return('y')
allow(command).to receive(:toggle_geo_roles).and_return(true)
allow(command).to receive(:reconfigure).and_return(true)
allow(command).to receive(:promote_to_primary).and_return(true)
allow(command).to receive(:success_message).and_return(true)
end
it 'promotes the database' do
expect_any_instance_of(Geo::PromoteDb).to receive(:execute)
command.execute
end
end
describe '#run_preflight_checks' do
before do
allow(STDIN).to receive(:gets).and_return('y')
Loading
Loading
@@ -57,7 +77,7 @@ RSpec.describe Geo::PromoteToPrimaryNode, '#execute' do
 
it 'passes given options to preflight checks command' do
expect(Geo::PromotionPreflightChecks).to receive(:new).with(
nil, options).and_call_original
'/opt/gitlab/embedded', options).and_call_original
 
command.execute
end
Loading
Loading
Loading
Loading
@@ -4,19 +4,26 @@ $LOAD_PATH << './files/gitlab-ctl-commands-ee/lib'
$LOAD_PATH << './files/gitlab-ctl-commands/lib'
 
require 'geo/replication_toggle_command'
require 'geo/promote_to_primary_node'
require 'gitlab_ctl/util'
 
RSpec.describe Geo::ReplicationToggleCommand do
let(:status) { double('Command status', error?: false) }
let(:arguments) { [] }
let(:ctl_instance) { double('gitlab-ctl instance', base_path: '') }
let(:ctl_instance) { double('gitlab-ctl instance', base_path: '', data_path: 'data_path') }
before do
allow_any_instance_of(Geo::ReplicationToggleCommand).to receive(:current_lsn).and_return('16/B374D848')
end
 
describe 'pause' do
subject { described_class.new(ctl_instance, 'pause', arguments) }
 
it 'calls pause' do
expect_any_instance_of(Geo::ReplicationProcess).to receive(:pause)
expect(File).to receive(:write).with('data_path/postgresql/data/geo-pitr-file', '16/B374D848')
 
subject.execute!
expect { subject.execute! }.to output(/Create Geo point-in-time recovery file/).to_stdout
end
 
it 'rescues and exits if postgres has an error' do
Loading
Loading
@@ -33,8 +40,9 @@ RSpec.describe Geo::ReplicationToggleCommand do
it 'uses the specified database' do
expect(Geo::ReplicationProcess).to receive(:new).with(any_args, { db_name: 'database_i_want' }).and_call_original
expect_any_instance_of(Geo::ReplicationProcess).to receive(:pause)
expect(File).to receive(:write).with('data_path/postgresql/data/geo-pitr-file', '16/B374D848')
 
subject.execute!
expect { subject.execute! }.to output(/Create Geo point-in-time recovery file/).to_stdout
end
end
end
Loading
Loading
@@ -45,7 +53,7 @@ RSpec.describe Geo::ReplicationToggleCommand do
it 'calls resume' do
expect_any_instance_of(Geo::ReplicationProcess).to receive(:resume)
 
subject.execute!
expect { subject.execute! }.to output(/Remove Geo point-in-time recovery file/).to_stdout
end
 
it 'rescues and exits if postgres has an error' do
Loading
Loading
@@ -71,7 +79,7 @@ RSpec.describe Geo::ReplicationToggleCommand do
expect(Geo::ReplicationProcess).to receive(:new).with(any_args, { db_name: 'database_i_want' }).and_call_original
expect_any_instance_of(Geo::ReplicationProcess).to receive(:resume)
 
subject.execute!
expect { subject.execute! }.to output(/Remove Geo point-in-time recovery file/).to_stdout
end
end
end
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
require 'geo/promote_db'
RSpec.describe 'gitlab-ctl promote-db' do
let(:klass) { Geo::PromoteDb }
let(:command_name) { 'promote-db' }
let(:command_script) { 'promote_db' }
include_context 'ctl'
it_behaves_like 'gitlab geo promotion commands', 'promote-db'
end