diff options
-rw-r--r-- | app-editors/emacs-vcs/Manifest | 1 | ||||
-rw-r--r-- | app-editors/emacs/Manifest | 1 | ||||
-rw-r--r-- | app-editors/emacs/emacs-26.3.9999.ebuild | 8 | ||||
-rw-r--r-- | app-editors/emacs/emacs-27.0.50_pre20191220.ebuild (renamed from app-editors/emacs-vcs/emacs-vcs-27.0.50_pre20180831.ebuild) | 64 | ||||
-rw-r--r-- | app-editors/emacs/emacs-27.0.9999.ebuild | 8 | ||||
-rw-r--r-- | eclass/elisp-common.eclass | 95 | ||||
-rw-r--r-- | eclass/elisp.eclass | 18 | ||||
-rw-r--r-- | profiles/package.deprecated | 7 | ||||
-rw-r--r-- | profiles/prefix/sunos/solaris/package.mask | 4 | ||||
-rw-r--r-- | sys-cluster/slurm/Manifest | 1 | ||||
-rw-r--r-- | sys-cluster/slurm/slurm-19.05.5.1.ebuild | 266 |
11 files changed, 398 insertions, 75 deletions
diff --git a/app-editors/emacs-vcs/Manifest b/app-editors/emacs-vcs/Manifest deleted file mode 100644 index 93af8da7a5ef..000000000000 --- a/app-editors/emacs-vcs/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST emacs-27.0.50_pre20180831.tar.xz 28668124 BLAKE2B fae74d9885889b042142f580e971c73c193306dca26b42dd87ac3d3d765312ce6695511d7d31a047d79803982f6345c4c319a3d83cea1313080170da97482fa2 SHA512 43b32d8943dc897dfc0c1fddb4261a196d3a604add5bcf87a93748125f15db2cac762d3550d6593b80e961ae35d543adc4d5937bac77970c658f93dba26f17e4 diff --git a/app-editors/emacs/Manifest b/app-editors/emacs/Manifest index f748434c6d91..957c0f62c778 100644 --- a/app-editors/emacs/Manifest +++ b/app-editors/emacs/Manifest @@ -9,3 +9,4 @@ DIST emacs-25.3-patches-2.tar.xz 2488 BLAKE2B 93c6a18e7f729a5b4d299974581c99835e DIST emacs-25.3.tar.xz 42854740 BLAKE2B 4f4e2572bbef48b75c561497fc22046081e56099b6174725d79b15a5b16d5c886eaf8ff3f75cf561e989ebb092ab9e98ba7503e720a9db7560758b30d5116f23 SHA512 1cce656451b6ca8502ebb229e88bd3ef48b7f9444a10eeac4ea43bd5491b2efacd641dfa35227a33362c3866493d3449cf1df81606563eef44bba0ed668e457f DIST emacs-26.2.tar.xz 44406808 BLAKE2B 23c23958b177f032082fc5e71ebccc4a88c10b19258ec22608d7bade37dc58d5f8aa4a74e86114c72ea8be8fc299b6c9af5af283f28bd7e965830e587f1bdc93 SHA512 c223ff5c51ca8bdf887bacb2dc37b08a637d39ed6f887cc24f67397e46fe5fdb68f33f21b97300b985c749f32aa09080d33103271637ed4ce5d9f2ea34ce9fe1 DIST emacs-26.3.tar.xz 44415140 BLAKE2B aa8434e6431992ee40402f03a890dd2c49784ee76f437888efe61d66b9aa2bdb816eb0bfe1055e9e154a8bb3ed065fee71623741b474d465a96964618ec775e3 SHA512 4d5a4319253afb081e105a3697eb6eeb8d8a0da18cd41346e376ca5af1e180a26e641f76c64fad1b0253168f14a511f0a4d9d4141524fb1cf4d04f25b05a76e9 +DIST emacs-27.0.50_pre20191220.tar.xz 29157508 BLAKE2B bc23aab93420f79848b2aa5b2c55b295f410229209da7a1961afc8151197ab0d14bbf21ebd5e09e12ecf715483c086818ea9dd1073d08344c965c84a703534a1 SHA512 560f3ed4d1b24783452b35ed12146223f035552b0e5f4fa9aafda7217977ca441918cc90a4c634645e4a574299e371cdb5e17902b441b0a408dce1b1094ec26a diff --git a/app-editors/emacs/emacs-26.3.9999.ebuild b/app-editors/emacs/emacs-26.3.9999.ebuild index fee89cd99f71..f96b5e9d1ad1 100644 --- a/app-editors/emacs/emacs-26.3.9999.ebuild +++ b/app-editors/emacs/emacs-26.3.9999.ebuild @@ -113,14 +113,10 @@ RDEPEND="sys-libs/ncurses:0= DEPEND="${RDEPEND} X? ( x11-base/xorg-proto )" -BDEPEND="virtual/pkgconfig +BDEPEND="sys-apps/texinfo + virtual/pkgconfig gzip-el? ( app-arch/gzip )" -if [[ ${PV##*.} = 9999 ]]; then - BDEPEND="${BDEPEND} - sys-apps/texinfo" -fi - RDEPEND="${RDEPEND} !app-editors/emacs-vcs:26" diff --git a/app-editors/emacs-vcs/emacs-vcs-27.0.50_pre20180831.ebuild b/app-editors/emacs/emacs-27.0.50_pre20191220.ebuild index 3ca4a8cc86ad..46906649a62f 100644 --- a/app-editors/emacs-vcs/emacs-vcs-27.0.50_pre20180831.ebuild +++ b/app-editors/emacs/emacs-27.0.50_pre20191220.ebuild @@ -12,9 +12,8 @@ if [[ ${PV##*.} = 9999 ]]; then EGIT_CHECKOUT_DIR="${WORKDIR}/emacs" S="${EGIT_CHECKOUT_DIR}" else - SRC_URI="https://dev.gentoo.org/~ulm/distfiles/emacs-${PV}.tar.xz - mirror://gnu-alpha/emacs/pretest/emacs-${PV}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" + SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz + mirror://gnu-alpha/emacs/pretest/${P}.tar.xz" # FULL_VERSION keeps the full version number, which is needed in # order to determine some path information correctly for copy/move # operations later on @@ -27,8 +26,8 @@ DESCRIPTION="The extensible, customizable, self-documenting real-time display ed HOMEPAGE="https://www.gnu.org/software/emacs/" LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" -SLOT="27" -IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk gtk2 gzip-el imagemagick +inotify jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm xwidgets zlib" +SLOT="27-vcs" +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk gtk2 gzip-el harfbuzz imagemagick +inotify jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm xwidgets zlib" REQUIRED_USE="?? ( aqua X )" RESTRICT="test" @@ -77,6 +76,7 @@ RDEPEND="sys-libs/ncurses:0= x11-libs/libXft x11-libs/libXrender cairo? ( >=x11-libs/cairo-1.12.18 ) + harfbuzz? ( media-libs/harfbuzz:0= ) m17n-lib? ( >=dev-libs/libotf-0.9.4 >=dev-libs/m17n-lib-1.5.1 @@ -117,16 +117,15 @@ RDEPEND="sys-libs/ncurses:0= DEPEND="${RDEPEND} X? ( x11-base/xorg-proto )" -BDEPEND="virtual/pkgconfig +BDEPEND="sys-apps/texinfo + virtual/pkgconfig gzip-el? ( app-arch/gzip )" -if [[ ${PV##*.} = 9999 ]]; then - BDEPEND="${BDEPEND} - sys-apps/texinfo" -fi +RDEPEND="${RDEPEND} + !app-editors/emacs-vcs:27" -EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}" -SITEFILE="20${PN}-${SLOT}-gentoo.el" +EMACS_SUFFIX="emacs-${SLOT}" +SITEFILE="20${EMACS_SUFFIX}-gentoo.el" src_prepare() { if [[ ${PV##*.} = 9999 ]]; then @@ -143,8 +142,7 @@ src_prepare() { eapply_user # Fix filename reference in redirected man page - sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \ - || die "unable to sed ctags.1" + sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 || die AT_M4DIR=m4 eautoreconf } @@ -187,6 +185,7 @@ src_configure() { if use xft; then myconf+=" --with-xft" myconf+=" $(use_with cairo)" + myconf+=" $(use_with harfbuzz)" myconf+=" $(use_with m17n-lib libotf)" myconf+=" $(use_with m17n-lib m17n-flt)" else @@ -252,12 +251,14 @@ src_configure() { econf \ --program-suffix="-${EMACS_SUFFIX}" \ + --includedir="${EPREFIX}"/usr/include/${EMACS_SUFFIX} \ --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \ --localstatedir="${EPREFIX}"/var \ --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \ --without-compress-install \ --without-hesiod \ --without-pop \ + --with-dumping=pdumper \ --with-file-notification=$(usev inotify || usev gfile || echo no) \ $(use_enable acl) \ $(use_with dbus) \ @@ -279,22 +280,20 @@ src_configure() { ${myconf} } -src_compile() { - # Disable sandbox when dumping. For the unbelievers, see bug #131505 - emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs" -} +#src_compile() { +# # Disable sandbox when dumping. For the unbelievers, see bug #131505 +# emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs" +#} src_install () { emake DESTDIR="${D}" NO_BIN_LINK=t install - mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} \ - || die "moving emacs executable failed" - mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 \ - || die "moving emacs man page failed" + mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} || die + mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die + mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.appdata.xml || die # move info dir to avoid collisions with the dir file generated by portage - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \ - || die "moving info dir failed" + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig @@ -310,6 +309,15 @@ src_install () { # remove COPYING file (except for etc/COPYING used by describe-copying) rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING + if use systemd; then + insinto /usr/lib/systemd/user + sed -e "/^##/d" \ + -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \ + -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \ + etc/emacs.service | newins - ${EMACS_SUFFIX}.service + assert + fi + if use gzip-el; then # compress .el files when a corresponding .elc exists find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \ @@ -330,7 +338,7 @@ src_install () { sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die X - ;;; ${PN}-${SLOT} site-lisp configuration + ;;; ${EMACS_SUFFIX} site-lisp configuration X (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) Y (setq find-function-C-source-directory @@ -352,9 +360,9 @@ src_install () { if use aqua; then dodir /Applications/Gentoo - rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app + rm -rf "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app mv nextstep/Emacs.app \ - "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die + "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die fi DOC_CONTENTS="You can set the version to be started by /usr/bin/emacs @@ -369,7 +377,7 @@ src_install () { machine would satisfy basic Emacs requirements under X11. See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs for how to enable anti-aliased fonts." - use aqua && DOC_CONTENTS+="\\n\\nEmacs${EMACS_SUFFIX#emacs}.app is in + use aqua && DOC_CONTENTS+="\\n\\n${EMACS_SUFFIX^}.app is in \"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink it into /Applications by yourself." readme.gentoo_create_doc diff --git a/app-editors/emacs/emacs-27.0.9999.ebuild b/app-editors/emacs/emacs-27.0.9999.ebuild index c46195dfd43c..46906649a62f 100644 --- a/app-editors/emacs/emacs-27.0.9999.ebuild +++ b/app-editors/emacs/emacs-27.0.9999.ebuild @@ -117,14 +117,10 @@ RDEPEND="sys-libs/ncurses:0= DEPEND="${RDEPEND} X? ( x11-base/xorg-proto )" -BDEPEND="virtual/pkgconfig +BDEPEND="sys-apps/texinfo + virtual/pkgconfig gzip-el? ( app-arch/gzip )" -if [[ ${PV##*.} = 9999 ]]; then - BDEPEND="${BDEPEND} - sys-apps/texinfo" -fi - RDEPEND="${RDEPEND} !app-editors/emacs-vcs:27" diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass index 05b03f493957..aac50fc65f05 100644 --- a/eclass/elisp-common.eclass +++ b/eclass/elisp-common.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: elisp-common.eclass @@ -23,26 +23,25 @@ # When relying on the emacs USE flag, you need to add # # @CODE -# emacs? ( virtual/emacs ) +# emacs? ( >=app-editors/emacs-23.1:* ) # @CODE # # to your DEPEND/RDEPEND line and use the functions provided here to # bring the files to the correct locations. # -# If your package requires a minimum Emacs version, e.g. Emacs 24, then -# the dependency should be on >=virtual/emacs-24 instead. Because the -# user can select the Emacs executable with eselect, you should also -# make sure that the active Emacs version is sufficient. This can be -# tested with function elisp-need-emacs(), which would typically be -# called from pkg_setup(), as in the following example: +# If your package requires a minimum Emacs version, e.g. Emacs 26.1, +# then the dependency should be on >=app-editors/emacs-26.1:* instead. +# Because the user can select the Emacs executable with eselect, you +# should also make sure that the active Emacs version is sufficient. +# The eclass will automatically ensure this if you assign variable +# NEED_EMACS with the Emacs version, as in the following example: # # @CODE -# elisp-need-emacs 24 || die "Emacs version too low" +# NEED_EMACS=26.1 # @CODE # -# Please note that such tests should be limited to packages that are -# known to fail with lower Emacs versions; the standard case is to -# depend on virtual/emacs without version. +# Please note that this should be done only for packages that are known +# to fail with lower Emacs versions. # # @ROFF .SS # src_compile() usage: @@ -134,6 +133,20 @@ # the differing name as second argument. # # @ROFF .SS +# pkg_setup() usage: +# +# If your ebuild uses the elisp-compile eclass function to compile +# its elisp files (see above), then you don't need a pkg_setup phase, +# because elisp-compile and elisp-make-autoload-file do their own sanity +# checks. On the other hand, if the elisp files are compiled by the +# package's build system, then there is often no check for the Emacs +# version. In this case, you can add an explicit check in pkg_setup: +# +# @CODE +# elisp-check-emacs-version +# @CODE +# +# @ROFF .SS # pkg_postinst() / pkg_postrm() usage: # # After that you need to recreate the start-up file of Emacs after @@ -151,10 +164,12 @@ # # When having optional Emacs support, you should prepend "use emacs &&" # to above calls of elisp-site-regen(). -# Don't use "has_version virtual/emacs"! When unmerging the state of -# the emacs USE flag is taken from the package database and not from the -# environment, so it is no problem when you unset USE=emacs between -# merge and unmerge of a package. + +case ${EAPI:-0} in + 4|5|6) inherit eapi7-ver ;; + 7) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac # @ECLASS-VARIABLE: SITELISP # @DESCRIPTION: @@ -182,6 +197,17 @@ EMACSFLAGS="-batch -q --no-site-file" # Emacs flags used for byte-compilation in elisp-compile(). BYTECOMPFLAGS="-L ." +# @ECLASS-VARIABLE: NEED_EMACS +# @DESCRIPTION: +# The minimum Emacs version required for the package. +: ${NEED_EMACS:=23.1} + +# @ECLASS-VARIABLE: _ELISP_EMACS_VERSION +# @INTERNAL +# @DESCRIPTION: +# Cached value of Emacs version detected in elisp-check-emacs-version(). +_ELISP_EMACS_VERSION="" + # @FUNCTION: elisp-emacs-version # @RETURN: exit status of Emacs # @DESCRIPTION: @@ -212,12 +238,39 @@ elisp-emacs-version() { echo "${version}" } -# @FUNCTION: elisp-need-emacs -# @USAGE: <version> -# @RETURN: 0 if true, 1 if false, 2 if trouble +# @FUNCTION: elisp-check-emacs-version +# @USAGE: [version] # @DESCRIPTION: +# Test if the eselected Emacs version is at least the version of +# GNU Emacs specified in the NEED_EMACS variable, or die otherwise. + +elisp-check-emacs-version() { + if [[ -z ${_ELISP_EMACS_VERSION} ]]; then + local have_emacs + have_emacs=$(elisp-emacs-version) \ + || die "Could not determine Emacs version" + elog "Emacs version: ${have_emacs}" + if [[ ${have_emacs} =~ XEmacs|Lucid ]]; then + die "XEmacs detected. This package needs GNU Emacs." + fi + # GNU Emacs versions have only numeric components. + if ! [[ ${have_emacs} =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + die "Malformed version string: ${have_emacs}" + fi + _ELISP_EMACS_VERSION=${have_emacs} + fi + + if ! ver_test "${_ELISP_EMACS_VERSION}" -ge "${NEED_EMACS}"; then + eerror "This package needs at least Emacs ${NEED_EMACS}." + eerror "Use \"eselect emacs\" to select the active version." + die "Emacs version too low" + fi +} + # Test if the eselected Emacs version is at least the major version # of GNU Emacs specified as argument. +# Return 0 if true, 1 if false, 2 if trouble. +# Deprecated, use elisp-check-emacs-version instead. elisp-need-emacs() { local need_emacs=$1 have_emacs @@ -249,6 +302,8 @@ elisp-need-emacs() { # in case they require or load one another. elisp-compile() { + elisp-check-emacs-version + ebegin "Compiling GNU Emacs Elisp files" ${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} -f batch-byte-compile "$@" eend $? "elisp-compile: batch-byte-compile failed" || die @@ -262,6 +317,8 @@ elisp-compile() { elisp-make-autoload-file() { local f="${1:-${PN}-autoloads.el}" null="" page=$'\f' shift + elisp-check-emacs-version + ebegin "Generating autoload file for GNU Emacs" cat >"${f}" <<-EOF diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass index df160ea01e22..a411f602cf7c 100644 --- a/eclass/elisp.eclass +++ b/eclass/elisp.eclass @@ -30,8 +30,8 @@ # @DEFAULT_UNSET # @DESCRIPTION: # If you need anything different from Emacs 23, use the NEED_EMACS -# variable before inheriting elisp.eclass. Set it to the major version -# your package uses and the dependency will be adjusted. +# variable before inheriting elisp.eclass. Set it to the version your +# package uses and the dependency will be adjusted. # @ECLASS-VARIABLE: ELISP_PATCHES # @DEFAULT_UNSET @@ -70,24 +70,20 @@ esac EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \ pkg_{setup,postinst,postrm} -RDEPEND=">=virtual/emacs-${NEED_EMACS:-23}" +RDEPEND=">=app-editors/emacs-${NEED_EMACS}:*" case ${EAPI} in - 4|5|6) DEPEND="${RDEPEND}" ;; + 4) RDEPEND="${RDEPEND%:*}"; DEPEND="${RDEPEND}" ;; + 5|6) DEPEND="${RDEPEND}" ;; *) BDEPEND="${RDEPEND}" ;; esac # @FUNCTION: elisp_pkg_setup # @DESCRIPTION: -# Test if the eselected Emacs version is sufficient to fulfil the major +# Test if the eselected Emacs version is sufficient to fulfil the # version requirement of the NEED_EMACS variable. elisp_pkg_setup() { - elisp-need-emacs "${NEED_EMACS:-23}" - case $? in - 0) ;; - 1) die "Emacs version too low" ;; - *) die "Could not determine Emacs version" ;; - esac + elisp-check-emacs-version } # @FUNCTION: elisp_src_unpack diff --git a/profiles/package.deprecated b/profiles/package.deprecated index 4c450d93c647..b8e9ab16922a 100644 --- a/profiles/package.deprecated +++ b/profiles/package.deprecated @@ -17,6 +17,13 @@ #--- END OF EXAMPLES --- +# Ulrich Müller <ulm@gentoo.org> (2019-12-21) +# Live ebuilds for Emacs from Git have been consolidated into the +# app-editors/emacs package, which makes the virtual unnecessary. +# Packages should depend on >=app-editors/emacs-23.1:* instead. +# See the documentation of elisp-common.eclass for details. +virtual/emacs + # Michał Górny <mgorny@gentoo.org> (2019-12-09) # The pycrypto project is long dead, and has been forked into # dev-python/pycryptodome that's not entirely API compatible. Many diff --git a/profiles/prefix/sunos/solaris/package.mask b/profiles/prefix/sunos/solaris/package.mask index e830b8ac3e2b..db66b4271b67 100644 --- a/profiles/prefix/sunos/solaris/package.mask +++ b/profiles/prefix/sunos/solaris/package.mask @@ -22,10 +22,6 @@ dev-libs/libelf # Fails to compile, and not worth fixing, bug #379723 =sys-devel/gcc-4.3.6* -# Fabian Groffen <grobian@gentoo.org> (2009-11-29) -# segfaults during compilation, bug #294479 -=virtual/emacs-23 - # Fabian Groffen <grobian@gentoo.org> (2007-01-21) # doesn't understand arguments on Solaris =dev-vcs/cvs-1.12.12* diff --git a/sys-cluster/slurm/Manifest b/sys-cluster/slurm/Manifest index acf204239f10..8bb13bbfd2ab 100644 --- a/sys-cluster/slurm/Manifest +++ b/sys-cluster/slurm/Manifest @@ -1 +1,2 @@ DIST slurm-19-05-4-1.tar.gz 8446001 BLAKE2B d3b1524a72d7969b14788b93c7d64b03faf159b71b1ed8fb30782980b7b39e9f4a1d1435f4fbdce722ed9585e7d3285f9a84322c5a5d2f44d5e084bb38019ae4 SHA512 ecee26b23fc72ea4b6eb3039aada1814b5932d75eaf61501a31b97ac8f7b600864f2429a36de068f1f1cde178fa1383f2c53192af5b1a62766e3ffe48be4395c +DIST slurm-19-05-5-1.tar.gz 8447611 BLAKE2B 052d6a9c7e196546a2a7ca0c8e324d3728177e06a6b82150d6888cf5f6aa4b0f6612e09e928b2224be412971b4e40318d3b03e27068ed7c2256036a417ebf9c5 SHA512 612ce1c476de3d08d4003c48df65883880e697652ef8b0847cd87719e91196f489409b27c67ef040ab9ffe0c9d824cdae6441608e9af9619abcf11ebf0d464be diff --git a/sys-cluster/slurm/slurm-19.05.5.1.ebuild b/sys-cluster/slurm/slurm-19.05.5.1.ebuild new file mode 100644 index 000000000000..925771131f48 --- /dev/null +++ b/sys-cluster/slurm/slurm-19.05.5.1.ebuild @@ -0,0 +1,266 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="https://github.com/SchedMD/slurm.git" + INHERIT_GIT="git-r3" + SRC_URI="" + KEYWORDS="" + MY_P="${P}" +else + if [[ ${PV} == *pre* || ${PV} == *rc* ]]; then + MY_PV=$(ver_rs '-0.') # pre-releases or release-candidate + else + MY_PV=$(ver_rs 1-3 '-') # stable releases + fi + MY_P="${PN}-${MY_PV}" + INHERIT_GIT="" + SRC_URI="https://github.com/SchedMD/slurm/archive/${MY_P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +inherit autotools bash-completion-r1 pam perl-module prefix toolchain-funcs systemd ${INHERIT_GIT} + +DESCRIPTION="A Highly Scalable Resource Manager" +HOMEPAGE="https://www.schedmd.com https://github.com/SchedMD/slurm" + +LICENSE="GPL-2" +SLOT="0" +IUSE="debug hdf5 html ipmi json lua multiple-slurmd +munge mysql netloc numa ofed pam perl slurmdbd static-libs ucx torque X" + +COMMON_DEPEND=" + !sys-cluster/torque + !net-analyzer/slurm + !net-analyzer/sinfo + || ( sys-cluster/pmix[-pmi] >=sys-cluster/openmpi-2.0.0 ) + mysql? ( + || ( dev-db/mariadb-connector-c dev-db/mysql-connector-c ) + slurmdbd? ( || ( dev-db/mariadb dev-db/mysql ) ) + ) + munge? ( sys-auth/munge ) + pam? ( sys-libs/pam ) + lua? ( dev-lang/lua:0= ) + !lua? ( !dev-lang/lua ) + ipmi? ( sys-libs/freeipmi ) + json? ( dev-libs/json-c:= ) + amd64? ( netloc? ( sys-apps/netloc ) ) + hdf5? ( sci-libs/hdf5:= ) + numa? ( sys-process/numactl ) + ofed? ( sys-fabric/ofed ) + ucx? ( sys-cluster/ucx ) + X? ( net-libs/libssh2 ) + >=sys-apps/hwloc-1.1.1-r1 + sys-libs/ncurses:0= + app-arch/lz4:0= + sys-libs/readline:0=" +DEPEND="${COMMON_DEPEND} + html? ( sys-apps/man2html )" +RDEPEND="${OMMON_DEPEND} + acct-user/slurm + acct-group/slurm + dev-libs/libcgroup" + +REQUIRED_USE="torque? ( perl )" + +S="${WORKDIR}/${PN}-${MY_P}" + +LIBSLURM_PERL_S="${S}/contribs/perlapi/libslurm/perl" +LIBSLURMDB_PERL_S="${S}/contribs/perlapi/libslurmdb/perl" + +RESTRICT="test" + +src_unpack() { + if [[ ${PV} == *9999* ]]; then + git-r3_src_unpack + else + default + fi +} + +src_prepare() { + tc-ld-disable-gold + eapply "${FILESDIR}"/disable-sview.patch + eautoreconf + default + + # pids should go to /var/run/slurm + sed \ + -e 's:/tmp:/var/tmp:g' \ + -e "s:/var/run/slurmctld.pid:${EPREFIX}/run/slurm/slurmctld.pid:g" \ + -e "s:/var/run/slurmd.pid:${EPREFIX}/run/slurm/slurmd.pid:g" \ + -e "s:StateSaveLocation=.*:StateSaveLocation=${EPREFIX}/var/spool/slurm:g" \ + -e "s:SlurmdSpoolDir=.*:SlurmdSpoolDir=${EPREFIX}/var/spool/slurm/slurmd:g" \ + -i "${S}/etc/slurm.conf.example" \ + || die "Can't sed for /var/run/slurmctld.pid" + sed \ + -e "s:/var/run/slurmdbd.pid:${EPREFIX}/run/slurm/slurmdbd.pid:g" \ + -i "${S}/etc/slurmdbd.conf.example" \ + || die "Can't sed for /var/run/slurmdbd.pid" + # gentooify systemd services + sed \ + -e 's:sysconfig/.*:conf.d/slurm:g' \ + -e 's:var/run/:run/slurm/:g' \ + -e '/^EnvironmentFile=.*/d' \ + -i "${S}/etc"/*.service.in \ + || die "Can't sed systemd services for sysconfig or var/run/" + + hprefixify auxdir/{ax_check_zlib,x_ac_{lz4,ofed,munge}}.m4 + eautoreconf +} + +src_configure() { + local myconf=( + --sysconfdir="${EPREFIX}/etc/${PN}" + --with-hwloc="${EPREFIX}/usr" + --docdir="${EPREFIX}/usr/share/doc/${P}" + --htmldir="${EPREFIX}/usr/share/doc/${P}" + ) + use pam && myconf+=( --with-pam_dir=$(getpam_mod_dir) ) + use mysql || myconf+=( --without-mysql_config ) + use amd64 && myconf+=( $(use_with netloc) ) + econf "${myconf[@]}" \ + $(use_enable debug) \ + $(use_enable pam) \ + $(use_enable X x11) \ + $(use_with munge) \ + $(use_with json) \ + $(use_with hdf5) \ + $(use_with ofed) \ + $(use_with ucx) \ + $(use_enable static-libs static) \ + $(use_enable multiple-slurmd) + + # --htmldir does not seems to propagate... Documentations are installed + # in /usr/share/doc/slurm-2.3.0/html + # instead of /usr/share/doc/slurm-2.3.0.2/html + sed \ + -e "s|htmldir = .*/html|htmldir = \${prefix}/share/doc/slurm-${PVR}/html|g" \ + -i doc/html/Makefile || die + if use perl ; then + # small hack to make it compile + mkdir -p "${S}/src/api/.libs" || die + mkdir -p "${S}/src/db_api/.libs" || die + touch "${S}/src/api/.libs/libslurm.so" || die + touch "${S}/src/db_api/.libs/libslurmdb.so" || die + cd "${LIBSLURM_PERL_S}" || die + S="${LIBSLURM_PERL_S}" SRC_PREP="no" perl-module_src_configure + cd "${LIBSLURMDB_PERL_S}" || die + S="${LIBSLURMDB_PERL_S}" SRC_PREP="no" perl-module_src_configure + cd "${S}" || die + rm -rf "${S}/src/api/.libs" "${S}/src/db_api/.libs" || die + fi +} + +src_compile() { + default + use pam && emake -C contribs/pam + if use perl ; then + cd "${LIBSLURM_PERL_S}" || die + S="${LIBSLURM_PERL_S}" perl-module_src_compile + cd "${LIBSLURMDB_PERL_S}" || die + S="${LIBSLURMDB_PERL_S}" perl-module_src_compile + cd "${S}" || die + fi + use torque && emake -C contribs/torque +} + +src_install() { + default + use pam && emake DESTDIR="${D}" -C contribs/pam install + if use perl; then + cd "${LIBSLURM_PERL_S}" || die + S="${LIBSLURM_PERL_S}" perl-module_src_install + cd "${LIBSLURMDB_PERL_S}" || die + S="${LIBSLURMDB_PERL_S}" perl-module_src_install + cd "${S}" || die + fi + if use torque; then + emake DESTDIR="${D}" -C contribs/torque + rm -f "${D}"/usr/bin/mpiexec || die + fi + use static-libs || find "${ED}" -name '*.la' -exec rm {} + + # install sample configs + keepdir /etc/slurm + insinto /etc/slurm + doins \ + etc/prolog.example \ + etc/cgroup.conf.example \ + etc/slurm.conf.example \ + etc/slurmdbd.conf.example + exeinto /etc/slurm + keepdir /etc/slurm/layouts.d + insinto /etc/slurm/layouts.d + newins etc/layouts.d.power.conf.example power.conf.example + newins etc/layouts.d.power_cpufreq.conf.example power_cpufreq.conf.example + newins etc/layouts.d.unit.conf.example unit.conf.example + # install init.d files + newinitd "$(prefixify_ro "${FILESDIR}/slurmd.initd")" slurmd + newinitd "$(prefixify_ro "${FILESDIR}/slurmctld.initd")" slurmctld + newinitd "$(prefixify_ro "${FILESDIR}/slurmdbd.initd")" slurmdbd + # install conf.d files + newconfd "${FILESDIR}/slurm.confd" slurm + # install logrotate file + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotate" slurm + # install bashcomp + newbashcomp contribs/slurm_completion_help/slurm_completion.sh scontrol + bashcomp_alias scontrol \ + sreport sacctmgr squeue scancel sshare sbcast sinfo \ + sprio sacct salloc sbatch srun sattach sdiag sstat + # install systemd files + systemd_newtmpfilesd "${FILESDIR}/slurm.tmpfiles" slurm.conf + systemd_dounit etc/slurmd.service etc/slurmctld.service etc/slurmdbd.service +} + +pkg_preinst() { + if use munge; then + sed -i 's,\(SLURM_USE_MUNGE=\).*,\11,' "${D}"/etc/conf.d/slurm || die + fi +} + +create_folders_and_fix_permissions() { + einfo "Fixing permissions in ${@}" + mkdir -p ${@} || die + chown -R ${PN}:${PN} ${@} || die +} + +pkg_postinst() { + paths=( + "${EROOT}"/var/${PN}/checkpoint + "${EROOT}"/var/${PN} + "${EROOT}"/var/spool/${PN}/slurmd + "${EROOT}"/var/spool/${PN} + "${EROOT}"/var/log/${PN} + /var/tmp/${PN}/${PN}d + /var/tmp/${PN} + /run/${PN} + ) + local folder_path + for folder_path in ${paths[@]}; do + create_folders_and_fix_permissions $folder_path + done + echo + + elog "Please visit the file '/usr/share/doc/${P}/html/configurator.html" + elog "through a (javascript enabled) browser to create a configureation file." + elog "Copy that file to /etc/slurm/slurm.conf on all nodes (including the headnode) of your cluster." + echo + elog "For cgroup support, please see https://www.schedmd.com/slurmdocs/cgroup.conf.html" + elog "Your kernel must be compiled with the wanted cgroup feature:" + elog " For the proctrack plugin:" + elog " freezer" + elog " For the task plugin:" + elog " cpuset, memory, devices" + elog " For the accounting plugin:" + elog " cpuacct, memory, blkio" + elog "Then, set these options in /etc/slurm/slurm.conf:" + elog " ProctrackType=proctrack/cgroup" + elog " TaskPlugin=task/cgroup" + einfo + ewarn "Paths were created for slurm. Please use these paths in /etc/slurm/slurm.conf:" + for folder_path in ${paths[@]}; do + ewarn " ${folder_path}" + done +} |