X-Git-Url: https://piware.de/gitweb/?p=bin.git;a=blobdiff_plain;f=postinst-setup-fedora;fp=postinst-setup-fedora;h=ceb2cdf50cccab0ea27621ab409e02828984993e;hp=0000000000000000000000000000000000000000;hb=be042a6dddd56493b53747c7ba89774cbe6a6537;hpb=d3e8637d76cf3ee8591418fae7b9498458b6c58c diff --git a/postinst-setup-fedora b/postinst-setup-fedora new file mode 100755 index 0000000..ceb2cdf --- /dev/null +++ b/postinst-setup-fedora @@ -0,0 +1,71 @@ +#!/bin/sh +set -e + +# remove stuff that we do not need +dnf remove -y mdadm mlocate nano rsyslog sssd telnet trousers rxvt-unicode abrt plymouth linux-atm-libs quota realmd selinux-policy || true + +# install stuff that we do want +dnf install -y iwl6000g2a-firmware NetworkManager-wifi \ + sudo ecryptfs-utils vim-enhanced iwl6000g2a-firmware \ + xorg-x11-server-Xorg xorg-x11-drv-libinput xorg-x11-drv-intel \ + dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts \ + xorg-x11-server-utils xorg-x11-utils xbacklight \ + i3 i3lock lxdm wmctrl dunst pcmanfm gvfs-mtp \ + pavucontrol pulseaudio-utils alsa-plugins-pulseaudio \ + gstreamer1-plugin-mpg123 gstreamer1-plugins-good \ + qemu-kvm qemu-img openvpn mutt weechat pidgin-otr \ + pandoc texlive-beamer texlive-latex-bin texlive-collection-fontsrecommended \ + texlive-hyphen-german texlive-hyphen-english \ + gnome-terminal firefox network-manager-applet evince shotwell rhythmbox \ + offlineimap gnome-keyring pinentry-gnome3 \ + postfix duplicity systemd-container gnome-disk-utility powertop \ + git gtimelog libappindicator-gtk3 \ + schroot mock \ + +# TODO: restore /etc git + +# other setup +grep -q /ubuntu /etc/fstab || cat << EOF >> /etc/fstab + +tmpfs /var/tmp tmpfs defaults 0 0 +tmpfs /var/lib/mock tmpfs defaults 0 0 +/proc /ubuntu/proc none bind 0 0 +/sys /ubuntu/sys none bind 0 0 +/dev /ubuntu/dev none rbind 0 0 +/home /ubuntu/home none rbind 0 0 +/srv /ubuntu/srv none bind 0 0 +/tmp /ubuntu/tmp none bind 0 0 +EOF + +systemctl enable ubuntu-apt-cacher-ng + +# have schroot use tmpfs +rmdir /var/lib/schroot/unpack +ln -s /tmp /var/lib/schroot/unpack + +# root's ssh stuff +if [ ! -d /root/.ssh ] && [ -d /home/martin/.ssh ]; then + mkdir -p /root/.ssh + chmod 700 /root/.ssh + cp /home/martin/.ssh/id_rsa* /home/martin/.ssh/known_hosts /home/martin/.ssh/config /root/.ssh/ +fi + +# disable SELinux to unbreak ecryptfs +sed -i '/^SELINUX=/ s/=.*$/=disabled/' /etc/selinux/config +setenforce 0 || true + +rm -f /etc/systemd/system/default.target +systemctl set-default graphical.target + +systemctl enable --now postfix + +# create user +groupadd --gid 1000 martin +useradd --comment "Martin Pitt" --uid 1000 --gid 1000 --groups wheel,ecryptfs,mock martin +passwd martin + +# crontabs +crontab -u martin - </dev/null +EOF