Initial commit

tags/0.2.0 0.2.0
Daniel Berteaud 12 years ago
commit 53b0e0e7d9
  1. 8
      createlinks
  2. 69
      ipasserelle-webapps.spec
  3. 1
      root/etc/e-smith/db/configuration/defaults/ajaxplorer/AliasOnPrimary
  4. 1
      root/etc/e-smith/db/configuration/defaults/ajaxplorer/Authentication
  5. 1
      root/etc/e-smith/db/configuration/defaults/ajaxplorer/DefaultLanguage
  6. 1
      root/etc/e-smith/db/configuration/defaults/ajaxplorer/Title
  7. 1
      root/etc/e-smith/db/configuration/defaults/ajaxplorer/WelcomMessage
  8. 1
      root/etc/e-smith/db/configuration/defaults/dokuwiki/AliasOnPrimary
  9. 1
      root/etc/e-smith/db/configuration/defaults/dokuwiki/Authentication
  10. 1
      root/etc/e-smith/db/configuration/defaults/openupload/AliasOnPrimary
  11. 1
      root/etc/e-smith/db/configuration/defaults/openupload/Authentication
  12. 1
      root/etc/e-smith/db/configuration/defaults/tt-rss/AliasOnPrimary
  13. 11
      root/etc/e-smith/db/configuration/migrate/90Ajaxplorer
  14. 110
      root/etc/e-smith/events/actions/ipasserelle-webapps-init-domains
  15. 11
      root/etc/e-smith/templates/usr/share/openupload/www/config.inc.php/99iPasserelle
  16. 32
      root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/035openupload
  17. 27
      root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/040ajaxplorer
  18. 30
      root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/045ttrss
  19. 33
      root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/050dokuwiki

@ -0,0 +1,8 @@
#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
foreach my $event (qw/webapps-update ipasserelle-update bootstrap-ldap-save/){
event_link("ipasserelle-webapps-init-domains", "$event", "55");
}

@ -0,0 +1,69 @@
Summary: iPasserelle web applications
%define name ipasserelle-webapps
Name: %{name}
%define version 0.2.0
%define release 1
Version: %{version}
Release: %{release}%{?dist}
License: GPL
URL: http://www.ipasserelle.com/
Group: SMEserver/addon
Source: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: /var/tmp/%{name}-%{version}
Requires: ipasserelle-base >= 0.1-14
Requires: smeserver-openupload
Requires: smeserver-tt-rss
Requires: smeserver-ajaxplorer
Requires: smeserver-dokuwiki
Requires: dokuwiki-plugins
BuildRequires: e-smith-devtools
%description
Integrate commonly used web applications
%changelog
* Thu Oct 17 2012 Daniel Berteaud <daniel@firewall-services.com> 0.2.0-1
- Import in GIT
* Wed Nov 24 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-3
- Set ajaxplorer LogoutUrl to LL::NG portal address
- Use more friendly names in LL::NG portal
* Tue Oct 11 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-2
- Fix dokuwiki domain in LL::NG menu
* Wed Jun 28 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-1
- initial release
%prep
%setup
%build
perl createlinks
%install
rm -rf $RPM_BUILD_ROOT
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
rm -f %{name}-%{version}-filelist
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist
%clean
cd ..
rm -rf %{name}-%{version}
%pre
%preun
%post
%postun
%files -f %{name}-%{version}-filelist
%defattr(-,root,root)

@ -0,0 +1 @@
Firewall-Services: la sécurité des réseaux

@ -0,0 +1,11 @@
{
my $rec = $DB->get('ajaxplorer')
|| $DB->new_record('ajaxplorer', {type => 'webapp'});
my $url = $rec->prop('LogoutUrl');
if (not $url){
$url = 'https://auth.' . $DomainName;
$rec->set_prop('LogoutUrl', $url);
}
}

