rpms/cyphesis/devel cyphesis-0.5.15-sockpath.patch, NONE, 1.1 cyphesis-0.5.15-init.patch, 1.1, 1.2 cyphesis.spec, 1.19, 1.20
Michael Thomas (wart)
fedora-extras-commits at redhat.com
Sun May 25 16:24:58 UTC 2008
- Previous message (by thread): rpms/popt/devel popt.spec,1.4,1.5
- Next message (by thread): rpms/flam3/devel .cvsignore, 1.5, 1.6 flam3.spec, 1.5, 1.6 sources, 1.5, 1.6 flam3-2.7.8-config.h.in.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: wart
Update of /cvs/extras/rpms/cyphesis/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3567
Modified Files:
cyphesis-0.5.15-init.patch cyphesis.spec
Added Files:
cyphesis-0.5.15-sockpath.patch
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 {
cyphesis-0.5.15-init.patch:
Index: cyphesis-0.5.15-init.patch
===================================================================
RCS file: /cvs/extras/rpms/cyphesis/devel/cyphesis-0.5.15-init.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- cyphesis-0.5.15-init.patch 19 Dec 2007 05:21:06 -0000 1.1
+++ cyphesis-0.5.15-init.patch 25 May 2008 16:24:15 -0000 1.2
@@ -1,15 +1,8 @@
---- cyphesis-0.5.15/cyphesis.init.orig 2006-09-26 14:33:12.000000000 -0700
-+++ cyphesis-0.5.15/cyphesis.init 2007-12-18 15:57:12.000000000 -0800
-@@ -23,29 +23,35 @@
- start() {
+--- cyphesis-0.5.15/cyphesis.init.orig 2008-04-09 11:02:46.000000000 -0700
++++ cyphesis-0.5.15/cyphesis.init 2008-04-09 11:03:07.000000000 -0700
+@@ -24,28 +24,28 @@
# Start the daemon.
-+ if selinuxenabled ; then
-+ /usr/sbin/semanage port -a -t cyphesis_port_t -p tcp 6767 &>/dev/null || :
-+ /usr/sbin/semanage port -a -t cyphesis_port_t -p tcp 6769 &>/dev/null || :
-+ /usr/sbin/semanage port -a -t cyphesis_port_t -p udp 32771 &>/dev/null || :
-+ fi
-+
# Make sure postgres superuser exists
- if ! su $POSTGRESUSER -c true >/dev/null 2>&1; then
+ if ! runuser $POSTGRESUSER -c true >/dev/null 2>&1; then
@@ -41,7 +34,7 @@
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo_success
-@@ -58,10 +64,10 @@
+@@ -58,10 +58,10 @@
fi
# Make sure the database exists
@@ -54,7 +47,7 @@
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo_success
-@@ -73,7 +79,7 @@
+@@ -73,7 +73,7 @@
echo
# Populate it with rules
echo -n $"Loading database with rules: "
@@ -63,7 +56,7 @@
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo_success
-@@ -88,7 +94,7 @@
+@@ -88,7 +88,7 @@
echo -n $"Starting cyphesis: "
# Run the server, in self daemonising mode
@@ -72,7 +65,7 @@
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo_success
-@@ -96,8 +102,24 @@
+@@ -96,8 +96,24 @@
else
echo_failure
echo
@@ -97,16 +90,13 @@
return $RETVAL
}
-@@ -107,7 +129,13 @@
+@@ -107,7 +123,10 @@
killproc cyphesis
RETVAL=$?
echo
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/cyphesis
+ if [ $RETVAL -eq 0 ] ; then
+ rm -f /var/lock/subsys/cyphesis
-+ /usr/sbin/semanage port -d -t cyphesis_port_t -p tcp 6767 &>/dev/null || :
-+ /usr/sbin/semanage port -d -t cyphesis_port_t -p tcp 6769 &>/dev/null || :
-+ /usr/sbin/semanage port -d -t cyphesis_port_t -p udp 32771 &>/dev/null || :
+ fi
+
return $RETVAL
Index: cyphesis.spec
===================================================================
RCS file: /cvs/extras/rpms/cyphesis/devel/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 25 May 2008 16:24:16 -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
@@ -45,20 +39,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 +52,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 +61,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 +80,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 +97,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 +126,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 +151,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 +163,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
- Previous message (by thread): rpms/popt/devel popt.spec,1.4,1.5
- Next message (by thread): rpms/flam3/devel .cvsignore, 1.5, 1.6 flam3.spec, 1.5, 1.6 sources, 1.5, 1.6 flam3-2.7.8-config.h.in.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list