Drop patch "Install dracut-install into libexec dir instead of lib"
authorAmadeusz Żołnowski <aidecoe@gentoo.org>
Tue, 18 Nov 2014 20:09:02 +0000 (20:09 +0000)
committerAmadeusz Żołnowski <aidecoe@gentoo.org>
Tue, 18 Nov 2014 20:09:02 +0000 (20:09 +0000)
and install skipcpio and dracut-install into /usr/lib/dracut/. Set
QA_MULTILIB_PATHS accordingly for these binaries.

Fix bug #528998.  Commit on behalf of Alexander Tsoy <alexander@tsoy.me>.

Package-Manager: portage-2.2.14/cvs/Linux x86_64
Manifest-Sign-Key: 0xF0134531E1DBFAB5

sys-kernel/dracut/ChangeLog
sys-kernel/dracut/Manifest
sys-kernel/dracut/dracut-040-r2.ebuild [new file with mode: 0644]

index a7c046d092374d5e23bf9238f77d584357046e4a..502ce9b9faea63e63daf5b8687e4ee448be3ba35 100644 (file)
@@ -1,6 +1,15 @@
 # ChangeLog for sys-kernel/dracut
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.179 2014/11/13 18:45:40 maksbotan Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.180 2014/11/18 20:08:58 aidecoe Exp $
+
+*dracut-040-r2 (18 Nov 2014)
+
+  18 Nov 2014; Amadeusz Żołnowski <aidecoe@gentoo.org> +dracut-040-r2.ebuild:
+  Drop patch "Install dracut-install into libexec dir instead of lib"
+  and install skipcpio and dracut-install into /usr/lib/dracut/. Set
+  QA_MULTILIB_PATHS accordingly for these binaries.
+
+  Fix bug #528998.  Commit on behalf of Alexander Tsoy <alexander@tsoy.me>.
 
 *dracut-040-r1 (13 Nov 2014)
 
index 2a235c0f1532e306b3d058c5bc444ff200719bc7..c854dd1dde42f6acc98c3273fd9ee74d732ccb0b 100644 (file)
@@ -52,17 +52,18 @@ EBUILD dracut-036-r4.ebuild 7726 SHA256 3f8b7f6631083a60662c05bd9cbdc1cf534b13f1
 EBUILD dracut-037-r3.ebuild 7960 SHA256 6116304f7e16798476fc7b3b0cee2be0900453dd6d10bf01da7936463e17385f SHA512 02bde0c681ac275eddf25b5fa1cdf59b6b5deeee8e256947f6200833dbe979ce1d476580991ed86b1889a43111c6369692ffd90ace3f9c47ba23628fa017afa8 WHIRLPOOL 46eafb7ce6cf532132b2bc497d577a3b71b9c0066a7263ffce6edbe54a0ca271a7ef68e179f9220f4aa33f1146f29d49fbe5a68e7dcc027cac262661c9812a58
 EBUILD dracut-038-r2.ebuild 7899 SHA256 6fe96df7a613f4ccc6f19739169bee74a2a95f3a9f6739db067c7a7d11f192f2 SHA512 c1205e3ddcc91796fb637697ac318283e7906611ad56a8bf3c7042c151c809ea49820f5fd4a2d99333bc745f0a6964ed000c4a54b507cf8238de9528de188d64 WHIRLPOOL 68c928f5c618ff4b891ad5c0790f46aecbac1e75b2882bcee803985f3218a6566798cfa3c08361e28ab52e476123d682644f55fbe877b9a16259448403932d87
 EBUILD dracut-040-r1.ebuild 7892 SHA256 e432b53cfd28c5d6710adc3e77c1fd028ce3fd28a3668a72958560c32c64d656 SHA512 d7edfc45acf4da3568c827fd787bb82974ce66f1fc3b44253ae7214b41a8d577b09a0e9af8d2fa7cf0b9e6e4a85a2ddb3a0073e07cd1991b98046f3f4e1d51a1 WHIRLPOOL c56a445b62e3ba105f113ee223c52d8f81f8e429c3e324e4449b9c83bf1c87bb0e62d73ebac78b90f532e8be116be9001928fbf0659dc6de8c828e82ba2c26dc
