From 401101f9c8077911929d3f2b60a37098460a5d89 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 24 Mar 2022 23:59:54 +0000 Subject: gentoo resync : 25.03.2022 --- games-util/joycond/Manifest | 4 +- .../joycond/files/joycond-systemd-paranoia.patch | 45 ++++++++++++++++++++++ .../joycond/files/joycond-systemd-paths.patch | 32 +++++++++++++++ .../joycond/joycond-0.1.0_p20210730-r1.ebuild | 43 +++++++++++++++++++++ games-util/joycond/joycond-0.1.0_p20210730.ebuild | 39 ------------------- 5 files changed, 123 insertions(+), 40 deletions(-) create mode 100644 games-util/joycond/files/joycond-systemd-paranoia.patch create mode 100644 games-util/joycond/files/joycond-systemd-paths.patch create mode 100644 games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild delete mode 100644 games-util/joycond/joycond-0.1.0_p20210730.ebuild (limited to 'games-util/joycond') diff --git a/games-util/joycond/Manifest b/games-util/joycond/Manifest index 81e9e2bcca5c..c0871c3b36c6 100644 --- a/games-util/joycond/Manifest +++ b/games-util/joycond/Manifest @@ -1,4 +1,6 @@ +AUX joycond-systemd-paranoia.patch 1095 BLAKE2B a69fca57e6857265021f1a2b709d06d08cf00dd23f3eea3fc91cc2ac264d77b425e22bc26f30b2e2e8680dbb80e7777419ec95bbacb398f87a66e1a7b6e5a886 SHA512 d3f9c3a88d01201d2872afabf178204f836315c8bd276e5b4090142ad57c42ca102642a256358cca44c85c3f3031b61736622cab5da40a147d6ea7164d2ad774 +AUX joycond-systemd-paths.patch 1626 BLAKE2B 6df9c18daf72949e5cc96a99be9da4af9e15d20101c513a5c2db79d912b0ef61348dd442cdc3172a042bce171e05c2d82deed4c05dbb088bd76520d5ac9c4609 SHA512 2c8e912f3f5a6b10d59b01fb40240bb725e75a7d900d9e808c6f501de9f48e89ac3b4028eb0df0d6fe1bf1b4a01fa861b593035ed9fc02fbcee7b5aba4b5e00b AUX joycond.initd 205 BLAKE2B e5da9bf96d39796897bd0f819c874c40285a85578c61c12c38c702e1719c238e8ad6e106d282846f8576a38ddd3c1960efdaeed2ab9e186b25e86cc40b0035e0 SHA512 2d96fe9af653f88adc8918733f729e9bf5e7c43ed5a6ae5f24f8ad73d45d05f59b142634377de74a3fccda6704233a862bb4a066068b1aabc428d6d54cd4cb0d DIST joycond-0.1.0_p20210730.tar.gz 29947 BLAKE2B d151e9a798a358e142c44722ce5d9892bc63a7c2992aa6b962a02ab971a8aec9bd343bd56cc26ae36e63d5977d1d0a99c52c35aeb779d352f1bbe2d15010e43c SHA512 1d0a82bd9e2aeecef3215232ffb6acb77008845fe0e8094e81d2b81627cca1e5d581986fad6631c5efd2b29514370fbac8a65d9996df762543d050628327a564 -EBUILD joycond-0.1.0_p20210730.ebuild 756 BLAKE2B 0cd4d88b137eb29d43c94c2748727fdace281c57b5d70f074c4059205d86c923d10d0ca1e54a1977b3b88ca07791cd06ca828f2b3b4bfce7b80ccd84a4820b0f SHA512 12c55cacef7844a7f7d061bff509e48045425e144f9ed457cdbe049e5638d087014b931f2289ffcddf23b8ac790df3c9874381471b9f9fd92ad95b35a331eee4 +EBUILD joycond-0.1.0_p20210730-r1.ebuild 812 BLAKE2B e9312a59a5859c335e16c5d3668161b632ea444e2607e3f33e356ee69dc0bd9e03c4c5614d49f3399543df49492f6dc78afed3fa4b6bc871a554fbe064fd242a SHA512 2d58ad8387f6d15832b6fcb5bf7a90a27d1f3c8f54838aee669be4b9d2b3390cf4778622d498103b75b753c9dcaff7a5c660a01fa2add59b5e12fcf9e0078510 MISC metadata.xml 342 BLAKE2B f256215b8ff7fe2d8b1d360f3a3da2a530a5c7b8137a2f38d21a51e303ead2fc3b28c20a9199bd7885a940908cd2b084ce58db14cb9578b3d63c5e86be5f45e8 SHA512 a68b62631acf469245b1c78ad35487390937f5a555251cc0ae75d7756677d760d2c730f891854e16e06cbf0382a649992006a1c7f13b843c03551aa1754f106c diff --git a/games-util/joycond/files/joycond-systemd-paranoia.patch b/games-util/joycond/files/joycond-systemd-paranoia.patch new file mode 100644 index 000000000000..f6803d074f17 --- /dev/null +++ b/games-util/joycond/files/joycond-systemd-paranoia.patch @@ -0,0 +1,45 @@ +From d39ce9de9420560494d92519f4e29a40d685a5b4 Mon Sep 17 00:00:00 2001 +From: Andrew Udvare +Date: Sun, 12 Dec 2021 22:02:00 -0500 +Subject: [PATCH] systemd service: paranoia mode + +--- + systemd/joycond.service | 24 +++++++++++++++++++----- + 1 file changed, 19 insertions(+), 5 deletions(-) + +diff --git a/systemd/joycond.service b/systemd/joycond.service +index cc8e408..5a8b045 100644 +--- a/systemd/joycond.service ++++ b/systemd/joycond.service +@@ -4,12 +4,26 @@ After=network.target + + [Service] + ExecStart=/usr/bin/joycond +-WorkingDirectory=/root +-StandardOutput=inherit +-StandardError=inherit + Restart=always +-User=root ++ ++DeviceAllow=char-input ++DevicePolicy=closed ++LockPersonality=yes ++MemoryDenyWriteExecute=yes ++NoNewPrivileges=yes ++ProtectClock=yes ++PrivateTmp=yes ++ProtectHome=yes ++ProtectHostname=yes ++ProtectControlGroups=yes ++ProtectKernelModules=yes ++ProtectProc=noaccess ++ProtectSystem=strict ++RestrictAddressFamilies=AF_NETLINK ++RestrictNetworkInterfaces= ++RestrictRealtime=yes ++RestrictSUIDSGID=yes ++SocketBindDeny=any + + [Install] + WantedBy=multi-user.target +- diff --git a/games-util/joycond/files/joycond-systemd-paths.patch b/games-util/joycond/files/joycond-systemd-paths.patch new file mode 100644 index 000000000000..8b8288350a3e --- /dev/null +++ b/games-util/joycond/files/joycond-systemd-paths.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f9d6e93..4e05976 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,12 +28,24 @@ add_subdirectory(src) + install(TARGETS joycond DESTINATION /usr/bin/ + PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) +-install(FILES udev/89-joycond.rules udev/72-joycond.rules DESTINATION /lib/udev/rules.d/ ++ ++pkg_get_variable(UDEV_RULES_PATH udev udevdir) ++install(FILES udev/89-joycond.rules udev/72-joycond.rules DESTINATION ${UDEV_RULES_PATH}/rules.d/ + PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ + ) +-install(FILES systemd/joycond.service DESTINATION /etc/systemd/system ++ ++execute_process(COMMAND systemd-path systemd-system-unit OUTPUT_VARIABLE SYSTEMD_SYSTEM_UNIT_PATH OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE UNIT_RETVAL) ++if(NOT "${UNIT_RETVAL}" EQUAL 0) ++ set(SYSTEMD_SYSTEM_UNIT_PATH "/usr/lib/systemd/system") ++endif() ++install(FILES systemd/joycond.service DESTINATION ${SYSTEMD_SYSTEM_UNIT_PATH} + PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ + ) +-install(FILES systemd/joycond.conf DESTINATION /etc/modules-load.d ++ ++execute_process(COMMAND systemd-path modules-load OUTPUT_VARIABLE SYSTEMD_MODULES_LOAD_PATH OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE MODULES_RETVAL) ++if(NOT "${MODULES_RETVAL}" EQUAL 0) ++ set(SYSTEMD_MODULES_LOAD_PATH "/usr/lib/modules-load.d") ++endif() ++install(FILES systemd/joycond.conf DESTINATION ${SYSTEMD_MODULES_LOAD_PATH} + PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ + ) diff --git a/games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild b/games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild new file mode 100644 index 000000000000..89a5d6774449 --- /dev/null +++ b/games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake linux-info + +COMMIT="f9a66914622514c13997c2bf7ec20fa98e9dfc1d" +DESCRIPTION="Daemon that uses hid-nintendo evdev devices to implement joycon pairing" +HOMEPAGE="https://github.com/DanielOgorchock/joycond" +SRC_URI="https://github.com/DanielOgorchock/joycond/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + dev-libs/libevdev + virtual/udev +" + +RDEPEND=" + ${DEPEND} +" + +CONFIG_CHECK=" + ~HID + ~HID_NINTENDO + ~HIDRAW +" + +S="${WORKDIR}/${PN}-${COMMIT}" + +PATCHES=( + "${FILESDIR}"/${PN}-systemd-paths.patch + "${FILESDIR}"/${PN}-systemd-paranoia.patch +) + +src_install() { + cmake_src_install + newinitd "${FILESDIR}"/${PN}.initd ${PN} + doman doc/${PN}.1 +} diff --git a/games-util/joycond/joycond-0.1.0_p20210730.ebuild b/games-util/joycond/joycond-0.1.0_p20210730.ebuild deleted file mode 100644 index e06a319c6811..000000000000 --- a/games-util/joycond/joycond-0.1.0_p20210730.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake linux-info - -COMMIT="f9a66914622514c13997c2bf7ec20fa98e9dfc1d" -DESCRIPTION="Daemon that uses hid-nintendo evdev devices to implement joycon pairing" -HOMEPAGE="https://github.com/DanielOgorchock/joycond" -SRC_URI="https://github.com/DanielOgorchock/joycond/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64" - -DEPEND=" - dev-libs/libevdev - virtual/udev -" - -RDEPEND=" - ${DEPEND} -" - -CONFIG_CHECK=" - ~HID - ~HID_NINTENDO - ~HIDRAW -" - -S="${WORKDIR}/${PN}-${COMMIT}" - -src_install() { - cmake_src_install - rm -r "${ED}"/etc/modules-load.d/ || die - newinitd "${FILESDIR}"/${PN}.initd ${PN} - doman doc/${PN}.1 -} -- cgit v1.2.3