[remaster/mcs] first commit for sabayon-mcs
This commit is contained in:
parent
7e7b28b7c2
commit
af858a68a0
86
molecules/sabayon-amd64-mcs.spec
Normal file
86
molecules/sabayon-amd64-mcs.spec
Normal file
@ -0,0 +1,86 @@
|
||||
# Use abs path, otherwise daily builds automagic won't work
|
||||
|
||||
# Release Version
|
||||
release_version: 1.0
|
||||
|
||||
# Release Version string description
|
||||
release_desc: amd64 MCS
|
||||
|
||||
# Path to source ISO file
|
||||
source_iso: /media/ae5ebf25-75e3-4c00-abaa-036aacf2a5f5/sabayon/iso/Sabayon_Linux_5.4_amd64_G.iso
|
||||
|
||||
# Destination ISO image name, call whatever you want.iso, not mandatory
|
||||
destination_iso_image_name: Sabayon_Linux_5.4_amd64_MCS.iso
|
||||
|
||||
# Define an alternative execution strategy, in this case, the value must be
|
||||
# "iso_remaster"
|
||||
execution_strategy: iso_remaster
|
||||
|
||||
# Release string
|
||||
release_string: Sabayon Linux
|
||||
|
||||
# File to write release string
|
||||
release_file: /etc/sabayon-edition
|
||||
|
||||
# ISO Image title
|
||||
iso_title: Sabayon MCS
|
||||
|
||||
# Outer chroot script command, to be executed outside destination chroot before
|
||||
# before entering it (and before inner_chroot_script)
|
||||
outer_chroot_script: /sabayon/scripts/remaster_mcs_pre.sh
|
||||
|
||||
# Execute repositories update here, in a more fault-tolerant flavor
|
||||
inner_chroot_script: /sabayon/scripts/remaster_mcs_inner_chroot_script.sh
|
||||
|
||||
# Inner chroot script command, to be executed inside destination chroot after
|
||||
# packages installation and removal
|
||||
inner_chroot_script_after: /sabayon/scripts/remaster_mcs_inner_chroot_script_after.sh
|
||||
|
||||
# Outer chroot script command, to be executed outside destination chroot before
|
||||
# before entering it (and AFTER inner_chroot_script)
|
||||
outer_chroot_script_after: /sabayon/scripts/remaster_post.sh
|
||||
|
||||
# Extra mkisofs parameters, perhaps something to include/use your bootloader
|
||||
extra_mkisofs_parameters: -b isolinux/isolinux.bin -c isolinux/boot.cat
|
||||
|
||||
# Pre-ISO building script. Hook to be able to copy kernel images in place, for example
|
||||
pre_iso_script: /sabayon/scripts/generic_pre_iso_script.sh MCS
|
||||
|
||||
# Destination directory for the ISO image path (MANDATORY)
|
||||
destination_iso_directory: /sabayon/iso
|
||||
|
||||
# List of packages that would be removed from chrooted system (comma separated)
|
||||
packages_to_remove: app-office/openoffice, app-emulation/wine, sabayon-mce, sabayon-music
|
||||
|
||||
# List of packages that would be added from chrooted system (comma separated)
|
||||
packages_to_add:
|
||||
net-nds/389-ds-base,
|
||||
app-admin/389-ds-console,
|
||||
app-admin/389-admin-console,
|
||||
app-admin/389-console,
|
||||
net-nds/389-admin,
|
||||
net-mail/dovecot,
|
||||
mail-mta/postfix,
|
||||
net-mail/cyrus-imapd,
|
||||
www-servers/apache[threads],
|
||||
www-servers/jboss-bin:4.2,
|
||||
net-mail/gnarwl,
|
||||
rpm2targz,
|
||||
nmap,
|
||||
tcpdump
|
||||
|
||||
# Custom shell call to packages add (default is: equo install)
|
||||
custom_packages_add_cmd: equo install --relaxed
|
||||
|
||||
# Custom command for updating repositories (default is: equo update)
|
||||
# repositories_update_cmd:
|
||||
|
||||
# Determine whether repositories update should be run (if packages_to_add is set)
|
||||
# (default is: no), values are: yes, no.
|
||||
execute_repositories_update: no
|
||||
|
||||
# Directories to remove completely (comma separated)
|
||||
# paths_to_remove:
|
||||
|
||||
# Directories to empty (comma separated)
|
||||
# paths_to_empty:
|
2195
remaster/mcs/bedework.sql
Normal file
2195
remaster/mcs/bedework.sql
Normal file
File diff suppressed because one or more lines are too long
33
remaster/mcs/mcs-functions.sh
Executable file
33
remaster/mcs/mcs-functions.sh
Executable file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
setup_fds() {
|
||||
# setup 389-ds
|
||||
tmp_config_file="$(mktemp)"
|
||||
echo "[General]
|
||||
FullMachineName=sabayon
|
||||
SuiteSpotUserID=dirsrv
|
||||
SuiteSpotGroup=dirsrv
|
||||
ConfigDirectoryAdminPwd=mcsmanager
|
||||
AdminDomain=sabayon
|
||||
|
||||
[slapd]
|
||||
ServerPort=389
|
||||
ServerIdentifier=sabayon
|
||||
Suffix=dc=babel,dc=it
|
||||
RootDN=cn=Directory Manager
|
||||
RootDNPwd=mcsmanager
|
||||
|
||||
[admin]
|
||||
Port=9830
|
||||
SysUser=dirsrv
|
||||
ServerIpAddress=127.0.0.1
|
||||
ServerAdminID=admin
|
||||
ServerAdminPwd=mcsmanager
|
||||
" > "${tmp_config_file}"
|
||||
# FIXME: calling the script directly, from init, won't work, WTF!
|
||||
su - -c "/usr/sbin/setup-ds-admin.pl -f ${tmp_config_file} --silent" || return 1
|
||||
echo "389 Directory Server configured."
|
||||
/etc/init.d/389-ds stop --nodeps &> /dev/null
|
||||
/etc/init.d/389-admin stop --nodeps &> /dev/null
|
||||
return 0
|
||||
}
|
29
remaster/mcs/mcs-oemsystem-default
Normal file
29
remaster/mcs/mcs-oemsystem-default
Normal file
@ -0,0 +1,29 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
. /sbin/mcs-functions.sh
|
||||
|
||||
MCS_CONFIGURED="/etc/.mcs-oemsystem-default-configured"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use dns
|
||||
before 389-ds 389-ds-snmp 389-admin
|
||||
before mysql jboss-bin-4.2 postfix
|
||||
}
|
||||
|
||||
start() {
|
||||
if [ -f "${MCS_CONFIGURED}" ]; then
|
||||
return 0
|
||||
fi
|
||||
einfo "Setting up MailWare Collaboration Suite"
|
||||
setup_fds
|
||||
rc="$?"
|
||||
eend "${rc}"
|
||||
if [ "${rc}" = "0" ]; then
|
||||
touch "${MCS_CONFIGURED}"
|
||||
fi
|
||||
return "${rc}"
|
||||
}
|
249
remaster/mcs/mwsql.sql
Normal file
249
remaster/mcs/mwsql.sql
Normal file
@ -0,0 +1,249 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 3.3.2
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- Host: localhost
|
||||
-- Generato il: 02 ott, 2010 at 03:50 AM
|
||||
-- Versione MySQL: 5.1.46
|
||||
-- Versione PHP: 5.3.2-pl0-gentoo
|
||||
|
||||
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
|
||||
--
|
||||
-- Database: `mwsql`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struttura della tabella `calendars`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `calendars`;
|
||||
CREATE TABLE IF NOT EXISTS `calendars` (
|
||||
`username` varchar(320) CHARACTER SET latin1 NOT NULL DEFAULT '',
|
||||
`name` varchar(700) CHARACTER SET latin1 NOT NULL DEFAULT '',
|
||||
`color` char(6) NOT NULL DEFAULT '999966',
|
||||
PRIMARY KEY (`username`,`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struttura della tabella `collector_settings`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `collector_settings`;
|
||||
CREATE TABLE IF NOT EXISTS `collector_settings` (
|
||||
`username` varchar(320) CHARACTER SET latin1 NOT NULL,
|
||||
`email` varchar(320) CHARACTER SET latin1 DEFAULT NULL,
|
||||
`protocol` varchar(10) DEFAULT NULL,
|
||||
`server` varchar(256) DEFAULT NULL,
|
||||
`porta` int(5) DEFAULT '110',
|
||||
`password` varchar(100) DEFAULT NULL,
|
||||
`label` varchar(100) DEFAULT NULL,
|
||||
`toremove` char(1) DEFAULT 'y'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Dump dei dati per la tabella `collector_settings`
|
||||
--
|
||||
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struttura della tabella `DISTRICTS`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `DISTRICTS`;
|
||||
CREATE TABLE IF NOT EXISTS `DISTRICTS` (
|
||||
`DISTRICT_ID` varchar(25) NOT NULL DEFAULT '',
|
||||
`DISTRICT_NAME` varchar(40) DEFAULT NULL,
|
||||
PRIMARY KEY (`DISTRICT_ID`),
|
||||
UNIQUE KEY `NAME_UNQ` (`DISTRICT_NAME`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Dump dei dati per la tabella `DISTRICTS`
|
||||
--
|
||||
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struttura della tabella `FAX_NUMBERS`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `FAX_NUMBERS`;
|
||||
CREATE TABLE IF NOT EXISTS `FAX_NUMBERS` (
|
||||
`FAX_NUMBER` varchar(25) NOT NULL DEFAULT '',
|
||||
`DISTRICT_ID` varchar(25) DEFAULT NULL,
|
||||
`STATUS` varchar(1) NOT NULL DEFAULT 'F',
|
||||
`FREEZE_TS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`FAX_NUMBER`),
|
||||
KEY `STATUS_FK` (`STATUS`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Dump dei dati per la tabella `FAX_NUMBERS`
|
||||
--
|
||||
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struttura della tabella `FAX_STATUS`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `FAX_STATUS`;
|
||||
CREATE TABLE IF NOT EXISTS `FAX_STATUS` (
|
||||
`STATUS` varchar(1) NOT NULL,
|
||||
`DESCRIPTION` varchar(50) NOT NULL,
|
||||
PRIMARY KEY (`STATUS`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Dump dei dati per la tabella `FAX_STATUS`
|
||||
--
|
||||
|
||||
INSERT INTO `FAX_STATUS` (`STATUS`, `DESCRIPTION`) VALUES
|
||||
('A', 'Assegnato'),
|
||||
('F', 'Non assegnato'),
|
||||
('R', 'Non assegnabile');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struttura della tabella `groups`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `groups`;
|
||||
CREATE TABLE IF NOT EXISTS `groups` (
|
||||
`username` varchar(320) CHARACTER SET latin1 NOT NULL,
|
||||
`name` varchar(25) NOT NULL,
|
||||
`description` varchar(100) DEFAULT NULL,
|
||||
`addresses` text,
|
||||
PRIMARY KEY (`username`,`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Dump dei dati per la tabella `groups`
|
||||
--
|
||||
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struttura della tabella `labels_names`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `labels_names`;
|
||||
CREATE TABLE IF NOT EXISTS `labels_names` (
|
||||
`username` varchar(320) CHARACTER SET latin1 NOT NULL,
|
||||
`lid` varchar(10) NOT NULL,
|
||||
`color` char(7) DEFAULT NULL,
|
||||
`labelname` varchar(100) DEFAULT NULL,
|
||||
PRIMARY KEY (`username`,`lid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Dump dei dati per la tabella `labels_names`
|
||||
--
|
||||
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struttura della tabella `shared_addressbook`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `shared_addressbook`;
|
||||
CREATE TABLE IF NOT EXISTS `shared_addressbook` (
|
||||
`username` varchar(320) CHARACTER SET latin1 NOT NULL,
|
||||
`id_rubrica` varchar(300) CHARACTER SET latin1 NOT NULL,
|
||||
`rights` char(1) DEFAULT NULL,
|
||||
PRIMARY KEY (`username`,`id_rubrica`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Dump dei dati per la tabella `shared_addressbook`
|
||||
--
|
||||
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struttura della tabella `users_chat_settings`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `users_chat_settings`;
|
||||
CREATE TABLE IF NOT EXISTS `users_chat_settings` (
|
||||
`username` varchar(320) CHARACTER SET latin1 NOT NULL,
|
||||
`loginenable` char(1) DEFAULT NULL,
|
||||
`onlyOnlineContacts` char(1) DEFAULT NULL,
|
||||
`personalMessage` varchar(320) DEFAULT NULL,
|
||||
PRIMARY KEY (`username`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Dump dei dati per la tabella `users_chat_settings`
|
||||
--
|
||||
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struttura della tabella `users_settings`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `users_settings`;
|
||||
CREATE TABLE IF NOT EXISTS `users_settings` (
|
||||
`username` varchar(320) CHARACTER SET latin1 NOT NULL COMMENT 'username utente chiave primaria',
|
||||
`signature` text,
|
||||
`pager` smallint(5) unsigned DEFAULT '20',
|
||||
`language` varchar(5) DEFAULT NULL,
|
||||
`sendvcard` char(1) DEFAULT NULL,
|
||||
`sendtype` varchar(20) DEFAULT NULL,
|
||||
PRIMARY KEY (`username`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Limiti per le tabelle scaricate
|
||||
--
|
||||
|
||||
--
|
||||
-- Limiti per la tabella `calendars`
|
||||
--
|
||||
ALTER TABLE `calendars`
|
||||
ADD CONSTRAINT `calendars_ibfk_1` FOREIGN KEY (`username`) REFERENCES `users_settings` (`username`) ON DELETE CASCADE;
|
||||
|
||||
--
|
||||
-- Limiti per la tabella `FAX_NUMBERS`
|
||||
--
|
||||
ALTER TABLE `FAX_NUMBERS`
|
||||
ADD CONSTRAINT `STATUS_FK` FOREIGN KEY (`STATUS`) REFERENCES `FAX_STATUS` (`STATUS`);
|
||||
|
||||
--
|
||||
-- Limiti per la tabella `groups`
|
||||
--
|
||||
ALTER TABLE `groups`
|
||||
ADD CONSTRAINT `groups_ibfk_1` FOREIGN KEY (`username`) REFERENCES `users_settings` (`username`) ON DELETE CASCADE;
|
||||
|
||||
--
|
||||
-- Limiti per la tabella `labels_names`
|
||||
--
|
||||
ALTER TABLE `labels_names`
|
||||
ADD CONSTRAINT `labels_names_ibfk_1` FOREIGN KEY (`username`) REFERENCES `users_settings` (`username`) ON DELETE CASCADE;
|
||||
|
||||
--
|
||||
-- Limiti per la tabella `shared_addressbook`
|
||||
--
|
||||
ALTER TABLE `shared_addressbook`
|
||||
ADD CONSTRAINT `shared_addressbook_ibfk_1` FOREIGN KEY (`username`) REFERENCES `users_settings` (`username`) ON DELETE CASCADE;
|
6
scripts/remaster_mcs_inner_chroot_script.sh
Executable file
6
scripts/remaster_mcs_inner_chroot_script.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
export FORCE_EAPI=2
|
||||
equo update || ( sleep 1200 && equo update ) || exit 1
|
||||
|
||||
# unmask apache with worker MPM
|
||||
equo unmask www-servers/apache[threads]
|
92
scripts/remaster_mcs_inner_chroot_script_after.sh
Executable file
92
scripts/remaster_mcs_inner_chroot_script_after.sh
Executable file
@ -0,0 +1,92 @@
|
||||
#!/bin/sh
|
||||
|
||||
# setup Desktop icons
|
||||
rm /etc/skel/Desktop/*.desktop
|
||||
cp /usr/share/applications/keyboard.desktop /etc/skel/Desktop/ -p
|
||||
cp /usr/share/applications/389-console*.desktop /etc/skel/Desktop/ -p
|
||||
chown root:root /etc/skel/Desktop -R
|
||||
|
||||
# Setup init scripts
|
||||
cp /.mcs/mcs-functions.sh /sbin/mcs-functions.sh
|
||||
chmod 755 /sbin/mcs-functions.sh
|
||||
chown root:root /sbin/mcs-functions.sh
|
||||
cp /.mcs/mcs-oemsystem-default /etc/init.d/oemsystem-default
|
||||
chmod 755 /etc/init.d/oemsystem-default
|
||||
chown root:root /etc/init.d/oemsystem-default
|
||||
rc-update add oemsystem-default default
|
||||
|
||||
# temp jboss-bin fixes
|
||||
useradd jboss
|
||||
chown jboss:jboss /opt/jboss-bin-4.2 -R
|
||||
|
||||
# setup fqdn
|
||||
sed -i 's/sabayon/localhost.localdomain sabayon/g' /etc/hosts
|
||||
|
||||
# setup MySQL
|
||||
mysql_ebuild="$(find /var/db/pkg/dev-db -name "mysql*.ebuild" | sort | head -n 1)"
|
||||
if [ -z "${mysql_ebuild}" ]; then
|
||||
echo "cannot find any mysql ebuild"
|
||||
exit 1
|
||||
fi
|
||||
echo "password=mcsmanager" > /root/.my.cnf || exit 1
|
||||
mount -t tmpfs none /var/run/mysqld
|
||||
ebuild "${mysql_ebuild}" config
|
||||
if [ "${?}" != "0" ]; then
|
||||
umount /var/run/mysqld
|
||||
exit 1
|
||||
fi
|
||||
rm /root/.my.cnf -f
|
||||
umount /var/run/mysqld
|
||||
# setup password
|
||||
sed -i '/^#password/ s/your_password/mcsmanager/g' /etc/mysql/my.cnf || exit 1
|
||||
sed -i '/^#password/ s/#//g' /etc/mysql/my.cnf || exit 1
|
||||
|
||||
# FIXME: enable mysql InnoDB?
|
||||
|
||||
# setup 389-console data
|
||||
mkdir /etc/skel/.389-console
|
||||
echo "UserID=admin
|
||||
HostURL=http\://localhost\:9830
|
||||
" > /etc/skel/.389-console/Console.1.1.5.Login.preferences
|
||||
|
||||
# add services to init
|
||||
rc-update add 389-ds default
|
||||
rc-update add 389-admin default
|
||||
rc-update add 389-ds-snmp default
|
||||
rc-update add jboss-bin-4.2 default
|
||||
rc-update add mysql default
|
||||
|
||||
# remove unused services from init
|
||||
rc-update del sabayon-mce default
|
||||
rc-update del sabayon-mce boot
|
||||
rc-update del music default
|
||||
|
||||
# Sabayon stuff
|
||||
|
||||
echo -5 | equo conf update
|
||||
mount -t proc proc /proc
|
||||
/lib/rc/bin/rc-depend -u
|
||||
|
||||
echo "Vacuum cleaning client db"
|
||||
rm /var/lib/entropy/client/database/*/sabayonlinux.org -rf
|
||||
equo rescue vacuum
|
||||
|
||||
# cleanup log dir
|
||||
rm /var/lib/entropy/logs -rf
|
||||
|
||||
# Generate openrc cache
|
||||
/etc/init.d/savecache start
|
||||
/etc/init.d/savecache zap
|
||||
|
||||
ldconfig
|
||||
ldconfig
|
||||
umount /proc
|
||||
|
||||
equo deptest --pretend
|
||||
emaint --fix world
|
||||
|
||||
# remove non-interactive settings
|
||||
rm /etc/env.d/00mcs-etp-noninteractive -f
|
||||
|
||||
rm -rf /var/lib/entropy/*cache*
|
||||
|
13
scripts/remaster_mcs_pre.sh
Executable file
13
scripts/remaster_mcs_pre.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# call parent script
|
||||
/sabayon/scripts/remaster_pre.sh
|
||||
|
||||
# copy mcs data over
|
||||
mkdir -p "${CHROOT_DIR}/.mcs"
|
||||
cp /sabayon/remaster/mcs/* "${CHROOT_DIR}"/.mcs/ -Rap
|
||||
|
||||
# setup non-interactive mode
|
||||
echo "ETP_NONINTERACTIVE=1" > "${CHROOT_DIR}"/etc/env.d/00mcs-etp-noninteractive
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user