The Lego Mirror - debianhttps://blog.legoktm.com/2022-09-02T03:06:58+00:00Kiwix in Debian, 2022 update2022-09-02T03:06:58+00:002022-09-02T03:06:58+00:00legoktmtag:blog.legoktm.com,2022-09-02:/2022/09/02/kiwix-in-debian-2022-update.html<p><em>Previous updates: <a href="https://blog.legoktm.com/2018/12/31/kiwix-in-debian-2018-update.html">2018</a>, <a href="https://blog.legoktm.com/2021/08/19/kiwix-returns-in-debian-bullseye.html">2021</a></em></p>
<p><a href="https://www.kiwix.org/en/">Kiwix</a> is an offline content reader, best known
for distributing copies of Wikipedia. I have been maintaining it in Debian
since 2017.</p>
<p>This year most of the work has been keeping all the packages up to date in anticipation of next year's Debian 12 Bookworm release …</p><p><em>Previous updates: <a href="https://blog.legoktm.com/2018/12/31/kiwix-in-debian-2018-update.html">2018</a>, <a href="https://blog.legoktm.com/2021/08/19/kiwix-returns-in-debian-bullseye.html">2021</a></em></p>
<p><a href="https://www.kiwix.org/en/">Kiwix</a> is an offline content reader, best known
for distributing copies of Wikipedia. I have been maintaining it in Debian
since 2017.</p>
<p>This year most of the work has been keeping all the packages up to date in anticipation of next year's Debian 12 Bookworm release,
including several <a href="https://wiki.debian.org/Teams/ReleaseTeam/Transitions">transitions</a>
for new libzim and libkiwix versions.</p>
<ul>
<li>libzim: 6.3.0 → 8.0.0</li>
<li>zim-tools: 2.1.0 → 3.1.1</li>
<li>python-libzim: 0.0.3 → 1.1.1 (with a <a href="https://github.com/openzim/python-libzim/pull/151">cherry-picked patch</a>)</li>
<li>libkiwix: 9.4.1 → 11.0.0 (with <a href="https://www.debian.org/social_contract#guidelines">DFSG</a> issues fixed!)</li>
<li>kiwix-tools: 3.1.2 → 3.3.0</li>
<li>kiwix (desktop): 2.0.5 → 2.2.2</li>
</ul>
<p>The <a href="https://tracker.debian.org/teams/kiwix-team/">Debian Package Tracker</a>
makes it really easy to keep an eye on all Kiwix-related packages.</p>
<p>All of the "user-facing" packages (zim-tools, kiwix-tools, kiwix) now have
very basic <a href="https://ci.debian.net/doc/">autopkgtests</a> that can provide a
bit of confidence that the package isn't totally broken. I recommend reading
the "<a href="https://ci.debian.net/doc/file.MAINTAINERS.html">FAQ for package maintainers</a>"
to learn about all the benefits you get from having autopkgtests.</p>
<p>Finally, back in March I wrote a blog post, <a href="https://blog.legoktm.com/2022/03/15/how-to-mirror-the-russian-wikipedia-with-debian-and-kiwix.html">How to mirror the Russian Wikipedia with Debian and Kiwix</a>,
which got significant readership (compared to most posts on this blog), including
being quoted by <a href="https://lwn.net/Articles/902463/">LWN</a>!</p>
<p>We are always looking for more contributors, please reach out if you're
interested. The Kiwix team is one of my favorite groups of people to work
with and they love Debian too.</p>How to mirror the Russian Wikipedia with Debian and Kiwix2022-03-15T01:02:35+00:002022-03-15T01:02:35+00:00legoktmtag:blog.legoktm.com,2022-03-15:/2022/03/15/how-to-mirror-the-russian-wikipedia-with-debian-and-kiwix.html<p>It has been reported that the Russian government has threatened to block access to Wikipedia for documenting narratives that do not agree with the official position of the Russian government.</p>
<p>One of the anti-censorship strategies I've been working on is <a href="https://www.kiwix.org/">Kiwix</a>, an offline Wikipedia reader (and plenty of other content …</p><p>It has been reported that the Russian government has threatened to block access to Wikipedia for documenting narratives that do not agree with the official position of the Russian government.</p>
<p>One of the anti-censorship strategies I've been working on is <a href="https://www.kiwix.org/">Kiwix</a>, an offline Wikipedia reader (and plenty of other content too). Kiwix is free and open source software developed by a great community
of people that I really enjoy working with.</p>
<p>With threats of censorship, traffic to Kiwix has increased fifty-fold, with users from Russia accounting for 40% of new downloads!</p>
<p>You can download copies of every language of Wikipedia for offline reading and distribution, as well as hosting your own read-only mirror, which I'm going to explain today.</p>
<p>Disclaimer: depending on where you live it may be illegal or get you in trouble with the authorities to rehost Wikipedia content, please
be aware of your digital and physical safety before proceeding.</p>
<p>With that out of the way, let's get started. You'll need a Debian (or Ubuntu) server with at least 30GB of free disk space. You'll also
want to have a webserver like Apache or nginx installed (I'll share the Apache config here).</p>
<p>First, we need to download the latest copy of the Russian Wikipedia.</p>
<div class="highlight"><pre><span></span><code>$<span class="w"> </span>wget<span class="w"> </span><span class="s1">'https://download.kiwix.org/zim/wikipedia/wikipedia_ru_all_maxi_2022-03.zim'</span>
</code></pre></div>
<p>If the download is interrupted or fails, you can use <code>wget -c $url</code> to resume it.</p>
<p>Next let's install <code>kiwix-serve</code> and try it out. If you're using Ubuntu, I strongly recommend <a href="https://launchpad.net/~kiwixteam/+archive/ubuntu/release">enabling our Kiwix PPA</a> first.</p>
<div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>update
$<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>kiwix-tools
$<span class="w"> </span>kiwix-serve<span class="w"> </span>-p<span class="w"> </span><span class="m">3004</span><span class="w"> </span>wikipedia_ru_all_maxi_2022-03.zim
</code></pre></div>
<p>At this point you should be able to visit <code>http://yourserver.com:3004/</code> and see the Russian Wikipedia. Awesome! You can use any available port, I just picked 3004.</p>
<p>Now let's use systemd to daemonize it so it runs in the background. Create <code>/etc/systemd/system/kiwix-ru-wp.service</code> with the following:</p>
<div class="highlight"><pre><span></span><code><span class="k">[Unit]</span>
<span class="na">Description</span><span class="o">=</span><span class="s">Kiwix Russian Wikipedia</span>
<span class="k">[Service]</span>
<span class="na">Type</span><span class="o">=</span><span class="s">simple</span>
<span class="na">User</span><span class="o">=</span><span class="s">www-data</span>
<span class="na">ExecStart</span><span class="o">=</span><span class="s">/usr/bin/kiwix-serve -p 3004 /path/to/wikipedia_ru_all_maxi_2022-03.zim</span>
<span class="na">Restart</span><span class="o">=</span><span class="s">always</span>
<span class="k">[Install]</span>
<span class="na">WantedBy</span><span class="o">=</span><span class="s">multi-user.target</span>
</code></pre></div>
<p>Now let's start it and enable it at boot:</p>
<div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>systemctl<span class="w"> </span>start<span class="w"> </span>kiwix-ru-wp
$<span class="w"> </span>sudo<span class="w"> </span>systemctl<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>kiwix-ru-wp
</code></pre></div>
<p>Since we want to expose this on the public internet, we should put it behind a more established webserver and configure HTTPS.</p>
<p>Here's the Apache httpd configuration I used:</p>
<div class="highlight"><pre><span></span><code><span class="nt"><VirtualHost</span><span class="w"> </span><span class="s">*:80</span><span class="nt">></span>
<span class="w"> </span><span class="nb">ServerName</span><span class="w"> </span>ru-wp.yourserver.com
<span class="w"> </span><span class="nb">ServerAdmin</span><span class="w"> </span>webmaster@localhost
<span class="w"> </span><span class="nb">DocumentRoot</span><span class="w"> </span><span class="sx">/var/www/html</span>
<span class="w"> </span><span class="nb">ErrorLog</span><span class="w"> </span>${APACHE_LOG_DIR}/error.log
<span class="w"> </span><span class="nb">CustomLog</span><span class="w"> </span>${APACHE_LOG_DIR}/access.log<span class="w"> </span>combined
<span class="w"> </span><span class="nt"><Proxy</span><span class="w"> </span><span class="s">*</span><span class="nt">></span>
<span class="w"> </span><span class="nb">Require</span><span class="w"> </span><span class="k">all</span><span class="w"> </span>granted
<span class="w"> </span><span class="nt"></Proxy></span>
<span class="w"> </span><span class="nb">ProxyPass</span><span class="w"> </span>/<span class="w"> </span>http://127.0.0.1:3004/
<span class="w"> </span><span class="nb">ProxyPassReverse</span><span class="w"> </span>/<span class="w"> </span>http://127.0.0.1:3004/
<span class="nt"></VirtualHost></span>
</code></pre></div>
<p>Put that in <code>/etc/apache2/sites-available/kiwix-ru-wp.conf</code> and run:</p>
<div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>a2ensite<span class="w"> </span>kiwix-ru-wp
$<span class="w"> </span>sudo<span class="w"> </span>systemctl<span class="w"> </span>reload<span class="w"> </span>apache2
</code></pre></div>
<p>Finally, I used <a href="https://certbot.eff.org/">certbot</a> to enable HTTPS on that subdomain and redirect all HTTP traffic over to HTTPS. This is an interactive process that is well documented so I'm not going to go into it in detail.</p>
<p>You can see my mirror of the Russian Wikipedia, following these instructions, at <a href="https://ru-wp.legoktm.com/">https://ru-wp.legoktm.com/</a>. Anyone is welcome to use it or distribute the link, though I am not committing to running it long-term.</p>
<p>This is certainly not a perfect anti-censorship solution, the copy of Wikipedia that Kiwix provides became out of date the moment it was created, and the setup described here will require you to manually update the service
when the new copy is available next month.</p>
<p>Finally, if you have some extra bandwith, you can also help seed this as a <a href="https://download.kiwix.org/zim/wikipedia/wikipedia_ru_all_maxi_2022-03.zim.torrent">torrent</a>.</p>Kiwix returns in Debian Bullseye2021-08-19T03:41:45+00:002021-08-19T03:41:45+00:00legoktmtag:blog.legoktm.com,2021-08-19:/2021/08/19/kiwix-returns-in-debian-bullseye.html<p>(This is my belated #newindebianbullseye post.)</p>
<p>The latest version of the Debian distro, 11.0 aka Bullseye, was <a href="https://www.debian.org/News/2021/20210814">released last week</a> and after a long absence, includes <a href="https://www.kiwix.org/">Kiwix</a>! Previously in Debian 10/Buster, we only had the <a href="https://blog.legoktm.com/2018/12/31/kiwix-in-debian-2018-update.html">underlying C/C++ libraries available</a>.</p>
<p>If you're not familiar with it, Kiwix is …</p><p>(This is my belated #newindebianbullseye post.)</p>
<p>The latest version of the Debian distro, 11.0 aka Bullseye, was <a href="https://www.debian.org/News/2021/20210814">released last week</a> and after a long absence, includes <a href="https://www.kiwix.org/">Kiwix</a>! Previously in Debian 10/Buster, we only had the <a href="https://blog.legoktm.com/2018/12/31/kiwix-in-debian-2018-update.html">underlying C/C++ libraries available</a>.</p>
<p>If you're not familiar with it, Kiwix is an offline content reader, providing Wikipedia, Gutenberg, TED talks, and more in ZIM (<code>.zim</code>) files that can be <a href="https://wiki.kiwix.org/wiki/Content_in_all_languages">downloaded and viewed entirely offline</a>. You can get the entire text of the English Wikipedia in less than 100GB.</p>
<p><code>apt install kiwix</code> will get you a graphical desktop application that allows you to download and read ZIMs. <code>apt install kiwix-tools</code> installs <code>kiwix-serve</code> (among others), which serves ZIM files over an HTTP server.</p>
<p>Additionally, there are now tools in Debian that allow you to create your own ZIM files: <code>zimwriterfs</code> and the <code>python3-libzim</code> library.</p>
<p>All of this would not have been possible without the support of the Kiwix developers, who made it a priority to properly support Debian. All of the Kiwix and repositories have a <a href="https://wiki.kiwix.org/wiki/Ubuntu_PPA/FAQ">CI process</a> that builds Debian packages for each pull request and needs to pass before it'll be accepted.</p>
<p>Ubuntu users can take advantage of <a href="https://launchpad.net/~kiwixteam/+archive/ubuntu/release">our primary PPA</a> or the <a href="https://launchpad.net/~kiwixteam/+archive/ubuntu/dev/">bleeding-edge PPA</a>. For Debian users, my goal is that unstable/sid will have the latest verison within a few days of a release, and once it moves into testing, it'll be available in <a href="https://backports.debian.org/">Debian Backports</a>.</p>
<p>It is always a pleasure working with the Kiwix team, who make a point to <a href="https://legoktm.com/w/images/b/bc/Kiwix_stickers_and_chocolate_%282020%29.jpg">send stickers and chocolate every year</a> :)</p>Starting a new job2020-12-14T09:39:13+00:002020-12-14T09:39:13+00:00legoktmtag:blog.legoktm.com,2020-12-14:/2020/12/14/starting-a-new-job.html<p>Last week I officially joined the <a href="https://www.mediawiki.org/wiki/Wikimedia_Site_Reliability_Engineering">Site Reliability Engineering team</a> at the <a href="https://wikimediafoundation.org/">Wikimedia Foundation</a>. I'll be working with the Service Operations team, which "...takes care of public and “user-visible” services."</p>
<p>I'm glad to be back at the WMF; I had originally started working there in 2013 but recently took a …</p><p>Last week I officially joined the <a href="https://www.mediawiki.org/wiki/Wikimedia_Site_Reliability_Engineering">Site Reliability Engineering team</a> at the <a href="https://wikimediafoundation.org/">Wikimedia Foundation</a>. I'll be working with the Service Operations team, which "...takes care of public and “user-visible” services."</p>
<p>I'm glad to be back at the WMF; I had originally started working there in 2013 but recently took a break to <a href="https://blog.legoktm.com/2020/11/24/legoktm-bs.html">finish school</a>. SRE will be my ninth distinct team at the WMF, and I'm looking forward to even more adventures.</p>
<p>As part of transitioning into my new role, I have unsubscribed myself from most MediaWiki bug mail and Gerrit notifications. Once I get more situated I'll put out a more detailed request for new maintainers for the components that need them. I'll continue taking care of maintenance as needed until then.</p>
<p>P.S.: I created a <a href="https://www.mediawiki.org/wiki/Template:User_Rust">new userbox about Rust</a> on mediawiki.org.</p>MediaWiki packages for Ubuntu 20.04 Focal available2020-05-12T20:21:34+00:002020-05-12T20:21:34+00:00legoktmtag:blog.legoktm.com,2020-05-12:/2020/05/12/mediawiki-packages-for-ubuntu-2004-focal-available.html<p>Packages for the MediaWiki 1.31 LTS release are now available for the new Ubuntu 20.04 LTS "Focal Fossa" release in my <a href="https://launchpad.net/~legoktm/+archive/ubuntu/mediawiki-lts">PPA</a>. Please let me know if you run into any errors or issues.</p>
<p>In the future these packages will be upgraded to the MediaWiki 1.35 LTS …</p><p>Packages for the MediaWiki 1.31 LTS release are now available for the new Ubuntu 20.04 LTS "Focal Fossa" release in my <a href="https://launchpad.net/~legoktm/+archive/ubuntu/mediawiki-lts">PPA</a>. Please let me know if you run into any errors or issues.</p>
<p>In the future these packages will be upgraded to the MediaWiki 1.35 LTS release, whenever that's ready. It's currently <a href="https://lists.wikimedia.org/pipermail/mediawiki-announce/2020-March/000249.html">delayed because of the pandemic</a>, but I expect that it'll be ready for the next Debian release.</p>Eliminating PHP polyfills2019-01-17T07:50:13+00:002019-01-17T07:50:13+00:00legoktmtag:blog.legoktm.com,2019-01-17:/2019/01/17/eliminating-php-polyfills.html<p>The Symfony project has recently created a set of pure-PHP <a href="https://github.com/symfony/polyfill/">polyfills</a> for both PHP extensions and newer language features. It allows developers to add requirements upon those functions or language additions without increasing the system requirements upon end users. For the most part, I think this is a good thing …</p><p>The Symfony project has recently created a set of pure-PHP <a href="https://github.com/symfony/polyfill/">polyfills</a> for both PHP extensions and newer language features. It allows developers to add requirements upon those functions or language additions without increasing the system requirements upon end users. For the most part, I think this is a good thing, and valuable to have. We've done similar things inside MediaWiki as well for CDB support, Memcached, and internationalization, just to name a few.</p>
<p>But the downside is that on platforms where it is possible to install the missing PHP extensions or upgrade PHP itself, we're shipping empty code. MediaWiki requires both the ctypes and mbstring PHP extensions, and our servers have those, so there's no use in deploying polyfills for those, because they'll never be used. In September, Reedy and I <a href="https://gerrit.wikimedia.org/r/c/mediawiki/vendor/+/460464">replaced</a> the polyfills with "<a href="https://github.com/BackEndTea/un-poly-all">unpolyfills</a>" that simply provide the correct package, so the polyfill is skipped by composer. That removed about 3,700 lines of code from what we're committing, reviewing, and deploying - a big win.</p>
<p>Last month I came across the same problem in Debian: <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911832">#911832</a>. The php-symfony-polyfill package was failing tests on the new PHP 7.3, and up for removal from the next stable release (Buster). On its own, the package isn't too important, but was a dependency of other important packages. In Debian, the polyfills are even more useless, since instead of depending upon e.g. <code>php-symfony-polyfill-mbstring</code>, the package could simply depend upon the native PHP extension, <code>php-mbstring</code>. In fact, there was already a system designed to implement those kinds of overrides. After looking at the dependencies, I uploaded a fixed version of php-webmozart-assert, filed bugs for two other packages. and provided patches for <a href="https://salsa.debian.org/php-team/pear/symfony/merge_requests/1">symfony</a>. I also made a patch to the default overrides in <a href="https://salsa.debian.org/php-team/pear/pkg-php-tools/merge_requests/1">pkg-php-tools</a>, so that any future package that depends upon a symfony polyfill should now automatically depend upon the native PHP extension if necessary.</p>
<p>Ideally composer would support alternative requirements like <code>ext-mbstring | php-symfony-polyfill-mbstring</code>, but that's been <a href="https://github.com/composer/composer/issues/751">declined by their developers</a>. There's <a href="https://github.com/composer/composer/issues/5030">another issue</a> that is somewhat related, but doesn't do much to reduce the installation of polyfills when unnecessary.</p>Kiwix in Debian, 2018 update2018-12-31T03:44:02+00:002018-12-31T03:44:02+00:00legoktmtag:blog.legoktm.com,2018-12-31:/2018/12/31/kiwix-in-debian-2018-update.html<p>It's been a relatively productive year for the packaging of <a href="https://www.kiwix.org/">Kiwix</a>, an offline Wikipedia reader, in Debian. My minimum expectations for the Buster release scheduled in mid-2019 are that all necessary C/C++ libraries to build the latest versions of Kiwix are in Debian.</p>
<ul>
<li><a href="https://tracker.debian.org/pkg/zimlib">libzim</a> is at v4.0.4 …</li></ul><p>It's been a relatively productive year for the packaging of <a href="https://www.kiwix.org/">Kiwix</a>, an offline Wikipedia reader, in Debian. My minimum expectations for the Buster release scheduled in mid-2019 are that all necessary C/C++ libraries to build the latest versions of Kiwix are in Debian.</p>
<ul>
<li><a href="https://tracker.debian.org/pkg/zimlib">libzim</a> is at v4.0.4, and basically ready to go.</li>
<li><a href="https://tracker.debian.org/pkg/libkiwix">libkiwix</a> is prepared for v3.0.3, but is waiting on the FTP masters to approve the new version that is in the <a href="https://ftp-master.debian.org/new.html">NEW queue</a> (fifth oldest binary-NEW package as of this post...). Once that is approved, I have the v3.1.1 upgrade prepared as well.</li>
<li><a href="https://tracker.debian.org/pkg/ctpp2">ctpp2</a> was a bit of a struggle, but is ready to go as well. However, it looks like the upstream website has vanished (it was inactive for years), so it's good that Kiwix is planning to <a href="https://github.com/kiwix/kiwix-lib/issues/21">replace ctpp2</a> in the future.</li>
</ul>
<p>There are three main user facing packages that are in the pipeline right now:</p>
<ul>
<li><a href="https://github.com/openzim/zimwriterfs">zimwriterfs</a> is waiting in the NEW queue. I'm hopeful that we can get this included in time for Debian Buster.</li>
<li><a href="https://github.com/kiwix/kiwix-tools">kiwix-tools</a> is a bundle of command-line utilities, the most useful of which is kiwix-serve. There's one <a href="https://github.com/kiwix/kiwix-tools/issues/249">upstream issue</a> relating to how JavaScript code is embedded, but the packaging prep work is <a href="https://salsa.debian.org/legoktm/kiwix-tools">basically done</a>. It's blocked on the new libkiwix anyways.</li>
<li><a href="https://github.com/kiwix/kiwix-desktop">kiwix-desktop</a> or just "Kiwix" is the most interesting thing for typical users who want to read offline content, but it's probably the farthest away. I spent some time this week figuring out how to get it to compile, and mostly <a href="https://github.com/kiwix/kiwix-desktop/issues/90">got it to work</a>. Probably something to aim for the next Debian release. There's also work underway to <a href="https://github.com/flathub/flathub/pull/768">provide it as a flatpak</a>, which will benefit even more people.</li>
</ul>
<p>I also created a "<a href="https://tracker.debian.org/teams/kiwix-team/">Kiwix team</a>" in the Debian Package Tracker, so you can subscribe to different notifications for all of the Kiwix-related packages (though it might be spammy if you're not very interested in Debian internals).</p>
<p>And, thank you to the Kiwix developers for always being receptive to my bug reports and patches - and providing extra chocolate and stickers :-)</p>
<p><img alt="Gifts" src="https://blog.legoktm.com/images/kiwix.jpg"></p>An update on MediaWiki 1.31 in Debian2018-09-28T01:06:52+00:002018-09-28T01:06:52+00:00legoktmtag:blog.legoktm.com,2018-09-28:/2018/09/28/an-update-on-mediawiki-131-in-debian.html<p>Following the <a href="https://lists.wikimedia.org/pipermail/mediawiki-announce/2018-September/000223.html">MediaWiki 1.31.1 security release</a>, I was finally able to update the Debian package to 1.31 LTS in preparation for the Debian Buster release.</p>New tool: Wikimedia APT browser2018-05-02T20:24:14+00:002018-05-02T20:24:14+00:00legoktmtag:blog.legoktm.com,2018-05-02:/2018/05/02/new-tool-wikimedia-apt-browser.html<p>I've created a new tool to make it easier for humans to browse Wikimedia's APT repository: <a href="https://apt.wikimedia.org">apt.wikimedia.org</a>. Wikimedia's servers run Debian (Ubuntu is nearly phased out), and for the most part use the standard packages that Debian provides. But in some cases we use software that isn't in …</p><p>I've created a new tool to make it easier for humans to browse Wikimedia's APT repository: <a href="https://apt.wikimedia.org">apt.wikimedia.org</a>. Wikimedia's servers run Debian (Ubuntu is nearly phased out), and for the most part use the standard packages that Debian provides. But in some cases we use software that isn't in the official Debian repositories, and distribute it via our own APT repository.</p>
<p>For a while now I've been working on different things where it's helpful for me to be able to see which packages are provided for each Debian version. I was unable to find any existing, reusable HTML browsers for APT repositories (most people seem to use the commandline tools), so I quickly wrote my own.</p>
<p>Introducing the <a href="https://tools.wmflabs.org/apt-browser/">Wikimedia APT browser</a>. It's a short (less than 100 lines) Python and Flask application that reads from the Package/Release files that APT uses, and presents them in a simple HTML page. You can see the different versions of Debian and Ubuntu that are supported, the different sections in each one, and then the packages and their versions. </p>
<p>There's nothing really Wikimedia-specific about this, it would be trivial to remove the Wikimedia branding and turn it into something general if people are interested.</p>
<p>The source code is <a href="https://phabricator.wikimedia.org/source/tool-apt-browser/">published on Phabricator</a> and licensed under the AGPL v3, or any later version.</p>My DebConf 17 presentation - Bringing MediaWiki back into Debian2017-08-26T00:00:00+00:002017-08-26T00:00:00+00:00legoktmtag:blog.legoktm.com,2017-08-26:/2017/08/26/my-debconf-17-presentation-bringing-mediawiki-back-into-debian.html<video controls>
<source src="https://upload.wikimedia.org/wikipedia/commons/transcoded/4/41/Bringing_MediaWiki_back_into_Debian_-_DebConf17.webm/Bringing_MediaWiki_back_into_Debian_-_DebConf17.webm.360p.webm" type="video/webm">
<source src="https://upload.wikimedia.org/wikipedia/commons/transcoded/4/41/Bringing_MediaWiki_back_into_Debian_-_DebConf17.webm/Bringing_MediaWiki_back_into_Debian_-_DebConf17.webm.360p.ogv" type="video/ogg">
</video>
<p><small>Full quality video available on <a href="https://commons.wikimedia.org/wiki/File:Bringing_MediaWiki_back_into_Debian_-_DebConf17.webm">Wikimedia Commons</a>, as well as the <a href="https://upload.wikimedia.org/wikipedia/commons/3/3d/Bringing_MediaWiki_back_to_Debian.pdf">slides</a>.</small></p>
<p>I had a blast attending DebConf '17 in Montreal, and presented about my efforts to bring back MediaWiki into Debian. The talks I went to were all fantastic, and got to meet some amazing people. But the best …</p><video controls>
<source src="https://upload.wikimedia.org/wikipedia/commons/transcoded/4/41/Bringing_MediaWiki_back_into_Debian_-_DebConf17.webm/Bringing_MediaWiki_back_into_Debian_-_DebConf17.webm.360p.webm" type="video/webm">
<source src="https://upload.wikimedia.org/wikipedia/commons/transcoded/4/41/Bringing_MediaWiki_back_into_Debian_-_DebConf17.webm/Bringing_MediaWiki_back_into_Debian_-_DebConf17.webm.360p.ogv" type="video/ogg">
</video>
<p><small>Full quality video available on <a href="https://commons.wikimedia.org/wiki/File:Bringing_MediaWiki_back_into_Debian_-_DebConf17.webm">Wikimedia Commons</a>, as well as the <a href="https://upload.wikimedia.org/wikipedia/commons/3/3d/Bringing_MediaWiki_back_to_Debian.pdf">slides</a>.</small></p>
<p>I had a blast attending DebConf '17 in Montreal, and presented about my efforts to bring back MediaWiki into Debian. The talks I went to were all fantastic, and got to meet some amazing people. But the best parts about the conference was the laid-back atmosphere and the food. I've never been to another conference that had food that comes even close to DebConf.</p>
<p>Feeling very motivated, I have three new packages in the pipeline: <a href="https://www.mediawiki.org/wiki/Extension:Scribunto#LuaSandbox">LuaSandbox</a>, <a href="https://www.mediawiki.org/wiki/Uprightdiff">uprightdiff</a>, and <a href="https://github.com/kiwix/kiwix-lib">libkiwix</a>.</p>
<p>I hope to be at DebConf again next year!</p>Wikimania submisison: apt install mediawiki2017-04-09T18:22:00+00:002017-04-09T18:22:00+00:00legoktmtag:blog.legoktm.com,2017-04-09:/2017/04/09/wikimania-submisison-apt-install-mediawiki.html<p>I've submitted a talk to Wikimania titled <a href="https://wikimania2017.wikimedia.org/wiki/Submissions/apt_install_mediawiki">apt install mediawiki</a>. It's about getting the MediaWiki package back into Debian, and efforts to improve the overall process. If you're interested, sign up on the submissions page :)</p>MediaWiki - powered by Debian2017-01-16T10:18:00+00:002017-01-16T10:18:00+00:00legoktmtag:blog.legoktm.com,2017-01-16:/2017/01/16/mediawiki-powered-by-debian.html<p>Barring any bugs, the last set of changes to the MediaWiki Debian package for the stretch release landed earlier this month. There are some documentation changes, and updates for changes to other, related packages. One of the other changes is the addition of a "powered by Debian" footer icon (drawn …</p><p>Barring any bugs, the last set of changes to the MediaWiki Debian package for the stretch release landed earlier this month. There are some documentation changes, and updates for changes to other, related packages. One of the other changes is the addition of a "powered by Debian" footer icon (drawn by the amazing <a href="https://www.mediawiki.org/wiki/User:Isarra">Isarra</a>), right next to the default "powered by MediaWiki" one.</p>
<p><img alt="Powered by Debian" src="https://blog.legoktm.com/images/poweredby_debian_2x.png"></p>
<p>This will only be added by default to new installs of the MediaWiki package. But existing users can just copy the following code snippet into their <code>LocalSettings.php</code> file (adjust paths as necessary):</p>
<pre>
# Add a "powered by Debian" footer icon
$wgFooterIcons['poweredby']['debian'] = [
"src" => "/mediawiki/resources/assets/debian/poweredby_debian_1x.png",
"url" => "https://www.debian.org/",
"alt" => "Powered by Debian",
"srcset" =>
"/mediawiki/resources/assets/debian/poweredby_debian_1_5x.png 1.5x, " .
"/mediawiki/resources/assets/debian/poweredby_debian_2x.png 2x",
];
</pre>
<p>The image files are included in the package itself, or you can grab them from the <a href="https://phabricator.wikimedia.org/diffusion/MDEB/browse/master/debian/images/">Git repository</a>. The source SVG is available from <a href="https://commons.wikimedia.org/wiki/File:Powered_by_Debian.svg">Wikimedia Commons</a>.</p>texvc back in Debian2016-12-23T06:11:00+00:002016-12-23T06:11:00+00:00legoktmtag:blog.legoktm.com,2016-12-23:/2016/12/23/texvc-back-in-debian.html<p>Today <a href="https://www.mediawiki.org/wiki/Texvc">texvc</a> was re-accepted for inclusion into Debian. texvc is a TeX validator and converter than can be used with the Math extension to generate PNGs of math equations. It had been removed from Jessie when MediaWiki itself was removed. However, a texvc package is still useful for those who …</p><p>Today <a href="https://www.mediawiki.org/wiki/Texvc">texvc</a> was re-accepted for inclusion into Debian. texvc is a TeX validator and converter than can be used with the Math extension to generate PNGs of math equations. It had been removed from Jessie when MediaWiki itself was removed. However, a texvc package is still useful for those who aren't using the MediaWiki Debian package, since it requires OCaml to build from source, which can be pretty difficult.</p>
<p>Pending no other issues, texvc will be included in Debian Stretch. I am also working on having it included in jessie-backports for users still on Jessie.</p>
<p>And as always, thanks to Moritz for reviewing and sponsoring the package!</p>wikidiff2 1.4.12016-12-07T06:18:00+00:002016-12-07T06:18:00+00:00legoktmtag:blog.legoktm.com,2016-12-07:/2016/12/07/wikidiff2-141.html<p>In MediaWiki 1.28, MaxSem <a href="https://gerrit.wikimedia.org/r/#/c/285567/">improved diff limits</a> in the pure PHP diff implementation that ships with MediaWiki core. However Wikimedia and other larger wikis use a PHP extension called <a href="https://www.mediawiki.org/wiki/Extension:Wikidiff2">wikidiff2</a>, for better performance and additional support for Japanese, Chinese, and Thai.</p>
<p>wikidiff2 1.4.1 is now available in …</p><p>In MediaWiki 1.28, MaxSem <a href="https://gerrit.wikimedia.org/r/#/c/285567/">improved diff limits</a> in the pure PHP diff implementation that ships with MediaWiki core. However Wikimedia and other larger wikis use a PHP extension called <a href="https://www.mediawiki.org/wiki/Extension:Wikidiff2">wikidiff2</a>, for better performance and additional support for Japanese, Chinese, and Thai.</p>
<p>wikidiff2 1.4.1 is now available in Debian unstable and will ship in stretch, and should soon be available in jessie-backports and <a href="https://launchpad.net/~legoktm/+archive/ubuntu/mediawiki-lts/">my PPA</a> for Ubuntu Trusty and Xenial users. This is the first major update of the package in two years. And installation in MediaWiki 1.27+ is <a href="https://gerrit.wikimedia.org/r/#/c/297111/">now even more straightforward</a>, as long as the module is installed, it will automatically be used, no global configuration required.</p>
<p>Additionally, releases of wikidiff2 will now be hosted and signed on <a href="https://releases.wikimedia.org/wikidiff2/">releases.wikimedia.org</a>.</p>Packaging MediaWiki for Debian2016-01-07T04:23:00+00:002016-01-07T04:23:00+00:00legoktmtag:blog.legoktm.com,2016-01-07:/2016/01/07/packaging-mediawiki-for-debian.html<p>Over the past few months I've been working on an updated Debian package for MediaWiki. After working with Luke, Faidon, Moritz, and a few others, we now have a mostly working package! It's being developed in Gerrit (the <a href="https://gerrit.wikimedia.org/r/#/q/project:mediawiki/debian,n,z">mediawiki/debian</a> repository), so it hopefully will get more visibility, and we …</p><p>Over the past few months I've been working on an updated Debian package for MediaWiki. After working with Luke, Faidon, Moritz, and a few others, we now have a mostly working package! It's being developed in Gerrit (the <a href="https://gerrit.wikimedia.org/r/#/q/project:mediawiki/debian,n,z">mediawiki/debian</a> repository), so it hopefully will get more visibility, and we can keep it in sync with current development.</p>
<p>If you're interested in testing, I've uploaded it to <a href="https://people.wikimedia.org/~legoktm/debian/">people.wikimedia.org</a> for now.</p>