From: Maximilian Friedersdorff Date: Tue, 4 Jun 2019 14:15:25 +0000 (+0100) Subject: Manage make.conf X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=6a8e91a41262b5235f9ddce55c9c4cb1c915c3ca;p=max%2Fsaltfiles.git Manage make.conf --- diff --git a/states/portage/files/make.conf b/states/portage/files/make.conf new file mode 100644 index 0000000..ae7a6ef --- /dev/null +++ b/states/portage/files/make.conf @@ -0,0 +1,40 @@ +# These settings were set by the catalyst build script that automatically +# built this stage. +# Please consult /usr/share/portage/config/make.conf.example for a more +# detailed example. +CFLAGS="-O2 -pipe -march=haswell -fomit-frame-pointer" +CXXFLAGS="${CFLAGS}" +MAKEOPTS="-j{{ grains['num_cpus'] + 1 }}" + +# NOTE: This stage was built with the bindist Use flag enabled +PORTDIR="/usr/portage" +DISTDIR="/usr/portage/distfiles" +PKGDIR="/usr/portage/packages" + +# This sets the language of build output to English. +# Please keep this setting intact when reporting bugs. +LC_MESSAGES=C + +GENTOO_MIRRORS="ftp://ftp.mirrorservice.org/sites/distfiles.gentoo.org/" + +USE="X alsa -pulseaudio pcsc-lite -bindist -cups -ldap libressl wayland unicode ipv6 ipv4" +GRUB_PLATFORMS="efi-64" + +VIDEO_CARDS="{{ video_cards }}" +INPUT_DEVICES="libinput" + +{% if testing == True %} +ACCEPT_KEYWORDS="~amd64" +{% endif %} + +RUBY_TARGETS="ruby25" + +PORTAGE_NICENESS="19" + +FEATURES="buildpkg sign" +PORTAGE_GPG_KEY="BA1CE947376048A4B3C4D4E50B3B880CF5E7FCB3" + +EMERGE_DEFAULT_OPTS="-av --quiet-build=y" +PORTAGE_IONICE_COMMAND="ionice -c 3 -p \${PID}" + +CURL_SSL="libressl" diff --git a/states/portage/init.sls b/states/portage/init.sls new file mode 100644 index 0000000..347770e --- /dev/null +++ b/states/portage/init.sls @@ -0,0 +1,18 @@ +/etc/portage/make.conf: + file.managed: + - source: salt://portage/files/make.conf + - template: jinja + - user: root + - group: root + - mode: 644 + - context: +{% if grains['host'] == 'strontium' %} + testing: False +{% else %} + testing: True +{% endif %} +{% if grains['host'] == 'plutonium' %} + video_cards: nouveau +{% else %} + video_cards: intel +{% endif %} diff --git a/states/setup-gentoo.sls b/states/setup-gentoo.sls index e69de29..0702822 100644 --- a/states/setup-gentoo.sls +++ b/states/setup-gentoo.sls @@ -0,0 +1,2 @@ +include: + - portage