更新 gentoo portage 配置并新增 portage 自动更新脚本

This commit is contained in:
2025-08-07 18:36:54 +08:00
parent 562d53e80d
commit 04458c143f
12 changed files with 165 additions and 120 deletions

View File

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

View File

@@ -1 +0,0 @@
PORTAGE_TMPDIR="/var/tmp/notmpfs"

View File

@@ -9,45 +9,35 @@ FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}"
# NOTE: This stage was built with the bindist Use flag enabled # NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"
# This sets the language of build output to English. # This sets the language of build output to English.
# Please keep this setting intact when reporting bugs. # Please keep this setting intact when reporting bugs.
LC_MESSAGES=C LC_MESSAGES=C.utf8
# binary package features # binary package features
FEATURES="buildpkg ${FEATURES}" FEATURES="buildpkg ${FEATURES}"
QUICKPKG_DEFAULT_OPTS="--include-config y" QUICKPKG_DEFAULT_OPTS="--include-config y"
EMERGE_DEFAULT_OPTS="--buildpkg --buildpkg-exclude \"virtual/* sys-kernel/*-sources\" ${EMERGE_DEFAULT_OPTS}" BINPKG_FORMAT="gpkg"
# PORTAGE_BINHOST="ssh://root@192.168.2.102/var/cache/binpkgs" EMERGE_DEFAULT_OPTS="--buildpkg --buildpkg-exclude \"virtual/* sys-kernel/*-sources */*-bin\" ${EMERGE_DEFAULT_OPTS}"
# ccache and distcc # ccache and distcc
# FEATURES="distcc ${FEATURES}" # FEATURES="distcc ${FEATURES}"
# CCACHE_DIR="/var/cache/ccache"
# FEATURES="ccache ${FEATURES}"
# ABI_X86="32 64" # ABI_X86="32 64"
ALSA_CARDS="hda-intel" ALSA_CARDS="hda-intel"
# CCACHE_DIR="/var/cache/ccache" GRUB_PLATFORMS="efi-64"
# FEATURES="ccache ${FEATURES}" INPUT_DEVICES="libinput"
VIDEO_CARDS="amdgpu dummy nouveau radeon radeonsi vesa fbdev nvidia"
GENTOO_MIRRORS=" GENTOO_MIRRORS="
https://mirrors.ustc.edu.cn/gentoo/ https://mirrors.ustc.edu.cn/gentoo/
http://distfiles.gentoo.org/ http://distfiles.gentoo.org/
https://mirrors.tuna.tsinghua.edu.cn/gentoo/ https://mirrors.tuna.tsinghua.edu.cn/gentoo/
" "
BINPKG_FORMAT="gpkg"
GRUB_PLATFORMS="efi-64"
MAKEOPTS="-j9 ${MAKEOPTS}" MAKEOPTS="-j9 ${MAKEOPTS}"
ACCEPT_KEYWORDS="amd64 ~amd64"
CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3"
INPUT_DEVICES="libinput"
# LUA_TARGETS="luajit"
# LUA_SINGLE_TARGET="luajit"
# PYTHON_TARGETS="python3_7 python3_8 python3_9"
# PYTHON_SINGLE_TARGET="python3_8"
#RUBY_TARGETS="ruby30"
VIDEO_CARDS="fbdev nvidia"
DESKTOP_USE="X alsa apng dbus fbcon ffmpeg flac fuse gif gtk gtk2 gtk3 http2 icu jpeg mp3 mp4 mpeg mtp nvidia ogg opengl pdf png pulseaudio svg tiff unicode vaapi vdpau webp xinerama xv xvmc" DESKTOP_USE="X alsa apng dbus fbcon ffmpeg flac fuse gif gtk gtk2 gtk3 http2 icu jack jpeg mp3 mp4 mpeg mtp nvidia ogg opengl pdf png pipewire pulseaudio svg tiff unicode vaapi vdpau webp xinerama xv xvmc"
#USE="${USE} ${DESKTOP_USE} consolekit cups policykit pulseaudio truetype udev xft xcb xkb -bluetooth -gpm -libva -modemmanager" #USE="${USE} ${DESKTOP_USE} consolekit cups policykit pulseaudio truetype udev xft xcb xkb -bluetooth -gpm -libva -modemmanager"
USE="${USE} ${DESKTOP_USE} bluetooth cups elogind policykit truetype udev xft xcb xkb -gpm -libva -modemmanager" USE="${USE} ${DESKTOP_USE} bluetooth cups elogind policykit truetype udev xft xcb xkb -gpm -libva -modemmanager"

