Wiki auf Gitlab benutzen   March 11th, 2020

Ich habe gerade ein Projekt mit anderen Entwicklern, wo wir uns das ERPNext Projekt näher anschauen wollen.
Ich wollte nicht extra eine eigene MediaWiki Instanz aufsetzen, die ich dann auch mit Updates pflegen muss.
Weil ich sowieso eine GitLab Instanz laufen habe, haben wir dort ein Projekt eingerichtet, um den Wiki zu benutzen.

Jetzt fällt mir aber auf, dass es keine Diff Funktion im Wiki von GitLab gibt! Hier ist das entsprechende Ticket dazu: https://gitlab.com/gitlab-org/gitlab-foss/-/issues/17906

Der Workaround, der vorgeschlagen wird, ist auf der jeweiligen Wiki Seite unter dem Link rechts oben, “Clone Repository”, zu finden. z.B. hier: https://gitlab.com/cryptsetup/cryptsetup/-/wikis/home. Der Link verweist dann auf https://gitlab.com/cryptsetup/cryptsetup/-/wikis/git_access

(Ich benutze das Beispiel von cryptsetup, weil mein eigenes Projekt nicht öffentlich ist)

Auf Ubuntu, habe ich den Workaround so umgesetzt:

sudo apt-get install ruby ruby-dev
sudo gem install gollum
sudo gem install github-markdown
 
git clone https://gitlab.com/cryptsetup/cryptsetup.wiki.git
cd cryptsetup.wiki
gollum

Per Default, läuft die Seite nun unter http://localhost:4567, und man kann sich ganz einfach die Diffs zwischen den Version anschauen, unter History.

Man kann dort auch lokal editieren, muss dann auf der Kommandozeile einen git push ausführen, um es ins GitLab hochzuladen.
Die Änderungen der anderen Teilnehmer erhält man, indem man git pull auf der Kommandozeile ausführt.

Leider ist git pull/push nicht als Button in gollum vorgesehen: https://github.com/gollum/gollum/issues/112
Hier hat jemand es über git hooks und gollum Konfiguration umgesetzt: http://www.whiteboardcoder.com/2017/04/gollum-auto-sync-to-remote-git-repo.html

Tags: ,
Posted in Software Development | Comments Closed

So, now Sourceforge has ended their Hosted Apps for good: http://sourceforge.net/p/forge/community-docs/Hosted%20Apps%20Retirement/

Here is the migration path, how I got the OpenPetra wiki and forum to install on my own webspace.

My task was to install them readonly, as we want to do the proper migration later, perhaps to other software, who knows.

I got the backup through the shell access, but it seems now that all backups have been placed in the project’s home directory.

MediaWiki:

I have installed the recent version 1.23.0.

  1. restore the database from the sql backup file
  2. extract the file mediawiki-1.23.0.tar.gz
  3. extract the files from the file backup file, into images.
    mv home/.../path/images/* images
  4. run the installer of MediaWiki in the webbrowser. It will automatically upgrade the database fine.
  5. modify LocalSettings.php, so that noone can register and even registered users cannot edit:
    $wgGroupPermissions['*']['createaccount'] = false;
    $wgGroupPermissions['*']['edit'] = false;
    $wgGroupPermissions['user']['edit'] = false;

 phpBB:

I have installed the recent stable version phpBB-3.0.12.

The version that Sourceforge has used was 3.0.5, see in the database, table phpbb_config, column version.

  1. restore the database from sql backup file (prefix is phpbb_)
  2. extract the phpBB source code from the zip file
  3. extract the files from the file backup file, into files and images
  4. run the installer of phpBB. It does not work to install into existing tables, therefore use prefix phpbb3_
  5. Then I modified a couple of settings in the phpbb_config table:
    UPDATE phpbb_config SET `config_value` = '1' WHERE `phpbb_config`.`config_name` = 'default_style';
    UPDATE phpbb_config SET `config_value` = 'forum.openpetra.org' WHERE `phpbb_config`.`config_name` = 'server_name';
    UPDATE phpbb_config SET `config_value` = 'files' WHERE `phpbb_config`.`config_name` = 'upload_path';
    UPDATE phpbb_config SET `config_value` = 'forum.openpetra.org' WHERE `phpbb_config`.`config_name` = 'cookie_domain';
    UPDATE phpbb_config SET `config_value` = '/' WHERE `phpbb_config`.`config_name` = 'cookie_path';
    UPDATE phpbb_config SET `config_value` = 'db' WHERE `phpbb_config`.`config_name` = 'auth_method';
    UPDATE phpbb_config SET `config_value` = '/' WHERE `phpbb_config`.`config_name` = 'script_path';
    UPDATE phpbb_config SET `config_value` = 'http://' WHERE `phpbb_config`.`config_name` = 'server_protocol';
    UPDATE phpbb_config SET `config_value` = '80' WHERE `phpbb_config`.`config_name` = 'server_port';
  6. I use the style from the original database, replacing the sourceforge style:
    ALTER TABLE phpbb_styles RENAME phpbb35_styles;
    ALTER TABLE phpbb_styles_imageset RENAME phpbb35_styles_imageset;
    ALTER TABLE phpbb_styles_imageset_data RENAME phpbb35_styles_imageset_data;
    ALTER TABLE phpbb_styles_template_data RENAME phpbb35_styles_template_data;
    ALTER TABLE phpbb_styles_template RENAME phpbb35_styles_template;
    ALTER TABLE phpbb_styles_theme RENAME phpbb35_styles_theme;ALTER TABLE phpbb3_styles RENAME phpbb_styles;
    ALTER TABLE phpbb3_styles_imageset RENAME phpbb_styles_imageset;
    ALTER TABLE phpbb3_styles_imageset_data RENAME phpbb_styles_imageset_data;
    ALTER TABLE phpbb3_styles_template_data RENAME phpbb_styles_template_data;
    ALTER TABLE phpbb3_styles_template RENAME phpbb_styles_template;
    ALTER TABLE phpbb3_styles_theme RENAME phpbb_styles_theme;
  7. Then I removed all the tables that are not needed anymore:
    SELECT CONCAT( 'DROP TABLE ', GROUP_CONCAT(TABLE_NAME) , ';' )
    AS statement FROM information_schema.tables
    WHERE table_schema = 'tim00_op_sf_readonly' AND TABLE_NAME LIKE 'phpbb3%';

    Copy the result and paste the drop command into your phpMyAdmin or mysql console client…
    You might have to run that twice, it might only return the first tables in the first call.

  8. Then change in the config.php the table prefix back to “phpbb_”
  9. Then run these commands, to reset the cache after the config changes, and to activate the forum:
    rm -Rf install
    rm cache/*.php

 

Tags: , ,
Posted in Software Development | Comments Closed

HTML2Wiki, Wiki2HTML   November 17th, 2007

Tags: , ,
Posted in Software Development | Comments Closed

The goal is, that users are only registered on phpNuke, and can use the same username on MediaWiki, without logging in twice.

Readme.txt, Download, Auth_phpnuke.php, authphpnuke.php, modules/MediaWiki/index.php.