Commit b7981f6a authored by Francesc Guasch's avatar Francesc Guasch
Browse files

Import original source of ravada 0.1.2

parent a934238c
......@@ -924,9 +924,7 @@ sub check_back_running {
}
sub _init_user_group {
warn $>;
return if $>;
warn Dumper($CONFIG_FRONT);
my $user = $CONFIG_FRONT->{user};
my $group = $CONFIG_FRONT->{group};
......
......@@ -3,25 +3,25 @@
use warnings;
use strict;
use Cwd qw(getcwd);
use File::Path qw(remove_tree make_path);
use IPC::Run3;
use lib './lib';
use Ravada;
use File::Copy;
my $DIR_SRC = "pkg-debian";
my $RELEASE = Ravada::version();
my $DIR_DST = "ravada-$RELEASE";
my $DIR_DST = getcwd."/../ravada-".Ravada::version();
my %DIR = (
templates => '/usr/share/ravada'
,'etc/ravada.conf' => 'etc'
,'etc/xml' => 'var/lib/ravada'
,'docs/' => 'usr/share/doc/ravada'
,'docs/' => 'docs'
,sql => 'usr/share/doc/ravada'
,'lib/' => 'usr/share/perl5'
,'blib/man3' => 'usr/share/man'
,"$DIR_SRC/" => "./"
,"debian/" => "./debian"
,'etc/systemd/' => 'lib/systemd/system/'
);
for ( qw(css fonts img js templates)) {
......@@ -31,16 +31,20 @@ for ( qw(css fonts img js templates)) {
my %FILE = (
'etc/rvd_front.conf.example' => 'etc/rvd_front.conf'
,'bin/rvd_back.pl' => 'usr/sbin/rvd_back'
,'rvd_front.pl' => 'usr/sbin/rvd_front'
,'rvd_front.pl' => 'usr/bin/rvd_front'
,'CHANGELOG.md' => 'usr/share/doc/ravada/changelog'
,'copyright' => 'usr/share/doc/ravada'
);
my @REMOVE= qw(
usr/share/doc/ravada/_config.yml
usr/share/doc/ravada/INSTALL.md
usr/share/ravada/templates/bootstrap/get_authors.sh
usr/share/man/man3/.exists
debian/menu.ex
debian/postinst.ex
debian/postrm.ex
debian/preinst.ex
debian/prerm.ex
debian/ravada.cron.d.ex
);
########################################################################
......@@ -90,32 +94,30 @@ sub create_md5sums {
my @files;
chdir $DIR_DST or die "I can't chdir to $DIR_DST";
unlink "DEBIAN/md5sums";
unlink "debian/md5sums";
open my $find, ,'-|', 'find . -type f -printf \'%P\n\'' or die $!;
while (<$find>) {
chomp;
next if /^DEBIAN/;
print `md5sum $_ >> DEBIAN/md5sums`
next if /^debian/;
print `md5sum $_ >> debian/md5sums`
}
close $find;
chdir "..";
chmod 0644,"$DIR_DST/DEBIAN/md5sums" or die $!;
chmod 0644,"$DIR_DST/debian/md5sums" or die "$! $DIR_DST/debian/md5sums";
}
sub create_deb {
# my $deb = "ravada_${RELEASE}_all.deb";
# my @cmd = ('dpkg','-b',"$DIR_DST/",$deb);
chdir $DIR_DST or die "$! $DIR_DST";
my @cmd = ('debuild','-us','-uc');
my $deb = "ravada_${Ravada::VERSION}_all.deb";
my @cmd = ('dpkg','-b',"$DIR_DST/",$deb);
my ($in, $out, $err);
run3(\@cmd, \$in, \$out, \$err);
die $err if $err;
print $out;
print "$deb created\n";
}
sub remove_use_lib {
for my $file ('usr/sbin/rvd_front','usr/sbin/rvd_back') {
for my $file ('usr/bin/rvd_front','usr/sbin/rvd_back') {
my $path = "$DIR_DST/$file";
die "Missing file '$path'" if ! -e $path;
copy($path, "$path.old") or die "$! $path -> $path.old";
......@@ -191,8 +193,8 @@ sub chown_pms {
}
sub chmod_control_files {
for (qw(conffiles templates)) {
my $path = "$DIR_DST/DEBIAN/$_";
for (qw(ravada.docs changelog control copyright ravada-docs.docs ravada.doc-base.EX)) {
my $path = "$DIR_DST/debian/$_";
die "Missing $path" if ! -e $path;
chmod 0644 , $path or die "$! $path";
}
......@@ -202,30 +204,45 @@ sub chmod_ravada_conf {
chmod 0600,"$DIR_DST/etc/ravada.conf" or die $!;
}
sub tar {
my @cmd = ('tar','czvf',"ravada_".Ravada::version.".orig.tar.gz"
,"ravada-".Ravada::version()
);
my ($in, $out, $err);
run3(\@cmd, \$in, \$out, \$err);
die $err if $err;
}
sub make_pl {
my @cmd = ('perl','Makefile.PL');
my ($in, $out, $err);
run3(\@cmd, \$in, \$out, \$err);
die $err if $err;
@cmd = ('make');
run3(\@cmd, \$in, \$out, \$err);
die $err if $err;
}
#########################################################################
clean();
make_pl();
copy_dirs();
copy_files();
remove_not_needed();
change_mod();
gzip_docs();
gzip_man();
chown_files('DEBIAN',0755);
#chown_files('usr/share/doc/ravada');
#chown_files('usr/share/ravada/public');
#chown_files('usr/share/ravada/templates');
chown_files('debian',0755);
chown_files('etc');
chown_files('lib');
#chown_files('lib/systemd');
chown_files('var/lib/ravada');
#chown_files('usr/share/perl5');
#chown_files('usr/share/man');
chown_files('usr');
chown_files('var');
remove_use_lib();
chmod_control_files();
chmod_ravada_conf();
#chown_pms();
create_md5sums();
create_deb();
tar();
#create_deb();
ravada (0.1.2) unstable; urgency=low
* Initial Release.
-- frankie <frankie@> Tue, 21 Mar 2017 15:54:49 +0100
Source: ravada
Section: perl
Priority: optional
Maintainer: frankie <frankie@>
Build-Depends: debhelper (>= 9),
perl
Standards-Version: 3.9.8
Homepage: https://metacpan.org/release/ravada
Package: ravada
Architecture: any
Depends: ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends}
Description: Remove Virtual Desktop Manager
(no description was found)
.
This description was automagically extracted from the module by dh-make-perl.
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://metacpan.org/release/ravada
Upstream-Contact: Francesc Guasch-Ortiz , frankie@telecos.upc.edu
Upstream-Name: ravada
DISCLAIMER: This copyright info was automatically extracted
from the perl module. It may not be accurate, so you better
check the module sources in order to ensure the module for its
inclusion in Debian or for general legal information. Please,
if licensing information is incorrectly generated, file a bug
on dh-make-perl.
NOTE: Don't forget to remove this disclaimer once you are happy
with this file.
Files: *
Copyright: Francesc Guasch-Ortiz , frankie@telecos.upc.edu
License: GPL-3+
Files: debian/*
Copyright: 2017, frankie <frankie@>
License: Artistic or GPL-1+ or GPL-3+
License: Artistic
This program is free software; you can redistribute it and/or modify
it under the terms of the Artistic License, which comes with Perl.
.
On Debian systems, the complete text of the Artistic License can be
found in `/usr/share/common-licenses/Artistic'.
License: GPL-1+
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 1, or (at your option)
any later version.
.
On Debian systems, the complete text of version 1 of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-1'.
License: GPL-3+
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; version 3 dated June, 2007, or (at your
option) any later version.
.
On Debian systems, the complete text of version 3 of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-3'.
README.md
debian.old/README.source
debian.old/README.Debian
devel-docs/README.md
#!/usr/bin/make -f
%:
dh $@
version=3
https://metacpan.org/release/ravada .*/ravada-v?(\d[\d.-]*)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$
ravada for Debian
----------------
<possible notes regarding this package - if none, delete this file>
-- Francesc Guasch <frankie@telecos.upc.edu> Wed, 15 Mar 2017 20:24:20 +0100
ravada for Debian
----------------
<this file describes information about the source package, see Debian policy
manual section 4.14. You WILL either need to modify or delete this file>
-- Francesc Guasch <frankie@telecos.upc.edu> Wed, 15 Mar 2017 20:24:20 +0100
ravada (0.1.2-1) unstable; urgency=medium
* Set domain drivers: audio, video and network
* Request a forced shutdown timed out later after normal shutdown
* Show custom message at login to the users
* Started javascript refactor to clean it up
* Allow different storage pools in KVM
* Fixed Error when create a new local user in master branch bug
* Clean stalled requests when starting
* Restore shows debug id at list_bases
* Manage swap volumes
* Improve Unique MAC generation
* Added Galician translation
-- Francesc Guasch <frankie@telecos.upc.edu> Wed, 15 Mar 2017 20:24:20 +0100
Source: ravada
Section: utils
Priority: optional
Maintainer: Francesc Guasch <frankie@telecos.upc.edu>
Build-Depends: debhelper (>=10)
Standards-Version: 3.9.8
#Vcs-Git: git://anonscm.debian.org/collab-maint/ravada.git
#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/ravada.git
Package: ravada
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, perl (>=5.18),libmojolicious-perl,mysql-common,libauthen-passphrase-perl,libdbd-mysql-perl,libdbi-perl,libdbix-connector-perl,libipc-run3-perl,libnet-ldap-perl,libproc-pid-file-perl,libvirt-bin,libsys-virt-perl,libxml-libxml-perl,libconfig-yaml-perl,libmoose-perl,libjson-xs-perl,qemu-utils,perlmagick,libmoosex-types-netaddr-ip-perl,libsys-statistics-linux-perl,libio-interface-perl,libiptables-chainmgr-perl,libnet-dns-perl,wget,liblocale-maketext-lexicon-perl,libmojolicious-plugin-i18n-perl,libdbd-sqlite3-perl, debconf (>= 0.2.26), adduser
Description: Remote Virtual Desktops Manager
Ravada is a software that allows the user to connect to a
remote virtual desktop.
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ravada
Source: <url://example.com>
Files: *
Copyright: <years> <put author's name and email here>
<years> <likewise for another author>
License: GPL-3.0+
Files: debian/*
Copyright: 2017 Francesc Guasch <frankie@telecos.upc.edu>
License: GPL-3.0+
License: GPL-3.0+
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 3 of the License, or
(at your option) any later version.
.
This package 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, see <https://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
# Please avoid picking licenses with terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.
?package(ravada):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\
title="ravada" command="/usr/bin/ravada"
#!/bin/sh
# postinst script for ravada
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
#!/bin/sh
# postrm script for ravada
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment