diff --git a/SOURCES/4.patch b/SOURCES/4.patch
new file mode 100644
index 0000000..67752e7
--- /dev/null
+++ b/SOURCES/4.patch
@@ -0,0 +1,28 @@
+From 3d7519f2ac9e9f6e0978bc0cfebee6fa56190480 Mon Sep 17 00:00:00 2001
+From: Pavla Kratochvilova <pkratoch@redhat.com>
+Date: Wed, 20 Mar 2019 18:45:16 +0100
+Subject: [PATCH] Generate repofile for any architecture if "ALL" is specified
+ (RhBug:1645318)
+
+The "arches" array can contain special value "ALL" and in that case any
+architecture should be accepted.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1645318
+---
+ rhsm/rhsm-utils.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/rhsm/rhsm-utils.c b/rhsm/rhsm-utils.c
+index 7b6a26b..0c8df57 100644
+--- a/rhsm/rhsm-utils.c
++++ b/rhsm/rhsm-utils.c
+@@ -230,7 +230,8 @@ rhsm_utils_yum_repo_from_context (RHSMContext *ctx)
+           if (json_object_has_member (repo, "arches"))
+             {
+               JsonArray *arr = json_object_get_array_member (repo, "arches");
+-              if (!rhsm_json_array_contains_string (arr, ctx_arch))
++              if (!rhsm_json_array_contains_string (arr, ctx_arch)
++                && !rhsm_json_array_contains_string (arr, "ALL"))
+                 continue;
+             }
+ 
diff --git a/SPECS/librhsm.spec b/SPECS/librhsm.spec
index 0e5112f..f6839a7 100644
--- a/SPECS/librhsm.spec
+++ b/SPECS/librhsm.spec
@@ -2,13 +2,14 @@
 
 Name:           lib%{libname}
 Version:        0.0.3
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Red Hat Subscription Manager library
 
 License:        LGPLv2+
 URL:            https://github.com/rpm-software-management/librhsm
 Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
 Patch0:         2.patch
+Patch1:         4.patch
 
 BuildRequires:  meson >= 0.37.0
 BuildRequires:  gcc
@@ -49,6 +50,9 @@ Requires:       %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
 %{_libdir}/pkgconfig/%{name}.pc
 
 %changelog
+* Wed Jul 10 2019 Daniel Mach <dmach@redhat.com> - 0.0.3-3
+- Generate repofile for any architecture if "ALL" is specified
+
 * Tue Nov 13 2018 Daniel Mach <dmach@redhat.com> - 0.0.3-2
 - Enable repos when generating a .repo file based on entitlement certificate.