diff --git a/.gitignore b/.gitignore index 27b9136..19d4502 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /3proxy-0.7.1.1.tgz /3proxy-0.7.1.2.tgz /3proxy-0.8.2.tar.gz +/3proxy-0.8.12.tar.gz diff --git a/3proxy.init b/3proxy.init deleted file mode 100644 index 556ee54..0000000 --- a/3proxy.init +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh -# -# Init file for Software Watchdog daemon. -# -# Written by Dag Wieers . -# Rewrote for ALT Linux by Pavlov Konstantin -# Modifyed for Fedora by Pavel Alexeev aka Pahan-Hubbitus -# -# chkconfig: - 02 98 -# description: 3proxy Proxy Server -# -# processname: 3proxy -# config: /etc/3proxy.cfg - -WITHOUT_RC_COMPAT=1 - -. /etc/init.d/functions - -### Default variables -prog=3proxy -CONFIG=/etc/3proxy.cfg -PROXY=/usr/bin/3proxy -RETVAL=0 -LOCKFILE=/var/lock/subsys/3proxy -#LOGFILE=/var/log/3proxy.log - -start() { - echo -n $"Starting $prog: " - # daemon --pidfile "${PIDFILE}" sh -c "exec \"$PROXY\" \"$CONFIG\" 2>&1 > \"$LOGFILE\" &" - daemon "$PROXY" "$CONFIG" - RETVAL=$? - echo - [ 0 -eq $RETVAL ] && touch ${LOCKFILE} - return $RETVAL -} - -stop() { - echo -n $"Stopping $prog: " - killproc -d 3 "$prog" - RETVAL=$? - echo - [ 0 -eq $RETVAL ] && rm -f ${LOCKFILE} - return $RETVAL -} - -restart() { - stop - start -} - -reload(){ - echo -n $"Reloading $prog: " - killproc $prog -USR1 - RETVAL=$? - echo -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - reload - ;; - condrestart) - [ -e $LOCKFILE ] && restart - RETVAL=$? - ;; - status) - status "$PROXY" - RETVAL=$? - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|status|reload}" - RETVAL=1 - ;; -esac - -exit $RETVAL diff --git a/3proxy.spec b/3proxy.spec index 3fb7dee..a181bdd 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -4,39 +4,33 @@ %global _hardened_build 1 Name: 3proxy -Version: 0.8.2 -Release: 7%{?dist} +Version: 0.8.12 +Release: 1%{?dist} -Summary: Tiny but very powerful proxy +Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер -License: BSD or ASL 2.0 or GPLv2+ or LGPLv2+ -Group: System Environment/Daemons -Url: http://3proxy.ru/?l=EN +License: BSD or ASL 2.0 or GPLv2+ or LGPLv2+ +Url: http://3proxy.ru/?l=EN -Source0: https://github.com/z3APA3A/%{name}/archive/%{name}-%{version}.tar.gz -Source1: 3proxy.init -Source2: 3proxy.cfg -Source3: 3proxy.service -# EPEL still require it +Source0: https://github.com/z3APA3A/%{name}/archive/%{name}-%{version}.tar.gz +Source2: 3proxy.cfg +Source3: 3proxy.service BuildRequires: gcc BuildRequires: openssl-devel -Requires: initscripts # I correct config path in man only. It is fully Fedora related. Patch0: 3proxy-0.6.1-config-path.patch -# Systemd compliant: https://fedoraproject.org/wiki/Systemd_Packaging_Draft -# https://fedoraproject.org/wiki/Packaging:Systemd -# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd -BuildRequires: systemd +BuildRequires: systemd Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +Requires(preun): systemd +Requires(postun): systemd # This is actually needed for the %triggerun script but Requires(triggerun) # is not valid. We can use %post because this particular %triggerun script # should fire just after this package is installed. -Requires(post): systemd-sysv, systemd-units +Requires(post): systemd +Obsoletes: 3proxy-sysvinit < 0.8.12 %description @@ -54,30 +48,17 @@ SOCKS v5, FTP, POP3, UDP и TCP проброс портов (portmapping), сп� на имени пользователя, слиентском IP адресе, IP цели, времени дня, дня недели и т.д. -%if 0%{fedora} < 23 -%package sysvinit -Summary: Legacy SysV initscripts for %{name} server -Group: System Environment/Daemons - -%description sysvinit -Legacy SysV initscripts for init mechanisms such as upstart -which do not support the systemd unit file format. -%endif %prep -%setup -q -n %{name}-%{name}-%{version} - -%patch0 -p0 -b .man-cfg +%autosetup -p0 # To use "fedora" CFLAGS (exported) sed -i -e "s/CFLAGS =/CFLAGS +=/" Makefile.Linux %build -%{__make} -f Makefile.Linux +make -f Makefile.Linux %install -rm -rf %{buildroot} - mkdir -p %{buildroot}%{_sysconfdir} mkdir -p %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/ mkdir -p %{buildroot}%{_mandir}/man{3,8} @@ -99,17 +80,10 @@ install -pD -m755 %{SOURCE1} %{buildroot}/%{_initrddir}/%{name} install -pD -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}.cfg install -pD -m755 %{SOURCE3} %{buildroot}/%{_unitdir}/%{name}.service - for man in man/*.{3,8} ; do +for man in man/*.{3,8} ; do install "$man" "%{buildroot}%{_mandir}/man${man:(-1)}/" - done - -cat > %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/40-%{name} </dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del %{name} >/dev/null 2>&1 || : -/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : - %files +%license copying +%doc README authors Release.notes %{_bindir}/* %config(noreplace) %{_sysconfdir}/%{name}.cfg -%attr(0755,root,root) %config %{_sysconfdir}/NetworkManager/dispatcher.d/40-%{name} %{_localstatedir}/log/%{name} -%doc README authors copying Release.notes %{_mandir}/man8/*.8.gz %{_mandir}/man3/*.3.gz %{_unitdir}/%{name}.service -%if 0%{?fedora} < 23 -%files sysvinit -%{_initrddir}/%{name} -%endif - %changelog +* Sat Nov 17 2018 Peter Robinson 0.8.12-1 +- Update 0.8.12 +- Retire sysvinit + * Thu Jul 12 2018 Fedora Release Engineering - 0.8.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 4c6e777..4e79563 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -af34e4e8f47976bd34a1d0be043cf4bd 3proxy-0.8.2.tar.gz +SHA512 (3proxy-0.8.12.tar.gz) = 33412e89991055598e06210dbcd7b2f9ee6810753c8f40ada02f222def0a49047a90ff7f2efa6895bc4f8ad99193866c980de2e79464310a77cc8e63c8b9813d