rpms/cyphesis/F-9 cyphesis-0.5.15-sockpath.patch, NONE, 1.1 cyphesis.spec, 1.19, 1.20 cyphesis.fc, 1.1, NONE cyphesis.if, 1.1, NONE cyphesis.te, 1.5, NONE
Michael Thomas (wart)
fedora-extras-commits at redhat.com
Fri Jun 6 06:26:11 UTC 2008
Author: wart
Update of /cvs/extras/rpms/cyphesis/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2725
Modified Files:
cyphesis.spec
Added Files:
cyphesis-0.5.15-sockpath.patch
Removed Files:
cyphesis.fc cyphesis.if cyphesis.te
Log Message:
- Remove selinux subpackage; it's been merged into the main
selinux-policy package.
- Add patch for using a full socket path in cyphesis.vconf
cyphesis-0.5.15-sockpath.patch:
--- NEW FILE cyphesis-0.5.15-sockpath.patch ---
--- cyphesis-0.5.15/server/CommUnixListener.cpp.orig 2008-04-09 09:42:04.000000000 -0700
+++ cyphesis-0.5.15/server/CommUnixListener.cpp 2008-04-09 09:43:16.000000000 -0700
@@ -91,7 +91,11 @@
/// will never be called in an instance of cyphesis already exists.
int CommUnixListener::setup(const std::string & name)
{
- m_path = var_directory + "/tmp/" + name;
+ if (name[0] != '/') {
+ m_path = var_directory + "/tmp/" + name;
+ } else {
+ m_path = name;
+ }
m_unixListener.open(m_path);
m_bound = m_unixListener.is_open();
--- cyphesis-0.5.15/client/ClientConnection.cpp.orig 2008-04-09 09:41:19.000000000 -0700
+++ cyphesis-0.5.15/client/ClientConnection.cpp 2008-04-09 12:57:43.000000000 -0700
@@ -142,7 +142,11 @@
debug(std::cout << "Attempting local connect." << std::endl << std::flush;);
std::string socket;
if (sockname == "") {
- socket = var_directory + "/tmp/" + client_socket_name;
+ if (client_socket_name[0] != '/') {
+ socket = var_directory + "/tmp/" + client_socket_name;
+ } else {
+ socket = client_socket_name;
+ }
} else if (sockname[0] != '/') {
socket = var_directory + "/tmp/" + sockname;
} else {
Index: cyphesis.spec
===================================================================
RCS file: /cvs/extras/rpms/cyphesis/F-9/cyphesis.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- cyphesis.spec 22 Feb 2008 00:56:41 -0000 1.19
+++ cyphesis.spec 6 Jun 2008 06:25:23 -0000 1.20
@@ -1,22 +1,16 @@
-%define selinux_variants mls strict targeted
-%define selinux_policyver %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp)
-
%define logwatch_root %{_datadir}/logwatch
%define logwatch_conf %{logwatch_root}/dist.conf
%define logwatch_scripts %{logwatch_root}/scripts
Name: cyphesis
Version: 0.5.15
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: WorldForge game server
Group: System Environment/Libraries
# Would be GPLv2+, except server/protocol_instructions.h is GPLv2 only.
License: GPLv2
URL: http://www.worldforge.org
Source0: http://downloads.sourceforge.net/worldforge/%{name}-%{version}.tar.gz
-Source1: cyphesis.te
-Source2: cyphesis.if
-Source3: cyphesis.fc
Source4: logwatch.logconf.cyphesis
Source5: logwatch.script.cyphesis
Source6: logwatch.serviceconf.cyphesis
@@ -24,11 +18,11 @@
Patch0: cyphesis-0.5.15-init.patch
Patch1: cyphesis-0.5.11-logdir.patch
Patch2: cyphesis-0.5.15-gcc43.patch
+Patch3: cyphesis-0.5.15-sockpath.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel libgcrypt-devel pkgconfig atlascpp-devel
BuildRequires: varconf-devel libsigc++20-devel mercator-devel skstream-devel
BuildRequires: postgresql-devel readline-devel avahi-devel
-BuildRequires: checkpolicy selinux-policy-devel hardlink
Requires: postgresql-server
Requires(pre): shadow-utils
@@ -38,6 +32,8 @@
Requires(preun): /sbin/service
Requires(postun): /sbin/service
+Obsoletes: cyphesis-selinux <= 0.5.15-6
+
%description
Cyphesis is a WorldForge server suitable running small games. It is also
designed by be used as an AI subsystem in a network of distributed servers. It
@@ -45,20 +41,6 @@
based on PostgreSQL, and an AI engine using goal trees implemented in Python.
It is the server used in most current WorldForge games.
-
-%package selinux
-Summary: SELinux policy files for the WorldForge game server
-Group: Amusements/Games
-Requires: %{name} = %{version}-%{release}
-%if "%{selinux_policyver}" != ""
-Requires: selinux-policy >= %{selinux_policyver}
-%endif
-Requires(post): /usr/sbin/semodule /usr/sbin/semanage /sbin/fixfiles
-Requires(preun): /sbin/service /usr/sbin/semodule /usr/sbin/semanage /sbin/fixfiles /usr/sbin/setsebool
-Requires(postun): /usr/sbin/semodule
-%description selinux
-SELinux policy files for the WorldForge game server
-
%package logwatch
Summary: logwatch scripts for the WorldForge game server
Group: Amusements/Games
@@ -72,6 +54,7 @@
%patch0 -p1
%patch1 -p0
%patch2 -p1
+%patch3 -p1
# Fix a bug where DESTDIR is added twice to some files during the
# install step. Upstream has been notified.
@@ -80,8 +63,6 @@
chmod a-x rulesets/basic/mind/dictlist.py
chmod a-x rulesets/mason/world/objects/buildings/House.py
chmod a-x rulesets/mason/world/objects/elements/Fire.py
-mkdir SELinux
-cp %{SOURCE1} %{SOURCE2} %{SOURCE3} SELinux/
# Use a /etc/sysconfig/cyphesis variable to determine if
# we should load the world data into the cyphesis server
@@ -101,16 +82,6 @@
%configure
make %{?_smp_mflags}
-# Build the selinux policy file
-pushd SELinux
-for variant in %{selinux_variants}
-do
- make NAME=${variant} -f %{_datadir}/selinux/devel/Makefile
- mv %{name}.pp %{name}.pp.${variant}
- make NAME=${variant} -f %{_datadir}/selinux/devel/Makefile clean
-done
-popd
-
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
@@ -128,19 +99,10 @@
install -pD -m 0755 %{SOURCE7} %{buildroot}%{logwatch_scripts}/shared/applycyphesisdate
mkdir -p %{buildroot}%{_var}/log/%{name}
+mkdir -p %{buildroot}%{_var}/run/%{name}
+sed -i -e 's#unixport="#unixport="/var/run/cyphesis/#' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cyphesis.vconf
-# Install selinux policies
-pushd SELinux
-for variant in %{selinux_variants}
-do
- install -d %{buildroot}%{_datadir}/selinux/${variant}
- install -p -m 644 %{name}.pp.${variant} \
- %{buildroot}%{_datadir}/selinux/${variant}/%{name}.pp
-done
-popd
-# Hardlink identical policy module packages together
-/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
%check
make check
@@ -166,56 +128,17 @@
echo "LOAD_RULES=1" >> %{_sysconfdir}/sysconfig/%{name}
fi
-%post selinux
-# Install SELinux policy modules
-for selinuxvariant in %{selinux_variants}
-do
- /usr/sbin/semodule -s ${selinuxvariant} -i \
- %{_datadir}/selinux/${selinuxvariant}/%{name}.pp &> /dev/null || :
-done
-/usr/sbin/semanage port -a -t %{name}_port_t -p tcp 6767 &> /dev/null || :
-/usr/sbin/semanage port -a -t %{name}_port_t -p tcp 6769 &> /dev/null || :
-/usr/sbin/semanage port -a -t %{name}_port_t -p udp 32771 &> /dev/null || :
-/sbin/fixfiles -R %{name} restore || :
-/sbin/service %{name} condrestart > /dev/null 2>&1 || :
-
-
%preun
if [ "$1" = "0" ]; then
/sbin/service cyphesis stop > /dev/null 2>&1
/sbin/chkconfig --del cyphesis
fi
-%preun selinux
-if [ "$1" -lt "1" ] ; then
- # Disable the policy and restart the daemon
- /usr/sbin/setsebool %{name}_disable_trans 1 &> /dev/null || :
- /sbin/service %{name} condrestart > /dev/null 2>&1 || :
- # Unload the module
- /usr/sbin/semanage port -d -t %{name}_port_t -p tcp 6767 &> /dev/null || :
- /usr/sbin/semanage port -d -t %{name}_port_t -p tcp 6769 &> /dev/null || :
- /usr/sbin/semanage port -d -t %{name}_port_t -p udp 32771 &> /dev/null || :
- for variant in %{selinux_variants} ; do
- /usr/sbin/semodule -s ${variant} -r %{name} &> /dev/null || :
- done
- # Set the context back
- /sbin/fixfiles -R %{name} restore || :
-fi
-
%postun
if [ "$1" -ge "1" ]; then
/sbin/service cyphesis condrestart >/dev/null 2>&1
fi
-%postun selinux
-if [ "$1" -ge "1" ] ; then
- # Replace the module if it is already loaded. semodule -u also
- # checks the module version
- for variant in %{selinux_variants} ; do
- /usr/sbin/semodule -u %{_datadir}/selinux/${variant}/%{name}.pp || :
- done
-fi
-
%clean
rm -rf %{buildroot}
@@ -230,9 +153,10 @@
%config(noreplace) %{_sysconfdir}/%{name}/*
%{_sysconfdir}/init.d/%{name}
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
-# Package up the log directory with special permissions so that the
+# Package up the log and sock directory with special permissions so that the
# service can write to it.
%dir %attr(0755,cyphesis,cyphesis) %{_var}/log/%{name}
+%dir %attr(0755,cyphesis,cyphesis) %{_var}/run/%{name}
%files logwatch
%defattr(-,root,root,-)
@@ -241,13 +165,13 @@
%{logwatch_scripts}/services/%{name}
%{logwatch_scripts}/shared/applycyphesisdate
-%files selinux
-%defattr(-,root,root,-)
-%doc SELinux/*.??
-%{_datadir}/selinux/*/%{name}.pp
-
%changelog
+* Wed Apr 10 2008 Wart <wart at kobold.org> 0.5.15-7
+- Remove selinux subpackage; it's been merged into the main
+ selinux-policy package.
+- Add patch for using a full socket path in cyphesis.vconf
+
* Thu Feb 21 2008 Wart <wart at kobold.org> 0.5.15-6
- Add patch to fix gcc4.3 build errors
--- cyphesis.fc DELETED ---
--- cyphesis.if DELETED ---
--- cyphesis.te DELETED ---
More information about the fedora-extras-commits
mailing list