public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rust-tiny-dfr] epel10: Initial import; Fixes: RHBZ#2227479
@ 2026-09-25 10:38 Davide Cavalca
  0 siblings, 0 replies; only message in thread
From: Davide Cavalca @ 2026-09-25 10:38 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/rust-tiny-dfr
Branch : epel10
Commit : 13cacf478a87c8b714eac013eddfb2340d24dab2
Author : Davide Cavalca <dcavalca@fedoraproject.org>
Date   : 2023-08-06T15:22:39+02:00
Stats  : +130/-0 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/rust-tiny-dfr/c/13cacf478a87c8b714eac013eddfb2340d24dab2?branch=epel10

Log:
Initial import; Fixes: RHBZ#2227479

---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..97118b8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/tiny-dfr-0.1.1.crate

diff --git a/f7e84ad69fa3754993e637850e5344702047b2de.patch b/f7e84ad69fa3754993e637850e5344702047b2de.patch
new file mode 100644
index 0000000..2233dc6
--- /dev/null
+++ b/f7e84ad69fa3754993e637850e5344702047b2de.patch
@@ -0,0 +1,52 @@
+From f7e84ad69fa3754993e637850e5344702047b2de Mon Sep 17 00:00:00 2001
+From: Sasha Finkelstein <fnkl.kernel@gmail.com>
+Date: Sun, 30 Jul 2023 12:27:34 +0200
+Subject: [PATCH] Actually use c_char instead of assuming it is the same as u8
+
+Reported-By: Davide Cavalca <davide@cavalca.name>
+---
+ src/main.rs | 17 +++++++----------
+ 1 file changed, 7 insertions(+), 10 deletions(-)
+
+diff --git a/src/main.rs b/src/main.rs
+index 03c1d81..caa65ed 100644
+--- a/src/main.rs
++++ b/src/main.rs
+@@ -22,7 +22,7 @@ use input::{
+         keyboard::{KeyboardEvent, KeyboardEventTrait, KeyState}
+     }
+ };
+-use libc::{O_RDONLY, O_RDWR, O_WRONLY};
++use libc::{O_RDONLY, O_RDWR, O_WRONLY, c_char};
+ use input_linux::{uinput::UInputHandle, EventKind, Key, SynchronizeKind};
+ use input_linux_sys::{uinput_setup, input_id, timeval, input_event};
+ use nix::poll::{poll, PollFd, PollFlags};
+@@ -259,6 +259,11 @@ fn main() {
+             uinput.set_keybit(button.action).unwrap();
+         }
+     }
++    let mut dev_name_c = [0 as c_char; 80];
++    let dev_name = "Dynamic Function Row Virtual Input Device".as_bytes();
++    for i in 0..dev_name.len() {
++        dev_name_c[i] = dev_name[i] as c_char;
++    }
+     uinput.dev_setup(&uinput_setup {
+         id: input_id {
+             bustype: 0x19,
+@@ -267,15 +272,7 @@ fn main() {
+             version: 1
+         },
+         ff_effects_max: 0,
+-        name: [
+-            b'D', b'y', b'n', b'a', b'm', b'i', b'c', b' ',
+-            b'F', b'u', b'n', b'c', b't', b'i', b'o', b'n', b' ',
+-            b'R', b'o', b'w', b' ',
+-            b'V', b'i', b'r', b't', b'u', b'a', b'l', b' ',
+-            b'I', b'n', b'p', b'u', b't', b' ',
+-            b'D', b'e', b'v', b'i', b'c', b'e',
+-            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+-        ]
++        name: dev_name_c
+     }).unwrap();
+     uinput.dev_create().unwrap();
+ 

diff --git a/rust-tiny-dfr.spec b/rust-tiny-dfr.spec
new file mode 100644
index 0000000..724b205
--- /dev/null
+++ b/rust-tiny-dfr.spec
@@ -0,0 +1,76 @@
+# Generated by rust2rpm 24
+%bcond_without check
+
+%global crate tiny-dfr
+
+Name:           rust-tiny-dfr
+Version:        0.1.1
+Release:        %autorelease
+Summary:        Most basic dynamic function row daemon possible
+
+License:        MIT AND Apache-2.0
+URL:            https://crates.io/crates/tiny-dfr
+Source:         %{crates_source}
+# Actually use c_char instead of assuming it is the same as u8
+Patch:          https://github.com/WhatAmISupposedToPutHere/tiny-dfr/commit/f7e84ad69fa3754993e637850e5344702047b2de.patch
+
+BuildRequires:  rust-packaging >= 23
+BuildRequires:  systemd-rpm-macros
+
+%global _description %{expand:
+The most basic dynamic function row daemon possible.}
+
+%description %{_description}
+
+%package     -n %{crate}
+Summary:        %{summary}
+# See LICENSE.dependencies for the full breakdown
+License:        Apache-2.0 AND BSD-3-Clause AND CC0-1.0 AND ISC AND LGPL-2.1-or-later AND MIT AND MPL-2.0 AND Unicode-DFS-2016 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
+
+%description -n %{crate} %{_description}
+
+%files       -n %{crate}
+%license LICENSE
+%license LICENSE.material
+%license LICENSE.dependencies
+%doc README.md
+%{_bindir}/tiny-dfr
+%{_datadir}/%{crate}/
+%{_udevrulesdir}/*.rules
+%{_unitdir}/%{crate}.service
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+%cargo_license_summary
+%{cargo_license} > LICENSE.dependencies
+
+%install
+%cargo_install
+
+install -Dpm0644 -t %{buildroot}%{_datadir}/%{crate} share/%{crate}/*.svg
+install -Dpm0644 -t %{buildroot}%{_udevrulesdir} etc/udev/rules.d/*.rules
+install -Dpm0644 -t %{buildroot}%{_unitdir} etc/systemd/system/%{crate}.service
+
+%post -n %{crate}
+%systemd_post %{crate}.service
+
+%preun -n %{crate}
+%systemd_preun %{crate}.service
+
+%postun -n %{crate}
+%systemd_postun_with_restart %{crate}.service
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+%autochangelog

diff --git a/sources b/sources
new file mode 100644
index 0000000..713b6f5
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (tiny-dfr-0.1.1.crate) = 303b8e8a4cd53b265d5be5e116db93264488dc468dbb42488d06f6e3976a48aef013453ab176451710179e14132ce00816436a8f13fa0eca3c703155e2365b17

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-25 10:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 10:38 [rpms/rust-tiny-dfr] epel10: Initial import; Fixes: RHBZ#2227479 Davide Cavalca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox