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