Add configure portage

This commit is contained in:
Nemo 2020-10-12 19:05:29 +02:00
parent 2635ca6966
commit d336d22f5d
9 changed files with 207 additions and 0 deletions

View file

@ -0,0 +1,36 @@
Ansible Role: workstation portage
=========
This role configure Gentoo Portage on a GNU/Linux workstation.
Requirements
------------
None.
Role Variables
--------------
All variables and default values are defined in `defaults/main.yml`.
Dependencies
------------
None.
Example Playbook
----------------
- hosts: localhost
roles:
- workstation_portage
License
-------
BSD
Author Information
------------------
This role was created in 2020 by Nemo.

View file

@ -0,0 +1,16 @@
---
# defaults file for workstation_portage
workstation_portage_cflags: "-march=native -O2 -pipe"
workstation_portage_makeopts: "-j3"
workstation_portage_portdir: "/usr/portage"
workstation_portage_distdir: "/usr/portage/distfiles"
workstation_portage_pkgdir: "/usr/portage/packages"
workstation_portage_gentoo_mirrors:
- "ftp://ftp.free.fr/mirrors/ftp.gentoo.org/"
workstation_portage_cpuflags: "aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
workstation_portage_use: "bash-completion aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3 alsa jack -pulseaudio xinemara abi_riscv_ilp32 abi_riscv_ilp32d"
workstation_portage_accept_license: "*"
workstation_portage_L10N: "fr"
workstation_portage_binhost: "http://yourbinhost.example.org/packages-workstation/"
workstation_portage_niceness: "19"

View file

@ -0,0 +1,19 @@
galaxy_info:
author: nemo
description: Configure Gentoo Portage on a GNU/Linux workstation.
company: Wirebrass
license: license (BSD)
min_ansible_version: 2.4
platforms:
- name: Gentoo
versions:
- all
galaxy_tags:
- mutt
- mail
dependencies: []

View file

@ -0,0 +1,2 @@
---
- import_tasks: portage.yml

View file

@ -0,0 +1,58 @@
---
- name: Portage profile defined
file:
src: "../../usr/portage/profiles/default/linux/amd64/17.1/desktop"
dest: "/etc/portage/make.profile"
owner: root
group: root
state: link
- name: Portage make.conf file configured
template:
src: make.conf.j2
dest: /etc/portage/make.conf
owner: root
group: root
mode: 0644
- name: Portage USE flags folder configured
file:
src: package.use.ansible.j2
dest: /etc/portage/package.use
owner: root
group: root
mode: 0755
state: directory
- name: Portage USE flags configured
template:
src: package.use.ansible.j2
dest: /etc/portage/package.use/ansible
owner: root
group: root
mode: 0644
- name: Portage ACCEPT_KEYWORDS flags folder configured
file:
src: package.use.ansible.j2
dest: /etc/portage/package.accept_keywords
owner: root
group: root
mode: 0755
state: directory
- name: Portage ACCEPT_KEYWORDS flags configured
template:
src: package.accept_keywords.ansible.j2
dest: /etc/portage/package.accept_keywords/ansible
owner: root
group: root
mode: 0644
- name: Portage LICENSE configured
template:
src: package.license.j2
dest: /etc/portage/package.license
owner: root
group: root
mode: 0644

View file

@ -0,0 +1,28 @@
CFLAGS="{{ workstation_portage_cflags }}"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="{{ workstation_portage_makeopts }}"
PORTDIR="{{ workstation_portage_portdir }}"
DISTDIR="{{ workstation_portage_distdir }}"
PKGDIR="{{ workstation_portage_pkgdir }}"
LC_MESSAGES=C
GENTOO_MIRRORS="
{% for workstation_portage_gentoo_mirror in workstation_portage_gentoo_mirrors %}
{{ workstation_portage_gentoo_mirror }}
{% endfor %}
"
CPU_FLAGS_X86="{{ workstation_portage_cpuflags }}"
USE="{{ workstation_portage_use }}"
source /var/lib/layman/make.conf
ACCEPT_LICENSE="{{ workstation_portage_accept_license }}"
L10N="{{ workstation_portage_L10N }}"
FEATURES="getbinpkg"
PORTAGE_BINHOST="{{ workstation_portage_binhost }}"
PORTAGE_NICENESS="{{ workstation_portage_niceness }}"

View file

@ -0,0 +1,16 @@
net-nds/ApacheDirectoryStudio ~amd64
=x11-themes/arc-theme-20190917 ~amd64
media-sound/ardour ~adm64
net-analyzer/arp-scan ~amd64
x11-wm/awesome ~amd64
app-misc/crunch ~amd64
app-admin/haskell-updater ~amd64
media-sound/jack ~amd64
media-sound/mumble ~amd64
net-wireless/reaver ~amd64
#=net-im/skypeforlinux-8.47.0.59 ~amd64
net-im/skypeforlinux ~amd64
net-fs/smbnetfs ~amd64
net-im/teams ~amd64
net-vpn/tinc ~amd64
virtual/wireguard ~amd64

View file

@ -0,0 +1 @@
app-emulation/virtualbox-bin PUEL

View file

@ -0,0 +1,31 @@
>=net-libs/nodejs-14.2.0 inspector
netprint/cups zeroconf
>=media-video/ffmpeg-4.2.3 chromium
www-client/firefox-bin pulseaudio
net-misc/freerdp openh264 pulseaudio
sys-apps/util-linux static-libs
net-print/gutenprint gimp
net-wireless/lorcon python
dev-lang/mono minimal
net-analyzer/mtr -gtk
mail-client/mutt berkdb gpg imap smtp pop smime sasl doc -gdbm -lmdb -qdbm -tokyocabinet
sys-libs/ncurses -gpm
media-plugins/alsa-plugins pulseaudio
dev-lang/python -bluetooth
>=dev-python/QtPy-1.9.0-r2 printsupport
dev-qt/qtmultimedia widgets
net-misc/remmina crypt cups nls rdp spice ssh vnc
app-admin/rsyslog openssl
x11-terms/rxvt-unicode 256-color xft
sys-libs/tevent python
sys-libs/tdb python
app-crypt/pinentry gnome-keyring
app-text/texlive-core cjk xetex
media-libs/gd fontconfig
app-text/texlive X png truetype xml cjk context detex dvi2tty epspdf extra games graphics humanities jadetex luatex metapost music pdfannotextractor pstricks publishers science tex4ht texi2html xetex xindy
mail-client/thunderbird-bin -alsa
sys-libs/zlib minizip
media-libs/libsdl2 haptic
x11-base/xorg-server suid
x11-terms/xterm Xaw3d xinerama
net-libs/zeromq drafts