@ -0,0 +1,110 @@
#!/usr/bin/perl -w
#----------------------------------------------------------------------
# copyright (C) 2010-2011 Firewall-Services
# daniel@firewall-services.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#----------------------------------------------------------------------
use strict;
use warnings;
use esmith::DomainsDB;
use esmith::ConfigDB;
my $d = esmith::DomainsDB->open or die "Couldn't open DomainsDB\n";
my $c = esmith::ConfigDB->open_ro() or die "Couldn't open ConfigDB\n";
my $domain = $c->get('DomainName')->value;
my $vhost;
$vhost = $d->get("upload.$domain");
if (!$vhost){
$d->new_record("upload.$domain",{
type => 'domain',
Content => 'Primary',
Description => "OpenUpload",
Nameservers => 'internet',
TemplatePath => 'WebAppVirtualHost',
DocumentRoot => '/usr/share/openupload/www',
Removable => 'yes',
LemonLDAP => 'enabled'
});
unless ( system("/sbin/e-smith/signal-event", "domain-create", "upload.$domain") == 0 ){
die "Failed to create domain upload.$domain\n";
}
}
$vhost = $d->get("rss.$domain");
if (!$vhost){
$d->new_record("rss.$domain",{
type => 'domain',
Content => 'Primary',
Description => "Tiny Tiny RSS",
Nameservers => 'internet',
TemplatePath => 'WebAppVirtualHost',
DocumentRoot => '/usr/share/tt-rss',
Removable => 'yes',
LemonLDAP => 'enabled'
});
unless ( system("/sbin/e-smith/signal-event", "domain-create", "rss.$domain") == 0 ){
die "Failed to create domain rss.$domain\n";
}
}
$vhost = $d->get("echange.$domain");
if (!$vhost){
$d->new_record("echange.$domain",{
type => 'domain',
Content => 'Primary',
Description => "Ajaxplorer",
Nameservers => 'internet',
TemplatePath => 'WebAppVirtualHost',
DocumentRoot => '/usr/share/ajaxplorer',
Removable => 'yes',
LemonLDAP => 'enabled'
});
unless ( system("/sbin/e-smith/signal-event", "domain-create", "echange.$domain") == 0 ){
die "Failed to create domain echange.$domain\n";
}
}
$vhost = $d->get("wiki.$domain");
if (!$vhost){
$d->new_record("wiki.$domain",{
type => 'domain',
Content => 'Primary',
Description => "Dokuwiki",
Nameservers => 'internet',
TemplatePath => 'WebAppVirtualHost',
DocumentRoot => '/usr/share/dokuwiki',
Removable => 'yes',
LemonLDAP => 'enabled'
});
unless ( system("/sbin/e-smith/signal-event", "domain-create", "wiki.$domain") == 0 ){
die "Failed to create domain wiki.$domain\n";
}
}

@ -0,0 +1,11 @@
# iPasserelle overrides
$CONFIG['WWW_SERVER'] = 'http://upload.{"$DomainName";}';
$CONFIG['WWW_ROOT'] = '/';
$CONFIG['site']['title'] = 'Hébergement de fichiers';
$CONFIG['site']['footer'] = '<a href="http://www.ipasserelle.com">iPasserelle</a> © une solution <a href="http://www.firewall-services.com">Firewall-Services</a>';
$CONFIG['defaultlang'] = 'fr';

