Skip to content

Commit

Permalink
packaging/fedora: Add Amazon Linux 2 support
Browse files Browse the repository at this point in the history
Amazon Linux 2 is a derivative of Red Hat Enterprise Linux 7, using
a combination of CentOS 7 sources, backports from Fedora, and custom
packages produced by the Amazon Linux team to provide an updated stack
on a stable base platform.

As the Fedora packaging is already most of the way there for supporting
RHEL/CentOS 7, we can easily enable Amazon Linux 2, as well.

Note that the packaging assumes that EPEL for EL7 is activated on Amazon
Linux 2, as we require packages from EPEL for installation.

Signed-off-by: Neal Gompa <[email protected]>
  • Loading branch information
Conan-Kudo authored and bboozzoo committed Jul 24, 2018
1 parent 85fde4d commit fd40970
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions packaging/amzn-2
16 changes: 16 additions & 0 deletions packaging/fedora/snapd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
# Compat macros
%{?!_environmentdir: %global _environmentdir %{_prefix}/lib/environment.d}

# With Amazon Linux 2+, we're going to provide the /snap symlink by default,
# since classic snaps currently require it... :(
%if 0%{?amzn} >= 2
%bcond_without snap_symlink
%else
%bcond_with snap_symlink
%endif

# A switch to allow building the package with support for testkeys which
# are used for the spread test suite of snapd.
%bcond_with testkeys
Expand Down Expand Up @@ -554,6 +562,11 @@ echo 'SNAP_REEXEC=0' > %{buildroot}%{_sysconfdir}/sysconfig/snapd
touch %{buildroot}%{_sharedstatedir}/snapd/state.json
touch %{buildroot}%{_sharedstatedir}/snapd/snap/README

# When enabled, create a symlink for /snap to point to /var/lib/snapd/snap
%if %{with snap_symlink}
ln -sr %{buildroot}%{_sharestatedir}/snapd/snap %{buildroot}/snap
%endif

# source codes for building projects
%if 0%{?with_devel}
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
Expand Down Expand Up @@ -653,6 +666,9 @@ popd
%ghost %{_sharedstatedir}/snapd/state.json
%ghost %{_sharedstatedir}/snapd/snap/README
%{_environmentdir}/990-snapd.conf
%if %{with snap_symlink}
/snap
%endif

%files -n snap-confine
%doc cmd/snap-confine/PORTING
Expand Down

0 comments on commit fd40970

Please sign in to comment.