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