arepaconcafe commited on
Commit
8e91b44
·
verified ·
1 Parent(s): c440f6d

Upload 132 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +1 -0
  2. PKG/Neko-Wizard/template +48 -0
  3. PKG/ZerotierOne-Void-Linux/README.md +45 -0
  4. PKG/ZerotierOne-Void-Linux/zerotierone-1.16.1_1.x86_64.xbps +3 -0
  5. PKG/ZerotierOne-Void-Linux/zerotierone/ignore.s +0 -0
  6. PKG/ZerotierOne-Void-Linux/zerotierone/template +49 -0
  7. PKG/actkbd-0.2.8/AUTHORS +1 -0
  8. PKG/actkbd-0.2.8/COPYING +340 -0
  9. PKG/actkbd-0.2.8/ChangeLog +93 -0
  10. PKG/actkbd-0.2.8/FAQ +96 -0
  11. PKG/actkbd-0.2.8/Makefile +43 -0
  12. PKG/actkbd-0.2.8/NEWS +10 -0
  13. PKG/actkbd-0.2.8/README +331 -0
  14. PKG/actkbd-0.2.8/TODO +80 -0
  15. PKG/actkbd-0.2.8/actkbd +0 -0
  16. PKG/actkbd-0.2.8/actkbd.c +453 -0
  17. PKG/actkbd-0.2.8/actkbd.h +169 -0
  18. PKG/actkbd-0.2.8/actkbd.o +0 -0
  19. PKG/actkbd-0.2.8/config.c +481 -0
  20. PKG/actkbd-0.2.8/config.o +0 -0
  21. PKG/actkbd-0.2.8/linux.c +234 -0
  22. PKG/actkbd-0.2.8/linux.o +0 -0
  23. PKG/actkbd-0.2.8/mask.c +268 -0
  24. PKG/actkbd-0.2.8/mask.o +0 -0
  25. PKG/actkbd-0.2.8/samples/actkbd.conf +85 -0
  26. PKG/actkbd-0.2.8/samples/udev.rules +22 -0
  27. PKG/brave-bin/template +35 -0
  28. PKG/faugus-launcher/template +19 -0
  29. PKG/heroic-games/template +47 -0
  30. PKG/kernel-neko-rt/template +19 -0
  31. PKG/kernel-neko-void/.github/workflows/realtime.yml +150 -0
  32. PKG/kernel-neko-void/.github/workflows/zen.yml +117 -0
  33. PKG/kernel-neko-void/README.md +2 -0
  34. PKG/kernel-neko-void/kernel-neko-rt/template +19 -0
  35. PKG/kernel-neko-void/kernel-neko-zen/INSTALL +15 -0
  36. PKG/kernel-neko-void/kernel-neko-zen/template +18 -0
  37. PKG/kernel-neko-zen/INSTALL +15 -0
  38. PKG/kernel-neko-zen/template +18 -0
  39. PKG/librewolf/files/librewolf.desktop +386 -0
  40. PKG/librewolf/files/stab.h +71 -0
  41. PKG/librewolf/files/vendor.js +11 -0
  42. PKG/librewolf/patches/big-endian-image-decoders.patch +88 -0
  43. PKG/librewolf/patches/clang-sysroot-toolchain-fix.patch +18 -0
  44. PKG/librewolf/patches/firefox-146-musl-linux-sys-prctl-conflict.patch +14 -0
  45. PKG/librewolf/patches/fix-fortify-system-wrappers.patch +12 -0
  46. PKG/librewolf/patches/fix-i686-ppc-musl.patch +11 -0
  47. PKG/librewolf/patches/lto-thin.patch +14 -0
  48. PKG/librewolf/patches/mallinfo.patch +34 -0
  49. PKG/librewolf/patches/ppc32-fix-build.patch +36 -0
  50. PKG/librewolf/patches/rust-configure.patch +68 -0
.gitattributes CHANGED
@@ -60,3 +60,4 @@ nekovoid-beta-7.0-xorg.iso filter=lfs diff=lfs merge=lfs -text
60
  nekovoid-beta-7.1-xorg.iso filter=lfs diff=lfs merge=lfs -text
61
  nekovoid-beta-7.1-xlibre.iso filter=lfs diff=lfs merge=lfs -text
62
  2026-05-06[[:space:]]10-22-06.mp4 filter=lfs diff=lfs merge=lfs -text
 
 
60
  nekovoid-beta-7.1-xorg.iso filter=lfs diff=lfs merge=lfs -text
61
  nekovoid-beta-7.1-xlibre.iso filter=lfs diff=lfs merge=lfs -text
62
  2026-05-06[[:space:]]10-22-06.mp4 filter=lfs diff=lfs merge=lfs -text
