mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
parent
d41429e184
commit
d5aefcf0c1
74
testing/fwupd/APKBUILD
Normal file
74
testing/fwupd/APKBUILD
Normal file
@ -0,0 +1,74 @@
|
||||
# Contributor: Timo Teräs <timo.teras@iki.fi>
|
||||
# Maintainer: Timo Teräs <timo.teras@iki.fi>
|
||||
pkgname=fwupd
|
||||
pkgver=1.2.9
|
||||
pkgrel=0
|
||||
pkgdesc="Firmware update daemon"
|
||||
url="https://fwupd.org/"
|
||||
arch="all"
|
||||
license="LGPL-2.1-or-later"
|
||||
depends="dbus"
|
||||
makedepends="meson help2man linux-headers gnutls-utils
|
||||
python py3-pillow py3-gobject3 py3-cairo ttf-opensans
|
||||
glib-dev libgudev-dev libgusb-dev libgcab-dev json-glib-dev
|
||||
gobject-introspection-dev vala cairo-dev fontconfig-dev freetype-dev
|
||||
polkit-dev libxmlb-dev libarchive-dev libsoup-dev gpgme-dev eudev-dev gnutls-dev
|
||||
efivar-dev elfutils-dev gnu-efi-dev libsmbios_c-dev
|
||||
"
|
||||
checkdepends="bubblewrap"
|
||||
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-openrc"
|
||||
source="fwupd-$pkgver.tar.gz::https://github.com/hughsie/fwupd/archive/$pkgver.tar.gz
|
||||
$pkgname.initd
|
||||
fix-no-systemd.patch
|
||||
fixes.patch
|
||||
"
|
||||
builddir="$srcdir/fwupd-$pkgver"
|
||||
|
||||
build() {
|
||||
meson \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--localstatedir=/var \
|
||||
--buildtype=release \
|
||||
-Ddaemon=true \
|
||||
-Dagent=true \
|
||||
-Dconsolekit=true \
|
||||
-Dfirmware-packager=true \
|
||||
-Dgpg=true \
|
||||
-Dgtkdoc=false \
|
||||
-Dlvfs=true \
|
||||
-Dman=true \
|
||||
-Dpkcs7=true \
|
||||
-Dplugin_altos=false \
|
||||
-Dplugin_amt=true \
|
||||
-Dplugin_dell=true \
|
||||
-Dplugin_dummy=false \
|
||||
-Dplugin_synaptics=true \
|
||||
-Dplugin_thunderbolt=true \
|
||||
-Dplugin_redfish=false \
|
||||
-Dplugin_uefi=true \
|
||||
-Dplugin_nvme=true \
|
||||
-Dplugin_modem_manager=false \
|
||||
-Dsystemd=false \
|
||||
-Delogind=false \
|
||||
-Dtests=true \
|
||||
-Dudevdir=/lib/udev \
|
||||
. output
|
||||
ninja -C output
|
||||
}
|
||||
|
||||
check() {
|
||||
ninja -C output test
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" ninja -C output install
|
||||
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
|
||||
}
|
||||
|
||||
sha512sums="942c6bad822dc65846d1984850798bec677b6a312100c6f5971fc9d5906c182267182ef29e0834bbd2b83fe72b11c3b6e50855d90388d2bf85e8a3b95d0a5a68 fwupd-1.2.9.tar.gz
|
||||
ad569d342cf14290d4924582af92c7d634139cf04eb1d981b4a4573ed56a8f9115914adefa925c8486e1126dd4fbed36a786aad4afd07de14dd6cbdf7982b766 fwupd.initd
|
||||
2f362ff98982b2038e2abfcfd698f26a06d1aff5ec1c8a4299e6dc23b85a3ef7036be62de45365772ba65578597a255309fa666f2c813f5f52ca0eab378c4135 fix-no-systemd.patch
|
||||
0298319cb5249326ef2576612165a1c4775128fcbd58a19367385816873b56d59cfdcc2d0ef8c95e92fc7a454974aede361de43f132c024272cb5fce7b6dbbcb fixes.patch"
|
||||
49
testing/fwupd/fix-no-systemd.patch
Normal file
49
testing/fwupd/fix-no-systemd.patch
Normal file
@ -0,0 +1,49 @@
|
||||
Only in fwupd-1.2.9.new: output
|
||||
diff -ru fwupd-1.2.9/src/fu-tool.c fwupd-1.2.9.new/src/fu-tool.c
|
||||
--- fwupd-1.2.9/src/fu-tool.c 2019-05-20 13:17:42.000000000 +0300
|
||||
+++ fwupd-1.2.9.new/src/fu-tool.c 2019-06-07 14:50:24.112996194 +0300
|
||||
@@ -113,8 +113,10 @@
|
||||
{
|
||||
g_autoptr(GError) error_local = NULL;
|
||||
|
||||
+#ifdef HAVE_SYSTEMD
|
||||
if (!fu_systemd_unit_stop (fu_util_get_systemd_unit (), &error_local))
|
||||
g_debug ("Failed top stop daemon: %s", error_local->message);
|
||||
+#endif
|
||||
if (!fu_engine_load (priv->engine, flags, error))
|
||||
return FALSE;
|
||||
if (fu_engine_get_tainted (priv->engine)) {
|
||||
diff -ru fwupd-1.2.9/src/fu-util-common.c fwupd-1.2.9.new/src/fu-util-common.c
|
||||
--- fwupd-1.2.9/src/fu-util-common.c 2019-05-20 13:17:42.000000000 +0300
|
||||
+++ fwupd-1.2.9.new/src/fu-util-common.c 2019-06-07 14:52:03.371845913 +0300
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
#ifdef HAVE_SYSTEMD
|
||||
#include "fu-systemd.h"
|
||||
-#endif
|
||||
|
||||
#define SYSTEMD_FWUPD_UNIT "fwupd.service"
|
||||
#define SYSTEMD_SNAP_FWUPD_UNIT "snap.fwupd.fwupd.service"
|
||||
@@ -61,6 +60,7 @@
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
+#endif
|
||||
|
||||
void
|
||||
fu_util_print_data (const gchar *title, const gchar *msg)
|
||||
diff -ru fwupd-1.2.9/src/fu-util.c fwupd-1.2.9.new/src/fu-util.c
|
||||
--- fwupd-1.2.9/src/fu-util.c 2019-05-20 13:17:42.000000000 +0300
|
||||
+++ fwupd-1.2.9.new/src/fu-util.c 2019-06-07 14:53:13.841029263 +0300
|
||||
@@ -2122,7 +2122,11 @@
|
||||
if (!fu_util_prompt_for_boolean (FALSE))
|
||||
return TRUE;
|
||||
}
|
||||
+#ifdef HAVE_SYSTEMD
|
||||
return fu_systemd_unit_stop (fu_util_get_systemd_unit (), error);
|
||||
+#else
|
||||
+ return TRUE;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void
|
||||
18
testing/fwupd/fixes.patch
Normal file
18
testing/fwupd/fixes.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff -ru fwupd-1.2.9.orig/src/fu-common.c fwupd-1.2.9/src/fu-common.c
|
||||
--- fwupd-1.2.9.orig/src/fu-common.c 2019-05-20 13:17:42.000000000 +0300
|
||||
+++ fwupd-1.2.9/src/fu-common.c 2019-06-09 13:48:00.861388043 +0300
|
||||
@@ -460,7 +460,6 @@
|
||||
fu_common_add_argv (argv, "--die-with-parent");
|
||||
fu_common_add_argv (argv, "--ro-bind /usr /usr");
|
||||
fu_common_add_argv (argv, "--ro-bind /lib /lib");
|
||||
- fu_common_add_argv (argv, "--ro-bind /lib64 /lib64");
|
||||
fu_common_add_argv (argv, "--ro-bind /bin /bin");
|
||||
fu_common_add_argv (argv, "--ro-bind /sbin /sbin");
|
||||
fu_common_add_argv (argv, "--dir /tmp");
|
||||
diff -ru fwupd-1.2.9.orig/data/tests/builder/startup.sh fwupd-1.2.9/data/tests/builder/startup.sh
|
||||
--- fwupd-1.2.9.orig/data/tests/builder/startup.sh 2019-05-20 13:17:42.000000000 +0300
|
||||
+++ fwupd-1.2.9/data/tests/builder/startup.sh 2019-06-07 21:43:43.543150907 +0300
|
||||
@@ -1,2 +1,2 @@
|
||||
-#/bin/sh
|
||||
+#!/bin/sh
|
||||
cat source.bin | rev > firmware.bin
|
||||
13
testing/fwupd/fwupd.initd
Normal file
13
testing/fwupd/fwupd.initd
Normal file
@ -0,0 +1,13 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
description="Firmware update daemon"
|
||||
pidfile="/var/run/fwupd.pid"
|
||||
command="/usr/libexec/fwupd/fwupd"
|
||||
command_background="true"
|
||||
|
||||
depend() {
|
||||
need dbus
|
||||
before xdm
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user