File landrun.spec of Package landrun

#
# spec file for package landrun
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           landrun
Version:        0.1.14
Release:        0
Summary:        A sandbox for running Linux processes using Landlock
License:        MIT
Group:          Productivity/Networking/Other
URL:            https://github.com/Zouuup/landrun
Source0:        landrun-%{version}.tar
Source1:        vendor.tar.zst

BuildRequires:  git
# >= 1.14.4 is ambiguous
BuildRequires:  go1.24
BuildRequires:  zstd

%description
A lightweight, secure sandbox for running Linux processes using Landlock. Think firejail, but with kernel-level security and minimal overhead.

Linux Landlock is a kernel-native security module that lets unprivileged processes sandbox themselves.

Landrun is designed to make it practical to sandbox any command with fine-grained filesystem and network access controls. No root. No containers. No SELinux/AppArmor configs.

It's lightweight, auditable, and wraps Landlock v5 features (file access + TCP restrictions).

%prep
%autosetup -p1 -a1

%build

export GOFLAGS="-buildmode=pie -trimpath -mod=vendor"
go build -v -o landrun cmd/landrun/main.go

%install
mkdir -p %{buildroot}%{_bindir}
install -Dm755 landrun %{buildroot}%{_bindir}


%files
%{_bindir}/%name
%license LICENSE
%doc *.md

%changelog
openSUSE Build Service is sponsored by