From 07ed1680683c40f066b6decf0521fc103114b1d7 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 29 Dec 2016 15:11:28 +0100 Subject: [PATCH] committing changes in /etc after emerge run Package changes: +sys-apps/baselayout-java-0.1.0 --- .etckeeper | 4 ++++ env.d/20java-config | 1 + portage/world | 1 + profile.d/java-config-2.csh | 21 +++++++++++++++++++++ profile.d/java-config-2.sh | 33 +++++++++++++++++++++++++++++++++ revdep-rebuild/60-java | 9 +++++++++ 6 files changed, 69 insertions(+) create mode 100644 env.d/20java-config create mode 100644 profile.d/java-config-2.csh create mode 100644 profile.d/java-config-2.sh create mode 100644 revdep-rebuild/60-java diff --git a/.etckeeper b/.etckeeper index c495057..6963be9 100755 --- a/.etckeeper +++ b/.etckeeper @@ -244,6 +244,7 @@ maybe chmod 0644 'env.d/00manpager' maybe chmod 0644 'env.d/04gcc-x86_64-pc-linux-gnu' maybe chmod 0644 'env.d/05binutils' maybe chmod 0644 'env.d/09sandbox' +maybe chmod 0644 'env.d/20java-config' maybe chmod 0644 'env.d/20php5.6' maybe chmod 0644 'env.d/30gnupg' maybe chmod 0644 'env.d/37fontconfig' @@ -687,6 +688,8 @@ maybe chmod 0644 'profile' maybe chmod 0755 'profile.d' maybe chmod 0644 'profile.d/.keep' maybe chmod 0644 'profile.d/Z97-byobu.sh' +maybe chmod 0644 'profile.d/java-config-2.csh' +maybe chmod 0644 'profile.d/java-config-2.sh' maybe chmod 0644 'profile.env' maybe chmod 0644 'protocols' maybe chgrp 'puppet' 'puppetlabs' @@ -772,6 +775,7 @@ maybe chmod 0644 'resolv.conf' maybe chmod 0644 'resolv.conf.bak' maybe chmod 0644 'resolvconf.conf' maybe chmod 0755 'revdep-rebuild' +maybe chmod 0644 'revdep-rebuild/60-java' maybe chmod 0644 'revdep-rebuild/99revdep-rebuild' maybe chmod 0755 'rmt' maybe chmod 0644 'rpc' diff --git a/env.d/20java-config b/env.d/20java-config new file mode 100644 index 0000000..1128b5d --- /dev/null +++ b/env.d/20java-config @@ -0,0 +1 @@ +MANPATH="/etc/java-config-2/current-system-vm/man/" diff --git a/portage/world b/portage/world index 894156f..27d6357 100644 --- a/portage/world +++ b/portage/world @@ -13,6 +13,7 @@ app-portage/portage-utils app-shells/bash-completion app-vim/puppet-syntax dev-ruby/hiera +dev-ruby/hiera-eyaml dev-ruby/hiera-eyaml-plaintext dev-util/strace dev-vcs/tig diff --git a/profile.d/java-config-2.csh b/profile.d/java-config-2.csh new file mode 100644 index 0000000..cd68c2a --- /dev/null +++ b/profile.d/java-config-2.csh @@ -0,0 +1,21 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +set gentoo_user_vm = "${HOME}/.gentoo/java-config-2/current-user-vm" +set gentoo_system_vm = "/etc/java-config-2/current-system-vm" + +## If we have a current-user-vm (and aren't root)... set it to JAVA_HOME +## Otherwise set to the current system vm +if ( ( "$uid" != "0" ) && ( -l $gentoo_user_vm ) ) then + setenv JAVA_HOME $gentoo_user_vm +else if ( -l $gentoo_system_vm ) then + setenv JAVA_HOME $gentoo_system_vm +endif +unset gentoo_user_vm gentoo_system_vm + +if ( $?JAVA_HOME ) then + # prepending to come before generation 1 + setenv MANPATH "${JAVA_HOME}/man:${MANPATH}" + setenv JDK_HOME $JAVA_HOME + setenv JAVAC ${JDK_HOME}/bin/javac +endif diff --git a/profile.d/java-config-2.sh b/profile.d/java-config-2.sh new file mode 100644 index 0000000..532fc86 --- /dev/null +++ b/profile.d/java-config-2.sh @@ -0,0 +1,33 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +# If we have a current-user-vm (and aren't root)... set it to JAVA_HOME +gentoo_user_vm="${HOME}/.gentoo/java-config-2/current-user-vm" +gentoo_system_vm="/etc/java-config-2/current-system-vm" + +# Please make sure that this script is POSIX compliant +# See https://bugs.gentoo.org/show_bug.cgi?id=169925 +# for more details" + +if [ -z "${UID}" ] ; then + # id lives in /usr/bin which might not be mounted + if type id >/dev/null 2>/dev/null ; then + user_id=$(id -u) + else + [ "${USER}" = "root" ] && user_id=0 + fi +fi + +# The root user uses the system vm +if [ "${user_id}" != 0 -a -L "${gentoo_user_vm}" ]; then + export JAVA_HOME=${gentoo_user_vm} +# Otherwise set to the current system vm +elif [ -L "/etc/java-config-2/current-system-vm" ]; then + export JAVA_HOME=${gentoo_system_vm} +fi + +# prepending to come before generation 1 +export MANPATH="${JAVA_HOME}/man:${MANPATH}" +export JDK_HOME=${JAVA_HOME} +export JAVAC=${JDK_HOME}/bin/javac +unset gentoo_user_vm gentoo_system_vm user_id diff --git a/revdep-rebuild/60-java b/revdep-rebuild/60-java new file mode 100644 index 0000000..1aca594 --- /dev/null +++ b/revdep-rebuild/60-java @@ -0,0 +1,9 @@ +# The VM dynamically loads these at runtime so they will end up as missing +# but actually work just fine. See for example +# https://bugs.gentoo.org/show_bug.cgi?id=152039 +# +# This file should only have files the are used by things like swt. If there +# are "broken" links inside the jre itself, the jre should install it's own +# control file. + +LD_LIBRARY_MASK="libjvm.so libjawt.so" -- 2.39.5