|
|
f07426 |
# PASST - Plug A Simple Socket Transport
|
|
|
f07426 |
# for qemu/UNIX domain socket mode
|
|
|
f07426 |
#
|
|
|
f07426 |
# PASTA - Pack A Subtle Tap Abstraction
|
|
|
f07426 |
# for network namespace/tap device mode
|
|
|
f07426 |
#
|
|
|
f07426 |
# Copyright (c) 2022 Red Hat GmbH
|
|
|
f07426 |
# Author: Stefano Brivio <sbrivio@redhat.com>
|
|
|
f07426 |
|
|
|
f07426 |
%global git_hash 4ddbcb9c0c555838b123c018a9ebc9b7e14a87e5
|
|
|
f07426 |
%global selinuxtype targeted
|
|
|
f07426 |
|
|
|
f07426 |
Name: passt
|
|
|
f07426 |
Version: 0^20230222.g4ddbcb9
|
|
|
f07426 |
Release: 2%{?dist}
|
|
|
f07426 |
Summary: User-mode networking daemons for virtual machines and namespaces
|
|
|
f07426 |
License: AGPLv3+ and BSD
|
|
|
f07426 |
Group: System Environment/Daemons
|
|
|
f07426 |
URL: https://passt.top/
|
|
|
f07426 |
Source: https://passt.top/passt/snapshot/passt-%{git_hash}.tar.xz
|
|
|
f07426 |
|
|
|
f07426 |
Patch1: 0001-udp-Actually-use-host-resolver-to-forward-DNS-querie.patch
|
|
|
f07426 |
Patch2: 0002-conf-Split-add_dns-4-6-out-of-get_dns.patch
|
|
|
f07426 |
Patch3: 0003-conf-udp-Allow-any-loopback-address-to-be-used-as-re.patch
|
|
|
f07426 |
Patch4: 0004-tcp-tcp_splice-Get-rid-of-false-positive-CWE-394-Cov.patch
|
|
|
f07426 |
Patch5: 0005-tcp-Avoid-false-but-convoluted-positive-Coverity-CWE.patch
|
|
|
f07426 |
Patch6: 0006-tcp-Avoid-theoretical-resource-leak-CWE-772-Coverity.patch
|
|
|
f07426 |
Patch7: 0007-Fix-definitions-of-SOCKET_MAX-TCP_MAX_CONNS.patch
|
|
|
f07426 |
Patch8: 0008-doc-demo-Fix-and-suppress-ShellCheck-warnings.patch
|
|
|
f07426 |
Patch9: 0009-contrib-selinux-Drop-duplicate-init_daemon_domain-ru.patch
|
|
|
f07426 |
Patch10: 0010-contrib-selinux-Let-passt-write-to-stdout-and-stderr.patch
|
|
|
f07426 |
Patch11: 0011-contrib-selinux-Allow-binding-and-connecting-to-all-.patch
|
|
|
f07426 |
Patch12: 0012-contrib-selinux-Let-interface-users-set-paths-for-lo.patch
|
|
|
f07426 |
Patch13: 0013-tcp-udp-util-Pass-socket-creation-errors-all-the-way.patch
|
|
|
f07426 |
Patch14: 0014-tcp-udp-Fix-partial-success-return-codes-in-tcp-udp-.patch
|
|
|
f07426 |
Patch15: 0015-conf-Terminate-on-EMFILE-or-ENFILE-on-sockets-for-po.patch
|
|
|
f07426 |
Patch16: 0016-tcp-Clamp-MSS-value-when-queueing-data-to-tap-also-f.patch
|
|
|
f07426 |
Patch17: 0017-contrib-selinux-Drop-example-from-headers-this-is-th.patch
|
|
|
f07426 |
Patch18: 0018-contrib-selinux-Drop-unused-passt_read_data-interfac.patch
|
|
|
f07426 |
Patch19: 0019-contrib-selinux-Split-interfaces-into-smaller-bits.patch
|
|
|
f07426 |
Patch20: 0020-fedora-Install-SELinux-interface-files-to-shared-inc.patch
|
|
|
f07426 |
|
|
|
f07426 |
BuildRequires: gcc, make, git, checkpolicy, selinux-policy-devel
|
|
|
f07426 |
Requires: (%{name}-selinux = %{version}-%{release} if selinux-policy-%{selinuxtype})
|
|
|
f07426 |
|
|
|
f07426 |
%description
|
|
|
f07426 |
passt implements a translation layer between a Layer-2 network interface and
|
|
|
f07426 |
native Layer-4 sockets (TCP, UDP, ICMP/ICMPv6 echo) on a host. It doesn't
|
|
|
f07426 |
require any capabilities or privileges, and it can be used as a simple
|
|
|
f07426 |
replacement for Slirp.
|
|
|
f07426 |
|
|
|
f07426 |
pasta (same binary as passt, different command) offers equivalent functionality,
|
|
|
f07426 |
for network namespaces: traffic is forwarded using a tap interface inside the
|
|
|
f07426 |
namespace, without the need to create further interfaces on the host, hence not
|
|
|
f07426 |
requiring any capabilities or privileges.
|
|
|
f07426 |
|
|
|
f07426 |
%package selinux
|
|
|
f07426 |
BuildArch: noarch
|
|
|
f07426 |
Summary: SELinux support for passt and pasta
|
|
|
f07426 |
Requires: %{name} = %{version}-%{release}
|
|
|
f07426 |
Requires: selinux-policy
|
|
|
f07426 |
Requires(post): %{name}
|
|
|
f07426 |
Requires(post): policycoreutils
|
|
|
f07426 |
Requires(preun): %{name}
|
|
|
f07426 |
Requires(preun): policycoreutils
|
|
|
f07426 |
|
|
|
f07426 |
%description selinux
|
|
|
f07426 |
This package adds SELinux enforcement to passt(1) and pasta(1).
|
|
|
f07426 |
|
|
|
f07426 |
%prep
|
|
|
f07426 |
%autosetup -S git_am -n passt-%{git_hash}
|
|
|
f07426 |
|
|
|
f07426 |
%build
|
|
|
f07426 |
%set_build_flags
|
|
|
f07426 |
%make_build VERSION="%{version}-%{release}.%{_arch}"
|
|
|
f07426 |
|
|
|
f07426 |
%install
|
|
|
f07426 |
%make_install DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_bindir} mandir=%{_mandir} docdir=%{_docdir}/%{name}
|
|
|
f07426 |
%ifarch x86_64
|
|
|
f07426 |
ln -sr %{buildroot}%{_mandir}/man1/passt.1 %{buildroot}%{_mandir}/man1/passt.avx2.1
|
|
|
f07426 |
ln -sr %{buildroot}%{_mandir}/man1/pasta.1 %{buildroot}%{_mandir}/man1/pasta.avx2.1
|
|
|
f07426 |
%endif
|
|
|
f07426 |
|
|
|
f07426 |
pushd contrib/selinux
|
|
|
f07426 |
make -f %{_datadir}/selinux/devel/Makefile
|
|
|
f07426 |
install -p -m 644 -D passt.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/passt.pp
|
|
|
f07426 |
install -p -m 644 -D passt.if %{buildroot}%{_datadir}/selinux/devel/include/contrib/passt.if
|
|
|
f07426 |
install -p -m 644 -D pasta.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/pasta.pp
|
|
|
f07426 |
install -p -m 644 -D pasta.if %{buildroot}%{_datadir}/selinux/devel/include/contrib/pasta.if
|
|
|
f07426 |
popd
|
|
|
f07426 |
|
|
|
f07426 |
%pre selinux
|
|
|
f07426 |
%selinux_relabel_pre -s %{selinuxtype}
|
|
|
f07426 |
|
|
|
f07426 |
%post selinux
|
|
|
f07426 |
semodule -i %{_datadir}/selinux/packages/%{name}/passt.pp 2>/dev/null || :
|
|
|
f07426 |
semodule -i %{_datadir}/selinux/packages/%{name}/pasta.pp 2>/dev/null || :
|
|
|
f07426 |
%selinux_relabel_post -s %{selinuxtype}
|
|
|
f07426 |
|
|
|
f07426 |
%preun selinux
|
|
|
f07426 |
semodule -r passt 2>/dev/null || :
|
|
|
f07426 |
semodule -r pasta 2>/dev/null || :
|
|
|
f07426 |
%selinux_relabel_post -s %{selinuxtype}
|
|
|
f07426 |
|
|
|
f07426 |
%files
|
|
|
f07426 |
%license LICENSES/{AGPL-3.0-or-later.txt,BSD-3-Clause.txt}
|
|
|
f07426 |
%dir %{_docdir}/%{name}
|
|
|
f07426 |
%doc %{_docdir}/%{name}/README.md
|
|
|
f07426 |
%doc %{_docdir}/%{name}/demo.sh
|
|
|
f07426 |
%{_bindir}/passt
|
|
|
f07426 |
%{_bindir}/pasta
|
|
|
f07426 |
%{_bindir}/qrap
|
|
|
f07426 |
%{_mandir}/man1/passt.1*
|
|
|
f07426 |
%{_mandir}/man1/pasta.1*
|
|
|
f07426 |
%{_mandir}/man1/qrap.1*
|
|
|
f07426 |
%ifarch x86_64
|
|
|
f07426 |
%{_bindir}/passt.avx2
|
|
|
f07426 |
%{_mandir}/man1/passt.avx2.1*
|
|
|
f07426 |
%{_bindir}/pasta.avx2
|
|
|
f07426 |
%{_mandir}/man1/pasta.avx2.1*
|
|
|
f07426 |
%endif
|
|
|
f07426 |
|
|
|
f07426 |
%files selinux
|
|
|
f07426 |
%dir %{_datadir}/selinux/packages/%{name}
|
|
|
f07426 |
%{_datadir}/selinux/packages/%{name}/passt.pp
|
|
|
f07426 |
%{_datadir}/selinux/devel/include/contrib/passt.if
|
|
|
f07426 |
%{_datadir}/selinux/packages/%{name}/pasta.pp
|
|
|
f07426 |
%{_datadir}/selinux/devel/include/contrib/pasta.if
|
|
|
f07426 |
|
|
|
f07426 |
%changelog
|
|
|
f07426 |
* Thu Mar 16 2023 Stefano Brivio <sbrivio@redhat.com> - 0^20230222.g4ddbcb9-2
|
|
|
f07426 |
- udp: Actually use host resolver to forward DNS queries (rhbz#2177075)
|
|
|
f07426 |
- conf: Split add_dns{4,6}() out of get_dns() (rhbz#2177075)
|
|
|
f07426 |
- conf, udp: Allow any loopback address to be used as resolver (rhbz#2177075)
|
|
|
f07426 |
- tcp, tcp_splice: Get rid of false positive CWE-394 Coverity warning from fls() (rhbz#2177084)
|
|
|
f07426 |
- tcp: Avoid false (but convoluted) positive Coverity CWE-476 warning (rhbz#2177084)
|
|
|
f07426 |
- tcp: Avoid (theoretical) resource leak (CWE-772) Coverity warning (rhbz#2177084)
|
|
|
f07426 |
- Fix definitions of SOCKET_MAX, TCP_MAX_CONNS (rhbz#2177084)
|
|
|
f07426 |
- doc/demo: Fix and suppress ShellCheck warnings (rhbz#2177084)
|
|
|
f07426 |
- contrib/selinux: Drop duplicate init_daemon_domain() rule (rhbz#2176813)
|
|
|
f07426 |
- contrib/selinux: Let passt write to stdout and stderr when it starts (rhbz#2176813)
|
|
|
f07426 |
- contrib/selinux: Allow binding and connecting to all UDP and TCP ports (rhbz#2176813)
|
|
|
f07426 |
- contrib/selinux: Let interface users set paths for log, PID, socket files (rhbz#2176813)
|
|
|
f07426 |
- contrib/selinux: Drop "example" from headers: this is the actual policy (rhbz#2176813)
|
|
|
f07426 |
- contrib/selinux: Drop unused passt_read_data() interface (rhbz#2176813)
|
|
|
f07426 |
- contrib/selinux: Split interfaces into smaller bits (rhbz#2176813)
|
|
|
f07426 |
- fedora: Install SELinux interface files to shared include directory (rhbz#2176813)
|
|
|
f07426 |
- tcp, udp, util: Pass socket creation errors all the way up (rhbz#2177080)
|
|
|
f07426 |
- tcp, udp: Fix partial success return codes in {tcp,udp}_sock_init() (rhbz#2177080)
|
|
|
f07426 |
- conf: Terminate on EMFILE or ENFILE on sockets for port mapping (rhbz#2177080)
|
|
|
f07426 |
- tcp: Clamp MSS value when queueing data to tap, also for pasta (rhbz#2177083)
|
|
|
f07426 |
- Fix up SELinux labels on install/uninstall, require matching -selinux package (rhbz#2176813)
|
|
|
f07426 |
- Resolves: rhbz#2177075 rhbz#2177084 rhbz#2177080 rhbz#2177083 rhbz#2176813
|
|
|
f07426 |
|
|
|
f07426 |
* Wed Feb 22 2023 Camilla Conte <cconte@redhat.com> - 0^20230222.g4ddbcb9-1
|
|
|
f07426 |
- Import from fedora to CentOS/RHEL
|
|
|
f07426 |
- Resolves: rhbz#2172244
|
|
|
f07426 |
|
|
|
f07426 |
* Wed Nov 16 2022 Miroslav Rezanina <mrezanin@redhat.com> - 0^20221110.g4129764-1
|
|
|
f07426 |
- Import from fedora to CentOS/RHEL
|
|
|
f07426 |
- Resolves: rhbz#2131015
|
|
|
f07426 |
|
|
|
f07426 |
* Thu Nov 10 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20221110.g4129764-1
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_11_04.e308018..2022_11_10.4129764
|
|
|
f07426 |
|
|
|
f07426 |
* Fri Nov 4 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20221104.ge308018-1
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_10_26.f212044..2022_11_04.e308018
|
|
|
f07426 |
|
|
|
f07426 |
* Wed Oct 26 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20221026.gf212044-1
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_10_26.e4df8b0..2022_10_26.f212044
|
|
|
f07426 |
|
|
|
f07426 |
* Wed Oct 26 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20221026.ge4df8b0-1
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_10_24.c11277b..2022_10_26.e4df8b0
|
|
|
f07426 |
|
|
|
f07426 |
* Mon Oct 24 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20221024.gc11277b-1
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_10_22.b68da10..2022_10_24.c11277b
|
|
|
f07426 |
|
|
|
f07426 |
* Sat Oct 22 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20221022.gb68da10-1
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_10_15.b3f3591..2022_10_22.b68da10
|
|
|
f07426 |
|
|
|
f07426 |
* Sat Oct 15 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20221015.gb3f3591-1
|
|
|
f07426 |
- Add versioning information
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_09_29.06aa26f..2022_10_15.b3f3591
|
|
|
f07426 |
|
|
|
f07426 |
* Thu Sep 29 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20220929.g06aa26f-1
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_09_24.8978f65..2022_09_29.06aa26f
|
|
|
f07426 |
|
|
|
f07426 |
* Sat Sep 24 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20220924.g8978f65-1
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_09_23.d6f865a..2022_09_24.8978f65
|
|
|
f07426 |
|
|
|
f07426 |
* Fri Sep 23 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20220923.gd6f865a-1
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_09_06.e2cae8f..2022_09_23.d6f865a
|
|
|
f07426 |
|
|
|
f07426 |
* Wed Sep 7 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20220907.ge2cae8f-1
|
|
|
f07426 |
- Escape %% characters in spec file's changelog
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_09_01.7ce9fd1..2022_09_06.e2cae8f
|
|
|
f07426 |
|
|
|
f07426 |
* Fri Sep 2 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20220902.g7ce9fd1-1
|
|
|
f07426 |
- Add selinux-policy Requires: tag
|
|
|
f07426 |
- Add %%dir entries for own SELinux policy directory and documentation
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_08_29.0cb795e..2022_09_01.7ce9fd1
|
|
|
f07426 |
|
|
|
f07426 |
* Tue Aug 30 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20220830.g0cb795e-1
|
|
|
f07426 |
- Pass explicit bindir, mandir, docdir, and drop OpenSUSE override
|
|
|
f07426 |
- Use full versioning for SELinux subpackage Requires: tag
|
|
|
f07426 |
- Define git_hash in spec file and reuse it
|
|
|
f07426 |
- Drop comment stating the spec file is an example file
|
|
|
f07426 |
- Drop SPDX identifier from spec file
|
|
|
f07426 |
- Adopt versioning guideline for snapshots
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_08_24.60ffc5b..2022_08_29.0cb795e
|
|
|
f07426 |
|
|
|
f07426 |
* Wed Aug 24 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20220824.g60ffc5b-1
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_08_21.7b71094..2022_08_24.60ffc5b
|
|
|
f07426 |
|
|
|
f07426 |
* Sun Aug 21 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20220821.g7b71094-1
|
|
|
f07426 |
- Use more GNU-style directory variables, explicit docdir for OpenSUSE
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_08_20.f233d6c..2022_08_21.7b71094
|
|
|
f07426 |
|
|
|
f07426 |
* Sat Aug 20 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20220820.gf233d6c-1
|
|
|
f07426 |
- Fix man pages wildcards in spec file
|
|
|
f07426 |
- Don't hardcode CFLAGS setting, use %%set_build_flags macro instead
|
|
|
f07426 |
- Build SELinux subpackage as noarch
|
|
|
f07426 |
- Change source URL to HEAD link with explicit commit SHA
|
|
|
f07426 |
- Drop VCS tag from spec file
|
|
|
f07426 |
- Start Release tag from 1, not 0
|
|
|
f07426 |
- Introduce own rpkg macro for changelog
|
|
|
f07426 |
- Install "plain" README, instead of web version, and demo script
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_08_04.b516d15..2022_08_20.f233d6c
|
|
|
f07426 |
|
|
|
f07426 |
* Mon Aug 1 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20220801.gb516d15-1
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_07_20.9af2e5d..2022_08_04.b516d15
|
|
|
f07426 |
|
|
|
f07426 |
* Wed Jul 20 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20220720.g9af2e5d-1
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=2022_07_14.b86cd00..2022_07_20.9af2e5d
|
|
|
f07426 |
|
|
|
f07426 |
* Thu Jul 14 2022 Stefano Brivio <sbrivio@redhat.com> - 0^20220714.gb86cd00-1
|
|
|
f07426 |
- Use pre-processing macros in spec file
|
|
|
f07426 |
- Drop dashes from version
|
|
|
f07426 |
- Add example spec file for Fedora
|
|
|
f07426 |
- Upstream changes: https://passt.top/passt/log/?qt=range&q=e653f9b3ed1b60037e3bc661d53b3f9407243fc2..2022_07_14.b86cd00
|