1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
|
# Inlude Salsa-CI as a base
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
# Overridfe Salsa-CI with MariaDB specific variations
variables:
DEB_BUILD_OPTIONS: "nocheck noautodbgsym"
RELEASE: sid
SALSA_CI_DISABLE_REPROTEST: 1
SALSA_CI_DISABLE_MISSING_BREAKS: 0
SALSA_CI_DISABLE_RC_BUGS: 1
SALSA_CI_DISABLE_BUILD_PACKAGE_ALL: 1
SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1
GIT_SUBMODULE_STRATEGY: recursive
stages:
- build
- test
- upgrade in Sid
- upgrade from Buster/Stretch/Jessie
- test extras
- upgrade extras
- publish # Stage referenced by Salsa-CI template aptly stanza, so must exist even though not used
build:
extends: .build-package
script: &autobake-deb-steps
- mkdir -p ${WORKING_DIR} ${CCACHE_WORK_DIR}
- mv ${CCACHE_WORK_DIR} ${CCACHE_TMP_DIR}
- apt-get update && apt-get install --yes devscripts equivs ccache build-essential
# Installing build-essential (sic!) until https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=958414 is fixed
- export CCACHE_DIR="${CCACHE_TMP_DIR}"
- update-ccache-symlinks; ccache -z # Zero out ccache counters
- mk-build-deps debian/control -t "apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends" -r -i
- debian/autobake-deb.sh
- cd ..; rm -rfv *.tmp # Clean away build files not to store as artifacts
- cp -v *.* ${WORKING_DIR}/
- du -shc ${WORKING_DIR}/* # Show total file size of artifacts. Must stay are under 100 MB.
- ccache -s # Show ccache stats to validate it worked
- mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} || true
build buster-backports:
extends: .build-package
script:
- *autobake-deb-steps
variables:
RELEASE: buster-backports
build stretch-backports:
extends: .build-package
script:
- *autobake-deb-steps
variables:
RELEASE: stretch-backports
build native deb:
extends: .build-package
script:
- mkdir -p ${WORKING_DIR} ${CCACHE_WORK_DIR}
- mv ${CCACHE_WORK_DIR} ${CCACHE_TMP_DIR}
# NOTE! --git-submodules needed despite GIT_SUBMODULE_STRATEGY since --git-export-dir is used
- gbp buildpackage --git-submodules --git-ignore-branch --git-ignore-new --git-export-dir=${WORKING_DIR} --git-builder="docker-build.sh ${SALSA_CI_IMAGES_DOCKERBUILDER}" |& filter-output
- du -shc ${WORKING_DIR}/* # Show total file size of artifacts. Must stay are under 100 MB.
- mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR}
allow_failure: true
autopkgtest:
extends: .test-autopkgtest
allow_failure: true
piuparts:
extends: .test-piuparts
stage: test extras
allow_failure: true
blhc:
extends: .test-blhc
stage: test extras
dependencies:
- build native deb # Needs the correct debian/output/*.build
allow_failure: true
lintian:
extends: .test-lintian
allow_failure: true
missing-breaks:
extends: .test-missing-breaks
allow_failure: true
# In addition to Salsa-CI, also run these fully MariaDB specific build jobs
fresh install:
stage: test
dependencies:
- build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
# Install MariaDB built in this commit
- apt-get install -y ./*.deb
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mariadb status # There is no init.d/mysql in MariaDB 10.5
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version
- echo 'SHOW DATABASES;' | mariadb # List databases
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
mariadb-10.3.x to mariadb-10.5.y upgrade:
stage: upgrade in Sid
dependencies:
- build
image: debian:sid
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
# Install almost everything currently in Debian Sid
- apt-get install -y 'default-mysql*' 'mariadb-*' libmariadb3 'libmariadb-*' 'libmariadbd*' 'libmariadbclient-*'
# Verify installation of MariaDB currently in Debian Sid
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status
- mariadb --skip-column-names -e "select @@version, @@version_comment"
- echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit
- apt-get install -o Dpkg::Options::=--force-confnew -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
mariadb-10.3.x buster to mariadb-10.5 upgrade:
stage: upgrade from Buster/Stretch/Jessie
dependencies:
- build
image: debian:buster
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
# Install almost everything currently in Debian Buster
- apt-get install -y 'default-mysql*' 'mariadb-*' libmariadb3 'libmariadb-*' 'libmariadbd*' 'libmariadbclient-*'
# Verify installation of MariaDB from Buster
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status
- mysql --skip-column-names -e "select @@version, @@version_comment"
- echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit
- sed 's/buster/sid/g' -i /etc/apt/sources.list # Enable next Debian release
- sed '/sid-updates/d' -i /etc/apt/sources.list # Remove repositories that don't exist for Sid
- sed '/security/d' -i /etc/apt/sources.list # Remove repositories that don't exist for Sid
- apt-get update; apt-get install -y apt # Uprade minimal stack first
- apt-get install -o Dpkg::Options::=--force-confnew -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
mariadb-10.1 to mariadb-10.5 upgrade:
stage: upgrade from Buster/Stretch/Jessie
dependencies:
- build
image: debian:stretch
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
# Install almost everything currently in Debian Stretch
- apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*'
# Verify installation of MariaDB from Stretch
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status
- mysql --skip-column-names -e "select @@version, @@version_comment"
- echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit
- sed 's/stretch/sid/g' -i /etc/apt/sources.list # Enable next Debian release
- sed '/sid-updates/d' -i /etc/apt/sources.list # Remove repositories that don't exist for Sid
- sed '/security/d' -i /etc/apt/sources.list # Remove repositories that don't exist for Sid
- apt-get update; apt-get install -y apt # Uprade minimal stack first
- apt-get install -o Dpkg::Options::=--force-confnew -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
test basic features:
stage: test
dependencies:
- build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
# Install MariaDB built in this commit
- apt-get install -y ./*.deb
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mariadb status # There is no init.d/mysql in MariaDB 10.5
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- echo 'SHOW DATABASES;' | mariadb # List databases
# Print info about server
- mariadb --skip-column-names -e "select @@version, @@version_comment"
- mariadb --skip-column-names -e "select engine, support, transactions, savepoints from information_schema.engines order by engine" | sort
- mariadb --skip-column-names -e "select plugin_name, plugin_status, plugin_type, plugin_library, plugin_license from information_schema.all_plugins order by plugin_name, plugin_library"
# Test various features
- mariadb -e "CREATE DATABASE db"
- mariadb -e "CREATE TABLE db.t_innodb(a1 SERIAL, c1 CHAR(8)) ENGINE=InnoDB; INSERT INTO db.t_innodb VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')"
- mariadb -e "CREATE TABLE db.t_myisam(a2 SERIAL, c2 CHAR(8)) ENGINE=MyISAM; INSERT INTO db.t_myisam VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')"
- mariadb -e "CREATE TABLE db.t_aria(a3 SERIAL, c3 CHAR(8)) ENGINE=Aria; INSERT INTO db.t_aria VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')"
- mariadb -e "CREATE TABLE db.t_memory(a4 SERIAL, c4 CHAR(8)) ENGINE=MEMORY; INSERT INTO db.t_memory VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')"
- mariadb -e "CREATE ALGORITHM=MERGE VIEW db.v_merge AS SELECT * FROM db.t_innodb, db.t_myisam, db.t_aria"
- mariadb -e "CREATE ALGORITHM=TEMPTABLE VIEW db.v_temptable AS SELECT * FROM db.t_innodb, db.t_myisam, db.t_aria"
- mariadb -e "CREATE PROCEDURE db.p() SELECT * FROM db.v_merge"
- mariadb -e "CREATE FUNCTION db.f() RETURNS INT DETERMINISTIC RETURN 1"
# Test that the features still work (this step can be done e.g. after an upgrade)
- mariadb -e "SHOW TABLES IN db"
- mariadb -e "SELECT * FROM db.t_innodb; INSERT INTO db.t_innodb VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')"
- mariadb -e "SELECT * FROM db.t_myisam; INSERT INTO db.t_myisam VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')"
- mariadb -e "SELECT * FROM db.t_aria; INSERT INTO db.t_aria VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')"
- mariadb -e "SELECT * FROM db.t_memory; INSERT INTO db.t_memory VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')"
- mariadb -e "SELECT COUNT(*) FROM db.v_merge"
- mariadb -e "SELECT COUNT(*) FROM db.v_temptable"
- mariadb -e "CALL db.p()"
- mariadb -e "SELECT db.f()"
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
# Build a piece of software that was designed for libmysqlclient-dev but using the
# libmariadb-dev-compat layer. Should always end up using libmariadb.so.3 run-time.
build mariadbclient consumer Python-MySQLdb:
stage: test
dependencies:
- build
image: debian:${RELEASE}
script:
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- mkdir -p debug # Ensure dir exists before using it
- apt-get update
- apt-get install -y pkg-config ./libmariadb-dev*.deb ./libmariadb3_*.deb ./mariadb-common*.deb
- pkg-config --cflags --libs mysqlclient # See what MySQLdb builds with
- apt-get install -y python3-pip
- pip3 install mysqlclient # Compiles module against libmysqlclient
- apt-get purge -y libmariadb-dev # Not needed for run-time
- python3 -c "import MySQLdb; print(MySQLdb.get_client_info())"
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
libmysql* to libmariadb* upgrade:
stage: test extras
dependencies:
- build
image: debian:unstable
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- dpkg -l | grep -iE 'maria|mysql|galera' || true
- apt-get update
# Install all libmysql* available in Debian unstable
- apt-get install -y pkg-config libmysqld-dev libmysqlclient-dev
- pkg-config --list-all
- pkg-config --cflags mysqlclient # mysqlclient.pc from original package
- apt-get install -y ./libmariadb3_*.deb ./mariadb-common_*.deb
- pkg-config --list-all
- apt-get install -y ./libmariadb-dev_*.deb
- pkg-config --list-all
- apt-get install -y ./libmariadb-dev-compat_*.deb
- pkg-config --cflags mysqlclient # mysqlclient.pc from compat package
- pkg-config --list-all
- apt-get install -y ./libmariadbd19_*.deb
- pkg-config --list-all
- apt-get install -y ./libmariadbd-dev_*.deb
- pkg-config --list-all
- apt-get install -y default-libmysqlclient-dev default-libmysqld-dev
- ldconfig -p # | grep -e mariadb -e mysql
- pkg-config --list-all
- pkg-config --cflags --libs mysqlclient
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
default-libmysqlclient-dev upgrade:
stage: upgrade in Sid
dependencies:
- build
image: debian:sid
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- dpkg -l | grep -iE 'maria|mysql|galera' || true
- apt-get update
- apt-get install -y pkg-config default-libmysqlclient-dev default-libmysqld-dev
- pkg-config --list-all
- apt-get install -y ./libmariadb3_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb
- ldconfig -p # | grep -e mariadb -e mysql
- pkg-config --list-all
- pkg-config --cflags --libs mysqlclient
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
default-libmysqlclient-dev on buster upgrade:
stage: upgrade from Buster/Stretch/Jessie
dependencies:
- build
image: debian:buster
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- dpkg -l | grep -iE 'maria|mysql|galera' || true
- apt-get update
- apt-get install -y pkg-config default-libmysqlclient-dev
- pkg-config --list-all
- echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list
- apt-get update; apt-get install -y apt # Uprade minimal stack first
- apt-get install -y ./libmariadb3_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb
- ldconfig -p # | grep -e mariadb -e mysql
- pkg-config --list-all
- pkg-config --cflags --libs mysqlclient
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
default-libmysqlclient-dev on stretch upgrade:
stage: upgrade from Buster/Stretch/Jessie
dependencies:
- build
image: debian:stretch
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- dpkg -l | grep -iE 'maria|mysql|galera' || true
- apt-get update
- apt-get install -y pkg-config default-libmysqlclient-dev
- pkg-config --list-all
- echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list
- apt-get update; apt-get install -y apt # Uprade minimal stack first
- apt-get install -y ./libmariadb3_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb
- ldconfig -p # | grep -e mariadb -e mysql
- pkg-config --list-all
- pkg-config --cflags --libs mysqlclient
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
mariadb-connector-c on stretch upgrade:
stage: upgrade from Buster/Stretch/Jessie
dependencies:
- build
image: debian:stretch
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- dpkg -l | grep -iE 'maria|mysql|galera' || true
- apt-get update
- apt-get install -y pkg-config libmariadb2 libmariadb-dev libmariadb-dev-compat
- pkg-config --list-all
- echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list
- apt-get update; apt-get install -y apt # Uprade minimal stack first
- apt-get install -y ./libmariadb3_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb
- ldconfig -p # | grep -e mariadb -e mysql
- pkg-config --list-all
- pkg-config --cflags --libs mysqlclient
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
mysql-5.5 to mariadb-10.5 upgrade:
stage: upgrade from Buster/Stretch/Jessie
dependencies:
- build
image: debian:jessie
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
- apt-get install -y mysql-server
# Verify installation of MySQL from Jessie
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status
- mysql --skip-column-names -e "select @@version, @@version_comment"
- echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit
- sed 's/jessie/sid/g' -i /etc/apt/sources.list # Enable next Debian release
- sed '/sid-updates/d' -i /etc/apt/sources.list # Remove repositories that don't exist for Sid
- sed '/security/d' -i /etc/apt/sources.list # Remove repositories that don't exist for Sid
- apt-get update; apt-get install -y apt || true # Install apt 1.4.9 so the wildcard command below works
- apt-get dist-upgrade -y || true # Upgrade all to avoid udev/systemd failures
- apt-get install -o Dpkg::Options::=--force-confnew -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
# Upgrading from MySQL 5.7 involves automatic renaming of auth_socket plugin
# to unix_socket and automaticly re-adding Password column in user table.
mysql-5.7 to mariadb-10.5 upgrade:
stage: test extras
dependencies:
- build
image: debian:sid
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
- apt-get install -y mysql-server
# Verify installation of MySQL from Sid
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status
- mysql --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit
- apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- mysql --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
# Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump.
# The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh.
mysql-8.0 to mariadb-10.5 upgrade:
stage: upgrade extras
dependencies:
- build
image: debian:sid
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
# Add Ubuntu Focal archive keys and repository
- apt-get update
- apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work
- apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 871920D1991BC93C 3B4FE6ACC0B21F32
- echo 'deb http://archive.ubuntu.com/ubuntu/ focal main restricted' > /etc/apt/sources.list.d/ubuntu.list
- apt-get update
- apt-get install -y mysql-server
# Verify installation of MySQL from Ubuntu Focal
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status
- mysql --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit
- apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- mysql --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb.org-10.5.x to mariadb-10.5 upgrade:
stage: upgrade extras
dependencies:
- build
image: debian:sid
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
- apt install -y curl systemctl # systemctl shim needed on platforms that don't have systemd
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo 'deb [arch=amd64,i386] http://mirror.one.com/mariadb/repo/10.5/debian sid main' > /etc/apt/sources.list.d/mariadb.list
- apt-get update
- apt-get install -y mariadb-server-10.5
# Verify installation of MySQL from Sid
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
# MariaDB.org version of 10.4 and early 10.5 do not install an init file, so
# it must be installed here manually
- cp /usr/share/mysql/mysql.init /etc/init.d/mysql; chmod +x /etc/init.d/mysql; service mysql start; sleep 5
- service mysql status
- mysql --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit
- apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status
- service mariadb status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- mysql --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb.org-10.4 to mariadb-10.5 upgrade:
stage: upgrade extras
dependencies:
- build
image: debian:sid
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
- apt install -y curl systemctl # systemctl shim needed on platforms that don't have systemd
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo 'deb [arch=amd64,i386] http://mirror.one.com/mariadb/repo/10.4/debian sid main' > /etc/apt/sources.list.d/mariadb.list
- apt-get update
- apt-get install -y mariadb-server-10.4
# Verify installation of MySQL from Sid
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
# MariaDB.org version of 10.4 and early 10.5 do not install an init file, so
# it must be installed here manually
- cp /usr/share/mysql/mysql.init /etc/init.d/mysql; chmod +x /etc/init.d/mysql; service mysql start; sleep 5
- service mysql status
- mysql --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit
- apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status
- service mariadb status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- mysql --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb.org-10.3 to mariadb-10.5 upgrade:
stage: upgrade extras
dependencies:
- build
image: debian:sid
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
- apt install -y curl
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo 'deb [arch=amd64,i386] http://mirror.one.com/mariadb/repo/10.3/debian sid main' > /etc/apt/sources.list.d/mariadb.list
- apt-get update
- apt-get install -y mariadb-server-10.3
# Verify installation of MySQL from Sid
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status
# prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.5–10.3
- mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mysql --defaults-file=/etc/mysql/debian.cnf
# Install MariaDB built in this commit
- apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- mysql --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb.org-10.2 to mariadb-10.5 upgrade:
stage: upgrade extras
dependencies:
- build
image: debian:sid
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
- apt install -y curl
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo 'deb [arch=amd64,i386] http://mirror.one.com/mariadb/repo/10.2/debian sid main' > /etc/apt/sources.list.d/mariadb.list
- apt-get update
- apt-get install -y mariadb-server-10.2
# Verify installation of MySQL from Sid
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status
# prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.5–10.3
- mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mysql --defaults-file=/etc/mysql/debian.cnf
# Install MariaDB built in this commit
- apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- mysql --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
|