Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/udev/files/, sys-fs/udev/
Date: Tue, 10 Jul 2018 19:45:11
Message-Id: 1531251876.a6af105145328ed25fb7325942507dbbba762643.williamh@gentoo
1 commit: a6af105145328ed25fb7325942507dbbba762643
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 10 19:43:26 2018 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 10 19:44:36 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6af1051
7
8 sys-fs/udev: 239 version bump
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 sys-fs/udev/Manifest | 1 +
13 ...issing-comma-in-raw_clone-assembly-for-sp.patch | 29 ++
14 sys-fs/udev/udev-239.ebuild | 324 +++++++++++++++++++++
15 3 files changed, 354 insertions(+)
16
17 diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest
18 index 879d26bb80f..01bd656d0f2 100644
19 --- a/sys-fs/udev/Manifest
20 +++ b/sys-fs/udev/Manifest
21 @@ -3,4 +3,5 @@ DIST systemd-225.tar.gz 3878442 BLAKE2B 24bf9f6bfdd7d7c585829c1b172f73e669e13702
22 DIST systemd-233.tar.gz 4660737 BLAKE2B 38cdd74543447b3c02391b328428fed169fe2cf2df6e9341dcaf2f7d3d977612ec102301e144c1cada90d61e9e9bda3b2faaef708c8ff4bd0b52b143760a83b2 SHA512 5ad5329ea116d973cf67096f7e7ad28e9ea0905696e9451291f1d25e5064f4a9bfcfae87e912996c6a38397e9f4a148d4ccecfa9b70f7ecdf04deadb61784c8e
23 DIST systemd-236.tar.gz 6759035 BLAKE2B 0fc26bd67fb6cc3b0565c763fc26e38186c4b05c3d38652b73a2189dfbfb46382dba239f7f6f889eec57ad1d8f69d4098745c8f4ca16a707aa23b7771f2328f3 SHA512 1a9672960e03e05c09e41fb8cfe9b0f25e867fd43f37f8371515ddddfdbd4270afd746a6da733f6d1d3b2cc43db1ecc7a9f2245f2dac2ec233db74e9e70e4f6d
24 DIST systemd-238.tar.gz 6954022 BLAKE2B 9b5cc36a7234c0d037a2656ee1e5ed54186a394b8be41771ebc29c903d3efcecf7f13f004a6d1695c022923bd0d540a243e897852f07e810f73fd3163f688dde SHA512 c0f272b022308d3bd94679184e102a8dc85de55310bda205a458ea33c77c7733e5c8c8e5b15f786ba3e0ce59e7c6a9bf0d5a0950517c6b91e0f345950129b9c8
25 +DIST systemd-239.tar.gz 7157293 BLAKE2B 975f6215c8bb6662d6e161f637e1fece22930c0190b3c31a8fc4cb1a10600546a252704ac95590d9d14e495fcd06082a590e6d755e36603a41b3a396d579d8b0 SHA512 fd44590dfd148504c5ed1e67521efce50d84b627b7fc77015fa95dfa76d7a42297c56cc89eff40181809732024b16d48f2a87038cf435e0c63bc2b95ecd86b0f
26 DIST udev-216-patches-2.tar.xz 1264 BLAKE2B b1bbb6b1b7734edc3352b4352a45b4b5df4715b0fc92c4936798aa93fb078755b7795f475d7bc42392ad8ef57853e9ce2507c66cc9bfbd37e6fe22ada4c156cc SHA512 1f5912f3bbc3e40a4efad9de8b1fab2b3a750f3f23c9f2e33a581658959d22cf23f9ff1b8f51597874e7bca1d0f757f37fd5550b4112160261559524eda261f4
27
28 diff --git a/sys-fs/udev/files/239-basic-add-missing-comma-in-raw_clone-assembly-for-sp.patch b/sys-fs/udev/files/239-basic-add-missing-comma-in-raw_clone-assembly-for-sp.patch
29 new file mode 100644
30 index 00000000000..5f253bbaab9
31 --- /dev/null
32 +++ b/sys-fs/udev/files/239-basic-add-missing-comma-in-raw_clone-assembly-for-sp.patch
33 @@ -0,0 +1,29 @@
34 +From 7a022d7583f13fb3d4fb437d386364782f4efa88 Mon Sep 17 00:00:00 2001
35 +From: Mike Gilbert <floppym@g.o>
36 +Date: Wed, 27 Jun 2018 10:36:50 -0400
37 +Subject: [PATCH 18/19] basic: add missing comma in raw_clone assembly for
38 + sparc
39 +
40 +Fixes: 96f64eb5741b157f26a9089816fdd992e959792e
41 +Closes: https://github.com/systemd/systemd/issues/9444
42 +(cherry picked from commit 358248caa3eca525751694de7c34b16bb46d5a9c)
43 +---
44 + src/basic/raw-clone.h | 2 +-
45 + 1 file changed, 1 insertion(+), 1 deletion(-)
46 +
47 +diff --git a/src/basic/raw-clone.h b/src/basic/raw-clone.h
48 +index 1f134ba7f..b8857b0cd 100644
49 +--- a/src/basic/raw-clone.h
50 ++++ b/src/basic/raw-clone.h
51 +@@ -60,7 +60,7 @@ static inline pid_t raw_clone(unsigned long flags) {
52 + "mov %%o0, %1" :
53 + "=r"(in_child), "=r"(child_pid), "=r"(error) :
54 + "i"(__NR_clone), "r"(flags) :
55 +- "%o1", "%o0", "%g1" "cc" );
56 ++ "%o1", "%o0", "%g1", "cc" );
57 +
58 + if (error) {
59 + errno = child_pid;
60 +--
61 +2.18.0.rc2
62 +
63
64 diff --git a/sys-fs/udev/udev-239.ebuild b/sys-fs/udev/udev-239.ebuild
65 new file mode 100644
66 index 00000000000..b09e0c65e66
67 --- /dev/null
68 +++ b/sys-fs/udev/udev-239.ebuild
69 @@ -0,0 +1,324 @@
70 +# Copyright 1999-2018 Gentoo Foundation
71 +# Distributed under the terms of the GNU General Public License v2
72 +
73 +EAPI=6
74 +
75 +inherit bash-completion-r1 linux-info meson ninja-utils multilib-minimal toolchain-funcs udev user versionator
76 +
77 +if [[ ${PV} = 9999* ]]; then
78 + EGIT_REPO_URI="https://github.com/systemd/systemd.git"
79 + inherit git-r3
80 +else
81 + SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz"
82 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
83 +fi
84 +
85 +DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
86 +HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
87 +
88 +LICENSE="LGPL-2.1 MIT GPL-2"
89 +SLOT="0"
90 +IUSE="acl +kmod selinux"
91 +
92 +RESTRICT="test"
93 +
94 +COMMON_DEPEND=">=sys-apps/util-linux-2.30[${MULTILIB_USEDEP}]
95 + sys-libs/libcap[${MULTILIB_USEDEP}]
96 + acl? ( sys-apps/acl )
97 + kmod? ( >=sys-apps/kmod-16 )
98 + selinux? ( >=sys-libs/libselinux-2.1.9 )
99 + !<sys-libs/glibc-2.11
100 + !sys-apps/gentoo-systemd-integration
101 + !sys-apps/systemd"
102 +DEPEND="${COMMON_DEPEND}
103 + dev-util/gperf
104 + >=dev-util/intltool-0.50
105 + >=dev-util/meson-0.40.0
106 + dev-util/ninja
107 + >=sys-apps/coreutils-8.16
108 + virtual/os-headers
109 + virtual/pkgconfig
110 + >=sys-kernel/linux-headers-3.9
111 + app-text/docbook-xml-dtd:4.2
112 + app-text/docbook-xml-dtd:4.5
113 + app-text/docbook-xsl-stylesheets
114 + dev-libs/libxslt"
115 +RDEPEND="${COMMON_DEPEND}
116 + !<sys-fs/lvm2-2.02.103
117 + !<sec-policy/selinux-base-2.20120725-r10"
118 +PDEPEND=">=sys-apps/hwids-20140304[udev]
119 + >=sys-fs/udev-init-scripts-26"
120 +
121 +S=${WORKDIR}/systemd-${PV}
122 +EGIT_CHECKOUT_DIR=${S}
123 +
124 +pkg_setup() {
125 + if [[ ${MERGE_TYPE} != buildonly ]]; then
126 + CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~!FW_LOADER_USER_HELPER ~UNIX"
127 + linux-info_pkg_setup
128 +
129 + # CONFIG_FHANDLE was introduced by 2.6.39
130 + local MINKV=2.6.39
131 +
132 + if kernel_is -lt ${MINKV//./ }; then
133 + eerror "Your running kernel is too old to run this version of ${P}"
134 + eerror "You need to upgrade kernel at least to ${MINKV}"
135 + fi
136 +
137 + if kernel_is -lt 3 7; then
138 + ewarn "Your running kernel is too old to have firmware loader and"
139 + ewarn "this version of ${P} doesn't have userspace firmware loader"
140 + ewarn "If you need firmware support, you need to upgrade kernel at least to 3.7"
141 + fi
142 + fi
143 +}
144 +
145 +src_prepare() {
146 + cat <<-EOF > "${T}"/40-gentoo.rules
147 + # Gentoo specific floppy and usb groups
148 + ACTION=="add", SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy"
149 + ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
150 + EOF
151 +
152 + local PATCHES=(
153 + "${FILESDIR}/236-uucp-group.patch"
154 + "${FILESDIR}/239-basic-add-missing-comma-in-raw_clone-assembly-for-sp.patch"
155 + )
156 +
157 + default
158 +}
159 +
160 +meson_multilib_native_use() {
161 + if multilib_is_native_abi && use "$1"; then
162 + echo true
163 + else
164 + echo false
165 + fi
166 +}
167 +
168 +multilib_src_configure() {
169 + local emesonargs=(
170 + -Dacl=$(meson_multilib_native_use acl)
171 + -Defi=false
172 + -Dkmod=$(meson_multilib_native_use kmod)
173 + -Dselinux=$(meson_multilib_native_use selinux)
174 + -Dlink-udev-shared=false
175 + -Dsplit-usr=true
176 +
177 + # Prevent automagic deps
178 + -Dgcrypt=false
179 + -Dlibcryptsetup=false
180 + -Dlibidn=false
181 + -Dlibidn2=false
182 + -Dlibiptc=false
183 + -Dseccomp=false
184 + -Dlz4=false
185 + -Dxz=false
186 + )
187 + meson_src_configure
188 +}
189 +
190 +src_configure() {
191 + # Prevent conflicts with i686 cross toolchain, bug 559726
192 + tc-export AR CC NM OBJCOPY RANLIB
193 + multilib-minimal_src_configure
194 +}
195 +
196 +multilib_src_compile() {
197 + # meson creates this link
198 + local libudev=$(readlink src/udev/libudev.so.1)
199 +
200 + local targets=(
201 + src/udev/${libudev}
202 + )
203 + if multilib_is_native_abi; then
204 + targets+=(
205 + systemd-udevd
206 + udevadm
207 + src/udev/ata_id
208 + src/udev/cdrom_id
209 + src/udev/collect
210 + src/udev/mtd_probe
211 + src/udev/scsi_id
212 + src/udev/v4l_id
213 + man/udev.conf.5
214 + man/systemd.link.5
215 + man/hwdb.7
216 + man/udev.7
217 + man/systemd-udevd.service.8
218 + man/udevadm.8
219 + )
220 + fi
221 + eninja "${targets[@]}"
222 +}
223 +
224 +multilib_src_install() {
225 + local libudev=$(readlink src/udev/libudev.so.1)
226 +
227 + into /
228 + dolib.so src/udev/{${libudev},libudev.so.1,libudev.so}
229 +
230 + insinto "/usr/$(get_libdir)/pkgconfig"
231 + doins src/libudev/libudev.pc
232 +
233 + if multilib_is_native_abi; then
234 + into /
235 + dobin udevadm
236 +
237 + exeinto /lib/systemd
238 + doexe systemd-udevd
239 +
240 + exeinto /lib/udev
241 + doexe src/udev/{ata_id,cdrom_id,collect,mtd_probe,scsi_id,v4l_id}
242 +
243 + rm rules/99-systemd.rules || die
244 + insinto /lib/udev/rules.d
245 + doins rules/*.rules
246 +
247 + insinto /usr/share/pkgconfig
248 + doins src/udev/udev.pc
249 +
250 + mv man/systemd-udevd.service.8 man/systemd-udevd.8 || die
251 + rm man/systemd-udevd-{control,kernel}.socket.8 || die
252 + doman man/*.[0-9]
253 + fi
254 +}
255 +
256 +multilib_src_install_all() {
257 + doheader src/libudev/libudev.h
258 +
259 + insinto /etc/udev
260 + doins src/udev/udev.conf
261 + keepdir /etc/udev/{hwdb.d,rules.d}
262 +
263 + insinto /lib/systemd/network
264 + doins network/99-default.link
265 +
266 + # see src_prepare() for content of 40-gentoo.rules
267 + insinto /lib/udev/rules.d
268 + doins "${T}"/40-gentoo.rules
269 + doins "${S}"/rules/*.rules
270 +
271 + dobashcomp shell-completion/bash/udevadm
272 +
273 + insinto /usr/share/zsh/site-functions
274 + doins shell-completion/zsh/_udevadm
275 +
276 + einstalldocs
277 +}
278 +
279 +pkg_postinst() {
280 + mkdir -p "${ROOT%/}"/run
281 +
282 + # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
283 + # So try to remove it here (will only work if empty).
284 + rmdir "${ROOT%/}"/dev/loop 2>/dev/null
285 + if [[ -d ${ROOT%/}/dev/loop ]]; then
286 + ewarn "Please make sure your remove /dev/loop,"
287 + ewarn "else losetup may be confused when looking for unused devices."
288 + fi
289 +
290 + local fstab="${ROOT%/}"/etc/fstab dev path fstype rest
291 + while read -r dev path fstype rest; do
292 + if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then
293 + ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs"
294 + ewarn "filesystem. Otherwise udev won't be able to boot."
295 + ewarn "See, https://bugs.gentoo.org/453186"
296 + fi
297 + done < "${fstab}"
298 +
299 + if [[ -d ${ROOT%/}/usr/lib/udev ]]; then
300 + ewarn
301 + ewarn "Please re-emerge all packages on your system which install"
302 + ewarn "rules and helpers in /usr/lib/udev. They should now be in"
303 + ewarn "/lib/udev."
304 + ewarn
305 + ewarn "One way to do this is to run the following command:"
306 + ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)"
307 + ewarn "Note that qfile can be found in app-portage/portage-utils"
308 + fi
309 +
310 + local old_cd_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-cd.rules
311 + local old_net_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-net.rules
312 + for old_rules in "${old_cd_rules}" "${old_net_rules}"; do
313 + if [[ -f ${old_rules} ]]; then
314 + ewarn
315 + ewarn "File ${old_rules} is from old udev installation but if you still use it,"
316 + ewarn "rename it to something else starting with 70- to silence this deprecation"
317 + ewarn "warning."
318 + fi
319 + done
320 +
321 + elog
322 + elog "Starting from version >= 197 the new predictable network interface names are"
323 + elog "used by default, see:"
324 + elog "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames"
325 + elog "https://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c"
326 + elog
327 + elog "Example command to get the information for the new interface name before booting"
328 + elog "(replace <ifname> with, for example, eth0):"
329 + elog "# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null"
330 + elog
331 + elog "You can use either kernel parameter \"net.ifnames=0\", create empty"
332 + elog "file /etc/systemd/network/99-default.link, or symlink it to /dev/null"
333 + elog "to disable the feature."
334 +
335 + if has_version 'sys-apps/biosdevname'; then
336 + ewarn
337 + ewarn "You can replace the functionality of sys-apps/biosdevname which has been"
338 + ewarn "detected to be installed with the new predictable network interface names."
339 + fi
340 +
341 + ewarn
342 + ewarn "You need to restart udev as soon as possible to make the upgrade go"
343 + ewarn "into effect."
344 + ewarn "The method you use to do this depends on your init system."
345 + if has_version 'sys-apps/openrc'; then
346 + ewarn "For sys-apps/openrc users it is:"
347 + ewarn "# /etc/init.d/udev --nodeps restart"
348 + fi
349 +
350 + elog
351 + elog "For more information on udev on Gentoo, upgrading, writing udev rules, and"
352 + elog "fixing known issues visit:"
353 + elog "https://wiki.gentoo.org/wiki/Udev"
354 + elog "https://wiki.gentoo.org/wiki/Udev/upgrade"
355 +
356 + # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null,
357 + # do the same for 80-net-setup-link.rules to keep the old behavior
358 + local net_move=no
359 + local net_name_slot_sym=no
360 + local net_rules_path="${ROOT%/}"/etc/udev/rules.d
361 + local net_name_slot="${net_rules_path}"/80-net-name-slot.rules
362 + local net_setup_link="${net_rules_path}"/80-net-setup-link.rules
363 + if [[ ! -e ${net_setup_link} ]]; then
364 + [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]] && net_move=yes
365 + if [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then
366 + net_move=yes
367 + net_name_slot_sym=yes
368 + fi
369 + fi
370 + if [[ ${net_move} == yes ]]; then
371 + ebegin "Copying ${net_name_slot} to ${net_setup_link}"
372 +
373 + if [[ ${net_name_slot_sym} == yes ]]; then
374 + ln -nfs /dev/null "${net_setup_link}"
375 + else
376 + cp "${net_name_slot}" "${net_setup_link}"
377 + fi
378 + eend $?
379 + fi
380 +
381 + # https://cgit.freedesktop.org/systemd/systemd/commit/rules/50-udev-default.rules?id=3dff3e00e044e2d53c76fa842b9a4759d4a50e69
382 + # https://bugs.gentoo.org/246847
383 + # https://bugs.gentoo.org/514174
384 + enewgroup input
385 +
386 + # Update hwdb database in case the format is changed by udev version.
387 + if has_version 'sys-apps/hwids[udev]'; then
388 + udevadm hwdb --update --root="${ROOT%/}"
389 + # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd
390 + # https://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda
391 + [[ -z ${REPLACING_VERSIONS} ]] && udev_reload
392 + fi
393 +}