8 Star 0 Fork 5

src-openEuler/tinyproxy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
tinyproxy.spec 2.82 KB
一键复制 编辑 原始数据 按行查看 历史
Venland 提交于 2023-09-22 15:23 . fix CVE-2022-40468
%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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/tinyproxy.git
git@gitee.com:src-openeuler/tinyproxy.git
src-openeuler
tinyproxy
tinyproxy
master

搜索帮助