Package mediawiki: Specfile

  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
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
%define webappdir %webserver_webappsdir/mediawiki
%define major 1.40

%if_feature php7 7.4.3
%def_with php7
%define defphp php7
%endif

%if_feature php80 8.0.0
%def_with php80
%define defphp php8.0
%endif

%if_feature php81 8.1.0
%def_with php81
%define defphp php8.1
%endif

# default
%if_feature php82 8.2.0
%def_with php82
%define defphp php8.2
%endif


Name: mediawiki
Version: %major.1
Release: alt2

Summary: A wiki engine, typical installation (%defphp with Apache2 and MySQL support)

License: %gpl2plus
Group: Networking/WWW
Url: http://www.mediawiki.org/

Packager: Vitaly Lipatov <lav@altlinux.ru>

BuildArch: noarch

Source0: http://releases.wikimedia.org/mediawiki/%major/%name-%version.tar
Source1: mediawiki-apache2-alt-configs.tar
Source2: README.ALT-ru_RU.UTF-8
Source3: install_php_config.sh
Source4: mediawiki.ini
Source5: README.UPGRADE.ALT-ru_RU.UTF-8
Source6: AdminSettings.sample
Source7: 99-read-user-configs.php

Patch: %name-1.31-alt.patch
Patch1: %name-1.40-config-path.patch

BuildRequires(pre): rpm-macros-apache2
BuildRequires(pre): rpm-build-licenses
BuildRequires(pre): rpm-build-mediawiki >= 0.5
BuildRequires(pre): rpm-build-webserver-common
BuildRequires(pre): rpm-build-python3
BuildRequires(pre): rpm-macros-features >= 0.8

#BuildRequires: apache2-devel

Requires: %name-common = %version-%release
Requires: %name-apache2
Requires: %defphp-mysqlnd-mysqli

%description
MediaWiki is the software used for Wikipedia and the other Wikimedia
Foundation websites. Compared to other wikis, it has an excellent
range of features and support for high-traffic websites using multiple
servers

This package supports wiki farms. Configure it through the web
interface. Remember to secure the config dir after completing the
configuration.

This is a typical %name installation (with Apache2 and MySQL support).

Also you can install %name-php8.0 (%name-php8.1, %name-php7)
package to get all needed php requires.

If you wish %name without any php dependencies, install only %name-common package.

%package -n %name-php7
Summary: Mediawiki's requires for php 7.4
Group: Networking/WWW
Requires: webserver-common
# https://www.mediawiki.org/wiki/Compatibility
Requires: php7-libs >= 7.4.3
# inside php7-libs
# Requires: php7-ctype php7-iconv php7-json php7-xml
Requires: php7-dom php7-fileinfo php7-intl php7-mbstring
Requires: php7-mcrypt php7-xmlreader php7-gd
Requires: php7-opcache php7-apcu
Requires: php7-openssl

Requires: %name-common = %EVR


%package -n %name-php8.0
Summary: Mediawiki's requires for php 8.0
Group: Networking/WWW
Requires: webserver-common
# https://www.mediawiki.org/wiki/Compatibility
Requires: php8.0-libs >= 8.0.0
# inside php8.0-libs
# Requires: php8.0-ctype php8.0-iconv php8.0-json php8.0-xml
Requires: php8.0-dom php8.0-fileinfo php8.0-intl php8.0-mbstring
Requires: php8.0-mcrypt php8.0-xmlreader php8.0-gd
Requires: php8.0-opcache php8.0-apcu
Requires: php8.0-openssl

Requires: %name-common = %EVR

%package -n %name-php8.1
Summary: Mediawiki's requires for php 8.1
Group: Networking/WWW
Requires: webserver-common
# https://www.mediawiki.org/wiki/Compatibility
Requires: php8.1-libs >= 8.1.0
# inside php8.1-libs
# Requires: php8.1-ctype php8.1-iconv php8.1-json php8.1-xml
Requires: php8.1-dom php8.1-fileinfo php8.1-intl php8.1-mbstring
Requires: php8.1-mcrypt php8.1-xmlreader php8.1-gd
Requires: php8.1-opcache php8.1-apcu
Requires: php8.1-openssl

Requires: %name-common = %EVR

%package -n %name-php8.2
Summary: Mediawiki's requires for php 8.2
Group: Networking/WWW
Requires: webserver-common
# https://www.mediawiki.org/wiki/Compatibility
Requires: php8.2-libs >= 8.2.0
# inside php8.1-libs
# Requires: php8.2-ctype php8.2-iconv php8.2-json php8.2-xml
Requires: php8.2-dom php8.2-fileinfo php8.2-intl php8.2-mbstring
Requires: php8.2-mcrypt php8.2-xmlreader php8.2-gd
Requires: php8.2-opcache php8.2-apcu
Requires: php8.2-openssl

Requires: %name-common = %EVR


