Skip to content

Commit f9d981d

Browse files
author
Andrei Zavada
committed
enable packaging for Amazon Linux 2
1 parent 5ef39ae commit f9d981d

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

rel/files/riak

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ function delete_pid_file {
2828
rm -f $PID_DIR/riak.pid
2929
}
3030

31-
# prevents centos8 su from contacting pam and printing the "Last logged in" message
32-
if [ "`cat /etc/redhat-release 2>&1`" = "CentOS Stream release 8" ]; then
31+
# centos7-based distros have a su that contacts pam and prints the "Last logged in" message
32+
if [ "`cat /etc/redhat-release 2>&1`" = "CentOS Stream release 8" ] ||
33+
[ "`cat /etc/system-release 2>&1`" = "Amazon Linux release 2 (Karoo)" ]; then
3334
SU="su --session-command"
3435
else
3536
SU=su

rel/pkg/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,16 @@ DEPS_DIR ?= deps
1212
##
1313
ifeq ($(OS),Linux)
1414
ARCH = $(shell uname -m)
15+
ISAMZ = $(shell cat /etc/system-release 2> /dev/null)
1516
ISRPM = $(shell cat /etc/redhat-release 2> /dev/null)
17+
ISAMZ = $(shell cat /etc/system-release 2> /dev/null)
1618
ISDEB = $(shell cat /etc/debian_version 2> /dev/null)
1719
ISSLES = $(shell cat /etc/SuSE-release 2> /dev/null)
20+
ifneq ($(ISAMZ),)
21+
OSNAME = Amazon
22+
PKGERDIR = rpm
23+
BUILDDIR = rpmbuild
24+
else
1825
ifneq ($(ISRPM),)
1926
OSNAME = RedHat
2027
PKGERDIR = rpm
@@ -32,6 +39,7 @@ BUILDDIR = rpmbuild
3239
endif # SLES
3340
endif # deb
3441
endif # rpm
42+
endif # amazon
3543
endif # linux
3644

3745
ifeq ($(OS),Darwin) # OSX

rel/pkg/rpm/specfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Vendor: "Riak"
2929
Packager: "Riak Package Maint" <"[email protected]">
3030
BuildRoot: %{_tmppath}/%{name}-%{_revision}-%{release}-root
3131
Summary: "Riak is a distributed data store"
32-
BuildRequires: systemd systemd-rpm-macros gcc-c++ pam-devel
32+
BuildRequires: systemd gcc-c++ pam-devel
3333
Requires(post): systemd
3434
Requires(preun): systemd
3535
Requires(postun): systemd

0 commit comments

Comments
 (0)