63
+ PKG/ZerotierOne-Void-Linux/zerotierone-1.16.1_1.x86_64.xbps filter=lfs diff=lfs merge=lfs -text
PKG/Neko-Wizard/template ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Template file for 'Neko-Wizard'
2
+ pkgname=Neko-Wizard
3
+ version=6.8
4
+ revision=2
5
+ build_style=meson
6
+ hostmakedepends="pkg-config meson ninja cmake"
7
+ makedepends="gtk4-devel"
8
+ short_desc="Neko Store - Aplicación GTK4 (descripción breve)"
9
+ maintainer="Tu Nombre <tu@email.com>"
10
+ license="GPL-3.0-or-later" # Verifica la licencia real del proyecto
11
+ homepage="https://codeberg.org/javiercplus/Neko-Wizard"
12
+ distfiles="https://codeberg.org/javiercplus/Neko-Wizard/archive/${version}.tar.gz"
13
+ checksum="2d6fc2a0f3bddfda32b58cb78b33ff07231d00b27ddb689024f91120558525c8"
14
+
15
+ do_install() {
16
+ # Crear todos los directorios base necesarios primero
17
+ vmkdir usr/lib/neko-store
18
+ vmkdir usr/bin
19
+ vmkdir usr/share/applications
20
+
21
+ # Instalar el binario compilado
22
+ vcopy build/neko-store usr/lib/neko-store/neko-store
23
+ chmod 755 "${DESTDIR}/usr/lib/neko-store/neko-store"
24
+
25
+ # Copiar la carpeta de recursos
26
+ vcopy resources usr/lib/neko-store/resources
27
+
28
+ # Enlace simbólico en /usr/bin (ahora el directorio existe)
29
+ ln -s ../lib/neko-store/neko-store "${DESTDIR}/usr/bin/neko-store"
30
+
31
+ # Crear e instalar el archivo .desktop
32
+ cat > "${DESTDIR}/usr/share/applications/neko-store.desktop" << EOF
33
+ [Desktop Entry]
34
+ Type=Application
35
+ Name=Neko Wizard
36
+ Comment=Gestión de algo con Neko Wizard
37
+ Exec=neko-store
38
+ Icon=system-software-install
39
+ Categories=Utility;
40
+ Terminal=false
41
+ EOF
42
+ chmod 644 "${DESTDIR}/usr/share/applications/neko-store.desktop"
43
+
44
+ # Instalar licencia
45
+ if [ -f LICENSE ]; then
46
+ vlicense LICENSE
47
+ fi
48
+ }
PKG/ZerotierOne-Void-Linux/README.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ZeroTierOne for Void linux
2
+ ======
3
+
4
+ # Install xbps package:
5
+ ```
6
+ cd $HOME
7
+ #add libs
8
+ sudo xbps-install -S openssl libstdc++ glibc libgcc wget
9
+ #download and install xbps pkg of zerotierone
10
+ wget https://codeberg.org/javiercplus/ZerotierOne-Void-Linux/raw/branch/main/zerotierone-1.16.1_1.x86_64.xbps
11
+ sudo xbps-rindex -a $HOME/zerotierone-1.16.1_1.x86_64.xbps
12
+ sudo xbps-install -R $PWD zerotierone-1.16.1_1
13
+ #add service
14
+ sudo mkdir /etc/sv/zerotier-one
15
+ clear
16
+ echo '#!/bin/sh
17
+ exec 2>&1
18
+ exec /usr/bin/zerotier-one -d' | sudo tee /etc/sv/zerotier-one/run > /dev/null
19
+ sudo chmod +x /etc/sv/zerotier-one/run
20
+ sudo ln -s /etc/sv/zerotier-one/ /var/service/
21
+ ```
22
+ or ...
23
+
24
+ # Build & install:
25
+ ```
26
+ #Download and extract source
27
+ wget https://github.com/franckey02/ZeroTierOne-Void/archive/refs/tags/1.16.1.tar.gz
28
+ tar -xzvf 1.16.1.tar.gz
29
+ #Building
30
+ cd ZeroTierOne-Void-1.16.1
31
+ sudo xbps-install -S git make gcc linux-headers openssl-devel libffi-devel rust cargo openssl libstdc++ glibc libgcc wget
32
+ sudo xbps-install -S pkg-config
33
+ sudo xbps-install -S openssl-devel
34
+ make -j2
35
+ #Install
36
+ sudo make install
37
+ #Add service
38
+ sudo mkdir /etc/sv/zerotier-one
39
+ clear
40
+ echo '#!/bin/sh
41
+ exec 2>&1
42
+ exec /usr/bin/zerotier-one -d' | sudo tee /etc/sv/zerotier-one/run > /dev/null
43
+ sudo chmod +x /etc/sv/zerotier-one/run
44
+ sudo ln -s /etc/sv/zerotier-one/ /var/service/
45
+ ```
PKG/ZerotierOne-Void-Linux/zerotierone-1.16.1_1.x86_64.xbps ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6375f73c1ebc4b883cf32332d2e9517d13c13bc789c1bc05df59e41af6ef55cb
3
+ size 3620042
PKG/ZerotierOne-Void-Linux/zerotierone/ignore.s ADDED
File without changes
PKG/ZerotierOne-Void-Linux/zerotierone/template ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Template file for 'zerotierone'
2
+ pkgname=zerotierone
3
+ version=1.16.1
4
+ revision=1
5
+ build_style=none
6
+ hostmakedepends="pkg-config gcc make git"
7
+ makedepends="openssl-devel libffi-devel rust cargo linux-headers"
8
+ depends=""
9
+ short_desc="ZeroTier One - Software-defined networking platform"
10
+ maintainer="JavierC <franckeycool@gmail.com>"
11
+ license="MIT"
12
+ homepage="https://www.zerotier.com/"
13
+ distfiles="https://github.com/franckey02/ZeroTierOne-Void/archive/refs/tags/${version}.tar.gz"
14
+ checksum=e0919a39c847c61dcecea7e2678e7270400a5e0f6bc0f8f8000b48d0751439c4
15
+
16
+ do_build() {
17
+ cd ${wrksrc}
18
+ make -j$(nproc) ZT_TARGET=linux-x86_64
19
+ }
20
+
21
+ do_install() {
22
+ cd ${wrksrc}
23
+
24
+ # --- CP: Instalar el binario real ---
25
+ vbin zerotier-one # → esto pone /usr/bin/zerotier-one
26
+
27
+ # --- LN: Crear enlaces simbólicos en /usr/bin/ (NO en /usr/sbin/) ---
28
+ # Void prefiere /usr/bin/ para binarios accesibles por usuarios
29
+ # Por eso creamos los enlaces allí, no en /usr/sbin/
30
+ vmkdir usr/bin
31
+ ln -sf ../bin/zerotier-one ${DESTDIR}/usr/bin/zerotier-cli
32
+ ln -sf ../bin/zerotier-one ${DESTDIR}/usr/bin/zerotier-idtool
33
+
34
+ # --- MAN PAGES ---
35
+ if [ -f doc/zerotier-one.8 ]; then
36
+ vman doc/zerotier-one.8
37
+ fi
38
+ if [ -f doc/zerotier-cli.1 ]; then
39
+ vman doc/zerotier-cli.1
40
+ fi
41
+ if [ -f doc/zerotier-idtool.1 ]; then
42
+ vman doc/zerotier-idtool.1
43
+ fi
44
+
45
+ # --- LICENCIA ---
46
+ if [ -f LICENSE ]; then
47
+ vlicense LICENSE
48
+ fi
49
+ }
PKG/actkbd-0.2.8/AUTHORS ADDED
@@ -0,0 +1 @@
 
 
1
+ Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
PKG/actkbd-0.2.8/COPYING ADDED
@@ -0,0 +1,340 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Library General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
281
+
282
+ How to Apply These Terms to Your New Programs
283
+
284
+ If you develop a new program, and you want it to be of the greatest
285
+ possible use to the public, the best way to achieve this is to make it
286
+ free software which everyone can redistribute and change under these terms.
287
+
288
+ To do so, attach the following notices to the program. It is safest
289
+ to attach them to the start of each source file to most effectively
290
+ convey the exclusion of warranty; and each file should have at least
291
+ the "copyright" line and a pointer to where the full notice is found.
292
+
293
+ <one line to give the program's name and a brief idea of what it does.>
294
+ Copyright (C) <year> <name of author>
295
+
296
+ This program is free software; you can redistribute it and/or modify
297
+ it under the terms of the GNU General Public License as published by
298
+ the Free Software Foundation; either version 2 of the License, or
299
+ (at your option) any later version.
300
+
301
+ This program is distributed in the hope that it will be useful,
302
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
+ GNU General Public License for more details.
305
+
306
+ You should have received a copy of the GNU General Public License
307
+ along with this program; if not, write to the Free Software
308
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
309
+
310
+
311
+ Also add information on how to contact you by electronic and paper mail.
312
+
313
+ If the program is interactive, make it output a short notice like this
314
+ when it starts in an interactive mode:
315
+
316
+ Gnomovision version 69, Copyright (C) year name of author
317
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318
+ This is free software, and you are welcome to redistribute it
319
+ under certain conditions; type `show c' for details.
320
+
321
+ The hypothetical commands `show w' and `show c' should show the appropriate
322
+ parts of the General Public License. Of course, the commands you use may
323
+ be called something other than `show w' and `show c'; they could even be
324
+ mouse-clicks or menu items--whatever suits your program.
325
+
326
+ You should also get your employer (if you work as a programmer) or your
327
+ school, if any, to sign a "copyright disclaimer" for the program, if
328
+ necessary. Here is a sample; alter the names:
329
+
330
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
332
+
333
+ <signature of Ty Coon>, 1 April 1989
334
+ Ty Coon, President of Vice
335
+
336
+ This General Public License does not permit incorporating your program into
337
+ proprietary programs. If your program is a subroutine library, you may
338
+ consider it more useful to permit linking proprietary applications with the
339
+ library. If this is what you want to do, use the GNU Library General
340
+ Public License instead of this License.
PKG/actkbd-0.2.8/ChangeLog ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Fri Jul 6 00:25:10 EEST 2007 - Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
2
+ * Release 0.2.8
3
+ * Fixed the auto-detection code so that it fails with an error when no
4
+ input devices are present at all, rather than letting actkbd attempt
5
+ to use /dev/input/event0 and fail with some misleading error message
6
+ (reported by Jerome Borme).
7
+ * Added a sample rule file for udev
8
+ * Note that a udev rule is the recommended way to launch actkbd on Linux
9
+ * Remove version.h - the version string is automatically set in the
10
+ Makefile
11
+ * Documentation updates
12
+
13
+ Sun Aug 20 14:06:59 EEST 2006 - Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
14
+ * Release 0.2.7
15
+ * Fixed a bug in the keyboard autodetection code, where the automatic
16
+ detection would fail if the first entry in /proc/bus/input/devices
17
+ was not a keyboard (reported by Jerome Borme).
18
+ * Improved the Linux-specific information in the README.
19
+ * Minor bugfixes
20
+
21
+ Tue May 2 21:28:16 EEST 2006 - Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
22
+ * Release 0.2.6
23
+ * Updated the copyright notices
24
+ * Various minor fixes
25
+ * Updated the ToDo list, dropping several items
26
+ * Minor documentation updates
27
+
28
+ Mon Mar 13 23:38:59 EET 2006 - Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
29
+ * Release 0.2.5
30
+ * Added the `set()' and `unset()' attributes to manipulate the internal
31
+ state mask of actkbd
32
+ * Documentation updates
33
+ * Minor code clean-ups
34
+
35
+ Thu Mar 9 16:08:27 EET 2006 - Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
36
+ * Release 0.2.4
37
+ * The event type field is now a bitmask, rather than a simple value,
38
+ which allows multiple event types to be handled in a single entry.
39
+ * Minor code clean-ups.
40
+
41
+ Thu Mar 9 01:12:19 EET 2006 - Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
42
+ * Release 0.2.3
43
+ * Added the `not' attribute
44
+ * Minor documentation updates and clean-ups
45
+
46
+ Tue Mar 7 19:48:04 EET 2006 - Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
47
+ * Release 0.2.2
48
+ * Added the `ledon()' and `ledoff()' attributes to control the
49
+ keyboard LEDs.
50
+ * Documentation updates
51
+
52
+ Tue Mar 7 16:33:33 EET 2006 - Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
53
+ * Release 0.2.1
54
+ * Added the `key()',`rel()' and `rep()' attributes that allow the
55
+ injection of keyboard events to the system input layer.
56
+ * Added the `any' and `all' attributes to fine tune key matching.
57
+ * Documentation updates
58
+
59
+ Tue Mar 7 02:32:15 EET 2006 - Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
60
+ * Release 0.2.0
61
+ * Added the `grab'/`ungrab' attributes that allow keyboard grabbbing
62
+ * Added the `grabbed'/`ungrabbed' attributes to fine tune the key
63
+ shortcut configuration
64
+ * Added the `exec'/`noexec' attributes to control the execution of
65
+ external commands
66
+ * Added the `ignrel'/`rcvrel'/`allrel' attributes to allow for key
67
+ combinations where the keys are pressed sequentially rather than
68
+ simultaneously.
69
+ * Fixed the -v/--verbose help message line
70
+ * Updated documentation
71
+ * Some minor Makefile fixes
72
+ * Minor fixes and clean-ups here and there
73
+
74
+ Tue Nov 22 23:53:12 EEST 2005 - Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
75
+ * Release 0.1.2
76
+ * Improve automatic keyboard detection
77
+
78
+ Sat Aug 20 02:09:15 EEST 2005 - Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
79
+ * Release 0.1.1
80
+ * Minor documentation changes
81
+ * Make the default configuration file location
82
+ follow the sysconfdir Makefile variable
83
+
84
+ Fri Aug 19 10:53:12 EEST 2005 - Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
85
+ * Initial public release (0.1.0)
86
+ * Issue a warning (instead of error) on a missing configuration file
87
+ * Add pidfile support
88
+ * Minor bugfixes
89
+ * Minor documentation changes
90
+
91
+ Fri Aug 19 00:48:28 EEST 2005 - Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
92
+ * Initial testing release (0.0.1)
93
+
PKG/actkbd-0.2.8/FAQ ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ * Why yet another keyboard daemon ?
2
+
3
+ Because I needed a daemon that:
4
+
5
+ - is small and simple
6
+ - is NOT X Window based, so that it's usable even from the console
7
+ - can execute external programs
8
+ - can handle key combinations
9
+
10
+
11
+ * What about the other daemons ?
12
+
13
+ I had a look at the following:
14
+
15
+ - lineakd:
16
+ pros: modules
17
+ cons: X-based
18
+
19
+ - pbbuttonsd:
20
+ pros: not X-based (IIRC)
21
+ cons: could not find how to execute external programs, Mac-centric,
22
+ bloated with PM and other non-keyboard stuff.
23
+
24
+ - esekeyd
25
+ pros: not X-based, executes external programs, keyboard detection
26
+ cons: does not support key combinations
27
+
28
+ I used a modified (i.e. with limited combination support) esekeyd
29
+ for quite some time, until I decided to write my own daemon.
30
+
31
+ - keyed
32
+ pros: not X-based, executes external programs
33
+ cons: no repeat/release event support, no device detection
34
+
35
+ - evkeyd
36
+ pros: not X-based
37
+ cons: no external program execution, no key combinations
38
+
39
+
40
+ * What does the name mean ?
41
+
42
+ Simply that actkbd ACTs on KeyBoarD events. Or maybe that it is an ACTing
43
+ KeyBoard Daemon. Or...
44
+
45
+
46
+ * Does it work ?
47
+
48
+ It is now launched at boot time on my system and it seems to work without any
49
+ problems. I will still have to receive quite a bit of feedback before I mark it
50
+ as stable, though.
51
+
52
+
53
+ * How does it work ?
54
+
55
+ To find out read the `Internals' section in the README. Then read the source
56
+ code itself for details.
57
+
58
+
59
+ * Are release events useful ?
60
+
61
+ Yes, I think so. A common example could be that of a battery monitor. You want
62
+ it to appear when you press a key and then disappear (i.e. be terminated) when
63
+ you release it, without having to manually kill it each time.
64
+
65
+
66
+ * I found a bug !
67
+
68
+ Good! Now report it at <nyb@users.sourceforge.net>... or even better fix it and
69
+ send a patch!
70
+
71
+
72
+ * How can I help ?
73
+
74
+ - Test it.
75
+ - Report any bugs.
76
+ - Ideas, suggestions e.t.c. are welcome. Patches even more!
77
+ - Occasionally you may drop a line to say that it worked for you. Positive
78
+ feedback is just as important.
79
+
80
+
81
+ * I don't like your coding style
82
+
83
+ I don't like yours either.
84
+
85
+
86
+ * Who wrote it ?
87
+
88
+ Me, Theodoros Kalamatianos, a student at the department of Electric and Computer
89
+ Engineering of the National Technical University of Athens. For purposes related
90
+ to actkbd I may be reached at <nyb@users.sourceforge.net>.
91
+
92
+
93
+ * Under what license is it released ?
94
+
95
+ Naturally, the GNU General Public License. The full text of the GPL is included
96
+ in the actkbd tarball.
PKG/actkbd-0.2.8/Makefile ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #
2
+ # actkbd - A keyboard shortcut daemon
3
+ #
4
+ # Copyright (c) 2005-2006 Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
5
+ #
6
+ # This program is free software; you can redistribute it and/or modify it
7
+ # under the terms of the GNU General Public License version 2 as published by
8
+ # the Free Software Foundation.
9
+ #
10
+
11
+ prefix := /usr/local
12
+ sbindir := $(prefix)/sbin
13
+ sysconfdir := /etc
14
+
15
+ # Yes, I am lazy...
16
+ VER := $(shell head -n 1 NEWS | cut -d : -f 1)
17
+
18
+
19
+
20
+ DEBUG :=
21
+ CFLAGS := -O2 -Wall $(DEBUG)
22
+ CPPFLAGS := -DVERSION=\"$(VER)\" -DCONFIG=\"$(sysconfdir)/actkbd.conf\"
23
+
24
+
25
+
26
+ all: actkbd
27
+
28
+ actkbd: actkbd.o mask.o config.o linux.o
29
+
30
+ actkbd.o : actkbd.h
31
+ mask.o : actkbd.h
32
+
33
+ config.o : actkbd.h config.c
34
+
35
+ linux.o : actkbd.h
36
+
37
+ install: all
38
+ install -D -m755 actkbd $(sbindir)/actkbd
39
+ install -d -m755 $(sysconfdir)
40
+ echo "# actkbd configuration file" > $(sysconfdir)/actkbd.conf
41
+
42
+ clean:
43
+ rm -f actkbd *.o
PKG/actkbd-0.2.8/NEWS ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ 0.2.8:
2
+ * Fixed the auto-detection code so that it fails with an error when no
3
+ input devices are present at all, rather than letting actkbd attempt
4
+ to use /dev/input/event0 and fail with some misleading error message
5
+ (reported by Jerome Borme).
6
+ * Added a sample rule file for udev
7
+ * Note that a udev rule is the recommended way to launch actkbd on Linux
8
+ * Remove version.h - the version string is automatically set in the
9
+ Makefile
10
+ * Documentation updates
PKG/actkbd-0.2.8/README ADDED
@@ -0,0 +1,331 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ actkbd - A keyboard shortcut daemon
2
+
3
+
4
+
5
+ Contents:
6
+
7
+ 1. Introduction
8
+ 2. Platforms
9
+ 2.1. Platform-specific information
10
+ 3. Setup
11
+ 3.1. Compilation
12
+ 3.2. Installation
13
+ 3.3. Configuration
14
+ 3.3.1. Supported command attributes
15
+ 3.4. Running
16
+ 4. Internals
17
+ 5. License
18
+ 6. Authors
19
+
20
+
21
+ 1. Introduction
22
+
23
+ actkbd is a simple daemon that binds actions to keyboard events. It recognises
24
+ key combinations and can handle press, repeat and release events. Currently it
25
+ only supports the linux-2.6 evdev interface, but the platform-specific code is
26
+ well-contained, so that support for additional platforms can be added with no or
27
+ minimal changes to the rest of the code.
28
+
29
+ It uses a plain-text configuration file which contains all the bindings. Its
30
+ file format has some prediction for command attributes, which allow the user to
31
+ perform some common actions (e.g. eject the CD-ROM or change the volume) without
32
+ having to call external commands. Currently, though, actkbd can only execute
33
+ external commands, as the supported attributes only serve configuration purposes.
34
+
35
+ Please keep in mind that the manual creation of a configuration file can be very
36
+ complex, especially if some of the more advanced features are required. Unless
37
+ you enjoy mind games, you might wish to stick to the more simple configuration
38
+ rules...
39
+
40
+
41
+
42
+ 2. Platforms
43
+
44
+ Currently only the following platforms are supported:
45
+
46
+ * Linux 2.6.x
47
+
48
+ The following platforms will probably never be supported:
49
+
50
+ * Windows - no POSIX, no support
51
+ * MacOS - contrary to MacOS X, MacOS has no POSIX subsystem
52
+ * BeOS - unless someone can resurrect it
53
+
54
+
55
+ 2.1. Platform-specific information
56
+
57
+ * Linux 2.6.x
58
+
59
+ To run actkbd under Linux 2.6.x you need to have the event interface available.
60
+ In most cases, loading the `evdev' kernel module will be sufficient:
61
+
62
+ # modprobe evdev
63
+
64
+ On Linux it is recommended that actkbd is launched using udev rules. This allows
65
+ the administrator to use a different configuration for each keyboard, as long as
66
+ udev can tell the devices apart. This method is far more reliable and flexible
67
+ than using an init script, as it allows for proper support of hotplug events and
68
+ removes the probability of the auto-detection code getting confused and causing
69
+ problems.
70
+
71
+ In most Linux systems the device nodes to use are named /dev/input/eventX, where
72
+ X is a decimal unsigned number, e.g. /dev/input/event0. If the /proc filesystem
73
+ is mounted and accessible, actkbd should be able to detect a usable keyboard
74
+ device. You should not need to manually specify one, unless there are multiple
75
+ keyboards present.
76
+
77
+ Update: On newer kernels several special buttons (like the Power switch) may
78
+ appear as input devices as well. There is no way for the auto-detection code to
79
+ tell them apart and it is quite possible that the actual keyboard will not be
80
+ the one actkbd will select. Using udev to start actkbd is the best way to avoid
81
+ this problem.
82
+
83
+
84
+
85
+ 3. Setup
86
+
87
+ 3.1. Compilation
88
+
89
+ A simple call to `make' is normally all you need to compile actkbd:
90
+
91
+ $ make
92
+
93
+ To change the default location of the configuration file, you have to override
94
+ the sysconfdir Makefile variable. You can also override the CFLAGS variable to
95
+ provide optimisation flags e.t.c. The DEBUG variable can be used to enable
96
+ debugging - if you are using gcc, setting DEBUG to "-g" would probably do.
97
+
98
+
99
+ 3.2. Installation
100
+
101
+ First verify with `make -n install' the installation paths. By default, the
102
+ installation prefix is /usr/local and the actkbd daemon binary is installed in
103
+ $(prefix)/sbin. A configuration placeholder is placed in $(sysconfdir), which by
104
+ default is /etc. You can set the prefix, sbindir and sysconfdir variables to
105
+ override these defaults. Then run `make install' as root to perform the actual
106
+ installation:
107
+
108
+ # make install
109
+
110
+ Bear in mind that currently the location of the configuration file must be
111
+ explicitly specified (-c) in the actkbd command line options if the default
112
+ ($(sysconfdir)/actkbd.conf) location is not valid.
113
+
114
+
115
+ 3.3. Configuration
116
+
117
+ The default configuration file resides in $(sysconfdir)/actkbd.conf. It is a
118
+ plain-text file with each line being an entry. A proper entry has the following
119
+ format:
120
+
121
+ <keys>:<event type>:<attributes>:<command>
122
+
123
+ The <keys> field is a series of numeric keycodes, separated by the `+'
124
+ character. `actkbd -n -s' can be used to find out any keycodes you need, as it
125
+ will report all key presses without executing any commands.
126
+
127
+ The <event type> string field is a comma or whitespace separated list of the
128
+ `key' (key press event), `rep' (key repeat event) and `rel' (key release event)
129
+ strings. This field indicates which keyboard events this entry corresponds to.
130
+ If left empty, it defaults to `key'.
131
+
132
+ The <attributes> field contains an optional comma or whitespace separated list
133
+ of attributes. The listed attributes can modify the execution of the supplied
134
+ command or change the state of actkbd in order to perform complex actions. The
135
+ attribute actions are executed in the listed order. If no attribute has been
136
+ specified actkbd falls back on to calling system().
137
+
138
+ The <command> field is the executed command that will be passed to system().
139
+ Note that in order to have non-blocking behaviour, you have to append the `&'
140
+ character to the command, so that /bin/sh will execute it in the background.
141
+ Also keep in mind that the listed command attributes can affect the way the
142
+ command is executed, if at all. Currently system() is the only interpretter
143
+ for commands, but in the future there may be command attributes that use the
144
+ contents of this field differently, e.g. to set a sound mixer.
145
+
146
+ Lines starting with '#' are considered comments. Invalid lines are silently
147
+ ignored, unless a high enough verbosity level has been specified.
148
+
149
+ Note that when actkbd searches for an entry to execute, only the first matching
150
+ entry is used. Therefore always make sure that the entries in the configuration
151
+ file are ordered properly.
152
+
153
+ A sample actkbd.conf file is included in the actkbd distribution.
154
+
155
+
156
+ 3.3.1. Supported command attributes
157
+
158
+ The supported attributes are:
159
+
160
+ * `grab': This grabs the keyboard device to block other applications from
161
+ receiving the subsequent events. This allows the user to bind commands
162
+ to keys that are not normally usable because they produce symbols that
163
+ mess with regular keyboard operation (letters, numbers e.t.c.).
164
+
165
+ * `ungrab': This releases a grabbed device, so that other programs may get the
166
+ key events. Please note that at least some versions of the X keyboard
167
+ driver (and possibly other programs) will interpret a key release event
168
+ as a full key press/release sequence even if the press event was never
169
+ received (why?). Therefore you may prefer to use the `ungrab' attribute
170
+ in release event bindings, rather than keypress ones, to ensure correct
171
+ operation.
172
+
173
+ WARNING: Using the `grab' attribute without a well thought way to invoke the
174
+ `ungrab' command can easily leave your keyboard unusable for all other
175
+ applications with no way out. You may want to invoke something like the
176
+ following:
177
+
178
+ # sleep 120; killall -9 actkbd
179
+
180
+ in a different console, while testing you configuration, to be able to
181
+ reclaim your keyboard even if the configuration file is not correct.
182
+
183
+ * `grabbed': This instructs actkbd to execute the specified command only if the
184
+ keyboard has been grabbed. This can be used to allow a key to act as an
185
+ extra Function key that adds extra functionality to the other keys.
186
+
187
+ * `ungrabbed': This instructs actkbd to execute the specified command only if
188
+ the keyboard has not been grabbed.
189
+
190
+ NOTE: If none of the `grabbed'/`ungrabbed' attributes has been used, the command
191
+ is always executed if the key mask matches. If both are specified then
192
+ the command is never executed - obviously the keyboard cannot be grabbed
193
+ and ungrabbed at the same time.
194
+
195
+ * `noexec': Do not call system() to run an external command. Useful for entries
196
+ that only serve configuration purposes.
197
+
198
+ * `exec': Use system() to run an external command here and now. Allows specific
199
+ ordering of the attribute actions with regard to the system() call.
200
+
201
+ NOTE: If none of the `noexec'/`exec' attributes has been specified, or if the
202
+ attribute list is empty, an `exec' call is implied at the end of the
203
+ list. Always use `noexec' for entries with empty/invalid commands.
204
+
205
+ * `ignrel': When changing the internal state of actkbd, ignore release events
206
+ for the keys that are currently pressed. This allows more complex key
207
+ combinations where the shortcut keys are pressed sequentially, rather
208
+ than simultaneously. When the key combination is completed, the `allrel'
209
+ and `rcvrel' attributes should be used to clear the key mask and to
210
+ resume the proper reception of release events.
211
+
212
+ * `allrel': Clear the pressed key mask. It is the equivalent of releasing all
213
+ pressed keys, but is not affected by the `ignrel' attribute.
214
+
215
+ * `rcvrel': Restore proper reception of key release events.
216
+
217
+ * `key(X)': Send a key X press event to the input layer of the system.
218
+
219
+ * `rel(X)': Send a key X release event to the input layer of the system.
220
+
221
+ * `rep(X)': Send a key X repeat event to the input layer of the system.
222
+
223
+ WARNING: Note that the careless use of the key event injection commands can make
224
+ your life really adventurous - or just difficult. For example injecting
225
+ a `return' key press/release sequence after the `r' key is a way to make
226
+ logging on locally as "root" really, really difficult. Of course you may
227
+ still be able to login using a user without an "r" in their username and
228
+ password and issuing `su', but you'd still need a root password without
229
+ an "r" in it...
230
+
231
+ WARNING: The `key()', `rel()' and `rep()' attributes, if used without caution,
232
+ may cause event loops that can bring the system to its knees. Also, it
233
+ seems that continuous event loops can cause actkbd to miss some events,
234
+ or even block the event interface, with various dire results. Use with
235
+ extreme caution.
236
+
237
+ * `set(X)': Manipulate the internal actkbd state, by setting the key X status to
238
+ `pressed'.
239
+
240
+ * `unset(X)': Manipulate the internal actkbd state, by setting the key X status
241
+ to `released'.
242
+
243
+ NOTE: `set()' and `unset()' supersede the normal operations associated with the
244
+ received events, if they are in conflict.
245
+
246
+ NOTE: By using `set()' and `unset()' with key values that are not producable by
247
+ your keyboard, but are still valid, you can create complex configuration
248
+ schemes by using those key values as status variables.
249
+
250
+ NOTE: An empty value for the `key()', `rel()', `rep()', `set()' and `unset()'
251
+ attributes instructs actkbd to use the key value that triggered the
252
+ current rule.
253
+
254
+ * `not': Indicates that the current entry will match when any key except for the
255
+ listed ones is received. This attribute can be used along with an empty
256
+ <keys> field to match all events, regardless of the keycode.
257
+
258
+ * `all': Indicates that the current entry will match when all of the listed keys
259
+ are pressed, without caring about the state of any other keys.
260
+
261
+ * `any': Indicates that the current entry will match when any of the listed keys
262
+ is pressed. Not very sure what this can be used for, but it seemed nice
263
+ to have :-)
264
+
265
+ NOTE: The `not', `all' and `any' attributes are checked in this exact order and
266
+ if more than one have been specified, the one with the highest priority
267
+ supersedes all others. If none of these attributes has been specified,
268
+ then actkbd will require an exact match between the listed keys and the
269
+ active key mask in order to execute the entry.
270
+
271
+ * `ledon(X)': Switches on the keyboard LED X.
272
+
273
+ * `ledoff(X)': Switches off the keyboard LED X.
274
+
275
+ NOTE: actkbd does not check which LEDs actually exist on the keyboard, but this
276
+ does not cause any problems as invalid LED values are simply ignored.
277
+
278
+ NOTE: Setting the LEDs this way is not permanent. Any operation that affects
279
+ a LED (e.g. pressing the Caps Lock key) can affect one or even all
280
+ LEDs, thus nullifying the operations from actkbd.
281
+
282
+ NOTE: You will have to use some other way to find what LED codes your keyboard
283
+ supports. On Linux the /proc/bus/input/devices file can supply this
284
+ information: the LED= field is a bitwise mask of the present LEDs. For
285
+ example, if it's 7 (binary: 111), all first three LEDs are available.
286
+
287
+
288
+ 3.4. Running
289
+
290
+ Run `actkbd --help' to see the various command line options. actkbd is normally
291
+ able to auto-detect your keyboard device, therefore you do not need to specify
292
+ it. For the most common case - a daemon with the default configuration file in
293
+ $(sysconfdir) - the following command should suffice:
294
+
295
+ # actkbd -D -q
296
+
297
+ Note that sending the HUP signal (kill -HUP) to actkbd will cause it to reload
298
+ its configuration file.
299
+
300
+
301
+ 4. Internals
302
+
303
+ The most interesting/messy part of actkbd is the code that keeps track of which
304
+ keys are pressed each moment. It uses a bitmask with one bit for each available
305
+ key. When press/repeat events are received, the corresponding bit is set and it
306
+ becomes unset when a release event is received for that key. To match key events
307
+ with the corresponding actions, each valid configuration file entry has its key
308
+ field transformed to a bitmask. After that, whenever a new event is received,
309
+ the status bitmask is matched against all configuration entry bitmasks and the
310
+ first one to match (if any) is used and the corresponding command is executed.
311
+
312
+ Please note that the platform specific code is contained in <platform>.c (.e.g.
313
+ linux.c). This file implements a generic interface to keyboard events, hiding
314
+ each system's intricacies from the rest of code. It is also the file that has to
315
+ be written/ported to add support for a new platform.
316
+
317
+ For any additional details the best documentation is probalby the source code
318
+ itself.
319
+
320
+
321
+ 5. License
322
+
323
+ actkbd is released under the GNU General Public License version 2. The full text
324
+ of the license can be found in the COPYING file that should be included in the
325
+ actkbd distribution.
326
+
327
+
328
+ 6. Authors
329
+
330
+ Original author:
331
+ Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
PKG/actkbd-0.2.8/TODO ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1. Items in the ToDo list:
2
+
3
+ * Perform some testing on non-IA32 platforms, especially on 64-bit and
4
+ big-endian CPUs - some external feedback is welcome.
5
+
6
+ * Implement the module subsystem. Modules to control sound mixers e.t.c. could
7
+ be built.
8
+ UPDATE: The attribute infrastructure introduced in actkbd-0.2.0 is the core
9
+ of the module subsystem. Now we are just missing the modules...
10
+
11
+ * Support additional platforms. To do this, alternatives to linux.c must be
12
+ written and the build system must become smarter (autotools ?). I would
13
+ also need maintainers for any platform apart from Linux, since I do not
14
+ see myself installing another OS any time soon.
15
+
16
+ * Find out if there are any good reasons (security ?) to replace the call
17
+ to system().
18
+
19
+ * Add support for symbolic key names in the configuration file. Can we do
20
+ do this while still keeping the code relatively portable and without using
21
+ huge fixed keymaps ?
22
+
23
+ * Create manual pages: actkbd.1, actkbd.conf.5
24
+
25
+ * A scripted (Python?) GUI configuration tool - the configuration file syntax
26
+ has become so complicated that it is starting to resemble a full programming
27
+ language...
28
+
29
+ * Autotools ?
30
+
31
+
32
+
33
+ 2. Completed
34
+
35
+ * Research and update the documentation with information on how to couple actkbd
36
+ with the hotplug subsystem, so that multiple keyboards can be supported. Any
37
+ takers ?
38
+ UPDATE: A sample udev file is now provided. Pretty simple, actually...
39
+
40
+ * Find out what happens if the keyboard device suddenly disappears - I have
41
+ to find a USB keyboard to test this. Make sure we handle this gracefully -
42
+ no a SIGSEGV is NOT graceful.
43
+ UPDATE: actkbd acts as it should. Users using hotplugged devices can just
44
+ ignore the error message when they remove the keyboard.
45
+
46
+
47
+
48
+ 3. Features that will probably never be added:
49
+
50
+ * Check/Implement support for linux-2.4 kernels. I can't even remember whether
51
+ those had a proper event interface...
52
+ RATIONALE: If someone still uses a linux-2.4 kernel, well, here's one more
53
+ reason to upgrade :-). linux-2.4 will probably not run on my development
54
+ system anyway...
55
+
56
+ * Multiple keyboard support.
57
+ RATIONALE: After careful consideration, it was determined that using a single
58
+ daemon to handle multiple, possibly very different, keyboards is not a
59
+ very good idea. The one prominent category of people that regularly use
60
+ multiple keyboards, namely the laptop owners, will usually need totally
61
+ different configuration settings for each keyboard, as the external one
62
+ will have many more keys and might be missing others (the WLAN switch
63
+ comes to mind). It would be simpler and much more efficient to setup the
64
+ hotplug scripts to launch multiple actkbd instances, each with its own
65
+ configuration file.
66
+ UPDATE: There is now a sample udev rule file that can be adapted for multiple
67
+ keyboards.
68
+
69
+ * Use select() to handle multiple keyboards, instead of just the first one,
70
+ and get a USB keyboard to test it.
71
+ RATIONALE: Multiple keyboard support will not be added at all, so...
72
+
73
+ * Dynamically attach to new keyboards - the select() infrastrusture is a
74
+ prerequisite for this - can we do this without periodically reading the
75
+ /proc/bus/input/devices file ? Perhaps, with some help from hotplug...
76
+ RATIONALE: Multiple keyboard support will not be added at all, so...
77
+
78
+ * Per-keyboard configuration - this may never be implemented since it would
79
+ complicate the code. Perhaps a hotplug script could handle this better.
80
+ RATIONALE: Multiple keyboard support will not be added at all, so...
PKG/actkbd-0.2.8/actkbd ADDED
Binary file (41.4 kB). View file
 
