Merge pull request #20 from cyplo/fedora_automatic_updates

Enable automatic security updates for Fedora
This commit is contained in:
Cyryl Płotnicki 2016-08-01 08:29:36 +02:00 committed by GitHub
commit 716e38070d
7 changed files with 65 additions and 8 deletions

View file

@ -14,7 +14,7 @@ done
set -e set -e
eval $install_packages eval $install_packages
if [[ -z $DONT_START_TOR ]]; then if [[ -z $NO_SYSTEMCTL ]]; then
sudo systemctl enable tor sudo systemctl enable tor
sudo systemctl start tor sudo systemctl start tor
fi fi

View file

@ -4,7 +4,7 @@ set -e
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
export DONT_CHANGE_SHELL=true export DONT_CHANGE_SHELL=true
export DONT_START_TOR=true export NO_SYSTEMCTL=true
echo "APT::Acquire::Retries=16;" >> /etc/apt/apt.conf.d/99_retries echo "APT::Acquire::Retries=16;" >> /etc/apt/apt.conf.d/99_retries

View file

@ -4,19 +4,30 @@ set -e
#software and shell #software and shell
sudo dnf -y upgrade --best --allowerasing sudo dnf -y upgrade --best --allowerasing
sudo dnf -y --best --allowerasing install vim tmux atop zsh thunderbird thunderbird-enigmail thunderbird-lightning firefox aria2 gajim lm_sensors freecad python3-pip qt5-qtbase-devel qt5-qtwebkit-devel meld whois curl pv tor torsocks nodejs terminator gsmartcontrol python-pip mercurial python-devel libxslt-devel libjpeg-turbo-devel conky conky-manager redshift redshift-gtk cmake gtk2-devel intltool gparted wine solaar glances the_silver_searcher dkms kernel-devel gimp transmission-gtk git xz util-linux-user powertop sudo dnf -y --best --allowerasing install vim tmux atop zsh thunderbird thunderbird-enigmail thunderbird-lightning firefox aria2 gajim lm_sensors freecad python3-pip qt5-qtbase-devel qt5-qtwebkit-devel meld whois curl pv tor torsocks nodejs terminator gsmartcontrol python-pip mercurial python-devel libxslt-devel libjpeg-turbo-devel conky conky-manager redshift redshift-gtk cmake gtk2-devel intltool gparted wine solaar glances the_silver_searcher dkms kernel-devel gimp transmission-gtk git xz util-linux-user powertop dnf-automatic
FEDORA_VERSION=`rpm -E %fedora` FEDORA_VERSION=`rpm -E %fedora`
sudo dnf -y install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$FEDORA_VERSION.noarch.rpm sudo dnf -y install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$FEDORA_VERSION.noarch.rpm
sudo dnf -y install http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$FEDORA_VERSION.noarch.rpm sudo dnf -y install http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$FEDORA_VERSION.noarch.rpm
sudo dnf -y --best --allowerasing install vlc splix gutenprint-cups cups-bjnp keepass mplayer golang ncurses-compat-libs kicad retext sudo dnf -y --best --allowerasing install vlc splix gutenprint-cups cups-bjnp keepass mplayer golang ncurses-compat-libs kicad retext
sudo dnf -y groupinstall "C Development Tools and Libraries" sudo dnf -y groupinstall "C Development Tools and Libraries"
if [[ -z $DONT_START_TOR ]]; then DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
sudo cp -v /etc/dnf/automatic.conf /etc/dnf/automatic.conf.bak
sudo cp -v $DIR/etc/dnf/automatic.conf /etc/dnf/automatic.conf
set +e
sudo diff /etc/dnf/automatic.conf.bak /etc/dnf/automatic.conf
set -e
if [[ -z $NO_SYSTEMCTL ]]; then
sudo systemctl enable dnf-automatic.timer
sudo systemctl start dnf-automatic.timer
sudo systemctl list-timers "*dnf-*"
sudo systemctl enable tor sudo systemctl enable tor
sudo systemctl start tor sudo systemctl start tor
fi fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DIR="$DIR/../" DIR="$DIR/../"
DIR="$DIR" $DIR/common/configure_fresh_system DIR="$DIR" $DIR/common/configure_fresh_system

View file

@ -0,0 +1,46 @@
[commands]
# What kind of upgrade to perform:
# default = all available upgrades
# security = only the security upgrades
upgrade_type = security
random_sleep = 300
# Whether updates should be downloaded when they are available.
download_updates = yes
# Whether updates should be applied when they are available.
# Note that if this is set to no, downloaded packages will be left in the
# cache regardless of the keepcache setting.
apply_updates = yes
[emitters]
# Name to use for this system in messages that are emitted. Default is the
# hostname.
# system_name = my-host
# How to send messages. Valid options are stdio, email and motd. If
# emit_via includes stdio, messages will be sent to stdout; this is useful
# to have cron send the messages. If emit_via includes email, this
# program will send email itself according to the configured options.
# If emit_via includes motd, /etc/motd file will have the messages.
# Default is email,stdio.
emit_via = stdio,email
[email]
# The address to send email messages from.
email_from = root
# List of addresses to send messages to.
email_to = admin@cyplo.net
# Name of the host to connect to to send email messages.
email_host = localhost
[base]
# This section overrides dnf.conf
# Use this to filter DNF core messages
debuglevel = 1

View file

@ -3,7 +3,7 @@
set -e set -e
export DONT_CHANGE_SHELL=true export DONT_CHANGE_SHELL=true
export DONT_START_TOR=true export NO_SYSTEMCTL=true
dnf -y install sudo dnf -y install sudo

View file

@ -15,7 +15,7 @@ done
set -e set -e
eval $install_packages eval $install_packages
if [[ -z $DONT_START_TOR ]]; then if [[ -z $NO_SYSTEMCTL ]]; then
sudo systemctl enable tor sudo systemctl enable tor
sudo systemctl start tor sudo systemctl start tor
fi fi

View file

@ -4,7 +4,7 @@ set -e
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
export DONT_CHANGE_SHELL=true export DONT_CHANGE_SHELL=true
export DONT_START_TOR=true export NO_SYSTEMCTL=true
echo "APT::Acquire::Retries=16;" >> /etc/apt/apt.conf.d/99_retries echo "APT::Acquire::Retries=16;" >> /etc/apt/apt.conf.d/99_retries