# Generated by rust2rpm 26 %bcond_without check %bcond_without vendor # prevent library files from being installed %global cargo_install_lib 0 Name: vaultwarden Version: 1.32.0 Release: 1%{?dist} Summary: Unofficial Bitwarden compatible server ExcludeArch: ppc64le s390x # (Apache-2.0 OR MIT) AND BSD-3-Clause # 0BSD # 0BSD OR MIT OR Apache-2.0 # AGPL-3.0-only # Apache-2.0 # Apache-2.0 OR BSL-1.0 # Apache-2.0 OR ISC OR MIT # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # BSD-2-Clause OR Apache-2.0 OR MIT # BSD-3-Clause # BSD-3-Clause OR MIT # ISC # ISC AND MIT AND OpenSSL # MIT # MIT OR Apache-2.0 # MIT OR Apache-2.0 OR Zlib # MIT OR Zlib OR Apache-2.0 # MPL-2.0 # Unlicense OR MIT # Zlib OR Apache-2.0 OR MIT License: AGPL-3.0-only AND BSD-3-Clause AND 0BSD AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) AND (ISC AND MIT AND OpenSSL) # LICENSE.dependencies contains a full license breakdown URL: https://github.com/dani-garcia/vaultwarden Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Source1: vaultwarden-%{version}-vendor.tar.xz Source2: vaultwarden.service Source3: vaultwarden.cfg Source4: vaultwarden.sysusers ExcludeArch: i686 BuildRequires: cargo-rpm-macros >= 26 BuildRequires: openssl-devel BuildRequires: mariadb-devel BuildRequires: libpq-devel BuildRequires: systemd-rpm-macros Requires: %{name}-web %{?sysusers_requires_compat} %global _description %{expand: %{summary}.} %description %{_description} %prep %if %{with vendor} %autosetup -n %{name}-%{version} -p1 -a1 %cargo_prep -v vendor %else %autosetup -n %{name}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %endif %if %{with vendor} # ring doesn't specify a license at all, should be "ISC AND MIT AND OpenSSL" # determined in https://bugzilla.redhat.com/show_bug.cgi?id=2269411#c8 # if a license spec is added upstream in an update lets fail out so we don't miss it if grep -q 'license =' vendor/ring/Cargo.toml; then echo "License specification found in ring crate. Please review." exit 1 else sed -i '/\[package\]/a license = "ISC AND MIT AND OpenSSL"' vendor/ring/Cargo.toml # we modified Cargo.toml so checksums are on longer valid on it sed -E -i 's/"Cargo.toml":"[a-z0-9]{64}",//g' vendor/ring/.cargo-checksum.json fi %endif %build %cargo_build -f sqlite,mysql,postgresql %cargo_build -f sqlite %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} %if %{with vendor} # some vendored files have executable bit but bad shebangs find vendor/ -type f -executable -exec chmod -x {} + %endif %install %cargo_install -f sqlite,mysql,postgresql # filesystem install -d %{buildroot}%{_sharedstatedir}/%{name} install -d %{buildroot}%{_localstatedir}/run/%{name} # user install -Dpm 0644 %{SOURCE4} %{buildroot}%{_sysusersdir}/vaultwarden.conf # configs install -Dpm 0640 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}/%{name}.cfg # systemd install -Dp %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service %if %{with check} %check %cargo_test -f sqlite,mysql,postgresql %endif %pre %sysusers_create_compat %{SOURCE4} %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files %license LICENSE.txt %license LICENSE.dependencies %license cargo-vendor.txt %doc README.md %doc SECURITY.md %{_bindir}/vaultwarden %{_unitdir}/%{name}.service %config(noreplace) %attr(0640, root, vaultwarden) %{_sysconfdir}/%{name}/%{name}.cfg %dir %{_sysconfdir}/%{name}/ %{_sysusersdir}/vaultwarden.conf %dir %attr(0755, vaultwarden, vaultwarden) %ghost %{_localstatedir}/run/%{name} %dir %attr(0750, vaultwarden, vaultwarden) %{_sharedstatedir}/%{name} %changelog * Sun Aug 11 2024 Jonathan Wright - 1.32.0-1 - update to 1.32.0 rhbz#2304045 Resolves CVE-2024-39924 Resolves CVE-2024-39925 Resolves CVE-2024-39926 * Fri Aug 02 2024 Jonathan Wright - 1.31.0-2 - Exclude s390x and ppc64le * Fri Jul 19 2024 Jonathan Wright - 1.31.0-1 - update to 1.31.0 rhbz#2297149 * Tue May 21 2024 Jonathan Wright - 1.30.5-1 - Initial package build rhbz#2282807