%package -n %name-common
Summary: Common files for %name
Group: Networking/WWW
Requires: webserver-common

Requires: diffutils
Requires: pear-Mail >= 1.4.1

AutoProv:no
AutoReq:no

# since 1.20
Provides: mediawiki-extensions-ParserFunctions
Obsoletes: mediawiki-extensions-ParserFunctions

Provides: mediawiki-extensions-ConfirmEdit
Obsoletes: mediawiki-extensions-ConfirmEdit

Provides: mediawiki-extensions-SearchSuggest
Obsoletes: mediawiki-extensions-SearchSuggest

Provides: mediawiki-extensions-Nuke
Provides: mediawiki-extensions-Renameuser
Provides: mediawiki-extensions-WikiEditor

# since 1.21
Provides: mediawiki-extensions-Cite
Obsoletes: mediawiki-extensions-Cite

Provides: mediawiki-extensions-ImageMap
Obsoletes: mediawiki-extensions-ImageMap

Provides: mediawiki-extensions-Poem
Obsoletes: mediawiki-extensions-Poem

Conflicts: mediawiki-extensions-FCKEditor

Provides: mediawiki-extensions-TitleBlacklist
Provides: mediawiki-extensions-SpamBlacklist
Provides: mediawiki-extensions-InputBox
Provides: mediawiki-extensions-Interwiki
Provides: mediawiki-extensions-LocalisationUpdate
Provides: mediawiki-extensions-TitleBlacklist

# since 1.22
Provides: mediawiki-extensions-SimpleAntiSpam
Provides: mediawiki-extensions-PostEdit
Provides: mediawiki-extensions-Vector

# since 1.23
Provides: mediawiki-extensions-ExpandTemplates
Provides: mediawiki-extensions-AssertEdit

# since 1.27?
Provides: mediawiki-extensions-CiteThisPage
Provides: mediawiki-extensions-Gadgets

# since 1.29?
# we pack separate subpackage since 1.35
#Provides: mediawiki-extensions-PdfHandler
#Conflicts: mediawiki-extensions-PdfHandler < 1.24

# since 1.31
Provides: mediawiki-extensions-CategoryTree
Obsoletes: mediawiki-extensions-CategoryTree
Provides: mediawiki-extensions-CodeEditor
Obsoletes: mediawiki-extensions-CodeEditor
Provides: mediawiki-extensions-MultimediaViewer
Obsoletes: mediawiki-extensions-MultimediaViewer
Provides: mediawiki-extensions-OATHAuth
Obsoletes: mediawiki-extensions-OATHAuth
Provides: mediawiki-extensions-ReplaceText
Obsoletes: mediawiki-extensions-ReplaceText

# since 1.33
Obsoletes: mediawiki-extensions-StubManager

# since 1.34
# we pack separate subpackage since 1.37.1
#Provides: mediawiki-extensions-Scribunto
#Obsoletes: mediawiki-extensions-Scribunto

# since 1.35
Provides: mediawiki-extensions-VisualEditor
Obsoletes: mediawiki-extensions-VisualEditor

Provides: mediawiki-extensions-Parsoid
Obsoletes: mediawiki-extensions-Parsoid

# since 1.39
# we pack separate subpackage since 1.39
#Provides: mediawiki-extensions-Math

%description -n %name-common
MediaWiki is the software used for Wikipedia and the other Wikimedia
Foundation websites. Compared to other wikis, it has an excellent
range of features and support for high-traffic websites using multiple
servers.

%name-common have no php requires.

%description -n %name-php7
MediaWiki is the software used for Wikipedia and the other Wikimedia
Foundation websites. Compared to other wikis, it has an excellent
range of features and support for high-traffic websites using multiple
servers.

This package contains all needed php7 requires.

%description -n %name-php8.0
MediaWiki is the software used for Wikipedia and the other Wikimedia
Foundation websites. Compared to other wikis, it has an excellent
range of features and support for high-traffic websites using multiple
servers.

This package contains all needed php8.0 requires.

%description -n %name-php8.1
MediaWiki is the software used for Wikipedia and the other Wikimedia
Foundation websites. Compared to other wikis, it has an excellent
range of features and support for high-traffic websites using multiple
servers.

This package contains all needed php8.1 requires.

%description -n %name-php8.2
MediaWiki is the software used for Wikipedia and the other Wikimedia
Foundation websites. Compared to other wikis, it has an excellent
range of features and support for high-traffic websites using multiple
servers.

This package contains all needed php8.2 requires.

%package -n %name-apache2
Summary: Apache2's requires and config files for %name
Group: Networking/WWW
Requires: %name-common = %EVR
Requires: %name-%defphp = %EVR
Requires: apache2-common >= 2.2.0
Requires: %_initdir/%apache2_dname
Requires: apache2-httpd-prefork
Requires: apache2-mod_%defphp

%description -n %name-apache2
Install this package, if you wish to run %name under apache2 webserver.


