From f783ca4d6b1f545cff1a27ee952026844ccbd36c Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Thu, 27 Aug 2009 20:14:26 +0000 Subject: [PATCH 01/46] Initial import 3proxy into Fedora --- .cvsignore | 1 + 3proxy.cfg | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3proxy.init | 87 +++++++++++++++++++++++++ 3proxy.spec | 142 +++++++++++++++++++++++++++++++++++++++++ import.log | 1 + sources | 1 + 6 files changed, 410 insertions(+) create mode 100644 3proxy.cfg create mode 100644 3proxy.init create mode 100644 3proxy.spec create mode 100644 import.log diff --git a/.cvsignore b/.cvsignore index e69de29..e7857b0 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +3proxy-0.6.tgz diff --git a/3proxy.cfg b/3proxy.cfg new file mode 100644 index 0000000..8212546 --- /dev/null +++ b/3proxy.cfg @@ -0,0 +1,178 @@ +# Yes, 3proxy.cfg can be executable, in this case you should place +# something like +#config /usr/local/3proxy/3proxy.cfg +# to show which configuration 3proxy should re-read on realod. + +#system "echo Hello world!" +# you may use system to execute some external command if proxy starts + +# We can configure nservers to avoid unsafe gethostbyname() usage +#nserver 10.1.2.1 +#nserver 10.2.2.2 +# nscache is good to save speed, traffic and bandwidth +nscache 65536 + +#nsrecord porno.security.nnov.ru 0.0.0.0 +# nobody will be able to access porno.security.nnov.ru by the name. +#nsrecord wpad.security.nnov.ru www.security.nnov.ru +# wpad.security.nnov.ru will resolve to www.security.nnov.ru for +# clients + + +timeouts 1 5 30 60 180 1800 15 60 +# Here we can change timeout values + +users 3APA3A:CL:3apa3a "test:CR:$1$qwer$CHFTUFGqkjue9HyhcMHEe1" +# note that "" required, overvise $... is treated as include file name. +# $1$qwer$CHFTUFGqkjue9HyhcMHEe1 is 'test' in MD5 crypt format. +#users $/usr/local/etc/3proxy/passwd +# this example shows you how to include passwd file. For included files +# and are treated as field separators. + +daemon +# now we will not depend on any console (daemonize). daemon must be given +# before any significant command on *nix. + +#service +# service is required under NT if you want 3proxy to start as service + +#log /usr/local/etc/3proxy/logs/3proxy.log D +log /var/log/3proxy/3proxy.log +# log allows to specify log file location and rotation, D means logfile +# is created daily + +# in log file we want to have underscores instead of spaces +logformat "- +_L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T" +#logformat "L%d-%m-%Y %H:%M:%S %z %N.%p %E %U %C:%c %R:%r %O %I %h %T" +#logformat "Linsert into log (l_date, l_user, l_service, l_in, l_out, l_descr) values ('%d-%m-%Y %H:%M:%S', '%U', '%N', %I, %O, '%T')" + +archiver gz /bin/gzip %F +#archiver zip zip -m -qq %A %F +#archiver zip pkzipc -add -silent -move %A %F +#archiver rar rar a -df -inul %A %F +# if archiver specified log file will be compressed after closing. +# you should specify extension, path to archiver and command line, %A will be +# substituted with archive file name, %f - with original file name. +# Original file will not be removed, so archiver should care about it. + +rotate 30 +# We will keep last 30 log files + +auth iponly +#auth nbname +#auth strong +# auth specifies type of user authentication. If you specify none proxy +# will not do anything to check name of the user. If you specify +# nbname proxy will send NetBIOS name request packet to UDP/137 of +# client and parse request for NetBIOS name of messanger service. +# Strong means that proxy will check password. For strong authentication +# unknown user will not be allowed to use proxy regardless of ACL. +# If you do not want username to be checked but wanna ACL to work you should +# specify auth iponly. + + +#allow ADMINISTRATOR,root +#allow * 127.0.0.1,192.168.1.1 * * +#redirect 192.168.1.2 80 * * * 80 +#allow * 192.168.1.0/24 * 25,53,110,20-21,1024-65535 +# we will allow everything if username matches ADMINISTRATOR or root or +# client ip is 127.0.0.1 or 192.168.1.1. Overwise we will redirect any request +# to port 80 to our Web-server 192.168.0.2. +# We will allow any outgoing connections from network 192.168.1.0/24 to +# SMTP, POP3, FTP, DNS and unprivileged ports. +# Note, that redirect may also be used with proxy or portmapper. It will +# allow you to redirect requests to different ports or different server +# for different clients. + +# sharing access to internet + +#external 10.1.1.1 +external 0.0.0.0 +# external is address 3proxy uses for outgoing connections. 0.0.0.0 means any +# interface. Using 0.0.0.0 is not good because it allows to connect to 127.0.0.1 + +#internal 192.168.1.1 +internal 127.0.0.1 +# internal is address of interface proxy will listen for incoming requests +# 127.0.0.1 means only localhost will be able to use this proxy. This is +# address you should specify for clients as proxy IP. +# You MAY use 0.0.0.0 but you shouldn't, because it's a chance for you to +# have open proxy in your network in this case. + +auth none +# no authentication is requires + +dnspr + +# dnsproxy listens on UDP/53 to answer client's DNS requests. It requires +# nserver/nscache configuration. + + +#external $./external.ip +#internal $./internal.ip +# this is just an alternative form fo giving external and internal address +# allows you to read this addresses from files + +auth strong +# We want to protect internal interface +deny * * 127.0.0.1,192.168.1.1 +# and llow HTTP and HTTPS traffic. +allow * * * 80-88,8080-8088 HTTP +allow * * * 443,8443 HTTPS +proxy -n + +auth none +# pop3p will be used without any authentication. It's bad choice +# because it's possible to use pop3p to access any port +pop3p + +tcppm 25 mail.my.provider 25 +#udppm -s 53 ns.my.provider 53 +# we can portmap port TCP/25 to provider's SMTP server and UDP/53 +# to provider's DNS. +# Now we can use our proxy as SMTP and DNS server. +# -s switch for UDP means "single packet" service - instead of setting +# association for period of time association will only be set for 1 packet. +# It's very userfull for services like DNS but not for some massive services +# like multimedia streams or online games. + +auth strong +flush +allow 3APA3A,test +maxconn 20 +socks +# for socks we will use password authentication and different access control - +# we flush previously configured ACL list and create new one to allow users +# test and 3APA3A to connect from any location + + +auth strong +flush +internal 127.0.0.1 +allow 3APA3A 127.0.0.1 +maxconn 3 +admin +#only allow acces to admin interface for user 3APA3A from 127.0.0.1 address +#via 127.0.0.1 address. + +# map external 80 and 443 ports to internal Web server +# examples below show how to use 3proxy to publish Web server in internal +# network to Internet. We must switch internal and external addresses and +# flush any ACLs + +#auth none +#flush +#external $./internal.ip +#internal $./external.ip +#maxconn 300 +#tcppm 80 websrv 80 +#tcppm 443 websrv 443 + + +#chroot /usr/local/jail +#setgid 65535 +#setuid 65535 +# now we needn't any root rights. We can chroot and setgid/setuid. + + +###$Id: 3proxy.cfg,v 1.1 2009/08/27 20:14:25 hubbitus Exp $####### diff --git a/3proxy.init b/3proxy.init new file mode 100644 index 0000000..47948da --- /dev/null +++ b/3proxy.init @@ -0,0 +1,87 @@ +#!/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 +# pidfile: /var/run/3proxy.pid + +WITHOUT_RC_COMPAT=1 + +. /etc/init.d/functions + +### Default variables +prog=3proxy +CONFIG=/etc/3proxy.cfg +PROXY=/usr/bin/3proxy +RETVAL=0 +PIDFILE=/var/run/3proxy.pid +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 --pidfile "${PIDFILE}" "$PROXY" "$CONFIG" + RETVAL=$? + echo + [ $RETVAL = 0 ] && touch ${LOCKFILE} + return $RETVAL +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p "${PIDFILE}" -d 1 "$PROXY" + RETVAL=$? + echo + [ $RETVAL = 0 ] && rm -f ${LOCKFILE} ${PIDFILE} + return $RETVAL +} + +restart() { + stop + start +} + +reload(){ + echo -n $"Reloading $prog: " + killproc -p ${pidfile} $httpd -USR1 + RETVAL=$? + echo +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + reload + ;; + condrestart) + [ -e $LOCKFILE ] && restart + RETVAL=$? + ;; + status) + status -p "$PIDFILE" "$PROXY" + RETVAL=$? + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|status}" + RETVAL=1 + ;; +esac + +exit $RETVAL diff --git a/3proxy.spec b/3proxy.spec new file mode 100644 index 0000000..a902b18 --- /dev/null +++ b/3proxy.spec @@ -0,0 +1,142 @@ +Name: 3proxy +Version: 0.6 +Release: 3%{?dist} + +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 + +Source0: http://3proxy.ru/%{version}/%{name}-%{version}.tgz +Source1: 3proxy.init +Source2: 3proxy.cfg +# EPEL still require it +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: dos2unix + +%description +3proxy -- light proxy server. +Universal proxy server with HTTP, HTTPS, SOCKS v4, SOCKS v4a, SOCKS v5, FTP, +POP3, UDP and TCP portmapping, access control, bandwith control, traffic +limitation and accounting based on username, client IP, target IP, day time, +day of week, etc. + +%description -l ru +3proxy -- маленький прокси сервер. +Это универсальное решение поддерживающее HTTP, HTTPS, SOCKS v4, SOCKS v4a, +SOCKS v5, FTP, POP3, UDP и TCP проброс портов (portmapping), списки доступа +управление скоростью доступа, ограничением трафика и статистикоу, базирующейся +на имени пользователя, слиентском IP адресе, IP цели, времени дня, дня недели +и т.д. + +%prep +%setup -q + +# To use "fedora" CFLAGS (exported) +sed -i -e "s/CFLAGS =/CFLAGS +=/" Makefile.Linux + +dos2unix Changelog + +%build +%{__make} -f Makefile.Linux + +%install +rm -rf %{buildroot} + +mkdir -p %{buildroot}%{_sysconfdir} +mkdir -p %{buildroot}%{_sysconfdir} +mkdir -p %{buildroot}%{_man3dir} +mkdir -p %{buildroot}%{_man8dir} +mkdir -p %{buildroot}%{_localstatedir}/log/%{name} +install -m755 -D src/3proxy %{buildroot}%{_bindir}/3proxy +install -m755 -D src/dighosts %{buildroot}%{_bindir}/dighosts +install -m755 -D src/ftppr %{buildroot}%{_bindir}/ftppr +install -m755 -D src/mycrypt %{buildroot}%{_bindir}/mycrypt +install -m755 -D src/pop3p %{buildroot}%{_bindir}/pop3p +install -m755 -D src/3proxy %{buildroot}%{_bindir}/3proxy +install -m755 -D src/proxy %{buildroot}%{_bindir}/htproxy +install -m755 -D src/socks %{buildroot}%{_bindir}/socks +install -m755 -D src/tcppm %{buildroot}%{_bindir}/tcppm +install -m755 -D src/udppm %{buildroot}%{_bindir}/udppm + +install -pD -m755 %{SOURCE1} %{buildroot}/%{_initrddir}/%{name} +install -pD -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}.cfg + +%clean +rm -rf %{buildroot} + +%post +# Register service +/sbin/chkconfig --add %{name} + +%preun +if [ $1 = 0 ]; then + /sbin/service %{name} stop > /dev/null 2>&1 + /sbin/chkconfig --del %{name} +fi + +%files +%defattr(-,root,root,-) +%{_bindir}/* +%config(noreplace) %{_sysconfdir}/%{name}.cfg +%{_initrddir}/%{name} +%{_localstatedir}/log/%{name} +%doc Readme Changelog authors copying news + +%changelog +* Thu Aug 20 2009 Pavel Alexeev - 0.6-3 +- Fedora Review started - thank you Peter Lemenkov. +- Change rights (0755->0644) of config. +- Disable service by default. +- Add BR dos2unix. + +* Mon Aug 17 2009 Pavel Alexeev - 0.6-2 +- /usr/bin/proxy renamed to htproxy to avoid name bump with libproxy-bin. +- Add Source2: 3proxy.cfg from Alt Linux (slightly modified) - http://sisyphus.ru/ru/srpm/Sisyphus/3proxy/sources/1 (thanks to Afanasov Dmitry). +- Add log-dir %%{_localstatedir}/log/%%{name} + +* Mon Aug 17 2009 Pavel Alexeev - 0.6-1 +- Ressurect old spec. New version 0.6. +- Rename spec to classic %%{name}.spec. +- Remove Hu part from release and add %%{?dist}. +- Change summary, description, URL. Add Russian localisation of sumamry and description. +- Strip some old comments. +- Add to %%doc Readme Changelog authors copying news. +- Turn macros usage from %%name to %%{name} for consistence. +- Change group from System/Servers to standard System Environment/Daemons. +- Add %%defattr(-,root,root,-) in %%files section. +- Add cleanup in %%install section. +- Add %%clean section with cleanup buildroot. +- License changed from just GPL to "BSD or ASL 2.0 or GPLv2+ or LGPLv2+" (according to Makefile.Linux) +- Add %%config(noreplace) mark to all configs. +- Add file %%{_initdir}/%%{name} +- Old %%{_initdir} macros replaced by %%{_initrddir} +- Hack makefile to use system CFLAGS. +- Add %%post/%%postun sections. + +* Fri Jan 25 2008 Pavel Alexeev - 0.5.3k +- Import from ftp://ftp.nluug.nl/pub/os/Linux/distr/altlinux/4.0/Server/4.0.1/files/SRPMS/3proxy-0.5.3h-alt1.src.rpm + Combine with ftp://ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/t/th/three-proxy/3proxy-0.5.3g-1.src.rpm +- Steep to version 0.5.3k +- Comment out packager +- Reformat header of spec with tabs +- Add desc from second src.rpm of import +- Correct source0 +- Add -c key fo %%setup macro +- Add BuildRoot definition (this is not ALT) +- Change + Release: alt1 + to + Release: 0.Hu.0 + +* Fri Apr 13 2007 Lunar Child 0.5.3h-alt1 +- new version + +* Wed Mar 21 2007 Lunar Child 0.5.3g-alt2 +- Added init script. +- Added new trivial config file. + +* Tue Mar 20 2007 Lunar Child 0.5.3g-alt1 +- First build for ALT Linux Sisyphus diff --git a/import.log b/import.log new file mode 100644 index 0000000..6fff697 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +proxy-0_6-3_fc11:HEAD:3proxy-0.6-3.fc11.src.rpm:1251404030 diff --git a/sources b/sources index e69de29..dd62cf4 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +2ebd9c06939021f6c2aca31d67782f71 3proxy-0.6.tgz From 0ae3d34fc0a58cb249ba3177048128000356c68e Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Mon, 9 Nov 2009 11:03:44 +0000 Subject: [PATCH 02/46] - Fix BZ#533144: - Add reload section to service file, fix stop. - Add %%{_sysconfdir}/NetworkManager/dispatcher.d/40-%%{name} (Thanks to Pankaj Pandey) - Include man-files. - Add Requires: initscripts as owner directory %%{_sysconfdir}/NetworkManager/dispatcher.d/ --- .cvsignore | 2 +- 3proxy.init | 16 +++++++--------- 3proxy.spec | 30 ++++++++++++++++++++++++++---- sources | 2 +- 4 files changed, 35 insertions(+), 15 deletions(-) diff --git a/.cvsignore b/.cvsignore index e7857b0..b306019 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -3proxy-0.6.tgz +3proxy.init diff --git a/3proxy.init b/3proxy.init index 47948da..556ee54 100644 --- a/3proxy.init +++ b/3proxy.init @@ -11,7 +11,6 @@ # # processname: 3proxy # config: /etc/3proxy.cfg -# pidfile: /var/run/3proxy.pid WITHOUT_RC_COMPAT=1 @@ -22,26 +21,25 @@ prog=3proxy CONFIG=/etc/3proxy.cfg PROXY=/usr/bin/3proxy RETVAL=0 -PIDFILE=/var/run/3proxy.pid 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 --pidfile "${PIDFILE}" "$PROXY" "$CONFIG" + daemon "$PROXY" "$CONFIG" RETVAL=$? echo - [ $RETVAL = 0 ] && touch ${LOCKFILE} + [ 0 -eq $RETVAL ] && touch ${LOCKFILE} return $RETVAL } stop() { echo -n $"Stopping $prog: " - killproc -p "${PIDFILE}" -d 1 "$PROXY" + killproc -d 3 "$prog" RETVAL=$? echo - [ $RETVAL = 0 ] && rm -f ${LOCKFILE} ${PIDFILE} + [ 0 -eq $RETVAL ] && rm -f ${LOCKFILE} return $RETVAL } @@ -52,7 +50,7 @@ restart() { reload(){ echo -n $"Reloading $prog: " - killproc -p ${pidfile} $httpd -USR1 + killproc $prog -USR1 RETVAL=$? echo } @@ -75,11 +73,11 @@ case "$1" in RETVAL=$? ;; status) - status -p "$PIDFILE" "$PROXY" + status "$PROXY" RETVAL=$? ;; *) - echo $"Usage: $0 {start|stop|restart|condrestart|status}" + echo $"Usage: $0 {start|stop|restart|condrestart|status|reload}" RETVAL=1 ;; esac diff --git a/3proxy.spec b/3proxy.spec index a902b18..763ad40 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -1,6 +1,6 @@ Name: 3proxy Version: 0.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -15,6 +15,7 @@ Source2: 3proxy.cfg # EPEL still require it BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: dos2unix +Requires: initscripts %description 3proxy -- light proxy server. @@ -46,9 +47,8 @@ dos2unix Changelog rm -rf %{buildroot} mkdir -p %{buildroot}%{_sysconfdir} -mkdir -p %{buildroot}%{_sysconfdir} -mkdir -p %{buildroot}%{_man3dir} -mkdir -p %{buildroot}%{_man8dir} +mkdir -p %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/ +mkdir -p %{buildroot}%{_mandir}/man8 mkdir -p %{buildroot}%{_localstatedir}/log/%{name} install -m755 -D src/3proxy %{buildroot}%{_bindir}/3proxy install -m755 -D src/dighosts %{buildroot}%{_bindir}/dighosts @@ -64,6 +64,19 @@ install -m755 -D src/udppm %{buildroot}%{_bindir}/udppm install -pD -m755 %{SOURCE1} %{buildroot}/%{_initrddir}/%{name} install -pD -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}.cfg + for man in man/*.8 ; do + gzip -9c "$man" > "%{buildroot}%{_mandir}/man8/$( basename $man ).gz" + touch --reference "$man" "%{buildroot}%{_mandir}/man8/$( basename $man ).gz" + done + +cat > %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/40-%{name} < - 0.6-4 +- Fix BZ#533144: +- Add reload section to service file, fix stop. +- Add %%{_sysconfdir}/NetworkManager/dispatcher.d/40-%%{name} (Thanks to Pankaj Pandey) +- Include man-files. +- Add Requires: initscripts as owner directory %%{_sysconfdir}/NetworkManager/dispatcher.d/ + * Thu Aug 20 2009 Pavel Alexeev - 0.6-3 - Fedora Review started - thank you Peter Lemenkov. - Change rights (0755->0644) of config. diff --git a/sources b/sources index dd62cf4..a7f80ff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2ebd9c06939021f6c2aca31d67782f71 3proxy-0.6.tgz +5b15eaeb993ca0b048a5bc0f2b53465b 3proxy.init From 99db3b8451b707d9f2c211d5871d019bb0484a65 Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Mon, 9 Nov 2009 11:16:39 +0000 Subject: [PATCH 03/46] All souces, but not one by mistake. --- .cvsignore | 2 ++ sources | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.cvsignore b/.cvsignore index b306019..d0cd666 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,3 @@ 3proxy.init +3proxy.cfg +3proxy-0.6.tgz diff --git a/sources b/sources index a7f80ff..335c409 100644 --- a/sources +++ b/sources @@ -1 +1,3 @@ 5b15eaeb993ca0b048a5bc0f2b53465b 3proxy.init +d9a0d2959ed2d5511ea59c563d34b692 3proxy.cfg +2ebd9c06939021f6c2aca31d67782f71 3proxy-0.6.tgz From 8407b3ad61ba1ed6d8a9ef44b73234194137b163 Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Mon, 9 Nov 2009 12:10:27 +0000 Subject: [PATCH 04/46] - Fix BZ#533144: - Add reload section to service file, fix stop. - Add %%{_sysconfdir}/NetworkManager/dispatcher.d/40-%%{name} (Thanks to Pankaj Pandey) - Include man-files. - Add Requires: initscripts as owner directory %%{_sysconfdir}/NetworkManager/dispatcher.d/ --- 3proxy.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3proxy.spec b/3proxy.spec index 763ad40..5c41b07 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -1,6 +1,6 @@ Name: 3proxy Version: 0.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -101,7 +101,7 @@ fi %{_mandir}/man8/*.8.gz %changelog -* Sun Nov 8 2009 Pavel Alexeev - 0.6-4 +* Sun Nov 8 2009 Pavel Alexeev - 0.6-5 - Fix BZ#533144: - Add reload section to service file, fix stop. - Add %%{_sysconfdir}/NetworkManager/dispatcher.d/40-%%{name} (Thanks to Pankaj Pandey) From b163d3d2922f15c7ca08ecd1e14d38c4f81510ee Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Tue, 24 Nov 2009 23:24:56 +0000 Subject: [PATCH 05/46] - Forgot commit new init-script for Fix BZ#533144. --- .cvsignore | 4 ++-- 3proxy.init | 19 ++++++++++--------- 3proxy.spec | 5 ++++- sources | 4 ++-- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.cvsignore b/.cvsignore index d0cd666..6e2ffc7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,3 @@ -3proxy.init -3proxy.cfg 3proxy-0.6.tgz +3proxy.cfg +3proxy.init diff --git a/3proxy.init b/3proxy.init index 556ee54..869dde5 100644 --- a/3proxy.init +++ b/3proxy.init @@ -4,13 +4,14 @@ # # Written by Dag Wieers . # Rewrote for ALT Linux by Pavlov Konstantin -# Modifyed for Fedora by Pavel Alexeev aka Pahan-Hubbitus +# Modified for Fedora by Pavel Alexeev aka Pahan-Hubbitus # # chkconfig: - 02 98 # description: 3proxy Proxy Server # # processname: 3proxy # config: /etc/3proxy.cfg +# pidfile: /var/run/3proxy.pid WITHOUT_RC_COMPAT=1 @@ -21,25 +22,25 @@ prog=3proxy CONFIG=/etc/3proxy.cfg PROXY=/usr/bin/3proxy RETVAL=0 +PIDFILE=/var/run/3proxy.pid 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" + daemon --pidfile "${PIDFILE}" "$PROXY" "$CONFIG" RETVAL=$? echo - [ 0 -eq $RETVAL ] && touch ${LOCKFILE} + [ $RETVAL = 0 ] && touch ${LOCKFILE} return $RETVAL } stop() { echo -n $"Stopping $prog: " - killproc -d 3 "$prog" + killproc -p "${PIDFILE}" -d 1 "$PROXY" RETVAL=$? echo - [ 0 -eq $RETVAL ] && rm -f ${LOCKFILE} + [ $RETVAL = 0 ] && rm -f ${LOCKFILE} ${PIDFILE} return $RETVAL } @@ -50,7 +51,7 @@ restart() { reload(){ echo -n $"Reloading $prog: " - killproc $prog -USR1 + killproc -p ${pidfile} $httpd -USR1 RETVAL=$? echo } @@ -73,11 +74,11 @@ case "$1" in RETVAL=$? ;; status) - status "$PROXY" + status -p "$PIDFILE" "$PROXY" RETVAL=$? ;; *) - echo $"Usage: $0 {start|stop|restart|condrestart|status|reload}" + echo $"Usage: $0 {start|stop|restart|condrestart|status}" RETVAL=1 ;; esac diff --git a/3proxy.spec b/3proxy.spec index 5c41b07..993c896 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -1,6 +1,6 @@ Name: 3proxy Version: 0.6 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -101,6 +101,9 @@ fi %{_mandir}/man8/*.8.gz %changelog +* Wed Nov 25 2009 Pavel Alexeev - 0.6-6 +- Forgot commit new init-script for Fix BZ#533144. + * Sun Nov 8 2009 Pavel Alexeev - 0.6-5 - Fix BZ#533144: - Add reload section to service file, fix stop. diff --git a/sources b/sources index 335c409..db96c92 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -5b15eaeb993ca0b048a5bc0f2b53465b 3proxy.init -d9a0d2959ed2d5511ea59c563d34b692 3proxy.cfg 2ebd9c06939021f6c2aca31d67782f71 3proxy-0.6.tgz +d9a0d2959ed2d5511ea59c563d34b692 3proxy.cfg +9aff12ce0d7dfc69ac7b4794a7747ae0 3proxy.init From 14ac9890d282462e233e5fd7a5c4692df39d1181 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:37:55 +0000 Subject: [PATCH 06/46] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d1e1256..543adab 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: 3proxy -# $Id$ +# $Id: Makefile,v 1.1 2009/08/26 22:17:25 kevin Exp $ NAME := 3proxy SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 40f31a65f9b4540ec4353da4c0de8b03f69f4d64 Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Sat, 28 Nov 2009 14:07:53 +0000 Subject: [PATCH 07/46] - Again new init-script for Fix BZ#533144 :). --- 3proxy.init | 19 +++++++++---------- 3proxy.spec | 5 ++++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/3proxy.init b/3proxy.init index 869dde5..556ee54 100644 --- a/3proxy.init +++ b/3proxy.init @@ -4,14 +4,13 @@ # # Written by Dag Wieers . # Rewrote for ALT Linux by Pavlov Konstantin -# Modified for Fedora by Pavel Alexeev aka Pahan-Hubbitus +# Modifyed for Fedora by Pavel Alexeev aka Pahan-Hubbitus # # chkconfig: - 02 98 # description: 3proxy Proxy Server # # processname: 3proxy # config: /etc/3proxy.cfg -# pidfile: /var/run/3proxy.pid WITHOUT_RC_COMPAT=1 @@ -22,25 +21,25 @@ prog=3proxy CONFIG=/etc/3proxy.cfg PROXY=/usr/bin/3proxy RETVAL=0 -PIDFILE=/var/run/3proxy.pid LOCKFILE=/var/lock/subsys/3proxy #LOGFILE=/var/log/3proxy.log start() { echo -n $"Starting $prog: " - daemon --pidfile "${PIDFILE}" "$PROXY" "$CONFIG" + # daemon --pidfile "${PIDFILE}" sh -c "exec \"$PROXY\" \"$CONFIG\" 2>&1 > \"$LOGFILE\" &" + daemon "$PROXY" "$CONFIG" RETVAL=$? echo - [ $RETVAL = 0 ] && touch ${LOCKFILE} + [ 0 -eq $RETVAL ] && touch ${LOCKFILE} return $RETVAL } stop() { echo -n $"Stopping $prog: " - killproc -p "${PIDFILE}" -d 1 "$PROXY" + killproc -d 3 "$prog" RETVAL=$? echo - [ $RETVAL = 0 ] && rm -f ${LOCKFILE} ${PIDFILE} + [ 0 -eq $RETVAL ] && rm -f ${LOCKFILE} return $RETVAL } @@ -51,7 +50,7 @@ restart() { reload(){ echo -n $"Reloading $prog: " - killproc -p ${pidfile} $httpd -USR1 + killproc $prog -USR1 RETVAL=$? echo } @@ -74,11 +73,11 @@ case "$1" in RETVAL=$? ;; status) - status -p "$PIDFILE" "$PROXY" + status "$PROXY" RETVAL=$? ;; *) - echo $"Usage: $0 {start|stop|restart|condrestart|status}" + echo $"Usage: $0 {start|stop|restart|condrestart|status|reload}" RETVAL=1 ;; esac diff --git a/3proxy.spec b/3proxy.spec index 993c896..6fee4ad 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -1,6 +1,6 @@ Name: 3proxy Version: 0.6 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -101,6 +101,9 @@ fi %{_mandir}/man8/*.8.gz %changelog +* Wed Nov 25 2009 Pavel Alexeev - 0.6-7 +- Again new init-script for Fix BZ#533144 :). + * Wed Nov 25 2009 Pavel Alexeev - 0.6-6 - Forgot commit new init-script for Fix BZ#533144. From c7b25b8d05ec8202a2dc60803d81b0bd185b1c4f Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Mon, 15 Mar 2010 11:38:55 +0000 Subject: [PATCH 08/46] - Update to version 0.6.1 - In NM event processing replace service restart to condrestart - BZ#572662 --- .cvsignore | 2 +- 3proxy.spec | 10 +++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 6e2ffc7..fa2cc0c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,3 @@ -3proxy-0.6.tgz 3proxy.cfg 3proxy.init +3proxy-0.6.1.tgz diff --git a/3proxy.spec b/3proxy.spec index 6fee4ad..d7fd40d 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -1,6 +1,6 @@ Name: 3proxy -Version: 0.6 -Release: 7%{?dist} +Version: 0.6.1 +Release: 8%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -73,7 +73,7 @@ cat > %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/40-%{name} < - 0.6.1-8 +- Update to version 0.6.1 +- In NM event processing replace service restart to condrestart - BZ#572662 + * Wed Nov 25 2009 Pavel Alexeev - 0.6-7 - Again new init-script for Fix BZ#533144 :). diff --git a/sources b/sources index db96c92..b2477f8 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -2ebd9c06939021f6c2aca31d67782f71 3proxy-0.6.tgz d9a0d2959ed2d5511ea59c563d34b692 3proxy.cfg -9aff12ce0d7dfc69ac7b4794a7747ae0 3proxy.init +5b15eaeb993ca0b048a5bc0f2b53465b 3proxy.init +03790467a12e16ed8785ae688ecf9b68 3proxy-0.6.1.tgz From 4460b1f8d0121c3c27be9d1c1cec418f7ae24e49 Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Sun, 30 May 2010 17:58:04 +0000 Subject: [PATCH 09/46] Correct path to config file in man (BUG#596087) add Patch0: 3proxy-0.6.1-config-path.patch --- .cvsignore | 4 +--- sources | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index fa2cc0c..ef3c88b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1 @@ -3proxy.cfg -3proxy.init -3proxy-0.6.1.tgz +3proxy-0.6.1-config-path.patch diff --git a/sources b/sources index b2477f8..887f550 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -d9a0d2959ed2d5511ea59c563d34b692 3proxy.cfg -5b15eaeb993ca0b048a5bc0f2b53465b 3proxy.init -03790467a12e16ed8785ae688ecf9b68 3proxy-0.6.1.tgz +b20790ea04b8cd8b366df9323416f604 3proxy-0.6.1-config-path.patch From cd8f98ab6c305205bdbbe4c4a9950c85071b2d4d Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Sun, 30 May 2010 18:18:12 +0000 Subject: [PATCH 10/46] Correct path to config file in man (BUG#596087) add Patch0: 3proxy-0.6.1-config-path.patch --- .cvsignore | 3 +++ 3proxy.spec | 10 +++++++++- sources | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.cvsignore b/.cvsignore index ef3c88b..08ff98a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,4 @@ +3proxy.init +3proxy.cfg +3proxy-0.6.1.tgz 3proxy-0.6.1-config-path.patch diff --git a/3proxy.spec b/3proxy.spec index d7fd40d..971b34c 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -1,6 +1,6 @@ Name: 3proxy Version: 0.6.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -17,6 +17,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: dos2unix Requires: initscripts +# I correct config path in man only. It is fully Fedora related. +Patch0: 3proxy-0.6.1-config-path.patch + %description 3proxy -- light proxy server. Universal proxy server with HTTP, HTTPS, SOCKS v4, SOCKS v4a, SOCKS v5, FTP, @@ -35,6 +38,8 @@ SOCKS v5, FTP, POP3, UDP и TCP проброс портов (portmapping), сп %prep %setup -q +%patch0 -p0 -b .man-cfg + # To use "fedora" CFLAGS (exported) sed -i -e "s/CFLAGS =/CFLAGS +=/" Makefile.Linux @@ -101,6 +106,9 @@ fi %{_mandir}/man8/*.8.gz %changelog +* Sun May 30 2010 Pavel Alexeev - 0.6.1-9 +- Correct path to config file in man (BUG#596087) add Patch0: 3proxy-0.6.1-config-path.patch + * Mon Mar 15 2010 Pavel Alexeev - 0.6.1-8 - Update to version 0.6.1 - In NM event processing replace service restart to condrestart - BZ#572662 diff --git a/sources b/sources index 887f550..5cf5eeb 100644 --- a/sources +++ b/sources @@ -1 +1,4 @@ +5b15eaeb993ca0b048a5bc0f2b53465b 3proxy.init +d9a0d2959ed2d5511ea59c563d34b692 3proxy.cfg +03790467a12e16ed8785ae688ecf9b68 3proxy-0.6.1.tgz b20790ea04b8cd8b366df9323416f604 3proxy-0.6.1-config-path.patch From 5970885433b1ab7ffc77e5cf906042670e8112d1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 08:45:04 +0000 Subject: [PATCH 11/46] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- import.log | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 543adab..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: 3proxy -# $Id: Makefile,v 1.1 2009/08/26 22:17:25 kevin Exp $ -NAME := 3proxy -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/import.log b/import.log deleted file mode 100644 index 6fff697..0000000 --- a/import.log +++ /dev/null @@ -1 +0,0 @@ -proxy-0_6-3_fc11:HEAD:3proxy-0.6-3.fc11.src.rpm:1251404030 From c5cc3de94b466824f302497981a84ec15b9db8af Mon Sep 17 00:00:00 2001 From: "Pavel Alexeev (aka Pahan-Hubbitus)" Date: Thu, 4 Nov 2010 18:07:18 +0300 Subject: [PATCH 12/46] - Add man3/3proxy.cfg.3 man (BZ#648204). - Gone explicit man gzip - leave it for rpm. --- 3proxy.cfg | 2 +- 3proxy.spec | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/3proxy.cfg b/3proxy.cfg index 8212546..1c038ac 100644 --- a/3proxy.cfg +++ b/3proxy.cfg @@ -175,4 +175,4 @@ admin # now we needn't any root rights. We can chroot and setgid/setuid. -###$Id: 3proxy.cfg,v 1.1 2009/08/27 20:14:25 hubbitus Exp $####### +###$Id: 3proxy.cfg.sample,v 1.5 2004/07/16 12:37:20 vlad Exp $####### diff --git a/3proxy.spec b/3proxy.spec index 971b34c..5849319 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -1,6 +1,6 @@ Name: 3proxy Version: 0.6.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -53,7 +53,7 @@ rm -rf %{buildroot} mkdir -p %{buildroot}%{_sysconfdir} mkdir -p %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/ -mkdir -p %{buildroot}%{_mandir}/man8 +mkdir -p %{buildroot}%{_mandir}/man{3,8} mkdir -p %{buildroot}%{_localstatedir}/log/%{name} install -m755 -D src/3proxy %{buildroot}%{_bindir}/3proxy install -m755 -D src/dighosts %{buildroot}%{_bindir}/dighosts @@ -69,9 +69,8 @@ install -m755 -D src/udppm %{buildroot}%{_bindir}/udppm install -pD -m755 %{SOURCE1} %{buildroot}/%{_initrddir}/%{name} install -pD -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}.cfg - for man in man/*.8 ; do - gzip -9c "$man" > "%{buildroot}%{_mandir}/man8/$( basename $man ).gz" - touch --reference "$man" "%{buildroot}%{_mandir}/man8/$( basename $man ).gz" + for man in man/*.{3,8} ; do + install "$man" "%{buildroot}%{_mandir}/man${man:(-1)}/" done cat > %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/40-%{name} < - 0.6.1-10 +- Add man3/3proxy.cfg.3 man (BZ#648204). +- Gone explicit man gzip - leave it for rpm. + * Sun May 30 2010 Pavel Alexeev - 0.6.1-9 - Correct path to config file in man (BUG#596087) add Patch0: 3proxy-0.6.1-config-path.patch From 3b525efc95620459fbe54cfbbc1d2db5c5833e0c Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 7 Feb 2011 16:55:24 -0600 Subject: [PATCH 13/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index 5849319..317f0f3 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -1,6 +1,6 @@ Name: 3proxy Version: 0.6.1 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -106,6 +106,9 @@ fi %{_mandir}/man3/*.3.gz %changelog +* Mon Feb 07 2011 Fedora Release Engineering - 0.6.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Thu Nov 4 2010 Pavel Alexeev - 0.6.1-10 - Add man3/3proxy.cfg.3 man (BZ#648204). - Gone explicit man gzip - leave it for rpm. From 6709efae05e77b742a8ca1b28151091deeee5c79 Mon Sep 17 00:00:00 2001 From: "Pavel Alexeev (aka Pahan-Hubbitus)" Date: Thu, 23 Jun 2011 16:52:49 +0400 Subject: [PATCH 14/46] Systemd migration bz#657412 --- 3proxy.spec | 79 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 66 insertions(+), 13 deletions(-) diff --git a/3proxy.spec b/3proxy.spec index 317f0f3..168f451 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -1,6 +1,9 @@ +# To build on Fedora 14 due to https://bugzilla.redhat.com/show_bug.cgi?id=715580 +#% global _unitdir /lib/systemd/system + Name: 3proxy Version: 0.6.1 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -12,6 +15,7 @@ Url: http://3proxy.ru/?l=EN Source0: http://3proxy.ru/%{version}/%{name}-%{version}.tgz Source1: 3proxy.init Source2: 3proxy.cfg +Source3: 3proxy.service # EPEL still require it BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: dos2unix @@ -20,21 +24,43 @@ 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-units +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units +Requires(triggerun): systemd-units +# 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 + + %description -3proxy -- light proxy server. +%{name} -- light proxy server. Universal proxy server with HTTP, HTTPS, SOCKS v4, SOCKS v4a, SOCKS v5, FTP, POP3, UDP and TCP portmapping, access control, bandwith control, traffic limitation and accounting based on username, client IP, target IP, day time, day of week, etc. %description -l ru -3proxy -- маленький прокси сервер. +%{name} -- маленький прокси сервер. Это универсальное решение поддерживающее HTTP, HTTPS, SOCKS v4, SOCKS v4a, SOCKS v5, FTP, POP3, UDP и TCP проброс портов (portmapping), списки доступа управление скоростью доступа, ограничением трафика и статистикоу, базирующейся на имени пользователя, слиентском IP адресе, IP цели, времени дня, дня недели и т.д. +%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. + %prep %setup -q @@ -55,12 +81,12 @@ mkdir -p %{buildroot}%{_sysconfdir} mkdir -p %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/ mkdir -p %{buildroot}%{_mandir}/man{3,8} mkdir -p %{buildroot}%{_localstatedir}/log/%{name} -install -m755 -D src/3proxy %{buildroot}%{_bindir}/3proxy +install -m755 -D src/%{name} %{buildroot}%{_bindir}/%{name} install -m755 -D src/dighosts %{buildroot}%{_bindir}/dighosts install -m755 -D src/ftppr %{buildroot}%{_bindir}/ftppr install -m755 -D src/mycrypt %{buildroot}%{_bindir}/mycrypt install -m755 -D src/pop3p %{buildroot}%{_bindir}/pop3p -install -m755 -D src/3proxy %{buildroot}%{_bindir}/3proxy +install -m755 -D src/%{name} %{buildroot}%{_bindir}/%{name} install -m755 -D src/proxy %{buildroot}%{_bindir}/htproxy install -m755 -D src/socks %{buildroot}%{_bindir}/socks install -m755 -D src/tcppm %{buildroot}%{_bindir}/tcppm @@ -68,6 +94,7 @@ install -m755 -D src/udppm %{buildroot}%{_bindir}/udppm 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 install "$man" "%{buildroot}%{_mandir}/man${man:(-1)}/" @@ -77,7 +104,7 @@ cat > %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/40-%{name} </dev/null 2>&1 || : + fi %preun -if [ $1 = 0 ]; then - /sbin/service %{name} stop > /dev/null 2>&1 - /sbin/chkconfig --del %{name} -fi + if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || : + /bin/systemctl stop %{name}.service > /dev/null 2>&1 || : + fi + +%postun +/bin/systemctl daemon-reload >/dev/null 2>&1 || : + if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : + fi + +%triggerun -- %{name} < 0.6.1-10 +# Save the current service runlevel info +# User must manually run systemd-sysv-convert --apply httpd +# to migrate them to systemd targets +%{_bindir}/systemd-sysv-convert --save %{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 %defattr(-,root,root,-) %{_bindir}/* %config(noreplace) %{_sysconfdir}/%{name}.cfg %attr(0755,root,root) %config %{_sysconfdir}/NetworkManager/dispatcher.d/40-%{name} -%{_initrddir}/%{name} %{_localstatedir}/log/%{name} %doc Readme Changelog authors copying news %{_mandir}/man8/*.8.gz %{_mandir}/man3/*.3.gz +%{_unitdir}/%{name}.service + +%files sysvinit +%{_initrddir}/%{name} %changelog +* Thu Jun 23 2011 Pavel Alexeev - 0.6.1-12 +- Make service systemd compliant (BZ#657412). + * Mon Feb 07 2011 Fedora Release Engineering - 0.6.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From d573d1ef2f0b14141401213fad6daa1f5f10428e Mon Sep 17 00:00:00 2001 From: "Pavel Alexeev (aka Pahan-Hubbitus)" Date: Thu, 23 Jun 2011 16:57:40 +0400 Subject: [PATCH 15/46] Systemd migration bz#657412 --- .gitignore | 1 + sources | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 08ff98a..f78a1df 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ 3proxy.cfg 3proxy-0.6.1.tgz 3proxy-0.6.1-config-path.patch +/3proxy.service diff --git a/sources b/sources index 5cf5eeb..3e0b804 100644 --- a/sources +++ b/sources @@ -2,3 +2,4 @@ d9a0d2959ed2d5511ea59c563d34b692 3proxy.cfg 03790467a12e16ed8785ae688ecf9b68 3proxy-0.6.1.tgz b20790ea04b8cd8b366df9323416f604 3proxy-0.6.1-config-path.patch +33eac06a0281ce63f0fa550956ef1777 3proxy.service From f9a8f15e5ce7308cf1fe9f4c4a69818c4e674c3e Mon Sep 17 00:00:00 2001 From: "Pavel Alexeev (aka Pahan-Hubbitus)" Date: Thu, 23 Jun 2011 17:05:46 +0400 Subject: [PATCH 16/46] Systemd migration bz#657412 --- 3proxy.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/3proxy.spec b/3proxy.spec index 168f451..9e4c62b 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -31,11 +31,10 @@ BuildRequires: systemd-units Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units -Requires(triggerun): systemd-units # 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 +Requires(post): systemd-sysv, systemd-units %description From 935ec42cb6ce6d0047376f92eb61a2ec80760b52 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 12 Jan 2012 14:11:09 -0600 Subject: [PATCH 17/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index 9e4c62b..f972b66 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -3,7 +3,7 @@ Name: 3proxy Version: 0.6.1 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -155,6 +155,9 @@ rm -rf %{buildroot} %{_initrddir}/%{name} %changelog +* Thu Jan 12 2012 Fedora Release Engineering - 0.6.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Thu Jun 23 2011 Pavel Alexeev - 0.6.1-12 - Make service systemd compliant (BZ#657412). From 06e3b0c797b689a76a1d8af57938e496bdff50df Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 18 Jul 2012 07:42:08 -0500 Subject: [PATCH 18/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index f972b66..7448b1e 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -3,7 +3,7 @@ Name: 3proxy Version: 0.6.1 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -155,6 +155,9 @@ rm -rf %{buildroot} %{_initrddir}/%{name} %changelog +* Wed Jul 18 2012 Fedora Release Engineering - 0.6.1-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Thu Jan 12 2012 Fedora Release Engineering - 0.6.1-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From e9ebe42ba8eaea4acf32c65f1b1f66234f80b3bf Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 13 Feb 2013 08:42:15 -0600 Subject: [PATCH 19/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index 7448b1e..86e144d 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -3,7 +3,7 @@ Name: 3proxy Version: 0.6.1 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -155,6 +155,9 @@ rm -rf %{buildroot} %{_initrddir}/%{name} %changelog +* Wed Feb 13 2013 Fedora Release Engineering - 0.6.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Wed Jul 18 2012 Fedora Release Engineering - 0.6.1-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 806706befe9891a67d8c5c49717b299c3709f2f5 Mon Sep 17 00:00:00 2001 From: "Pavel Alexeev (aka Pahan-Hubbitus)" Date: Fri, 26 Apr 2013 22:17:48 +0400 Subject: [PATCH 20/46] Harden build - bz#955141 --- 3proxy.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index 86e144d..7465f5b 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -1,9 +1,11 @@ # To build on Fedora 14 due to https://bugzilla.redhat.com/show_bug.cgi?id=715580 #% global _unitdir /lib/systemd/system +%global _hardened_build 1 + Name: 3proxy Version: 0.6.1 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -155,6 +157,9 @@ rm -rf %{buildroot} %{_initrddir}/%{name} %changelog +* Fri Apr 26 2013 Pavel Alexeev - 0.6.1-16 +- Harden build - bz#955141 + * Wed Feb 13 2013 Fedora Release Engineering - 0.6.1-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From d28bf3c0ba2895866144c56e83c315fea7e2a549 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 2 Aug 2013 17:24:15 -0500 Subject: [PATCH 21/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index 7465f5b..d88dd39 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.6.1 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -157,6 +157,9 @@ rm -rf %{buildroot} %{_initrddir}/%{name} %changelog +* Fri Aug 02 2013 Fedora Release Engineering - 0.6.1-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Fri Apr 26 2013 Pavel Alexeev - 0.6.1-16 - Harden build - bz#955141 From bf1a26de7114f883b595c667b18f53c0e8f8428f Mon Sep 17 00:00:00 2001 From: "Pavel Alexeev (aka Pahan-Hubbitus)" Date: Tue, 7 Jan 2014 22:39:54 +0400 Subject: [PATCH 22/46] - Step to systemd macroses (#850383) --- 3proxy.spec | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/3proxy.spec b/3proxy.spec index 7465f5b..3fd7577 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.6.1 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -29,10 +29,10 @@ 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-units -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units +BuildRequires: systemd +Requires(post): 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. @@ -113,24 +113,13 @@ EOF rm -rf %{buildroot} %post - if [ $1 -eq 1 ]; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : - fi +%systemd_post %{name}.service %preun - if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || : - /bin/systemctl stop %{name}.service > /dev/null 2>&1 || : - fi +%systemd_preun %{name}.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : - if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : - fi +%systemd_postun_with_restart %{name}.service %triggerun -- %{name} < 0.6.1-10 # Save the current service runlevel info @@ -157,6 +146,9 @@ rm -rf %{buildroot} %{_initrddir}/%{name} %changelog +* Tue Jan 7 2014 Pavel Alexeev - 0.6.1-17 +- Step to systemd macroses (#850383) + * Fri Apr 26 2013 Pavel Alexeev - 0.6.1-16 - Harden build - bz#955141 From 154a02e3526c004d96086697257474a6e6e3eda1 Mon Sep 17 00:00:00 2001 From: Hubbitus Date: Tue, 8 Apr 2014 14:46:42 +0400 Subject: [PATCH 23/46] - Update to 0.7 version bz#1085256. - Add BR openssl-devel. --- .gitignore | 1 + 3proxy.spec | 10 +++++++--- sources | 6 +----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index f78a1df..15d3770 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ 3proxy-0.6.1.tgz 3proxy-0.6.1-config-path.patch /3proxy.service +/3proxy-0.7.tgz diff --git a/3proxy.spec b/3proxy.spec index 2ac7bd3..fa82fa5 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -4,8 +4,8 @@ %global _hardened_build 1 Name: 3proxy -Version: 0.6.1 -Release: 18%{?dist} +Version: 0.7 +Release: 1%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -20,7 +20,7 @@ Source2: 3proxy.cfg Source3: 3proxy.service # EPEL still require it BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: dos2unix +BuildRequires: dos2unix, openssl-devel Requires: initscripts # I correct config path in man only. It is fully Fedora related. @@ -146,6 +146,10 @@ rm -rf %{buildroot} %{_initrddir}/%{name} %changelog +* Tue Apr 8 2014 Pavel Alexeev - 0.7-1 +- Update to 0.7 version bz#1085256. +- Add BR openssl-devel. + * Tue Jan 7 2014 Pavel Alexeev - 0.6.1-18 - Step to systemd macroses (#850383) diff --git a/sources b/sources index 3e0b804..d33731c 100644 --- a/sources +++ b/sources @@ -1,5 +1 @@ -5b15eaeb993ca0b048a5bc0f2b53465b 3proxy.init -d9a0d2959ed2d5511ea59c563d34b692 3proxy.cfg -03790467a12e16ed8785ae688ecf9b68 3proxy-0.6.1.tgz -b20790ea04b8cd8b366df9323416f604 3proxy-0.6.1-config-path.patch -33eac06a0281ce63f0fa550956ef1777 3proxy.service +b2a7b643d3e3d348ce97ed094075fc53 3proxy-0.7.tgz From b3357f71e7aadfb493818813d04f1472946d52bb Mon Sep 17 00:00:00 2001 From: Hubbitus Date: Tue, 8 Apr 2014 15:28:31 +0400 Subject: [PATCH 24/46] Add 3proxy-0.6.1-config-path.patch under git control --- .gitignore | 1 - 3proxy-0.6.1-config-path.patch | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 3proxy-0.6.1-config-path.patch diff --git a/.gitignore b/.gitignore index 15d3770..2f056f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ 3proxy.init 3proxy.cfg 3proxy-0.6.1.tgz -3proxy-0.6.1-config-path.patch /3proxy.service /3proxy-0.7.tgz diff --git a/3proxy-0.6.1-config-path.patch b/3proxy-0.6.1-config-path.patch new file mode 100644 index 0000000..bae7071 --- /dev/null +++ b/3proxy-0.6.1-config-path.patch @@ -0,0 +1,20 @@ +--- man/3proxy.8.orig 2009-07-13 17:52:25.000000000 +0400 ++++ man/3proxy.8 2010-05-30 21:39:19.000000000 +0400 +@@ -84,7 +84,7 @@ + configuration from stdin. It makes it possible to use 3proxy.cfg file as + executable script just by setting +x mode and adding + .br +-#!/usr/local/3proxy/3proxy ++#!/etc/3proxy + .br + as a first line in 3proxy.cfg + .TP +@@ -133,7 +133,7 @@ + wget to automate this task. + .SH FILES + .TP +-.I "/usr/local/3proxy/3proxy.cfg (3proxy.cfg)" ++.I "/etc/3proxy.cfg (3proxy.cfg)" + .BR 3proxy + configuration file + .SH BUGS From d55915531d8dd43558ab42588869363934b78185 Mon Sep 17 00:00:00 2001 From: Hubbitus Date: Tue, 8 Apr 2014 15:40:46 +0400 Subject: [PATCH 25/46] Add 3proxy.service under git control (was in lookaside cache) --- .gitignore | 3 --- 3proxy.service | 10 ++++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 3proxy.service diff --git a/.gitignore b/.gitignore index 2f056f9..ce997c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,2 @@ -3proxy.init -3proxy.cfg 3proxy-0.6.1.tgz -/3proxy.service /3proxy-0.7.tgz diff --git a/3proxy.service b/3proxy.service new file mode 100644 index 0000000..ea10335 --- /dev/null +++ b/3proxy.service @@ -0,0 +1,10 @@ +[Unit] +Description=3proxy Proxy Server +After=syslog.target network.target + +[Service] +Type=forking +ExecStart=/usr/bin/3proxy /etc/3proxy.cfg + +[Install] +WantedBy=multi-user.target \ No newline at end of file From 35513e777565c4600762ea61431fa5624c2dd5ef Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 6 Jun 2014 17:19:00 -0500 Subject: [PATCH 26/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index fa82fa5..7299a09 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -146,6 +146,9 @@ rm -rf %{buildroot} %{_initrddir}/%{name} %changelog +* Fri Jun 06 2014 Fedora Release Engineering - 0.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Tue Apr 8 2014 Pavel Alexeev - 0.7-1 - Update to 0.7 version bz#1085256. - Add BR openssl-devel. From 53364ddeb6572b8fa60765c8af67c5ca3cfc30ce Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 15 Aug 2014 18:07:21 +0000 Subject: [PATCH 27/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index 7299a09..1371d8e 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -146,6 +146,9 @@ rm -rf %{buildroot} %{_initrddir}/%{name} %changelog +* Fri Aug 15 2014 Fedora Release Engineering - 0.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Fri Jun 06 2014 Fedora Release Engineering - 0.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 245eee6a51b1b77114e23835431a84d8bb6086d9 Mon Sep 17 00:00:00 2001 From: Hubbitus Date: Mon, 18 Aug 2014 15:53:58 +0400 Subject: [PATCH 28/46] Update to 0.7.7.1 - bz#1114274. --- .gitignore | 1 + 3proxy.spec | 13 ++++++++----- sources | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index ce997c5..7255983 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ 3proxy-0.6.1.tgz /3proxy-0.7.tgz +/3proxy-0.7.1.1.tgz diff --git a/3proxy.spec b/3proxy.spec index 1371d8e..7a46400 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -4,8 +4,8 @@ %global _hardened_build 1 Name: 3proxy -Version: 0.7 -Release: 3%{?dist} +Version: 0.7.1.1 +Release: 1%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -63,14 +63,14 @@ Legacy SysV initscripts for init mechanisms such as upstart which do not support the systemd unit file format. %prep -%setup -q +%setup -q -n %{name} %patch0 -p0 -b .man-cfg # To use "fedora" CFLAGS (exported) sed -i -e "s/CFLAGS =/CFLAGS +=/" Makefile.Linux -dos2unix Changelog +dos2unix -k Readme copying %build %{__make} -f Makefile.Linux @@ -137,7 +137,7 @@ rm -rf %{buildroot} %config(noreplace) %{_sysconfdir}/%{name}.cfg %attr(0755,root,root) %config %{_sysconfdir}/NetworkManager/dispatcher.d/40-%{name} %{_localstatedir}/log/%{name} -%doc Readme Changelog authors copying news +%doc Readme authors copying %{_mandir}/man8/*.8.gz %{_mandir}/man3/*.3.gz %{_unitdir}/%{name}.service @@ -146,6 +146,9 @@ rm -rf %{buildroot} %{_initrddir}/%{name} %changelog +* Mon Aug 18 2014 Pavel Alexeev - 0.7.7.1-1 +- Update to 0.7.7.1 - bz#1114274. + * Fri Aug 15 2014 Fedora Release Engineering - 0.7-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild diff --git a/sources b/sources index d33731c..2528a69 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b2a7b643d3e3d348ce97ed094075fc53 3proxy-0.7.tgz +cbc22bf28644c5f3092aa1d925de7d33 3proxy-0.7.1.1.tgz From de07e62230fd619d04a43f436a9a0e608e2364bb Mon Sep 17 00:00:00 2001 From: Hubbitus Date: Mon, 23 Feb 2015 16:43:42 +0300 Subject: [PATCH 29/46] - New upstream version 0.7.7.2 --- .gitignore | 1 + 3proxy.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7255983..a8dc828 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ 3proxy-0.6.1.tgz /3proxy-0.7.tgz /3proxy-0.7.1.1.tgz +/3proxy-0.7.1.2.tgz diff --git a/3proxy.spec b/3proxy.spec index 7a46400..4f3b6a9 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -4,7 +4,7 @@ %global _hardened_build 1 Name: 3proxy -Version: 0.7.1.1 +Version: 0.7.1.2 Release: 1%{?dist} Summary: Tiny but very powerful proxy @@ -146,6 +146,9 @@ rm -rf %{buildroot} %{_initrddir}/%{name} %changelog +* Mon Feb 23 2015 Pavel Alexeev - 0.7.7.2-1 +- New upstream version 0.7.7.2 + * Mon Aug 18 2014 Pavel Alexeev - 0.7.7.1-1 - Update to 0.7.7.1 - bz#1114274. diff --git a/sources b/sources index 2528a69..161f826 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cbc22bf28644c5f3092aa1d925de7d33 3proxy-0.7.1.1.tgz +79ee900e3bb94862d17baadd1c12e159 3proxy-0.7.1.2.tgz From 4f3a65bfc88c54c0cd216eda38cf363f08afa86d Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 5 Mar 2015 14:20:06 -0500 Subject: [PATCH 30/46] Drop sysvinit subpackage on F23+ --- 3proxy.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index 4f3b6a9..88e2937 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.7.1.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -54,6 +54,7 @@ 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 @@ -61,6 +62,7 @@ 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} @@ -93,7 +95,9 @@ install -m755 -D src/socks %{buildroot}%{_bindir}/socks install -m755 -D src/tcppm %{buildroot}%{_bindir}/tcppm install -m755 -D src/udppm %{buildroot}%{_bindir}/udppm +%if 0%{?fedora} < 23 install -pD -m755 %{SOURCE1} %{buildroot}/%{_initrddir}/%{name} +%endif install -pD -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}.cfg install -pD -m755 %{SOURCE3} %{buildroot}/%{_unitdir}/%{name}.service @@ -142,10 +146,15 @@ rm -rf %{buildroot} %{_mandir}/man3/*.3.gz %{_unitdir}/%{name}.service +%if 0%{?fedora} < 23 %files sysvinit %{_initrddir}/%{name} +%endif %changelog +* Thu Mar 05 2015 Adam Jackson 0.7.1.2-2 +- Drop sysvinit subpackage on F23+ + * Mon Feb 23 2015 Pavel Alexeev - 0.7.7.2-1 - New upstream version 0.7.7.2 From a264e67873f2948c53d2a38448bb091f5c0ce905 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 16 Jun 2015 22:39:27 +0000 Subject: [PATCH 31/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index 88e2937..ffb3fb4 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.7.1.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -152,6 +152,9 @@ rm -rf %{buildroot} %endif %changelog +* Tue Jun 16 2015 Fedora Release Engineering - 0.7.1.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Thu Mar 05 2015 Adam Jackson 0.7.1.2-2 - Drop sysvinit subpackage on F23+ From d77f15edd517a513bb327db2c92b3c193da71154 Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Sun, 24 Jan 2016 15:40:24 +0300 Subject: [PATCH 32/46] - Major upstream update - 0.8.2. Bz#1300097. - Tarballs now on github. --- .gitignore | 1 + 3proxy.spec | 21 +++++++++++++-------- sources | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index a8dc828..27b9136 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /3proxy-0.7.tgz /3proxy-0.7.1.1.tgz /3proxy-0.7.1.2.tgz +/3proxy-0.8.2.tar.gz diff --git a/3proxy.spec b/3proxy.spec index ffb3fb4..9f3a5be 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -4,8 +4,8 @@ %global _hardened_build 1 Name: 3proxy -Version: 0.7.1.2 -Release: 3%{?dist} +Version: 0.8.2 +Release: 1%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -14,13 +14,13 @@ License: BSD or ASL 2.0 or GPLv2+ or LGPLv2+ Group: System Environment/Daemons Url: http://3proxy.ru/?l=EN -Source0: http://3proxy.ru/%{version}/%{name}-%{version}.tgz +Source0: https://github.com/z3APA3A/%{name}/archive/%{name}-%{version}.tar.gz Source1: 3proxy.init Source2: 3proxy.cfg Source3: 3proxy.service # EPEL still require it BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: dos2unix, openssl-devel +BuildRequires: openssl-devel Requires: initscripts # I correct config path in man only. It is fully Fedora related. @@ -65,15 +65,13 @@ which do not support the systemd unit file format. %endif %prep -%setup -q -n %{name} +%setup -q -n %{name}-%{name}-%{version} %patch0 -p0 -b .man-cfg # To use "fedora" CFLAGS (exported) sed -i -e "s/CFLAGS =/CFLAGS +=/" Makefile.Linux -dos2unix -k Readme copying - %build %{__make} -f Makefile.Linux @@ -141,7 +139,7 @@ rm -rf %{buildroot} %config(noreplace) %{_sysconfdir}/%{name}.cfg %attr(0755,root,root) %config %{_sysconfdir}/NetworkManager/dispatcher.d/40-%{name} %{_localstatedir}/log/%{name} -%doc Readme authors copying +%doc README authors copying Release.notes %{_mandir}/man8/*.8.gz %{_mandir}/man3/*.3.gz %{_unitdir}/%{name}.service @@ -152,6 +150,13 @@ rm -rf %{buildroot} %endif %changelog +* Sat Jan 23 2016 Pavel Alexeev - 0.8.2-1 +- Major upstream update - 0.8.2. Bz#1300097. +- Tarballs now on github. + +* Fri Jan 01 2016 Pavel Alexeev - 0.7.1.3-1 +- New upstream release 0.7.1.3 - bz#1263482. + * Tue Jun 16 2015 Fedora Release Engineering - 0.7.1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 161f826..4c6e777 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -79ee900e3bb94862d17baadd1c12e159 3proxy-0.7.1.2.tgz +af34e4e8f47976bd34a1d0be043cf4bd 3proxy-0.8.2.tar.gz From 8b4515c599d3a1793d4a1f4fdeb393bea58b68af Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 3 Feb 2016 15:17:51 +0000 Subject: [PATCH 33/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index 9f3a5be..a06384e 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.8.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -150,6 +150,9 @@ rm -rf %{buildroot} %endif %changelog +* Wed Feb 03 2016 Fedora Release Engineering - 0.8.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Sat Jan 23 2016 Pavel Alexeev - 0.8.2-1 - Major upstream update - 0.8.2. Bz#1300097. - Tarballs now on github. From 4dd6b433b7ec43d9513a55c3dd4ad39ac46cc99f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 04:57:41 +0000 Subject: [PATCH 34/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index a06384e..89f8c4a 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.8.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -150,6 +150,9 @@ rm -rf %{buildroot} %endif %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 0.8.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Wed Feb 03 2016 Fedora Release Engineering - 0.8.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 2ecc7eaebb821e20f85625dda1b28fe73581ae2e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 01:37:30 +0000 Subject: [PATCH 35/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index 89f8c4a..fd76a2e 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.8.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -150,6 +150,9 @@ rm -rf %{buildroot} %endif %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 0.8.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Fri Feb 10 2017 Fedora Release Engineering - 0.8.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 18430fd493bdb22e4b6ee5be437b7c410fc95d94 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 2 Aug 2017 16:45:52 +0000 Subject: [PATCH 36/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index fd76a2e..07e61e8 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.8.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -150,6 +150,9 @@ rm -rf %{buildroot} %endif %changelog +* Wed Aug 02 2017 Fedora Release Engineering - 0.8.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 0.8.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 473bffe377565709bc5074fc9441d0d3e3d57947 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 00:21:50 +0000 Subject: [PATCH 37/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index 07e61e8..37b1a34 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.8.2 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -150,6 +150,9 @@ rm -rf %{buildroot} %endif %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 0.8.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Wed Aug 02 2017 Fedora Release Engineering - 0.8.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From ee6e7a7abdeab14fb37f89fb9ce491dc7f04c48e Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 13 Feb 2018 23:00:42 +0100 Subject: [PATCH 38/46] Remove BuildRoot definition None of currently supported distributions need that. It was needed last for EL5 which is EOL now Signed-off-by: Igor Gnatenko --- 3proxy.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index 37b1a34..7da4592 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -19,7 +19,6 @@ Source1: 3proxy.init Source2: 3proxy.cfg Source3: 3proxy.service # EPEL still require it -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: openssl-devel Requires: initscripts From 38cabcefbf5d5ec10c672bce4d8424fb6b96e47b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 14 Feb 2018 07:01:33 +0100 Subject: [PATCH 39/46] Remove %clean section None of currently supported distributions need that. Last one was EL5 which is EOL for a while. Signed-off-by: Igor Gnatenko --- 3proxy.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/3proxy.spec b/3proxy.spec index 7da4592..c90e2ad 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -110,9 +110,6 @@ cat > %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/40-%{name} < Date: Tue, 10 Jul 2018 00:05:25 -0500 Subject: [PATCH 40/46] Remove needless use of %defattr --- 3proxy.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index c90e2ad..6d8f84f 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -130,7 +130,6 @@ EOF /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : %files -%defattr(-,root,root,-) %{_bindir}/* %config(noreplace) %{_sysconfdir}/%{name}.cfg %attr(0755,root,root) %config %{_sysconfdir}/NetworkManager/dispatcher.d/40-%{name} From 5b05fc0babbd6e977a094f17e06e5d2c766ff6b4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 12 Jul 2018 18:52:56 +0000 Subject: [PATCH 41/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index 6d8f84f..b07a3d2 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.8.2 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -145,6 +145,9 @@ EOF %endif %changelog +* Thu Jul 12 2018 Fedora Release Engineering - 0.8.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Wed Feb 07 2018 Fedora Release Engineering - 0.8.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From c38fc308ef53099c123240e5fd2642c5cc2691cf Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 24 Jul 2018 16:01:17 +0200 Subject: [PATCH 42/46] Add missing BuildRequires on gcc make[1]: gcc: Command not found References: https://bugzilla.redhat.com/show_bug.cgi?id=1603250 Signed-off-by: Igor Gnatenko --- 3proxy.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/3proxy.spec b/3proxy.spec index b07a3d2..3fb7dee 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -19,6 +19,7 @@ Source1: 3proxy.init Source2: 3proxy.cfg Source3: 3proxy.service # EPEL still require it +BuildRequires: gcc BuildRequires: openssl-devel Requires: initscripts From a6246fe653bb68cf66f3af4994f9e029210f20a7 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 18 Nov 2018 21:36:57 +0000 Subject: [PATCH 43/46] Update to 0.8.12, retire long unused sysv init scripts --- .gitignore | 1 + 3proxy.init | 85 ----------------------------------------------------- 3proxy.spec | 83 +++++++++++++++------------------------------------ sources | 2 +- 4 files changed, 25 insertions(+), 146 deletions(-) delete mode 100644 3proxy.init 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 +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 From 33fc18a9c734e5e8140c1d345f0e1076b208dc40 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 31 Jan 2019 11:19:28 +0000 Subject: [PATCH 44/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index a181bdd..04a3064 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.8.12 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -105,6 +105,9 @@ done %{_unitdir}/%{name}.service %changelog +* Thu Jan 31 2019 Fedora Release Engineering - 0.8.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Sat Nov 17 2018 Peter Robinson 0.8.12-1 - Update 0.8.12 - Retire sysvinit From 76bd08dce0d3498cafcb12b83d691d2d33ac970e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jul 2019 15:36:47 +0000 Subject: [PATCH 45/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- 3proxy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3proxy.spec b/3proxy.spec index 04a3064..4e25a33 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.8.12 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -105,6 +105,9 @@ done %{_unitdir}/%{name}.service %changelog +* Wed Jul 24 2019 Fedora Release Engineering - 0.8.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Thu Jan 31 2019 Fedora Release Engineering - 0.8.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 9fc53cff99629bbc0d8d4ed94f70a79eae6c82cd Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Wed, 23 Oct 2019 00:13:54 +0300 Subject: [PATCH 46/46] 0.8.13-1: - Update to 0.8.13 version (bz#1742435). - Try build on epel8 (bz#1757824). - Completely remove SOURCE1 sysvinit legacy. - Reformat with spaces. --- .gitignore | 1 + 3proxy.spec | 49 ++++++++++++++++++++++++++----------------------- sources | 2 +- 3 files changed, 28 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 19d4502..27957a6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /3proxy-0.7.1.2.tgz /3proxy-0.8.2.tar.gz /3proxy-0.8.12.tar.gz +/3proxy-0.8.13.tar.gz diff --git a/3proxy.spec b/3proxy.spec index 4e25a33..afd63d0 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -3,34 +3,34 @@ %global _hardened_build 1 -Name: 3proxy -Version: 0.8.12 -Release: 3%{?dist} +Name: 3proxy +Version: 0.8.13 +Release: 1%{?dist} -Summary: Tiny but very powerful proxy -Summary(ru): Маленький, но крайне мощный прокси-сервер +Summary: Tiny but very powerful proxy +Summary(ru): Маленький, но крайне мощный прокси-сервер -License: BSD or ASL 2.0 or GPLv2+ or LGPLv2+ -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 -Source2: 3proxy.cfg -Source3: 3proxy.service -BuildRequires: gcc -BuildRequires: openssl-devel +Source0: https://github.com/z3APA3A/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source2: 3proxy.cfg +Source3: 3proxy.service +BuildRequires: gcc +BuildRequires: openssl-devel # I correct config path in man only. It is fully Fedora related. -Patch0: 3proxy-0.6.1-config-path.patch +Patch0: 3proxy-0.6.1-config-path.patch -BuildRequires: systemd -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +BuildRequires: systemd +Requires(post): 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 -Obsoletes: 3proxy-sysvinit < 0.8.12 +Requires(post): systemd +Obsoletes: 3proxy-sysvinit < 0.8.12 %description @@ -74,14 +74,11 @@ install -m755 -D src/socks %{buildroot}%{_bindir}/socks install -m755 -D src/tcppm %{buildroot}%{_bindir}/tcppm install -m755 -D src/udppm %{buildroot}%{_bindir}/udppm -%if 0%{?fedora} < 23 -install -pD -m755 %{SOURCE1} %{buildroot}/%{_initrddir}/%{name} -%endif install -pD -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}.cfg install -pD -m755 %{SOURCE3} %{buildroot}/%{_unitdir}/%{name}.service for man in man/*.{3,8} ; do - install "$man" "%{buildroot}%{_mandir}/man${man:(-1)}/" + install "$man" "%{buildroot}%{_mandir}/man${man:(-1)}/" done @@ -105,6 +102,12 @@ done %{_unitdir}/%{name}.service %changelog +* Tue Oct 22 2019 Pavel Alexeev - 0.8.13-1 +- Update to 0.8.13 version (bz#1742435). +- Try build on epel8 (bz#1757824). +- Completely remove SOURCE1 sysvinit legacy. +- Reformat with spaces. + * Wed Jul 24 2019 Fedora Release Engineering - 0.8.12-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 4e79563..16ff90b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (3proxy-0.8.12.tar.gz) = 33412e89991055598e06210dbcd7b2f9ee6810753c8f40ada02f222def0a49047a90ff7f2efa6895bc4f8ad99193866c980de2e79464310a77cc8e63c8b9813d +SHA512 (3proxy-0.8.13.tar.gz) = 94b4a2568917c1d720276e38050a13e144d3e92ff41edd02eeebac0a6c21e6a839a58ea7dcb3abc03370e0f18452c953cfd7ad15ebac87e66b78d94fa52fbd79