PKG/actkbd-0.2.8/actkbd.c ADDED
@@ -0,0 +1,453 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * actkbd - A keyboard shortcut daemon
3
+ *
4
+ * Copyright (c) 2005-2006 Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
5
+ *
6
+ * This program is free software; you can redistribute it and/or modify it
7
+ * under the terms of the GNU General Public License version 2 as published by
8
+ * the Free Software Foundation.
9
+ */
10
+
11
+ #include "actkbd.h"
12
+
13
+
14
+ /* Verbosity level */
15
+ int verbose = 0;
16
+
17
+ /* Daemon mode */
18
+ int detach = 0;
19
+
20
+ /* Console message suppression */
21
+ int quiet = 0;
22
+
23
+ /* Syslog logging */
24
+ int uselog = 0;
25
+
26
+ /* Maximum number of keys */
27
+ int maxkey = 0;
28
+
29
+ /* Device grab state */
30
+ int grabbed = 0;
31
+
32
+ /* Ignore release events */
33
+ int ignrel = 0;
34
+
35
+ /* Keyboard device name */
36
+ char *device = NULL;
37
+
38
+ /* Configuration file name */
39
+ char *config = NULL;
40
+
41
+ /* PID file name */
42
+ char *pidfile = NULL;
43
+
44
+
45
+ static int usage() {
46
+ lprintf(
47
+ "actkbd Version %s\n"
48
+ "Usage: actkbd [options]\n"
49
+ " Options are as follows:\n"
50
+ " -c, --config <file> Specify the configuration file to use\n"
51
+ " -D, --daemon Launch in daemon mode\n"
52
+ " -d, --device <device> Specify the device to use\n"
53
+ " -h, --help Show this help text\n"
54
+ " -n, --noexec Do not execute any commands\n"
55
+ " -p, --pidfile <file> Use a file to store the PID\n"
56
+ " -q, --quiet Suppress all console messages\n"
57
+ " -v[level]\n"
58
+ " --verbose=[level] Specify the verbosity level (0-9)\n"
59
+ " -V, --version Show version information\n"
60
+ " -x, --showexec Report executed commands\n"
61
+ " -s, --showkey Report key presses\n"
62
+ " -l, --syslog Use the syslog facilities for logging\n"
63
+ , VERSION);
64
+
65
+ return OK;
66
+ }
67
+
68
+
69
+ /* Allow SIGHUP to cause reconfiguration */
70
+ void on_hup(int signum) {
71
+ int ret;
72
+
73
+ if ((verbose > 0) || detach)
74
+ lprintf("Reconfiguration requested\n");
75
+
76
+ if (verbose > 1)
77
+ lprintf("Discarding old configuration\n");
78
+
79
+ close_config();
80
+ free_key_mask();
81
+ free_ign_mask();
82
+
83
+ if (verbose > 1)
84
+ lprintf("Reading new configuration\n");
85
+
86
+ if ((ret = open_config()) != OK)
87
+ exit(ret);
88
+ if ((ret = init_key_mask()) != OK)
89
+ exit(ret);
90
+ if ((ret = init_ign_mask()) != OK)
91
+ exit(ret);
92
+
93
+ if (verbose > 1)
94
+ lprintf("Reconfiguration complete\n");
95
+
96
+ return;
97
+ }
98
+
99
+
100
+ /* Allow SIGTERM to cause graceful termination */
101
+ void on_term(int signum) {
102
+ close_config();
103
+ close_dev();
104
+ free_key_mask();
105
+ free_ign_mask();
106
+
107
+ if (detach)
108
+ lprintf("actkbd %s terminating for %s\n", VERSION, device);
109
+
110
+ closelog();
111
+
112
+ if (pidfile != NULL)
113
+ unlink(pidfile);
114
+
115
+ exit(OK);
116
+
117
+ return;
118
+ }
119
+
120
+
121
+ /* PID file creation */
122
+ static int write_pid() {
123
+ FILE *fp;
124
+
125
+ fp = fopen(pidfile, "w");
126
+ if (fp == NULL) {
127
+ lprintf("Error: could not write the PID file %s: %s\n", pidfile, strerror(errno));
128
+ return PIDERR;
129
+ }
130
+
131
+ fprintf(fp, "%i\n", getpid());
132
+
133
+ if (verbose > 2)
134
+ lprintf("Wrote PID file %s\n", pidfile);
135
+
136
+ fclose(fp);
137
+
138
+ return OK;
139
+ }
140
+
141
+
142
+ /* External command execution */
143
+ static int ext_exec(char *cmd, int noexec, int showexec) {
144
+ if ((verbose > 0) || showexec)
145
+ lprintf("Executing: %s\n", cmd);
146
+ if (!noexec)
147
+ return system(cmd);
148
+
149
+ return 0;
150
+ }
151
+
152
+
153
+ int main(int argc, char **argv) {
154
+ int ret, key, type;
155
+ key_cmd *cmd;
156
+
157
+ /* Options */
158
+ int help = 0, noexec = 0, version = 0, showexec = 0, showkey = 0;
159
+
160
+ struct option options[] = {
161
+ { "config", required_argument, 0, 'c' },
162
+ { "daemon", no_argument, 0, 'D' },
163
+ { "device", required_argument, 0, 'd' },
164
+ { "help", no_argument, 0, 'h' },
165
+ { "noexec", no_argument, 0, 'n' },
166
+ { "pidfile", required_argument, 0, 'p' },
167
+ { "quiet", no_argument, 0, 'q' },
168
+ { "verbose", optional_argument, 0, 'v' },
169
+ { "version", no_argument, 0, 'V' },
170
+ { "showexec", no_argument, 0, 'x' },
171
+ { "showkey", no_argument, 0, 's' },
172
+ { "syslog", no_argument, 0, 'l' },
173
+ { 0, 0, 0, 0 }
174
+ };
175
+
176
+ while (1) {
177
+ int c, option_index = 0;
178
+
179
+ c = getopt_long (argc, argv, "c:Dd:hp:qnv::Vxsl", options, &option_index);
180
+ if (c == -1)
181
+ break;
182
+
183
+ switch (c) {
184
+ case 'c':
185
+ if (optarg) {
186
+ config = strdup(optarg);
187
+ } else {
188
+ usage();
189
+ return USAGE;
190
+ }
191
+ break;
192
+ case 'D':
193
+ detach = 1;
194
+ break;
195
+ case 'd':
196
+ if (optarg) {
197
+ device = strdup(optarg);
198
+ } else {
199
+ usage();
200
+ return USAGE;
201
+ }
202
+ break;
203
+ case 'h':
204
+ help = 1;
205
+ break;
206
+ case 'n':
207
+ noexec = 1;
208
+ break;
209
+ case 'p':
210
+ if (optarg) {
211
+ pidfile = strdup(optarg);
212
+ } else {
213
+ usage();
214
+ return USAGE;
215
+ }
216
+ break;
217
+ case 'q':
218
+ quiet = 1;
219
+ break;
220
+ case 'v':
221
+ if (optarg) {
222
+ verbose = optarg[0] - '0';
223
+ if ((verbose < 0) || (verbose > 9)) {
224
+ usage();
225
+ return USAGE;
226
+ }
227
+ } else {
228
+ verbose = 1;
229
+ }
230
+ break;
231
+ case 'V':
232
+ version = 1;
233
+ break;
234
+ case 'x':
235
+ showexec = 1;
236
+ break;
237
+ case 's':
238
+ showkey = 1;
239
+ break;
240
+ case 'l':
241
+ uselog = 1;
242
+ break;
243
+ default:
244
+ usage();
245
+ return USAGE;
246
+ }
247
+ }
248
+
249
+ if (help)
250
+ return usage();
251
+ if (version) {
252
+ lprintf(
253
+ "actkbd Version %s\n\n"
254
+ "Copyright (c) 2005-2006 Theodoros V. Kalamatianos <nyb@users.sourceforge.net>\n\n"
255
+ "This program is free software; you can redistribute it and/or modify it\n"
256
+ "under the terms of the GNU General Public License version 2 as published by\n"
257
+ "the Free Software Foundation.\n\n"
258
+ "This program is distributed in the hope that it will be useful, but WITHOUT\n"
259
+ "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n"
260
+ "FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n"
261
+ , VERSION);
262
+ return OK;
263
+ }
264
+ if (quiet && !detach) {
265
+ fclose(stdin);
266
+ fclose(stdout);
267
+ fclose(stderr);
268
+ }
269
+
270
+ /* Open the syslog facility */
271
+ if (uselog) {
272
+ openlog("actkbd", LOG_PID, LOG_DAEMON);
273
+ uselog = 2;
274
+ }
275
+
276
+ /* Initialise the keyboard */
277
+ if ((ret = init_dev()) != OK)
278
+ return ret;
279
+
280
+ /* Process the configuration file */
281
+ if ((ret = open_config()) != OK)
282
+ return ret;
283
+
284
+ if ((ret = init_key_mask()) != OK)
285
+ return ret;
286
+
287
+ if ((ret = init_ign_mask()) != OK)
288
+ return ret;
289
+
290
+ if ((ret = open_dev()) != OK)
291
+ return ret;
292
+
293
+ /* Verbosity levels over 2 make showkey redundant */
294
+ if (verbose > 2)
295
+ showkey = 0;
296
+
297
+ if (detach) {
298
+ switch (daemon(0, 0))
299
+ {
300
+ case 0:
301
+ break;
302
+ default:
303
+ lprintf("%s: fork() error: %s\n", argv[0], strerror(errno));
304
+ return FORKERR;
305
+ }
306
+ lprintf("actkbd %s launched for %s\n", VERSION, device);
307
+ }
308
+
309
+ if (pidfile != NULL)
310
+ if ((ret = write_pid()) != OK)
311
+ return ret;
312
+
313
+ /* Setup the signal handlers */
314
+ signal(SIGHUP, on_hup);
315
+ signal(SIGTERM, on_term);
316
+
317
+ while (get_key(&key, &type) == OK) {
318
+ int tmp, exec_ok = 0, norel = 0;
319
+
320
+ if ((type & (KEY | REP)) != 0)
321
+ set_key_bit(key, 1);
322
+
323
+ if (verbose > 2) {
324
+ lprintf("Event: ");
325
+ lprint_key_mask();
326
+ lprintf(":%s\n", (type == KEY)?"key":((type == REP)?"rep":"rel"));
327
+ }
328
+ if ((type == KEY) && showkey) {
329
+ lprintf("Keys: ");
330
+ lprint_key_mask();
331
+ lprintf("\n");
332
+ }
333
+
334
+ ret = match_key(type, &cmd);
335
+ if (ret == OK) {
336
+ attr_t *attr;
337
+
338
+ /* Attribute implementation */
339
+ attr = cmd->attrs;
340
+ while (attr != NULL) {
341
+ char *str, opt[32] = { '\0' };
342
+ int out_type = INVALID;
343
+ switch (attr->type) {
344
+ case ATTR_EXEC:
345
+ str = "exec";
346
+ ext_exec(cmd->command, noexec, showexec);
347
+ exec_ok = 1;
348
+ break;
349
+ case ATTR_GRAB:
350
+ str = "grab";
351
+ grab_dev();
352
+ break;
353
+ case ATTR_UNGRAB:
354
+ str = "ungrab";
355
+ ungrab_dev();
356
+ break;
357
+ case ATTR_IGNREL:
358
+ str = "ignrel";
359
+ copy_key_to_ign_mask();
360
+ ignrel = 1;
361
+ break;
362
+ case ATTR_RCVREL:
363
+ str = "rcvrel";
364
+ ignrel = 0;
365
+ break;
366
+ case ATTR_ALLREL:
367
+ str = "allrel";
368
+ clear_key_mask();
369
+ break;
370
+ case ATTR_KEY:
371
+ str = "key";
372
+ out_type = KEY;
373
+ break;
374
+ case ATTR_REL:
375
+ str = "rel";
376
+ out_type = REL;
377
+ break;
378
+ case ATTR_REP:
379
+ str = "rep";
380
+ out_type = REP;
381
+ break;
382
+ case ATTR_SET:
383
+ str = "set";
384
+ tmp = (int)(attr->opt);
385
+ if (tmp < 0)
386
+ tmp = key;
387
+ if (tmp == key)
388
+ norel = 1;
389
+ snprintf(opt, 32, "%i", tmp);
390
+ set_key_bit(tmp, 1);
391
+ break;
392
+ case ATTR_UNSET:
393
+ str = "unset";
394
+ tmp = (((int)(attr->opt)) >= 0)?(int)(attr->opt):key;
395
+ snprintf(opt, 32, "%i", tmp);
396
+ set_key_bit(tmp, 0);
397
+ break;
398
+ case ATTR_LEDON:
399
+ str = "ledon";
400
+ snprintf(opt, 32, "%i", (int)(attr->opt));
401
+ set_led((int)(attr->opt), 1);
402
+ break;
403
+ case ATTR_LEDOFF:
404
+ str = "ledoff";
405
+ snprintf(opt, 32, "%i", (int)(attr->opt));
406
+ set_led((int)(attr->opt), 0);
407
+ break;
408
+ default:
409
+ str = "unknown";
410
+ break;
411
+ }
412
+
413
+ if (out_type != INVALID) {
414
+ tmp = (((int)(attr->opt)) >= 0)?(int)(attr->opt):key;
415
+ snprintf(opt, 32, "%i", tmp);
416
+ snd_key(tmp, out_type);
417
+ }
418
+
419
+ if ((verbose > 0) || showexec)
420
+ lprintf("Attribute: %s(%s)\n", str, opt);
421
+
422
+ attr = attr->next;
423
+ }
424
+
425
+ /* Fall back on command execution */
426
+ if ((!exec_ok) && ((cmd->attr_bits & BIT_ATTR_NOEXEC) == 0)) {
427
+ ext_exec(cmd->command, noexec, showexec);
428
+ exec_ok = 1;
429
+ }
430
+ }
431
+
432
+ if ((type == REL) && (!norel) && ((!ignrel) || (get_ign_bit(key) == 0)))
433
+ set_key_bit(key, 0);
434
+ }
435
+
436
+ return OK;
437
+ }
438
+
439
+
440
+ /* Logging function */
441
+ int lprintf(const char *fmt, ...) {
442
+ va_list args;
443
+ int ret = 0;
444
+
445
+ va_start(args, fmt);
446
+ if (!quiet)
447
+ ret = vfprintf(stderr, fmt, args);
448
+ if (uselog == 2)
449
+ vsyslog(LOG_NOTICE, fmt, args);
450
+ va_end(args);
451
+
452
+ return ret;
453
+ }
PKG/actkbd-0.2.8/actkbd.h ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * actkbd - A keyboard shortcut daemon
3
+ *
4
+ * Copyright (c) 2005-2006 Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
5
+ *
6
+ * This program is free software; you can redistribute it and/or modify it
7
+ * under the terms of the GNU General Public License version 2 as published by
8
+ * the Free Software Foundation.
9
+ */
10
+
11
+ #ifndef _ACTKBD_H_
12
+ #define _ACTKBD_H_
13
+
14
+ #define _GNU_SOURCE
15
+
16
+ #include <stdio.h>
17
+ #include <stdlib.h>
18
+ #include <string.h>
19
+ #include <unistd.h>
20
+ #include <errno.h>
21
+ #include <stdarg.h>
22
+ #include <ctype.h>
23
+ #include <getopt.h>
24
+ #include <syslog.h>
25
+ #include <signal.h>
26
+ #include <sys/types.h>
27
+
28
+
29
+ #define UNUSED 0
30
+
31
+
32
+ /* Event types */
33
+ #define INVALID 0
34
+ #define KEY (1<<0)
35
+ #define REP (1<<1)
36
+ #define REL (1<<2)
37
+
38
+
39
+ /* Return values */
40
+ enum { OK, USAGE, MEMERR, HOSTFAIL, DEVFAIL, READERR, WRITEERR, EVERR, CONFERR,
41
+ FORKERR, INTERR, PIDERR, NOMATCH };
42
+
43
+
44
+ /* Verbosity level */
45
+ extern int verbose;
46
+
47
+ /* Maximum number of keys */
48
+ extern int maxkey;
49
+
50
+ /* Device grab state */
51
+ extern int grabbed;
52
+
53
+ /* The device name */
54
+ extern char *device;
55
+
56
+ /* The configuration file name */
57
+ extern char *config;
58
+
59
+
60
+ /* Logging function */
61
+ int lprintf(const char *fmt, ...);
62
+
63
+ /* Device initialisation */
64
+ int init_dev();
65
+
66
+ /* Device open function */
67
+ int open_dev();
68
+
69
+ /* Device close function */
70
+ int close_dev();
71
+
72
+ /* Device grab function */
73
+ int grab_dev();
74
+
75
+ /* Device un-grab function */
76
+ int ungrab_dev();
77
+
78
+ /* Keyboard event receiver function */
79
+ int get_key(int *key, int *type);
80
+
81
+ /* Send an event to the input layer */
82
+ int snd_key(int key, int type);
83
+
84
+ /* Set a keyboard LED */
85
+ int set_led(int led, int on);
86
+
87
+
88
+ /* Key mask handling */
89
+ int get_masksize();
90
+ int init_mask(unsigned char **mask);
91
+ void free_mask(unsigned char **mask);
92
+ int lprint_mask(unsigned char *mask);
93
+ int strmask(unsigned char **mask, char *keys);
94
+
95
+ /* The active key mask */
96
+ int init_key_mask();
97
+ void free_key_mask();
98
+ void clear_key_mask();
99
+ int set_key_bit(int bit, int val);
100
+ int get_key_bit(int bit);
101
+ int cmp_key_mask(unsigned char *mask0, unsigned int attr);
102
+ int lprint_key_mask_delim(char c);
103
+ int lprint_key_mask();
104
+ unsigned char *get_key_mask();
105
+
106
+ /* The ignored key mask */
107
+ int init_ign_mask();
108
+ void free_ign_mask();
109
+ void clear_ign_mask();
110
+ int set_ign_bit(int bit, int val);
111
+ int get_ign_bit(int bit);
112
+ int cmp_ign_mask(unsigned char *mask0, unsigned int attr);
113
+ int lprint_ign_mask_delim(char c);
114
+ int lprint_ign_mask();
115
+ unsigned char *get_ign_mask();
116
+ void copy_key_to_ign_mask();
117
+
118
+
119
+ /* The attribute node struct */
120
+ typedef struct _attr_t attr_t;
121
+ struct _attr_t {
122
+ int type; /* Attribute type */
123
+ void *opt; /* Options for this attribute */
124
+ attr_t *next; /* The next node */
125
+ };
126
+
127
+ /* Supported attributes */
128
+ #define ATTR_EXEC 0
129
+ #define ATTR_GRAB 1
130
+ #define ATTR_UNGRAB 2
131
+ #define ATTR_IGNREL 3
132
+ #define ATTR_RCVREL 4
133
+ #define ATTR_ALLREL 5
134
+ #define ATTR_KEY 6
135
+ #define ATTR_REL 7
136
+ #define ATTR_REP 8
137
+ #define ATTR_LEDON 9
138
+ #define ATTR_LEDOFF 10
139
+ #define ATTR_SET 11
140
+ #define ATTR_UNSET 12
141
+
142
+
143
+ /* The key_cmd struct */
144
+ typedef struct {
145
+ unsigned char *keys; /* The key mask */
146
+ int type; /* The event type */
147
+ char *command; /* The command to execute */
148
+
149
+ unsigned int attr_bits; /* Bitwise attributes */
150
+
151
+ attr_t *attrs; /* The attribute list */
152
+ } key_cmd;
153
+
154
+ /* The bitwise attribute values */
155
+ #define BIT_ATTR_NOEXEC (1<<0) /* Do not call system() */
156
+ #define BIT_ATTR_GRABBED (1<<1) /* Match only when the device is grabbed */
157
+ #define BIT_ATTR_UNGRABBED (1<<2) /* Match only when the device is not grabbed */
158
+ #define BIT_ATTR_NOT (1<<3) /* Match any key except for the specified ones */
159
+ #define BIT_ATTR_ALL (1<<4) /* Match if all of the specified keys is pressed */
160
+ #define BIT_ATTR_ANY (1<<5) /* Match if any of the specified keys is pressed */
161
+
162
+
163
+ /* Configuration file processing */
164
+ int open_config();
165
+ int close_config();
166
+ int match_key(int type, key_cmd **command);
167
+
168
+
169
+ #endif /* _ACTKBD_H_ */
PKG/actkbd-0.2.8/actkbd.o ADDED
Binary file (17.1 kB). View file
 
