Migrate e-smith to smeserver

From SME Server
Jump to navigationJump to search

This page is to discuss and track the migration of legacy e-smith- packages etc. to smeserver- packages and the associated changes required.

This is now being done via a script (rename-e-smith-pkg.git, held in the smeserver-gitutils repo on https://src.koozali.org)

It uses the smeserver-gitutils config files (~/.smegit/config)

rename-e-smith-pkg.sh

Rename an e-smith package as smeserver and change relevant files. Renamed repository will be in your user area

rename-emith-pkg.sh <pkg> [<organisation> <local> <force> <transfer> <debug>]

<pkg> = Module name e.g. e-smith-dnscache

optional parameters, can appear in any order

  • <organisation> (any gitea organisation smeserver, smecontribs or user - defaults to smeserver)
  • <local> will use parameters set for local repository else it will use remote
  • <force> will automagically delete an existing repo, otherwise it will prompt
  • <transfer> will transfer the completed module from your user area to smeserver, or <organisation>, organisation - only works if you are an owner of the target organisation
  • <debug> run in debug mode

This works whether the repo and local files exist of not (it deletes them if necessary)

List of base e-smith packages
Package Status* Comments
e-smith manual/script? Need to check whether script works (i.e. no e-smith-)
e-smith-LPRng script
e-smith-apache script renamed event to smeserver-apache-update, but have not touched httpd-e-smith..... should we?
e-smith-backup script
e-smith-base script
e-smith-cvm-unix-local script
e-smith-devtools script
e-smith-dnscache script
e-smith-domains script
e-smith-dynamicdns-dyndns script
e-smith-dynamicdns-dyndns.org script
e-smith-dynamicdns-tzo script
e-smith-dynamicdns-yi script
e-smith-email script
e-smith-flexbackup script
e-smith-formmagick script
e-smith-grub script
e-smith-horde script
e-smith-hosts script
e-smith-ibays script
e-smith-imp script
e-smith-ingo script
e-smith-ldap script
e-smith-lib script
e-smith-lib-compspec script
e-smith-manager script
e-smith-mysql script
e-smith-ntp script
e-smith-nutUPS script
e-smith-oidentd script
e-smith-openssh script
e-smith-packetfilter script
e-smith-php script
e-smith-po script
e-smith-portforwarding script
e-smith-pptpd script
e-smith-proftpd script
e-smith-proxy script
e-smith-qmail script
e-smith-qmailanalog script
e-smith-quota script
e-smith-radiusd script
e-smith-runit script
e-smith-samba script
e-smith-starterwebsite script
e-smith-test script
e-smith-tinydns script
e-smith-turba script
e-smith-viewlogfiles script

Status*:

  • Script - works automagically with script

What needs to be done:

All of these changes are being done from the new https://src.koozali.org GITEA instance after the packages have been migrated there.

The following actions are being performed by the script:

  • Fork the e-smith-<pkg> into your own user space as <user>/smeserver-<pkg>
  • README.md - change name and add link to bugzilla for both new and existing names (i.e. keep the old link there)
  • Makefile - change e-smith to smeserver
NAME := smeserver-<pkg>
  • rename the e-smith-<pkg>.spec file to smeserver-<pkg>.spec - change e-smith to smeserver and add in Provides of the old e-smith package
%define name smeserver-<pkg>
.
.
Provides: e-smith-<pkg>

change all Requires:& BuildRequires: e-smith- to Requires: or BuildRequires: smeserver-
If the Source: is not tar.gz, change it and delete the archivefilename file

Source: %{name}-%{version}.tar.gz

change e-smith to smeserver for Summary: and %description

add entry to changelog and reference Bugzilla bug #12359

  • createlinks - you may need to change the update event to smeserver- (from e-smith)

There is no API function for the 'Convert to a Regular Repository' action, so the following will need to be performed manually via the GITEA web interface.

  • 'Convert to a Regular Repository'
  • 'Transfer' your smeserver-<pkg> over to the smeserver Organisation (owner) when you think it's ready for review/testing/etc.

Do we need to change the e-smith directories too?

This will be done as a later exercise, but let's capture what needs to be done as we work through the packages.

In the first few packages I 'migrated' I have also symlinked smeserver to the e-smith directories so that we can start using/testing the new directory names (e.g. /etc/smeserver instead of /etc/e-smith).

new smeserver directories
directory symlinked to where symlinked
/etc/smeserver /etc/e-smith smeserver-lib

smeserver-devtools

smeserver-runit

/home/smeserver /home/e-smith smeserver-lib
/usr/sbin/smeserver /usr/bin/e-smith smeserver-lib

smeserver-devtools

/usr/local/perl5/vendor_perl/esmith /usr/local/perl5/vendor_perl/esmith smeserver-lib

smeserver-devtools

In the packages I have 'migrated' I have left the directory structure unchanged. This will be a task for another day :)


Important.png Note:
Whilst the changes in the root directory structure are fairly obvious, this also impacts the createlinks.pm and possibly the createlinks files