+EBUILD dracut-040-r2.ebuild 7907 SHA256 2cfd6c70f63af5d34f62eaef21ef4261fbee6ade8f6c58872347841317f510dd SHA512 5efa581ff4ca29c605d441f5dd9aeffbe58870ce14a43b23004df3244810d244cae8a30196a663f0bbe477bb8069925dbb61eefab2f802dcd5dd989f7f5ff3a5 WHIRLPOOL 699712437655a6f3b434119e471187ea2328e96b7b11c2c041f84e38427eb8d3f3fe317b76d75d01d4063a1dc1b2b4897ae6f23abe6b06ccd32639959115d2f2
 EBUILD dracut-040.ebuild 7869 SHA256 c7eb6688a32903b9ee39158c6b6000906b72f792c87edf20fd11dd0c9b77816a SHA512 2f686f31dfb01fd127b7553bce5929ad52d30ab18546a2c1b00abde2c54c1519b05f1513c711acd39eb9e06d74fff8a977c739f71b88d9c51f980c5d9872a1a7 WHIRLPOOL a2f1bb356830625a50048b69ee30716dd7a2e3a9c85eb783b4860a2b3b1844f399191aedbeaec1413bf3c44aa706d1fe691f8b96aed0bbdfcf86fbab0f8bceba
-MISC ChangeLog 76544 SHA256 2d601f876813099e9be5fb4af5ba139b8c7a9efbce96d53624ccafbb4437ddcd SHA512 bc3dfed1519ef74525144d1b8cc0c769708313a205e8ec48dfc63e2927e5dc017ea680b6418558a82999dfec9b102c359ee2c7451841a687c8a41a0375ed66dd WHIRLPOOL 63b33c4c609b148672e94d25c51199b151e237fed03b1770d0b4c6aa109768b512bfa843b80318633d8204b27b145bbf0f0d634ab5f2c1e27c2ba35f56431294
+MISC ChangeLog 76921 SHA256 db853618d2c8727352883421404cdc4a5b9cff0bb6467eb84f39b59165e9243a SHA512 c435aee4afc4e230cbcf12c12bb2f5ec46711c8a7ea323debfb8439d6f70f5617f26427a7271db3c5d936fdedb03cbf577a1c2fb4fb1278be88e7956e73e0014 WHIRLPOOL a8adfff0876818df0c6e265a0853c8f9de0ddcb899d0a0d0c611d1277822b4c2c0fa3cde4132af503cf0804d0f2c536253bf90dfee1d8fb5c1b3a2436676d649
 MISC metadata.xml 906 SHA256 5f19b725d0669877fdd7814634b7aa7dd73331459bace52de02908417b833c3f SHA512 c5838d36080528d541b67cb38de17cc2351f7e5e17ab060c58f037792225ea223ade6b7e69376f4a9256b0bb3dcf4de578dcd50ee1c7d04a3f3288ca3c1ada43 WHIRLPOOL 532ea421fab965094820d5c0961a00ca38c858461f572a0cd4a145aa90340a569ee942062338ae03773c2709a08e4882f3176333aa5383b7e3c467cb01c0874d
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
-iQEcBAEBCAAGBQJUZPt+AAoJEAmJmMX429reNZYH/2Gkt8C7gxS21/boFfAJwM/0
-9Pk9dskTOicyKo0Or2Nj5GwL0F6QEitocVZHEP9YKSm52z/dwukj1N1j6F1PG5Ft
-c0gIv9qwVj9zL0tHbvvTy2YauYHduvZPH5Qr3eA2UXdMqy4zL0KwgoN7LcJkBS3d
-ydPiOIHI7DZWPJuJM7+fg9mTMopMBdWW6SWdsub8rJ21n+oJ9Ht/zZyWVPOx0epD
-F52VBWr7j37ckY3ptm3hCGf2kC3XFpVoG1KXnrcbmbAmYiuWhGVowjGpHpvAUTaB
-iO0qWrLfww/+xSTUBA2hDTzKjfo+KmapUfDCsRLvpJRM00DttS1X3y/MKWnBMtE=
-=ympP
+iQEcBAEBCAAGBQJUa6dbAAoJEPATRTHh2/q1TQQIAJfOzH4NeVjTtWhnZwe8LjKe
+xb8ZJ0XRe7tAdaHo+EJs4sfPgm4SFlR7roVREZXPQEb5zjiyqxpQXyGWhsLrSuu3
+R03cy42wXEDApKFXfYnAuN0Ti288APGb7K+kHVCgMSTnOgP9ebZhyKtIKsYct/gu
+U838hQMxuvPLxi1wxraH1lJh85W8DU4D1YOUwnK893xYV6s71Aoq1PEmM7VPpIJs
+uptVXB463PUmKb9Vqj1YNuCz+lS5TQGn1NU+8Let+eb8uJVA8mFtnZ2WfA1N03hT
+4aHh+Th0PzZCdcMPMmpdYk2VOyrq8Wn8Wsd0sAudv6mAa32/Fwnu9Cryqs+SZMA=
+=ki6i
 -----END PGP SIGNATURE-----
