saving uncommitted changes in /etc prior to emerge run

This commit is contained in:
hasufell 2015-09-07 21:38:53 +02:00 committed by Hans Wurst
parent 336373edd3
commit 8dd7f2ae90
15 changed files with 268 additions and 155 deletions

View File

@ -25,3 +25,5 @@
#/var/tmp/jule 192.168.4.8(rw,async,no_subtree_check) #/var/tmp/jule 192.168.4.8(rw,async,no_subtree_check)
#/var/tmp/jule 192.168.6.8(rw,async,no_subtree_check) #/var/tmp/jule 192.168.6.8(rw,async,no_subtree_check)
/usr/bin-package-repo/ 192.168.0.14(rw,async,no_subtree_check)
/mnt/sda2/bin-distfiles/ 192.168.0.14(rw,async,no_subtree_check)

View File

@ -1,9 +1,11 @@
# bashrc # bashrc
## global settings ## global settings
CC=x86_64-pc-linux-gnu-gcc CC="clang"
CXX=x86_64-pc-linux-gnu-g++ BUILD_CC="clang"
CFLAGS="-march=core-avx2 -O2 -pipe -Wall" CXX="clang++"
BUILD_CXX="clang++"
CFLAGS="-march=core-avx2 -O2 -pipe -Wall -Qunused-arguments -fcolor-diagnostics"
CXXFLAGS="${CFLAGS}" CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j8" MAKEOPTS="-j8"
@ -30,15 +32,6 @@ GAMES_GROUP=users
## per-package settings ## per-package settings
# no as-needed
if [[
"${CATEGORY}/${PN}" == "net-libs/libeXosip" ||
"${CATEGORY}/${PN}" == "net-libs/libnetfilter_queue"
]]
then
LDFLAGS="${LDFLAGS/-Wl,--as-needed/}"
fi
# laptop-compat, keep this at the top # laptop-compat, keep this at the top
if [[ if [[
"${CATEGORY}/${PN}" == "app-emulation/wine" || "${CATEGORY}/${PN}" == "app-emulation/wine" ||
@ -57,92 +50,6 @@ then
fi fi
# clang incompatible or safety or missing openmp, also see #408963
if [[
"${CATEGORY}/${PN}" != "app-admin/haskell-updater" &&
"${CATEGORY}/${PN}" != "app-crypt/gnupg" &&
"${CATEGORY}/${PN}" != "app-crypt/johntheripper" &&
"${CATEGORY}/${PN}" != "app-emulation/aqemu" &&
"${CATEGORY}/${PN}" != "app-emulation/virtualbox" &&
"${CATEGORY}/${PN}" != "app-emulation/virtualbox-modules" &&
"${CATEGORY}/${PN}" != "app-emulation/wine" &&
"${CATEGORY}/${PN}" != "app-text/pandoc" &&
"${CATEGORY}/${PN}" != "app-text/recode" &&
"${CATEGORY}/${PN}" != "dev-games/cegui" &&
"${CATEGORY}/${PN}" != "dev-games/goatee" &&
"${CATEGORY}" != "dev-haskell" &&
"${CATEGORY}/${PN}" != "dev-lang/gprolog" &&
"${CATEGORY}/${PN}" != "dev-lang/luajit" &&
"${CATEGORY}/${PN}" != "dev-lang/ruby" &&
"${CATEGORY}/${PN}" != "dev-lang/spidermonkey" &&
"${CATEGORY}/${PN}" != "dev-libs/crypto++" &&
"${CATEGORY}/${PN}" != "dev-libs/elfutils" &&
"${CATEGORY}/${PN}" != "dev-libs/libev" &&
"${CATEGORY}/${PN}" != "dev-libs/libixion" &&
"${CATEGORY}/${PN}" != "dev-libs/openssl" &&
"${CATEGORY}/${PN}:${SLOT%/*}" != "dev-qt/qtcore:5" &&
"${CATEGORY}/${PN}:${SLOT%/*}" != "dev-qt/qtnetwork:5" &&
"${CATEGORY}/${PN}" != "dev-scheme/guile" &&
"${CATEGORY}/${PN}" != "dev-util/nemiver" &&
"${CATEGORY}/${PN}" != "games-board/goatee-gtk" &&
"${CATEGORY}/${PN}" != "games-engines/gemrb" &&
"${CATEGORY}/${PN}" != "games-engines/OpenJK" &&
"${CATEGORY}/${PN}" != "games-engines/openmw" &&
"${CATEGORY}/${PN}" != "games-fps/unvanquished" &&
"${CATEGORY}/${PN}" != "games-strategy/0ad" &&
"${CATEGORY}/${PN}" != "games-strategy/freeorion" &&
"${CATEGORY}/${PN}" != "games-strategy/liquidwar6" &&
"${CATEGORY}/${PN}" != "mail-client/thunderbird" &&
"${CATEGORY}/${PN}" != "media-gfx/blender" &&
"${CATEGORY}/${PN}" != "media-libs/devil" &&
"${CATEGORY}/${PN}" != "media-libs/gd" &&
"${CATEGORY}/${PN}" != "media-libs/gstreamer" &&
"${CATEGORY}/${PN}" != "media-libs/id3lib" &&
"${CATEGORY}/${PN}" != "media-libs/libraw" &&
"${CATEGORY}/${PN}" != "media-libs/libvorbis" &&
"${CATEGORY}/${PN}" != "media-libs/mesa" &&
"${CATEGORY}/${PN}" != "media-libs/sdl2-gfx" &&
"${CATEGORY}/${PN}" != "media-video/ffmpeg" &&
"${CATEGORY}/${PN}" != "media-video/guvcview" &&
"${CATEGORY}/${PN}" != "net-firewall/pglinux" &&
"${CATEGORY}/${PN}" != "net-libs/libmnl" &&
"${CATEGORY}/${PN}" != "net-libs/opal" &&
"${CATEGORY}/${PN}" != "net-p2p/retroshare" &&
"${CATEGORY}/${PN}" != "sci-mathematics/z3" &&
"${CATEGORY}/${PN}" != "sys-apps/coreutils" &&
"${CATEGORY}/${PN}" != "sys-apps/memtest86+" &&
"${CATEGORY}/${PN}" != "sys-apps/paludis" &&
"${CATEGORY}/${PN}" != "sys-block/thin-provisioning-tools" &&
"${CATEGORY}/${PN}" != "sys-devel/autogen" &&
"${CATEGORY}/${PN}" != "sys-devel/binutils" &&
"${CATEGORY}/${PN}" != "sys-devel/gcc" &&
"${CATEGORY}/${PN}" != "sys-libs/glibc" &&
"${CATEGORY}/${PN}" != "sys-power/iasl" &&
"${CATEGORY}/${PN}" != "www-client/firefox" &&
"${CATEGORY}/${PN}" != "www-client/torbrowser" &&
"${CATEGORY}/${PN}" != "x11-base/xorg-server" &&
"${CATEGORY}/${PN}" != "x11-drivers/nvidia-drivers" &&
"${CATEGORY}/${PN}" != "x11-libs/cairo" &&
"${CATEGORY}/${PN}" != "x11-libs/motif" &&
"${CATEGORY}/${PN}" != "x11-libs/pixman"
]]
then
CC="clang"
BUILD_CC="clang"
CFLAGS+=" -Qunused-arguments -fcolor-diagnostics"
CXX="clang++"
BUILD_CXX="clang++"
CXXFLAGS+=" -Qunused-arguments -fcolor-diagnostics"
fi
# missing fpic
# if [[ "${CATEGORY}/${PN}" == "games-emulation/dosbox" ]]
# then
# CFLAGS+=" -fPIC"
# CXXFLAGS+=" -fPIC"
# fi
# O3 # O3
if [[ if [[
"${CATEGORY}" == "games-"* && "${CATEGORY}" == "games-"* &&
@ -153,59 +60,4 @@ then
CXXFLAGS="${CXXFLAGS} -O3" CXXFLAGS="${CXXFLAGS} -O3"
fi fi
[[ -e /etc/paludis/hooks/setup_pkg_env.bash ]] && . /etc/paludis/hooks/setup_pkg_env.bash
# debug
if [[
"${CATEGORY}/${PN}" == "dev-libs/libntru" ||
"${CATEGORY}/${PN}" == "dev-util/glade" ||
"${CATEGORY}/${PN}" == "games-engines/OpenJK" ||
"${CATEGORY}/${PN}" == "net-libs/mbedtls" ||
"${CATEGORY}/${PN}" == "net-misc/curl" ||
"${CATEGORY}/${PN}" == "x11-libs/gtk+" ||
"${CATEGORY}/${PN}" == "x11-misc/spacefm"
]]
then
CFLAGS="${CFLAGS} -Wall -g"
CXXFLAGS="${CXXFLAGS} -Wall -g"
fi
# full debug
if [[
"${CATEGORY}/${PN}" == "games-fps/doomsday"
]]
then
CFLAGS="${CFLAGS} -Wall -g -O0"
CXXFLAGS="${CXXFLAGS} -Wall -g -O0"
fi
# nodebug
if [[
"${CATEGORY}/${PN}" == "app-office/libreoffice" ||
"${CATEGORY}/${PN}" == "dev-python/pypy" ||
"${CATEGORY}/${PN}" == "dev-qt/qtwebkit" ||
"${CATEGORY}/${PN}" == "games-strategy/freeorion" ||
"${CATEGORY}/${PN}" == "mail-client/thunderbird" ||
"${CATEGORY}/${PN}" == "net-libs/webkit-gtk" ||
"${CATEGORY}/${PN}" == "sys-devel/clang" ||
"${CATEGORY}/${PN}" == "sys-devel/llvm" ||
"${CATEGORY}/${PN}" == "www-client/chromium" ||
"${CATEGORY}/${PN}" == "www-client/firefox" ||
"${CATEGORY}/${PN}" == "www-client/torbrowser"
]]
then
CFLAGS="${CFLAGS} -g0"
CXXFLAGS="${CXXFLAGS} -g0"
fi
# parallel build broken
if [[
"${CATEGORY}/${PN}" == "dev-libs/openssl"
]]
then
MAKEOPTS="-j1"
fi

View File

@ -0,0 +1,2 @@
add-options CFLAGS -Wall -g
add-options CXXFLAGS -Wall -g

View File

@ -0,0 +1,2 @@
add-options CFLAGS -Wall -g -O0
add-options CXXFLAGS -Wall -g -O0

View File

@ -0,0 +1,5 @@
CC=x86_64-pc-linux-gnu-gcc
CXX=x86_64-pc-linux-gnu-g++
remove-options CFLAGS -Qunused-arguments -fcolor-diagnostics
remove-options CXXFLAGS -Qunused-arguments -fcolor-diagnostics

View File

@ -0,0 +1 @@
remove-options LDFLAGS -Wl,--as-needed

View File

@ -0,0 +1,2 @@
add-options CFLAGS -g0
add-options CXXFLAGS -g0

View File

@ -0,0 +1 @@
MAKEOPTS="-j1"

View File

@ -0,0 +1,70 @@
#!/bin/bash
#
# Paludis hook script to apply patch (w/o modifying corresponding ebuild file).
#
# Copyright (c), 2010-2012 by Alex Turbov <i.zaufi@gmail.com>
#
# Version: @PH_VERSION@
#
source ${PALUDIS_EBUILD_DIR}/echo_functions.bash
declare -r CONFIG_FILE="/etc/paludis/hooks/configs/auto_patch.conf"
PATCH_DIR="/var/db/paludis/autopatches"
# Configuration override
[[ -f ${CONFIG_FILE} ]] && source ${CONFIG_FILE}
PATCH_DIR_FULL="${PATCH_DIR}/${HOOK}/${CATEGORY}/${PF}"
_ap_rememberfile="${T}/.autopatch_was_here_${PALUDIS_PID}"
issue_a_warning()
{
local -r tobe="$1"
ewarn "WARNING: ${CATEGORY}/${PF} package $tobe installed with additional patches applied by auto-patch hook."
ewarn "WARNING: Before filing a bug, remove all patches, reinstall, and try again..."
}
try_to_apply_patches()
{
if [[ -n ${PALUDIS_HOOK_DEBUG} ]]; then
einfo "Check ${PATCH_DIR_FULL}"
fi
if [[ -d ${PATCH_DIR_FULL} ]] ; then
cd "${S}" || die "Failed to cd into ${S}!"
for i in "${PATCH_DIR_FULL}"/*.patch ; do
if declare -f epatch >/dev/null ; then
epatch ${i}
else
# sane default if no epatch is there
einfo "Applying ${i} ..."
patch -p1 -i "${i}" || die "Failed to apply ${i}!"
fi
touch "${_ap_rememberfile}" || die "Failed to touch ${_ap_rememberfile}!"
done
if [[ -e ${_ap_rememberfile} ]]; then
issue_a_warning "will be"
else
einfo "No patches in for this package."
fi
fi
}
case "${HOOK}" in
# ATTENTION This script must be symlinked to the following hook dirs:
ebuild_compile_post | \
ebuild_compile_pre | \
ebuild_configure_post | \
ebuild_configure_pre | \
ebuild_install_pre | \
ebuild_unpack_post )
try_to_apply_patches
;;
install_all_post)
if [[ -e ${_ap_rememberfile} ]] ; then
issue_a_warning "was"
fi
;;
esac
# kate: hl bash;

View File

@ -0,0 +1,11 @@
#
# auto-patch.conf
#
# REMINDER: autopatch hook applies patches AFTER ebuild has done all
# unpacking and patching.
# Home directory for the patches.
# Put the patches in ${PATCH_DIR}/cat/pkg-ver/ subdirectory
# NOTE Uncomment the following line to override default location
# PATCH_DIR="@PH_LOCALSTATEDIR@/paludis/autopatches"

View File

@ -0,0 +1 @@
/etc/paludis/hooks/auto_patch.bash

View File

@ -0,0 +1 @@
/etc/paludis/hooks/auto_patch.bash

View File

@ -0,0 +1,66 @@
#!/bin/bash
#
# Helper functions to use from /etc/paludis/bashrc and
# package environment control files.
#
# Copyright 2014 by Alex Turbov <i.zaufi@gmail.com>
#
source ${PALUDIS_EBUILD_DIR}/echo_functions.bash
#
# Add options to the end of a given var
# $1 - variable to modify
# $2..$n - options to add
#
add-options()
{
local var=$1
shift
local stmt="$var=\"\$${var} $*\""
eval "$stmt"
}
#
# Remove options from a given var
# $1 - variable to modify
# $2..$n - options to remove
#
remove-options()
{
local -r _ro_var="$1"
shift
local -a _ro_new_value
local _ro_opt
local _ro_del_value
# Iterate over options in a variable
for _ro_opt in ${!_ro_var}; do
# Iterate over options to remove passed as function parameters
for _ro_del_value in "$@"; do
[[ ${_ro_opt} == ${_ro_del_value} ]] && continue 2
done
_ro_new_value+=( "${_ro_opt}" )
done
eval "${_ro_var}=\"${_ro_new_value[@]}\""
}
setup_pkg_env()
{
local conf
[[ ! -f /etc/paludis/package_env.conf ]] && return
# Select configured environments
local envs=$(for i in `egrep "^${CATEGORY}/(${PN}|\*)(:[^\s]+)?\s" /etc/paludis/package_env.conf | sed 's,[^ ]\+\s,,'`; do echo "${i}"; done | sort -u)
for conf in $envs; do
if [[ -f /etc/paludis/env.conf.d/${conf}.conf ]]; then
source /etc/paludis/env.conf.d/${conf}.conf
else
ewarn "Ignore undefined environment configuration: ${conf}"
fi
done
}
# Do it!
setup_pkg_env
# kate: hl bash;

View File

@ -118,4 +118,4 @@ app-admin/cpu-g ~amd64
# icon themes # icon themes
x11-themes/human-icon-theme ~amd64 x11-themes/human-icon-theme ~amd64
x11-themes/yasis-icon-theme ~amd64 x11-themes/yasis-icon-theme ~amd64
net-im/jitsi-bin ~amd64

97
paludis/package_env.conf Normal file
View File

@ -0,0 +1,97 @@
# no-as-needed
net-libs/libeXosip no-as-needed
net-libs/libnetfilter_queue no-as-needed
# debug
dev-libs/libntru debug
dev-util/glade debug
games-engines/OpenJK debug
net-libs/mbedtls debug
net-misc/curl debug
x11-libs/gtk+ debug
x11-misc/spacefm debug
# nodebug
app-office/libreoffice no-debug
dev-python/pypy no-debug
dev-qt/qtwebkit no-debug
games-strategy/freeorion no-debug
mail-client/thunderbird no-debug
net-libs/webkit-gtk no-debug
sys-devel/clang no-debug
sys-devel/llvm no-debug
www-client/chromium no-debug
www-client/firefox no-debug
www-client/torbrowser no-debug
# full debug
games-fps/doomsday full-debug
# no-parallel-build
dev-libs/openssl no-parallel-build
# gcc
app-admin/haskell-updater gcc
app-crypt/gnupg gcc
app-crypt/johntheripper gcc
app-emulation/aqemu gcc
app-emulation/virtualbox gcc
app-emulation/virtualbox-modules gcc
app-emulation/wine gcc
app-text/pandoc gcc
app-text/recode gcc
dev-games/cegui gcc
dev-games/goatee gcc
dev-haskell/* gcc
dev-lang/gprolog gcc
dev-lang/luajit gcc
dev-lang/ruby gcc
dev-lang/spidermonkey gcc
dev-libs/crypto++ gcc
dev-libs/elfutils gcc
dev-libs/libev gcc
dev-libs/libixion gcc
dev-libs/openssl gcc
dev-scheme/guile gcc
dev-util/nemiver gcc
games-board/goatee-gtk gcc
games-engines/gemrb gcc
games-engines/OpenJK gcc
games-engines/openmw gcc
games-fps/unvanquished gcc
games-strategy/0ad gcc
games-strategy/freeorion gcc
games-strategy/liquidwar6 gcc
mail-client/thunderbird gcc
media-gfx/blender gcc
media-libs/devil gcc
media-libs/gd gcc
media-libs/gstreamer gcc
media-libs/id3lib gcc
media-libs/libraw gcc
media-libs/libvorbis gcc
media-libs/mesa gcc
media-libs/sdl2-gfx gcc
media-video/ffmpeg gcc
media-video/guvcview gcc
net-firewall/pglinux gcc
net-libs/libmnl gcc
net-libs/opal gcc
net-p2p/retroshare gcc
sci-mathematics/z3 gcc
sys-apps/coreutils gcc
sys-apps/memtest86+ gcc
sys-apps/paludis gcc
sys-block/thin-provisioning-tools gcc
sys-devel/autogen gcc
sys-devel/binutils gcc
sys-devel/gcc gcc
sys-libs/glibc gcc
sys-power/iasl gcc
www-client/firefox gcc
www-client/torbrowser gcc
x11-base/xorg-server gcc
x11-drivers/nvidia-drivers gcc
x11-libs/cairo gcc