From af0569df7e711dbd3d85a7eaf9dd23bee2154607 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 03:39:14 +0000 Subject: import fwupd-0.8.2-3.el7 --- diff --git a/.fwupd.metadata b/.fwupd.metadata new file mode 100644 index 0000000..b281fac --- /dev/null +++ b/.fwupd.metadata @@ -0,0 +1 @@ +246dd8504aea706688adb1c0113050c5daf4f47f SOURCES/fwupd-0.8.2.tar.xz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..573fe3d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/fwupd-0.8.2.tar.xz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-Do-not-use-the-LVFS.patch b/SOURCES/0001-Do-not-use-the-LVFS.patch new file mode 100644 index 0000000..24d538b --- /dev/null +++ b/SOURCES/0001-Do-not-use-the-LVFS.patch @@ -0,0 +1,26 @@ +From 58369cde7db9e086a5dd0be4a5c49703d686a02f Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Mon, 8 May 2017 19:10:57 +0100 +Subject: [PATCH] Do not use the LVFS + +--- + data/fwupd.conf | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/data/fwupd.conf b/data/fwupd.conf +index 158f112..45a4412 100644 +--- a/data/fwupd.conf ++++ b/data/fwupd.conf +@@ -4,7 +4,8 @@ + # + # If you want to use testing firmware then change this value to: + # https://s3.amazonaws.com/lvfsbucket/downloads/firmware-testing.xml.gz +-DownloadURI=https://s3.amazonaws.com/lvfsbucket/downloads/firmware.xml.gz ++#DownloadURI=https://s3.amazonaws.com/lvfsbucket/downloads/firmware.xml.gz ++DownloadURI= + + # If we should verify option ROM images + EnableOptionROM=true +-- +2.12.2 + diff --git a/SOURCES/0001-trivial-Return-a-sensible-error-if-DownloadURI-is-in.patch b/SOURCES/0001-trivial-Return-a-sensible-error-if-DownloadURI-is-in.patch new file mode 100644 index 0000000..c596a27 --- /dev/null +++ b/SOURCES/0001-trivial-Return-a-sensible-error-if-DownloadURI-is-in.patch @@ -0,0 +1,33 @@ +From df5652ffb55974c3153fd0a66a2ac606bd46cfc5 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Mon, 8 May 2017 19:06:08 +0100 +Subject: [PATCH] trivial: Return a sensible error if DownloadURI is + intentionaly left blank + +--- + src/fu-util.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/fu-util.c b/src/fu-util.c +index 677cc7a..d24e46e 100644 +--- a/src/fu-util.c ++++ b/src/fu-util.c +@@ -697,6 +697,15 @@ fu_util_download_metadata (FuUtilPrivate *priv, GError **error) + data_uri = g_key_file_get_string (config, "fwupd", "DownloadURI", error); + if (data_uri == NULL) + return FALSE; ++ if (data_uri[0] == '\0') { ++ g_set_error (error, ++ FWUPD_ERROR, ++ FWUPD_ERROR_NOT_SUPPORTED, ++ "Nothing set as DownloadURI in %s", ++ config_fn); ++ return FALSE; ++ ++ } + sig_uri = g_strdup_printf ("%s.asc", data_uri); + data_fn = g_build_filename (cache_dir, "firmware.xml.gz", NULL); + sig_fn = g_strdup_printf ("%s.asc", data_fn); +-- +2.12.2 + diff --git a/SOURCES/fwupd-fix-under-including.patch b/SOURCES/fwupd-fix-under-including.patch new file mode 100644 index 0000000..60d2d2d --- /dev/null +++ b/SOURCES/fwupd-fix-under-including.patch @@ -0,0 +1,12 @@ +diff -urNp fwupd-0.8.2.old/plugins/uefi/Makefile.in fwupd-0.8.2/plugins/uefi/Makefile.in +--- fwupd-0.8.2.old/plugins/uefi/Makefile.in 2017-04-28 20:05:47.626535181 +0100 ++++ fwupd-0.8.2/plugins/uefi/Makefile.in 2017-04-28 20:06:57.489137310 +0100 +@@ -453,7 +453,7 @@ libfu_plugin_uefi_la_SOURCES = \ + + libfu_plugin_uefi_la_LIBADD = $(GUSB_LIBS) $(UEFI_LIBS) + libfu_plugin_uefi_la_LDFLAGS = -module -avoid-version +-libfu_plugin_uefi_la_CFLAGS = $(WARN_CFLAGS) \ ++libfu_plugin_uefi_la_CFLAGS = $(WARN_CFLAGS) $(UEFI_CFLAGS) \ + -DG_LOG_DOMAIN=\"FuPluginUefi\" + + EXTRA_DIST = README.md diff --git a/SOURCES/fwupd-only-use-old-systemd-protections.patch b/SOURCES/fwupd-only-use-old-systemd-protections.patch new file mode 100644 index 0000000..bb86d1a --- /dev/null +++ b/SOURCES/fwupd-only-use-old-systemd-protections.patch @@ -0,0 +1,16 @@ +diff -urNp fwupd-0.8.2.old/data/fwupd.service.in fwupd-0.8.2/data/fwupd.service.in +--- fwupd-0.8.2.old/data/fwupd.service.in 2017-07-03 14:30:09.361974001 +0100 ++++ fwupd-0.8.2/data/fwupd.service.in 2017-07-03 14:30:32.740828053 +0100 +@@ -8,12 +8,6 @@ Before=gdm.service + Type=dbus + BusName=org.freedesktop.fwupd + ExecStart=@servicedir@/fwupd/fwupd +-MemoryDenyWriteExecute=yes + PrivateTmp=yes +-ProtectControlGroups=yes + ProtectHome=yes +-ProtectKernelModules=yes +-ProtectSystem=full + RestrictAddressFamilies=AF_NETLINK AF_UNIX +-RestrictRealtime=yes +-ReadWritePaths=@localstatedir@/lib/fwupd -@bootdir@ diff --git a/SPECS/fwupd.spec b/SPECS/fwupd.spec new file mode 100644 index 0000000..61046b6 --- /dev/null +++ b/SPECS/fwupd.spec @@ -0,0 +1,195 @@ +%global glib2_version 2.45.8 +%global libappstream_version 0.5.10 +%global libgusb_version 0.2.9 +%global libsoup_version 2.51.92 + +%ifarch x86_64 aarch64 +%global have_uefi 1 +%endif + +Summary: Firmware update daemon +Name: fwupd +Version: 0.8.2 +Release: 3%{?dist} +License: GPLv2+ +URL: https://github.com/hughsie/fwupd +Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz + +# already upstream +Patch0: fwupd-fix-under-including.patch +Patch1: 0001-trivial-Return-a-sensible-error-if-DownloadURI-is-in.patch +Patch2: 0001-Do-not-use-the-LVFS.patch +Patch3: fwupd-only-use-old-systemd-protections.patch + +BuildRequires: docbook-utils +BuildRequires: gettext +BuildRequires: glib2-devel >= %{glib2_version} +BuildRequires: intltool +BuildRequires: libappstream-glib-devel >= %{libappstream_version} +BuildRequires: libgudev1-devel +BuildRequires: libgusb-devel >= %{libgusb_version} +BuildRequires: libsoup-devel >= %{libsoup_version} +BuildRequires: colord-devel >= 1.0.0 +BuildRequires: polkit-devel >= 0.103 +BuildRequires: libgcab1-devel +BuildRequires: sqlite-devel +BuildRequires: gpgme-devel +BuildRequires: systemd +BuildRequires: libarchive-devel +BuildRequires: gobject-introspection-devel +BuildRequires: gcab +BuildRequires: elfutils-libelf-devel +BuildRequires: gtk-doc + +%if 0%{?have_uefi} +BuildRequires: fwupdate-devel >= 7 +%endif + +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +Requires: glib2%{?_isa} >= %{glib2_version} +Requires: libappstream-glib%{?_isa} >= %{libappstream_version} +Requires: libgusb%{?_isa} >= %{libgusb_version} +Requires: libsoup%{?_isa} >= %{libsoup_version} + +Obsoletes: fwupd-sign < 0.1.6 +Obsoletes: libebitdo < 0.7.5-3 + +%description +fwupd is a daemon to allow session software to update device firmware. + +%package devel +Summary: Development package for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Obsoletes: libebitdo-devel < 0.7.5-3 + +%description devel +Files for development with %{name}. + +%prep +%setup -q +%patch0 -p1 -b .underinclude +%patch1 -p1 -b .sensible-error +%patch2 -p1 -b .no-lvfs +%patch3 -p1 -b .no-new-systemd + +%build +%configure \ + --disable-static \ + --disable-thunderbolt \ + --enable-gtk-doc \ + --enable-colorhug \ +%if 0%{?have_uefi} + --enable-uefi \ +%else + --disable-uefi \ +%endif + --disable-dell \ + --disable-synaptics \ + --disable-rpath \ + --disable-silent-rules \ + --disable-dependency-tracking + +make %{?_smp_mflags} + +%install +make install DESTDIR=$RPM_BUILD_ROOT +find %{buildroot} -name '*.la' -exec rm -f {} ';' +mkdir --mode=0700 $RPM_BUILD_ROOT%{_localstatedir}/lib/fwupd/gnupg + +# not ready yet +rm -f %{buildroot}%{_libdir}/fwupd-plugins-2/libfu_plugin_altos.so +rm -f %{buildroot}%{_libdir}/fwupd-plugins-2/libfu_plugin_raspberrypi.so +rm -f %{buildroot}%{_libdir}/fwupd-plugins-2/libfu_plugin_steelseries.so +rm -f %{buildroot}%{_libdir}/fwupd-plugins-2/libfu_plugin_unifying.so + +# we don't want to include this in RHEL yet +rm -rf %{buildroot}%{_datadir}/gtk-doc/html/libdfu +rm -rf %{buildroot}%{_includedir}/libdfu +rm -f %{buildroot}%{_includedir}/dfu.h +rm -f %{buildroot}%{_includedir}/libdfu/*.h +rm -f %{buildroot}%{_libdir}/pkgconfig/dfu.pc + +%find_lang %{name} + +%check +# make check VERBOSE=1 + +%post +/sbin/ldconfig +%systemd_post fwupd.service + +%preun +%systemd_preun fwupd.service + +%postun +/sbin/ldconfig +%systemd_postun_with_restart fwupd.service + +%files -f %{name}.lang +%doc README.md AUTHORS NEWS +%license COPYING +%config(noreplace)%{_sysconfdir}/fwupd.conf +%dir %{_libexecdir}/fwupd +%{_libexecdir}/fwupd/fwupd +%{_bindir}/fwupdmgr +%{_sysconfdir}/pki/fwupd +%{_sysconfdir}/pki/fwupd-metadata +%{_sysconfdir}/dbus-1/system.d/org.freedesktop.fwupd.conf +%{_datadir}/app-info/xmls/org.freedesktop.fwupd.xml +%{_datadir}/dbus-1/interfaces/org.freedesktop.fwupd.xml +%{_datadir}/polkit-1/actions/org.freedesktop.fwupd.policy +%{_datadir}/polkit-1/rules.d/org.freedesktop.fwupd.rules +%{_datadir}/dbus-1/system-services/org.freedesktop.fwupd.service +%{_datadir}/man/man1/fwupdmgr.1.gz +%{_unitdir}/fwupd-offline-update.service +%{_unitdir}/fwupd.service +%{_unitdir}/system-update.target.wants/ +%dir %{_localstatedir}/lib/fwupd +%{_libdir}/libfwupd*.so.* +%{_libdir}/girepository-1.0/Fwupd-1.0.typelib +/usr/lib/udev/rules.d/*.rules +%dir %{_libdir}/fwupd-plugins-2 +%{_libdir}/fwupd-plugins-2/libfu_plugin_colorhug.so +%{_libdir}/fwupd-plugins-2/libfu_plugin_dfu.so +%{_libdir}/fwupd-plugins-2/libfu_plugin_ebitdo.so +%{_libdir}/fwupd-plugins-2/libfu_plugin_test.so +%{_libdir}/fwupd-plugins-2/libfu_plugin_udev.so +%if 0%{?have_uefi} +%{_libdir}/fwupd-plugins-2/libfu_plugin_uefi.so +%endif +%{_libdir}/fwupd-plugins-2/libfu_plugin_upower.so +%{_libdir}/fwupd-plugins-2/libfu_plugin_usb.so +%ghost %{_localstatedir}/lib/fwupd/gnupg + +# merged from libdfu upstream +%{_bindir}/dfu-tool +%{_datadir}/man/man1/dfu-tool.1.gz +%{_libdir}/girepository-1.0/Dfu-1.0.typelib +%{_libdir}/libdfu*.so.* + +%files devel +%{_datadir}/gir-1.0/Fwupd-1.0.gir +%{_datadir}/gtk-doc/html/libfwupd +%{_includedir}/fwupd-1 +%{_libdir}/libfwupd*.so +%{_libdir}/pkgconfig/fwupd.pc + +# merged from libdfu upstream +%{_datadir}/gir-1.0/Dfu-1.0.gir +%{_libdir}/libdfu*.so + +%changelog +* Mon Jul 03 2017 Richard Hughes 0.8.2-3 +- Do not use systemd protections not yet available in RHEL. +- Resolves: #1380827 + +* Mon May 08 2017 Richard Hughes 0.8.2-2 +- Do not use the LVFS by default. +- Resolves: #1380827 + +* Thu Apr 20 2017 Richard Hughes 0.8.2-1 +- Initial upload for RHEL. +- Resolves: #1380827