From e905d82d1910657fb17cb73ac132f56bfb39d085 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 12 Nov 2019 08:21:08 +0100 Subject: moving from skeleton to extra, and removing dnns.no --- mkosi.extra/etc/apt/apt.conf.d/20auto-upgrades | 9 ++++++ .../etc/apt/apt.conf.d/50unattended-upgrades | 34 ++++++++++++++++++++++ mkosi.extra/etc/nginx/sites-available/cgit | 16 ++++++++++ mkosi.postinst | 3 +- mkosi.skeleton/etc/apt/apt.conf.d/20auto-upgrades | 9 ------ .../etc/apt/apt.conf.d/50unattended-upgrades | 34 ---------------------- mkosi.skeleton/root/nginx.git.dnns.no | 19 ------------ 7 files changed, 60 insertions(+), 64 deletions(-) create mode 100644 mkosi.extra/etc/apt/apt.conf.d/20auto-upgrades create mode 100644 mkosi.extra/etc/apt/apt.conf.d/50unattended-upgrades create mode 100644 mkosi.extra/etc/nginx/sites-available/cgit delete mode 100644 mkosi.skeleton/etc/apt/apt.conf.d/20auto-upgrades delete mode 100644 mkosi.skeleton/etc/apt/apt.conf.d/50unattended-upgrades delete mode 100644 mkosi.skeleton/root/nginx.git.dnns.no diff --git a/mkosi.extra/etc/apt/apt.conf.d/20auto-upgrades b/mkosi.extra/etc/apt/apt.conf.d/20auto-upgrades new file mode 100644 index 0000000..4c725ab --- /dev/null +++ b/mkosi.extra/etc/apt/apt.conf.d/20auto-upgrades @@ -0,0 +1,9 @@ +APT::Periodic::Unattended-Upgrade "1"; + +APT::Periodic::Update-Package-Lists "1"; + + +APT::Periodic::AutocleanInterval "7"; + + + diff --git a/mkosi.extra/etc/apt/apt.conf.d/50unattended-upgrades b/mkosi.extra/etc/apt/apt.conf.d/50unattended-upgrades new file mode 100644 index 0000000..768347b --- /dev/null +++ b/mkosi.extra/etc/apt/apt.conf.d/50unattended-upgrades @@ -0,0 +1,34 @@ +// Unattended-Upgrade::Origins-Pattern controls which packages are +// upgraded. +Unattended-Upgrade::Origins-Pattern { + "origin=Ubuntu,archive=${distro_codename}-security"; + "o=Ubuntu,a=${distro_codename}"; + "o=Ubuntu,a=${distro_codename}-updates"; + "o=Ubuntu,a=${distro_codename}-proposed-updates"; + "o=Ubuntu,n=${distro_codename}-backports"; + }; + +// List of packages to not update (regexp are supported) +Unattended-Upgrade::Package-Blacklist { +}; + + +// Split the upgrade into the smallest possible chunks so that +// they can be interrupted with SIGUSR1. This makes the upgrade +// a bit slower but it has the benefit that shutdown while a upgrade +// is running is possible (with a small delay) +Unattended-Upgrade::MinimalSteps "true"; + + +// Do automatic removal of new unused dependencies after the upgrade +// (equivalent to apt-get autoremove) +Unattended-Upgrade::Remove-Unused-Dependencies "true"; + + +// Do upgrade application even if it requires restart after upgrade +// I.e. "XB-Upgrade-Requires: app-restart" is set in the debian/control file +Unattended-Upgrade::IgnoreAppsRequireRestart "true"; + +// Automatically run "dpkg --force-confold --configure -a". +Unattended-Upgrade::AutoFixInterruptedDpkg "true"; + diff --git a/mkosi.extra/etc/nginx/sites-available/cgit b/mkosi.extra/etc/nginx/sites-available/cgit new file mode 100644 index 0000000..c243ec9 --- /dev/null +++ b/mkosi.extra/etc/nginx/sites-available/cgit @@ -0,0 +1,16 @@ +server { + listen 8305 default_server; + listen [::]:8305 default_server; + server_name cgit; + + location / { + fastcgi_pass unix:/run/fcgiwrap.socket; + fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi; + fastcgi_param PATH_INFO $uri; + fastcgi_param QUERY_STRING $args; + } + + location /cgit { + alias /usr/share/cgit; + } +} diff --git a/mkosi.postinst b/mkosi.postinst index d1b1ed9..7e22768 100755 --- a/mkosi.postinst +++ b/mkosi.postinst @@ -15,6 +15,5 @@ groupadd --gid 997 --system git useradd --home-dir /var/lib/gitolite3 --system --gid 997 git adduser www-data git -mv /root/nginx.git.dnns.no /etc/nginx/sites-available/git.dnns.no rm /etc/nginx/sites-enabled/default -ln -s /etc/nginx/sites-available/git.dnns.no /etc/nginx/sites-enabled/ +ln -s /etc/nginx/sites-available/cgit /etc/nginx/sites-enabled/ diff --git a/mkosi.skeleton/etc/apt/apt.conf.d/20auto-upgrades b/mkosi.skeleton/etc/apt/apt.conf.d/20auto-upgrades deleted file mode 100644 index 4c725ab..0000000 --- a/mkosi.skeleton/etc/apt/apt.conf.d/20auto-upgrades +++ /dev/null @@ -1,9 +0,0 @@ -APT::Periodic::Unattended-Upgrade "1"; - -APT::Periodic::Update-Package-Lists "1"; - - -APT::Periodic::AutocleanInterval "7"; - - - diff --git a/mkosi.skeleton/etc/apt/apt.conf.d/50unattended-upgrades b/mkosi.skeleton/etc/apt/apt.conf.d/50unattended-upgrades deleted file mode 100644 index 768347b..0000000 --- a/mkosi.skeleton/etc/apt/apt.conf.d/50unattended-upgrades +++ /dev/null @@ -1,34 +0,0 @@ -// Unattended-Upgrade::Origins-Pattern controls which packages are -// upgraded. -Unattended-Upgrade::Origins-Pattern { - "origin=Ubuntu,archive=${distro_codename}-security"; - "o=Ubuntu,a=${distro_codename}"; - "o=Ubuntu,a=${distro_codename}-updates"; - "o=Ubuntu,a=${distro_codename}-proposed-updates"; - "o=Ubuntu,n=${distro_codename}-backports"; - }; - -// List of packages to not update (regexp are supported) -Unattended-Upgrade::Package-Blacklist { -}; - - -// Split the upgrade into the smallest possible chunks so that -// they can be interrupted with SIGUSR1. This makes the upgrade -// a bit slower but it has the benefit that shutdown while a upgrade -// is running is possible (with a small delay) -Unattended-Upgrade::MinimalSteps "true"; - - -// Do automatic removal of new unused dependencies after the upgrade -// (equivalent to apt-get autoremove) -Unattended-Upgrade::Remove-Unused-Dependencies "true"; - - -// Do upgrade application even if it requires restart after upgrade -// I.e. "XB-Upgrade-Requires: app-restart" is set in the debian/control file -Unattended-Upgrade::IgnoreAppsRequireRestart "true"; - -// Automatically run "dpkg --force-confold --configure -a". -Unattended-Upgrade::AutoFixInterruptedDpkg "true"; - diff --git a/mkosi.skeleton/root/nginx.git.dnns.no b/mkosi.skeleton/root/nginx.git.dnns.no deleted file mode 100644 index a43e4fb..0000000 --- a/mkosi.skeleton/root/nginx.git.dnns.no +++ /dev/null @@ -1,19 +0,0 @@ -server { - listen 8305 default_server; - listen [::]:8305 default_server; - server_name git.dnns.no; - - access_log /var/log/nginx/git.dnns.no-access.log; - error_log /var/log/nginx/git.dnns.no-error.log; - - location / { - fastcgi_pass unix:/run/fcgiwrap.socket; - fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi; - fastcgi_param PATH_INFO $uri; - fastcgi_param QUERY_STRING $args; - } - - location /cgit { - alias /usr/share/cgit; - } -} -- cgit v1.2.3