0 Star 0 Fork 0

範輝 / gentoo-config

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

gentoo-config

<1> VIM nerd_tree 侧栏乱码问题:

#
# 注释掉不能显示的富文本字体
# vim /usr/local/share/vim/vim74/plugin/NERD_tree.vim
#

"if !nerdtree#runningWindows() && !nerdtree#runningCygwin()
"    call s:initVariable('g:NERDTreeDirArrowExpandable', '▸')
"    call s:initVariable('g:NERDTreeDirArrowCollapsible', '▾')
"else
    call s:initVariable('g:NERDTreeDirArrowExpandable', '+')
    call s:initVariable('g:NERDTreeDirArrowCollapsible', '~')
"endif

<2> 禁用 ubuntu Dock 栏

SEE ALSO: https://linux.cn/article-10170-1.html

gsettings set org.gnome.shell.extensions.dash-to-dock autohide false
gsettings set org.gnome.shell.extensions.dash-to-dock dock-fixed false
gsettings set org.gnome.shell.extensions.dash-to-dock intellihide false

<3> YouCompleteMe 'runtime error'

rustup component add rust-src
rustup component add rust-src --toolchain nightly

cd YouCompleteMe
perl -pi -e 's/RUST_TOOLCHAIN\s*=.*/RUST_TOOLCHAIN = "nightly"/g' third_party/ycmd/build.py

./install.py --rust-completer --go-completer

<4> Change passwd rules

man passwdqc.conf

# /etc/security/passwdqc.conf
enforce = none

<5> Crossdev compiling

mkdir -p /var/db/repos/crossdev/{profiles,metadata}
echo 'crossdev' > /var/db/repos/crossdev/profiles/repo_name
echo 'masters = gentoo' > /var/db/repos/crossdev/metadata/layout.conf
chown -R portage:portage /var/db/repos/crossdev
mkdir -p /etc/portage/repos.conf

echo "[crossdev]
location = /var/db/repos/crossdev
priority = 10
masters = gentoo
auto-sync = no" > /etc/portage/repos.conf/crossdev.conf
 
crossdev --stable -t x86_64-unknown-linux-musl
CHOST=x86_64-unknown-linux-musl cross-emerge -avq openssl net-misc/curl

<6> YouCompleteMe on Alpine(musl)

Issue (install.py --rust-completer --go-completer):

/home/fh/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/absl/absl/base/internal/spinlock_linux.inc:17:10: fatal error: linux/futex.h: No such file or directory
   17 | #include <linux/futex.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [absl/absl/base/CMakeFiles/absl_spinlock_wait.dir/build.make:76: absl/absl/base/CMakeFiles/absl_spinlock_wait.dir/internal/spinlock_wait.cc.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:602: absl/absl/base/CMakeFiles/absl_spinlock_wait.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....

Solution:

apk add linux-headers

<7> Clean unneed packages on opensuse

# add this alias to '/root/.bashrc' or '/root/.zshrc'
alias clean="zypper packages --unneeded | awk -F'|' 'NR==0 || NR==1 || NR==2 || NR==3 || NR==4 {next} {print \$3}' | grep -v Name | xargs zypper remove --clean-deps"

<8> Colorful git-diff on Alpine linux

apk add git-diff-highlight
# and then, re-login

<9> MUSL platform: "rustc: Dynamic loading not supported"

disable the default feature of 'static link'

# ~/.bashrc or ~/.zshrc
export RUSTFLAGS="-C target-feature=-crt-static"

<10> Allow setting weak password

# vi /etc/security/passwdqc.conf
enforce=none

<11> Github/Google network settings

World-wide network settings

<12> Major installing steps of the 'Gentoo Linux'

parted -a optimal /dev/...
mkfs.vfat -F 32 ...
mkfs.btrfs ...

wget https://.../...stage3.tar.gz
tar -xpf ...stage3.tar.gz

chroot ...

blkid >> /etc/fstab
vi /etc/fstab

mount -a

# config and compile kernel
make -jN
make modules_install
make install

# initramfs
dracut --hostonly --force

grub-install --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg

vi /etc/portage/make.conf
emerge-websync
eselect profile set N

emerge linux-firmware

emerge dhcpcd
systemctl enable dhcpcd

passwd root

reboot
MIT License Copyright (c) 2019 西门 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Use 'Gentoo Linux' as your development platform 展开 收起
Shell 等 4 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Shell
1
https://gitee.com/kt10/gentoo-config.git
git@gitee.com:kt10/gentoo-config.git
kt10
gentoo-config
gentoo-config
master

搜索帮助