Hello community,

here is the log from the commit of package thunderbolt-user-space for 
openSUSE:Factory checked in at 2020-09-14 12:25:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/thunderbolt-user-space (Old)
 and      /work/SRC/openSUSE:Factory/.thunderbolt-user-space.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "thunderbolt-user-space"

Mon Sep 14 12:25:08 2020 rev:7 rq:829914 version:0.9.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/thunderbolt-user-space/thunderbolt-user-space.changes
    2019-12-23 22:45:17.942020127 +0100
+++ 
/work/SRC/openSUSE:Factory/.thunderbolt-user-space.new.4249/thunderbolt-user-space.changes
  2020-09-14 12:28:47.005116063 +0200
@@ -1,0 +2,6 @@
+Tue Aug  4 10:22:33 UTC 2020 - Frederik Möllers <frede...@die-sinlosen.de>
+
+- Add support for Thunderbolt to initramfs (approved devices are authorized 
automatically)
+  added: 0002-initramfs-support.patch
+
+-------------------------------------------------------------------

New:
----
  0002-initramfs-support.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ thunderbolt-user-space.spec ++++++
--- /var/tmp/diff_new_pack.awnBV2/_old  2020-09-14 12:28:48.285116880 +0200
+++ /var/tmp/diff_new_pack.awnBV2/_new  2020-09-14 12:28:48.289116882 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package thunderbolt-user-space
 #
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,12 +25,15 @@
 URL:            https://github.com/intel/thunderbolt-software-user-space
 Source:         
https://github.com/01org/thunderbolt-software-user-space/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 Patch0:         0001-flags-add-boost_system-library.patch
+# Add support for Thunderbolt devices using Secure Connection in initramfs
+Patch1:         0002-initramfs-support.patch
 BuildRequires:  cmake >= 2.4.6
 BuildRequires:  gcc-c++ >= 4.7
 BuildRequires:  libdbus-c++-devel
 BuildRequires:  libnl3-devel
 BuildRequires:  pkgconfig
 BuildRequires:  txt2tags
+BuildRequires:  pkgconfig(dracut)
 BuildRequires:  pkgconfig(udev)
 Requires:       procps
 %if 0%{?suse_version} > 1315
@@ -53,6 +56,7 @@
 %prep
 %setup -q -n thunderbolt-software-user-space-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 %cmake \
@@ -76,10 +80,13 @@
 %{_bindir}/tbtadm
 %{_udevrulesdir}/60-tbtacl.rules
 %{_udevrulesdir}/60-tbtxdomain.rules
+%dir %{_prefix}/lib/dracut/modules.d/35thunderbolt/
+%{_prefix}/lib/dracut/modules.d/35thunderbolt/module-setup.sh
 %{_prefix}/lib/udev/tbtacl
 %{_prefix}/lib/udev/tbtacl-write
 %{_prefix}/lib/udev/tbtxdomain
 %{_mandir}/man1/tbtadm.1%{?ext_man}
 %{_datadir}/bash-completion/completions/tbtadm
+%config %{_sysconfdir}/dracut.conf.d/35-thunderbolt.conf
 
 %changelog

++++++ 0002-initramfs-support.patch ++++++
Index: thunderbolt-software-user-space-0.9.3/CMakeLists.txt
===================================================================
--- thunderbolt-software-user-space-0.9.3.orig/CMakeLists.txt
+++ thunderbolt-software-user-space-0.9.3/CMakeLists.txt
@@ -8,14 +8,17 @@ include(GNUInstallDirs)
 
 include(FindPkgConfig)
 pkg_get_variable(PKG_CONFIG_UDEV_DIR udev udevdir)
+pkg_get_variable(PKG_CONFIG_DRACUT_MOD_DIR dracut dracutmodulesdir)
 
 set(UDEV_RULES_DIR "${PKG_CONFIG_UDEV_DIR}/rules.d" CACHE PATH "Install path 
for udev rules")
 set(UDEV_BIN_DIR   "${PKG_CONFIG_UDEV_DIR}"         CACHE PATH "Install path 
for udev-triggered executables")
 set(RULES_PREFIX   "60"                             CACHE PATH "The numeric 
prefix for udev rules file")
+set(DRACUT_MOD_DIR "${PKG_CONFIG_DRACUT_MOD_DIR}"   CACHE PATH "Install path 
for dracut modules")
 
 set(TBT_CXXFLAGS ${CXX_FLAGS} -Wall -Wextra)
 
 add_subdirectory(common)
+add_subdirectory(dracut-module)
 add_subdirectory(tbtacl)
 add_subdirectory(tbtxdomain)
 add_subdirectory(tbtadm)
@@ -85,6 +88,7 @@ endfunction()
 foreach(dir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}"
             "${UDEV_RULES_DIR}"
             "${UDEV_BIN_DIR}"
+            "${DRACUT_MOD_DIR}"
             "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_MANDIR}/man1"
             
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/bash-completion/completions")
   ALL_ANCESTOR_DIRS(LIST_FOR_RPM "${dir}")
Index: thunderbolt-software-user-space-0.9.3/dracut-module/35-thunderbolt.conf
===================================================================
--- /dev/null
+++ thunderbolt-software-user-space-0.9.3/dracut-module/35-thunderbolt.conf
@@ -0,0 +1,2 @@
+# Uncomment this line to add thunderbolt support to the initramfs
+#add_dracutmodules+=thunderbolt
Index: thunderbolt-software-user-space-0.9.3/dracut-module/CMakeLists.txt
===================================================================
--- /dev/null
+++ thunderbolt-software-user-space-0.9.3/dracut-module/CMakeLists.txt
@@ -0,0 +1,8 @@
+set(MODULE_NAME 35thunderbolt)
+set(MODULE_FILE "module-setup.sh")
+set(CONFIG_FILE "35-thunderbolt.conf")
+
+install(PROGRAMS     "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FILE}"
+        DESTINATION   ${DRACUT_MOD_DIR}/${MODULE_NAME})
+install(FILES        "${CMAKE_CURRENT_SOURCE_DIR}/${CONFIG_FILE}"
+        DESTINATION   ${CMAKE_INSTALL_FULL_SYSCONFDIR}/dracut.conf.d)
Index: thunderbolt-software-user-space-0.9.3/dracut-module/module-setup.sh
===================================================================
--- /dev/null
+++ thunderbolt-software-user-space-0.9.3/dracut-module/module-setup.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+# called by dracut
+check() {
+    # do not add this module by default
+    return 255
+}
+
+# called by dracut
+depends() {
+    return 0
+}
+
+# called by dracut
+installkernel() {
+    # make sure the thunderbolt kernel module is loaded
+    instmods thunderbolt
+    return 0
+}
+
+# called by dracut
+install() {
+       # Location of thunderbolt acl auth data
+    local _tbt_auth_data
+    _tbt_auth_data="/var/lib/thunderbolt"
+
+       # Install necessary binaries/scripts/udev rules
+    inst_binary /lib/udev/tbtacl-write
+    # dependencies for tbtacl
+    inst_binary /usr/bin/basename
+    inst_binary /usr/bin/dirname
+    inst_binary /usr/bin/grep
+    inst_binary /usr/bin/logger
+    # end of dependencies
+    inst_script /lib/udev/tbtacl
+    inst_rules /lib/udev/rules.d/60-tbtacl.rules
+       # Install auth data
+    for auth_file in $(find "$_tbt_auth_data" -type f)
+    do :
+        inst_simple "$auth_file"
+    done
+}

Reply via email to