From e92d63ce9cede0190717bf7de8636e7b80d1c572 Mon Sep 17 00:00:00 2001 From: Davisson Paulino <davisson@coop.c3local> Date: Fri, 2 Mar 2018 12:05:44 -0300 Subject: [PATCH 1/3] added conflicts --- package/debian/changelog | 6 ++++++ package/debian/control | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/debian/changelog b/package/debian/changelog index 5860d69..fe8682e 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,3 +1,9 @@ +le-parental-control (0.0.4) testing; urgency=medium + + * Added conflicts + + -- Davisson Paulino <dhpaulino@gmail.com> Fri, 02 Mar 2018 12:04:51 -0300 + le-parental-control (0.0.3) testing; urgency=medium * Update Manual page diff --git a/package/debian/control b/package/debian/control index 46cb1a5..84057ae 100644 --- a/package/debian/control +++ b/package/debian/control @@ -2,7 +2,7 @@ Source: le-parental-control Section: admin Priority: extra Maintainer: Andre Luis da Silva Machado <contato@c3sl.ufpr.br> -Uploaders: Rafael Sanfelice Castilho <rsc15@inf.ufpr.br> +Uploaders: Davisson Paulino <dhpaulino@gmail.com>, Rafael Sanfelice Castilho <rsc15@inf.ufpr.br> Build-Depends: debhelper (>=9) Standards-Version: 3.9.7 Vcs-Git: https://gitlab.c3sl.ufpr.br/le6/le-parental-control.git @@ -10,6 +10,7 @@ Vcs-Git: https://gitlab.c3sl.ufpr.br/le6/le-parental-control.git Package: le-parental-control Architecture: all Depends: ${misc:Depends} +Conflicts: le-conf (<=0.0.28) Recommends: le-help, le-conf Description: Configure Family Shield Performs all configuration for Family Shield. -- GitLab From d9093d975ad9d68566ac69835794d1ed29644323 Mon Sep 17 00:00:00 2001 From: Davisson Paulino <dhp14@inf.ufpr.br> Date: Mon, 12 Mar 2018 11:30:58 -0300 Subject: [PATCH 2/3] Added missing service files --- le-lab/scripts/disableFamilyShield | 47 ++++++++++++++++++++++ le-lab/scripts/enableFamilyShield | 47 ++++++++++++++++++++++ le-lab/services/disableFamilyShield | 2 + le-lab/services/enableFamilyShield | 2 + package/debian/changelog | 22 +++++++--- package/debian/control | 6 +-- package/debian/le-parental-control.install | 1 + package/family-shield | 16 ++++---- 8 files changed, 127 insertions(+), 16 deletions(-) create mode 100755 le-lab/scripts/disableFamilyShield create mode 100755 le-lab/scripts/enableFamilyShield create mode 100644 le-lab/services/disableFamilyShield create mode 100644 le-lab/services/enableFamilyShield diff --git a/le-lab/scripts/disableFamilyShield b/le-lab/scripts/disableFamilyShield new file mode 100755 index 0000000..85d42d0 --- /dev/null +++ b/le-lab/scripts/disableFamilyShield @@ -0,0 +1,47 @@ +#!/bin/bash + +# Copyright (C) 2017 Centro de Computacao Cientifica e Software Livre +# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR +# +# This file is part of le-conf +# +# le-conf 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +LOG_FILE="/var/log/family-shield.log" + +function log (){ + echo $1 >> "$LOG_FILE" +} + + +case $1 in + 0) + log "disableFamilyShield received 0" + ;; + 1) + log "disableFamilyShield received 1" + ;; + 2) + log "disableFamilyShield received 2" + ;; + 6) + log "disableFamilyShield received 6" + sudo family-shield -d + ;; + 7) + log "disableFamilyShield received 7" + ;; +esac \ No newline at end of file diff --git a/le-lab/scripts/enableFamilyShield b/le-lab/scripts/enableFamilyShield new file mode 100755 index 0000000..31dec1c --- /dev/null +++ b/le-lab/scripts/enableFamilyShield @@ -0,0 +1,47 @@ +#!/bin/bash + +# Copyright (C) 2017 Centro de Computacao Cientifica e Software Livre +# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR +# +# This file is part of le-conf +# +# le-conf 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +LOG_FILE="/var/log/family-shield.log" + +function log (){ + echo $1 >> "$LOG_FILE" +} + + +case $1 in + 0) + log "enableFamilyShield received 0" + ;; + 1) + log "enableFamilyShield received 1" + ;; + 2) + log "enableFamilyShield received 2" + ;; + 6) + log "enableFamilyShield received 6" + sudo family-shield -e + ;; + 7) + log "enableFamilyShield received 7" + ;; +esac \ No newline at end of file diff --git a/le-lab/services/disableFamilyShield b/le-lab/services/disableFamilyShield new file mode 100644 index 0000000..560adfa --- /dev/null +++ b/le-lab/services/disableFamilyShield @@ -0,0 +1,2 @@ +status none + diff --git a/le-lab/services/enableFamilyShield b/le-lab/services/enableFamilyShield new file mode 100644 index 0000000..560adfa --- /dev/null +++ b/le-lab/services/enableFamilyShield @@ -0,0 +1,2 @@ +status none + diff --git a/package/debian/changelog b/package/debian/changelog index fe8682e..a75c5ca 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,18 +1,31 @@ -le-parental-control (0.0.4) testing; urgency=medium +le-parental-control (0.0.6) testing; urgency=medium + + * Added missing service files + + -- Davisson Paulino <dhpaulino@gmail.com> Mon, 12 Mar 2018 11:29:55 -0300 + +le-parental-control (0.0.5) testing; urgency=medium * Added conflicts + * Fixed le-lab annoucement - -- Davisson Paulino <dhpaulino@gmail.com> Fri, 02 Mar 2018 12:04:51 -0300 + -- Davisson Paulino <dhpaulino@gmail.com> Tue, 06 Mar 2018 11:54:08 -0300 + +le-parental-control (0.0.4) testing; urgency=medium + + * Remove le-conf from dependency list + + -- Diego Pasqualin <dpasqualin@c3sl.ufpr.br> Mon, 05 Mar 2018 14:44:08 -0300 le-parental-control (0.0.3) testing; urgency=medium - * Update Manual page + * Update Manual page -- Rafael Sanfelice Castilho <rsc15@inf.ufpr.br> Fri, 02 Mar 2018 11:24:31 -0300 le-parental-control (0.0.2) testing; urgency=medium - * Fix enabling family-shield bug + * Fix enabling family-shield bug -- Andre Luis da Silva Machado <contato@c3sl.ufpr.br> Thu, 01 Mar 2018 11:20:02 -0200 @@ -21,4 +34,3 @@ le-parental-control (0.0.1) testing; urgency=medium * Separate family-shield and le-conf -- Andre Luis da Silva Machado <contato@c3sl.ufpr.br> Fri, 09 Feb 2018 11:48:02 -0200 - diff --git a/package/debian/control b/package/debian/control index 84057ae..f00ad0b 100644 --- a/package/debian/control +++ b/package/debian/control @@ -2,7 +2,7 @@ Source: le-parental-control Section: admin Priority: extra Maintainer: Andre Luis da Silva Machado <contato@c3sl.ufpr.br> -Uploaders: Davisson Paulino <dhpaulino@gmail.com>, Rafael Sanfelice Castilho <rsc15@inf.ufpr.br> +Uploaders: Rafael Sanfelice Castilho <rsc15@inf.ufpr.br>, Diego Pasqualin <dpasqualin@c3sl.ufpr.br>, Davisson Paulino <dhpaulino@gmail.com> Build-Depends: debhelper (>=9) Standards-Version: 3.9.7 Vcs-Git: https://gitlab.c3sl.ufpr.br/le6/le-parental-control.git @@ -10,7 +10,7 @@ Vcs-Git: https://gitlab.c3sl.ufpr.br/le6/le-parental-control.git Package: le-parental-control Architecture: all Depends: ${misc:Depends} -Conflicts: le-conf (<=0.0.28) -Recommends: le-help, le-conf +Conflicts: le-conf (<< 0.0.29) +Recommends: le-help Description: Configure Family Shield Performs all configuration for Family Shield. diff --git a/package/debian/le-parental-control.install b/package/debian/le-parental-control.install index f0669df..f0458d8 100644 --- a/package/debian/le-parental-control.install +++ b/package/debian/le-parental-control.install @@ -1,2 +1,3 @@ family-shield usr/bin help/le-controle-parental.page usr/share/help-langpack/pt_BR/le-help/ +le-lab/* etc/le-lab diff --git a/package/family-shield b/package/family-shield index 1888d4b..00a855c 100755 --- a/package/family-shield +++ b/package/family-shield @@ -76,16 +76,16 @@ function disable_family() { # To make sure that we can advertise the same command later function advertise_enable() { # Try to remove the disable family-shield service from network - dbus-send --system --dest=br.ufpr.c3sl.lelab /br/ufpr/c3sl/lelab br.ufpr.c3sl.lelab.Action.remove_local_service string:'disableFamilyShield' + le-lab -s remove disableFamilyShield # Advertise enable service - dbus-send --system --dest=br.ufpr.c3sl.lelab /br/ufpr/c3sl/lelab br.ufpr.c3sl.lelab.Action.advertise_local_service string:'enableFamilyShield' + le-lab -s advertise enableFamilyShield } function advertise_disable() { # Try to remove the enable family-shield service from network - dbus-send --system --dest=br.ufpr.c3sl.lelab /br/ufpr/c3sl/lelab br.ufpr.c3sl.lelab.Action.remove_local_service string:'enableFamilyShield' + le-lab -s remove enableFamilyShield # Advertise enable service - dbus-send --system --dest=br.ufpr.c3sl.lelab /br/ufpr/c3sl/lelab br.ufpr.c3sl.lelab.Action.advertise_local_service string:'disableFamilyShield' + le-lab -s advertise disableFamilyShield } function check_services() { @@ -93,7 +93,7 @@ function check_services() { if test "$serviceActive"; then echo "Family Shield is on local network" else - echo "No Family Shield service active on local network" + echo "No Family Shield service active on local network" fi } @@ -118,7 +118,7 @@ do ;; --help|-h) echo "Usage: family-shield [OPTION]" - echo + echo echo " -h, --help display this help." echo " -e, --enable enable Family Shield." echo " -d, --disable disable Family Shield." @@ -127,7 +127,7 @@ do exit 1 ;; "") - echo "family-shield: missing operand" + echo "family-shield: missing operand" echo "Try 'family-shield --help' for more information." exit 1 ;; @@ -136,7 +136,7 @@ do echo "Try 'family-shield --help' for more information." exit 1 ;; - esac + esac done if test $STATUS; then -- GitLab From 75009df805f44579c972c1682d7d53b7857e110d Mon Sep 17 00:00:00 2001 From: Davisson Paulino <dhp14@inf.ufpr.br> Date: Mon, 12 Mar 2018 11:41:49 -0300 Subject: [PATCH 3/3] SCRUM#441:fixed path le-lab --- package/debian/control | 2 +- package/debian/postinst | 8 +++--- package/debian/postrm | 26 +++++++++++++++++ package/debian/preinst | 28 +++++++++++++++++++ package/debian/prerm | 2 ++ .../le-lab}/scripts/disableFamilyShield | 0 .../le-lab}/scripts/enableFamilyShield | 0 .../le-lab}/services/disableFamilyShield | 0 .../le-lab}/services/enableFamilyShield | 0 9 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 package/debian/postrm create mode 100644 package/debian/preinst rename {le-lab => package/le-lab}/scripts/disableFamilyShield (100%) rename {le-lab => package/le-lab}/scripts/enableFamilyShield (100%) rename {le-lab => package/le-lab}/services/disableFamilyShield (100%) rename {le-lab => package/le-lab}/services/enableFamilyShield (100%) diff --git a/package/debian/control b/package/debian/control index f00ad0b..b274f4f 100644 --- a/package/debian/control +++ b/package/debian/control @@ -4,7 +4,7 @@ Priority: extra Maintainer: Andre Luis da Silva Machado <contato@c3sl.ufpr.br> Uploaders: Rafael Sanfelice Castilho <rsc15@inf.ufpr.br>, Diego Pasqualin <dpasqualin@c3sl.ufpr.br>, Davisson Paulino <dhpaulino@gmail.com> Build-Depends: debhelper (>=9) -Standards-Version: 3.9.7 +Standards-Version: 3.9.8 Vcs-Git: https://gitlab.c3sl.ufpr.br/le6/le-parental-control.git Package: le-parental-control diff --git a/package/debian/postinst b/package/debian/postinst index ac42235..1d56791 100755 --- a/package/debian/postinst +++ b/package/debian/postinst @@ -40,19 +40,19 @@ case "$1" in fi family-shield -e - + # Restart le-lab after adding services - dbus-send --system --type=method_call --dest=br.ufpr.c3sl.lelab /br/ufpr/c3sl/lelab br.ufpr.c3sl.lelab.Action.restart || true + deb-systemd-invoke start le-lab || true fi ################## Manual #################### dir="/usr/share/help/pt_BR/le-help" - if [ ! -d $dir ];then + if [ ! -d $dir ];then mkdir -p $dir fi if [ ! -L /usr/share/help/pt_BR/le-help/le-conf-controle-parental.page ];then ln -s /usr/share/help-langpack/pt_BR/le-help/le-conf-controle-parental.page /usr/share/help/pt_BR/le-help/le-conf-controle-parental.page fi - + ;; abort-upgrade|abort-remove|abort-deconfigure) exit 0 diff --git a/package/debian/postrm b/package/debian/postrm new file mode 100644 index 0000000..537cf71 --- /dev/null +++ b/package/debian/postrm @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Copyright (C) 2016 Centro de Computacao Cientifica e Software Livre +# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR +# +# This file is part of le-conf +# +# le6-conf 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 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +set -e + +deb-systemd-invoke start le-lab +#DEBHELPER# diff --git a/package/debian/preinst b/package/debian/preinst new file mode 100644 index 0000000..43ea3ec --- /dev/null +++ b/package/debian/preinst @@ -0,0 +1,28 @@ +#!/bin/bash +# +# Copyright (C) 2018 Centro de Computacao Cientifica e Software Livre +# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR +# +# This file is part of le-parental-control +# +# le6-conf 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 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +set -e + + +deb-systemd-invoke stop le-lab + +exit 0 diff --git a/package/debian/prerm b/package/debian/prerm index 5a07de4..29f6d4a 100755 --- a/package/debian/prerm +++ b/package/debian/prerm @@ -22,4 +22,6 @@ set -e rm /usr/share/help/pt_BR/le-help/le-conf-controle-parental.page + +deb-systemd-invoke stop le-lab #DEBHELPER# diff --git a/le-lab/scripts/disableFamilyShield b/package/le-lab/scripts/disableFamilyShield similarity index 100% rename from le-lab/scripts/disableFamilyShield rename to package/le-lab/scripts/disableFamilyShield diff --git a/le-lab/scripts/enableFamilyShield b/package/le-lab/scripts/enableFamilyShield similarity index 100% rename from le-lab/scripts/enableFamilyShield rename to package/le-lab/scripts/enableFamilyShield diff --git a/le-lab/services/disableFamilyShield b/package/le-lab/services/disableFamilyShield similarity index 100% rename from le-lab/services/disableFamilyShield rename to package/le-lab/services/disableFamilyShield diff --git a/le-lab/services/enableFamilyShield b/package/le-lab/services/enableFamilyShield similarity index 100% rename from le-lab/services/enableFamilyShield rename to package/le-lab/services/enableFamilyShield -- GitLab