## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 6; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # disable debuginfo packages %global debug_package %{nil} # Generated by go2rpm 1.17.1 %bcond check 1 # Set --with bundle_vendored to bundle vendored sources into tarballs %bcond bundle_vendored 0 # Set --with bundle_vendored_force to overwrite existing archive files %bcond bundle_vendored_force 0 # https://github.com/netbirdio/netbird %global goipath github.com/netbirdio/netbird Version: 0.59.7 %global tag v0.59.7 %gometa -L -f Name: netbird Release: %autorelease Summary: Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls # Generated by go-vendor-tools License: AGPL-3.0-only AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND GPL-3.0-only AND ISC AND MIT AND MPL-2.0 AND Unlicense AND Zlib AND (BSD-3-Clause OR Unlicense) URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml Source3: netbird.service Source4: client_config.json # Patch out the Jumpcloud integration from the server code. Does not impact # the client, but since it is not included in the vendor tarball, it will # impact building the software Patch00: 0001-Disable-Jumpcloud-integration-because-it-relies-on-G.patch # Remove TheJumpCloud/jcapi-go module from the go.mod. Patch01: vendor-remove-TheJumpCloud-jcapi-go.patch BuildRequires: go-vendor-tools BuildRequires: libX11-devel, libXcursor-devel, libXrandr-devel, libglvnd-devel, libXinerama-devel, libXi-devel, libXxf86vm-devel BuildRequires: systemd-rpm-macros # for hardlinks executable BuildRequires: util-linux-core %description Connect your devices into a secure WireGuard-based overlay network with SSO, MFA and granular access controls. %package client Summary: The netbird client command line tool and systemd service Requires: %{name} = %{version}-%{release} %description client The netbird client includes the 'netbird' command line tool as well as systemd services that the command line tool interacts with to run the service. %package ui Summary: The graphical netbird interface Requires: %{name} = %{version}-%{release} Requires: %{name}-client = %{version}-%{release} %description ui The graphical client used to run and manage your netbird connection. %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{SOURCE2} %build %global gomodulesmode GO111MODULE=on # LD Flags stolen from the upstream vendor's build command, changed to say # that it was built by Red Hat IT LDFLAGS="-s -w -X github.com/netbirdio/netbird/version.version=%{version} -X main.commit=%{tag} -X main.builtBy=redhatit" for cmd in client client/ui; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %install %go_vendor_license_install -c %{SOURCE2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/client %{buildroot}%{_bindir}/netbird install -m 0755 -vp %{gobuilddir}/bin/ui %{buildroot}%{_bindir}/netbird-ui # desktop client tools install -m 0755 -vd %{buildroot}%{_datarootdir}/applications install -m 0755 -vd %{buildroot}%{_datarootdir}/icons install -m 0755 -vp client/ui/build/netbird.desktop %{buildroot}%{_datarootdir}/applications/netbird.desktop install -m 0755 -vp client/ui/assets/netbird.png %{buildroot}%{_datarootdir}/icons/netbird.png # systemd service install -m 0755 -vd %{buildroot}%{_unitdir} install -m 0755 -vp %{SOURCE3} %{buildroot}%{_unitdir}/netbird.service install -m 0755 -vd %{buildroot}%{_sharedstatedir}/netbird # log directory install -m 0755 -vd %{buildroot}%{_sysconfdir}%{_localstatedir}/log/netbird # client configration install -m 0755 -vd %{buildroot}%{_sysconfdir}/netbird install -m 0755 -vp %{SOURCE4} %{buildroot}%{_sysconfdir}/netbird/config.json # Create hard links for all the duplicate license files hardlink --ignore-time %{buildroot} %check %go_vendor_license_check -c %{SOURCE2} %post client %systemd_post netbird.service %preun client %systemd_preun netbird.service %postun client %systemd_postun_with_restart netbird.service %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc docs AUTHORS CODE_OF_CONDUCT.md CONTRIBUTING.md %doc CONTRIBUTOR_LICENSE_AGREEMENT.md README.md SECURITY.md %doc client/iface/mocks/README.md %files client %{_bindir}/netbird %{_unitdir}/netbird.service %dir %{_sysconfdir}/netbird %dir %{_sharedstatedir}/netbird %config(noreplace) %{_sysconfdir}/netbird/config.json %ghost %config(noreplace) %{_sharedstatedir}/netbird/active_profile.json %ghost %config(noreplace) %{_sharedstatedir}/netbird/state.json %ghost %{_localstatedir}/log/netbird/client.log %ghost %{_rundir}/netbird.sock %files ui %{_bindir}/netbird-ui %{_datarootdir}/applications/netbird.desktop %{_datarootdir}/icons/netbird.png %changelog ## START: Generated by rpmautospec * Tue Oct 21 2025 Jonathan Billings - 0.59.7-6 - netbird.spec: Create and own the /var/lib/netbird directory * Tue Oct 21 2025 Jonathan Billings - 0.59.7-5 - Makefile: Use rpmautospec to build Changelog * Tue Oct 21 2025 Jonathan Billings - 0.59.7-4 - netbird.spec: better document patches, add ghost JSON files in state dir * Tue Oct 21 2025 Jonathan Billings - 0.59.7-3 - Update README.md, fix vendor tarball to exclude problematic Go module - README includes installation instructions - The go-vendor-tools.toml now removes the TheJumpCloud module from the resulting vendor tarball, so it can be safely distributed in Fedora builds. * Tue Oct 21 2025 Jonathan Billings - 0.59.7-2 - Update patch to disable Jumpcloud integration to work with v0.59.7 * Tue Oct 21 2025 Jonathan Billings - 0.59.7-1 - netbird.spec: Bump to v0.59.7 * Fri Oct 17 2025 Jonathan Billings - 0.59.6-8 - Add a MIT License to this package * Fri Oct 17 2025 Jonathan Billings - 0.59.6-7 - Add README.md * Fri Oct 17 2025 Jonathan Billings - 0.59.6-6 - Makefile: Need to also install Go binary for go_vendor_archive dependency. * Fri Oct 17 2025 Jonathan Billings - 0.59.6-5 - Makefile: don't download into sourcedir * Fri Oct 17 2025 Jonathan Billings - 0.59.6-4 - Makefile: Download tarball before running go_vendor_archive * Fri Oct 17 2025 Jonathan Billings - 0.59.6-3 - Makefile: Add python3-specfile dependency * Fri Oct 17 2025 Jonathan Billings - 0.59.6-2 - Create .copr/Makefile symlink * Fri Oct 17 2025 Jonathan Billings - 0.59.6-1 - Bump to v0.59.6, add a Makefile for COPR builds * Thu Sep 11 2025 Jonathan Billings - 0.57.0-1 - Remove known unlicensed module from package, fix some packaging issues * Wed Sep 10 2025 Jonathan Billings - 0.56.1-3 - Add a default client config file, fix log directory * Wed Sep 10 2025 Jonathan Billings - 0.56.1-2 - Create separate subpackages for the Client and UI executables * Wed Sep 10 2025 Jonathan Billings - 0.56.1-1 - Initial commit ## END: Generated by rpmautospec