commit 1c9218ed6acdde3848eb08e83a782cfafff6d8bbd8ca50fc6b64e842f8021516 Author: Adrian Schröter Date: Fri May 3 12:24:35 2024 +0200 Sync from SUSE:SLFO:Main fcitx revision 82e4a2b63bda2a6ad5ac94540fe8a719 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..42c2103 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,38 @@ +libfcitx-core0 + post "/sbin/ldconfig" + postun "/sbin/ldconfig" +libfcitx-gclient1 + post "/sbin/ldconfig" + postun "/sbin/ldconfig" +libfcitx-utils0 + post "/sbin/ldconfig" + postun "/sbin/ldconfig" +libfcitx-config4 + post "/sbin/ldconfig" + postun "/sbin/ldconfig" +fcitx-gtk2 + supplements "(fcitx and libgtk-2_0-0-)" + post "%if "%_lib" == "lib64"" + post "%{_bindir}/gtk-query-immodules-2.0-64 --update-cache" + post "%else" + post "%{_bindir}/gtk-query-immodules-2.0 --update-cache" + post "%endif" + postun "%if "%_lib" == "lib64"" + postun "%{_bindir}/gtk-query-immodules-2.0-64 --update-cache" + postun "%else" + postun "%{_bindir}/gtk-query-immodules-2.0 --update-cache" + postun "%endif" +fcitx-gtk3 + supplements "(fcitx and libgtk-3-0-)" + post "%if "%_lib" == "lib64"" + post "%{_bindir}/gtk-query-immodules-3.0-64 --update-cache" + post "%else" + post "%{_bindir}/gtk-query-immodules-3.0 --update-cache" + post "%endif" + postun "%if "%_lib" == "lib64"" + postun "%{_bindir}/gtk-query-immodules-3.0-64 --update-cache" + postun "%else" + postun "%{_bindir}/gtk-query-immodules-3.0 --update-cache" + postun "%endif" +fcitx-qt4 + supplements "(fcitx and libqt4-)" diff --git a/fcitx-4.2.9.9_dict.tar.xz b/fcitx-4.2.9.9_dict.tar.xz new file mode 100644 index 0000000..7b6f04a --- /dev/null +++ b/fcitx-4.2.9.9_dict.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45aaf19f18774abcd7a18c2729538b63779b1a1883f1e636d364f87c2840a974 +size 8753608 diff --git a/fcitx-4.2.9.9_dict.tar.xz.sig b/fcitx-4.2.9.9_dict.tar.xz.sig new file mode 100644 index 0000000..7f090ea Binary files /dev/null and b/fcitx-4.2.9.9_dict.tar.xz.sig differ diff --git a/fcitx-README.suse b/fcitx-README.suse new file mode 100644 index 0000000..938c954 --- /dev/null +++ b/fcitx-README.suse @@ -0,0 +1,62 @@ +fcitx README for SuSE +How to start using fcitx + +English: + +1.openSUSE can start fcitx automatically when your locale is set to en, zh_CN. +The setup script is a link in /etc/X11/xim.d/YOUR-LOCALE/30-fcitx which link to /etc/X11/xim.d/fcitx. +The number "30" makes fcitx have priority over other input-method (e.g 50-scim or 90-xcin ). +If you prefer not using fcitx, mv 30-fcitx to 80-fcitx (for example). Or see 2. + +2.If for some reason can't start fcitx when login Xwindow +There is another input-method who has higher priority than fcitx (e.g 10-oxim) +You can edit ~/.xim, see ~/.xim.template for more informations. +Or edit ~/.profile, add +export INPUT_METHOD="fcitx" +After installing fcitx, there's a template for fcitx: /usr/share/doc/packages/fcitx/xim.fcitx.suse.template +copy this file to ~/.xim, then you can use fcitx next login X. + +3.You want to use your own input-method other than system setting +(1)System setting: +Edit /etc/sysconfig/language , set INPUT_METHOD="fcitx", or whatever you want,Make sure your start-up script is put in /etc/X11/xim.d/ with same name ypu mention. +(2)For specific language setting: +Link a start-up script in /etc/X11/xim.d/ to your locale with a higher priority (smaller number), eg +ln -s /etc/X11/xim.d/fcitx /etc/X11/xim.d/zh_CN/20-fcitx +(3)Personal setting: +Edit ~/.profile add +export INPUT_METHOD="fcitx" or whatever script in /etc/X11/xim.d/ +or white your own ~/.xim, see ~/.xim.template for more informations. + +4.Bug report or any suggestion to +https://github.com/fcitx/ + + +Chinese: + +1.当您使用的语系是 en 或 zh_CN 时,SuSE 会自动启动 fcitx +启动的脚本是 /etc/X11/xim.d/YOUR-LOCALE/30-fcitx,这是一个到上层目录 fcitx 的连结 +"30"这个数字使他的优先顺序高于 90-xcin 及 50-scim +如果您不喜欢这个顺序,修改连结的名称为(例如:80-fcitx),或参考2. + +2.重新登入 X 后,如果不能用 fcitx...可能是: +有别的输入法的优先顺序高于 fcitx (例如:10-oxim) +您可以编辑 ~/.xim,请参考 ~/.xim.template +安装 fcitx 后,会有一个范本:/usr/share/doc/packages/fcitx/xim.fcitx.suse.template +将这个档案复制到您的 ~/.xim,当您下次登入X时就可以使用 fcitx 了 +或编辑 ~/.profile,加入 +export INPUT_METHOD="fcitx" + +3.如果您想要自己选择输入法而非使用系统设定 +(1)全系统设定: +编辑 /etc/sysconfig/language, 设定 INPUT_METHOD="ibus" 或其他你想用的输入法, +请注意你的启动程序必须位于 /etc/X11/xim.d/,并和您指定的名称相同 +(2)针对特定语言: +将您的启动程序连结到你的语系中,并前置较高的优先顺序(较小数字),例如 +ln -s /etc/X11/xim.d/fcitx /etc/X11/xim.d/zh_CN/30-fcitx +(3)个人设定: +编辑 ~/.profile 加入 +export INPUT_METHOD="fcitx" 或其他在 /etc/X11/xim.d/ 的启动程序 +或自行编写启动程序 ~/.xim,请参考 ~/.xim.template + +5.臭虫回报或建议请至 +https://github.com/fcitx/ diff --git a/fcitx-autostart-check-INPUT_METHOD.patch b/fcitx-autostart-check-INPUT_METHOD.patch new file mode 100644 index 0000000..23bead8 --- /dev/null +++ b/fcitx-autostart-check-INPUT_METHOD.patch @@ -0,0 +1,14 @@ +--- + data/script/fcitx-autostart | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/data/script/fcitx-autostart ++++ b/data/script/fcitx-autostart +@@ -1,5 +1,7 @@ + #!/bin/sh + ++test x"$INPUT_METHOD" = x"fcitx" || exit 0 ++ + # sleep for a little while to avoid duplicate startup + sleep 2 + diff --git a/fcitx-cmake-3.1.patch b/fcitx-cmake-3.1.patch new file mode 100644 index 0000000..37ed5d9 --- /dev/null +++ b/fcitx-cmake-3.1.patch @@ -0,0 +1,25 @@ +Index: fcitx-4.2.9.6/CMakeLists.txt +=================================================================== +--- fcitx-4.2.9.6.orig/CMakeLists.txt ++++ fcitx-4.2.9.6/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.6) ++cmake_minimum_required(VERSION 3.1) + + project(fcitx) + +Index: fcitx-4.2.9.6/src/frontend/ipcportal/CMakeLists.txt +=================================================================== +--- fcitx-4.2.9.6.orig/src/frontend/ipcportal/CMakeLists.txt ++++ fcitx-4.2.9.6/src/frontend/ipcportal/CMakeLists.txt +@@ -2,8 +2,8 @@ set(FCITX_IPCPORTAL_LINK_LIBS) + if(_ENABLE_DBUS) + include_directories(${DBUS_INCLUDE_DIRS}) + link_directories(${DBUS_LIBRARY_DIRS}) +- pkg_check_modules(LibUUID "uuid" IMPORTED_TARGET REQUIRED) +- set(FCITX_IPCPORTAL_LINK_LIBS ${FCITX_IPCPORTAL_LINK_LIBS} ${DBUS_LIBRARIES} PkgConfig::LibUUID) ++ pkg_check_modules(LibUUID "uuid" REQUIRED) ++ set(FCITX_IPCPORTAL_LINK_LIBS ${FCITX_IPCPORTAL_LINK_LIBS} ${DBUS_LIBRARIES} -luuid) + set(ipcportal_noinstall) + else() + set(ipcportal_noinstall NO_INSTALL) diff --git a/fcitx.changes b/fcitx.changes new file mode 100644 index 0000000..e0d4967 --- /dev/null +++ b/fcitx.changes @@ -0,0 +1,888 @@ +------------------------------------------------------------------- +Thu Aug 24 09:38:18 UTC 2023 - Matthias Gerstner + +- add remote-module-use-safe-directory-for-socket-API-sock.patch: use a safe + directory for the fcitx-socket:%d API socket currently placed in /tmp. This + avoids a possible local denial of service issue (bsc#1213331). + +------------------------------------------------------------------- +Wed Aug 17 20:03:29 UTC 2022 - Dirk Müller + +- update to 4.2.9.9: + * fix compatibility issue with KDE's systemd based xdg autostart +- fix gpg validation + +------------------------------------------------------------------- +Mon Apr 4 04:08:25 UTC 2022 - Marguerite Su + +- add baselibs.conf back due to fcitx-qt5 + +------------------------------------------------------------------- +Sun Feb 20 10:55:08 UTC 2022 - Marguerite Su + +- long gone Harlequin, don't change default theme (boo#1188416) +- 32bit is long gone, drop baselibs.conf +- split libfcitx-4_2_9 according to shlib-policy-name-error + rpmlint report(boo#1191753) +- other rpmlint fixes + +------------------------------------------------------------------- +Thu Jan 20 08:06:20 CET 2022 - tiwai@suse.de + +- Fix xim.d script for KDE Plasma (boo#1194916); + $WINDOWMANAGER check needs to be adjusted + +------------------------------------------------------------------- +Wed Jun 30 12:25:43 UTC 2021 - Dominique Leuenberger + +- Move fcitx.macros from /etc/rpm to %_rpmmacrodir (boo#1185657). + +------------------------------------------------------------------- +Tue Dec 1 05:40:13 UTC 2020 - Marguerite Su + +- update version 4.2.9.8 + * fix issue with appindicator on gnome-shell + * Relicense the im module to BSD to allow Proprietary + software for bundling it. This was already done for + the Qt5 counter part, but never done for Qt4 version. + This is mainly to allow WPS to reuse our up-to-date + im module to support fcitx 5 + * Slightly change to the tray menu to remove some + redudant entries + +------------------------------------------------------------------- +Thu Nov 26 16:48:21 CET 2020 - tiwai@suse.de + +- Move the startup snippet to /usr/etc/X11/xim.d for TW + +------------------------------------------------------------------- +Sat Feb 29 15:14:52 UTC 2020 - Hillwood Yang + +- Update version to 4.2.9.7 + * Do not link jsonc if XKB is disabled + * Update Translation + * use /org/freedesktop/portal as dbus path for portal. + * use the right color for gtk2 + * use a different way to suppress unused warning + * Revert "[gtk] clean up unused variable." + * iso code root should be 639-3. + * use iso-codes json file to parse the iso codes data. + * fix fall through warning + * clean up unused variable. + +------------------------------------------------------------------- +Thu Aug 22 13:13:21 UTC 2019 - Christophe Giboudeaux + +- Stop packaging fcitx-qt4 for leap 15.2 and Tumbleweed. +- Run spec-cleaner + +------------------------------------------------------------------- +Thu Mar 29 07:29:52 UTC 2018 - i@marguerite.su + +- update 4.2.9.6 + * [ipcportal] close connection first + * [gtk] workaround libreoffice surrounding text issue + * decrease the length of clipboard limit to 256 bytes + * [gtk] use symbolic color name to lookup selected color +- change fcitx-gtk2 and fcitx-qt4 from Requires to Recommends +- add fcitx-cmake-3.1.patch, downgrade cmake requirement to 3.1 + again for Leap + +------------------------------------------------------------------- +Tue Feb 27 09:34:05 UTC 2018 - dimstar@opensuse.org + +- Add pkgconfig(xkbfile) BuildRequires: in the past, this used to + be pulled in by libqt4, but since our own code depends on it, and + not Qt4, it is our own duty to request our build dependencies. +- Package COPYING is %license, not as %doc. + +------------------------------------------------------------------- +Sat Nov 11 01:06:32 UTC 2017 - i@marguerite.su + +- update 4.2.9.5 + * [qt] remove quickphrase editor, moved to qt5 + * [misc] forget to remove the add_directory for quickphrase editor + * fcitx-configtool.desktop: Remove MimeType entry + * [frontend] add a compatibility layer for ofd.portal.Fcitx + * [gtk] run clang-format on gtk libraries + * [gclinet] remove a undefined function + * set display for fcitx and harden dbus frontend with sender verification + * extend dbus module to be able to accept external dbus connection + * [ipcportal] fix signal sending in portal + * [qt] delay the recheck on availability, but does do the recheck + * [portal] put ipc portal in queue + * [qt] do the real unwatch + * [misc] make more optional disabled option for easier flatpak + * [table] make sure we don't download table data if we disable table +- changes in 4.2.9.4 + * [gtk, kimpanel] add relative coordinate support + * [kimpanel] check null before use ic + * [kimpanel] correctly reset relative spot state + * [notificationitem] Reply event method call +- changes in 4.2.9.3 + * [core] Make sure when RealEnd is called, instance->destroy == true +- changes in 4.2.9.2 + * [notificationitem] avoid unnecessary xembed tray icon fallback + * [classicui] give tray icon a default size + * [qt] fix inconsistency when handling qstring and ucs4 string + * [classicui] Watch for dockWindow visual property change + * [qt] fromUcs4 expect a nul terminated string by default, give it a size + * [core] Expose internal show input speed function + * logging should not include the build path(boo#951602) + * autostart desktop file should not be shown(boo#968486) + * [qt] replace QPointer with raw pointer in icdata + * [notificationitem] display layout under unity + * [diagnose] Print info about dbus name owner + * Include emoji short codes ("emoji alpha codes") + * [notificationitem] Fix a bug in plugin entry + * [core] Add a new hook to watch ui status changed + * [xim] handle reset ic + * [utils] Improve process name detection on *BSD + * [quickphrase] use some different character, original one looks bad under noto + * [misc] use RTLD_NODELETE for all dlopen + * Call sem_post() only on valid semaphore + * [unicode] Update Unicode 9.0 descriptions + * [classicui] Check XShape version before using it + * [remote] exit the loop after trying 20 times + * Require bash in fcitx-cmake-helper.sh + * [xim] fix a memset + * [pinyin] fix missing files + * [dbus] fix a wrong dbus destruct order that my cause deadlock on exit + * [xkb] handle some corner case for any evil third party that override layout + * [xkb, xkbdbus] add support for our gnome-shell kimpanel dbus helper + * [xkb] fix circular deps between xkb and xkbdbus + * [gclient] try to eliminate a warning for configtool + * [misc] enforce c99 for compiler + * [core] call backtrace() ahead to let it finish init() + * [misc] remove a dup define + * [unicode] enable prev/next key and enter to choose for unicode + * [gtk] fix wrong gobject add weak pointer + * [misc] use unsigned int instead for portability + * Remove deprecated api in enchant so we can also support 2.1.0. + * Fix bashism/use correct shebang +- drop fcitx-autostart-desktop-no-display.patch, upstreamed +- drop fcitx-use-basename-for-log.patch, upstreamed +- drop boo954623.patch, upstreamed + +------------------------------------------------------------------- +Fri Apr 21 12:12:12 UTC 2017 - fvogt@suse.com + +- Clean up .spec file: + * Remove KDE4 parts (install custom systray icon) + * Remove checks for obsolete distro versions + +------------------------------------------------------------------- +Sun Nov 13 15:25:00 UTC 2016 - toddrme2178@gmail.com + +- Fix language code for fcitx-table-cn-wubi and + fcitx-table-cn-wubi-pinyin: zh-cn --> zh_CN + +------------------------------------------------------------------- +Tue Aug 9 02:04:02 UTC 2016 - i@marguerite.su + +- fix Leap 42.2 build + * fcitx switched to DBus mechanism to select systray icon + which made it impossible to customize systray icon in + fcitx's themes. When the KDE default keyboard icon was + used, it was ugly-looking and invisible on small screens. + So we appended icons to openSUSE default Plasma themes + * in Leap 42.2 and Tumbleweed, our KDE team decided not to + provide any customization of the themes from kdebase4-openSUSE + package, so the customizations of systray icons are useless + in those systems. + +------------------------------------------------------------------- +Fri Mar 4 14:57:37 UTC 2016 - i@marguerite.su + +- backport a upstream fix: + * boo#954623: fcitx prevents dropbox system tray + loading in KDE Plasma 5 + * commit#c73761 : avoid unnecessary xembed tray + icon fallback, try harder to avoid touch tray + protocol related code when notification is + available or kimpanel is available. + * add patch boo954623.patch, delete next update + +------------------------------------------------------------------- +Sun Feb 28 09:25:28 CET 2016 - tiwai@suse.de + +- Add NoDisplay=true in autostart desktop file so that it won't be + shown (boo#968486): + fcitx-autostart-desktop-no-display.patch + +------------------------------------------------------------------- +Thu Feb 11 18:03:21 UTC 2016 - i@marguerite.su + +- Due to changes in kdebase4-openSUSE in Tumbleweed + %{_kde4_appsdir}/desktoptheme/{openSUSE,openSUSElight} + are no longer available. Actually those icon tweaks + are not needed too. + +------------------------------------------------------------------- +Tue Dec 22 15:35:41 UTC 2015 - i@marguerite.su + +- update version 4.2.9.1 + * support QPlatformInputContext::locale() + * correctly set input window position on scaled gtk3 application + * support unicode 8.0 in unicode module + * qt input context is not recreated correctly when fcitx restarts +- drop patch: fcitx-4.2.8.5-fix-bashisms.patch, upstreamed + +------------------------------------------------------------------- +Mon Nov 30 11:58:56 UTC 2015 - swyear@gmail.com + +- Remove # fix desktop file script in fcitx.spec: + Upstream fixed. + +------------------------------------------------------------------- +Thu Oct 22 16:02:07 CEST 2015 - tiwai@suse.de + +- Fix logging not to include the build path (boo#951602): + fcitx-use-basename-for-log.patch + +------------------------------------------------------------------- +Thu Oct 22 14:59:29 CEST 2015 - tiwai@suse.de + +- Several fixes and cleanup for starting fcitx on GNOME on Leap + (boo#947576,boo#942816) + * Remove the superfluous manual dbus-launch from xim script + * Use xdg autostart for GNOME, KDE, LXDE and XFCE; + fcitx-autostart script is also modified to check $INPUT_METHOD: + fcitx-autostart-check-INPUT_METHOD.patch + * Delay start of fcitx daemon a bit, too + +------------------------------------------------------------------- +Fri Oct 2 02:50:30 UTC 2015 - i@marguerite.su + +- drop xinput-fcitx, which is not used by openSUSE +- simplify xim.d-fcitx again + * do not define shell functions for success/failure, because + previous x11-tools change has been reverted, we can use + bash again. + * do not detect existence for fcitx itself, because this + scriptlet is installed with fcitx. + * drop usage of GTK3_IM_MODULE/QT4_IM_MODULE, the former + doesn't exist while the later is covered by QT_IM_MODULE + +------------------------------------------------------------------- +Thu Oct 1 11:30:10 CEST 2015 - tiwai@suse.de + +- Add missing post/postun macro calls for updating desktops and + icons (boo#947842) +- Remove superfluous ldconfig calls from the main package + post/postun + +------------------------------------------------------------------- +Wed Oct 1 06:06:23 UTC 2015 - hillwood@linuxfans.org + +- Use lua 5.2+, fix build in openSUSE_Factory + +------------------------------------------------------------------- +Mon Aug 10 14:19:20 UTC 2015 - i@marguerite.su + +- fix boo#941052: /etc/X11/xim is broken: input methods + (Fcitx, IBus and etc) do not start at all +- fix bashism in xim.d-fcitx + * "return 0" can only be used in function or sourcing, + so define functions + * "type -p" command is not available in sh builtins, + change to "-x" + * other minor stuff + +------------------------------------------------------------------- +Sat May 30 17:22:00 UTC 2015 - Led + +- fix BuildRequires + +------------------------------------------------------------------- +Sat May 30 05:43:52 UTC 2015 - i@marguerite.su + +- update version 4.2.9 + * [qt,core]use xkbcommon for compose + * [qt,keyboard]use xkbcommon better by checking return value + * [qt, core] adjust xkb context log level + * [qt,core] adjust init order to ensure set log level works + * [unicode] fix decimal unicode search + * [qt] fix compose when fcitx is not running + * [gtk] use xkbcommon also for gtk im context + * [gtk] reset xkb compose state when context reset + * [gtk, gclient] make connection and xkb context/table of + fcitxclient shared + * [gclient] fix some gtk-doc comment + * [qt] disable qt lib by option + * [core] fix invalid global imname +- clean specfile, drop fedora support + +------------------------------------------------------------------- +Thu Apr 2 14:20:58 UTC 2015 - i@marguerite.su + +- update version 4.2.8.6 + * add kf5 kcm support + +------------------------------------------------------------------- +Thu Feb 26 12:22:34 UTC 2015 - hillwood@linuxfans.org + +- update version of opencc to 1.0.2 + +------------------------------------------------------------------- +Mon Nov 17 00:58:00 UTC 2014 - Led + +- fix bashism in env_setup.sh script +- add patches: + * fcitx-4.2.8.5-fix-bashisms.patch + +------------------------------------------------------------------- +Sun Nov 9 19:42:33 UTC 2014 - i@marguerite.su + +- fix Harlequin menu color, it should be greenish + +------------------------------------------------------------------- +Sun Nov 9 07:00:33 UTC 2014 - i@marguerite.su + +- update themes + * reworked Dartmouth & New Air + * added Harlequin +- droped input.svgz + * new input-Dartmouth/Harlequin.svgz are in openSUSE-themes.tar.gz + refers to Dark/Light versions of openSUSE + +------------------------------------------------------------------- +Sat Sep 20 09:32:24 UTC 2014 - i@marguerite.su + +- update version 4.2.8.5 + * bugfix release + +------------------------------------------------------------------- +Sat Aug 9 05:33:21 UTC 2014 - i@marguerite.su + +- add baselibs.conf to SOURCE99 + +------------------------------------------------------------------- +Fri Aug 8 14:55:32 UTC 2014 - fcrozat@suse.com + +- Fix default category for fcitx (ensure it doesn't go to Other on + GNOME Classic) + +------------------------------------------------------------------- +Tue Aug 5 16:22:59 UTC 2014 - schwab@suse.de + +- Build with RPM_OPT_FLAGS +- Don't strip binaries + +------------------------------------------------------------------- +Sat Jun 7 16:41:30 UTC 2014 - i@marguerite.su + +- update version 4.2.8.4 + * Fix github issue fcitx/fcitx#134,137,153,154 + * Fix google code issue 728 + * Implement close event when close input method + * Restart from menu should be faster (but who cares :P). +- remove patch: fcitx-context-variable-disable-punc-on-the-fly.patch + * upstreamed +- remove patch: fcitx-password-visible-on-clutter-entry.patch + * upstreamed +- tweak New_Air theme's color to increase contrast in darker + plasma themes. + + +------------------------------------------------------------------- +Wed May 7 05:24:03 UTC 2014 - dliang@suse.com + +- Add fcitx-password-visible-on-clutter-entry.patch (bnc#875890) + Update the patch, back port from upstream + +------------------------------------------------------------------- +Thu May 1 14:14:02 UTC 2014 - i@marguerite.su + +- Fix bnc#851983: "fcitx tray icon is incompatible with other + systray icons" by refreshing input.svgz +- Fix environment variables: QT_IM_MODULE supports Qt4 & Qt5 now + we need a new QT4_IM_MODULE variable set to prepare for the + worst +- new skin: New Air. Idea from KDE Air theme. + +------------------------------------------------------------------- +Thu Apr 17 16:10:11 UTC 2014 - i@marguerite.su + +- add patch: fcitx-context-variable-disable-punc-on-the-fly.patch + * To support the recently released Sogou Pinyin, we need this + patch to allow Sogou to disable punc on the fly. + +------------------------------------------------------------------- +Fri Feb 14 13:07:53 UTC 2014 - fcrozat@suse.com + +- Ensure COPYING is installed. + +------------------------------------------------------------------- +Fri Feb 14 12:10:13 CET 2014 - tiwai@suse.de + +- Fix *-32bit post and postun calls for gtk-query-immodules-2 on + openSUSE 13.1 and later (bnc#845860) + +------------------------------------------------------------------- +Sat Dec 7 04:23:04 UTC 2013 - swyear@gmail.com + +- fix fcitx can't input in gnome-terminal + +------------------------------------------------------------------- +Sat Nov 2 07:31:38 UTC 2013 - i@marguerite.su + +- fix bnc#848694: fcitx still use the old gtk_immodule_post/postun + +------------------------------------------------------------------- +Sat Sep 28 09:02:48 UTC 2013 - i@marguerite.su + +- update version 4.2.8.3 + * fix for non-utf8 env + * fix for classic UI cursor position + +------------------------------------------------------------------- +Thu Sep 26 05:14:42 UTC 2013 - i@marguerite.su + +- update version 4.2.8.2 + * a bug fix release with some small new features + * implement preedit blacklist, and gvim preedit is now blacklisted by + default (thanks to lilydjwg) + * add more unicode support to unicode addon (thanks to jimmyxu) + * more fix on xmodmap loading, now we only load it if we did a layout reset. + * fix some table punctuation related bug + * install a dbus activatation file by default. + * install more library based on prefix. + * fix table configuration parsing + * fix trigger on release + +------------------------------------------------------------------- +Sat Jul 13 06:22:19 UTC 2013 - i@marguerite.su + +- update version 4.2.8.1 + * udpate default skin + * Merge pull request #119 for fixing Libkvm detection with cmake 2.8.11 + * add support for using @ to escape icon name + * remove an icon to support icon fallback in glib + * Check window size to avoid BadWindow caused by invalid skin + * Fix Issue #118 + * Fix some memory leak in Issue #117 + * Fix table punctuation ignore list + * Fix Pinyin Remind mode + * Fix behavior of trigger key with modifier +- fix systray icon in Dartmouth + +------------------------------------------------------------------- +Sun Jun 30 23:12:53 UTC 2013 - i@marguerite.su + +- update version 4.2.8 + * New Default Theme + * Add modifier only key support to trigger keys + * New DBus based Tray Icon support + * Desktop Notification Support + * First time start will only choose language in current locale + * Use first keyboard input method as default keyboard layout for most case + * fcitx-qt supports a key grab widget forked from KDE, and Qt <-> Fcitx Key +translation. + * Multi file quickphrase Support. + * Ship with some default quick phrase + * quickphrase editor support +- drop all old patches: upstream absorbed. +- add new patch: fcitx-4.2.8-freedesktop-notify.c-DBUS_TIMEOUT_USE_DEFAULT.patch + * DBUS_TIMEOUT_USE_DEFAULT is undefined in src/module/freedesktop-notify/freedesktop-notify.c +- add new patch: fcitx-4.2.8-arch-dependent-file-in-usr-share.patch + * don't install fcitx-po-parser,fcitx-scanner,comp-spell-dict into + /usr/share/cmake/fcitx + +------------------------------------------------------------------- +Fri Apr 26 23:57:32 UTC 2013 - i@marguerite.su + +- in baselibs.conf, obsoletes "libfcitx- < " + instead of "=". + +------------------------------------------------------------------- +Thu Mar 28 18:28:49 UTC 2013 - i@marguerite.su + +- add more locales into xim.d +- some Taiwan users reported that after installation, + they can't have input panel because we don't start it + and export environments by default. + +------------------------------------------------------------------- +Fri Feb 8 17:40:06 UTC 2013 - i@marguerite.su + +- disable DENABLE_DEBUG to avoid polluting .xsession-errors. (bnc#802866) + +------------------------------------------------------------------- +Tue Feb 5 14:11:50 CET 2013 - mls@suse.de + +- fix typo in specfile + +------------------------------------------------------------------- +Mon Feb 4 08:45:33 UTC 2013 - i@marguerite.su + +- remove BuildRequires: intltool, fcitx no longer use intltool + to parse translations. +- query immodules for gtk*-32bit subpackages. +- explicitly add enchant, presage, opencc requirements, fcitx use + dlopen to detect them, ld can't fulfill its needs. + +------------------------------------------------------------------- +Wed Jan 30 18:24:37 UTC 2013 - i@marguerite.su + +- fix bnc#801318: xkeyboard-config symlink breaks fcitx in detecting xkb rule files. + * bnc801318-fcitx-4.2.7-xkb-rule-symlink-detection.patch + * remove next release +- fix bnc#801319: invalid /etc/xdg/autostart/fcitx-autostart.desktop breaks ibus + * leave fcitx-autostart.desktop only for fedora. + +------------------------------------------------------------------- +Wed Jan 30 08:54:58 UTC 2013 - coolo@suse.com + +- fix the permissions of the .directory file in the openSUSE themeing + +------------------------------------------------------------------- +Sat Jan 26 05:03:20 UTC 2013 - i@marguerite.su + +- update to 4.2.7 + * new feature for user: + + qt im module support per window input context. + + quickphrase add new custom ui editor. + + all pinyin now support stroke. + + add clipboard input support (Ctrl + ; to use it) + + fcitx-diagnose script for diagnose the problem + + new dark skin which can also work for non-composite window manager (though + looks not the same) + + Helping xmodmap user to correct loading ~/.Xmodmap by default + + Bind one input method with specific key. + + Translation update (German, and some spanish). + + Add "up" and "down" to paging key by default + + fcitx-config now will comment out the value which is same as the default + value upon save, so default value can be controlled by upstream fcitx change. + + reload only one addon configuration + + * new feature for developer: + + Big build system improvement + + remove intltool dependency + + auto-codegen tool for cross module function. + + add libfcitx-qt, containing dbus stuff and provides custom ui plugin + architecture. + + candidate window can be overriden to use horizontal / vertical by input + method. (kimpanel need KDE 4.10 to use this feature) + + paging can be override by custom function + + * bug fix: + + fix for xim restart. + + add more locale to xim by default. + + compatible with lua 5.2 + + some other misc bugfix +- added patches + * fcitx-4.2.7-compat-12.2.patch + + fix 12.2 and below builds, remove next release + * fcitx-4.2.7-compat-qt474.patch + + fix qt 4.7 builds with 12.1 and below + + remove next release + * fcitx-4.2.7-compat-gcc46.patch + + fix gcc 4.6 builds with 12.1 and below + + remove next release + +------------------------------------------------------------------- +Thu Oct 11 14:03:53 UTC 2012 - i@marguerite.su + +- update to 4.2.6.1 + * a bugfix release, fix including: + + FreeBSD xlib path detection + + A few crash related bug + + reduce remove call that save profile + + Workaround a bug for qt older than 4.8.0 + (http://code.google.com/p/fcitx/issues/detail?id=630) + + fcitx-config-gtk3 will not be called under KDE. + + fcitx-table-emoji not usable under 4.2.6 + + IM switchkey will not be captured if there is only one im or no im at all. + + A bunch of fix for gtk im module. + +------------------------------------------------------------------- +Sun Sep 23 13:32:25 UTC 2012 - i@marguerite.su + +- fix openSUSE 12.1 and below build + * 4.2.6 uses a Qt 4.8+ only function (QDBusConnection) so it fails on 12.1 and below. + * weng fix it. + +------------------------------------------------------------------- +Sat Sep 15 18:04:19 UTC 2012 - i@marguerite.su + +- update to 4.2.6 + * Add a private dbus service for Fcitx IM Module, simplify the setup on some light weight Desktop + * Improve “Select Character From Phrase” and Pinyin Symbol (typing special symbols in pinyin input + methods) as well as move them to a new Pinyin Enhance module, so that these features can now be + used in other pinyin input methods as well (previous just the builtin one). + * Move spell hint to a new module. Add a new spell hint backend using a builtin dictionary. Load + enchant and presage at runtime using dlopen() so that they are not link dependencies anymore. + * Spell hint for pinyin/AutoEng/QuickPhrase + * Bug fixes for Gtk IM Module + * Add more compile options so it is possible to compile a more simplified Fcitx if necessary + * Add long description (show as tooltip) and hidden options in configure files for a more user + friendly configure interface + * Add global font setting for classical UI + * Fix xkb support on BSD + * Other bug fixes + +------------------------------------------------------------------- +Fri Sep 7 10:27:34 UTC 2012 - i@marguerite.su + +- fix libfcitx Provides, which can't drop old libraries. +- fix 32bit baselib name. + +------------------------------------------------------------------- +Sun Aug 26 01:15:41 UTC 2012 - i@marguerite.su + +- add openSUSE-branding theme for 12.2 + +------------------------------------------------------------------- +Thu Aug 16 22:34:07 UTC 2012 - i@marguerite.su + +- add Dependency: libpresage-devel, which will provide word prediction + for keyboard users. + +------------------------------------------------------------------- +Sun Jul 22 00:13:01 UTC 2012 - i@marguerite.su + +- add Provides to libfcitx as AJ suggested. + +------------------------------------------------------------------- +Sat Jul 21 18:23:11 UTC 2012 - i@marguerite.su + +- update to 4.2.5 + *For user: + 1. Default 3 skin change to support a new feature that respect the DPI on the screen. + 2. Display current input method after switch the input method, and the hint window will disappear after a while. + 3. fcitx-keyboard wordhint now is a per input context option, not a global one. + 4. fcitx-xkb support loading custom xmodmap script when needed. + 5. fcitx-xkb support assign a default layout when there is no input method. + 6. fcitx-pinyin support fix like “jv -> ju” + 7. fcitx-pinyin add xiaohe support. + 8. fcitx-pinyin now can use “v” to trigger quick-phrase + 9. change zh_HK punctutation map for “$” from ¥ to $. + 10. support typing unicode character via “ctrl+shift+alt+u” + 11. shift for default “active-inactive” switch, and can be only used after switch from “active to inactive” by default. + 12. safer for handling signal and exit. + 13. restart is displayed on the UI (both classic and kimpanel) + 14. log message now includes pid. + *For API: + 1. add timeout support. + 2. add per-inputcontext data support + 3. move all keysym to fcitx-utils. + *For module: + 1. Quickphrase can be triggered via cross module call. + +------------------------------------------------------------------- +Sat Jun 16 14:32:39 UTC 2012 - i@marguerite.su + +- fix memory overflow, thanks to reporter dieter. + * http://lists.opensuse.org/opensuse-factory/2012-06/msg00359.html +- support fedora builds. +- further split packages by input engines and tables, no longer a big mess. + +------------------------------------------------------------------- +Tue Jun 12 07:22:31 UTC 2012 - i@marguerite.su + +- update to 4.2.4.1 + * urgent fix for compose key. +- use new xim.d-fcitx. + +------------------------------------------------------------------- +Sun Jun 3 13:05:53 UTC 2012 - i@marguerite.su + +- update to 4.2.4 + * fix some xim problem + * add fcitx-gclient for glib and gir binding, can be used to control fcitx or implement fcitx client. + * merge fcitx-keyboard into fcitx + * bind specific keyboard layout with inputmethod + (you need up to date fcitx-configtool,gtk3 ver or kcm-fcitx to configure this feature) + * adjust some default hotkey setting. +- drop openSUSE 11.4 lua51 patch. upstream fixed. +- drop downgrade gio version patch. upstream fixed. +- add SUSE_ASNEEDED=0 macro to avoid a gobject-introspection bug as vuntz suggested. thanks! + +------------------------------------------------------------------- +Sun Jun 3 04:46:37 UTC 2012 - i@marguerite.su + +- fix sles builds. + * add version tags. + * changed source compression. + * add a patch to downgrade gio's version. + * use xim instead of qt im module. + +------------------------------------------------------------------- +Sat May 12 12:49:11 UTC 2012 - i@marguerite.su + +- bring fcitx in as default IM in DVD. +- add Provides(en;ko;zh_CN;zh_SG). + +------------------------------------------------------------------- +Mon May 7 02:55:27 UTC 2012 - i@marguerite.su + +- enable lua by default + +------------------------------------------------------------------- +Sun May 6 22:57:27 UTC 2012 - i@marguerite.su + +- update to 4.2.3 + * Lua extension support, same interface with Googlepinyin. + * super can be used in hotkey again + * fixes Trad-Simp native engine in chttrans. + * Update fcitx-pinyin algorithm + * txt2mb and mb2txt support new English format + * Fix a crash when enable share status. + * Add surrounding text support. + * Commit input when unfocus. + * Classic UI improvement, including trayicon, menu. + +------------------------------------------------------------------- +Tue Apr 10 14:14:34 UTC 2012 - i@marguerite.su + +- added baselibs.conf to build 32bit im modules and libraries. + +------------------------------------------------------------------- +Sun Apr 8 02:00:07 UTC 2012 - i@marguerite.su + +- update to 4.2.2 + * Can use text as classic UI icon. + * Add more key can be used as hotkey. + * Fixes 536(trayicon),538(enter as submit). + * Make tray icon has a maximum size, so it will looks good under other tray. + +------------------------------------------------------------------- +Fri Mar 09 13:11:40 UTC+8 2012 - hillwood@linuxfans.org + +- update to 4.2.1 + * Changes related to API: + Cleanup Unused macro and API + Some new FcitxInputState series API for get the origin key event + for frontend. + Portable with custom path, hide two path related API that may + break portable. + Make FcitxHotkeyGetKey process latin letter and strip shift + modifier for them. + Ability to bind menu with a status. + Ability to update client preedit with formatted string. + * Change related to user: + Update Taiwan punctuation + Quick Phrase can use grave as trigger key. + ctrl rshift can switch input method in reverse order. + 2nd 3rd candidate choosing key will not conflict with same + switch key. + AutoEng can accept upper case english key which is not the + initial key. + Add Zenkaku_Hankaku and Hangul as default trigger key when + locale is ja and ko. + Add Symbolic icon for gnome-shell’s kimpanel. + +------------------------------------------------------------------- +Wed Feb 29 21:04:39 UTC 2012 - i@marguerite.su + +- update source from git. +- to keep source in the same state as modules submited, + as upstream suggested. + +------------------------------------------------------------------- +Thu Feb 2 16:20:03 UTC 2012 - i@marguerite.su + +- merge changelogs. + +------------------------------------------------------------------- +Wed Feb 1 20:54:34 UTC 2012 - i@marguerite.su + +- spec clean to make it pure openSUSE to submit to M17N. +- set _service to localonly. +- server deleted openSUSE unused sources. + +------------------------------------------------------------------- +Mon Jan 30 02:41:20 UTC 2012 - i@marguerite.su + +- Upstream fix issue 511, now builds on 11.4. +- Change pyphrase.mb back upon Upstream request. + +------------------------------------------------------------------- +Tue Jan 24 06:35:50 UTC 2012 - i@marguerite.su + +- Fix local fcitx.googlecode.com resolv error because of #GFW. +- Change pyphrase.mb to Sougou's Dict. + +------------------------------------------------------------------- +Mon Jan 23 12:05:42 UTC 2012 - i@marguerite.su + +- Update source to git, enable opencc for Traditional & Simplified Chinese Switch. + +------------------------------------------------------------------- +Tue Jan 17 14:31:42 UTC 2012 - cfarrell@suse.com + +- license update: GPL-2.0+ + GPL is not a recognised license and is not in SPDX format. Going on an + analysis of the source files GPL-2.0+ seems to be the best choice" + +------------------------------------------------------------------ +Fri Oct 7 01:01:22 UTC 2011 - stecue@gmail.com + +- csslayer provided a better way to fix the dbus bug. + +------------------------------------------------------------------- +Tue Oct 5 03:36:42 UTC 2011 - hillwood@linuxfans.org + +- Fixed a bug for type words in comment box of facebook while using + firefox visit facebook. Thanks to CSSlayer. + +------------------------------------------------------------------- +Wed Oct 3 05:08:23 UTC 2011 - hillwood@linuxfans.org + +- Fixed a bug with dbus. + +------------------------------------------------------------------ +Sun Oct 2 19:12:29 UTC 2011 - stecue@gmail.com + +- upstream version 4.1.2 + * Add ABI check. + * Fix table order bugs. + * other bug fixes. + +------------------------------------------------------------------ +Tue Sep 13 04:01:59 UTC 2011 - stecue@gmail.com + +- im-modules packaged. Thanks to hillwood (hillwood@linuxfans.org)! +- xim is still the default method. + +------------------------------------------------------------------- +Fri Sep 9 00:00:00 UTC 2011 - hillwood@linuxfans.org + +- update to 4.1.1 + +------------------------------------------------------------------- +Wed Sep 7 19:49:14 UTC 2011 - stecue@gmail.com + +- upstream version 4.1.0 + * support im-module (gtk2, gtk3 and qt), not packaged yet + +------------------------------------------------------------------- +Tue Jun 14 00:56:36 UTC 2011 - swyear@gmail.com + +- Add start up script, README and template + +------------------------------------------------------------------- +Thu May 17 00:00:00 UTC 2011 - hillwood@linuxfans.org + +- add gtk-immodule-xim require + +------------------------------------------------------------------- +Sat Sep 18 00:00:00 UTC 2010 - wengxt@gmail.com + +- Make it works with newest + +------------------------------------------------------------------- +Fri Jun 11 00:00:00 UTC 2004 - xyb76@sina.com + +- Add data/tables.conf + +------------------------------------------------------------------- +Mon Feb 2 00:00:00 UTC 2004 - xyb76@sina.com + +- Fix spec bug(patch by hamigua). + +------------------------------------------------------------------- +Thu Jan 15 00:00:00 UTC 2004 - xyb76@sina.com + +- skeleton RPM diff --git a/fcitx.keyring b/fcitx.keyring new file mode 100644 index 0000000..91e55e8 --- /dev/null +++ b/fcitx.keyring @@ -0,0 +1,37 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQENBEyUvwkBCAD0P0fGutq6L7iixhhOMCaxvTwmT84oEcNP816hNo2+YSEws8Xp +6uv94czWDyC1ibzh++mStReE7RioieiKtH/sYrfS1M2Gwv3kGYzekx5qKx92nczt +Ed08ufho3s3Qcw4QV0IT8JLdnqCWOTHwcPeyLJ0ZZH9fseqHfrlsbVIlFI7BnMZy +TW4xTvgX1jJ9A5m5JWW70iaOX+Yom1k5WRUDm8RtzzK0IAkdXwYHbrVCRNumbQK5 +ZtNZr3EmBxDt3lzpzD1Ow1EStRpVgd0YVzHtv5N5o46Tp0L9j1br64zUbiOPrRss +pVhpo0w9Mx70ay8JCBZqSBGM8GOSpsyP6g0FABEBAAG0H1dlbmcgWHVldGlhbiA8 +d2VuZ3h0QGdtYWlsLmNvbT6JAU4EEwEKADgWIQQsyKBgmtKkecZbbVyOi4mMvyQS ++QUCYF4sUgIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRCOi4mMvyQS+RG6 +CADYy6b6xRwyY3e7vi4UJYQpGz0l3kfEbZVawOs6qNxntU2qZ1K1wJ9xPmF/lRKO +1CNZDtBOHuaJwMFKu16p/k1GPuqsTYFWrH6PJeJtngvIw+gPXmcJD3KXj4CamEUt +bdqECkro7f31w6C5O/PkJ9E1lx2QTTHFdBTBXpZ7gRRVm0bWnH5KC9/sISpZnjfw +sc7xJ7kDeAJW6SQIHVX/zlXDPhPbYt+ZhUWalEFys6vTXDQwOCP6fhp+gIjSe2qw +6zfZyA4WTRzr2DHUXmAx1ogH//7qITcdG/moCsHR2X6/nZ/WH0/EyQyLoR091Xt6 +gJxx8QcRW7V0GFvxSSRBT0nTtCpXZW5nIFh1ZXRpYW4gPGNzc2xheWVyQGNoYWty +YS1wcm9qZWN0Lm9yZz6JAT8EMAEIACkWIQQsyKBgmtKkecZbbVyOi4mMvyQS+QUC +Yl5ODwsdIE9sZCBlbWFpbAAKCRCOi4mMvyQS+QJCCACYq/Tch2bFTI9sFz8+IuH1 +3KFp2RBCIb8W1JKaVjt/60p7ZJyy1FFBmyaJRdBxrLwAvkMhCaog/p9f9hIIHpWO +0aHimZdG1xwk0omO3soRcLML1c0nVYpmr1Uzc6Vr13cqH4FGE8nXP0JKWlUDEazc +EOxPPV6kbh2eWaZsoqhg4xf/8fTpGEFd8AleS8LLHpMFu9M8NmHCiaX8LQvEql0p +y/VA/oFvEZnFXSFOA6GpXQI68/tCreTwfr0dnGDvFdv/ugcW5nyvrvnEgX0PkQG5 +cFgj7a5EQy+EfPUGRU3ZLRUuHjadhZLuc0xk4ZtPIQB0+6eQkDcmYL9kMWklkBDg +uQENBEyUvwkBCAC9nO6sPID+wu6nsh5jdZr5fKqbegYT0gPEm2AO3zkhWn5Pm2ne +MaTZVRa1eNyHNz5eNOmx/7mv9IHS3MHFoN2+KOZ94u0oDfamZYSqWczc2CUE5Nk/ +3sPloKeaaI2lL1xtFVn2AUBCVeB68HchoMN6wLUjaM7r46NpnCP/h+E9pkJ7Vewg +zQcGi0+kjkmW/U+PgkPyGCUZnoV33CzVZDu77nfE6wnoCuCk9XK/UsRdyMSfQbXE +C17NfYx1nlpnbnDG6q6V5PwL9pfwfvEJP/QFQL5kNRlyHNT+S8nv21dtYnD3pcQv +0x/M+MT696OTolU5TnvT7WA0q5UeWU0kkar1ABEBAAGJAR8EGAECAAkFAkyUvwkC +GwwACgkQjouJjL8kEvmdcQgAieCkzFxs/9sEadmDPmFstK47DvrDu+j3EOLtocav +vhPQqf+15yKvHfZG1boNC/V5ttI4n/w+UOWZoIIGxUlsU30jrMpt9IbxIV+uAcbU +//MwtQPpYsc/yfIpTot5xihnsdBlpvcxIPgivQDjTk6+qWqK4vIHE0xUINzjL8ES +N/nZFAqDlRGUcrdtJTkGGO/6U5OMzxLDmVoSXUxnhadDT0pLLyXJVG2YoOwVL8Wj +OBvL/eXLXAQLiYebKYOl97fIH7xJsU+iVzOM+mvpEMpg/Lp81hWHB13cJPWHVC64 +h2kd0cWoXXo9KYd3JU+ECao5c3YrTzfwsB/MWdWaDwaWeA== +=fx+h +-----END PGP PUBLIC KEY BLOCK----- diff --git a/fcitx.spec b/fcitx.spec new file mode 100644 index 0000000..d6fdcaf --- /dev/null +++ b/fcitx.spec @@ -0,0 +1,630 @@ +# +# spec file for package fcitx +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%if ! %{defined _distconfdir} +%define _distconfdir %{_sysconfdir} +%endif + +Name: fcitx +Version: 4.2.9.9 +Release: 0 +Summary: Flexible Context-aware Input Tool with eXtension +License: GPL-2.0-or-later +Group: System/I18n/Chinese +URL: https://github.com/fcitx/fcitx +Source: https://download.fcitx-im.org/fcitx/%{name}-%{version}_dict.tar.xz +Source1: xim.d-fcitx +Source2: fcitx-README.suse +Source3: xim.fcitx.suse.template +Source8: openSUSE-themes.tar.gz +Source9: macros.%{name} +Source10: %{name}.keyring +Source99: baselibs.conf +Source100: https://download.fcitx-im.org/fcitx/%{name}-%{version}_dict.tar.xz.sig +# PATCH-FIX-OPENSUSE fcitx-autostart-check-INPUT_METHOD.patch boo#947576 +Patch2: fcitx-autostart-check-INPUT_METHOD.patch +# PATCH-FIX-OPENSUSE downgrade cmake requirement to 3.1 again +Patch3: fcitx-cmake-3.1.patch +Patch4: remote-module-use-safe-directory-for-socket-API-sock.patch +BuildRequires: cairo-devel +BuildRequires: cmake +BuildRequires: dbus-1-devel +BuildRequires: dbus-1-glib-devel +BuildRequires: enchant-devel +BuildRequires: extra-cmake-modules +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: gobject-introspection-devel +BuildRequires: gtk2-devel +BuildRequires: gtk3-devel +BuildRequires: hicolor-icon-theme +BuildRequires: iso-codes-devel +BuildRequires: libicu-devel +BuildRequires: libpresage-devel +# Only for leap < 15.2 +%if 0%{?suse_version} < 1550 && 0%{?sle_version} < 150200 +BuildRequires: libqt4-devel +%endif +BuildRequires: libuuid-devel +BuildRequires: libxml2-devel +BuildRequires: opencc-devel +BuildRequires: pango-devel +BuildRequires: pkgconfig +BuildRequires: update-desktop-files +BuildRequires: xz +BuildRequires: pkgconfig(json-c) +BuildRequires: pkgconfig(lua) +BuildRequires: pkgconfig(xkbcommon) >= 0.5.0 +BuildRequires: pkgconfig(xkbfile) +Requires: %{name}-branding = %{version} +Recommends: %{name}-pinyin = %{version}-%{release} +Recommends: %{name}-table = %{version}-%{release} +# These libraries are dlopen-ed in fcitx at runtime +# for spell-checking for keyboard users. ld can't find +# them, so explicitly recommends. +Recommends: libenchant1 +Recommends: libopencc1_1 +Recommends: libpresage1 +Provides: locale(ko;zh_CN;zh_SG) + +%description +Fcitx is a CJK input method framework. It supports Table, +Pinyin and QuWei input methods. It's flexible and fast. + +%package -n libfcitx-core0 +Summary: Core library of fcitx +Group: System/Libraries +Provides: libfcitx-4_2_9 = %{version} +Obsoletes: libfcitx-4_2_9 <= %{version} + +%description -n libfcitx-core0 +Core library of fcitx. + +%package -n libfcitx-gclient1 +Summary: GClient library of fcitx +Group: System/Libraries + +%description -n libfcitx-gclient1 +GClient library of fcitx + +%package -n libfcitx-utils0 +Summary: Util library of fcitx +Group: System/Libraries + +%description -n libfcitx-utils0 +Util library of fcitx + +%package -n libfcitx-config4 +Summary: Config library of fcitx4 +Group: System/Libraries + +%description -n libfcitx-config4 +Config library of fcitx + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version}-%{release} +Requires: libfcitx-config4 = %{version} +Requires: libfcitx-core0 = %{version} +Requires: libfcitx-gclient1 = %{version} +Requires: libfcitx-utils0 = %{version} + +%description devel +Development header files for Fcitx input method framework. + +%package gtk2 +Summary: Gtk2 IM module for %{name} +Group: System/I18n/Chinese +Supplements: (fcitx and libgtk-2_0-0) +%{gtk2_immodule_requires} + +%description gtk2 +GTK+ version 2 input module for Fcitx input method rfamework. + +%package gtk3 +Summary: Gtk3 IM module for %{name} +Group: System/I18n/Chinese +Supplements: (fcitx and libgtk-3-0) +%{gtk3_immodule_requires} + +%description gtk3 +GTK+ version 3 input module for Fcitx input method framework. + +%package -n typelib-1_0-Fcitx-1_0 +Summary: The Flexible Context-aware Input Tool with eXtension -- Introspection bindings +Group: System/Libraries + +%description -n typelib-1_0-Fcitx-1_0 +Fcitx is a CJK input method framework. It supports Table, +Pinyin and QuWei input methods. It's flexible and fast. + +This package provides the GObject Introspection bindings for Fcitx. + +%if 0%{?suse_version} < 1550 && 0%{?sle_version} < 150200 +%package qt4 +Summary: Qt4 IM module for %{name} +Group: System/I18n/Chinese +Supplements: (fcitx and libqt4) + +%description qt4 +QT4 input module for Fcitx input method framework. +%endif + +%package quwei +Summary: Chinese Zone-bit(QuWei) engine for %{name} +Group: System/I18n/Chinese +Requires: %{name} = %{version}-%{release} + +%description quwei +Chinese Zone-bit(QuWei) engine for Fcitx input method framework. + +%package pinyin +Summary: Chinese Pinyin engine for %{name} +Group: System/I18n/Chinese +Requires: %{name} = %{version}-%{release} + +%description pinyin +Chinese Pinyin engine for Fcitx input method framework. + +%package table +Summary: Table engine for %{name} +Group: System/I18n/Chinese +Requires: %{name} = %{version}-%{release} + +%description table +Table engine for Fcitx input method framework. + +It's the basic component for other users except some Chinese. + +%package table-cn-cangjie +Summary: Simplified Chinese Tsang-Jei(Cangjie) table for %{name} +Group: System/I18n/Chinese +Requires: %{name}-table = %{version}-%{release} +BuildArch: noarch + +%description table-cn-cangjie +Fcitx Tsang Jei (Cang Jie) input tables for Simplified Chinese. + +%package table-cn-dianbao +Summary: Telegram(Dianbao) table for %{name} +Group: System/I18n/Chinese +Requires: %{name}-table = %{version}-%{release} +BuildArch: noarch + +%description table-cn-dianbao +Fcitx Telegram (Dian Bao) input tables for Simplified Chinese. + +%package table-cn-erbi +Summary: Two stroke(Erbi) table for %{name} +Group: System/I18n/Chinese +Requires: %{name}-table = %{version}-%{release} +BuildArch: noarch + +%description table-cn-erbi +Fcitx Two Stroke (Er Bi) input tables for Simplified Chinese. + +%package table-cn-bingchan +Summary: Icefrog Holography(QXM) table for %{name} +Group: System/I18n/Chinese +Requires: %{name}-table = %{version}-%{release} +BuildArch: noarch + +%description table-cn-bingchan +Fcitx Icefrog Holography (Bing Chan Quan Xi, or QXM) input tables for Simplified Chinese. + +%package table-cn-wanfeng +Summary: Evening Breeze(Wanfeng) table for %{name} +Group: System/I18n/Chinese +Requires: %{name}-table = %{version}-%{release} +BuildArch: noarch + +%description table-cn-wanfeng +Fcitx Evening Breeze (Wan feng) input tables for Simplified Chinese. + +%package table-cn-wubi-pinyin +Summary: Wubi and pinyin(wubi-pinyin) table for %{name} +Group: System/I18n/Chinese +Requires: %{name}-table = %{version}-%{release} +Provides: locale(fcitx-table:zh_CN;) +BuildArch: noarch + +%description table-cn-wubi-pinyin +Fcitx Wubi (Wu Bi Zi Xing) and Pinyin mixed input tables for Simplified Chinese. + +Wubi in Fcitx is based on wubi x86. + +%package table-cn-wubi +Summary: Wubi table for %{name} +Group: System/I18n/Chinese +Requires: %{name}-table = %{version}-%{release} +Provides: locale(fcitx-table:zh_CN;) +BuildArch: noarch + +%description table-cn-wubi +Fcitx Wubi (Wu Bi Zi Xing) input tables for Simplified Chinese. + +Wubi in Fcitx is based on wubi x86. + +%package table-cn-ziran +Summary: Nature(Ziran) table for %{name} +Group: System/I18n/Chinese +Requires: %{name}-table = %{version}-%{release} +BuildArch: noarch + +%description table-cn-ziran +Fcitx Nature (Zi Ran Ma) input tables for Simplified Chinese. + +%package table-tools +Summary: Fcitx tools to make tables +Group: System/I18n/Chinese + +%description table-tools +Tools to convert txt word sheets to fcitx tables. + +see manpage for details + +%package pinyin-tools +Summary: Fcitx tools to make pinyin match list +Group: System/I18n/Chinese + +%description pinyin-tools +Tools to convert txt or scel(sougou pinyin data format) pinyin sheets to fcitx match lists. + +%package branding-openSUSE +Summary: openSUSE default Skins for Fcitx +Group: System/I18n/Chinese +Requires: %{name} = %{version}-%{release} +Supplements: (%{name} and branding-openSUSE) +Conflicts: %{name}-branding +Provides: %{name}-branding = %{version} +BuildArch: noarch + +%description branding-openSUSE +openSUSE default skins for Fcitx + +You can either use this package or download from kde-look.org using knewstaff in fcitx-config-kde4. + +%package skin-new-air +Summary: New Air skin for Fcitx +Group: System/I18n/Chinese +Requires: %{name} = %{version} +BuildArch: noarch + +%description skin-new-air +New Air skin for Fcitx, inspired by KDE Air theme. + +You can either use this package or download from kde-look.org using knewstaff in +fcitx-config-kde4. + +%package skin-classic +Summary: Fcitx Classic Skin +Group: System/I18n/Chinese +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description skin-classic +Fcitx classic skin. + +You can either use this package or download from kde-look.org using knewstaff in fcitx-config-kde4. + +%package skin-dark +Summary: Fcitx Dark Skin +Group: System/I18n/Chinese +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description skin-dark +Fcitx dark skin. + +You can either use this package for download from kde-look.org using knewstaff in fcitx-config-kde4. + +%prep +%setup -q +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 + +%build +mkdir build +cd build + +# fix dlopen-ed library name +cmake .. \ + -DCMAKE_C_FLAGS="%{optflags}" \ + -DCMAKE_CXX_FLAGS="%{optflags}" \ + -DCMAKE_VERBOSE_MAKEFILE=On \ + -DCMAKE_BUILD_TYPE=Release \ + -DOPENCC_LIBRARY_FILENAME=libopencc.so.2 \ + -DENCHANT_LIBRARY_FILENAME=libenchant.so.1 \ + -DPRESAGE_LIBRARY_FILENAME=libpresage.so.1 \ + -DENABLE_GTK3_IM_MODULE=On \ +%if 0%{?sles_version} || 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 + -DENABLE_QT=Off \ + -DENABLE_QT_IM_MODULE=off \ +%endif + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DLIB_INSTALL_DIR=%{_libdir} \ + -DSYSCONFDIR=%{_sysconfdir} \ + -DENABLE_LUA=On + +# fix gobject-introspection build +export SUSE_ASNEEDED=0 +%make_build + +%install +%cmake_install + +# install openSUSE skins +tar -xzf %{SOURCE8} +mv openSUSE-themes/Harlequin %{buildroot}%{_datadir}/%{name}/skin/ +mv openSUSE-themes/Dartmouth %{buildroot}%{_datadir}/%{name}/skin/ +mv openSUSE-themes/NewAir %{buildroot}%{_datadir}/%{name}/skin/ + +%suse_update_desktop_file fcitx Utility DesktopUtility +%suse_update_desktop_file fcitx-skin-installer Utility DesktopUtility +%suse_update_desktop_file fcitx-configtool Settings DesktopSettings + +# fix doc +mkdir -p %{buildroot}%{_docdir}/ +mv %{buildroot}%{_datadir}/doc/%{name} %{buildroot}%{_docdir}/ +cp -r %{SOURCE2} %{buildroot}%{_docdir}/%{name}/ +cp -r %{SOURCE3} %{buildroot}%{_docdir}/%{name}/ +cp -r AUTHORS %{buildroot}%{_docdir}/%{name}/ +cp -r ChangeLog %{buildroot}%{_docdir}/%{name}/ + +# create autostart +mkdir -p %{buildroot}%{_distconfdir}/X11/xim.d/ +install -m 644 %{SOURCE1} %{buildroot}%{_distconfdir}/X11/xim.d/fcitx + +priority=30 +pushd %{buildroot}%{_distconfdir}/X11/xim.d/ + for lang in am ar as bn el fa gu he hi hr ja ka kk kn ko lo ml my \ + pa ru sk vi zh_TW zh_CN zh_HK zh_SG \ + de fr it es nl cs pl da nn nb fi en sv ; do + mkdir $lang + pushd $lang + ln -s ../fcitx $priority-fcitx + popd + done +popd + +# install rpm macros +install -D -m644 %{SOURCE9} %{buildroot}%{_rpmmacrodir}/macros.%{name} + +# remove *.la +rm -rf %{buildroot}%{_libdir}/lib%{name}-config.la + +# fix scripts +for script in $(ls %{buildroot}%{_datadir}/cmake/fcitx/*.sh) ; do + sed -i "s/\/usr\/bin\/env bash/\/usr\/bin\/bash/" $script; + chmod +x $script; +done +sed -i "s/\/usr\/bin\/env bash/\/usr\/bin\/bash/" %{buildroot}%{_bindir}/fcitx-diagnose + +%find_lang %{name} + +%fdupes %{buildroot} + +%post gtk2 +%{gtk2_immodule_post} + +%postun gtk2 +%{gtk2_immodule_postun} + +%post gtk3 +%{gtk3_immodule_post} + +# Add fcitx icons to gnome3 panel +TARGET="%{_datadir}/gnome-shell/js/ui/statusIconDispatcher.js" +if [ -f $TARGET ] && [ ! -f $TARGET-fcitx ] ; then +mv $TARGET $TARGET-fcitx +sed "/^const STANDARD_TRAY_ICON_IMPLEMENTATIONS/a \ 'fcitx': 'input-method'," $TARGET-fcitx > $TARGET +fi + +%postun gtk3 +%{gtk3_immodule_postun} + +%post +%desktop_database_post +%icon_theme_cache_post +exit 0 + +%postun +%desktop_database_postun +%icon_theme_cache_postun +exit 0 + +%post -n libfcitx-core0 -p /sbin/ldconfig +%post -n libfcitx-gclient1 -p /sbin/ldconfig +%post -n libfcitx-utils0 -p /sbin/ldconfig +%post -n libfcitx-config4 -p /sbin/ldconfig +%postun -n libfcitx-core0 -p /sbin/ldconfig +%postun -n libfcitx-gclient1 -p /sbin/ldconfig +%postun -n libfcitx-utils0 -p /sbin/ldconfig +%postun -n libfcitx-config4 -p /sbin/ldconfig + +%files -f %{name}.lang +%license COPYING +%{_bindir}/%{name} +%{_bindir}/%{name}-autostart +%{_bindir}/%{name}-configtool +%{_bindir}/%{name}-remote +%{_bindir}/%{name}-skin-installer +%{_bindir}/%{name}-dbus-watcher +%{_bindir}/%{name}-diagnose +%{_datadir}/%{name}/ +%{_datadir}/applications/*.desktop +%{_datadir}/icons/* +%{_datadir}/mime/packages/* +%{_datadir}/dbus-1/services/org.fcitx.Fcitx.service +%{_mandir}/man1/fcitx.1%{?ext_man} +%{_mandir}/man1/fcitx-remote.1%{?ext_man} +%{_libdir}/%{name}/ +%{_sysconfdir}/xdg/autostart/%{name}*.desktop +%{_distconfdir}/X11/xim.d +%doc %{_docdir}/%{name}/ + +# excludes +%exclude %{_datadir}/%{name}/pinyin +%exclude %{_datadir}/%{name}/table/* +%exclude %{_datadir}/%{name}/imicon/* +%exclude %{_datadir}/%{name}/inputmethod/* +%exclude %{_datadir}/%{name}/addon/%{name}-pinyin.conf +%exclude %{_datadir}/%{name}/addon/%{name}-table.conf +%exclude %{_datadir}/%{name}/addon/%{name}-qw.conf +%exclude %{_datadir}/%{name}/configdesc/%{name}-pinyin.desc +%exclude %{_datadir}/%{name}/configdesc/table.desc +%exclude %{_libdir}/%{name}/fcitx-pinyin.so +%exclude %{_libdir}/%{name}/fcitx-table.so +%exclude %{_libdir}/%{name}/fcitx-qw.so +%exclude %{_libdir}/%{name}/libexec/comp-spell-dict +%exclude %{_libdir}/%{name}/libexec/fcitx-po-parser +%exclude %{_libdir}/%{name}/libexec/fcitx-scanner +%exclude %{_datadir}/%{name}/skin/Harlequin +%exclude %{_datadir}/%{name}/skin/Dartmouth +%exclude %{_datadir}/%{name}/skin/NewAir +%exclude %{_datadir}/%{name}/skin/classic +%exclude %{_datadir}/%{name}/skin/dark + +%files -n libfcitx-core0 +%{_libdir}/libfcitx-core.so.0 +%{_libdir}/libfcitx-core.so.0.3 + +%files -n libfcitx-gclient1 +%{_libdir}/libfcitx-gclient.so.1 +%{_libdir}/libfcitx-gclient.so.0.2 + +%files -n libfcitx-utils0 +%{_libdir}/libfcitx-utils.so.0 +%{_libdir}/libfcitx-utils.so.0.1 + +%files -n libfcitx-config4 +%{_libdir}/libfcitx-config.so.4 +%{_libdir}/libfcitx-config.so.4.1 + +%files gtk2 +%{_libdir}/gtk-2.0/* + +%files gtk3 +%{_libdir}/gtk-3.0/* + +%files -n typelib-1_0-Fcitx-1_0 +%{_libdir}/girepository-1.0/Fcitx-1.0.typelib + +%files quwei +%{_libdir}/%{name}/%{name}-qw.so +%{_datadir}/%{name}/inputmethod/qw.conf +%{_datadir}/%{name}/addon/%{name}-qw.conf + +%files pinyin +%{_libdir}/%{name}/%{name}-pinyin.so +%{_datadir}/%{name}/pinyin/ +%{_datadir}/%{name}/inputmethod/pinyin.conf +%{_datadir}/%{name}/inputmethod/shuangpin.conf +%{_datadir}/%{name}/addon/%{name}-pinyin.conf +%{_datadir}/%{name}/imicon/pinyin.png +%{_datadir}/%{name}/imicon/shuangpin.png +%{_datadir}/%{name}/configdesc/%{name}-pinyin.desc + +%files table +%{_libdir}/%{name}/%{name}-table.so +%{_datadir}/%{name}/addon/%{name}-table.conf +%{_datadir}/%{name}/configdesc/table.desc + +%files table-cn-cangjie +%{_datadir}/%{name}/table/cangjie.* +%{_datadir}/%{name}/imicon/cangjie.png + +%files table-cn-dianbao +%{_datadir}/%{name}/table/db.* + +%files table-cn-erbi +%{_datadir}/%{name}/table/erbi.* +%{_datadir}/%{name}/imicon/erbi.png + +%files table-cn-bingchan +%{_datadir}/%{name}/table/qxm.* + +%files table-cn-wanfeng +%{_datadir}/%{name}/table/wanfeng.* + +%files table-cn-wubi-pinyin +%{_datadir}/%{name}/table/wbpy.* +%{_datadir}/%{name}/imicon/wbpy.png + +%files table-cn-wubi +%{_datadir}/%{name}/table/wbx.* +%{_datadir}/%{name}/imicon/wubi.png + +%files table-cn-ziran +%{_datadir}/%{name}/table/zrm.* +%{_datadir}/%{name}/imicon/ziranma.png + +%files table-tools +%{_bindir}/mb2txt +%{_bindir}/txt2mb +%{_mandir}/man1/mb2txt.1%{?ext_man} +%{_mandir}/man1/txt2mb.1%{?ext_man} + +%files pinyin-tools +%{_bindir}/createPYMB +%{_bindir}/readPYMB +%{_bindir}/readPYBase +%{_bindir}/mb2org +%{_bindir}/scel2org +%{_mandir}/man1/createPYMB.1%{?ext_man} +%{_mandir}/man1/readPYMB.1%{?ext_man} +%{_mandir}/man1/readPYBase.1%{?ext_man} +%{_mandir}/man1/mb2org.1%{?ext_man} +%{_mandir}/man1/scel2org.1%{?ext_man} + +%files branding-openSUSE +%{_datadir}/%{name}/skin/Harlequin +%{_datadir}/%{name}/skin/Dartmouth + +%files skin-new-air +%{_datadir}/%{name}/skin/NewAir + +%files skin-classic +%{_datadir}/%{name}/skin/classic + +%files skin-dark +%{_datadir}/%{name}/skin/dark + +%files devel +%{_rpmmacrodir}/macros.%{name} +%{_includedir}/* +%{_bindir}/%{name}4-config +%{_libdir}/%{name}/libexec/comp-spell-dict +%{_libdir}/%{name}/libexec/fcitx-po-parser +%{_libdir}/%{name}/libexec/fcitx-scanner +%{_libdir}/pkgconfig/*.pc +%{_datadir}/cmake/ +%{_datadir}/gir-1.0/Fcitx-1.0.gir +%{_libdir}/libfcitx-config.so +%{_libdir}/libfcitx-core.so +%{_libdir}/libfcitx-utils.so +%{_libdir}/libfcitx-gclient.so + +%if 0%{?suse_version} < 1550 && 0%{?sle_version} < 150200 +%files qt4 +%{_libdir}/qt4/* +%endif + +%changelog diff --git a/macros.fcitx b/macros.fcitx new file mode 100644 index 0000000..8e6dd90 --- /dev/null +++ b/macros.fcitx @@ -0,0 +1,20 @@ +# RPM macros for fcitx +%_fcitx_includedir %{_includedir}/fcitx +%_fcitx_moduleincdir %{_fcitx_includedir}/module +%_fcitx_libdir %{_libdir}/fcitx +%_fcitx_libexecdir %{_fcitx_libdir}/libexec +%_fcitx_datadir %{_datadir}/fcitx +%_fcitx_addondir %{_fcitx_datadir}/addon +%_fcitx_descdir %{_fcitx_datadir}/configdesc +%_fcitx_imicondir %{_fcitx_datadir}/imicon +%_fcitx_inputmethoddir %{_fcitx_datadir}/inputmethod +%_fcitx_skindir %{_fcitx_datadir}/skin +%_fcitx_autostartdir %{_sysconfdir}/X11/xim.d +%_fcitx_tabledir %{_fcitx_datadir}/table + +%fcitx_requires \ +Requires: fcitx + +%fcitx_table_requires \ +Requires: fcitx-table + diff --git a/openSUSE-themes.tar.gz b/openSUSE-themes.tar.gz new file mode 100644 index 0000000..7496325 --- /dev/null +++ b/openSUSE-themes.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:056c28d1481305fb0d46dca888dcb238fb94aba7c6540b0afd4948706555b556 +size 1089321 diff --git a/remote-module-use-safe-directory-for-socket-API-sock.patch b/remote-module-use-safe-directory-for-socket-API-sock.patch new file mode 100644 index 0000000..a2dc76d --- /dev/null +++ b/remote-module-use-safe-directory-for-socket-API-sock.patch @@ -0,0 +1,111 @@ +From 27208dc130124d650c94c3579bd7eea072f90d3b Mon Sep 17 00:00:00 2001 +From: Matthias Gerstner +Date: Thu, 24 Aug 2023 11:12:25 +0200 +Subject: [PATCH] remote module: use safe directory for socket API socket + +Placing this into /tmp opens a local DoS attack vector, allowing other +uses to pre-create this path and thereby making it impossible for fctx +to start. + +Use a safe directory in $XDG_RUNTIME_DIR or $HOME, instead. +--- + src/module/remote/remote.c | 7 +++++-- + src/module/remote/remote.h | 31 +++++++++++++++++++++++++++++++ + tools/cli/fcitx-remote.c | 4 ++-- + 3 files changed, 38 insertions(+), 4 deletions(-) + create mode 100644 src/module/remote/remote.h + +diff --git a/src/module/remote/remote.c b/src/module/remote/remote.c +index eda44972..486b405b 100644 +--- a/src/module/remote/remote.c ++++ b/src/module/remote/remote.c +@@ -36,6 +36,7 @@ + #include "fcitx/frontend.h" + #include "fcitx/instance.h" + #include "fcitx-utils/utils.h" ++#include "module/remote/remote.h" + + #define MAX_IMNAME_LEN 30 + +@@ -63,8 +64,10 @@ void* RemoteCreate(FcitxInstance* instance) + FcitxRemote* remote = fcitx_utils_malloc0(sizeof(FcitxRemote)); + remote->owner = instance; + +- char *socketfile; +- asprintf(&socketfile, "/tmp/fcitx-socket-:%d", fcitx_utils_get_display_number()); ++ const char *socketfile = GetRemoteSocketPath(fcitx_utils_get_display_number()); ++ if (!socketfile) ++ return NULL; ++ + remote->socket_fd = CreateSocket(socketfile); + if (remote->socket_fd < 0) { + FcitxLog(ERROR, _("Can't open socket %s: %s"), socketfile, strerror(errno)); +diff --git a/src/module/remote/remote.h b/src/module/remote/remote.h +new file mode 100644 +index 00000000..ee52c980 +--- /dev/null ++++ b/src/module/remote/remote.h +@@ -0,0 +1,31 @@ ++#include ++ ++// returns a safe path name for a socket to use in the remote module and ++// remote utility. ++// if no safe directory can be determined this returns NULL and no remote ++// socket must be setup ++// otherwise a malloc'd string is returned that needs to be free()'d by the ++// caller when it isn't needed any longer. ++static inline const char* GetRemoteSocketPath(int display_nr) ++{ ++ const char *hidden = ""; ++ const char *dir = getenv("XDG_RUNTIME_DIR"); ++ if (!dir) { ++ dir = getenv("HOME"); ++ // if it is placed in the home directory then add a "." prefix to the ++ // basename to make it hidden ++ hidden = "."; ++ } ++ if (!dir) { ++ // no safe directory found ++ return NULL; ++ } ++ ++ char *path = NULL; ++ ++ if (asprintf(&path, "%s/%sfcitx-socket-:%d", dir, hidden, fcitx_utils_get_display_number()) < 0) ++ // formatting error ++ return NULL; ++ ++ return path; ++} +diff --git a/tools/cli/fcitx-remote.c b/tools/cli/fcitx-remote.c +index 5e06ea76..80677100 100644 +--- a/tools/cli/fcitx-remote.c ++++ b/tools/cli/fcitx-remote.c +@@ -36,6 +36,7 @@ + #include + #include "fcitx/frontend.h" + #include "fcitx-utils/utils.h" ++#include "module/remote/remote.h" + + int create_socket(const char *name) + { +@@ -82,7 +83,6 @@ void usage(FILE* fp) + + int main(int argc, char *argv[]) + { +- char *socketfile = NULL; + int socket_fd; + + int o = 0; +@@ -124,7 +124,7 @@ int main(int argc, char *argv[]) + } + } + +- asprintf(&socketfile, "/tmp/fcitx-socket-:%d", fcitx_utils_get_display_number()); ++ const char *socketfile = GetRemoteSocketPath(fcitx_utils_get_display_number()); + + socket_fd = create_socket(socketfile); + +-- +2.41.0 + diff --git a/xim.d-fcitx b/xim.d-fcitx new file mode 100644 index 0000000..94052b3 --- /dev/null +++ b/xim.d-fcitx @@ -0,0 +1,21 @@ +#make sure set these vars before dbus-launch +export LC_CTYPE=$LANG +export XMODIFIERS="@im=fcitx" +export GTK_IM_MODULE=fcitx +export QT_IM_SWITCHER=imsw-multi +export QT_IM_MODULE=fcitx + +case "$WINDOWMANAGER" in + *gnome*|*plasma*|*xfce*|*lxde*) + # started via xdg autostart (boo#947576) + # explicitly set below, as referred in xdg autostart + export INPUT_METHOD=fcitx + ;; + *) + # FIXME: a little bit of delay is required to avoid race (boo#947576) + (sleep 2; fcitx -d) & + ;; +esac + +# success: +return 0 diff --git a/xim.fcitx.suse.template b/xim.fcitx.suse.template new file mode 100644 index 0000000..65d5a70 --- /dev/null +++ b/xim.fcitx.suse.template @@ -0,0 +1,26 @@ +#~/.xim template for users to set fcitx as default input method +#copy this file to ~/.xim +#logout and login again, that's all +#for more infomations, see ~/.xim.template + +#if any program can't input Chinese, try export LC_CTYPE=zh_CN.UTF-8, e.g + +#export LC_CTYPE=zh_CN.UTF-8 + +## For FCITX 3 series and 4.0 Only +#export XMODIFIERS="@im=fcitx" +#export GTK_IM_MODULE=xim +#export QT_IM_SWITCHER=imsw-multi +#export QT_IM_MODULE=xim +#fcitx -d + +## For FCITX version >= 4.1 +#Since FCITX 4.1, you can use fcitx itself (besides xim) as the immodule,so the following code might work better (fcitx-gtk2/3, fcitx-qt must be installed), especially when you are using gnome3. + +export XMODIFIERS="@im=fcitx" +export GTK_IM_MODULE=fcitx +export GTK3_IM_MODULE=fcitx +export QT_IM_SWITCHER=imsw-multi +export QT_IM_MODULE=fcitx +export QT4_IM_MODULE=fcitx +fcitx -d