View File

@@ -1,3 +1,34 @@
# editor
app-editors/cursor ~amd64
app-editors/emacs ** app-editors/emacs **
sys-kernel/gentoo-sources -~amd64 app-editors/vscode ~amd64
x11-libs/libX11 -~amd64 app-emacs/emacs-common ~amd64
# imput method
app-i18n/fcitx ~amd64
app-i18n/fcitx-configtool ~amd64
app-i18n/fcitx-meta ~amd64
app-i18n/fcitx-rime ~amd64
app-i18n/librime ~amd64
# tree sitter
dev-libs/tree-sitter* ~amd64
# audroid studio
dev-util/android-studio::gentoo ~amd64
# frp
net-vpn/frp ~amd64
# firefox
dev-libs/nspr ~amd64
dev-libs/nss ~amd64
www-client/firefox ~amd64
media-fonts/sarasa-gothic ~amd64
media-sound/bluez-alsa ~amd64
*/*-bin ~amd64
net-wireless/iwgtk ~amd64
sys-fs/jmtpfs ~amd64

View File

@@ -1,13 +1 @@
app-office/libreoffice notmpfs.conf
dev-lang/ghc notmpfs.conf
dev-lang/mono notmpfs.conf
dev-lang/rust notmpfs.conf
dev-lang/spidermonkey notmpfs.conf
dev-java/icedtea notmpfs.conf
mail-client/thunderbird notmpfs.conf
sys-devel/gcc notmpfs.conf
www-client/chromium notmpfs.conf
www-client/firefox notmpfs.conf
sys-libs/glibc valgrind.conf sys-libs/glibc valgrind.conf
sys-devel/clang lessThreads.conf

View File

@@ -1,18 +1,28 @@
app-arch/p7zip unRAR app-arch/p7zip unRAR
app-editors/cursor cursor
app-editors/vscode Microsoft-vscode app-editors/vscode Microsoft-vscode
app-emulation/virtualbox-bin PUEL app-emulation/virtualbox-bin PUEL
app-office/wps-office WPS-EULA app-office/wps-office WPS-EULA
dev-embedded/sdcc MicroChip-SDCC dev-embedded/sdcc MicroChip-SDCC
dev-db/mongodb SSPL-1 dev-db/mongodb SSPL-1
dev-libs/cudnn NVIDIA-cuDNN
dev-util/nvidia-cuda-toolkit NVIDIA-CUDA
dev-util/android-studio android
dev-util/pycharm-community JetBrains-business JSON
dev-util/pycharm-professional JetBrains-business JSON
media-fonts/font-bh-ttf bh-luxi media-fonts/font-bh-ttf bh-luxi
media-fonts/font-bh-type1 bh-luxi media-fonts/font-bh-type1 bh-luxi
media-tv/plex-media-server Plex
net-analyzer/nmap NPSL net-analyzer/nmap NPSL
net-im/deepin-wine-wechat Tencent net-im/deepin-wine-wechat Tencent
net-im/dingtalk all-rights-reserved net-im/dingtalk all-rights-reserved
net-im/wechat all-rights-reserved
net-im/wechat-universal-bwrap all-rights-reserved
net-misc/anydesk AnyDesk-TOS net-misc/anydesk AnyDesk-TOS
net-misc/baidunetdisk BaiduNetDisk
net-misc/teamviewer TeamViewer net-misc/teamviewer TeamViewer
sys-kernel/linux-firmware no-source-code linux-fw-redistributable sys-kernel/linux-firmware no-source-code linux-fw-redistributable
www-client/google-chrome google-chrome www-client/google-chrome google-chrome
www-client/microsoft-edge microsoft-edge www-client/microsoft-edge microsoft-edge
www-plugins/adobe-flash AdobeFlash-11.x www-plugins/adobe-flash AdobeFlash-11.x
x11-drivers/nvidia-drivers NVIDIA-r2 x11-drivers/nvidia-drivers NVIDIA-r2 NVIDIA-2023 NVIDIA-2025

View File

@@ -1,3 +1,3 @@
app-office/wps-office::gentoo-zh app-office/wps-office::gentoo-zh
dev-libs/tree-sitter-typescript::gentoo dev-lang/rust
net-proxy/shadowsocks-rust::gentoo-zh net-proxy/shadowsocks-rust::gentoo-zh

View File

@@ -1 +0,0 @@
app-text/sdcv::gentoo-zedhugh

View File

@@ -1,40 +1,10 @@
# abi
# dev-libs/glib abi_x86_32
# dev-libs/libffi abi_x86_32
# dev-libs/libpcre abi_x86_32
# dev-libs/libpthread-stubs abi_x86_32
# dev-util/pkgconfig abi_x86_32
# sys-apps/attr abi_x86_32
# sys-apps/util-linux abi_x86_32
# sys-libs/zlib abi_x86_32
# virtual/libffi abi_x86_32
# virtual/libiconv abi_x86_32
# virtual/libintl abi_x86_32
# virtual/pkgconfig abi_x86_32
# x11-libs/libX11 abi_x86_32
# x11-libs/libXau abi_x86_32
# x11-libs/libXdmcp abi_x86_32
# x11-libs/libXext abi_x86_32
# x11-libs/libvdpau abi_x86_32
# x11-libs/libxcb abi_x86_32
# x11-base/xcb-proto abi_x86_32
# sys-libs/libxcrypt abi_x86_32
# virtual/libcrypt abi_x86_32
app-text/xmlto text app-text/xmlto text
dev-lang/python sqlite
dev-libs/gmp static-libs
dev-libs/libpcre2 pcre16
# media-libs/mesa -vaapi -gallium
net-misc/curl telnet net-misc/curl telnet
net-misc/openssh libedit net-misc/openssh libedit
sys-apps/util-linux static-libs
sys-boot/grub mount sys-boot/grub mount
sys-libs/zlib static-libs
#sys-devel/binutils gold default-gold
# nvidia driver # kernel
x11-drivers/nvidia-drivers -abi_x86_32 sys-kernel/installkernel dracut grub
# terminal # terminal
x11-terms/xterm sixel xinerama x11-terms/xterm sixel xinerama
@@ -44,13 +14,14 @@ x11-terms/rxvt-unicode 256-color blink fading-colors pixbuf unicode3
#www-servers/uwsgi cgi python #www-servers/uwsgi cgi python
# emacs # emacs
app-editors/emacs dynamic-loading gui gzip-el json sound source sqlite tree-sitter wide-int -gtk app-editors/emacs dynamic-loading -gtk gui gzip-el harfbuzz json libxml2 sound source sqlite tree-sitter wide-int
app-emacs/emacs-common gui app-emacs/emacs-common gui
sys-devel/gcc jit sys-devel/gcc jit
# p7zip # p7zip
app-arch/p7zip rar -wxwidgets app-arch/p7zip rar -wxwidgets
# vim
app-editors/vim lua python app-editors/vim lua python
# file manager # file manager
@@ -59,28 +30,16 @@ app-editors/vim lua python
#x11-libs/libfm udisks #x11-libs/libfm udisks
# firefox # firefox
media-libs/libvpx postproc # media-libs/libvpx postproc
#www-client/firefox -clang -system-av1 -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-png -system-webp #www-client/firefox -clang -system-av1 -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-png -system-webp
#www-client/firefox -clang # www-client/firefox -clang
# postgresql
dev-db/postgresql python
# imagemagick # imagemagick
media-gfx/imagemagick svg xml media-gfx/imagemagick svg xml
# pulseaudio
media-sound/pulseaudio aptx -orc
# terminus font # terminus font
media-fonts/terminus-font otf media-fonts/terminus-font otf
net-misc/aria2 bittorrent metalink tcmalloc xmlrpc
# awesome use lua5.3 for utf-8 issue
dev-lua/lgi LUA_TARGETS: lua5-1 lua5-3
x11-wm/awesome LUA_SINGLE_TARGET: lua5-3 -lua5-1
# MCU develop # MCU develop
dev-embedded/sdcc device-lib mcs51 packihx dev-embedded/sdcc device-lib mcs51 packihx
@@ -90,22 +49,8 @@ media-sound/ncmpcpp clock outputs taglib visualizer
# graphviz # graphviz
media-libs/gd fontconfig media-libs/gd fontconfig
# deepin-wine-wechat
# media-libs/libcanberra pulseaudio
# media-libs/mesa osmesa -vaapi
# media-plugins/alsa-plugins pulseaudio
# x11-drivers/nvidia-drivers abi_x86_32
# x11-libs/libva -opengl
# fcitx5 # fcitx5
app-i18n/fcitx-configtool qt5 -kcm app-i18n/fcitx-meta gtk4 rime -chinese-addons
app-i18n/fcitx-meta rime -chinese-addons
app-i18n/fcitx-qt qt5
# media-libs/mesa wayland
# x11-libs/gtk+ wayland
# nodejs use corepack manage package manager
net-libs/nodejs corepack -npm
# dwm # dwm
x11-misc/dmenu xinerama x11-misc/dmenu xinerama
@@ -122,7 +67,43 @@ app-text/texlive-core cjk xetex
net-fs/samba client net-fs/samba client
# mpv # mpv
media-video/mpv bluray media-video/mpv bluray dvd nvenc pipewire -vulkan
# librime # pdf-tools need poppler-glib library
app-i18n/librime octagram app-text/poppler cairo
# qbittorrent
net-p2p/qbittorrent webui
# ffmpeg encoder
media-video/ffmpeg bluray cuda libass nvenc opus vorbis vpx x264 x265
# pipewire
media-video/pipewire extra jack-sdk pipewire-alsa sound-server
# calibra
dev-python/pyqt6 qml quick vulkan webchannel
dev-qt/qtbase vulkan
dev-qt/qtdeclarative vulkan
dev-qt/qtgui egl vulkan
dev-qt/qtimageformats mng
dev-qt/qttools qml vulkan
dev-qt/qtwebchannel qml
dev-qt/qtwebengine bindist qml vulkan -pulseaudio -vaapi
# rust
dev-lang/rust clippy rust-analyzer rust-src rustfmt
dev-lang/rust-bin clippy rust-analyzer rust-src rustfmt
# webkit-gtk as dependency of tauri
# net-libs/webkit-gtk keyring lcms spell wayland
# x11-libs/gtk+ wayland
# media-libs/mesa wayland
# media-libs/vulkan-loader wayland
# gui-libs/gtk wayland
# mkvtoolnix
media-video/mkvtoolnix -dbus
# fwupd
sys-apps/fwupd bash-completion gnutls logitech nvme synaptics

View File

@@ -0,0 +1,9 @@
dev-python/epc
dev-python/orjson
dev-python/sexpdata
dev-python/six
dev-python/setuptools
dev-python/paramiko
dev-python/rapidfuzz
dev-python/watchdog
dev-python/packaging

View File

@@ -0,0 +1,54 @@
#!/bin/sh
check_root_permissioin() {
local SCRIPT_NAME=$(basename $0)
if [[ "$UID" != "0" ]]; then
echo "${SCRIPT_NAME}: must run this as root"
exit 1
fi
}
sync_portage_config() {
local SCRIPT_DIR=$(dirname $0)
local CONFIG_DIR=$(realpath "${SCRIPT_DIR}/../gentoo_portage")
local DEST_DIR="/etc/portage"
# 常用配置文件列表
local CONFIG_FILES=(
# 仓库配置
"binrepos.conf"
"repos.conf"
# 构建配置
"make.conf"
"package.accept_keywords"
"package.license"
"package.mask"
"package.unmask"
"package.use"
# 单独的 env 配置
"env"
"package.env"
"sets"
"patches"
)
for CONFIG_FILE in "${CONFIG_FILES[@]}"; do
local SOURCE_FILE="${CONFIG_DIR}/${CONFIG_FILE}"
local TARGET_FILE="${DEST_DIR}/${CONFIG_FILE}"
# 清理原先的配置
rm -rf $TARGET_FILE
# 将新的配置通过软链接链接到目标目录
if [[ -e $SOURCE_FILE ]]; then
echo "link: ${SOURCE_FILE} -> ${TARGET_FILE}"
ln -s $SOURCE_FILE $TARGET_FILE
fi
done
}
check_root_permissioin
sync_portage_config

View File

@@ -1,15 +0,0 @@
#!/bin/sh
if [ "${UID}" != "0" ]; then
SCRIPT_NAME=$(basename $0)
echo "${SCRIPT_NAME}: must run this as root"
exit 1
fi
SCRIPT_DIR=$(dirname $0)
# 此处目录后面的 / 不能少
SOURCE_DIR="${SCRIPT_DIR}/../gentoo_portage/patches/"
DEST_DIR="/etc/portage/patches/"
rsync -r --delete --mkpath $SOURCE_DIR $DEST_DIR