Difference between revisions of "Migrate e-smith to smeserver"

From SME Server
Jump to navigationJump to search
m
m
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
This page is to discuss and track the migration of legacy e-smith- packages etc. to smeserver- packages and the associated changes required.
 
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/smedev/smeserver-gitutils 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<syntaxhighlight lang="bash">
 +
rename-emith-pkg.sh <pkg> [<organisation> <local> <force> <transfer> <debug>]
 +
</syntaxhighlight><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)
 
{| class="wikitable"
 
{| class="wikitable"
 
|+List of base e-smith packages
 
|+List of base e-smith packages
 
!Package
 
!Package
!Status
+
!Status*
!Who
 
 
!Comments
 
!Comments
 
|-
 
|-
 
|e-smith
 
|e-smith
|draft
+
|manual/script?
|trevorb
+
|Need to check whether script works (i.e. no e-smith-)
|
 
 
|-
 
|-
 
|e-smith-LPRng
 
|e-smith-LPRng
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-apache
 
|e-smith-apache
|
+
|script
|
+
|renamed event to smeserver-apache-update, but have not touched httpd-e-smith..... should we?
|
 
 
|-
 
|-
 
|e-smith-backup
 
|e-smith-backup
|draft
+
|script
|trevorb
 
 
|
 
|
 
|-
 
|-
 
|e-smith-base
 
|e-smith-base
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-cvm-unix-local
 
|e-smith-cvm-unix-local
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-devtools
 
|e-smith-devtools
|draft
+
|script
|trevorb
 
 
|
 
|
 
|-
 
|-
 
|e-smith-dnscache
 
|e-smith-dnscache
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-domains
 
|e-smith-domains
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-dynamicdns-dyndns
 
|e-smith-dynamicdns-dyndns
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-dynamicdns-dyndns.org
 
|e-smith-dynamicdns-dyndns.org
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-dynamicdns-tzo
 
|e-smith-dynamicdns-tzo
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-dynamicdns-yi
 
|e-smith-dynamicdns-yi
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-email
 
|e-smith-email
|draft
+
|script
|trevorb
 
 
|
 
|
 
|-
 
|-
 
|e-smith-flexbackup
 
|e-smith-flexbackup
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-formmagick
 
|e-smith-formmagick
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-grub
 
|e-smith-grub
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-horde
 
|e-smith-horde
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-hosts
 
|e-smith-hosts
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-ibays
 
|e-smith-ibays
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-imp
 
|e-smith-imp
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-ingo
 
|e-smith-ingo
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-ldap
 
|e-smith-ldap
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-lib
 
|e-smith-lib
|draft
+
|script
|trevorb
 
 
|
 
|
 
|-
 
|-
 
|e-smith-lib-compspec
 
|e-smith-lib-compspec
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-manager
 
|e-smith-manager
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-mysql
 
|e-smith-mysql
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-ntp
 
|e-smith-ntp
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-nutUPS
 
|e-smith-nutUPS
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-oidentd
 
|e-smith-oidentd
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-openssh
 
|e-smith-openssh
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-packetfilter
 
|e-smith-packetfilter
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-php
 
|e-smith-php
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-po
 
|e-smith-po
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-portforwarding
 
|e-smith-portforwarding
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-pptpd
 
|e-smith-pptpd
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-proftpd
 
|e-smith-proftpd
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-proxy
 
|e-smith-proxy
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-qmail
 
|e-smith-qmail
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-qmailanalog
 
|e-smith-qmailanalog
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-quota
 
|e-smith-quota
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-radiusd
 
|e-smith-radiusd
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-runit
 
|e-smith-runit
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-samba
 
|e-smith-samba
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-starterwebsite
 
|e-smith-starterwebsite
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-test
 
|e-smith-test
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-tinydns
 
|e-smith-tinydns
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-turba
 
|e-smith-turba
|
+
|script
|
 
 
|
 
|
 
|-
 
|-
 
|e-smith-viewlogfiles
 
|e-smith-viewlogfiles
|
+
|script
|
 
 
|
 
|
 
|}
 
|}
 +
Status*:
  
=== What needs to be done: ===
+
*Script - works automagically with script
All of these changes are being done in the new https://src.koozali.org GITEA instance after the packages have been migrated there.
+
 
* Create copy of e-smith-<pkg> as smeserver-<pkg>    Fork the smeserver/e-smith-<pkg> into your own user space as <user>/smeserver-<pkg>
+
=== What needs to be done:===
* Makefile - change e-smith to smeserver<syntaxhighlight lang="spec">
+
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
 +
<syntaxhighlight lang="spec">
 
NAME := smeserver-<pkg>
 
NAME := smeserver-<pkg>
 
</syntaxhighlight>
 
</syntaxhighlight>
* smeserver-<pkg>.spec - change e-smith to smeserver and add in Provides of the old e-smith package<syntaxhighlight lang="spec">
+
 
 +
*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
 +
<syntaxhighlight lang="spec">
 
%define name smeserver-<pkg>
 
%define name smeserver-<pkg>
 
+
.
 +
.
 
Provides: e-smith-<pkg>
 
Provides: e-smith-<pkg>
</syntaxhighlight>If the Source: is not tar.gz change it and delete the archivefilename file<syntaxhighlight lang="spec">
+
</syntaxhighlight>change all Requires:& BuildRequires: e-smith- to Requires: or BuildRequires: smeserver-<br>If the Source: is not tar.gz, change it and delete the archivefilename file<syntaxhighlight lang="spec">
 
Source: %{name}-%{version}.tar.gz
 
Source: %{name}-%{version}.tar.gz
</syntaxhighlight>
+
</syntaxhighlight>change e-smith to smeserver for Summary: and %description
  
* README.md - change name and link to bugzilla
+
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.
  
* Transfer your smeserver-<pkg> over to the smeserver Organisation 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.
  
=== Do we need to change the e-smith directories too? ===
+
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).
In the first few packages I 'migrated' I have also change the standard e-smith directories to smeserver and created a symlink of the old e-smith directory to the new smeserver one, to support the old structure.
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|+new smeserver directories
 
|+new smeserver directories
 
!directory
 
!directory
!where initialised
+
!symlinked to
 +
! where symlinked
 
|-
 
|-
 
|/etc/smeserver
 
|/etc/smeserver
 +
|/etc/e-smith
 
|smeserver-lib
 
|smeserver-lib
 +
smeserver-devtools
 +
 +
smeserver-runit
 
|-
 
|-
 +
|/home/smeserver
 
|/home/e-smith
 
|/home/e-smith
|
+
|smeserver-lib
 
|-
 
|-
 
|/usr/sbin/smeserver
 
|/usr/sbin/smeserver
 +
|/usr/bin/e-smith
 
|smeserver-lib
 
|smeserver-lib
 +
smeserver-devtools
 
|-
 
|-
 
|/usr/local/perl5/vendor_perl/esmith
 
|/usr/local/perl5/vendor_perl/esmith
|smeserver-devtools
+
|/usr/local/perl5/vendor_perl/esmith
 +
|smeserver-lib
 +
smeserver-devtools
 
|}
 
|}
In the packages I have 'migrated' I have also changed the directory structure to fit this new model.
+
In the packages I have 'migrated' I have left the directory structure unchanged. This will be a task for another day :)
 +
 
 +
{{Note box|Whilst the changes in the root directory structure are fairly obvious, this also impacts the createlinks.pm and possibly the createlinks files}}
  
Whilst the changes in the root directory structure are fairly obvious, this also impacts the createlinks file
+
[[Category:Developer]]

Latest revision as of 06:02, 12 August 2023

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