From ee3255a5a0358d6828b1a5ddd2e66c355e52c230dffe01b3b499fa45ab9e52e3 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 21 Apr 2013 15:58:58 +0000 Subject: [PATCH] Accepting request 171368 from home:a_jaeger:FactoryFix Cleanup spec file, remove init support since package builds only for Factory OBS-URL: https://build.opensuse.org/request/show/171368 OBS-URL: https://build.opensuse.org/package/show/Base:System/hostapd?expand=0&rev=20 --- hostapd-tmp.diff | 2 +- hostapd.changes | 9 +++++ hostapd.init | 99 ------------------------------------------------ hostapd.spec | 39 +++++-------------- 4 files changed, 20 insertions(+), 129 deletions(-) delete mode 100644 hostapd.init diff --git a/hostapd-tmp.diff b/hostapd-tmp.diff index e4bee29..c296ab1 100644 --- a/hostapd-tmp.diff +++ b/hostapd-tmp.diff @@ -7,7 +7,7 @@ Index: hostapd-0.7.3/hostapd/hostapd.conf # Dump file for state information (on SIGUSR1) -dump_file=/tmp/hostapd.dump -+dump_file=/var/run/hostapd.dump ++dump_file=/run/hostapd.dump # Interface for separate control program. If this is specified, hostapd # will create this directory and a UNIX domain socket for listening to requests diff --git a/hostapd.changes b/hostapd.changes index 124d464..b17f4df 100644 --- a/hostapd.changes +++ b/hostapd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Apr 18 08:05:13 UTC 2013 - aj@suse.com + +- Do not package /etc/init.d +- Do not install init file since package contains a service file and + is only build for Factory +- Cleanup spec file +- Use /run instead of /var/run + ------------------------------------------------------------------- Wed Apr 17 16:14:02 UTC 2013 - cfarrell@suse.com diff --git a/hostapd.init b/hostapd.init deleted file mode 100644 index fc776df..0000000 --- a/hostapd.init +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/sh -# -# SUSE system startup script for hostapd -# Copyright (C) 1995--2005 Kurt Garloff, SUSE / Novell Inc. -# Copyright (C) 2011 SUSE Linux Products GmbH -# -# This library is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or (at -# your option) any later version. -# -# This library 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 -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, -# USA. -# -# /etc/init.d/hostapd -# and its symbolic link -# /usr/sbin/rchostapd -# -### BEGIN INIT INFO -# Provides: hostapd -# Required-Start: $syslog $remote_fs -# Required-Stop: $syslog $remote_fs -# Default-Start: 3 5 -# Default-Stop: 0 1 2 6 -# Short-Description: hostap deamon -# Description: IEEE 802.11 access point and authenticator -### END INIT INFO - -HOSTAPD_BIN=/usr/sbin/hostapd -HOSTAPD_PID=/var/run/hostapd.pid -HOSTAPD_ARGS="-B -P $HOSTAPD_PID" -HOSTAPD_CONF=/etc/hostapd.conf - -sysconf=/etc/sysconfig/hostapd -if [ -e $sysconf ]; then - . $sysconf -fi - -. /etc/rc.status - -rc_reset -case "$1" in - start) - echo -n "Starting hostapd " - /sbin/start_daemon -p $HOSTAPD_PID $HOSTAPD_BIN $HOSTAPD_ARGS $HOSTAPD_CONF - rc_status -v - ;; - stop) - echo -n "Shutting down hostapd " - /sbin/killproc $HOSTAPD_BIN - rc_status -v - ;; - try-restart|condrestart) - $0 status - if test $? = 0; then - $0 restart - else - rc_reset - fi - rc_status - ;; - restart) - $0 stop - $0 start - rc_status - ;; - force-reload) - echo -n "Reload service hostapd " - /sbin/killproc -HUP $HOSTAPD_BIN - touch $HOSTAPD_PID - rc_status -v - ;; - reload) - echo -n "Reload service hostapd " - /sbin/killproc -HUP $HOSTAPD_BIN - touch $HOSTAPD_PID - rc_status -v - ;; - status) - echo -n "Checking for service hostapd " - /sbin/checkproc $HOSTAPD_BIN - rc_status -v - ;; - probe) - test $HOSTAPD_CONF -nt $HOSTAPD_PID && echo reload - ;; - *) - echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" - exit 1 - ;; -esac -rc_exit diff --git a/hostapd.spec b/hostapd.spec index 0fa6268..b6ed42c 100644 --- a/hostapd.spec +++ b/hostapd.spec @@ -1,7 +1,7 @@ # # spec file for package hostapd # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 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 @@ -17,13 +17,9 @@ Name: hostapd -%if 0%{?suse_version} > 1140 BuildRequires: libnl-1_1-devel -%else -BuildRequires: libnl-devel -%endif -BuildRequires: sqlite3-devel BuildRequires: openssl-devel +BuildRequires: sqlite3-devel BuildRequires: pkgconfig(systemd) Summary: Turns Your WLAN Card into a WPA capable Access Point License: GPL-2.0 or BSD-3-Clause @@ -32,11 +28,9 @@ Version: 2.0 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Url: http://hostap.epitest.fi/ -PreReq: %insserv_prereq Source: http://hostap.epitest.fi/releases/hostapd-%{version}.tar.gz -Source1: hostapd.init -Source2: hostapd.service -Patch: hostapd.diff +Source1: hostapd.service +Patch0: hostapd.diff Patch1: hostapd-tmp.diff %{?systemd_requires} @@ -49,14 +43,9 @@ madwifi, and prism54 drivers. It also supports wired IEEE 802.1X authentication via any ethernet driver. - -Authors: --------- - Jouni Malinen - %prep -%setup -n hostapd-%{version} -%patch -p1 +%setup -q -n hostapd-%{version} +%patch0 -p1 %patch1 -p1 cd hostapd @@ -72,8 +61,7 @@ mkdir -p %{buildroot}/%{_sbindir} mkdir %{buildroot}/etc mkdir -p %{buildroot}/%{_mandir}/man8 install -m 755 hostapd %{buildroot}/%{_sbindir} -install -D -m 755 %{SOURCE1} %{buildroot}/etc/init.d/hostapd -ln -s /etc/init.d/hostapd %{buildroot}/%{_sbindir}/rchostapd +ln -s /usr/sbin/service %{buildroot}/%{_sbindir}/rchostapd install -m 755 hostapd_cli %{buildroot}/%{_sbindir} install -m 600 hostapd.conf %{buildroot}/etc install -m 644 hostapd.accept %{buildroot}/etc @@ -84,30 +72,23 @@ install -m 644 hostapd.sim_db %{buildroot}/etc install -m 644 hostapd.vlan %{buildroot}/etc install -m 600 hostapd.wpa_psk %{buildroot}/etc install -m 644 hostapd.8 %{buildroot}/%{_mandir}/man8 -install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/hostapd.service +install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/hostapd.service %pre %service_add_pre hostapd.service + %post %service_add_post hostapd.service -%insserv_cleanup %preun %service_del_preun hostapd.service -%{stop_on_removal hostapd} %postun %service_del_postun hostapd.service -%{restart_on_update hostapd} -%insserv_cleanup - -%clean -rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%config(noreplace) /etc/* -/etc/init.d/hostapd +%config(noreplace) /etc/hostapd.* %{_sbindir}/* %doc hostapd/ChangeLog COPYING hostapd/README hostapd/wired.conf hostapd/hostapd.conf %doc %{_mandir}/man8/*