PKG/actkbd-0.2.8/config.c ADDED
@@ -0,0 +1,481 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * actkbd - A keyboard shortcut daemon
3
+ *
4
+ * Copyright (c) 2005-2006 Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
5
+ *
6
+ * This program is free software; you can redistribute it and/or modify it
7
+ * under the terms of the GNU General Public License version 2 as published by
8
+ * the Free Software Foundation.
9
+ */
10
+
11
+ #include "actkbd.h"
12
+
13
+
14
+ #ifndef CONFIG
15
+ #define CONFIG "/etc/actkbd.conf"
16
+ #endif
17
+
18
+
19
+ static int strtolower(char *str) {
20
+ int i, l;
21
+
22
+ if (str == NULL)
23
+ return INTERR;
24
+
25
+ l = strlen(str);
26
+ for (i = 0; i < l; ++i)
27
+ str[i] = tolower(str[i]);
28
+
29
+ return OK;
30
+ }
31
+
32
+
33
+ static int proc_config(int lineno, char *line, key_cmd **cmd) {
34
+ int i, l, f = 1, etype = INVALID, ret = CONFERR;
35
+ char *event = NULL, *attrs = NULL, *command = NULL;
36
+ char *dup = NULL, *err = NULL, *tmp = NULL;
37
+ unsigned char *keys;
38
+ unsigned int attr_bits = 0;
39
+ attr_t *attrlst = NULL, *attr = NULL, *attr_last = NULL;
40
+
41
+ l = strlen(line);
42
+ for (i = 0; i <= l; ++i) {
43
+ if (((line[i] == '#') || (line[i] == '\n') || (line[i] == '\0')) && (f < 4)) {
44
+ err = "missing fields";
45
+ goto ERROR;
46
+ }
47
+ if ((line[i] == ':') && (f < 4)) {
48
+ switch (f) {
49
+ case 1:
50
+ event = line + i + 1;
51
+ break;
52
+ case 2:
53
+ attrs = line + i + 1;
54
+ break;
55
+ case 3:
56
+ command = line + i + 1;
57
+ break;
58
+ }
59
+ ++f;
60
+ }
61
+ }
62
+
63
+ /* Keep a copy of the line */
64
+ dup = strdup(line);
65
+ if (dup == NULL) {
66
+ lprintf("Error: memory allocation failed\n");
67
+ ret = MEMERR;
68
+ goto ERROR;
69
+ }
70
+
71
+ /* Set the field boundaries */
72
+ *(event - 1) = '\0';
73
+ *(attrs - 1) = '\0';
74
+ *(command - 1) = '\0';
75
+ if (line[l - 1] == '\n')
76
+ line[l - 1] = '\0';
77
+
78
+ /* Set the event type */
79
+ strtolower(event);
80
+ while ((tmp = strsep(&event, ", \t")) != NULL) {
81
+ if (strlen(tmp) == 0)
82
+ continue;
83
+
84
+ if (strcmp(tmp, "key") == 0) {
85
+ etype |= KEY;
86
+ } else if (strcmp(tmp, "rep") == 0) {
87
+ etype |= REP;
88
+ } else if (strcmp(tmp, "rel") == 0) {
89
+ etype |= REL;
90
+ } else {
91
+ err = "invalid event type";
92
+ goto ERROR;
93
+ }
94
+ }
95
+
96
+ /* If no event type was specified, fall back to `key' */
97
+ if (etype == INVALID)
98
+ etype = KEY;
99
+
100
+ /* The keys are always at the beginning of the line */
101
+ if (strmask(&keys, line) != OK) {
102
+ err = "invalid <keys> field";
103
+ goto ERROR;
104
+ }
105
+
106
+ /* Set the attribute list */
107
+ strtolower(attrs);
108
+ while ((tmp = strsep(&attrs, ", \t")) != NULL) {
109
+ int type = -1;
110
+ void *opt = NULL;
111
+ char *num = NULL;
112
+
113
+ if (strlen(tmp) == 0)
114
+ continue;
115
+
116
+ if (strcmp(tmp, "noexec") == 0) {
117
+ attr_bits |= BIT_ATTR_NOEXEC;
118
+ } else if (strcmp(tmp, "grabbed") == 0) {
119
+ attr_bits |= BIT_ATTR_GRABBED;
120
+ } else if (strcmp(tmp, "ungrabbed") == 0) {
121
+ attr_bits |= BIT_ATTR_UNGRABBED;
122
+ } else if (strcmp(tmp, "not") == 0) {
123
+ attr_bits |= BIT_ATTR_NOT;
124
+ } else if (strcmp(tmp, "all") == 0) {
125
+ attr_bits |= BIT_ATTR_ALL;
126
+ } else if (strcmp(tmp, "any") == 0) {
127
+ attr_bits |= BIT_ATTR_ANY;
128
+ } else if (strcmp(tmp, "exec") == 0) {
129
+ type = ATTR_EXEC;
130
+ } else if (strcmp(tmp, "grab") == 0) {
131
+ type = ATTR_GRAB;
132
+ } else if (strcmp(tmp, "ungrab") == 0) {
133
+ type = ATTR_UNGRAB;
134
+ } else if (strcmp(tmp, "ignrel") == 0) {
135
+ type = ATTR_IGNREL;
136
+ } else if (strcmp(tmp, "rcvrel") == 0) {
137
+ type = ATTR_RCVREL;
138
+ } else if (strcmp(tmp, "allrel") == 0) {
139
+ type = ATTR_ALLREL;
140
+ } else if (strncmp(tmp, "key(", 4) == 0) {
141
+ type = ATTR_KEY;
142
+ tmp += 4;
143
+ num = (void *)1;
144
+ } else if (strncmp(tmp, "rel(", 4) == 0) {
145
+ type = ATTR_REL;
146
+ tmp += 4;
147
+ num = (void *)1;
148
+ } else if (strncmp(tmp, "rep(", 4) == 0) {
149
+ type = ATTR_REP;
150
+ tmp += 4;
151
+ num = (void *)1;
152
+ } else if (strncmp(tmp, "set(", 4) == 0) {
153
+ type = ATTR_SET;
154
+ tmp += 4;
155
+ num = (void *)1;
156
+ } else if (strncmp(tmp, "unset(", 6) == 0) {
157
+ type = ATTR_UNSET;
158
+ tmp += 6;
159
+ num = (void *)1;
160
+ } else if (strncmp(tmp, "ledon(", 6) == 0) {
161
+ type = ATTR_LEDON;
162
+ tmp += 6;
163
+ num = (void *)1;
164
+ } else if (strncmp(tmp, "ledoff(", 7) == 0) {
165
+ type = ATTR_LEDOFF;
166
+ tmp += 7;
167
+ num = (void *)1;
168
+ } else {
169
+ lprintf("Warning: unknown attribute %s\n", tmp);
170
+ }
171
+
172
+ if (num == (void *)1) {
173
+ num = strsep(&tmp, "()");
174
+
175
+ errno = 0;
176
+ if (strlen(num) > 0) {
177
+ opt = (void *)((int)strtol(num, (char **)NULL, 10));
178
+ } else {
179
+ opt = (void *)((int)(-1));
180
+ }
181
+
182
+ if (((int)opt < 0) &&
183
+ ((type == ATTR_LEDON) || (type == ATTR_LEDOFF)))
184
+ errno = EINVAL;
185
+
186
+ if (errno != 0) {
187
+ err = "invalid attribute argument";
188
+ goto ERROR;
189
+ }
190
+ }
191
+
192
+ if (type != -1) {
193
+ attr = (attr_t *)(malloc(sizeof(attr_t)));
194
+ if (attr == NULL) {
195
+ lprintf("Error: memory allocation failed\n");
196
+ ret = MEMERR;
197
+ goto ERROR;
198
+ }
199
+
200
+ attr->type = type;
201
+ attr->opt = opt;
202
+ attr->next = NULL;
203
+
204
+ if (attrlst == NULL) {
205
+ attrlst = attr;
206
+ attr_last = attr;
207
+ } else {
208
+ attr_last->next = attr;
209
+ attr_last = attr;
210
+ }
211
+ }
212
+ }
213
+
214
+ *cmd = (key_cmd *)(malloc(sizeof(key_cmd)));
215
+ if (*cmd == NULL) {
216
+ lprintf("Error: memory allocation failed\n");
217
+ ret = MEMERR;
218
+ goto ERROR;
219
+ } else {
220
+ (*cmd)->keys = keys;
221
+ (*cmd)->type = etype;
222
+ (*cmd)->command = strdup(command);
223
+ (*cmd)->attr_bits = attr_bits;
224
+ (*cmd)->attrs = attrlst;
225
+ }
226
+
227
+ /* Destroy the line copy */
228
+ free(dup);
229
+
230
+ return OK;
231
+
232
+ /* Error handler */
233
+ ERROR:
234
+ if ((verbose > 1) && (err != NULL))
235
+ lprintf("Warning: %s in configuration line %i\n", err, lineno);
236
+ if (verbose > 0)
237
+ lprintf("Warning: discarding configuration line %i:\n\t%s%c", lineno,
238
+ (dup != NULL)?dup:line,
239
+ (((dup != NULL)?dup:line)[l - 1] == '\n')?'\0':'\n');
240
+
241
+ *cmd = NULL;
242
+
243
+ /* Free the attribute list */
244
+ while (attrlst != NULL) {
245
+ attr = attrlst;
246
+ attrlst = attrlst->next;
247
+ free(attr);
248
+ }
249
+
250
+ if (dup != NULL)
251
+ free(dup);
252
+
253
+ return ret;
254
+ }
255
+
256
+
257
+ typedef struct _confentry {
258
+ key_cmd *cmd;
259
+ struct _confentry *next;
260
+ } confentry;
261
+
262
+
263
+ static confentry *list = NULL;
264
+
265
+
266
+ static void print_etype(int type) {
267
+ char *sep = "";
268
+
269
+ if ((type & KEY) > 0) {
270
+ lprintf("%skey", sep);
271
+ sep = ",";
272
+ }
273
+ if ((type & REP) > 0) {
274
+ lprintf("%srep", sep);
275
+ sep = ",";
276
+ }
277
+ if ((type & REL) > 0) {
278
+ lprintf("%srel", sep);
279
+ sep = ",";
280
+ }
281
+ }
282
+
283
+
284
+ static void print_attrs(key_cmd *cmd) {
285
+ attr_t *attr;
286
+ char *sep = "";
287
+
288
+ if (cmd == NULL)
289
+ return;
290
+
291
+ if ((cmd->attr_bits & BIT_ATTR_NOEXEC) > 0) {
292
+ lprintf("%snoexec", sep);
293
+ sep = ",";
294
+ }
295
+ if ((cmd->attr_bits & BIT_ATTR_GRABBED) > 0) {
296
+ lprintf("%sgrabbed", sep);
297
+ sep = ",";
298
+ }
299
+ if ((cmd->attr_bits & BIT_ATTR_UNGRABBED) > 0) {
300
+ lprintf("%sungrabbed", sep);
301
+ sep = ",";
302
+ }
303
+ if ((cmd->attr_bits & BIT_ATTR_NOT) > 0) {
304
+ lprintf("%snot", sep);
305
+ sep = ",";
306
+ }
307
+ if ((cmd->attr_bits & BIT_ATTR_ALL) > 0) {
308
+ lprintf("%sall", sep);
309
+ sep = ",";
310
+ }
311
+ if ((cmd->attr_bits & BIT_ATTR_ANY) > 0) {
312
+ lprintf("%sany", sep);
313
+ sep = ",";
314
+ }
315
+
316
+ attr = cmd->attrs;
317
+ while (attr != NULL) {
318
+ char *str = "";
319
+ char opt[32] = { '\0' };
320
+ switch (attr->type) {
321
+ case ATTR_EXEC:
322
+ str = "exec";
323
+ break;
324
+ case ATTR_GRAB:
325
+ str = "grab";
326
+ break;
327
+ case ATTR_UNGRAB:
328
+ str = "ungrab";
329
+ break;
330
+ case ATTR_IGNREL:
331
+ str = "ignrel";
332
+ break;
333
+ case ATTR_RCVREL:
334
+ str = "rcvrel";
335
+ break;
336
+ case ATTR_ALLREL:
337
+ str = "allrel";
338
+ break;
339
+ case ATTR_KEY:
340
+ snprintf(opt, 32, "key(%i)", (int)(attr->opt));
341
+ break;
342
+ case ATTR_REL:
343
+ snprintf(opt, 32, "rel(%i)", (int)(attr->opt));
344
+ break;
345
+ case ATTR_REP:
346
+ snprintf(opt, 32, "rep(%i)", (int)(attr->opt));
347
+ break;
348
+ case ATTR_SET:
349
+ snprintf(opt, 32, "set(%i)", (int)(attr->opt));
350
+ break;
351
+ case ATTR_UNSET:
352
+ snprintf(opt, 32, "unset(%i)", (int)(attr->opt));
353
+ break;
354
+ case ATTR_LEDON:
355
+ snprintf(opt, 32, "ledon(%i)", (int)(attr->opt));
356
+ break;
357
+ case ATTR_LEDOFF:
358
+ snprintf(opt, 32, "ledoff(%i)", (int)(attr->opt));
359
+ break;
360
+ default:
361
+ str = "unknown";
362
+ break;
363
+ }
364
+ lprintf("%s%s%s", sep, str, opt);
365
+ attr = attr->next;
366
+ sep = ",";
367
+ }
368
+ }
369
+
370
+
371
+ int open_config() {
372
+ FILE *fp = NULL;
373
+ char *line;
374
+ key_cmd *cmd;
375
+ confentry *lastnode = NULL, *newnode = NULL;
376
+ int lineno = 1, ret = 0;
377
+ size_t n = 0;
378
+
379
+ /* Allow the configuration file to be overridden */
380
+ if (!config)
381
+ config = CONFIG;
382
+
383
+ fp = fopen(config, "r");
384
+ if (fp == NULL) {
385
+ lprintf("Warning: could not open the configuration file %s: %s\n", config, strerror(errno));
386
+ return OK;
387
+ }
388
+ if (verbose > 1)
389
+ lprintf("Using configuration file %s\n", config);
390
+
391
+ while (!feof(fp) && (ret >=0)) {
392
+ line = NULL;
393
+ ret = getline(&line, &n, fp);
394
+ if ((ret > 0) && (proc_config(lineno, line, &cmd) == OK)) {
395
+ newnode = (confentry *)(malloc(sizeof(confentry)));
396
+ if (newnode == NULL) {
397
+ lprintf("Error: memory allocation failed\n");
398
+ close_config();
399
+ free(line);
400
+ return MEMERR;
401
+ }
402
+
403
+ newnode->cmd = cmd;
404
+ newnode->next = NULL;
405
+
406
+ if (list == NULL) {
407
+ list = newnode;
408
+ } else {
409
+ lastnode->next = newnode;
410
+ }
411
+ lastnode = newnode;
412
+
413
+ if (verbose > 1) {
414
+ lprintf("Config: ");
415
+ lprint_mask(cmd->keys);
416
+ lprintf(" -:- ");
417
+ print_etype(cmd->type);
418
+ lprintf(" -:- ");
419
+ print_attrs(cmd);
420
+ lprintf(" -:- %s\n", cmd->command);
421
+ }
422
+ }
423
+ free(line);
424
+ ++lineno;
425
+ }
426
+
427
+ fclose(fp);
428
+
429
+ return OK;
430
+ }
431
+
432
+
433
+ int close_config() {
434
+ confentry *node = list;
435
+ void *tmp;
436
+ attr_t *attr;
437
+
438
+ while (node != NULL) {
439
+ free_mask(&(node->cmd->keys));
440
+ free(node->cmd->command);
441
+
442
+ /* Free the attribute list */
443
+ attr = node->cmd->attrs;
444
+ while (attr != NULL) {
445
+ tmp = attr;
446
+ attr = attr->next;
447
+ free(tmp);
448
+ }
449
+
450
+ free(node->cmd);
451
+ tmp = node->next;
452
+ free(node);
453
+ node = tmp;
454
+ }
455
+ list = NULL;
456
+
457
+ return OK;
458
+ }
459
+
460
+
461
+ int match_key(int type, key_cmd **command) {
462
+ confentry *node = list;
463
+
464
+ *command = NULL;
465
+
466
+ while (node != NULL) {
467
+ if (((node->cmd->type & type) == 0) ||
468
+ (((node->cmd->attr_bits & BIT_ATTR_GRABBED) > 0) && (!grabbed)) ||
469
+ (((node->cmd->attr_bits & BIT_ATTR_UNGRABBED) > 0) && (grabbed))) {
470
+ node = node->next;
471
+ continue;
472
+ }
473
+ if (cmp_key_mask(node->cmd->keys, node->cmd->attr_bits)) {
474
+ *command = node->cmd;
475
+ return OK;
476
+ }
477
+ node = node->next;
478
+ }
479
+
480
+ return NOMATCH;
481
+ }
PKG/actkbd-0.2.8/config.o ADDED
Binary file (14.5 kB). View file
 