%package -n %name-mysql
Summary: Virtual package for mysql requires for %name
Group: Networking/WWW
Requires: %name-common = %version-%release
Requires: %defphp-mysqlnd-mysqli

%description -n %name-mysql
Install this package, if you wish to run %name with MySQL database.


%package -n %name-postgresql
Summary: Virtual package for postgresql requires for %name
Group: Networking/WWW
Requires: %name-common = %version-%release
Requires: %defphp-pgsql

%description -n %name-postgresql
Install this package, if you wish to run %name with PostgreSQL database.

%package -n %name-hiphop
Summary: Package with hihop support for %name
Group: Networking/WWW
Requires: %name-common = %version-%release

%description -n %name-hiphop
%summary

%package extensions-SyntaxHighlight_GeSHi
Epoch: 1
Summary: Extension for mediawiki to highlight source code with GeSHi
Summary(ru_RU.UTF-8): Расширение mediawiki для раскраски синтаксиса исходников с помощью GeSHi
Group: Networking/WWW
Requires: %name-common = %version-%release
Requires: python3-module-Pygments >= 2.2.0

%description extensions-SyntaxHighlight_GeSHi
The <syntaxhighlight> tags allow the display of preformatted code modules but in addition
they add coloring according to the code language settings. Like the <pre> tags
and the <poem> tags, they preserve white space, that is, they depict the code
module exactly as it was typed.

%package extensions-PdfHandler
Summary: PdfHandler extension shows uploaded pdf files in a multipage preview layout
Group: Networking/WWW
Requires: %name-common = %version-%release
Conflicts: %name-common < 1.35.0-alt4
# There are commands used. See https://www.mediawiki.org/wiki/Extension:PdfHandler
Requires: /usr/bin/gs
# poppler (needed for retrieving metainfo)
# Requires: /usr/bin/pdfinfo /usr/bin/pdftotext
# use convert wrapper from ImageMagick-tools or GraphicsMagick-ImageMagick-compat
Requires: /usr/bin/convert

%description extensions-PdfHandler
The extension shows uploaded pdf files in a multipage preview layout. With
enabled WebStore the extension generates automatically Images from the
specified page.

Recommended: poppler (for PDF metainfo retrieving)

%package extensions-Scribunto
Summary: The extension allows for embedding scripting languages in MediaWiki
Group: Networking/WWW
Requires: %name-common = %version-%release
Conflicts: %name-common < 1.37.1-alt1

# TODO: also can use php module luasandbox
Requires: /usr/bin/lua5.1
# we miss module versions
#Requires: php7-pcre >= 8.33
#Requires: php7-mbstring

%description extensions-Scribunto
The Scribunto (Latin: "they shall write") extension allows for embedding scripting languages in MediaWiki.
Currently the only supported scripting language is Lua.

%prep
%setup
%patch -p2
%patch1 -p2