@ -0,0 +1,32 @@
{
$conf->{'exportedHeaders'}->{"upload.$domain"} = {
'Auth-User' => '$uid',
} unless ($conf->{'exportedHeaders'}->{"upload.$domain"});
$conf->{'locationRules'}->{"upload.$domain"} = {
'(?#21login)(a|action)=login' => "logout_app https://upload.$domain/",
'(?#13unprotect_captcha)^/plugins/captcha\\.php' => 'unprotect',
'(?#14unprotect_index)^/index\\.php$' => 'unprotect',
'(?#12unprotect_templates)^/templates/' => 'unprotect',
'(?#20logout)(a|action)=logout' => "logout_app https://auth.$domain",
'(?#10unprotect_dl)(a|action)=[dgr]' => 'unprotect',
'(?#01deny_double_action)(a|action)=.*(a|action)=.*' => 'deny',
'default' => '$groups =~ /\\b(equipe|admins)\\b/'
} unless ($conf->{'locationRules'}->{"upload.$domain"});
$conf->{'applicationList'}->{'010apps'}->{'openupload'} = {
'options' => {
'logo' => 'folder.png',
'name' => 'Fichiers temporaires',
'description' => 'Service d\'h&eacute;bergement de fichiers temporaires',
'uri' => "https://upload.$domain",
'display' => 'auto'
},
'type' => 'application'
} unless ($conf->{'applicationList'}->{'010apps'}->{'openupload'});
$OUT = '';
}

@ -0,0 +1,27 @@
{
$conf->{'exportedHeaders'}->{"echange.$domain"} = {
'Auth-User' => '$uid'
} unless ($conf->{'exportedHeaders'}->{"echange.$domain"});
# TODO: $localAcccess en fonction de access == (public|private)
$conf->{'locationRules'}->{"echange.$domain"} = {
'default' => 'accept'
} unless ($conf->{'locationRules'}->{"echange.$domain"});
$conf->{'applicationList'}->{'010apps'}->{'ajaxplorer'} = {
'options' => {
'logo' => 'folder.png',
'name' => 'Gestion des fichiers',
'description' => 'Gestionnaire de fichiers web Ajaxplorer',
'uri' => "https://echange.$domain/",
'display' => 'auto'
},
'type' => 'application'
} unless ($conf->{'applicationList'}->{'010apps'}->{'ajaxplorer'});
$OUT = '';
}

@ -0,0 +1,30 @@
{
$conf->{'exportedHeaders'}->{"rss.$domain"} = {
'User-Name' => '$cn',
'Auth-User' => '$uid',
'User-Mail' => '$mail'
} unless ($conf->{'exportedHeaders'}->{"rss.$domain"});
$conf->{'locationRules'}->{"rss.$domain"} = {
'(?#10logout)^/logout\\.php' => 'logout_app',
'default' => '$groups =~ /\\b(equipe|admins)\\b/'
} unless ($conf->{'locationRules'}->{"rss.$domain"});
$conf->{'applicationList'}->{'010apps'}->{'ttrss'} = {
'options' => {
'logo' => 'bookmark.png',
'name' => 'Lecteur de flux RSS',
'description' => 'Tiny Tiny RSS',
'uri' => "https://rss.$domain",
'display' => 'auto'
},
'type' => 'application'
} unless ($conf->{'applicationList'}->{'010apps'}->{'ttrss'});
$OUT = '';
}

@ -0,0 +1,33 @@
{
$conf->{'exportedHeaders'}->{"wiki.$domain"} = {
'User-Name' => '$cn',
'Auth-User' => '$uid',
'User-Mail' => '$mail',
'User-Groups' => '$groups',
} unless ($conf->{'exportedHeaders'}->{"wiki.$domain"});
$conf->{'locationRules'}->{"wiki.$domain"} = {
'(?#02login)^/doku.php(/start)?\\?(.*)do=login' => '$groups =~ /\\b(equipe|admins)\\b/',
'default' => 'unprotect',
'(?#01data)^/data(.*)' => 'deny',
'(?#10logout)^/doku.php(/start)?\\?(.*)do=logout' => 'logout_app'
} unless ($conf->{'locationRules'}->{"wiki.$domain"});
$conf->{'applicationList'}->{'010apps'}->{'dokuwiki'} = {
'options' => {
'logo' => 'help.png',
'name' => 'Wiki',
'description' => 'Site collaboratif',
'uri' => "https://wiki.$domain",
'display' => 'auto'
},
'type' => 'application'
} unless ($conf->{'applicationList'}->{'010apps'}->{'dokuwiki'});
$OUT = '';
}
Loading…
Cancel
Save