PKG/actkbd-0.2.8/linux.c ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * actkbd - A keyboard shortcut daemon
3
+ *
4
+ * Copyright (c) 2005-2006 Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
5
+ *
6
+ * This program is free software; you can redistribute it and/or modify it
7
+ * under the terms of the GNU General Public License version 2 as published by
8
+ * the Free Software Foundation.
9
+ */
10
+
11
+ #include "actkbd.h"
12
+
13
+ #include <regex.h>
14
+ #include <sys/ioctl.h>
15
+
16
+ #include <linux/input.h>
17
+
18
+ #define PROCFS "/proc/"
19
+ #define HANDLERS "bus/input/handlers"
20
+ #define DEVICES "bus/input/devices"
21
+ #define DEVNODE "/dev/input/event"
22
+
23
+
24
+ /* The device node */
25
+ static char devnode[32];
26
+
27
+ /* The device file pointer */
28
+ static FILE *dev;
29
+
30
+
31
+ int init_dev() {
32
+ FILE *fp = NULL;
33
+ int ret;
34
+ unsigned int u0, u1;
35
+ regex_t preg;
36
+ regmatch_t pmatch[4];
37
+
38
+ maxkey = KEY_MAX;
39
+
40
+ fp = fopen(PROCFS HANDLERS, "r");
41
+ if (fp == NULL) {
42
+ lprintf("Error: could not open " PROCFS HANDLERS ": %s\n", strerror(errno));
43
+ return HOSTFAIL;
44
+ }
45
+ do {
46
+ ret = fscanf(fp, "N: Number=%u Name=evdev Minor=%u", &u0, &u1);
47
+ fscanf(fp, "%*s\n");
48
+ } while ((!feof(fp)) && (ret < 2));
49
+ if (ret < 2) {
50
+ lprintf("Error: event interface not available\n");
51
+ return HOSTFAIL;
52
+ }
53
+ if (verbose > 1)
54
+ lprintf("Event interface present (handler %u)\n", u0);
55
+ fclose(fp);
56
+
57
+ /* Skip auto-detection when the device has been specified */
58
+ if (device)
59
+ return OK;
60
+
61
+ fp = fopen(PROCFS DEVICES, "r");
62
+ if (fp == NULL) {
63
+ lprintf("Error: could not open " PROCFS DEVICES ": %s\n", strerror(errno));
64
+ return HOSTFAIL;
65
+ }
66
+
67
+ /* Compile the regular expression and scan for it */
68
+ ret = -1;
69
+ regcomp(&preg, "^H: Handlers=(.* )?kbd (.* )?event([0-9]+)", REG_EXTENDED);
70
+ do {
71
+ char l[128] = "";
72
+ void *str = fgets(l, 128, fp);
73
+ if (str == NULL)
74
+ break;
75
+ ret = regexec(&preg, l, 4, pmatch, 0);
76
+ if (ret == 0) {
77
+ l[pmatch[3].rm_eo] = '\0';
78
+ ret = sscanf(l + pmatch[3].rm_so, "%u", &u0);
79
+ } else {
80
+ ret = -1;
81
+ }
82
+ } while ((!feof(fp)) && (ret < 1));
83
+ regfree(&preg);
84
+
85
+ if (ret < 1) {
86
+ lprintf("Error: could not detect a usable keyboard device\n");
87
+ return HOSTFAIL;
88
+ }
89
+ if (verbose > 1)
90
+ lprintf("Detected a usable keyboard device (event%u)\n", u0);
91
+
92
+ fclose(fp);
93
+ sprintf(devnode, DEVNODE "%u", u0);
94
+ device = devnode;
95
+
96
+ return OK;
97
+ }
98
+
99
+
100
+ int open_dev() {
101
+ dev = fopen(device, "a+");
102
+ if (dev == NULL) {
103
+ lprintf("Error: could not open %s: %s\n", device, strerror(errno));
104
+ return DEVFAIL;
105
+ }
106
+ return OK;
107
+ }
108
+
109
+
110
+ int close_dev() {
111
+ fclose(dev);
112
+ return OK;
113
+ }
114
+
115
+
116
+ int grab_dev() {
117
+ int ret;
118
+
119
+ if (grabbed)
120
+ return 0;
121
+
122
+ ret = ioctl(fileno(dev), EVIOCGRAB, (void *)1);
123
+ if (ret == 0)
124
+ grabbed = 1;
125
+ else
126
+ lprintf("Error: could not grab %s: %s\n", device, strerror(errno));
127
+
128
+ return ret;
129
+ }
130
+
131
+
132
+ int ungrab_dev() {
133
+ int ret;
134
+
135
+ if (!grabbed)
136
+ return 0;
137
+
138
+ ret = ioctl(fileno(dev), EVIOCGRAB, (void *)0);
139
+ if (ret == 0)
140
+ grabbed = 0;
141
+ else
142
+ lprintf("Error: could not ungrab %s: %s\n", device, strerror(errno));
143
+
144
+ return ret;
145
+ }
146
+
147
+
148
+ int get_key(int *key, int *type) {
149
+ struct input_event ev;
150
+ int ret;
151
+
152
+ do {
153
+ ret = fread(&ev, sizeof(ev), 1, dev);
154
+ if (ret < 1) {
155
+ lprintf("Error: failed to read event from %s: %s", device, strerror(errno));
156
+ return READERR;
157
+ }
158
+ } while (ev.type != EV_KEY);
159
+
160
+ *key = ev.code;
161
+
162
+ switch (ev.value) {
163
+ case 0:
164
+ *type = REL;
165
+ break;
166
+ case 1:
167
+ *type = KEY;
168
+ break;
169
+ case 2:
170
+ *type = REP;
171
+ break;
172
+ default:
173
+ *type = INVALID;
174
+ }
175
+
176
+ if (*key > KEY_MAX)
177
+ *type = INVALID;
178
+
179
+ if (*type == INVALID) {
180
+ lprintf("Error: invalid event read from %s: code = %u, value = %u", device, ev.code, ev.value);
181
+ return EVERR;
182
+ }
183
+
184
+ return OK;
185
+ }
186
+
187
+
188
+ int snd_key(int key, int type) {
189
+ struct input_event ev;
190
+ int ret;
191
+
192
+ ev.type = EV_KEY;
193
+ ev.code = key;
194
+
195
+ switch (type) {
196
+ case KEY:
197
+ ev.value = 1;
198
+ break;
199
+ case REL:
200
+ ev.value = 0;
201
+ break;
202
+ case REP:
203
+ ev.value = 2;
204
+ break;
205
+ default:
206
+ return EINVAL;
207
+ }
208
+
209
+ ret = fwrite(&ev, sizeof(ev), 1, dev);
210
+ if (ret < 1) {
211
+ lprintf("Error: failed to send event to %s: %s", device, strerror(errno));
212
+ return WRITEERR;
213
+ }
214
+
215
+ return OK;
216
+ }
217
+
218
+
219
+ int set_led(int led, int on) {
220
+ struct input_event ev;
221
+ int ret;
222
+
223
+ ev.type = EV_LED;
224
+ ev.code = led;
225
+ ev.value = (on > 0);
226
+
227
+ ret = fwrite(&ev, sizeof(ev), 1, dev);
228
+ if (ret < 1) {
229
+ lprintf("Error: failed to set LED at %s: %s", device, strerror(errno));
230
+ return WRITEERR;
231
+ }
232
+
233
+ return OK;
234
+ }
PKG/actkbd-0.2.8/linux.o ADDED
Binary file (8.6 kB). View file
 
PKG/actkbd-0.2.8/mask.c ADDED
@@ -0,0 +1,268 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * actkbd - A keyboard shortcut daemon
3
+ *
4
+ * Copyright (c) 2005-2006 Theodoros V. Kalamatianos <nyb@users.sourceforge.net>
5
+ *
6
+ * This program is free software; you can redistribute it and/or modify it
7
+ * under the terms of the GNU General Public License version 2 as published by
8
+ * the Free Software Foundation.
9
+ */
10
+
11
+ #include "actkbd.h"
12
+
13
+
14
+ /* Active key mask */
15
+ static unsigned char *mask = NULL;
16
+
17
+ /* Ignored key mask */
18
+ static unsigned char *ignmask = NULL;
19
+
20
+ /* Key mask size */
21
+ static int masksize = 0;
22
+
23
+
24
+ int get_masksize() {
25
+ return masksize;
26
+ }
27
+
28
+
29
+ /* Mask initialisation */
30
+ int init_mask(unsigned char **mask) {
31
+ /* Calculate the key mask size */
32
+ masksize = (maxkey + 1) / 8;
33
+ if (((maxkey + 1) % 8) > 0)
34
+ ++masksize;
35
+
36
+ /* Allocate the key mask space */
37
+ *mask = (unsigned char *)(malloc(masksize));
38
+
39
+ memset(*mask, 0, masksize);
40
+
41
+ return OK;
42
+ }
43
+
44
+
45
+ /* Mask deallocation */
46
+ void free_mask(unsigned char **mask) {
47
+ free(*mask);
48
+ *mask = NULL;
49
+ }
50
+
51
+ /* Mask zeroing */
52
+ static void clear_mask(unsigned char **mask) {
53
+ memset(*mask, 0, masksize);
54
+ }
55
+
56
+
57
+ /* Mask comparison */
58
+ static int cmp_mask(unsigned char *mask0, unsigned char* mask1, unsigned int attr) {
59
+ int i;
60
+
61
+ /* Require that at least one mask0 bit is not set in mask1 */
62
+ if ((attr & BIT_ATTR_NOT) != 0) {
63
+ for (i = 0; i < masksize; ++i)
64
+ if ((mask0[i] & ~mask1[i]) != 0)
65
+ return 1;
66
+ return 0;
67
+ }
68
+
69
+ /* Require that all mask1 bits are present in mask0 */
70
+ if ((attr & BIT_ATTR_ALL) != 0) {
71
+ for (i = 0; i < masksize; ++i)
72
+ if ((mask0[i] & mask1[i]) != mask1[i])
73
+ return 0;
74
+ return 1;
75
+ }
76
+
77
+ /* True if any mask1 bits are present in mask0 */
78
+ if ((attr & BIT_ATTR_ANY) != 0) {
79
+ for (i = 0; i < masksize; ++i)
80
+ if ((mask0[i] & mask1[i]) != 0)
81
+ return 1;
82
+ return 0;
83
+ }
84
+
85
+ /* Require an exact match */
86
+ return (memcmp(mask0, mask1, masksize) == 0);
87
+ }
88
+
89
+
90
+ /* Set a bit */
91
+ static int set_bit(unsigned char *mask, int bit, int val) {
92
+ unsigned char byte = 1;
93
+
94
+ if ((bit < 0) || (bit > maxkey) || (val < 0) || (val > 1)) {
95
+ if (verbose > 1)
96
+ lprintf("Error: invalid set_bit arguments %i, %i\n", bit, val);
97
+ return INTERR;
98
+ }
99
+
100
+ byte = byte << (bit % 8);
101
+
102
+ if (val == 0)
103
+ mask[bit / 8] = mask[bit / 8] & (~byte);
104
+ else
105
+ mask[bit / 8] = mask[bit / 8] | byte;
106
+
107
+ return OK;
108
+ }
109
+
110
+ /* Get a bit */
111
+ static int get_bit(unsigned char *mask, int bit) {
112
+ unsigned char byte = 1;
113
+
114
+ if ((bit < 0) || (bit > maxkey)) {
115
+ lprintf("Error: invalid get_bit argument %i\n", bit);
116
+ return -1;
117
+ }
118
+
119
+ byte = byte << (bit % 8);
120
+ return ((mask[bit / 8] & byte) > 0);
121
+ }
122
+
123
+
124
+ /* Print a key mask */
125
+ static int lprint_mask_delim(unsigned char *mask, char d) {
126
+ int i = 0, c = 0;
127
+
128
+ if (mask == NULL) {
129
+ lprintf("Error: attempt to dereference NULL mask pointer\n");
130
+ return INTERR;
131
+ }
132
+
133
+ for (i = 0; i <= maxkey; ++i) {
134
+ if (get_bit(mask, i)) {
135
+ ++c;
136
+ if (c > 1)
137
+ lprintf("%c%i", d, i);
138
+ else
139
+ lprintf("%i", i);
140
+ }
141
+ }
142
+ return OK;
143
+ }
144
+
145
+ int lprint_mask(unsigned char *mask) {
146
+ return lprint_mask_delim(mask, '+');
147
+ }
148
+
149
+
150
+ /* Use a A+B+N... string to initialise a key mask */
151
+ int strmask(unsigned char **mask, char *keys) {
152
+ int l, i, k;
153
+
154
+ /* Default mask pointer */
155
+ *mask = NULL;
156
+
157
+ l = strlen(keys);
158
+
159
+ /* Clean up the input */
160
+ for (i = 0; i < l; ++i) {
161
+ if ((keys[i] == '+') || (keys[i] == '-') || (keys[i] == ','))
162
+ keys[i] = ' ';
163
+ if (isspace(keys[i]))
164
+ keys[i] = '\n';
165
+ if ((!isdigit(keys[i])) && (keys[i] != '\n'))
166
+ return CONFERR;
167
+ }
168
+
169
+ init_mask(mask);
170
+
171
+ /* Set the key mask */
172
+ i = 0;
173
+ while (i < l) {
174
+ if (isdigit(keys[i])) {
175
+ sscanf(keys + i, "%i", &k);
176
+ if (set_bit(*mask, k, 1) != OK) {
177
+ free(*mask);
178
+ return CONFERR;
179
+ }
180
+ while (isdigit(keys[i]))
181
+ ++i;
182
+ } else {
183
+ ++i;
184
+ }
185
+ }
186
+
187
+ return OK;
188
+ }
189
+
190
+
191
+ /* The active key mask */
192
+ int init_key_mask() {
193
+ return init_mask(&mask);
194
+ }
195
+
196
+ void free_key_mask() {
197
+ free_mask(&mask);
198
+ }
199
+
200
+ void clear_key_mask() {
201
+ clear_mask(&mask);
202
+ }
203
+
204
+ int set_key_bit(int bit, int val) {
205
+ return set_bit(mask, bit, val);
206
+ }
207
+
208
+ #if UNUSED
209
+ int get_key_bit(int bit) {
210
+ return get_bit(mask, bit);
211
+ }
212
+ #endif
213
+
214
+ int cmp_key_mask(unsigned char *mask0, unsigned int attr) {
215
+ return cmp_mask(mask, mask0, attr);
216
+ }
217
+
218
+ #if UNUSED
219
+ int lprint_key_mask_delim(char d) {
220
+ return lprint_mask_delim(mask, d);
221
+ }
222
+ #endif
223
+
224
+ int lprint_key_mask() {
225
+ return lprint_mask(mask);
226
+ }
227
+
228
+
229
+ /* The ignored key mask */
230
+ int init_ign_mask() {
231
+ return init_mask(&ignmask);
232
+ }
233
+
234
+ void free_ign_mask() {
235
+ free_mask(&ignmask);
236
+ }
237
+
238
+ #if UNUSED
239
+ void clear_ign_mask() {
240
+ clear_mask(&ignmask);
241
+ }
242
+
243
+ int set_ign_bit(int bit, int val) {
244
+ return set_bit(ignmask, bit, val);
245
+ }
246
+ #endif
247
+
248
+ int get_ign_bit(int bit) {
249
+ return get_bit(ignmask, bit);
250
+ }
251
+
252
+ #if UNUSED
253
+ int cmp_ign_mask(unsigned char *mask0, unsigned int attr) {
254
+ return cmp_mask(ignmask, mask0, attr);
255
+ }
256
+
257
+ int lprint_ign_mask_delim(char d) {
258
+ return lprint_mask_delim(ignmask, d);
259
+ }
260
+
261
+ int lprint_ign_mask() {
262
+ return lprint_mask(ignmask);
263
+ }
264
+ #endif
265
+
266
+ void copy_key_to_ign_mask() {
267
+ memcpy(ignmask, mask, masksize);
268
+ }
PKG/actkbd-0.2.8/mask.o ADDED
Binary file (6.42 kB). View file
 
