Mailinglist Archive: opensuse-commit (861 mails)

< Previous Next >
commit webyast-firewall-ws for openSUSE:Factory

Hello community,

here is the log from the commit of package webyast-firewall-ws for
openSUSE:Factory
checked in at Fri Jan 14 11:53:51 CET 2011.



--------
New Changes file:

--- /dev/null 2010-08-26 16:28:41.000000000 +0200
+++
/mounts/work_src_done/STABLE/webyast-firewall-ws/webyast-firewall-ws.changes
2010-08-31 09:19:34.000000000 +0200
@@ -0,0 +1,76 @@
+-------------------------------------------------------------------
+Tue Aug 31 07:17:40 UTC 2010 - schubi@xxxxxxxxxx
+
+- resubmit due ULR changes
+- 0.2.8
+
+-------------------------------------------------------------------
+Mon Aug 23 12:54:23 UTC 2010 - jreidinger@xxxxxxxxxx
+
+- add url to spec file (bnc#625537)
+- move tasks to lib directory (bnc#622957)
+- 0.2.7
+
+-------------------------------------------------------------------
+Thu Jul 8 10:30:28 UTC 2010 - jreidinger@xxxxxxxxxx
+
+- add REST API documentation (mkudlvasr)
+- remove shared test structures
+- 0.2.6
+
+-------------------------------------------------------------------
+Thu May 6 17:09:02 CEST 2010 - mkudlvasr@xxxxxxxxxx
+
+- add very basic documentation about firewall-ws
+- version 0.2.5
+
+-------------------------------------------------------------------
+Fri Apr 30 13:31:49 UTC 2010 - jreidinger@xxxxxxxxxx
+
+- fix spec file consistency (bnc#560061)
+- 0.2.4
+
+-------------------------------------------------------------------
+Fri Apr 23 11:37:16 UTC 2010 - jreidinger@xxxxxxxxxx
+
+- add license header (bnc#586620)
+- 0.2.3
+
+-------------------------------------------------------------------
+Tue Apr 6 15:41:07 CEST 2010 - mkudlvasr@xxxxxxxxxx
+
+- fix bnc#593331 - firewall reported as used even if not running
+- version 0.2.2
+
+-------------------------------------------------------------------
+Mon Mar 29 13:42:15 CEST 2010 - mvidner@xxxxxxx
+
+- RPM-Provide WebYaST(org.opensuse.yast.modules.FOO) (bnc#583561)
+
+-------------------------------------------------------------------
+Tue Mar 16 17:46:36 CET 2010 - mkudlvasr@xxxxxxxxxx
+
+- fix bnc#587862 (work around bnc#243624 - Mode::testsuite() == true
+ in YaPI call)
+- fix bnc#587859 (package dependencies)
+- version 0.2.1
+
+-------------------------------------------------------------------
+Thu Feb 25 16:51:56 CET 2010 - mkudlvasr@xxxxxxxxxx
+
+- change data structure, so that it doesn't use name of another
+ plugin (services). This was breaking ActiveRecord.
+- remove %config tags from spec-file
+- 0.2.0
+
+-------------------------------------------------------------------
+Thu Feb 18 14:10:04 UTC 2010 - jreidinger@xxxxxxxxxx
+
+- ensure that rights is granted also for yastws (bnc#580861)
+- 0.1.0
+
+-------------------------------------------------------------------
+Mon Jan 25 15:40:47 CET 2010 - mkudlvasr@xxxxxxxxxx
+
+- version 0.0.1
+

calling whatdependson for head-i586


New:
----
FIREWALL.pm
org.opensuse.yast.modules.yapi.firewall.policy
webyast-firewall-ws.changes
webyast-firewall-ws-rpmlintrc
webyast-firewall-ws.spec
www.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ webyast-firewall-ws.spec ++++++
#
# spec file for package webyast-firewall-ws
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name: webyast-firewall-ws
Provides: WebYaST(org.opensuse.yast.modules.yapi.firewall)
License: GPLv2
Group: Productivity/Networking/Web/Utilities
Url: http://en.opensuse.org/Portal:WebYaST
AutoReqProv: on
Version: 0.2.8
Release: 1
Summary: WebYaST - Firewall management service
Source: www.tar.bz2
Source1: org.opensuse.yast.modules.yapi.firewall.policy
Source2: FIREWALL.pm
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: rubygem-restility rubygem-yast2-webservice-tasks
PreReq: webyast-base-ws
Requires: SuSEfirewall2 yast2

BuildRequires: webyast-base-ws-testsuite
BuildRequires: rubygem-mocha rubygem-test-unit

#
%define plugin_name firewall
%define plugin_dir %{webyast_ws_dir}/vendor/plugins/%{plugin_name}
#

%package testsuite
License: GPLv2
Group: Productivity/Networking/Web/Utilities
Requires: %{name} = %{version}
Requires: webyast-base-ws-testsuite
Summary: Testsuite for webyast-firewall-ws package

%description
WebYaST - Plugin provides REST based interface to handle firewall settings.
Authors:
--------
Martin Kudlvasr<mkudlvasr@xxxxxxxxxx>

%description testsuite
This package contains complete testsuite for webyast-firewall-ws webservice
package.
It's only needed for verifying the functionality of the module and it's not
needed at runtime.

%prep
%setup -q -n www

%build
# build restdoc documentation
mkdir -p public/firewall/restdoc
%webyast_ws_restdoc

# do not package restdoc sources
rm -rf restdoc
#remove generated doc
rm -rf doc

%check
# run the testsuite
%webyast_ws_check

%install

#
# Install all web and frontend parts.
#
mkdir -p $RPM_BUILD_ROOT%{plugin_dir}
cp -a * $RPM_BUILD_ROOT%{plugin_dir}/
rm -f $RPM_BUILD_ROOT%{plugin_dir}/COPYING

# Policies
mkdir -p $RPM_BUILD_ROOT/usr/share/PolicyKit/policy
install -m 0644 %SOURCE1 $RPM_BUILD_ROOT/usr/share/PolicyKit/policy/

#YaPI
mkdir -p $RPM_BUILD_ROOT/usr/share/YaST2/modules/YaPI/
cp %{SOURCE2} $RPM_BUILD_ROOT/usr/share/YaST2/modules/YaPI/

%clean
rm -rf $RPM_BUILD_ROOT

%post
#
# granting all permissions for root
#
/usr/sbin/grantwebyastrights --user root --action grant > /dev/null ||:
/usr/sbin/grantwebyastrights --user %{webyast_ws_user} --action grant >
/dev/null ||:

%files
%defattr(-,root,root)
%dir %{webyast_ws_dir}
%dir %{webyast_ws_dir}/vendor
%dir %{webyast_ws_dir}/vendor/plugins
%dir %{plugin_dir}

%dir /usr/share/YaST2/
%dir /usr/share/YaST2/modules/
%dir /usr/share/YaST2/modules/YaPI/
%dir /usr/share/PolicyKit
%dir /usr/share/PolicyKit/policy

%{plugin_dir}/README
%{plugin_dir}/Rakefile
%{plugin_dir}/init.rb
%{plugin_dir}/install.rb
%{plugin_dir}/uninstall.rb
%{plugin_dir}/app
%{plugin_dir}/config
%{plugin_dir}/public
%{plugin_dir}/lib
/usr/share/YaST2/modules/YaPI/FIREWALL.pm
%attr(644,root,root) %config
/usr/share/PolicyKit/policy/org.opensuse.yast.modules.yapi.firewall.policy
%doc COPYING

%files testsuite
%defattr(-,root,root)
%{plugin_dir}/test

%changelog
++++++ FIREWALL.pm ++++++
#--
# Copyright (c) 2009-2010 Novell, Inc.
#
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License
# as published by the Free Software Foundation.
#
# 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, contact Novell, Inc.
#
# To contact Novell about this file by physical or electronic mail,
# you may find current contact information at www.novell.com
#++

package YaPI::FIREWALL;

use strict;
use YaST::YCP qw(:LOGGING);
use YaPI;
use Data::Dumper;

# --------------- imported modules
YaST::YCP::Import ("SuSEFirewall");
YaST::YCP::Import ("SuSEFirewallServices");
YaST::YCP::Import ("Mode");
# --------------------------------

our $VERSION = '1.0.0';
our @CAPABILITIES = ('SLES11');
our %TYPEINFO;

# Return a boolean value indicating, whether a firewall is running and
# a list of services with their translated name and a boolean value indicating
whether
# they should be allowed or not (in the external zone).
BEGIN{$TYPEINFO{Read} = ["function", ["map", "string", "any"]];
}

sub Read {
my $self = shift;
SuSEFirewall->ResetReadFlag();
SuSEFirewall->Read();
my $status = YaST::YCP::Boolean( SuSEFirewall->GetEnableService () );
my $known_services = SuSEFirewallServices->GetSupportedServices();
my @service_ids = keys %$known_services;
my $service_zones = SuSEFirewall->GetServices(\@service_ids);
my $mkService = mkServiceGenerator($known_services, $service_zones, "EXT");
my @services = map($mkService->($_),@service_ids);
y2milestone "YaPI::FIREWALL::mkService ->
'".($mkService->($service_ids[0]))."'";
my %ret = ('use_firewall' => $status,
'fw_services' => \@services
);
return \%ret;
}

sub mkServiceGenerator {
my($service_names,$service_zones,$zone) = @_;
my $generator = sub { my $service_id = shift;
{ 'id' => $service_id,
'name' => $service_names->{$service_id},
'allowed' => YaST::YCP::Boolean(
$service_zones->{$service_id}->{$zone} )
}
};
return $generator;
}

# Write firewall settings
# { "use_firewall" => 1,
# "fw_services" => [ { "id" => "service:lighttpd-ssl",
# "allowed" => 1 },
# { "id" => "service:samba-client",
# "allowed" => 0 }
# ]
# }
# Return structure
# { "result" => YaST::YCP::Boolean(1),
# "error" => "error string"
# }
BEGIN{$TYPEINFO{Write} = [ "function",
["map","string","any"],
["map","string","any"]]}
sub Write {
my $self = shift;
my $settings = shift;
y2milestone("YaPI::FIREWALL::Write - setting Mode::_test to none");
Mode->testMode();
Mode->SetTest("none");
y2milestone("YaPI::FIREWALL::Write - settings", Dumper($settings));
SuSEFirewall->SetEnableService ( $settings->{"use_firewall"} );
SuSEFirewall->SetStartService ( $settings->{"use_firewall"} );
my @allowed_services = map {$_ ->{"id"}} (grep { $_->{"allowed"}}
@{$settings->{"fw_services"}} );
my @forbidden_services = map {$_->{"id"}} (grep { ! $_->{"allowed"} }
@{$settings->{"fw_services"}});
y2milestone("YaPI::FIREWALL::Write - allowing services",
Dumper(\@allowed_services));
y2milestone("YaPI::FIREWALL::Write - forbidding services",
Dumper(\@forbidden_services));
SuSEFirewall->SetServicesForZones( \@allowed_services, ["EXT"], 1 );
SuSEFirewall->SetServicesForZones( \@forbidden_services, ["EXT"], 0 );
my $result = SuSEFirewall->Write();
# SetServicesForZones should return boolean result according to description,
but in code it never does.
return {"saved_ok" => YaST::YCP::Boolean($result), "error"=>""};
}
++++++ webyast-firewall-ws-rpmlintrc ++++++
# ignore security warnings (unauthorized PolicyKit permissions) for now
addFilter("I: polkit-unauthorized-privilege")

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages