[packages/snapd] - updated to 2.56.2, pl, some cleanups
qboosh
qboosh at pld-linux.org
Thu Jul 7 18:56:11 CEST 2022
commit 278ad8d027d1e1c59dae87066f83c32c7e0610a8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Jul 7 18:57:47 2022 +0200
- updated to 2.56.2, pl, some cleanups
snapd.spec | 178 ++++++++++++++++++++++++++++++++++++-------------------------
1 file changed, 104 insertions(+), 74 deletions(-)
---
diff --git a/snapd.spec b/snapd.spec
index f785b0f..68b7995 100644
--- a/snapd.spec
+++ b/snapd.spec
@@ -1,16 +1,19 @@
#
# Conditional build:
%bcond_with tests # build with tests
-%bcond_with selinux # selinux
+%bcond_with selinux # SELinux support module
+%bcond_with dynamic # all binaries linked dynamically
Summary: A transactional software package manager
+Summary(pl.UTF-8): Transakcyjny zarządca pakietów oprogramowania
Name: snapd
-Version: 2.42.5
+Version: 2.56.2
Release: 1
License: GPL v3
Group: Base
+#Source0Download: https://github.com/snapcore/snapd/releases
Source0: https://github.com/snapcore/snapd/releases/download/%{version}/%{name}_%{version}.vendor.tar.xz
-# Source0-md5: 9c6a50f07b33587519f2d1e0656c5f6f
+# Source0-md5: 5952bd537b14f74aa2c33ecba84e9d9a
# Script to implement certain package management actions
Source1: snap-mgmt.sh
Source2: profile.d.sh
@@ -18,19 +21,26 @@ Source3: %{name}.sysconfig
Patch0: pld_is_like_fedora.patch
URL: https://github.com/snapcore/snapd
BuildRequires: %{_bindir}/rst2man
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.69
BuildRequires: automake
-BuildRequires: gcc
-BuildRequires: gettext
-BuildRequires: glib2-devel
-BuildRequires: glibc-static
+BuildRequires: docutils
+BuildRequires: gettext-tools
+BuildRequires: glib2-devel >= 2.0
+%{!?with_dynamic:BuildRequires: glibc-static}
BuildRequires: gnupg
BuildRequires: golang
BuildRequires: indent
BuildRequires: libcap-devel
-BuildRequires: libseccomp-static
+# currently disabled
+#BuildRequires: libapparmor-devel
+%{!?with_dynamic:BuildRequires: libseccomp-static}
BuildRequires: libtool
BuildRequires: pkgconfig
+BuildRequires: rpm-build >= 4.6
+%if %{with selinux}
+BuildRequires: selinux-policy
+BuildRequires: selinux-policy-devel
+%endif
BuildRequires: systemd-devel
BuildRequires: systemd-units
BuildRequires: tar >= 1:1.22
@@ -40,7 +50,7 @@ BuildRequires: xfsprogs-devel
BuildRequires: xz
Requires: pld-release
Requires: squashfs
-Obsoletes: snap-confine
+Obsoletes: snap-confine < 2.36
ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 ppc64le s390x
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -57,34 +67,57 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Snappy is a modern, cross-distribution, transactional package manager
designed for working with self-contained, immutable packages.
+%description -l pl.UTF-8
+Snappy to nowoczesny, wielodystrybucyjny, transakcyjny zarządca
+pakietów zaprojektowany do pracy z samodzielnymi, niezmiennymi
+pakietami.
+
%package selinux
Summary: SELinux module for snapd
+Summary(pl.UTF-8): Moduł SELinuksa dla snapd
License: GPL v2+
Group: Base
-%if %{with selinux}
-BuildRequires: selinux-policy
-BuildRequires: selinux-policy-devel
-%endif
Requires(post): selinux-policy-base >= %{_selinux_policy_version}
Requires(post): policycoreutils
Requires(post): policycoreutils-python-utils
-Requires(pre): libselinux-utils
-Requires(post): libselinux-utils
+Requires(pre,post): libselinux-utils
BuildArch: noarch
%description selinux
This package provides the SELinux policy module to ensure snapd runs
properly under an environment with SELinux enabled.
+%description selinux -l pl.UTF-8
+Ten pakiet zawiera moduł polityki SELinuksa do zapewnienia, że snapd
+działa właściwie w środowisku z włączonym SELinuksem.
+
%package -n bash-completion-%{name}
-Summary: bash-completion for %{name}
+Summary: Bash completion for %{name}
+Summary(pl.UTF-8): Bashowe uzupełnianie poleceń dla %{name}
Group: Applications/Shells
Requires: %{name} = %{version}-%{release}
-Requires: bash-completion
+Requires: bash-completion >= 2.0
BuildArch: noarch
%description -n bash-completion-%{name}
-bash-completion for %{name}.
+Bash completion for %{name}.
+
+%description -n bash-completion-%{name} -l pl.UTF-8
+Bashowe uzupełnianie poleceń dla %{name}.
+
+%package -n zsh-completion-%{name}
+Summary: zsh completion for %{name}
+Summary(pl.UTF-8): Uzupełnianie poleceń w zsh dla %{name}
+Group: Applications/Shells
+Requires: %{name} = %{version}-%{release}
+Requires: zsh
+BuildArch: noarch
+
+%description -n zsh-completion-%{name}
+Bash completion for %{name}.
+
+%description -n zsh-completion-%{name} -l pl.UTF-8
+Uzupełnianie poleceń w zsh dla %{name}.
%prep
%setup -q
@@ -98,16 +131,22 @@ mkdir -p src/github.com/snapcore
ln -s ../../../ src/github.com/snapcore/snapd
%build
-export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath}
-
+export GOPATH=$(pwd):$(pwd)/vendor:%{gopath}
LDFLAGS="%{rpmldflags}"
+
+# remove the mod file, we are building without go modules support
+%{__rm} go.mod
+export GO111MODULE=off
+
%gobuild -o bin/snap %{import_path}/cmd/snap
%gobuild -o bin/snapctl %{import_path}/cmd/snapctl
%gobuild -o bin/snapd %{import_path}/cmd/snapd
%gobuild -o bin/snap-failure %{import_path}/cmd/snap-failure
# these should be statically linked, for some reason
+%if %{without dynamic}
LDFLAGS="%{rpmldflags} -static"
+%endif
%gobuild -o bin/snap-update-ns %{import_path}/cmd/snap-update-ns
%gobuild -o bin/snap-exec %{import_path}/cmd/snap-exec
%gobuild -o bin/snap-seccomp %{import_path}/cmd/snap-seccomp
@@ -116,30 +155,33 @@ LDFLAGS="%{rpmldflags} -static"
LDFLAGS="%{rpmldflags}"
%if %{with selinux}
-cd data/selinux
-%{__make} SHARE="%{_datadir}" TARGETS="snappy"
-cd -
+%{__make} -C data/selinux \
+ SHARE="%{_datadir}" \
+ TARGETS="snappy"
%endif
# Build snap-confine
cd cmd
-autoreconf --force --install --verbose
+#autoreconf --force --install --verbose
# selinux support is not yet available, for now just disable apparmor
# FIXME: add --enable-caps-over-setuid as soon as possible (setuid discouraged!)
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
%configure \
--disable-apparmor \
- --libexecdir=%{_libexecdir}/snapd/ \
+ --libexecdir=%{_libexecdir}/snapd \
--with-snap-mount-dir=%{_sharedstatedir}/snapd/snap \
--without-merged-usr
%{__make} \
BINDIR="%{_bindir}" \
LIBEXECDIR="%{_libexecdir}"
-cd -
+cd ..
# Build systemd units
-cd data/systemd
-%{__make} \
+%{__make} -C data/systemd \
BINDIR="%{_bindir}" \
LIBEXECDIR="%{_libexecdir}" \
SNAP_MOUNT_DIR="%{_sharedstatedir}/snapd/snap" \
@@ -147,33 +189,17 @@ cd data/systemd
%if %{with tests}
# snapd tests
-export GOPATH=$RPM_BUILD_ROOT/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath}
+export GOPATH=$RPM_BUILD_ROOT%{gopath}:$(pwd)/vendor:%{gopath}
%gotest %{import_path}/...
# snap-confine tests (these always run!)
-cd cmd
-%{__make} check
-cd -
+%{__make} -C cmd check
%endif
%install
rm -rf $RPM_BUILD_ROOT
-install -d -p $RPM_BUILD_ROOT%{_bindir}
-install -d -p $RPM_BUILD_ROOT%{_libexecdir}/snapd
-install -d -p $RPM_BUILD_ROOT%{_mandir}/man1
-install -d -p $RPM_BUILD_ROOT%{systemdunitdir}
-install -d -p $RPM_BUILD_ROOT/etc/profile.d
-install -d -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
-install -d -p $RPM_BUILD_ROOT%{_sharedstatedir}/snapd/assertions
-install -d -p $RPM_BUILD_ROOT%{_sharedstatedir}/snapd/desktop/applications
-install -d -p $RPM_BUILD_ROOT%{_sharedstatedir}/snapd/device
-install -d -p $RPM_BUILD_ROOT%{_sharedstatedir}/snapd/hostfs
-install -d -p $RPM_BUILD_ROOT%{_sharedstatedir}/snapd/mount
-install -d -p $RPM_BUILD_ROOT%{_sharedstatedir}/snapd/seccomp/profiles
-install -d -p $RPM_BUILD_ROOT%{_sharedstatedir}/snapd/snaps
-install -d -p $RPM_BUILD_ROOT%{_sharedstatedir}/snapd/snap/bin
-install -d -p $RPM_BUILD_ROOT%{_localstatedir}/snap
-install -d -p $RPM_BUILD_ROOT%{_prefix}/lib
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libexecdir}/snapd,%{_prefix}/lib,%{_mandir}/man1,%{systemdunitdir},/etc/profile.d,/etc/sysconfig,%{_localstatedir}/snap}
+install -d $RPM_BUILD_ROOT%{_sharedstatedir}/snapd/{assertions,desktop/applications,device,hostfs,mount,seccomp/profiles,snaps,snap/bin}
# Install snap and snapd
install -p bin/snap $RPM_BUILD_ROOT%{_bindir}
@@ -185,8 +211,7 @@ install -p bin/snap-seccomp $RPM_BUILD_ROOT%{_libexecdir}/snapd
install -p bin/snap-failure $RPM_BUILD_ROOT%{_libexecdir}/snapd
%if %{with selinux}
-install -d -p $RPM_BUILD_ROOT%{_datadir}/selinux/devel/include/contrib
-install -d -p $RPM_BUILD_ROOT%{_datadir}/selinux/packages
+install -d $RPM_BUILD_ROOT%{_datadir}/selinux/{devel/include/contrib,packages}
install -p data/selinux/snappy.if $RPM_BUILD_ROOT%{_datadir}/selinux/devel/include/contrib
install -p data/selinux/snappy.pp.bz2 $RPM_BUILD_ROOT%{_datadir}/selinux/packages
%endif
@@ -195,32 +220,30 @@ install -p data/selinux/snappy.pp.bz2 $RPM_BUILD_ROOT%{_datadir}/selinux/package
bin/snap help --man > $RPM_BUILD_ROOT%{_mandir}/man1/snap.1
# Install the "info" data file with snapd version
-install -D data/info $RPM_BUILD_ROOT%{_libexecdir}/snapd/info
+install -Dp data/info $RPM_BUILD_ROOT%{_libexecdir}/snapd/info
-# Install bash completion for "snap"
-install -D data/completion/snap $RPM_BUILD_ROOT%{bash_compdir}/snap
+# Install shell completions for "snap"
+install -Dp data/completion/bash/snap $RPM_BUILD_ROOT%{bash_compdir}/snap
+install -Dp data/completion/zsh/_snap $RPM_BUILD_ROOT%{zsh_compdir}/_snap
# Install snap-confine
-cd cmd
-%{__make} install \
+%{__make} -C cmd install \
LIBEXECDIR="%{_libexecdir}" \
DESTDIR=$RPM_BUILD_ROOT
# Undo the 0000 permissions, they are restored in the files section
chmod 0755 $RPM_BUILD_ROOT%{_sharedstatedir}/snapd/void
# We don't use AppArmor
-rm -rfv $RPM_BUILD_ROOT%{_sysconfdir}/apparmor.d
+#%{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/apparmor.d
# ubuntu-core-launcher is dead
-rm -fv $RPM_BUILD_ROOT%{_bindir}/ubuntu-core-launcher
-cd -
+%{__rm} -v $RPM_BUILD_ROOT%{_bindir}/ubuntu-core-launcher
# Install all systemd units
-cd data/systemd
-%{__make} install \
+%{__make} -C data/systemd install \
+ DESTDIR=$RPM_BUILD_ROOT \
LIBEXECDIR="%{_libexecdir}" \
- DESTDIR=$RPM_BUILD_ROOT SYSTEMDSYSTEMUNITDIR="%{systemdunitdir}"
+ SYSTEMDSYSTEMUNITDIR="%{systemdunitdir}"
# Remove snappy core specific units
rm -fv $RPM_BUILD_ROOT%{systemdunitdir}/snapd.system-shutdown.service
-cd -
cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d/snapd.sh
cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/snapd
@@ -232,7 +255,9 @@ install -pm 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_libexecdir}/snapd/snap-mgmt
touch $RPM_BUILD_ROOT%{_sharedstatedir}/snapd/state.json
# some things are still looked for in the wrong dir
+%if "%{_libexecdir}" != "%{_prefix}/lib"
ln -s "%{_libexecdir}/snapd" "$RPM_BUILD_ROOT%{_prefix}/lib/snapd"
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -278,38 +303,39 @@ fi
%files
%defattr(644,root,root,755)
-%doc README.md docs/*
+%doc README.md
%attr(755,root,root) %{_bindir}/snap
%attr(755,root,root) %{_bindir}/snapctl
%{_prefix}/lib/snapd
%dir %{_libexecdir}/snapd
%attr(755,root,root) %{_libexecdir}/snapd/info
%attr(6755,root,root) %{_libexecdir}/snapd/snap-confine
-%attr(755,root,root) %{_libexecdir}/snapd/snapd
-%attr(755,root,root) %{_libexecdir}/snapd/snapd.core-fixup.sh
%attr(755,root,root) %{_libexecdir}/snapd/snap-device-helper
%attr(755,root,root) %{_libexecdir}/snapd/snap-discard-ns
-%attr(755,root,root) %{_libexecdir}/snapd/snapd.run-from-snap
%attr(755,root,root) %{_libexecdir}/snapd/snap-exec
%attr(755,root,root) %{_libexecdir}/snapd/snap-failure
%attr(755,root,root) %{_libexecdir}/snapd/snap-gdb-shim
%attr(755,root,root) %{_libexecdir}/snapd/snap-mgmt
%attr(755,root,root) %{_libexecdir}/snapd/snap-seccomp
%attr(755,root,root) %{_libexecdir}/snapd/snap-update-ns
+%attr(755,root,root) %{_libexecdir}/snapd/snapd
+%attr(755,root,root) %{_libexecdir}/snapd/snapd.core-fixup.sh
+%attr(755,root,root) %{_libexecdir}/snapd/snapd.run-from-snap
%attr(755,root,root) %{_libexecdir}/snapd/system-shutdown
%{_mandir}/man1/snap.1*
/etc/profile.d/snapd.sh
%attr(755,root,root) /usr/lib/systemd/system-environment-generators/snapd-env-generator
-%attr(755,root,root) %{systemdunitdir}-generators/snapd-generator
+%attr(755,root,root) /lib/systemd/system-generators/snapd-generator
%{systemdunitdir}/snapd.apparmor.service
+%{systemdunitdir}/snapd.autoimport.service
%{systemdunitdir}/snapd.core-fixup.service
%{systemdunitdir}/snapd.failure.service
+%{systemdunitdir}/snapd.recovery-chooser-trigger.service
%{systemdunitdir}/snapd.seeded.service
+%{systemdunitdir}/snapd.service
%{systemdunitdir}/snapd.snap-repair.service
%{systemdunitdir}/snapd.snap-repair.timer
%{systemdunitdir}/snapd.socket
-%{systemdunitdir}/snapd.service
-%{systemdunitdir}/snapd.autoimport.service
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snapd
%dir %{_sharedstatedir}/snapd
%dir %{_sharedstatedir}/snapd/assertions
@@ -322,19 +348,19 @@ fi
%dir %{_sharedstatedir}/snapd/seccomp/profiles
%dir %{_sharedstatedir}/snapd/snaps
%dir %{_sharedstatedir}/snapd/snap
+%attr(0000,root,root) %{_sharedstatedir}/snapd/void
%ghost %dir %{_sharedstatedir}/snapd/snap/bin
-%dir %{_localstatedir}/snap
%ghost %{_sharedstatedir}/snapd/state.json
+# FIXME: FHS
+%dir %{_localstatedir}/snap
%{_mandir}/man8/snapd-env-generator.8*
%{_mandir}/man8/snap-confine.8*
%{_mandir}/man8/snap-discard-ns.8*
-%attr(0000,root,root) %{_sharedstatedir}/snapd/void
%if %{with selinux}
%files selinux
%defattr(644,root,root,755)
-%doc data/selinux/COPYING
-%doc data/selinux/README.md
+%doc data/selinux/{COPYING,README.md}
%{_datadir}/selinux/packages/snappy.pp.bz2
%{_datadir}/selinux/devel/include/contrib/snappy.if
%endif
@@ -342,3 +368,7 @@ fi
%files -n bash-completion-%{name}
%defattr(644,root,root,755)
%{bash_compdir}/snap
+
+%files -n zsh-completion-%{name}
+%defattr(644,root,root,755)
+%{zsh_compdir}/_snap
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/snapd.git/commitdiff/278ad8d027d1e1c59dae87066f83c32c7e0610a8
More information about the pld-cvs-commit
mailing list