%__subst "s|/usr/bin/python|/usr/bin/python3|" extensions/ConfirmEdit/*.py

%install
mkdir -p %buildroot%_mediawikidir/

# Copying to buildroot all files and directories and remove unneeded
cp -r * %buildroot%_mediawikidir/

# Not needed in the package (generate extra dependencies)
rm -rf %buildroot%_mediawikidir/maintenance/dev/
rm -rf %buildroot%_mediawikidir/maintenance/cssjanus/
rm -rf %buildroot%_mediawikidir/maintenance/hhvm/
rm -rf %buildroot%_mediawikidir/maintenance/resources/
rm -rf %buildroot%_mediawikidir/maintenance/{Makefile,mwjsduck-gen,jsduck/,resources/update-oojs.sh}
rm -rf %buildroot%_mediawikidir/tests/
rm -rf %buildroot%_mediawikidir/{*.php5,*.phtml}
rm -rf %buildroot%_mediawikidir/{COPYING,CREDITS,FAQ,HISTORY,README*,RELEASE-NOTES-*,UPGRADE}
rm -rf %buildroot%_mediawikidir/resources/lib/oojs-ui/update-oojs-ui.sh

rm -fr %buildroot%_mediawikidir/includes/zhtable
rm -rf %buildroot%_mediawikidir/maintenance/language/zhtable

rm -rf %buildroot%_mediawikidir/vendor/zordius/lightncandy/build/

# remove embedded lua binaries
rm -rv %buildroot%_mediawikidir/extensions/Scribunto/includes/Engines/LuaStandalone/binaries

# devel tools, reqs node
rm -rfv %buildroot%_mediawikidir/vendor/wikimedia/parsoid/tools/test.selser.sh
rm -rfv %buildroot%_mediawikidir/vendor/wikimedia/parsoid/bin/
rm -rv %buildroot%_mediawikidir/extensions/VisualEditor/lib/ve/bin/
rm -rv %buildroot%_mediawikidir/extensions/VisualEditor/bin/
rm -rv %buildroot%_mediawikidir/vendor/wikimedia/wikipeg/tools/impact
rm -rfv  %buildroot%_mediawikidir/skins/MinervaNeue/dev-scripts


# https://www.mediawiki.org/wiki/Manual:Security#Upload_security
#find %buildroot%_mediawikidir/ \
#  \( -name .htaccess -or -name \*.cmi \) \
#  -print0 \
#  | xargs -r0 rm -v

# packed as docs
rm -rf %buildroot%_mediawikidir/docs/


mkdir -p %buildroot%_mediawikidir/config/

sed -i -e "s/__VERSION__/%version/g" %SOURCE2
sed -i -e "s/__VERSION__/%version/g" %SOURCE5
install -m 644 %SOURCE2 ./
install -m 755 %SOURCE3 ./
install -m 644 %SOURCE4 ./
install -m 644 %SOURCE5 ./


# fix permissions
#chmod +x %buildroot%_mediawikidir/bin/*
find %buildroot%_mediawikidir -name \*.pl -print0 | xargs -r0 chmod +x


mkdir -p %buildroot%webappdir/
cd %buildroot%_mediawikidir/
mv cache images %buildroot%webappdir/
ln -sf %webappdir/{cache,images} .

mkdir config/LocalSettings.d/
install -m 644 %SOURCE7 config/LocalSettings.d/
ln -sf %webappdir/config/LocalSettings.php config/

cd %buildroot%webappdir/
mkdir -p config/LocalSettings.d
install -m 600 %SOURCE6 config/
ln -s %_mediawikidir wiki

# Configs for apache2
mkdir -p %buildroot%apache2_confdir
pushd %buildroot%apache2_confdir
tar xvSf %SOURCE1
find -name \*.conf |xargs sed -i "s|WEBAPPDIR|%webappdir|"
popd

# TODO: use macro
# config for enable bundled ParserFunctions
cat > %buildroot%_mediawiki_settings_dir/50-ParserFunctions.php << EOF
<?php
wfLoadExtension('ParserFunctions');

# enable StringFunctions (like {{#pos, {{#len) by default
\$wgPFEnableStringFunctions = true;
EOF

cat > %buildroot%_mediawiki_settings_dir/50-PdfHandler.php << EOF
<?php
wfLoadExtension('PdfHandler');

\$wgFileExtensions[] = 'pdf';
EOF

cat > %buildroot%_mediawiki_settings_dir/50-Scribunto.php << EOF
<?php
wfLoadExtension('Scribunto');
\$wgScribuntoDefaultEngine = 'luastandalone';
\$wgScribuntoEngineConf['luastandalone']['luaPath'] = '/usr/bin/lua5.1';
EOF

# remove embedded python module
rm -rv %buildroot%_mediawikidir/extensions/SyntaxHighlight_GeSHi/pygments/*
# instead of set wgPygmentizePath
ln -s %_bindir/pygmentize3 %buildroot%_mediawikidir/extensions/SyntaxHighlight_GeSHi/pygments/pygmentize

# TODO: use macro
# config for enable bundled SyntaxHighlight_GeSHi
cat > %buildroot%_mediawiki_settings_dir/50-SyntaxHighlight_GeSHi.php << EOF
<?php
wfLoadExtension('SyntaxHighlight_GeSHi');
EOF

# pack separately
rm -rv %buildroot%_mediawikidir/extensions/Math/

%pre -n %name-common
if [ -L %_mediawikidir/config ]; then
	rm -f %_mediawikidir/config
fi
if [ -d %_datadir/%name/images -a ! -L %_datadir/%name/images ]; then
	rmdir %_datadir/%name/images 2>/dev/null || {
		mv %_datadir/%name/images %_datadir/%name/images.rpmsave
		echo "%_datadir/%name/images saved as %_datadir/%name/images.rpmsave"
	}
fi

%post -n %name-common
if [ $1 -eq 2 ] ; then
	cat <<EOF
Running MediaWiki update:
 # php %webappdir/wiki/maintenance/update.php
Check full upgrading manual on https://www.mediawiki.org/wiki/Manual:Upgrading
EOF
php %webappdir/wiki/maintenance/update.php || :
fi

%post -n %name-apache2
if [ "$CONF_OK" = "1" ]; then
    service %apache2_dname condrestart ||:
fi

%postun -n %name-apache2
if [ "$1" = "0" ] ; then # last uninstall
    service %apache2_dname condrestart ||:
fi

%files

%if_with php7
%files -n %name-php7
%endif

%if_with php80
%files -n %name-php8.0
%endif

%if_with php81
%files -n %name-php8.1
%endif

%if_with php82
%files -n %name-php8.2
%endif

%files -n %name-common
%add_findreq_skiplist %_datadir/%name/config/LocalSettings.php
%_mediawikidir/
%exclude %_mediawikidir/extensions/SyntaxHighlight_GeSHi/
%exclude %_mediawiki_settings_dir/50-SyntaxHighlight_GeSHi.php
%exclude %_mediawikidir/extensions/PdfHandler/
%exclude %_mediawikidir/extensions/Scribunto/
%exclude %_mediawiki_settings_dir/50-PdfHandler.php
%exclude %_mediawiki_settings_dir/50-Scribunto.php
#exclude %_datadir/%name/maintenance/hiphop/
%attr(2750,root,%webserver_group) %dir %webappdir/
%attr(2770,root,%webserver_group) %dir %webappdir/config/
%attr(2770,root,%webserver_group) %dir %webappdir/config/LocalSettings.d/
%attr(2775,root,%webserver_group) %dir %webappdir/images/
%attr(2770,root,%webserver_group) %dir %webappdir/cache/
%webappdir/wiki/
%webappdir/cache/.htaccess
%webappdir/images/*
%webappdir/images/.htaccess
%webappdir/config/AdminSettings.sample

%doc COPYING CREDITS FAQ HISTORY README.md RELEASE-NOTES-%major UPGRADE
%doc README.ALT-ru_RU.UTF-8 README.UPGRADE.ALT-ru_RU.UTF-8 install_php_config.sh mediawiki.ini
%doc docs

%files -n %name-apache2
%config %apache2_mods_start/*.conf
%config %apache2_extra_available/*.conf
%config %apache2_extra_start/*.conf
%config(noreplace) %apache2_sites_available/*.conf

# deprecated
%files -n %name-mysql

# deprecated
%files -n %name-postgresql

#%files -n %name-hiphop
#%_datadir/%name/maintenance/hiphop/

%files extensions-SyntaxHighlight_GeSHi
%_mediawikidir/extensions/SyntaxHighlight_GeSHi/
%_mediawiki_settings_dir/50-SyntaxHighlight_GeSHi.php
%doc extensions/SyntaxHighlight_GeSHi/README

%files extensions-PdfHandler
%_mediawikidir/extensions/PdfHandler/
%_mediawiki_settings_dir/50-PdfHandler.php

%files extensions-Scribunto
%_mediawikidir/extensions/Scribunto/
%_mediawiki_settings_dir/50-Scribunto.php

%changelog
* Sat Oct 21 2023 Vitaly Lipatov <lav@altlinux.ru> 1.40.1-alt2
- fix descriptions of php subpackages
- restore .htaccess to disable php execution in data only dirs

* Mon Oct 16 2023 Vitaly Lipatov <lav@altlinux.ru> 1.40.1-alt1
- new version 1.40.1 (with rpmrb script)
- build with php8.2 by default (ALT bug 48033)
- (T333050, CVE-2023-45363) SECURITY: Fix infinite loop for self-redirects with variants conversion.
- (T340217, CVE-2023-45359) SECURITY: Vector 2022: Numerous unescaped messages leading to potential XSS.
- (T340220, CVE-2023-45361) SECURITY: Vector 2022: vector-intro-page message is assumed to yield a valid title.
- (T340221, CVE-2023-45360) SECURITY: XSS via 'youhavenewmessagesmanyusers' and 'youhavenewmessages' messages.
- (T341529, CVE-2023-45362) SECURITY: diff-multi-sameuser ("X intermediate revisions by the same user not shown") ignores username suppression.
- (T341565, CVE-2023-3550) SECURITY: Stored XSS when uploading crafted XML file to Special:Upload (non standard configuration).


* Sat Aug 12 2023 Vitaly Lipatov <lav@altlinux.ru> 1.40.0-alt1
- new version 1.40.0 (with rpmrb script)
- disable AutoReq
- (T335612, CVE-2023-36674) SECURITY: Move badFile lookup to Linker.
- (T335203, CVE-2023-29197) Upgrade guzzlehttp/psr7 to >= 1.9.1/2.4.5.
- (T335612, CVE-2023-36674) Manualthumb bypasses badFile lookup.
- (T332889, CVE-2023-36675) XSS in BlockLogFormatter due to unsafe message use.

* Tue Jun 06 2023 Vitaly Lipatov <lav@altlinux.ru> 1.39.3-alt1
- new version 1.39.3 (with rpmrb script)

* Sat Feb 25 2023 Vitaly Lipatov <lav@altlinux.ru> 1.39.2-alt1
- new version 1.39.2 (with rpmrb script)

* Sat Feb 25 2023 Vitaly Lipatov <lav@altlinux.ru> 1.39.1-alt1
- new version 1.39.1 (with rpmrb script)

* Fri Dec 30 2022 Vitaly Lipatov <lav@altlinux.ru> 1.39.0-alt3
- remove embedded extension-Math (ALT bug 44708)

* Mon Dec 19 2022 Vitaly Lipatov <lav@altlinux.ru> 1.39.0-alt2
- use rpm-macros-features for build with supported php only

* Sun Dec 18 2022 Vitaly Lipatov <lav@altlinux.ru> 1.39.0-alt1
- new version 1.39.0 (with rpmrb script)
- (T316304, CVE-2022-41767) (T309894, CVE-2022-41765)
- (T307278, CVE-2022-41766) (T311384, CVE-2022-27776)
- add mediawiki-php7, mediawiki-php8.0, mediawiki-php8.1 subpackages
- deprecate mediawiki-mysql and mediawiki-postgresql
  (install mediawiki-apache2 or php8.0-mysqlnd-mysqli)

* Fri Jun 24 2022 Vitaly Lipatov <lav@altlinux.ru> 1.37.2-alt1
- new version 1.37.2 (with rpmrb script)
- (T297571, CVE-2022-28201) (T297731, CVE-2022-28203)
- (T297754, CVE-2022-28204) (T297543, CVE-2022-28202)

* Thu Feb 24 2022 Vitaly Lipatov <lav@altlinux.ru> 1.37.1-alt2
- pack Scribunto extension separately

* Sun Dec 19 2021 Vitaly Lipatov <lav@altlinux.ru> 1.37.1-alt1
- new version 1.37.1 (with rpmrb script)
- (T292763, CVE-2021-44854) (T271037, CVE-2021-44856)
- (T297322, CVE-2021-44857) (T297322, CVE-2021-44858)
- (T297574, CVE-2021-45038) (T293589, CVE-2021-44855) (T294686)

* Sun Dec 19 2021 Vitaly Lipatov <lav@altlinux.ru> 1.36.2-alt1
- new version 1.36.2 (with rpmrb script)

* Sun Jun 27 2021 Vitaly Lipatov <lav@altlinux.ru> 1.36.1-alt1
- new version 1.36.1 (with rpmrb script)
- (T280226, CVE-2021-35197): Prevent blocked users from purging pages

* Sat Jun 26 2021 Vitaly Lipatov <lav@altlinux.ru> 1.36.0-alt2
- fix httpd2 reload

* Sun Jun 06 2021 Vitaly Lipatov <lav@altlinux.ru> 1.36.0-alt1
- new version 1.36.0 (with rpmrb script)

* Wed May 12 2021 Vitaly Lipatov <lav@altlinux.ru> 1.35.2-alt2
- fix build

* Sat Apr 24 2021 Vitaly Lipatov <lav@altlinux.ru> 1.35.2-alt1
- new version 1.35.2 (with rpmrb script)
- (T270453, CVE-2021-30153) (T270713, CVE-2021-30152)
- (T270988, CVE-2021-30155) (T272386, CVE-2021-30159)
- (T276843, CVE-2021-20270, CVE-2021-27291)
- (T277009, CVE-2021-30158) (T278014, CVE-2021-30154)
- (T278058, CVE-2021-30157) (T279451, CVE-2021-30458)

* Wed Dec 23 2020 Vitaly Lipatov <lav@altlinux.ru> 1.35.1-alt1
- new version 1.35.1 (with rpmrb script)
- T268894, CVE-2020-35474, T268917, CVE-2020-35475
- T268938, CVE-2020-35478, CVE-2020-35479
- T205908, CVE-2020-35477, T120883, CVE-2020-35480

* Mon Nov 09 2020 Vitaly Lipatov <lav@altlinux.ru> 1.35.0-alt4
- pack extensions-PdfHandler separately in a subpackage

* Wed Nov 04 2020 Vitaly Lipatov <lav@altlinux.ru> 1.35.0-alt3
- pack subpackage extensions-SyntaxHighlight_GeSHi

* Thu Oct 29 2020 Vitaly Lipatov <lav@altlinux.ru> 1.35.0-alt2
- use php7-gd instead of ImageMagick by default
- use php7-mysqlnd-mysqli instead of php7-mysqli (ALT bug 39162)

* Fri Oct 09 2020 Vitaly Lipatov <lav@altlinux.ru> 1.35.0-alt1
- new version 1.35.0 LTS (with rpmrb script)
- CVE-2020-25813, CVE-2020-25812, CVE-2020-25815
- CVE-2020-17367, CVE-2020-17368, CVE-2020-25814
- CVE-2020-25828, CVE-2020-25869, CVE-2020-25827

* Sat Aug 01 2020 Vitaly Lipatov <lav@altlinux.ru> 1.34.2-alt1
- new version 1.34.2 (with rpmrb script)
- CVE-2020-15005

* Tue Jun 30 2020 Vitaly Lipatov <lav@altlinux.ru> 1.34.1-alt2
- add Obsoletes: mediawiki-extensions-Scribunto (ALT bug 38653)

* Sun Mar 29 2020 Vitaly Lipatov <lav@altlinux.ru> 1.34.1-alt1
- new version 1.34.1 (with rpmrb script)
- security fixes T232932, T246602

* Wed Jan 29 2020 Vitaly Lipatov <lav@altlinux.ru> 1.34.0-alt2
- add pear-Mail requires
- add php7-opcache requires (ALT bug 31471)

* Sun Dec 22 2019 Vitaly Lipatov <lav@altlinux.ru> 1.34.0-alt1
- new version 1.34.0 (with rpmrb script)
- CVE-2019-19709

* Sat Oct 12 2019 Vitaly Lipatov <lav@altlinux.ru> 1.33.1-alt1
- new version 1.33.1 (with rpmrb script)
- CVE-2019-16738

* Thu Sep 26 2019 Vitaly Lipatov <lav@altlinux.ru> 1.33.0-alt1
- new version 1.33.0 (with rpmrb script)

* Thu Jun 06 2019 Vitaly Lipatov <lav@altlinux.ru> 1.32.2-alt1
- new version 1.32.2 (with rpmrb script)
- CVE-2019-12468, CVE-2019-12473, CVE-2019-12471
- CVE-2019-12472, CVE-2019-12474, CVE-2019-12467
- CVE-2019-12466, CVE-2019-12469, CVE-2019-12470
- CVE-2019-11358

* Tue May 14 2019 Vitaly Lipatov <lav@altlinux.ru> 1.32.1-alt1
- new version 1.32.1 (with rpmrb script)

* Sun Mar 03 2019 Vitaly Lipatov <lav@altlinux.ru> 1.32.0-alt1
- new version 1.32.0 (with rpmrb script)

* Sat Sep 29 2018 Vitaly Lipatov <lav@altlinux.ru> 1.31.1-alt1
- new version 1.31.1 (with rpmrb script)
- CVE-2018-0503, CVE-2018-0505, CVE-2018-1325
- fix apache configs

* Mon Jul 30 2018 Vitaly Lipatov <lav@altlinux.ru> 1.31.0-alt1
- new version 1.31.0 (with rpmrb script)

* Sun Apr 29 2018 Vitaly Lipatov <lav@altlinux.ru> 1.30.0-alt2
- switch to php7 using

* Fri Mar 30 2018 Vitaly Lipatov <lav@altlinux.ru> 1.30.0-alt1
- new version 1.30.0 (with rpmrb script)

* Thu Mar 29 2018 Igor Vlasenko <viy@altlinux.ru> 1.29.2-alt2
- NMU: added conflict with mediawiki-extensions-PdfHandler
  (included in 1.29) (closes: #34708)

* Mon Dec 11 2017 Vitaly Lipatov <lav@altlinux.ru> 1.29.2-alt1
- new version 1.29.2 (with rpmrb script)

* Mon Nov 06 2017 Vitaly Lipatov <lav@altlinux.ru> 1.29.1-alt1
- new version 1.29.1 (with rpmrb script)

* Sun Aug 20 2017 Vitaly Lipatov <lav@altlinux.ru> 1.29.0-alt1
- new version 1.29.0 (with rpmrb script)

* Tue Jun 13 2017 Vitaly Lipatov <lav@altlinux.ru> 1.28.2-alt1
- new version 1.28.2 (with rpmrb script)

* Thu Aug 04 2016 Vitaly Lipatov <lav@altlinux.ru> 1.27.0-alt1
- new version 1.27.0 (with rpmrb script)

* Fri Oct 30 2015 Vitaly Lipatov <lav@altlinux.ru> 1.23.11-alt3
- cleanup spec, fix error in post install script

* Fri Oct 30 2015 Vitaly Lipatov <lav@altlinux.ru> 1.23.11-alt2
- cleanup spec, fix error in config

* Thu Oct 29 2015 Vitaly Lipatov <lav@altlinux.ru> 1.23.11-alt1
- new version 1.23.11 (with rpmrb script)
- security fixes

* Sat Feb 21 2015 Vitaly Lipatov <lav@altlinux.ru> 1.23.8-alt2
- it seems PdfHandler was bundled by mistake. drop provides/obsoletes for it
- enable StringFunctions by default

* Sat Feb 21 2015 Vitaly Lipatov <lav@altlinux.ru> 1.23.8-alt1
- new version 1.23.8 (with rpmrb script)
- disable skin using autodiscovery mechanism warning

* Tue Dec 09 2014 Vitaly Lipatov <lav@altlinux.ru> 1.23.7-alt1
- just import mediawiki-1.23.7.tar with rpmgs script
- disable skin using autodiscovery mechanism warning

* Thu Nov 13 2014 Vitaly Lipatov <lav@altlinux.ru> 1.23.6-alt1
- new version 1.23.6 (with rpmrb script)

* Fri Sep 26 2014 Vitaly Lipatov <lav@altlinux.ru> 1.23.4-alt1
- new version 1.23.4 (with rpmrb script)

* Thu Aug 28 2014 Vitaly Lipatov <lav@altlinux.ru> 1.23.3-alt1
- new version 1.23.3 (with rpmrb script)

* Sun Aug 24 2014 Vitaly Lipatov <lav@altlinux.ru> 1.23.2-alt2
- cleanup spec, drop -tex subpackage (use mediawiki-extensions-Math package)

* Wed Aug 20 2014 Vitaly Lipatov <lav@altlinux.ru> 1.23.2-alt1
- new version 1.23.2 (with rpmrb script)

* Sat Jul 26 2014 Vitaly Lipatov <lav@altlinux.ru> 1.23.1-alt1
- new version 1.23.1 (with rpmrb script)

* Thu Mar 13 2014 Vitaly Lipatov <lav@altlinux.ru> 1.22.4-alt1
- new version 1.22.4 (with rpmrb script)
- drop php5-apc requires

* Mon Mar 03 2014 Vitaly Lipatov <lav@altlinux.ru> 1.22.3-alt1
- new version 1.22.3 (with rpmrb script)

* Thu Feb 06 2014 Vitaly Lipatov <lav@altlinux.ru> 1.22.2-alt1
- new version 1.22.2 (with rpmrb script)

* Wed Sep 11 2013 Vitaly Lipatov <lav@altlinux.ru> 1.21.2-alt2
- drop phpinfo from blacklist (ALT bug #29329)
- add provides/obsoletes for the bundled extension PdfHandler

* Fri Sep 06 2013 Vitaly Lipatov <lav@altlinux.ru> 1.21.2-alt1
- new version 1.21.2 (with rpmrb script)
- add php5-dom requires (ALT bug #29328)

* Tue Sep 03 2013 Vitaly Lipatov <lav@altlinux.ru> 1.21.1-alt1
- new version 1.21.1 (with rpmrb script)
- move intree changes to the patch file
- add provides/obsoletes for follow bundled extensions:
  Cite, ImageMap, Poem

* Sat Apr 27 2013 Vitaly Lipatov <lav@altlinux.ru> 1.20.4-alt2
- update README.UPGRADE.ALT
- use macros from rpm-build-mediawiki
- enable ParserFunctions

* Mon Apr 22 2013 Vitaly Lipatov <lav@altlinux.ru> 1.20.4-alt1
- 1.20.4 release

* Tue Feb 26 2013 Vitaly Lipatov <lav@altlinux.ru> 1.20.2-alt1
- 1.20.2 release

* Sat Oct 22 2011 Vitaly Kuznetsov <vitty@altlinux.ru> 1.16.0-alt1.1
- Rebuild with Python-2.7

* Wed Aug 04 2010 Michael A. Kangin <prividen@altlinux.org> 1.16.0-alt1
- 1.16.0 release
- Engine to read user's configs from %webappdir/config/LocalSettings.d/

* Mon May 31 2010 Michael A. Kangin <prividen@altlinux.org> 1.16.0-alt0.beta3
- New beta release

* Fri May 21 2010 Michael A. Kangin <prividen@altlinux.org> 1.16.0-alt0.beta2
- Pre-release of new version

* Mon Mar 22 2010 Michael A. Kangin <prividen@altlinux.org> 1.15.2-alt1
- 1.15.2

* Wed Jan 20 2010 Michael A. Kangin <prividen@altlinux.org> 1.15.1-alt5
- Fix installation with active mod_rewrite (Closes: #22768)
- Move TeX support into mediawiki-tex package

* Fri Dec 25 2009 Michael A. Kangin <prividen@altlinux.org> 1.15.1-alt4
- Fix upgrade from previous version (Closes: #22585)
- New configs layout
- Upgrade notes

* Sun Dec 20 2009 Michael A. Kangin <prividen@altlinux.org> 1.15.1-alt3
- Spec cleanup
- Change packages layout

* Sun Jul 19 2009 Michael A. Kangin <prividen@altlinux.org> 1.15.1-alt2
- LocalSettings.d/ engine

* Sat Jul 18 2009 Michael A. Kangin <prividen@altlinux.org> 1.15.1-alt0
- 1.15.1

* Mon Jun 22 2009 Michael A. Kangin <prividen@altlinux.org> 1.15.0-alt0
- 1.15.0
- redesign package

* Wed Apr 15 2009 Aleksey Avdeev <solo@altlinux.ru> 1.13.0-alt4
- Fix Requires (Closes: #19506)

* Thu Sep 04 2008 Aleksey Avdeev <solo@altlinux.ru> 1.13.0-alt3
- Add README.ALT-ru_RU.UTF-8

* Wed Sep 03 2008 Aleksey Avdeev <solo@altlinux.ru> 1.13.0-alt2
- Removed Requires: tetex-latex, tetex-dvips
- Fix aliases.

* Sat Aug 30 2008 Aleksey Avdeev <solo@altlinux.ru> 1.13.0-alt1
- Update to 1.13.0.

* Tue Jun 03 2008 Aleksey Avdeev <solo@altlinux.ru> 1.10.4-alt1
- First build for ALT.