Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/eudev/
Date: Tue, 09 Feb 2021 19:41:58
Message-Id: 1612899705.926368d66f6fbd34566709203aedb59d3f1076d7.blueness@gentoo
1 commit: 926368d66f6fbd34566709203aedb59d3f1076d7
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 9 19:41:45 2021 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 9 19:41:45 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=926368d6
7
8 sys-fs/eudev: version bump to 3.2.10
9
10 Package-Manager: Portage-3.0.13, Repoman-3.0.2
11 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
12
13 sys-fs/eudev/Manifest | 1 +
14 sys-fs/eudev/eudev-3.2.10.ebuild | 236 +++++++++++++++++++++++++++++++++++++++
15 2 files changed, 237 insertions(+)
16
17 diff --git a/sys-fs/eudev/Manifest b/sys-fs/eudev/Manifest
18 index 9807ef1a9a2..3a6a38b7c96 100644
19 --- a/sys-fs/eudev/Manifest
20 +++ b/sys-fs/eudev/Manifest
21 @@ -1,3 +1,4 @@
22 +DIST eudev-3.2.10.tar.gz 1961960 BLAKE2B 3708c78fad3abad6aa4b2beaaa325e25e118621aa2e6cb351732f6d8349dc17da9be852cab79045c7a513e927c2d1266c6443814fd264943765d98fb5b404e75 SHA512 d0a076d8a54e9d4ca9ca48cf885d082965144b322950d351b7ead4a5035c2dad6fd66b7f137d7281982876c3c50330cdd5e599788f23e1369388181dd178941d
23 DIST eudev-3.2.5.tar.gz 1856958 BLAKE2B 8ca5706a91395ffa38c9bc552df874c1521d18103a6568bcf82d0664a20f8e38b58b67a74798f9f0c10a5adc99a7524318055b79dc2e360aee684c2a2a5983a4 SHA512 f73efde0d2dafcf79be4ebe9f6e6abb44329ea4ae45ccc4d9662c1d5ca6f4d45c27ca0b3135d7fa85f305bf7c5825dc1000079eb93fe7179c36a229fe63e372c
24 DIST eudev-3.2.7.tar.gz 1892931 BLAKE2B 9ae903d624e8fb1b334735527329e6074a194dd6e22073c54acc58010d0f8f2d29bdc42d3e6d72dd388c1012be273ca27626ffe1173382d7dde9ad3aee942cd0 SHA512 e6c8ec86ae434c967f6a568fa0b281229bb87be7e3fec025dc3e0225de7843ffaa5dd65bdeffefbc91e9e2911aa3de9df84c76148fe8863ff60fba4c88653c40
25 DIST eudev-3.2.8.tar.gz 1894193 BLAKE2B 8709a13031744d5dd2f57853375b920bdaa6ea028624111dc96be9d46748de8423ac749f27183c668336701c16735d7ca2db4566621e0e741a2604785c14c64f SHA512 13221e6f9696a8630d867eb7d73f3bf5dd1bc2dfd80d62af00342be4cbf39a862e644ea3776fa4d91463e594ca50c5deecbeb7e05d161097e889ea58a66ccc42
26
27 diff --git a/sys-fs/eudev/eudev-3.2.10.ebuild b/sys-fs/eudev/eudev-3.2.10.ebuild
28 new file mode 100644
29 index 00000000000..82a21826bf9
30 --- /dev/null
31 +++ b/sys-fs/eudev/eudev-3.2.10.ebuild
32 @@ -0,0 +1,236 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI="6"
37 +
38 +KV_min=2.6.39
39 +
40 +inherit autotools linux-info multilib multilib-minimal toolchain-funcs
41 +
42 +if [[ ${PV} = 9999* ]]; then
43 + EGIT_REPO_URI="https://github.com/gentoo/eudev.git"
44 + inherit git-r3
45 +else
46 + SRC_URI="https://dev.gentoo.org/~blueness/${PN}/${P}.tar.gz"
47 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
48 +fi
49 +
50 +DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
51 +HOMEPAGE="https://github.com/gentoo/eudev"
52 +
53 +LICENSE="LGPL-2.1 MIT GPL-2"
54 +SLOT="0"
55 +IUSE="+hwdb +kmod introspection rule-generator selinux static-libs test"
56 +RESTRICT="!test? ( test )"
57 +
58 +COMMON_DEPEND=">=sys-apps/util-linux-2.20
59 + introspection? ( >=dev-libs/gobject-introspection-1.38 )
60 + kmod? ( >=sys-apps/kmod-16 )
61 + selinux? ( >=sys-libs/libselinux-2.1.9 )
62 + !<sys-libs/glibc-2.11
63 + !sys-apps/gentoo-systemd-integration
64 + !sys-apps/systemd"
65 +DEPEND="${COMMON_DEPEND}
66 + dev-util/gperf
67 + virtual/os-headers
68 + virtual/pkgconfig
69 + >=sys-devel/make-3.82-r4
70 + >=sys-kernel/linux-headers-${KV_min}
71 + >=dev-util/intltool-0.50
72 + test? ( app-text/tree dev-lang/perl )"
73 +
74 +RDEPEND="${COMMON_DEPEND}
75 + acct-group/input
76 + acct-group/kvm
77 + acct-group/render
78 + !<sys-fs/lvm2-2.02.103
79 + !<sec-policy/selinux-base-2.20120725-r10
80 + !sys-fs/udev
81 + !sys-apps/systemd"
82 +
83 +PDEPEND=">=sys-fs/udev-init-scripts-26
84 + hwdb? ( >=sys-apps/hwids-20140304[udev] )"
85 +
86 +MULTILIB_WRAPPED_HEADERS=(
87 + /usr/include/udev.h
88 +)
89 +
90 +pkg_pretend() {
91 + ewarn
92 + ewarn "As of 2013-01-29, ${P} provides the new interface renaming functionality,"
93 + ewarn "as described in the URL below:"
94 + ewarn "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames"
95 + ewarn
96 + ewarn "This functionality is enabled BY DEFAULT because eudev has no means of synchronizing"
97 + ewarn "between the default or user-modified choice of sys-fs/udev. If you wish to disable"
98 + ewarn "this new iface naming, please be sure that /etc/udev/rules.d/80-net-name-slot.rules"
99 + ewarn "exists: touch /etc/udev/rules.d/80-net-name-slot.rules"
100 + ewarn
101 +}
102 +
103 +pkg_setup() {
104 + CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~UNIX"
105 + linux-info_pkg_setup
106 + get_running_version
107 +
108 + # These are required kernel options, but we don't error out on them
109 + # because you can build under one kernel and run under another.
110 + if kernel_is lt ${KV_min//./ }; then
111 + ewarn
112 + ewarn "Your current running kernel version ${KV_FULL} is too old to run ${P}."
113 + ewarn "Make sure to run udev under kernel version ${KV_min} or above."
114 + ewarn
115 + fi
116 +}
117 +
118 +src_prepare() {
119 + # change rules back to group uucp instead of dialout for now
120 + sed -e 's/GROUP="dialout"/GROUP="uucp"/' -i rules/*.rules \
121 + || die "failed to change group dialout to uucp"
122 +
123 + eapply_user
124 + eautoreconf
125 +}
126 +
127 +multilib_src_configure() {
128 + tc-export CC #463846
129 + export cc_cv_CFLAGS__flto=no #502950
130 +
131 + # Keep sorted by ./configure --help and only pass --disable flags
132 + # when *required* to avoid external deps or unnecessary compile
133 + local econf_args
134 + econf_args=(
135 + ac_cv_search_cap_init=
136 + ac_cv_header_sys_capability_h=yes
137 + DBUS_CFLAGS=' '
138 + DBUS_LIBS=' '
139 + --with-rootprefix=
140 + --with-rootrundir=/run
141 + --exec-prefix="${EPREFIX}"
142 + --bindir="${EPREFIX}"/bin
143 + --includedir="${EPREFIX}"/usr/include
144 + --libdir="${EPREFIX}"/usr/$(get_libdir)
145 + --with-rootlibexecdir="${EPREFIX}"/lib/udev
146 + --enable-split-usr
147 + --enable-manpages
148 + --disable-hwdb
149 + )
150 +
151 + # Only build libudev for non-native_abi, and only install it to libdir,
152 + # that means all options only apply to native_abi
153 + if multilib_is_native_abi; then
154 + econf_args+=(
155 + --with-rootlibdir="${EPREFIX}"/$(get_libdir)
156 + $(use_enable introspection)
157 + $(use_enable kmod)
158 + $(use_enable static-libs static)
159 + $(use_enable selinux)
160 + $(use_enable rule-generator)
161 + )
162 + else
163 + econf_args+=(
164 + --disable-static
165 + --disable-introspection
166 + --disable-kmod
167 + --disable-selinux
168 + --disable-rule-generator
169 + )
170 + fi
171 + ECONF_SOURCE="${S}" econf "${econf_args[@]}"
172 +}
173 +
174 +multilib_src_compile() {
175 + if multilib_is_native_abi; then
176 + emake
177 + else
178 + emake -C src/shared
179 + emake -C src/libudev
180 + fi
181 +}
182 +
183 +multilib_src_install() {
184 + if multilib_is_native_abi; then
185 + emake DESTDIR="${D}" install
186 + else
187 + emake -C src/libudev DESTDIR="${D}" install
188 + fi
189 +}
190 +
191 +multilib_src_test() {
192 + # make sandbox get out of the way
193 + # these are safe because there is a fake root filesystem put in place,
194 + # but sandbox seems to evaluate the paths of the test i/o instead of the
195 + # paths of the actual i/o that results.
196 + # also only test for native abi
197 + if multilib_is_native_abi; then
198 + addread /sys
199 + addwrite /dev
200 + addwrite /run
201 + default_src_test
202 + fi
203 +}
204 +
205 +multilib_src_install_all() {
206 + find "${D}" -name '*.la' -delete || die
207 +
208 + insinto /lib/udev/rules.d
209 + doins "${FILESDIR}"/40-gentoo.rules
210 +
211 + use rule-generator && doinitd "${FILESDIR}"/udev-postmount
212 +}
213 +
214 +pkg_postinst() {
215 + mkdir -p "${EROOT}"run
216 +
217 + # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
218 + # So try to remove it here (will only work if empty).
219 + rmdir "${EROOT}"dev/loop 2>/dev/null
220 + if [[ -d ${EROOT}dev/loop ]]; then
221 + ewarn "Please make sure your remove /dev/loop,"
222 + ewarn "else losetup may be confused when looking for unused devices."
223 + fi
224 +
225 + # REPLACING_VERSIONS should only ever have zero or 1 values but in case it doesn't,
226 + # process it as a list. We only care about the zero case (new install) or the case where
227 + # the same version is being re-emerged. If there is a second version, allow it to abort.
228 + local rv rvres=doitnew
229 + for rv in ${REPLACING_VERSIONS} ; do
230 + if [[ ${rvres} == doit* ]]; then
231 + if [[ ${rv%-r*} == ${PV} ]]; then
232 + rvres=doit
233 + else
234 + rvres=${rv}
235 + fi
236 + fi
237 + done
238 +
239 + if use hwdb && has_version 'sys-apps/hwids[udev]'; then
240 + udevadm hwdb --update --root="${ROOT%/}"
241 +
242 + # https://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda
243 + # reload database after it has be rebuilt, but only if we are not upgrading
244 + # also pass if we are -9999 since who knows what hwdb related changes there might be
245 + if [[ ${rvres} == doit* ]] && [[ ${ROOT%/} == "" ]] && [[ ${PV} != "9999" ]]; then
246 + udevadm control --reload
247 + fi
248 + fi
249 + if [[ ${rvres} != doitnew ]]; then
250 + ewarn
251 + ewarn "You need to restart eudev as soon as possible to make the"
252 + ewarn "upgrade go into effect:"
253 + ewarn "\t/etc/init.d/udev --nodeps restart"
254 + fi
255 +
256 + if use rule-generator && \
257 + [[ -x $(type -P rc-update) ]] && rc-update show | grep udev-postmount | grep -qsv 'boot\|default\|sysinit'; then
258 + ewarn
259 + ewarn "Please add the udev-postmount init script to your default runlevel"
260 + ewarn "to ensure the legacy rule-generator functionality works as reliably"
261 + ewarn "as possible."
262 + ewarn "\trc-update add udev-postmount default"
263 + fi
264 +
265 + elog
266 + elog "For more information on eudev on Gentoo, writing udev rules, and"
267 + elog "fixing known issues visit: https://wiki.gentoo.org/wiki/Eudev"
268 +}