Skip to content

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin committed Jun 26, 2015
0 parents commit 72d50de
Show file tree
Hide file tree
Showing 31 changed files with 1,026 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cyrus-imap_packages
@@ -0,0 +1,3 @@
cyrus-imapd-2.4
cyrus-admin-2.4
cyrus-common-2.4
155 changes: 155 additions & 0 deletions debian-8.0-x86_64-ez.spec
@@ -0,0 +1,155 @@
# template name attributes
%define templatename debian
%define templatever 8.0
%define templatearch x86_64

# Human-readable attributes
%define fullname Debian %templatever
%define fulltemplatearch (for AMD64/Intel EM64T)

# template dirs
%define templatedir /vz/template/%templatename/%templatever/%templatearch/config
%define ostemplatedir %templatedir/os/default

# vzpkgenv related
%define pkgman debx64
%define package_manager rpm%pkgman
%define package_manager_pkg vzpkgenv%pkgman >= 7.0.0

# Files lists
%define files_lst() \
find %1 -type d -printf '%%%dir %%%attr(%m,root,root) %p\\n' | sed "s,%buildroot,,g" >> %2\
find %1 -type f -printf '%%%config %%%attr(%m,root,root) %p\\n' | sed "s,%buildroot,,g" >> %2\
%nil

# Sources list
%define sources_lst() \
%((cd %_sourcedir;\
s=1;\
for tmpl in %1; do\
sources=$tmpl"_*";\
for file in $sources; do\
echo Source$s: $file;\
s=$((s+1))\
done;\
done))\
%nil

# Obsoletes list
%define obsoletes_lst() \
%((for tmpl in %1; do\
[ $tmpl = os ] && continue;\
echo "Obsoletes: $tmpl-%templatename-%templatever-%templatearch-ez < 7.0.0";\
echo "Provides: $tmpl-%templatename-%templatever-%templatearch-ez = %version-%release";\
done))\
%nil

# Templates list - packages file should be always present in any template!
%define templates_list() %((cd %_sourcedir; for f in *_packages; do echo -n "${f%_*} "; done))

Summary: %fullname %fulltemplatearch Template set
Name: %templatename-%templatever-%templatearch-ez
Group: Virtuozzo/Templates
License: GPL
Version: 7.0.0
Release: 1%{?dist}
BuildRoot: %_tmppath/%name-root
BuildArch: noarch
Requires: %package_manager_pkg

# template source files
%sources_lst %templates_list

# obsoletes
%obsoletes_lst %templates_list

%description
%fullname %fulltemplatearch packaged as a Virtuozzo Template set.

%install
installfile() {
local sourcename=%_sourcedir/${1}_$4
local mode=$2
local dir=$3
local name=$4

[ ! -f $sourcename ] && return

install -m $mode $sourcename $dir/$name
}

rm -f files.lst
for tmpl in %templates_list; do
[ $tmpl = "os" ] && dir=%buildroot/%ostemplatedir || \
dir=%buildroot/%templatedir/app/$tmpl/default

mkdir -p $dir

if [ $tmpl = "os" ]; then
# Os template only files

# Text
echo "%fullname %fulltemplatearch Virtuozzo Template" > $dir/description
echo "%fullname %fulltemplatearch Virtuozzo Template" > $dir/summary

# Package manager
echo "%package_manager" > $dir/package_manager

# Disable upgrade
touch $dir/upgradable_versions

# Pkgman environment
installfile $tmpl 0644 $dir environment

# vzctl-related
installfile $tmpl 0644 $dir distribution

# Kernel virtualization
installfile $tmpl 0644 $dir osrelease

# Os template cache scripts
installfile $tmpl 0755 $dir pre-cache
installfile $tmpl 0755 $dir post-cache
installfile $tmpl 0755 $dir ct2vm
installfile $tmpl 0755 $dir mid-pre-install
installfile $tmpl 0755 $dir mid-post-install
installfile $tmpl 0755 $dir pre-upgrade
installfile $tmpl 0755 $dir post-upgrade

# Additional packages
installfile $tmpl 0644 $dir packages_0
installfile $tmpl 0644 $dir packages_1
else
# App templates only files

# Text
echo "$tmpl for %fullname %fulltemplatearch Virtuozzo Template" > $dir/description
echo "$tmpl for %fullname %fulltemplatearch Virtuozzo Template" > $dir/summary
fi

# Common things

# Installation sources
installfile $tmpl 0644 $dir mirrorlist
installfile $tmpl 0644 $dir repositories

# Packages
installfile $tmpl 0644 $dir packages

# Scripts
installfile $tmpl 0755 $dir pre-install
installfile $tmpl 0755 $dir pre-install-hn
installfile $tmpl 0755 $dir post-install
installfile $tmpl 0755 $dir post-install-hn

# Versioning
echo "%release" > $dir/release
echo "%version" > $dir/version
%files_lst $dir files.lst
done

%files -f files.lst

