代码拉取完成,页面将自动刷新
%global _hardened_build 1
%define tinyproxy_confdir %{_sysconfdir}/tinyproxy
%define tinyproxy_datadir %{_datadir}/tinyproxy
%define tinyproxy_rundir /run/tinyproxy
%define tinyproxy_logdir %{_localstatedir}/log/tinyproxy
%define tinyproxy_user tinyproxy
%define tinyproxy_group tinyproxy
Name: tinyproxy
Version: 1.11.1
Release: 2
Summary: A small, efficient HTTP/SSL proxy daemon
License: GPLv2+
URL: https://github.com/tinyproxy/
Source0: https://github.com/tinyproxy/tinyproxy/releases/download/%{version}/%{name}-%{version}.tar.xz
Source1: %{name}.service
Source2: %{name}.conf
Source3: %{name}.logrotate
Source4: %{name}.tmpfiles
Patch0001: backport-CVE-2022-40468.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: asciidoc
BuildRequires: systemd
%description
tinyproxy is a small, efficient HTTP/SSL proxy daemon that is very useful in a
small network setting, where a larger proxy like Squid would either be too
resource intensive, or a security risk.
%prep
%autosetup -p1
%build
%configure --sysconfdir=%{_sysconfdir} \
--enable-reverse \
--enable-transparent
make LDFLAGS="%{?__global_ldflags}" CFLAGS="-DNDEBUG $RPM_OPT_FLAGS" %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
%{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{tinyproxy_confdir}/%{name}.conf
%{__install} -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%{__install} -p -D -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
%{__install} -p -d -m 0700 %{buildroot}%{tinyproxy_rundir}
%{__install} -p -d -m 0700 %{buildroot}%{tinyproxy_logdir}
%pre
if [ $1 == 1 ]; then
%{_sbindir}/useradd -c "tinyproxy user" -s /bin/false -r -d %{tinyproxy_rundir} %{tinyproxy_user} 2>/dev/null || :
fi
%post
/bin/systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
%files
%doc AUTHORS COPYING README README.md NEWS docs/*.txt
%{_bindir}/%{name}
%{_mandir}/man8/%{name}.8.gz
%{_mandir}/man5/%{name}.conf.5.gz
%{_unitdir}/%{name}.service
%{_tmpfilesdir}/%{name}.conf
%{tinyproxy_datadir}
%dir %{tinyproxy_confdir}
%ghost %dir %{tinyproxy_rundir}
%dir %{tinyproxy_logdir}
%config(noreplace) %{tinyproxy_confdir}/%{name}.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%attr(0700,%{tinyproxy_user},%{tinyproxy_group}) %ghost %dir %{tinyproxy_rundir}
%attr(0700,%{tinyproxy_user},%{tinyproxy_group}) %dir %{tinyproxy_logdir}
%changelog
* Fri Sep 22 2023 leeffo <liweiganga@uniontech.com> - 1.11.1-2
- CVE-2022-40468
* Fri Sep 2 2022 Han Jinpeng <hanjinpeng@kylinos.cn> - 1.11.1-1
- Package init
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。