diff --git a/.accel-config.metadata b/.accel-config.metadata
new file mode 100644
index 0000000..5b8780c
--- /dev/null
+++ b/.accel-config.metadata
@@ -0,0 +1 @@
+123eb9366ba96580e4795e47f0742551d50cbf53 SOURCES/accel-config-v3.4.2.tar.gz
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..097b374
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+SOURCES/accel-config-v3.4.2.tar.gz
diff --git a/SOURCES/0001-accel-config-clean-up-double-frees-in-add_group.patch b/SOURCES/0001-accel-config-clean-up-double-frees-in-add_group.patch
new file mode 100644
index 0000000..876b1ac
--- /dev/null
+++ b/SOURCES/0001-accel-config-clean-up-double-frees-in-add_group.patch
@@ -0,0 +1,34 @@
+From a073b40ea293dec87af5f887bb90744ed244e0c9 Mon Sep 17 00:00:00 2001
+From: Jerry Snitselaar <jsnitsel@redhat.com>
+Date: Mon, 18 Oct 2021 15:10:00 -0700
+Subject: [PATCH 1/3] accel-config: clean up double frees in add_group
+
+free(group) is called after jumping to the err_group label,
+so don't call free(group) in paths jumping there.
+
+Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
+---
+ accfg/lib/libaccfg.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/accfg/lib/libaccfg.c b/accfg/lib/libaccfg.c
+index f4fc17e5ca93..a13be34a7ef5 100644
+--- a/accfg/lib/libaccfg.c
++++ b/accfg/lib/libaccfg.c
+@@ -870,13 +870,11 @@ static void *add_group(void *parent, int id, const char *group_base,
+ 	group_base_string = strdup(group_base);
+ 	if (!group_base_string) {
+ 		err(ctx, "conversion of group_base_string failed\n");
+-		free(group);
+ 		close(dfd);
+ 		goto err_group;
+ 	}
+ 	if (sscanf(basename(group_base_string),
+ 				"group%" SCNu64 ".%" SCNu64, &device_id, &group_id) != 2) {
+-		free(group);
+ 		close(dfd);
+ 		goto err_group;
+ 	}
+-- 
+2.33.0
+
diff --git a/SOURCES/0003-accel-config-remove-redundant-assignment-in-umwait.patch b/SOURCES/0003-accel-config-remove-redundant-assignment-in-umwait.patch
new file mode 100644
index 0000000..2045397
--- /dev/null
+++ b/SOURCES/0003-accel-config-remove-redundant-assignment-in-umwait.patch
@@ -0,0 +1,27 @@
+From dc03a40adfaaded6c3e2d9bb0bff2218b187daae Mon Sep 17 00:00:00 2001
+From: Jerry Snitselaar <jsnitsel@redhat.com>
+Date: Mon, 18 Oct 2021 15:47:27 -0700
+Subject: [PATCH 3/3] accel-config: remove redundant assignment in umwait
+
+Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
+---
+ test/dsa.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/test/dsa.c b/test/dsa.c
+index 5396b1b97d3a..961f5a73990e 100644
+--- a/test/dsa.c
++++ b/test/dsa.c
+@@ -393,9 +393,6 @@ static inline int umwait(unsigned long timeout, unsigned int state)
+ 	uint32_t timeout_low = (uint32_t)timeout;
+ 	uint32_t timeout_high = (uint32_t)(timeout >> 32);
+ 
+-	timeout_low = (uint32_t)timeout;
+-	timeout_high = (uint32_t)(timeout >> 32);
+-
+ 	asm volatile(".byte 0xf2, 0x48, 0x0f, 0xae, 0xf1\t\n"
+ 		"setc %0\t\n"
+ 		: "=r"(r)
+-- 
+2.33.0
+
diff --git a/SPECS/accel-config.spec b/SPECS/accel-config.spec
new file mode 100644
index 0000000..d583e1b
--- /dev/null
+++ b/SPECS/accel-config.spec
@@ -0,0 +1,143 @@
+%global	project_name	idxd-config
+%global	debug_package	%{nil}
+
+Name:		accel-config
+Version:	3.4.2
+Release:	2%{?dist}
+Summary:	Configure accelerator subsystem devices
+# The entire source code is under GPLv2 except for accel-config
+# library which is mostly LGPLv2.1, ccan/list which is BSD-MIT and
+# the rest of ccan which is CC0.
+License:	GPLv2 and LGPLv2+ and MIT and CC0
+URL:		https://github.com/intel/%{project_name}
+Source0:	%{URL}/archive/%{name}-v%{version}.tar.gz
+Patch0: 0001-accel-config-clean-up-double-frees-in-add_group.patch
+Patch1: 0003-accel-config-remove-redundant-assignment-in-umwait.patch
+
+Requires:	%{name}-libs%{?_isa} = %{version}-%{release}
+BuildRequires:	gcc
+BuildRequires:	autoconf
+BuildRequires:	asciidoc
+BuildRequires:	xmlto
+BuildRequires:	automake
+BuildRequires:	libtool
+BuildRequires:	pkgconfig
+BuildRequires:	pkgconfig(libkmod)
+BuildRequires:	pkgconfig(uuid)
+BuildRequires:	pkgconfig(json-c)
+BuildRequires:	pkgconfig(libudev)
+BuildRequires:	systemd
+BuildRequires: make
+
+# accel-config is for configuring Intel DSA (Data-Streaming
+# Accelerator) subsystem in the Linux kernel. It supports x86_64 only.
+ExclusiveArch:	%{ix86} x86_64
+
+%description
+Utility library for configuring the accelerator subsystem.
+
+%package devel
+Summary:	Development files for libaccfg
+License:	LGPLv2+
+Requires:	%{name}-libs%{?_isa} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+
+%package libs
+Summary:	Configuration library for accelerator subsystem devices
+# All source code of configuration library is LGPLv2.1, except
+# ccan/list which is BSD-MIT and the rest of ccan/ which is CC0.
+License:	LGPLv2+ and MIT and CC0
+Requires:	%{name}%{?_isa} = %{version}-%{release}
+
+%description libs
+Libraries for %{name}.
+
+%package test
+Summary:        Tests for accel-config
+License:        GPLv2
+Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
+
+%description test
+Tests for accel-config command.
+
+%prep
+%autosetup -p1 -n %{project_name}-%{name}-v%{version}
+
+%build
+echo %{version} > version
+./autogen.sh
+%configure --disable-static --disable-silent-rules --enable-test=yes
+%make_build
+
+%install
+%make_install
+find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
+
+%check
+make check
+
+%files
+%license Documentation/COPYING licenses/BSD-MIT licenses/CC0
+%license licenses/accel-config-licenses LICENSE_GPL_2_0
+%{_bindir}/%{name}
+%{_mandir}/man1/%{name}*
+%{_sysconfdir}/%{name}/%{name}.conf.sample
+
+%files libs
+%doc README.md
+%license Documentation/COPYING licenses/BSD-MIT licenses/CC0
+%license licenses/accel-config-licenses accfg/lib/LICENSE_LGPL_2_1
+%{_libdir}/lib%{name}.so.*
+
+%files devel
+%license Documentation/COPYING
+%{_includedir}/%{name}/
+%{_libdir}/lib%{name}.so
+%{_libdir}/pkgconfig/lib%{name}.pc
+
+%files test
+%license Documentation/COPYING LICENSE_GPL_2_0
+%doc test/README.md
+%{_datadir}/accel-config/test/*
+
+%changelog
+* Fri Feb 11 2022 Jerry Snitselaar <jsnitsel@redhat.com> - 3.4.2-2
+- Rebuild to clear osci test failure.
+Resolves: rhbz#1999934
+
+* Tue Oct 05 2021 Jerry Snitselaar <jsnitsel@redhat.com> - 3.4.2-1
+- Rebase to 3.4.2 release and add test subpackage.
+Resolves: rhbz#1999934
+
+* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.2-3
+- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
+  Related: rhbz#1991688
+
+* Fri Jul 02 2021 Jerry Snitselaar <jsnitsel@redhat.com> - 3.2-2
+- Fix product version for gating.
+Resolves: rhbz#1921368
+
+* Mon Jun 21 2021 Jerry Snitselaar <jsnitsel@redhat.com> - 3.2-1
+- Rebase to 3.2 release. Related: rhbz#1921368
+
+* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.1-2
+- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
+
+* Mon Mar 29 2021 Yunying Sun <yunying.sun@intel.com> - 3.1-1
+- Added ix86 support back as 3.1 release fixed it
+- Updated to 3.1 release
+
+* Thu Feb 18 2021 Yunying Sun <yunying.sun@intel.com> - 3.0.1-1
+- Updated to 3.0.1 release
+- Removed ix86 support as so far it supports x86_64 only
+- Updated licenses following upstream
+
+* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.8-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+
+* Fri Nov 6 2020 Yunying Sun <yunying.sun@intel.com> - 2.8-1
+- Initial Packaging