Sonntag, 18. Juni 2017Packaging MediaWiki extensionsAs part of the work for the openSUSE wiki upgrade and move, I had to package a bunch of MediaWiki extensions. We'll use the MediaWiki 1.27.x LTS release, which means the extensions need to work with this version. When it comes to packaging, there are three categories of extensions: The GoodThese extensions are hosted on phabricator.wikimedia.org, and you can easily download a tarball matching your MediaWiki version using the "Download snapshot" link on the extension page. Packaging these extensions is easy - just unpack the tarball and copy/package everything to the extension directory. These extensions are standardized enough to use a spec file template - usually I only had to adjust the extension name, tarball name and version. Speaking of the version - most extensions don't have explicit version numbers, so I decided to use the tarball date instead. An example for this category is Auth_remoteuser (extension page, package) which we use to keep the "nice" wiki login form. The BadThese extensions are hosted on GitHub and typically only have a "master" branch. They usually still work with MediaWiki 1.27.x, but there's a small risk that they require features added in newer MediaWiki versions, and this risk will grow over time. On the packaging side, they are as easy as the "good" extensions. An example is the ParamProcessor extension (extension page, package) which is needed by the Maps extension The UglyThese extensions can be hosted on phabricator.mediawiki.org or GitHub, so there are "god ugly" and "bad ugly" extensions ;-) The thing that makes packaging really ugly is that they don't include all the code they need. Instead, you have to download the missing parts with composer. composer works fine in a "real" system, but makes packaging hard. Running it from the spec will obviously fail because OBS doesn't allow network connections while building a package (and even if it's annoying in this case, not having network access during build is a good thing[tm]). My solution is a little script that unpacks the extension tarball and runs "composer install --no-dev" inside the extension directory. The most important part is the "--no-dev" parameter because that avoids lots of superfluous things. Afterwards, I build a tarball from the "vendor" directory and add it to the package. Yeah, I know that's not nice - guess why I named this section "The Ugly" ;-) One of the packages that need a "composer install" run is the GitHub extension (extension page, package including script to run composer). Luckily, "ugly" only applies to packaging. The extensions and their maintainers are for sure not ugly - for example, the maintainer of the GitHub extension was very fast in fixing a bug :-) Trackbacks
Trackback-URL für diesen Eintrag
|
KommentareChristian Boltz zu AppArmor 2.12 - The Grinch is confined!
Do., 04.01.2018 17:17
I'd also prefer to be able to
redirect "restart" to
"reload" - but unfortunately
the systemd developers
didn't lik [...]
Gianluca Frustagli zu AppArmor 2.12 - The Grinch is confined!
Do., 04.01.2018 15:37
Hi,
even considered the
existence of the
"aa-teardown" command I
don't think this is a good
idea both from a "phy [...]
Andreas zu PostfixAdmin 3.0.2
Do., 09.02.2017 08:43
Thanks for making and
maintaining this great piece
of software!
So., 01.01.2017 14:36
Christian Boltz zu PostfixAdmin 3.0
So., 13.11.2016 20:32
The *Handler classes
basically map between
database and user interface
(read and write mode,
including error check [...]
Oliver zu PostfixAdmin 3.0
Sa., 12.11.2016 10:04
Hi Christian
First of all,
thanks for postfixadmin.
I
am just adding some
functionality but could need
some he [...]
Mo., 12.09.2016 05:50
victorhck zu Jeopardy!
So., 17.07.2016 14:10
yes! send me that, and I'll
check it out! ;)
Thanks
in advance! :)
Christian Boltz zu Jeopardy!
Do., 14.07.2016 00:45
I'm not sure if someone took
photos ;-)
Yes, you can
download it and run it
locally (even offline) - but
I shou [...]
victorhck zu Jeopardy!
Mi., 13.07.2016 23:27
Hi !
Would be great to see
some pics from OSC'16 playin
this :)
Downloading the
package I can run in my PC
loc [...]
Mo., 04.07.2016 21:35
Fr., 22.05.2015 21:30
Eine sehr gute Idee, das
Ganze von der anderen Seite
zu betrachten (von der Seite
der schlechten Programmierer
:) [...]
Christian Boltz zu Releases!
Mo., 29.08.2011 16:44
Sourceforge hat auf der
"Files"-Seite jedes Projekts
einen RSS-Feed im Angebot
(rechts über der
Dateiliste).
Fü [...]
prego zu Releases!
Mo., 29.08.2011 10:54
Gibt es fuer postfixadmin
eigentlich irgendeine
release Mailingliste oder
Website die ich per RSS
abbonieren kann, [...]
Kaktustier zu Die BESTEN der BESTEN der BESTEN, SIR!
Mo., 01.08.2011 01:57
Nimm die Fußzeile weg, dann
stimmt's ^^
ArchiveKategorienBlog abonnierenImpressum |