PKG/actkbd-0.2.8/samples/actkbd.conf ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # The keycodes on a PC are usually:
2
+ #
3
+ # Left Shift = 42
4
+ # Left Ctrl = 29
5
+ # Left Alt = 56
6
+ # Right Alt = 100
7
+ # Right Ctrl = 97
8
+ # Right Shift = 54
9
+ #
10
+ # Mute = 113
11
+ # Volume Down = 114
12
+ # Volume Up = 115
13
+ # Eject = 161
14
+ #
15
+ # The LED codes on a PC are usually:
16
+ #
17
+ # Num Lock = 0
18
+ # Caps Lock = 1
19
+ # Scroll Lock = 2
20
+
21
+
22
+ # Some simple examples
23
+ 114:key::echo volume.down press
24
+ 114:rep::echo volume.down repeat
25
+ 114:rel::echo volume.down release
26
+
27
+ 56+114:::echo left.alt+volume.down press
28
+
29
+
30
+ # Use the `mute' key as a 'function' key
31
+ 113:key:ungrabbed,grab:echo keyboard grab
32
+ 113:rel:grabbed,ungrab:echo keyboard ungrab
33
+
34
+ # This allows the `a' key to be binded to a command
35
+ # To use: press mute, press a, release in any order
36
+ 113+30::grabbed:echo alpha
37
+
38
+ # Same thing with the `b' key
39
+ 113+48::grabbed:echo beta
40
+
41
+
42
+ # Act if any of the `a'/`b'/`c' keys match
43
+ 30,48,46::any:echo A/B/C
44
+
45
+ # Act if both the `alt' and `f' keys match - ignore the other keys
46
+ 56+33::all:echo alt+f+...
47
+
48
+
49
+ # A real world example...
50
+ # When the `eject' key is pressed, wait for one of the `e'/`m'/`u' keys:
51
+ 161::ungrabbed,grab,noexec,ignrel:
52
+ 161:rel:grabbed,noexec:
53
+
54
+ # The `e' key : eject
55
+ 161+18::grabbed:echo eject
56
+ 161+18:rel:grabbed,noexec,ungrab,rcvrel,allrel:
57
+
58
+ # The `m' key : mount
59
+ 161+50::grabbed:echo mount
60
+ 161+50:rel:grabbed,noexec,ungrab,rcvrel,allrel:
61
+
62
+ # The `u' key : umount
63
+ 161+22::grabbed:echo umount
64
+ 161+22:rel:grabbed,noexec,ungrab,rcvrel,allrel:
65
+
66
+ # Any other key escapes this mode
67
+ 161::grabbed,all,noexec:
68
+ 161:rel:grabbed,all,noexec,ungrab,rcvrel,allrel:
69
+
70
+
71
+ # Produce an `a' key press and release whenever
72
+ # the `left.ctrl'+`volume.up' keys are pressed
73
+ 29+115::key(30),rel(30),noexec:
74
+
75
+
76
+ # Pressing the `1' key switches on the first LED (usually the Num Lock LED)
77
+ 2::ledon(0),noexec:
78
+
79
+ # Pressing the `0' key switches it off
80
+ 11::ledoff(0),noexec:
81
+
82
+
83
+ # This entry is triggered by any key press or release
84
+ # that has not matched with one of the entries above
85
+ :key,rel:not:echo '*'
PKG/actkbd-0.2.8/samples/udev.rules ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # udev rules for keyboards
2
+ ACTION=="add", SUBSYSTEM=="input", KERNEL=="event[0-9]*", GOTO="_INPUT_"
3
+ GOTO="_END_"
4
+
5
+
6
+ LABEL="_INPUT_"
7
+
8
+ # AT keyboard
9
+ DRIVERS=="atkbd", ENV{__CFG}="/etc/actkbd/actkbd.atkbd.conf", GOTO="_KBD_"
10
+
11
+ GOTO="_END_"
12
+
13
+
14
+ # Keyboards
15
+ LABEL="_KBD_"
16
+
17
+ # Launch actkbd
18
+ RUN+="/usr/sbin/actkbd -q -D -c %E{__CFG}"
19
+
20
+
21
+ # End
22
+ LABEL="_END_"
PKG/brave-bin/template ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Template file for 'brave-bin'
2
+ pkgname=brave-bin
3
+ version=1.89.137
4
+ revision=1
5
+ only_for_archs="x86_64"
6
+ short_desc="Secure, fast and private web browser with ad blocker"
7
+ maintainer="Soanvig <soanvig@gmail.com>"
8
+ hostmakedepends="tar xz" # need gtk+3!
9
+ license="Mozilla Public License Version 2.0"
10
+ homepage="https://brave.com"
11
+ distfiles="https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser_${version}_amd64.deb"
12
+ checksum=0456f1fc4c781dd685a5f63600a737c8068ca7a3e26300bf92610817459d7305
13
+ nostrip=yes
14
+
15
+ do_extract() {
16
+ mkdir -p ${DESTDIR}
17
+ ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/brave-browser_${version}_amd64.deb
18
+ }
19
+
20
+ do_install() {
21
+ tar xf data.tar.xz -C ${DESTDIR}
22
+
23
+ # Install the icons
24
+ for size in 24 32 48 64 128 256; do
25
+ # Create the brave browser xdg directory
26
+ mkdir -p ${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps
27
+
28
+ # Copy the brave browser icon
29
+ mv ${DESTDIR}/opt/brave.com/brave/product_logo_${size}.png ${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps/brave-browser.png
30
+ done
31
+
32
+ # Remove the Debian/Ubuntu crontab
33
+ rm -rf ${DESTDIR}/etc
34
+ rm -rf ${DESTDIR}/opt/brave.com/brave/cron
35
+ }
PKG/faugus-launcher/template ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Template file for 'faugus-launcher'
2
+ pkgname=faugus-launcher
3
+ version=1.14.4
4
+ revision=1
5
+ build_style=meson
6
+ hostmakedepends="pkg-config python3 gettext glib-devel desktop-file-utils ImageMagick"
7
+ makedepends="python3-devel libadwaita-devel libayatana-appindicator-devel"
8
+ depends="python3-gobject python3-Pillow python3-yaml libadwaita python3-requests
9
+ python3-filelock python3-psutil ImageMagick python3-icoextract python3-vdf libayatana-appindicator"
10
+ short_desc="Simple and lightweight app for running Windows games using UMU-Launcher"
11
+ maintainer="Tu Nombre <tu@email.com>"
12
+ license="MIT"
13
+ homepage="https://github.com/Faugus/faugus-launcher"
14
+ distfiles="https://github.com/Faugus/faugus-launcher/archive/refs/tags/${version}.tar.gz"
15
+ checksum=98ecefb29c1cd9ae939a9db5cd13bd3e5dcaa47aad17d476663453f8231bb64a
16
+
17
+ post_install() {
18
+ vlicense LICENSE
19
+ }
PKG/heroic-games/template ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Template file for 'heroic-games-launcher-bin'
2
+ pkgname=heroic-games
3
+ version=2.20.1
4
+ revision=1
5
+ archs="x86_64"
6
+ build_style=fetch
7
+ short_desc="Open Source Launcher for GOG, Epic Games and Amazon Games"
8
+ maintainer="Javiercplus"
9
+ license="GPL-3.0-only"
10
+ homepage="https://heroicgameslauncher.com"
11
+ distfiles="https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/releases/download/v${version}/Heroic-${version}-linux-amd64.deb"
12
+ checksum=4e9957436bc270318b00a1107910a3c7d30ad72da530af4dee5c2860866a6272
13
+
14
+ # Dependencias mapeadas de Debian a Void Linux
15
+ depends="gtk+3 libnotify nss libXScrnSaver libXtst xdg-utils at-spi2-core libuuid libsecret"
16
+
17
+ # Evita que XBPS intente modificar los binarios ya compilados
18
+ nostrip=yes
19
+
20
+ do_install() {
21
+ vextract "Heroic-${version}-linux-amd64.deb"
22
+
23
+ # 1. Instalación del núcleo de la aplicación
24
+ vmkdir opt
25
+ cp -R opt/Heroic "${DESTDIR}/opt/"
26
+
27
+ # 2. Enlace simbólico para ejecución global
28
+ vmkdir usr/bin
29
+ ln -sf /opt/Heroic/heroic "${DESTDIR}/usr/bin/heroic"
30
+
31
+ # 3. Archivos Desktop e Iconos
32
+ vmkdir usr/share/applications
33
+ vcopy "usr/share/applications/*.desktop" usr/share/applications
34
+
35
+ vmkdir usr/share/icons
36
+ vcopy "usr/share/icons/*" usr/share/icons
37
+
38
+ # 4. Seguridad (Chrome Sandbox)
39
+ # Se aplica el permiso SUID para asegurar el aislamiento de procesos de Electron
40
+ chmod 4755 "${DESTDIR}/opt/Heroic/chrome-sandbox"
41
+
42
+ # 5. Perfil de AppArmor (Opcional pero incluido por trazabilidad)
43
+ if [ -f "opt/Heroic/resources/apparmor-profile" ]; then
44
+ vmkdir etc/apparmor.d
45
+ vcopy "opt/Heroic/resources/apparmor-profile" etc/apparmor.d/heroic
46
+ fi
47
+ }
PKG/kernel-neko-rt/template ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ pkgname=kernel-neko-rt
2
+ version=6.18.0
3
+ revision=1
4
+ short_desc="Custom RT kernel rt-rt3-neko+ precompiled for Void Linux"
5
+ maintainer="JavierC"
6
+ license="GPL-2.0-only"
7
+ homepage="https://github.com/franckey02/kernel-neko-void"
8
+ distfiles="https://github.com/franckey02/kernel-neko-void/releases/download/6.18-rt/neko-kernel-void-6.18.0-rt-rt3-neko+.tar.gz"
9
+ checksum="1f7ae08037f4b14d10d0e9c69b8a03f93392710ea3cf50aa01ca9f2eda9d9bc5"
10
+ create_wrksrc=yes
11
+ triggers="kernel-hooks"
12
+ kernel_hooks_version="6.18.0-rt-rt3-neko+"
13
+ do_install() {
14
+ vmkdir boot
15
+ vmkdir usr/lib/modules
16
+
17
+ cp -a boot/* ${DESTDIR}/boot/
18
+ cp -a lib/modules/* ${DESTDIR}/usr/lib/modules/
19
+ }
PKG/kernel-neko-void/.github/workflows/realtime.yml ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Compilar Neko Void Kernel (con RT sobre RC)
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ workflow_dispatch:
7
+
8
+ env:
9
+ KERNEL_REVISION: 1 # Ya no se usa directamente, pero se puede dejar
10
+
11
+ jobs:
12
+ build-kernel:
13
+ runs-on: ubuntu-latest
14
+ container:
15
+ image: ghcr.io/void-linux/void-glibc-full:latest
16
+ options: --user root
17
+
18
+ steps:
19
+ - name: 1. Instalar dependencias del sistema
20
+ run: |
21
+ xbps-install -Syu xbps -y
22
+ xbps-install -Syu base-devel git bc kmod elfutils-devel bash cpio xz lz4 zstd flex bison openssl-devel curl pahole tar python3 patch wget rsync -y
23
+
24
+ - name: 2. Checkout del repositorio (para scripts personalizados si los hay)
25
+ uses: actions/checkout@v4
26
+ with:
27
+ path: repo
28
+
29
+ - name: 3. Clonar fuentes del kernel (v6.18-rc4) y modificar EXTRAVERSION a -rt
30
+ run: |
31
+ git clone --depth 1 --branch v6.18-rc4 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-src
32
+ cd linux-src
33
+ # Cambiar EXTRAVERSION de -rc4 a -rt
34
+ sed -i 's/^EXTRAVERSION =.*/EXTRAVERSION = -rt/' Makefile
35
+ cd ..
36
+
37
+ - name: 4. Obtener configuración base de Void y establecer como .config
38
+ run: |
39
+ cd linux-src
40
+ wget -O .config https://github.com/void-linux/void-packages/raw/refs/heads/master/srcpkgs/linux6.18/files/x86_64-dotconfig
41
+ cd ..
42
+
43
+ - name: 5. Aplicar parche de Void (fixdep-largefile)
44
+ run: |
45
+ cd linux-src
46
+ wget -O fixdep-largefile.patch https://github.com/void-linux/void-packages/raw/refs/heads/master/srcpkgs/linux6.18/patches/fixdep-largefile.patch
47
+ patch -p1 -N --batch < fixdep-largefile.patch
48
+ cd ..
49
+
50
+ - name: 6. Aplicar parche RT (PREEMPT_RT para 6.18-rc4)
51
+ run: |
52
+ cd linux-src
53
+ wget https://cdn.kernel.org/pub/linux/kernel/projects/rt/6.18/patch-6.18-rc4-rt3.patch.xz
54
+ xzcat patch-6.18-rc4-rt3.patch.xz | patch -p1 -N --batch
55
+ cd ..
56
+
57
+ - name: 7. Ajustar configuración (Hz, optimizaciones, RT, debug, nombre)
58
+ run: |
59
+ cd linux-src
60
+ # Desactivar la generación automática de versión git para evitar -dirty
61
+ scripts/config --disable CONFIG_LOCALVERSION_AUTO
62
+ # Establecer LOCALVERSION con el identificador deseado (ej: -neko)
63
+ scripts/config --set-str CONFIG_LOCALVERSION "-neko"
64
+
65
+ # Frecuencia de reloj 1000 Hz
66
+ scripts/config -d CONFIG_HZ_300 -e CONFIG_HZ_1000 --set-val CONFIG_HZ 1000
67
+ scripts/config -d CONFIG_HZ_PERIODIC -d CONFIG_NO_HZ_IDLE -e CONFIG_NO_HZ_FULL -e CONFIG_NO_HZ
68
+
69
+ # Compresión ZSTD para módulos
70
+ scripts/config -e CONFIG_MODULE_COMPRESS_ZSTD
71
+
72
+ # Hugepages always (mejor rendimiento)
73
+ scripts/config -d CONFIG_TRANSPARENT_HUGEPAGE_MADVISE -e CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS
74
+
75
+ # Activar RT (PREEMPT_RT)
76
+ scripts/config -d CONFIG_PREEMPT_VOLUNTARY
77
+ scripts/config -d CONFIG_PREEMPT_LL
78
+ scripts/config -d CONFIG_PREEMPT_NONE
79
+ scripts/config -e CONFIG_PREEMPT_RT
80
+
81
+ # Desactivar debug masivo
82
+ scripts/config --disable CONFIG_DEBUG_INFO \
83
+ --disable CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \
84
+ --disable CONFIG_DEBUG_INFO_REDUCED \
85
+ --disable CONFIG_DEBUG_INFO_BTF \
86
+ --disable CONFIG_DEBUG_VM \
87
+ --disable CONFIG_DEBUG_KERNEL \
88
+ --disable CONFIG_PROVE_LOCKING \
89
+ --disable CONFIG_LOCK_STAT \
90
+ --disable CONFIG_LATENCYTOP
91
+
92
+ # Desactivar firma de módulos (evita problemas con certificados)
93
+ scripts/config --disable CONFIG_MODULE_SIG
94
+ scripts/config --set-str CONFIG_SYSTEM_TRUSTED_KEYS ""
95
+
96
+ # Actualizar configuración (incorpora nuevas opciones de los parches)
97
+ make olddefconfig
98
+ cd ..
99
+
100
+ - name: 8. Compilar el kernel y módulos (con logs detallados)
101
+ run: |
102
+ cd linux-src
103
+ export KBUILD_BUILD_TIMESTAMP=$(date -u -d @0 +"%Y-%m-%d %H:%M:%S")
104
+ export KBUILD_BUILD_USER=voidlinux
105
+ export KBUILD_BUILD_HOST=voidlinux
106
+ export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
107
+
108
+ # Compilar con V=1 para logs detallados
109
+ make -j$(nproc) prepare V=1
110
+ make -j$(nproc) bzImage modules V=1 2>&1 | tee ../build.log
111
+ cd ..
112
+
113
+ - name: 9. Subir logs de compilación (incluso si falla)
114
+ if: always()
115
+ uses: actions/upload-artifact@v4
116
+ with:
117
+ name: build-logs
118
+ path: build.log
119
+
120
+ - name: 10. Instalar kernel, módulos y config (solo si la compilación fue exitosa)
121
+ if: success()
122
+ run: |
123
+ cd linux-src
124
+ KERNEL_RELEASE=$(make kernelrelease)
125
+ echo "KERNEL_RELEASE=${KERNEL_RELEASE}" >> $GITHUB_ENV
126
+
127
+ make INSTALL_MOD_PATH=$GITHUB_WORKSPACE/modules modules_install
128
+
129
+ mkdir -p $GITHUB_WORKSPACE/pkg/boot
130
+ cp arch/x86/boot/bzImage $GITHUB_WORKSPACE/pkg/boot/vmlinuz-${KERNEL_RELEASE}
131
+ cp System.map $GITHUB_WORKSPACE/pkg/boot/System.map-${KERNEL_RELEASE}
132
+ cp .config $GITHUB_WORKSPACE/pkg/boot/config-${KERNEL_RELEASE}
133
+
134
+ mkdir -p $GITHUB_WORKSPACE/pkg/lib/modules
135
+ mv $GITHUB_WORKSPACE/modules/lib/modules/${KERNEL_RELEASE} $GITHUB_WORKSPACE/pkg/lib/modules/
136
+ cd ..
137
+
138
+ - name: 11. Empaquetar artefactos
139
+ if: success()
140
+ run: |
141
+ cd $GITHUB_WORKSPACE/pkg
142
+ tar -czf ../neko-kernel-void-${KERNEL_RELEASE}.tar.gz .
143
+ cd ..
144
+
145
+ - name: 12. Subir resultado
146
+ if: success()
147
+ uses: actions/upload-artifact@v4
148
+ with:
149
+ name: neko-kernel-void-rt-rc
150
+ path: neko-kernel-void-*.tar.gz
PKG/kernel-neko-void/.github/workflows/zen.yml ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Compilar Zen Kernel (lqx1) para Void Linux
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ build-kernel:
10
+ runs-on: ubuntu-latest
11
+ container:
12
+ image: ghcr.io/void-linux/void-glibc-full:latest
13
+ options: --user root
14
+
15
+ steps:
16
+ - name: 1. Instalar dependencias del sistema
17
+ run: |
18
+ xbps-install -Syu xbps -y
19
+ xbps-install -Syu base-devel git bc kmod elfutils-devel bash cpio xz lz4 zstd flex bison openssl-devel curl pahole tar python3 patch wget rsync -y
20
+
21
+ - name: 2. Checkout de TU repositorio (para scripts personalizados si los hay)
22
+ uses: actions/checkout@v4
23
+ with:
24
+ path: repo
25
+
26
+ - name: 3. Clonar fuentes del Zen Kernel (v6.18.12-lqx1)
27
+ run: |
28
+ git clone --depth 1 --branch v6.18.12-lqx1 https://github.com/zen-kernel/zen-kernel.git linux-src
29
+
30
+ - name: 4. Obtener configuración base de Void (linux6.18)
31
+ run: |
32
+ cd linux-src
33
+ wget -O .config https://github.com/void-linux/void-packages/raw/refs/heads/master/srcpkgs/linux6.18/files/x86_64-dotconfig || \
34
+ wget -O .config https://raw.githubusercontent.com/void-linux/void-packages/master/srcpkgs/linux6.12/files/x86_64-dotconfig
35
+ cd ..
36
+
37
+ - name: 5. Ajustar configuración (nombre, optimizaciones, debug)
38
+ run: |
39
+ cd linux-src
40
+ # Evitar sufijo -dirty (por si acaso)
41
+ scripts/config --disable CONFIG_LOCALVERSION_AUTO
42
+ # Añadir identificador personal (el nombre final será algo como 6.18.12-lqx1-neko)
43
+ scripts/config --set-str CONFIG_LOCALVERSION "-neko"
44
+
45
+ # Optimizaciones
46
+ scripts/config --enable CONFIG_CC_OPTIMIZE_FOR_SIZE
47
+ scripts/config --enable CONFIG_MODULE_COMPRESS_ZSTD
48
+
49
+ # Desactivar debug masivo
50
+ scripts/config --disable CONFIG_DEBUG_INFO \
51
+ --disable CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \
52
+ --disable CONFIG_DEBUG_INFO_REDUCED \
53
+ --disable CONFIG_DEBUG_INFO_BTF \
54
+ --disable CONFIG_DEBUG_VM \
55
+ --disable CONFIG_DEBUG_KERNEL \
56
+ --disable CONFIG_PROVE_LOCKING \
57
+ --disable CONFIG_LOCK_STAT \
58
+ --disable CONFIG_LATENCYTOP
59
+
60
+ # Desactivar firma de módulos
61
+ scripts/config --disable CONFIG_MODULE_SIG
62
+ scripts/config --set-str CONFIG_SYSTEM_TRUSTED_KEYS ""
63
+
64
+ # Actualizar configuración (incorpora nuevas opciones)
65
+ make olddefconfig
66
+ cd ..
67
+
68
+ - name: 6. Compilar kernel y módulos (con logs detallados)
69
+ run: |
70
+ cd linux-src
71
+ export KBUILD_BUILD_TIMESTAMP=$(date -u -d @0 +"%Y-%m-%d %H:%M:%S")
72
+ export KBUILD_BUILD_USER=voidlinux
73
+ export KBUILD_BUILD_HOST=voidlinux
74
+ export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
75
+
76
+ make -j$(nproc) prepare
77
+ make -j$(nproc) bzImage modules V=1 2>&1 | tee ../build.log
78
+ cd ..
79
+
80
+ - name: 7. Subir logs de compilación (incluso si falla)
81
+ if: always()
82
+ uses: actions/upload-artifact@v4
83
+ with:
84
+ name: build-logs
85
+ path: build.log
86
+
87
+ - name: 8. Instalar kernel, módulos y config (solo si la compilación fue exitosa)
88
+ if: success()
89
+ run: |
90
+ cd linux-src
91
+ KERNEL_RELEASE=$(make kernelrelease)
92
+ echo "KERNEL_RELEASE=${KERNEL_RELEASE}" >> $GITHUB_ENV
93
+
94
+ make INSTALL_MOD_PATH=$GITHUB_WORKSPACE/modules modules_install
95
+
96
+ mkdir -p $GITHUB_WORKSPACE/pkg/boot
97
+ cp arch/x86/boot/bzImage $GITHUB_WORKSPACE/pkg/boot/vmlinuz-${KERNEL_RELEASE}
98
+ cp System.map $GITHUB_WORKSPACE/pkg/boot/System.map-${KERNEL_RELEASE}
99
+ cp .config $GITHUB_WORKSPACE/pkg/boot/config-${KERNEL_RELEASE}
100
+
101
+ mkdir -p $GITHUB_WORKSPACE/pkg/lib/modules
102
+ mv $GITHUB_WORKSPACE/modules/lib/modules/${KERNEL_RELEASE} $GITHUB_WORKSPACE/pkg/lib/modules/
103
+ cd ..
104
+
105
+ - name: 9. Empaquetar artefactos
106
+ if: success()
107
+ run: |
108
+ cd $GITHUB_WORKSPACE/pkg
109
+ tar -czf ../zen-kernel-void-${KERNEL_RELEASE}.tar.gz .
110
+ cd ..
111
+
112
+ - name: 10. Subir resultado
113
+ if: success()
114
+ uses: actions/upload-artifact@v4
115
+ with:
116
+ name: zen-kernel-void-lqx1
117
+ path: zen-kernel-void-*.tar.gz
PKG/kernel-neko-void/README.md ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ # kernel-neko-void
2
+ Workflows of Neko VOid
PKG/kernel-neko-void/kernel-neko-rt/template ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ pkgname=kernel-neko-rt
2
+ version=6.18.0
3
+ revision=1
4
+ short_desc="Custom RT kernel rt-rt3-neko+ precompiled for Void Linux"
5
+ maintainer="JavierC"
6
+ license="GPL-2.0-only"
7
+ homepage="https://github.com/franckey02/kernel-neko-void"
8
+ distfiles="https://github.com/franckey02/kernel-neko-void/releases/download/6.18-rt/neko-kernel-void-6.18.0-rt-rt3-neko+.tar.gz"
9
+ checksum="1f7ae08037f4b14d10d0e9c69b8a03f93392710ea3cf50aa01ca9f2eda9d9bc5"
10
+ create_wrksrc=yes
11
+ triggers="kernel-hooks"
12
+ kernel_hooks_version="6.18.0-rt-rt3-neko+"
13
+ do_install() {
14
+ vmkdir boot
15
+ vmkdir usr/lib/modules
16
+
17
+ cp -a boot/* ${DESTDIR}/boot/
18
+ cp -a lib/modules/* ${DESTDIR}/usr/lib/modules/
19
+ }
PKG/kernel-neko-void/kernel-neko-zen/INSTALL ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Archivo INSTALL para kernel-neko-zen
2
+ case "$ACTION" in
3
+ post)
4
+ # Registrar los módulos del kernel
5
+ depmod 6.18.12-lqx1-neko
6
+
7
+ # Generar initramfs con dracut
8
+ dracut --force /boot/initramfs-6.18.12-lqx1-neko.img 6.18.12-lqx1-neko
9
+
10
+ # Actualizar la configuración de GRUB (si se usa)
11
+ if command -v grub-mkconfig >/dev/null 2>&1; then
12
+ grub-mkconfig -o /boot/grub/grub.cfg
13
+ fi
14
+ ;;
15
+ esac
PKG/kernel-neko-void/kernel-neko-zen/template ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ pkgname=kernel-neko-zen
2
+ version=6.18.12
3
+ revision=1
4
+ short_desc="Custom Zen kernel lqx1-neko precompiled for Void Linux"
5
+ maintainer="JavierC"
6
+ license="GPL-2.0-only"
7
+ homepage="https://github.com/franckey02/kernel-neko-void"
8
+ distfiles="https://github.com/franckey02/kernel-neko-void/releases/download/6.18-lxq1/zen-kernel-void-${version}-lqx1-neko.tar.gz"
9
+ checksum="2264ae86edd992b91dbe222581a455d921a0f2643c55646f4798f548ad084174"
10
+ create_wrksrc=yes
11
+
12
+ do_install() {
13
+ vmkdir boot
14
+ vmkdir usr/lib/modules
15
+
16
+ cp -a boot/* ${DESTDIR}/boot/
17
+ cp -a lib/modules/* ${DESTDIR}/usr/lib/modules/
18
+ }
PKG/kernel-neko-zen/INSTALL ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Archivo INSTALL para kernel-neko-zen
2
+ case "$ACTION" in
3
+ post)
4
+ # Registrar los módulos del kernel
5
+ depmod 6.18.12-lqx1-neko
6
+
7
+ # Generar initramfs con dracut
8
+ dracut --force /boot/initramfs-6.18.12-lqx1-neko.img 6.18.12-lqx1-neko
9
+
10
+ # Actualizar la configuración de GRUB (si se usa)
11
+ if command -v grub-mkconfig >/dev/null 2>&1; then
12
+ grub-mkconfig -o /boot/grub/grub.cfg
13
+ fi
14
+ ;;
15
+ esac
PKG/kernel-neko-zen/template ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ pkgname=kernel-neko-zen
2
+ version=6.18.12
3
+ revision=1
4
+ short_desc="Custom Zen kernel lqx1-neko precompiled for Void Linux"
5
+ maintainer="JavierC"
6
+ license="GPL-2.0-only"
7
+ homepage="https://github.com/franckey02/kernel-neko-void"
8
+ distfiles="https://github.com/franckey02/kernel-neko-void/releases/download/6.18-lxq1/zen-kernel-void-${version}-lqx1-neko.tar.gz"
9
+ checksum="2264ae86edd992b91dbe222581a455d921a0f2643c55646f4798f548ad084174"
10
+ create_wrksrc=yes
11
+
12
+ do_install() {
13
+ vmkdir boot
14
+ vmkdir usr/lib/modules
15
+
16
+ cp -a boot/* ${DESTDIR}/boot/
17
+ cp -a lib/modules/* ${DESTDIR}/usr/lib/modules/
18
+ }
PKG/librewolf/files/librewolf.desktop ADDED
@@ -0,0 +1,386 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [Desktop Entry]
2
+ Version=1.0
3
+ Name=LibreWolf
4
+ Name[ar]=متصفح الويب فَيَرفُكْس
5
+ Name[ast]=Restolador web LibreWolf
6
+ Name[bn]=ফায়ারফক্স ওয়েব ব্রাউজার
7
+ Name[ca]=Navegador web LibreWolf
8
+ Name[cs]=LibreWolf Webový prohlížeč
9
+ Name[da]=LibreWolf - internetbrowser
10
+ Name[el]=Περιηγητής LibreWolf
11
+ Name[es]=Navegador web LibreWolf
12
+ Name[et]=LibreWolfi veebibrauser
13
+ Name[fa]=مرورگر اینترنتی LibreWolf
14
+ Name[fi]=LibreWolf-selain
15
+ Name[fr]=Navigateur Web LibreWolf
16
+ Name[gl]=Navegador web LibreWolf
17
+ Name[he]=דפדפן האינטרנט LibreWolf
18
+ Name[hr]=LibreWolf web preglednik
19
+ Name[hu]=LibreWolf webböngésző
20
+ Name[it]=LibreWolf Browser Web
21
+ Name[ja]=LibreWolf ウェブ・ブラウザ
22
+ Name[ko]=LibreWolf 웹 브라우저
23
+ Name[ku]=Geroka torê LibreWolf
24
+ Name[lt]=LibreWolf interneto naršyklė
25
+ Name[nb]=LibreWolf Nettleser
26
+ Name[nl]=LibreWolf webbrowser
27
+ Name[nn]=LibreWolf Nettlesar
28
+ Name[no]=LibreWolf Nettleser
29
+ Name[pl]=Przeglądarka WWW LibreWolf
30
+ Name[pt]=LibreWolf Navegador Web
31
+ Name[pt_BR]=Navegador Web LibreWolf
32
+ Name[ro]=LibreWolf – Navigator Internet
33
+ Name[ru]=Веб-браузер LibreWolf
34
+ Name[sk]=LibreWolf - internetový prehliadač
35
+ Name[sl]=LibreWolf spletni brskalnik
36
+ Name[sv]=LibreWolf webbläsare
37
+ Name[tr]=LibreWolf Web Tarayıcısı
38
+ Name[ug]=LibreWolf توركۆرگۈ
39
+ Name[uk]=Веб-браузер LibreWolf
40
+ Name[vi]=Trình duyệt web LibreWolf
41
+ Name[zh_CN]=LibreWolf 网络浏览器
42
+ Name[zh_TW]=LibreWolf 網路瀏覽器
43
+ Comment=Browse the World Wide Web
44
+ Comment[ar]=تصفح الشبكة العنكبوتية العالمية
45
+ Comment[ast]=Restola pela Rede
46
+ Comment[bn]=ইন্টারনেট ব্রাউজ করুন
47
+ Comment[ca]=Navegueu per la web
48
+ Comment[cs]=Prohlížení stránek World Wide Webu
49
+ Comment[da]=Surf på internettet
50
+ Comment[de]=Im Internet surfen
51
+ Comment[el]=Μπορείτε να περιηγηθείτε στο διαδίκτυο (Web)
52
+ Comment[es]=Navegue por la web
53
+ Comment[et]=Lehitse veebi
54
+ Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید
55
+ Comment[fi]=Selaa Internetin WWW-sivuja
56
+ Comment[fr]=Naviguer sur le Web
57
+ Comment[gl]=Navegar pola rede
58
+ Comment[he]=גלישה ברחבי האינטרנט
59
+ Comment[hr]=Pretražite web
60
+ Comment[hu]=A világháló böngészése
61
+ Comment[it]=Esplora il web
62
+ Comment[ja]=ウェブを閲覧します
63
+ Comment[ko]=웹을 돌아 다닙니다
64
+ Comment[ku]=Li torê bigere
65
+ Comment[lt]=Naršykite internete
66
+ Comment[nb]=Surf på nettet
67
+ Comment[nl]=Verken het internet
68
+ Comment[nn]=Surf på nettet
69
+ Comment[no]=Surf på nettet
70
+ Comment[pl]=Przeglądanie stron WWW
71
+ Comment[pt]=Navegue na Internet
72
+ Comment[pt_BR]=Navegue na Internet
73
+ Comment[ro]=Navigați pe Internet
74
+ Comment[ru]=Доступ в Интернет
75
+ Comment[sk]=Prehliadanie internetu
76
+ Comment[sl]=Brskajte po spletu
77
+ Comment[sv]=Surfa på webben
78
+ Comment[tr]=İnternet'te Gezinin
79
+ Comment[ug]=دۇنيادىكى توربەتلەرنى كۆرگىلى بولىدۇ
80
+ Comment[uk]=Перегляд сторінок Інтернету
81
+ Comment[vi]=Để duyệt các trang web
82
+ Comment[zh_CN]=浏览互联网
83
+ Comment[zh_TW]=瀏覽網際網路
84
+ GenericName=Web Browser
85
+ GenericName[ar]=متصفح ويب
86
+ GenericName[ast]=Restolador Web
87
+ GenericName[bn]=ওয়েব ব্রাউজার
88
+ GenericName[ca]=Navegador web
89
+ GenericName[cs]=Webový prohlížeč
90
+ GenericName[da]=Webbrowser
91
+ GenericName[el]=Περιηγητής διαδικτύου
92
+ GenericName[es]=Navegador web
93
+ GenericName[et]=Veebibrauser
94
+ GenericName[fa]=مرورگر اینترنتی
95
+ GenericName[fi]=WWW-selain
96
+ GenericName[fr]=Navigateur Web
97
+ GenericName[gl]=Navegador Web
98
+ GenericName[he]=דפדפן אינטרנט
99
+ GenericName[hr]=Web preglednik
100
+ GenericName[hu]=Webböngésző
101
+ GenericName[it]=Browser web
102
+ GenericName[ja]=ウェブ・ブラウザ
103
+ GenericName[ko]=웹 브라우저
104
+ GenericName[ku]=Geroka torê
105
+ GenericName[lt]=Interneto naršyklė
106
+ GenericName[nb]=Nettleser
107
+ GenericName[nl]=Webbrowser
108
+ GenericName[nn]=Nettlesar
109
+ GenericName[no]=Nettleser
110
+ GenericName[pl]=Przeglądarka WWW
111
+ GenericName[pt]=Navegador Web
112
+ GenericName[pt_BR]=Navegador Web
113
+ GenericName[ro]=Navigator Internet
114
+ GenericName[ru]=Веб-браузер
115
+ GenericName[sk]=Internetový prehliadač
116
+ GenericName[sl]=Spletni brskalnik
117
+ GenericName[sv]=Webbläsare
118
+ GenericName[tr]=Web Tarayıcı
119
+ GenericName[ug]=توركۆرگۈ
120
+ GenericName[uk]=Веб-браузер
121
+ GenericName[vi]=Trình duyệt Web
122
+ GenericName[zh_CN]=网络浏览器
123
+ GenericName[zh_TW]=網路瀏覽器
124
+ Keywords=Internet;WWW;Browser;Web;Explorer
125
+ Keywords[ar]=انترنت;إنترنت;متصفح;ويب;وب
126
+ Keywords[ast]=Internet;WWW;Restolador;Web;Esplorador
127
+ Keywords[ca]=Internet;WWW;Navegador;Web;Explorador;Explorer
128
+ Keywords[cs]=Internet;WWW;Prohlížeč;Web;Explorer
129
+ Keywords[da]=Internet;Internettet;WWW;Browser;Browse;Web;Surf;Nettet
130
+ Keywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsen
131
+ Keywords[el]=Internet;WWW;Browser;Web;Explorer;Διαδίκτυο;Περιηγητής;LibreWolf;Φιρεφοχ;Ιντερνετ
132
+ Keywords[es]=Explorador;Internet;WWW
133
+ Keywords[fi]=Internet;WWW;Browser;Web;Explorer;selain;Internet-selain;internetselain;verkkoselain;netti;surffaa
134
+ Keywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;Navigateur
135
+ Keywords[he]=דפדפן;אינטרנט;רשת;אתרים;אתר;פיירפוקס;מוזילה;
136
+ Keywords[hr]=Internet;WWW;preglednik;Web
137
+ Keywords[hu]=Internet;WWW;Böngésző;Web;Háló;Net;Explorer
138
+ Keywords[it]=Internet;WWW;Browser;Web;Navigatore
139
+ Keywords[is]=Internet;WWW;Vafri;Vefur;Netvafri;Flakk
140
+ Keywords[ja]=Internet;WWW;Web;インターネット;ブラウザ;ウェブ;エクスプローラ
141
+ Keywords[nb]=Internett;WWW;Nettleser;Explorer;Web;Browser;Nettside
142
+ Keywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;Online
143
+ Keywords[pt]=Internet;WWW;Browser;Web;Explorador;Navegador
144
+ Keywords[pt_BR]=Internet;WWW;Browser;Web;Explorador;Navegador
145
+ Keywords[ru]=Internet;WWW;Browser;Web;Explorer;интернет;браузер;веб;файрфокс;огнелис
146
+ Keywords[sk]=Internet;WWW;Prehliadač;Web;Explorer
147
+ Keywords[sl]=Internet;WWW;Browser;Web;Explorer;Brskalnik;Splet
148
+ Keywords[tr]=İnternet;WWW;Tarayıcı;Web;Gezgin;Web sitesi;Site;sörf;çevrimiçi;tara
149
+ Keywords[uk]=Internet;WWW;Browser;Web;Explorer;Інтернет;мережа;переглядач;оглядач;браузер;веб;файрфокс;вогнелис;перегляд
150
+ Keywords[vi]=Internet;WWW;Browser;Web;Explorer;Trình duyệt;Trang web
151
+ Keywords[zh_CN]=Internet;WWW;Browser;Web;Explorer;网页;浏览;上网;火狐;LibreWolf;ff;互联网;网站;
152
+ Keywords[zh_TW]=Internet;WWW;Browser;Web;Explorer;網際網路;網路;瀏覽器;上網;網頁;火狐
153
+ Exec=librewolf %u
154
+ Icon=librewolf
155
+ Terminal=false
156
+ X-MultipleArgs=false
157
+ Type=Application
158
+ MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json;
159
+ StartupNotify=true
160
+ StartupWMClass=LibreWolf
161
+ Categories=Network;WebBrowser;
162
+ Actions=new-window;new-private-window;profile-manager-window;
163
+
164
+ [Desktop Action new-window]
165
+ Name=Open a New Window
166
+ Name[ach]=Dirica manyen
167
+ Name[af]=Nuwe venster
168
+ Name[an]=Nueva finestra
169
+ Name[ar]=نافذة جديدة
170
+ Name[as]=নতুন উইন্ডো
171
+ Name[ast]=Ventana nueva
172
+ Name[az]=Yeni Pəncərə
173
+ Name[be]=Новае акно
174
+ Name[bg]=Нов прозорец
175
+ Name[bn_BD]=নতুন উইন্ডো (N)
176
+ Name[bn_IN]=নতুন উইন্ডো
177
+ Name[br]=Prenestr nevez
178
+ Name[brx]=गोदान उइन्ड'(N)
179
+ Name[bs]=Novi prozor
180
+ Name[ca]=Finestra nova
181
+ Name[cak]=K'ak'a' tzuwäch
182
+ Name[cs]=Nové okno
183
+ Name[cy]=Ffenestr Newydd
184
+ Name[da]=Nyt vindue
185
+ Name[de]=Neues Fenster
186
+ Name[dsb]=Nowe wokno
187
+ Name[el]=Νέο παράθυρο
188
+ Name[en_GB]=New Window
189
+ Name[en_US]=New Window
190
+ Name[en_ZA]=New Window
191
+ Name[eo]=Nova fenestro
192
+ Name[es_AR]=Nueva ventana
193
+ Name[es_CL]=Nueva ventana
194
+ Name[es_ES]=Nueva ventana
195
+ Name[es_MX]=Nueva ventana
196
+ Name[et]=Uus aken
197
+ Name[eu]=Leiho berria
198
+ Name[fa]=پنجره جدید
199
+ Name[ff]=Henorde Hesere
200
+ Name[fi]=Uusi ikkuna
201
+ Name[fr]=Nouvelle fenêtre
202
+ Name[fy_NL]=Nij finster
203
+ Name[ga_IE]=Fuinneog Nua
204
+ Name[gd]=Uinneag ùr
205
+ Name[gl]=Nova xanela
206
+ Name[gn]=Ovetã pyahu
207
+ Name[gu_IN]=નવી વિન્ડો
208
+ Name[he]=חלון חדש
209
+ Name[hi_IN]=नया विंडो
210
+ Name[hr]=Novi prozor
211
+ Name[hsb]=Nowe wokno
212
+ Name[hu]=Új ablak
213
+ Name[hy_AM]=Նոր Պատուհան
214
+ Name[id]=Jendela Baru
215
+ Name[is]=Nýr gluggi
216
+ Name[it]=Nuova finestra
217
+ Name[ja]=新しいウィンドウ
218
+ Name[ja_JP-mac]=新規ウインドウ
219
+ Name[ka]=ახალი ფანჯარა
220
+ Name[kk]=Жаңа терезе
221
+ Name[km]=បង្អួចថ្មី
222
+ Name[kn]=ಹೊಸ ಕಿಟಕಿ
223
+ Name[ko]=새 창
224
+ Name[kok]=नवें जनेल
225
+ Name[ks]=نئئ وِنڈو
226
+ Name[lij]=Neuvo barcon
227
+ Name[lo]=ຫນ້າຕ່າງໃຫມ່
228
+ Name[lt]=Naujas langas
229
+ Name[ltg]=Jauns lūgs
230
+ Name[lv]=Jauns logs
231
+ Name[mai]=नव विंडो
232
+ Name[mk]=Нов прозорец
233
+ Name[ml]=പുതിയ ജാലകം
234
+ Name[mr]=नवीन पटल
235
+ Name[ms]=Tetingkap Baru
236
+ Name[my]=ဝင်းဒိုးအသစ်
237
+ Name[nb_NO]=Nytt vindu
238
+ Name[ne_NP]=नयाँ सञ्झ्याल
239
+ Name[nl]=Nieuw venster
240
+ Name[nn_NO]=Nytt vindauge
241
+ Name[or]=ନୂତନ ୱିଣ୍ଡୋ
242
+ Name[pa_IN]=ਨਵੀਂ ਵਿੰਡੋ
243
+ Name[pl]=Nowe okno
244
+ Name[pt_BR]=Nova janela
245
+ Name[pt_PT]=Nova janela
246
+ Name[rm]=Nova fanestra
247
+ Name[ro]=Fereastră nouă
248
+ Name[ru]=Новое окно
249
+ Name[sat]=नावा विंडो (N)
250
+ Name[si]=නව කවුළුවක්
251
+ Name[sk]=Nové okno
252
+ Name[sl]=Novo okno
253
+ Name[son]=Zanfun taaga
254
+ Name[sq]=Dritare e Re
255
+ Name[sr]=Нови прозор
256
+ Name[sv_SE]=Nytt fönster
257
+ Name[ta]=புதிய சாளரம்
258
+ Name[te]=కొత్త విండో
259
+ Name[th]=หน้าต่างใหม่
260
+ Name[tr]=Yeni pencere
261
+ Name[tsz]=Eraatarakua jimpani
262
+ Name[uk]=Нове вікно
263
+ Name[ur]=نیا دریچہ
264
+ Name[uz]=Yangi oyna
265
+ Name[vi]=Cửa sổ mới
266
+ Name[wo]=Palanteer bu bees
267
+ Name[xh]=Ifestile entsha
268
+ Name[zh_CN]=新建窗口
269
+ Name[zh_TW]=開新視窗
270
+ Exec=librewolf --new-window %u
271
+
272
+ [Desktop Action new-private-window]
273
+ Name=Open a New Private Window
274
+ Name[ach]=Dirica manyen me mung
275
+ Name[af]=Nuwe privaatvenster
276
+ Name[an]=Nueva finestra privada
277
+ Name[ar]=نافذة خاصة جديدة
278
+ Name[as]=নতুন ব্যক্তিগত উইন্ডো
279
+ Name[ast]=Ventana privada nueva
280
+ Name[az]=Yeni Məxfi Pəncərə
281
+ Name[be]=Новае акно адасаблення
282
+ Name[bg]=Нов прозорец за поверително сърфиране
283
+ Name[bn_BD]=নতুন ব্যক্তিগত উইন্ডো
284
+ Name[bn_IN]=নতুন ব্যক্তিগত উইন্ডো
285
+ Name[br]=Prenestr merdeiñ prevez nevez
286
+ Name[brx]=गोदान प्राइभेट उइन्ड'
287
+ Name[bs]=Novi privatni prozor
288
+ Name[ca]=Finestra privada nova
289
+ Name[cak]=K'ak'a' ichinan tzuwäch
290
+ Name[cs]=Nové anonymní okno
291
+ Name[cy]=Ffenestr Breifat Newydd
292
+ Name[da]=Nyt privat vindue
293
+ Name[de]=Neues privates Fenster
294
+ Name[dsb]=Nowe priwatne wokno
295
+ Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης
296
+ Name[en_GB]=New Private Window
297
+ Name[en_US]=New Private Window
298
+ Name[en_ZA]=New Private Window
299
+ Name[eo]=Nova privata fenestro
300
+ Name[es_AR]=Nueva ventana privada
301
+ Name[es_CL]=Nueva ventana privada
302
+ Name[es_ES]=Nueva ventana privada
303
+ Name[es_MX]=Nueva ventana privada
304
+ Name[et]=Uus privaatne aken
305
+ Name[eu]=Leiho pribatu berria
306
+ Name[fa]=پنجره ناشناس جدید
307
+ Name[ff]=Henorde Suturo Hesere
308
+ Name[fi]=Uusi yksityinen ikkuna
309
+ Name[fr]=Nouvelle fenêtre de navigation privée
310
+ Name[fy_NL]=Nij priveefinster
311
+ Name[ga_IE]=Fuinneog Nua Phríobháideach
312
+ Name[gd]=Uinneag phrìobhaideach ùr
313
+ Name[gl]=Nova xanela privada
314
+ Name[gn]=Ovetã ñemi pyahu
315
+ Name[gu_IN]=નવી ખાનગી વિન્ડો
316
+ Name[he]=חלון פרטי חדש
317
+ Name[hi_IN]=नयी निजी विंडो
318
+ Name[hr]=Novi privatni prozor
319
+ Name[hsb]=Nowe priwatne wokno
320
+ Name[hu]=Új privát ablak
321
+ Name[hy_AM]=Սկսել Գաղտնի դիտարկում
322
+ Name[id]=Jendela Mode Pribadi Baru
323
+ Name[is]=Nýr huliðsgluggi
324
+ Name[it]=Nuova finestra anonima
325
+ Name[ja]=新しいプライベートウィンドウ
326
+ Name[ja_JP-mac]=新規プライベートウインドウ
327
+ Name[ka]=ახალი პირადი ფანჯარა
328
+ Name[kk]=Жаңа жекелік терезе
329
+ Name[km]=បង្អួចឯកជនថ្មី
330
+ Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ
331
+ Name[ko]=새 사생활 보호 모드
332
+ Name[kok]=नवो खाजगी विंडो
333
+ Name[ks]=نْو پرایوٹ وینڈو
334
+ Name[lij]=Nêuvo barcón privòu
335
+ Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່
336
+ Name[lt]=Naujas privataus naršymo langas
337
+ Name[ltg]=Jauns privatais lūgs
338
+ Name[lv]=Jauns privātais logs
339
+ Name[mai]=नया निज विंडो (W)
340
+ Name[mk]=Нов приватен прозорец
341
+ Name[ml]=പുതിയ സ്വകാര്യ ജാലകം
342
+ Name[mr]=नवीन वैयक्तिक पटल
343
+ Name[ms]=Tetingkap Persendirian Baharu
344
+ Name[my]=New Private Window
345
+ Name[nb_NO]=Nytt privat vindu
346
+ Name[ne_NP]=नयाँ निजी सञ्झ्याल
347
+ Name[nl]=Nieuw privévenster
348
+ Name[nn_NO]=Nytt privat vindauge
349
+ Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ
350
+ Name[pa_IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ
351
+ Name[pl]=Nowe okno prywatne
352
+ Name[pt_BR]=Nova janela privativa
353
+ Name[pt_PT]=Nova janela privada
354
+ Name[rm]=Nova fanestra privata
355
+ Name[ro]=Fereastră privată nouă
356
+ Name[ru]=Новое приватное окно
357
+ Name[sat]=नावा निजेराक् विंडो (W )
358
+ Name[si]=නව පුද්ගලික කවුළුව (W)
359
+ Name[sk]=Nové okno v režime Súkromné prehliadanie
360
+ Name[sl]=Novo zasebno okno
361
+ Name[son]=Sutura zanfun taaga
362
+ Name[sq]=Dritare e Re Private
363
+ Name[sr]=Нови приватан прозор
364
+ Name[sv_SE]=Nytt privat fönster
365
+ Name[ta]=புதிய தனிப்பட்ட சாளரம்
366
+ Name[te]=కొత్త ఆంతరంగిక విండో
367
+ Name[th]=หน้าต่างส่วนตัวใหม่
368
+ Name[tr]=Yeni gizli pencere
369
+ Name[tsz]=Juchiiti eraatarakua jimpani
370
+ Name[uk]=Приватне вікно
371
+ Name[ur]=نیا نجی دریچہ
372
+ Name[uz]=Yangi maxfiy oyna
373
+ Name[vi]=Cửa sổ riêng tư mới
374
+ Name[wo]=Panlanteeru biir bu bees
375
+ Name[xh]=Ifestile yangasese entsha
376
+ Name[zh_CN]=新建隐私浏览窗口
377
+ Name[zh_TW]=新增隱私視窗
378
+ Exec=librewolf --private-window %u
379
+
380
+ [Desktop Action profile-manager-window]
381
+ Name=Open the Profile Manager
382
+ Name[cs]=Správa profilů
383
+ Name[de]=Profilverwaltung öffnen
384
+ Name[es]=Abrir el Gestor de Perfiles
385
+ Name[fr]=Ouvrir le gestionnaire de profils
386
+ Exec=librewolf --ProfileManager %u
PKG/librewolf/files/stab.h ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* $OpenBSD: stab.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */
2
+ /* $NetBSD: stab.h,v 1.4 1994/10/26 00:56:25 cgd Exp $ */
3
+
4
+ /*-
5
+ * Copyright (c) 1991 The Regents of the University of California.
6
+ * All rights reserved.
7
+ *
8
+ * Redistribution and use in source and binary forms, with or without
9
+ * modification, are permitted provided that the following conditions
10
+ * are met:
11
+ * 1. Redistributions of source code must retain the above copyright
12
+ * notice, this list of conditions and the following disclaimer.
13
+ * 2. Redistributions in binary form must reproduce the above copyright
14
+ * notice, this list of conditions and the following disclaimer in the
15
+ * documentation and/or other materials provided with the distribution.
16
+ * 3. Neither the name of the University nor the names of its contributors
17
+ * may be used to endorse or promote products derived from this software
18
+ * without specific prior written permission.
19
+ *
20
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30
+ * SUCH DAMAGE.
31
+ *
32
+ * @(#)stab.h 5.2 (Berkeley) 4/4/91
33
+ */
34
+
35
+ #ifndef _STAB_H_
36
+ #define _STAB_H_
37
+
38
+ /*
39
+ * The following are symbols used by various debuggers and by the Pascal
40
+ * compiler. Each of them must have one (or more) of the bits defined by
41
+ * the N_STAB mask set.
42
+ */
43
+
44
+ #define N_GSYM 0x20 /* global symbol */
45
+ #define N_FNAME 0x22 /* F77 function name */
46
+ #define N_FUN 0x24 /* procedure name */
47
+ #define N_STSYM 0x26 /* data segment variable */
48
+ #define N_LCSYM 0x28 /* bss segment variable */
49
+ #define N_MAIN 0x2a /* main function name */
50
+ #define N_PC 0x30 /* global Pascal symbol */
51
+ #define N_RSYM 0x40 /* register variable */
52
+ #define N_SLINE 0x44 /* text segment line number */
53
+ #define N_DSLINE 0x46 /* data segment line number */
54
+ #define N_BSLINE 0x48 /* bss segment line number */
55
+ #define N_SSYM 0x60 /* structure/union element */
56
+ #define N_SO 0x64 /* main source file name */
57
+ #define N_LSYM 0x80 /* stack variable */
58
+ #define N_BINCL 0x82 /* include file beginning */
59
+ #define N_SOL 0x84 /* included source file name */
60
+ #define N_PSYM 0xa0 /* parameter variable */
61
+ #define N_EINCL 0xa2 /* include file end */
62
+ #define N_ENTRY 0xa4 /* alternate entry point */
63
+ #define N_LBRAC 0xc0 /* left bracket */
64
+ #define N_EXCL 0xc2 /* deleted include file */
65
+ #define N_RBRAC 0xe0 /* right bracket */
66
+ #define N_BCOMM 0xe2 /* begin common */
67
+ #define N_ECOMM 0xe4 /* end common */
68
+ #define N_ECOML 0xe8 /* end common (local name) */
69
+ #define N_LENG 0xfe /* length of preceding entry */
70
+
71
+ #endif /* !_STAB_H_ */
PKG/librewolf/files/vendor.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Use LANG environment variable to choose locale
2
+ pref("intl.locale.requested", "");
3
+
4
+ // Disable default browser checking.
5
+ pref("browser.shell.checkDefaultBrowser", false);
6
+
7
+ // Don't disable our bundled extensions in the application directory
8
+ pref("extensions.autoDisableScopes", 11);
9
+
10
+ // The default is google and we don't have api keys for it.
11
+ pref("geo.provider.network.url", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
PKG/librewolf/patches/big-endian-image-decoders.patch ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ https://bugzilla.mozilla.org/show_bug.cgi?id=1626236
2
+ https://bug1626236.bmoattachments.org/attachment.cgi?id=9137096
3
+
4
+ # HG changeset patch
5
+ # User msirringhaus@suse.de
6
+ # Date 1582805876 -3600
7
+ # Thu Feb 27 13:17:56 2020 +0100
8
+ # Node ID cc3d09abea31068e57f1ab918782f9f86fc6a158
9
+ # Parent 9cd90914846f667f18babc491a74c164ae5d6e9f
10
+ imported patch decoder_workaround.patch
11
+
12
+ diff -r 9cd90914846f image/decoders/nsGIFDecoder2.cpp
13
+ --- a/image/decoders/nsGIFDecoder2.cpp Thu Feb 27 12:57:14 2020 +0100
14
+ +++ b/image/decoders/nsGIFDecoder2.cpp Fri Mar 27 13:06:18 2020 +0100
15
+ @@ -422,6 +422,9 @@
16
+ MOZ_ASSERT(mSwizzleFn);
17
+ uint8_t* data = reinterpret_cast<uint8_t*>(aColormap);
18
+ mSwizzleFn(data, data, aColors);
19
+ +#if MOZ_BIG_ENDIAN()
20
+ + SwizzleRow(SurfaceFormat::A8R8G8B8, SurfaceFormat::B8G8R8A8)(data, data, aColors);
21
+ +#endif
22
+ }
23
+
24
+ LexerResult nsGIFDecoder2::DoDecode(SourceBufferIterator& aIterator,
25
+ diff -r 9cd90914846f image/decoders/nsJPEGDecoder.cpp
26
+ --- a/image/decoders/nsJPEGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
27
+ +++ b/image/decoders/nsJPEGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
28
+ @@ -263,6 +263,9 @@
29
+ case JCS_YCbCr:
30
+ // By default, we will output directly to BGRA. If we need to apply
31
+ // special color transforms, this may change.
32
+ +#if MOZ_BIG_ENDIAN()
33
+ + mInfo.out_color_space = MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB;
34
+ +#else
35
+ switch (SurfaceFormat::OS_RGBX) {
36
+ case SurfaceFormat::B8G8R8X8:
37
+ mInfo.out_color_space = JCS_EXT_BGRX;
38
+ @@ -277,6 +280,7 @@
39
+ mState = JPEG_ERROR;
40
+ return Transition::TerminateFailure();
41
+ }
42
+ +#endif
43
+ break;
44
+ case JCS_CMYK:
45
+ case JCS_YCCK:
46
+ diff -r 9cd90914846f image/decoders/nsPNGDecoder.cpp
47
+ --- a/image/decoders/nsPNGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
48
+ +++ b/image/decoders/nsPNGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
49
+ @@ -361,7 +361,7 @@
50
+ IResumable* aOnResume) {
51
+ MOZ_ASSERT(!HasError(), "Shouldn't call DoDecode after error!");
52
+
53
+ - return mLexer.Lex(aIterator, aOnResume,
54
+ + LexerResult res = mLexer.Lex(aIterator, aOnResume,
55
+ [=](State aState, const char* aData, size_t aLength) {
56
+ switch (aState) {
57
+ case State::PNG_DATA:
58
+ @@ -371,6 +371,14 @@
59
+ }
60
+ MOZ_CRASH("Unknown State");
61
+ });
62
+ +
63
+ +#if MOZ_BIG_ENDIAN()
64
+ + if(res.is<TerminalState>() && res.as<TerminalState>() == TerminalState::SUCCESS) {
65
+ + NativeEndian::swapToLittleEndianInPlace<uint32_t>((uint32_t*)(mImageData), mImageDataLength / 4);
66
+ + }
67
+ +#endif
68
+ +
69
+ + return res;
70
+ }
71
+
72
+ LexerTransition<nsPNGDecoder::State> nsPNGDecoder::ReadPNGData(
73
+ diff -r 9cd90914846f image/decoders/nsWebPDecoder.cpp
74
+ --- a/image/decoders/nsWebPDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
75
+ +++ b/image/decoders/nsWebPDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
76
+ @@ -237,7 +237,12 @@
77
+ // WebP doesn't guarantee that the alpha generated matches the hint in the
78
+ // header, so we always need to claim the input is BGRA. If the output is
79
+ // BGRX, swizzling will mask off the alpha channel.
80
+ +#if MOZ_BIG_ENDIAN()
81
+ + mBuffer.colorspace = MODE_ARGB;
82
+ + SurfaceFormat inFormat = mFormat;
83
+ +#else
84
+ SurfaceFormat inFormat = SurfaceFormat::OS_RGBA;
85
+ +#endif
86
+
87
+ SurfacePipeFlags pipeFlags = SurfacePipeFlags();
88
+ if (mFormat == SurfaceFormat::OS_RGBA &&
PKG/librewolf/patches/clang-sysroot-toolchain-fix.patch ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ We need to pass --sysroot and --gcc-toolchain explicitly for cross compiling with glibc
2
+ because when the lld tries to link libc, it will read the gcc libc linker script which
3
+ includes absolute paths to actual libc files and without the sysroot argument it picks
4
+ the host ones, even though it discovered the linker script in the sysroot already.
5
+ linker-script = /usr/aarch64-linux-gnu/lib64/libc.so
6
+ --- a/build/moz.configure/toolchain.configure
7
+ +++ b/build/moz.configure/toolchain.configure
8
+ @@ -725,6 +725,10 @@
9
+ flags.append("--target=%s" % toolchain)
10
+ has_target = True
11
+
12
+ + if info.type == "clang" and not target.os == "WASI" and (info.cpu != target.cpu):
13
+ + flags.append("--sysroot=/usr/%s" % toolchain)
14
+ + flags.append("--gcc-toolchain=/usr")
15
+ +
16
+ if not has_target and (not info.cpu or info.cpu != target.cpu):
17
+ same_arch = same_arch_different_bits()
18
+ if (target.cpu, info.cpu) in same_arch:
PKG/librewolf/patches/firefox-146-musl-linux-sys-prctl-conflict.patch ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Including linux/prrctl.h and sys/prctl.h with musl results in the redifinition
2
+ of `struct prctl_mm_map`.
3
+ --- a/third_party/libwebrtc/rtc_base/platform_thread_types.cc
4
+ +++ b/third_party/libwebrtc/rtc_base/platform_thread_types.cc
5
+ @@ -12,7 +12,9 @@
6
+
7
+ // IWYU pragma: begin_keep
8
+ #if defined(WEBRTC_LINUX)
9
+ +#if defined(__GLIBC__)
10
+ #include <linux/prctl.h>
11
+ +#endif
12
+ #include <sys/prctl.h>
13
+ #include <sys/syscall.h>
14
+
PKG/librewolf/patches/fix-fortify-system-wrappers.patch ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
2
+ index 07d48e7f97..d2ce2b2489 100644
3
+ --- a/config/system-headers.mozbuild
4
+ +++ b/config/system-headers.mozbuild
5
+ @@ -225,7 +225,6 @@ system_headers = [
6
+ "execinfo.h",
7
+ "extras.h",
8
+ "fcntl.h",
9
+ - "features.h",
10
+ "fenv.h",
11
+ "ffi.h",
12
+ "fibdef.h",
PKG/librewolf/patches/fix-i686-ppc-musl.patch ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --- a/mozglue/misc/StackWalk.cpp 2021-11-05 15:55:03.614609706 +0000
2
+ +++ b/mozglue/misc/StackWalk.cpp 2021-10-28 19:03:47.000000000 +0100
3
+ @@ -45,7 +45,7 @@
4
+ # define MOZ_STACKWALK_SUPPORTS_MACOSX 0
5
+ #endif
6
+
7
+ -#if (defined(linux) && \
8
+ +#if defined(__GLIBC__) && (defined(linux) && \
9
+ ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \
10
+ defined(HAVE__UNWIND_BACKTRACE)))
11
+ # define MOZ_STACKWALK_SUPPORTS_LINUX 1
PKG/librewolf/patches/lto-thin.patch ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
2
+ index efbe482738..c5d125b10d 100644
3
+ --- a/config/makefiles/rust.mk
4
+ +++ b/config/makefiles/rust.mk
5
+ @@ -92,7 +92,8 @@ ifndef rustflags_sancov
6
+ # Never enable when coverage is enabled to work around https://github.com/rust-lang/rust/issues/90045.
7
+ ifndef MOZ_CODE_COVERAGE
8
+ ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
9
+ -cargo_rustc_flags += -Clto$(if $(filter full,$(MOZ_LTO_RUST_CROSS)),=fat)
10
+ +cargo_rustc_flags += -Clto=thin
11
+ +export CARGO_PROFILE_RELEASE_LTO=thin
12
+ endif
13
+ # We need -Cembed-bitcode=yes for all crates when using -Clto.
14
+ RUSTFLAGS += -Cembed-bitcode=yes
PKG/librewolf/patches/mallinfo.patch ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --- a/xpcom/base/nsMemoryReporterManager.cpp 2019-03-19 17:12:20.844810044 +0100
2
+ +++ b/xpcom/base/nsMemoryReporterManager.cpp 2019-03-19 17:13:32.505133615 +0100
3
+ @@ -123,6 +123,7 @@
4
+ return GetProcSelfSmapsPrivate(aN);
5
+ }
6
+
7
+ +#ifdef __GLIBC__
8
+ # ifdef HAVE_MALLINFO
9
+ # define HAVE_SYSTEM_HEAP_REPORTER 1
10
+ static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
11
+ @@ -142,6 +143,7 @@
12
+ return NS_OK;
13
+ }
14
+ # endif
15
+ +#endif // __GLIBC__
16
+
17
+ #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
18
+ defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
19
+ @@ -642,6 +644,7 @@
20
+ return NS_OK;
21
+ }
22
+
23
+ +#ifdef __GLIBC__
24
+ # define HAVE_SYSTEM_HEAP_REPORTER 1
25
+ // Windows can have multiple separate heaps. During testing there were multiple
26
+ // heaps present but the non-default ones had sizes no more than a few 10s of
27
+ @@ -698,6 +701,7 @@
28
+ *aSizeOut = heapsSize;
29
+ return NS_OK;
30
+ }
31
+ +#endif // __GLIBC__
32
+
33
+ struct SegmentKind {
34
+ DWORD mState;
PKG/librewolf/patches/ppc32-fix-build.patch ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ This is not a complete/correct patch, but it makes firefox build. For now
2
+ mostly for tracking, so a real fix can be made, but right now it still
3
+ segfaults on start.
4
+
5
+ Ref: https://hg.mozilla.org/mozilla-central/rev/08339a56f3ae
6
+ Ref: https://hg.mozilla.org/mozilla-central/rev/d16fcad6aa60
7
+ Ref: https://hg.mozilla.org/mozilla-central/rev/ab87611d012e
8
+ Ref: https://hg.mozilla.org/mozilla-central/file/tip/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_linux.cpp
9
+
10
+ --- a/xpcom/reflect/xptcall/xptcall.h
11
+ +++ b/xpcom/reflect/xptcall/xptcall.h
12
+ @@ -71,6 +71,11 @@ struct nsXPTCVariant {
13
+ ExtendedVal ext;
14
+ };
15
+
16
+ +#if defined(__powerpc__) && !defined(__powerpc64__)
17
+ + // this field is still necessary on ppc32, as an address
18
+ + // to it is taken certain places in xptcall
19
+ + void *ptr;
20
+ +#endif
21
+ nsXPTType type;
22
+ uint8_t flags;
23
+
24
+ @@ -91,7 +96,12 @@ struct nsXPTCVariant {
25
+ };
26
+
27
+ void ClearFlags() { flags = 0; }
28
+ +#if defined(__powerpc__) && !defined(__powerpc64__)
29
+ + void SetIndirect() { ptr = &val; flags |= IS_INDIRECT; }
30
+ + bool IsPtrData() const { return IsIndirect(); }
31
+ +#else
32
+ void SetIndirect() { flags |= IS_INDIRECT; }
33
+ +#endif
34
+
35
+ bool IsIndirect() const { return 0 != (flags & IS_INDIRECT); }
36
+
PKG/librewolf/patches/rust-configure.patch ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Mozilla rustc check does not support crossbuild: let's remove it
2
+ Remove calls to unwrap_rustup, they fail if rustup isn't present
3
+
4
+ Do not try to figure out the rust target as it is broken on musl
5
+ instead use what is set in RUST_TARGET
6
+
7
+ Skip extra checks on cross builds (broken for arm*)
8
+
9
+ --- a/build/moz.configure/rust.configure 2020-12-12 01:35:33.000000000 +0100
10
+ +++ b/build/moz.configure/rust.configure 2020-12-15 19:45:16.467750787 +0100
11
+ @@ -91,9 +91,6 @@
12
+ return unwrap
13
+
14
+
15
+ -rustc = unwrap_rustup(rustc, "rustc")
16
+ -cargo = unwrap_rustup(cargo, "cargo")
17
+ -
18
+
19
+ set_config("CARGO", cargo)
20
+ set_config("RUSTC", rustc)
21
+ @@ -260,7 +257,9 @@
22
+ data.setdefault(key, []).append(namespace(rust_target=t, target=info))
23
+ return data
24
+
25
+ -
26
+ +@imports('os')
27
+ +@imports(_from='mozbuild.util', _import='ensure_unicode')
28
+ +@imports(_from='mozbuild.util', _import='system_encoding')
29
+ def detect_rustc_target(
30
+ host_or_target, compiler_info, arm_target, rust_supported_targets
31
+ ):
32
+ @@ -382,12 +381,12 @@
33
+
34
+ return None
35
+
36
+ - rustc_target = find_candidate(candidates)
37
+ + rustc_target = os.environ['RUST_TARGET']
38
+
39
+ if rustc_target is None:
40
+ die("Don't know how to translate {} for rustc".format(host_or_target.alias))
41
+
42
+ - return rustc_target
43
+ + return ensure_unicode(rustc_target, system_encoding)
44
+
45
+
46
+ @imports("os")
47
+ @@ -486,6 +485,7 @@
48
+ host, compiler_info, arm_target, rust_supported_targets
49
+ )
50
+ if rustc_target != rustc_host:
51
+ + return rustc_host
52
+ if host.alias == rustc_target:
53
+ configure_host = host.alias
54
+ else:
55
+ @@ -507,7 +507,6 @@
56
+ )
57
+ )
58
+ )
59
+ - assert_rust_compile(host, rustc_target, rustc)
60
+ return rustc_target
61
+
62
+
63
+ @@ -521,7 +520,6 @@
64
+ rustc_target = detect_rustc_target(
65
+ target, compiler_info, arm_target, rust_supported_targets
66
+ )
67
+ - assert_rust_compile(target, rustc_target, rustc)
68
+ return rustc_target