Migrate e-smith to smeserver

From SME Server
Revision as of 05:12, 1 June 2023 by TrevorB (talk | contribs) (Add info about script to do this)
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

rename-emith-pkg.sh <pkg> [<organisation> <local> <force> <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
  • <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* Who Comments
e-smith draft TrevorB
e-smith-LPRng draft TrevorB
e-smith-apache draft TrevorB renamed event to smeserver-apache-update, but have not touched httpd-e-smith..... should we?
e-smith-backup draft TrevorB
e-smith-base draft TrevorB
e-smith-cvm-unix-local draft TrevorB
e-smith-devtools draft TrevorB
e-smith-dnscache
e-smith-domains
e-smith-dynamicdns-dyndns
e-smith-dynamicdns-dyndns.org
e-smith-dynamicdns-tzo
e-smith-dynamicdns-yi
e-smith-email draft TrevorB
e-smith-flexbackup
e-smith-formmagick draft TrevorB
e-smith-grub draft TrevorB
e-smith-horde
e-smith-hosts
e-smith-ibays
e-smith-imp
e-smith-ingo
e-smith-ldap
e-smith-lib draft TrevorB
e-smith-lib-compspec
e-smith-manager
e-smith-mysql
e-smith-ntp
e-smith-nutUPS
e-smith-oidentd
e-smith-openssh
e-smith-packetfilter
e-smith-php
e-smith-po
e-smith-portforwarding
e-smith-pptpd
e-smith-proftpd
e-smith-proxy
e-smith-qmail
e-smith-qmailanalog
e-smith-quota
e-smith-radiusd
e-smith-runit draft TrevorB
e-smith-samba
e-smith-starterwebsite
e-smith-test
e-smith-tinydns
e-smith-turba
e-smith-viewlogfiles

Status*:

  • Started - developer has forked package and has started work
  • Draft - developer has completed first cut of changes and transferred package into smeserver Organisation. Ready for review/testing
  • Testing - formal review and testing of package commenced
  • Ready - Review/testing completed OK and ready for inclusion in smeserver base

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