diff --git a/sys-kernel/dracut/dracut-040-r2.ebuild b/sys-kernel/dracut/dracut-040-r2.ebuild
new file mode 100644 (file)
index 0000000..7707179
--- /dev/null
@@ -0,0 +1,271 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-040-r2.ebuild,v 1.1 2014/11/18 20:08:58 aidecoe Exp $
+
+EAPI=4
+
+inherit bash-completion-r1 eutils linux-info multilib systemd
+
+DESCRIPTION="Generic initramfs generation tool"
+HOMEPAGE="http://dracut.wiki.kernel.org"
+SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.xz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug selinux systemd"
+
+RESTRICT="test"
+
+CDEPEND="virtual/udev
+       systemd? ( >=sys-apps/systemd-199 )
+       "
+RDEPEND="${CDEPEND}
+       app-arch/cpio
+       >=app-shells/bash-4.0
+       >sys-apps/kmod-5[tools]
+       || ( >=sys-apps/sysvinit-2.87-r3 sys-apps/systemd-sysv-utils )
+       >=sys-apps/util-linux-2.21
+
+       debug? ( dev-util/strace )
+       selinux? (
+               sys-libs/libselinux
+               sys-libs/libsepol
+               sec-policy/selinux-dracut
+       )
+       "
+DEPEND="${CDEPEND}
+       app-text/asciidoc
+       >=dev-libs/libxslt-1.1.26
+       app-text/docbook-xml-dtd:4.5
+       >=app-text/docbook-xsl-stylesheets-1.75.2
+       virtual/pkgconfig
+       "
+
+DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules
+       README.testsuite TODO )
+MY_LIBDIR=/usr/lib
+PATCHES=(
+       "${FILESDIR}/${PV}-0001-dracut-functions.sh-support-for-altern.patch"
+       "${FILESDIR}/${PV}-0002-gentoo.conf-let-udevdir-be-handled-by-.patch"
+       "${FILESDIR}/${PV}-0003-Use-the-same-paths-in-dracut.sh-as-tho.patch"
+       "${FILESDIR}/${PV}-0005-NEWS-add-040-entry.patch"
+       "${FILESDIR}/${PV}-0006-Don-t-pass-rsyncable-option-to-gzip-Ge.patch"
+       )
+QA_MULTILIB_PATHS="
+    usr/lib/dracut/dracut-install
+    usr/lib/dracut/skipcpio
+    "
+
+#
+# Helper functions
+#
+
+# Removes module from modules.d.
+# $1 = module name
+# Module name can be specified without number prefix.
+rm_module() {
+       local force m
+       [[ $1 = -f ]] && force=-f
+
+       for m in $@; do
+               if [[ $m =~ ^[0-9][0-9][^\ ]*$ ]]; then
+                       rm ${force} --interactive=never -r "${modules_dir}"/$m
+               else
+                       rm ${force} --interactive=never -r "${modules_dir}"/[0-9][0-9]$m
+               fi
+       done
+}
+
+# Grabbed from net-misc/netctl ebuild.
+optfeature() {
+       local desc=$1
+       shift
+       while (( $# )); do
+               if has_version "$1"; then
+                       elog "  [I] $1 to ${desc}"
+               else
+                       elog "  [ ] $1 to ${desc}"
+               fi
+               shift
+       done
+}
+
+#
+# ebuild functions
+#
+
+src_prepare() {
+       epatch "${PATCHES[@]}"
+
+       local libdirs="/$(get_libdir) /usr/$(get_libdir)"
+       if [[ ${SYMLINK_LIB} = yes ]]; then
+               # Preserve lib -> lib64 symlinks in initramfs
+               [[ $libdirs =~ /lib\  ]] || libdirs+=" /lib /usr/lib"
+       fi
+       einfo "Setting libdirs to \"${libdirs}\" ..."
+       sed -e "3alibdirs=\"${libdirs}\"" \
+               -i "${S}/dracut.conf.d/gentoo.conf.example" || die
+
+       local udevdir="$("$(tc-getPKG_CONFIG)" udev --variable=udevdir)"
+       einfo "Setting udevdir to ${udevdir}..."
+       sed -r -e "s|^(udevdir=).*$|\1${udevdir}|" \
+                       -i "${S}/dracut.conf.d/gentoo.conf.example" || die
+
+       if use systemd; then
+               local systemdutildir="$(systemd_get_utildir)"
+               local systemdsystemunitdir="$(systemd_get_unitdir)"
+               local systemdsystemconfdir="$("$(tc-getPKG_CONFIG)" systemd \
+                       --variable=systemdsystemconfdir)"
+               [[ ${systemdsystemconfdir} ]] \
+                       || systemdsystemconfdir=/etc/systemd/system
+               einfo "Setting systemdutildir to ${systemdutildir} and ..."
+               sed -e "5asystemdutildir=\"${systemdutildir}\"" \
+                       -i "${S}/dracut.conf.d/gentoo.conf.example" || die
+               einfo "Setting systemdsystemunitdir to ${systemdsystemunitdir} and..."
+               sed -e "6asystemdsystemunitdir=\"${systemdsystemunitdir}\"" \
+                       -i "${S}/dracut.conf.d/gentoo.conf.example" || die
+               einfo "Setting systemdsystemconfdir to ${systemdsystemconfdir}..."
+               sed -e "7asystemdsystemconfdir=\"${systemdsystemconfdir}\"" \
+                       -i "${S}/dracut.conf.d/gentoo.conf.example" || die
+       else
+               local systemdutildir="/lib/systemd"
+               einfo "Setting systemdutildir for standalone udev to" \
+                       "${systemdutildir}..."
+               sed -e "5asystemdutildir=\"${systemdutildir}\"" \
+                       -i "${S}/dracut.conf.d/gentoo.conf.example" || die
+       fi
+
+       epatch_user
+}
+
+src_configure() {
+       local myconf="--libdir=${MY_LIBDIR}"
+       myconf+=" --bashcompletiondir=$(get_bashcompdir)"
+
+       if use systemd; then
+               myconf+=" --systemdsystemunitdir='$(systemd_get_unitdir)'"
+       fi
+
+       econf ${myconf}
+}
+
+src_compile() {
+       tc-export CC
+       emake doc install/dracut-install skipcpio/skipcpio
+}
+
+src_install() {
+       default
+
+       local my_libdir="${MY_LIBDIR}"
+       local dracutlibdir="${my_libdir#/}/dracut"
+
+       echo "DRACUT_VERSION=$PVR" > "${D%/}/${dracutlibdir}/dracut-version.sh"
+
+       insinto "${dracutlibdir}/dracut.conf.d/"
+       newins dracut.conf.d/gentoo.conf.example gentoo.conf
+
+       insinto /etc/logrotate.d
+       newins dracut.logrotate dracut
+
+       dodir /var/lib/dracut/overlay
+
+       dohtml dracut.html
+
+       #
+       # Modules
+       #
+       local module
+       modules_dir="${D%/}/${dracutlibdir}/modules.d"
+
+       use debug || rm_module 95debug
+       use selinux || rm_module 98selinux
+
+       if use systemd; then
+               # With systemd following modules do not make sense
+               rm_module 96securityfs 97masterkey 98integrity
+       else
+               rm_module 98systemd
+               # Without systemd following modules do not make sense
+               rm_module 00systemd-bootchart
+       fi
+
+       # Remove modules which won't work for sure
+       rm_module 95fcoe # no tools
+       # fips module depends on masked app-crypt/hmaccalc
+       rm_module 01fips 02fips-aesni
+}
+
+pkg_postinst() {
+       if linux-info_get_any_version && linux_config_src_exists; then
+               ewarn ""
+               ewarn "If the following test report contains a missing kernel"
+               ewarn "configuration option, you should reconfigure and rebuild your"
+               ewarn "kernel before booting image generated with this Dracut version."
+               ewarn ""
+
+               local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS"
+
+               # Kernel configuration options descriptions:
+               local desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev"
+               local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\
+"(initramfs/initrd) support"
+
+               local opt desc
+
+               # Generate ERROR_* variables for check_extra_config.
+               for opt in ${CONFIG_CHECK}; do
+                       opt=${opt#\~}
+                       desc=desc_${opt}
+                       eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \
+                               "is missing and REQUIRED'"
+               done
+
+               check_extra_config
+               echo
+       else
+               ewarn ""
+               ewarn "Your kernel configuration couldn't be checked.  Do you have"
+               ewarn "/usr/src/linux/.config file there?  Please check manually if"
+               ewarn "following options are enabled:"
+               ewarn ""
+               ewarn "  CONFIG_BLK_DEV_INITRD"
+               ewarn "  CONFIG_DEVTMPFS"
+               ewarn ""
+       fi
+
+       elog "To get additional features, a number of optional runtime"
+       elog "dependencies may be installed:"
+       elog ""
+       optfeature "Networking support"  net-misc/curl "net-misc/dhcp[client]" \
+               sys-apps/iproute2
+       optfeature \
+               "Measure performance of the boot process for later visualisation" \
+               app-benchmarks/bootchart2 app-admin/killproc sys-process/acct
+       optfeature "Scan for Btrfs on block devices"  sys-fs/btrfs-progs
+       optfeature "Load kernel modules and drop this privilege for real init" \
+               sys-libs/libcap
+       optfeature "Support CIFS" net-fs/cifs-utils
+       optfeature "Decrypt devices encrypted with cryptsetup/LUKS" \
+               sys-fs/cryptsetup
+       optfeature "Support for GPG-encrypted keys for crypt module" \
+               app-crypt/gnupg
+       optfeature \
+               "Allows use of dash instead of default bash (on your own risk)" \
+               app-shells/dash
+       optfeature "Framebuffer splash (media-gfx/splashutils)" \
+               media-gfx/splashutils
+       optfeature "Support iSCSI" sys-block/open-iscsi
+       optfeature "Support Logical Volume Manager" sys-fs/lvm2
+       optfeature "Support MD devices, also known as software RAID devices" \
+               sys-fs/mdadm
+       optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools
+       optfeature "Plymouth boot splash"  '>=sys-boot/plymouth-0.8.5-r5'
+       optfeature "Support network block devices" sys-block/nbd
+       optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind
+       optfeature \
+               "Install ssh and scp along with config files and specified keys" \
+               net-misc/openssh
+       optfeature "Enable logging with syslog-ng or rsyslog" app-admin/syslog-ng \
+               app-admin/rsyslog
+}