diff --git a/nydus-snapshotter-0.3.0.tar.gz b/nydus-snapshotter-0.3.0.tar.gz deleted file mode 100644 index 06692d37804da068a899bca47e89c64c52b84ee1..0000000000000000000000000000000000000000 Binary files a/nydus-snapshotter-0.3.0.tar.gz and /dev/null differ diff --git a/nydus-snapshotter.fusedev.service b/nydus-snapshotter.fusedev.service new file mode 100644 index 0000000000000000000000000000000000000000..6eff9307aff2dea5cf2298895e4600afd7e02951 --- /dev/null +++ b/nydus-snapshotter.fusedev.service @@ -0,0 +1,21 @@ +[Unit] +Description=nydus snapshotter +After=network.target +Before=containerd.service + +[Service] +Type=simple +Environment=HOME=/root +ExecStart=/usr/bin/containerd-nydus-grpc --config-path /etc/nydus/config.json \ + --log-to-stdout --daemon-mode shared --root /var/lib/containerd/io.containerd.snapshotter.v1.nydus \ + --address /var/run/containerd/containerd-nydus-grpc.sock --cache-dir /var/lib/containerd/io.containerd.snapshotter.v1.nydus/cache \ + --log-level info +Restart=always +RestartSec=1 +KillMode=process +OOMScoreAdjust=-999 +StandardOutput=journal +StandardError=journal + +[Install] +WantedBy=multi-user.target diff --git a/nydus-snapshotter.spec b/nydus-snapshotter.spec index 1ceba892edb77a5d713f8b1ae8d08ce95b7e85b1..9d7554f354ec23d8aa7d59897c76b3829ae83c73 100644 --- a/nydus-snapshotter.spec +++ b/nydus-snapshotter.spec @@ -1,31 +1,37 @@ +%define anolis_release 1 +%define release_version 0.3.0 +%define pre_version alpha.5 +%global debug_package %{nil} + Name: nydus-snapshotter -Version: 0.3.0 -Release: 1%{?dist} +Version: %{release_version}~%{pre_version} +Release: %{anolis_release}%{?dist} Summary: A containerd snapshotter with data deduplication and lazy loading License: Apache-2.0 -Source0: %{name}-%{version}.tar.gz +URL: https://github.com/containerd/nydus-snapshotter +Source0: https://github.com/containerd/nydus-snapshotter/archive/refs/tags/v%{release_version}-%{pre_version}.tar.gz +Source1: nydus-snapshotter.fusedev.service +Source2: v%{release_version}-%{pre_version}-vendor.tar.gz Requires: nydus-rs >= 2.1.0 BuildRequires: golang -Provides: %{name} = %{version} - %description Nydus Snapshotter - A containerd snapshotter with data deduplication and lazy loading -%global debug_package %{nil} - %prep -%autosetup + +%autosetup -n %{name}-%{release_version}-%{pre_version} go env -w GOFLAGS="-mod=vendor" %build +tar -xzf %{SOURCE2} %make_build %install install -Dpm 0755 ./bin/containerd-nydus-grpc %{buildroot}%{_bindir}/containerd-nydus-grpc -install -Dpm 0755 ./nydus-snapshotter.fusedev.service %{buildroot}/etc/systemd/system/nydus-snapshotter.service +install -Dpm 0755 %{SOURCE1} %{buildroot}/etc/systemd/system/nydus-snapshotter.service mkdir -p %{buildroot}/var/lib/containerd/io.containerd.snapshotter.v1.nydus/cache %check @@ -41,7 +47,7 @@ mkdir -p %{buildroot}/var/lib/containerd/io.containerd.snapshotter.v1.nydus/cach %changelog -* Wed Aug 10 2022 tianqian.zyf - 0.3.0-1 +* Wed Aug 10 2022 tianqian.zyf - 0.3.0~alpha.5-1 - Support systemd * Thu Jul 28 2022 Qinqi Qu - 0.2.4-1 - First release diff --git a/v0.3.0-alpha.5-vendor.tar.gz b/v0.3.0-alpha.5-vendor.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..840a83277bda04f45a966a061c8b9bc930219a07 Binary files /dev/null and b/v0.3.0-alpha.5-vendor.tar.gz differ diff --git a/v0.3.0-alpha.5.tar.gz b/v0.3.0-alpha.5.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..7dc61fd8f1b88537374d0cdf83f7526c60c48127 Binary files /dev/null and b/v0.3.0-alpha.5.tar.gz differ