%changelog
* Wed Jun 17 2015 Konstantin Volckov <wolf@sw.ru> 7.0.0-1
- Initial release
105 changes: 105 additions & 0 deletions devel_packages
@@ -0,0 +1,105 @@
aptitude
ash
autoconf
automake
autoproject
autotools-dev
bc
bison
chrpath
cvs
debhelper
debiandoc-sgml
debian-policy
debootstrap
developers-reference
devscripts
dh-make
diffstat
docbook
docbook-dsssl
dpatch
e2fslibs-dev
emacs24-bin-common
emacs24-common
emacs24-el
emacs24-nox
fakeroot
flex
freetds-dev
g++
gcc
gettext-el
gnu-standards
intltool-debian
joe
libaudio-dev
libbind-dev
libbz2-dev
libcups2-dev
libcurl4-openssl-dev
libdb5.3-dev
libfontconfig1-dev
libfreetype6-dev
libglu1-mesa-dev
libice-dev
libjpeg62-turbo-dev
libldap2-dev
liblockfile-dev
libltdl-dev
libmhash-dev
libostyle-dev
libpam0g-dev
libpcre3-dev
libpng12-dev
librecode-dev
librtmp-dev
libsasl2-dev
libsm-dev
libtool
libwrap0-dev
libxaw7-dev
libxcursor-dev
libxft-dev
libxml2-dev
libxmltok1-dev
libxmu-dev
libxmuu-dev
libxp-dev
libxpm-dev
libxrandr-dev
libxrender-dev
libxslt1-dev
libxt-dev
libxtst-dev
libxv-dev
libzzip-dev
lintian
mawk
nano
ncftp
netpbm
nmap
nvi
openjade
parted
patchutils
pbuilder
pgpgpg
pidentd
pinfo
po-debconf
python-dev
re2c
sgml-data
sgmlspl
sgmltools-lite
smsclient
strace
tasksel
tasksel-data
tcl8.6-dev
tcl8.6-doc
tdsodbc
unixodbc-dev
usbutils
74 changes: 74 additions & 0 deletions imp_packages
@@ -0,0 +1,74 @@
php-horde
php-horde-alarm
php-horde-argv
php-horde-auth
php-horde-autoloader
php-horde-browser
php-horde-cache
php-horde-cli
php-horde-compress
php-horde-compress-fast
php-horde-constraint
php-horde-controller
php-horde-core
php-horde-crypt
php-horde-crypt-blowfish
php-horde-cssminify
php-horde-css-parser
php-horde-data
php-horde-date
php-horde-dav
php-horde-db
php-horde-editor
php-horde-exception
php-horde-form
php-horde-group
php-horde-hashtable
php-horde-history
php-horde-http
php-horde-icalendar
php-horde-image
php-horde-imap-client
php-horde-injector
php-horde-itip
php-horde-javascriptminify
php-horde-listheaders
php-horde-lock
php-horde-log
php-horde-logintasks
php-horde-mail
php-horde-mail-autoconfig
php-horde-mime
php-horde-mime-viewer
php-horde-nls
php-horde-notification
php-horde-pack
php-horde-perms
php-horde-prefs
php-horde-role
php-horde-rpc
php-horde-secret
php-horde-serialize
php-horde-sessionhandler
php-horde-share
php-horde-smtp
php-horde-spellchecker
php-horde-socket-client
php-horde-stream
php-horde-stream-filter
php-horde-stream-wrapper
php-horde-support
php-horde-template
php-horde-text-diff
php-horde-text-filter
php-horde-text-filter-csstidy
php-horde-text-flowed
php-horde-token
php-horde-translation
php-horde-tree
php-horde-url
php-horde-util
php-horde-vfs
php-horde-view
php-horde-xml-element
php-horde-imp
6 changes: 6 additions & 0 deletions jre_packages
@@ -0,0 +1,6 @@
default-jre-headless
openjdk-7-jre
openjdk-7-jre-headless
ca-certificates-java
libatk-wrapper-java
libatk-wrapper-java-jni
1 change: 1 addition & 0 deletions jsdk_packages
@@ -0,0 +1 @@
openjdk-7-jdk
1 change: 1 addition & 0 deletions mailman_packages
@@ -0,0 +1 @@
mailman
1 change: 1 addition & 0 deletions mod_perl_packages
@@ -0,0 +1 @@
libapache2-mod-perl2
2 changes: 2 additions & 0 deletions mysql_packages
@@ -0,0 +1,2 @@
mysql-server
mysql-client
1 change: 1 addition & 0 deletions os_distribution
@@ -0,0 +1 @@
debian
5 changes: 5 additions & 0 deletions os_mid-post-install
@@ -0,0 +1,5 @@
#!/bin/bash

/sbin/ifconfig lo up

exit 0
9 changes: 9 additions & 0 deletions os_mid-pre-install
@@ -0,0 +1,9 @@
#!/bin/bash

touch /etc/network/interfaces

rm -rf /var/run > /dev/null 2>&1
ln -s /run /var/run > /dev/null 2>&1
touch /run/utmp > /dev/null 2>&1

exit 0
1 change: 1 addition & 0 deletions os_osrelease
@@ -0,0 +1 @@
3.16.0

0 comments on commit 72d50de

Please sign in to comment.