Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: ultramarine-system-configs #37

Merged
merged 16 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions comps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<packagereq type="mandatory">ultramarine-repos-extras</packagereq>
<packagereq type="default">ultramarine-backgrounds-common</packagereq>
<packagereq type="default">ultramarine-backgrounds-compat</packagereq>
<packagereq type="default">ultramarine-system-configs</packagereq>
<packagereq type="default">system76-scheduler</packagereq>
<packagereq type="default">orca</packagereq>
<packagereq type="default">speech-dispatcher-espeak-ng</packagereq>
Expand Down
5 changes: 1 addition & 4 deletions ultramarine/release/ultramarine-release.spec
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
Summary: Ultramarine Linux release files
Name: ultramarine-release
Version: %{dist_version}
Release: 10%{?dist}
Release: 11%{?dist}
License: MIT
Source0: LICENSE
URL: https://ultramarine-linux.org
Expand Down Expand Up @@ -85,7 +85,6 @@ Source28: longer-default-shutdown-timeout.conf

Source31: enable-kwin-system76-scheduler-integration.service
Source32: org.projectatomic.rpmostree1.rules
Source33: 50-ultramarine-networking.conf
Source34: ultramarine.urls

Source40: https://github.com/Ultramarine-Linux/xfce-config/archive/%{xfce_conf_commit}.tar.gz
Expand Down Expand Up @@ -853,7 +852,6 @@ cp -pr %{SOURCE54} %{buildroot}%{_sysconfdir}/anaconda/profile.d/ultramarine-xfc

# sysctls
mkdir -p %{buildroot}%{_prefix}/lib/sysctl.d/
cp -pr %{SOURCE33} %{buildroot}%{_prefix}/lib/sysctl.d/50-ultramarine-networking.conf


#########################
Expand Down Expand Up @@ -974,7 +972,6 @@ install -Dm0644 %{SOURCE32} -t %{buildroot}%{_datadir}/polkit-1/rules.d/
%{_sysconfdir}/anaconda/profile.d/ultramarine-gnome.conf
%{_sysconfdir}/anaconda/profile.d/ultramarine-kde.conf
%{_sysconfdir}/anaconda/profile.d/ultramarine-xfce.conf
%{_prefix}/lib/sysctl.d/50-ultramarine-networking.conf
%license licenses/LICENSE licenses/README.license
%{_prefix}/lib/ultramarine-release
%{_prefix}/lib/systemd/user.conf.d/*
Expand Down
6 changes: 6 additions & 0 deletions ultramarine/ultramarine-system-configs/anda.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
project "pkg" {
rpm {
spec = "ultramarine-system-configs.spec"
sources = "."
}
}
4 changes: 4 additions & 0 deletions ultramarine/ultramarine-system-configs/bbr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Enables the tcp_bbr kernel module
# to enable the BBR congestion control algorithm by Google
# https://cloud.google.com/blog/products/gcp/tcp-bbr-congestion-control-comes-to-gcp-your-internet-just-got-faster
tcp_bbr
4 changes: 4 additions & 0 deletions ultramarine/ultramarine-system-configs/journal-cleanup.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# /etc/systemd/journald.conf.d/journal-cleanup.conf
[Journal]
SystemMaxUse=200M
Compress=yes
korewaChino marked this conversation as resolved.
Show resolved Hide resolved
17 changes: 17 additions & 0 deletions ultramarine/ultramarine-system-configs/networking-tweaks.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Enables MTU Probing for IPv4
# Fixes a quirk with some home network setups and
# some applications/games that have QoS issues with large packets
# e.g. Minecraft, Ubisoft Connect, etc.
# https://blog.cloudflare.com/path-mtu-discovery-in-practice/
# https://www.reddit.com/r/linux_gaming/comments/10oc0dq/comment/j6e0ds2
net.ipv4.tcp_mtu_probing=1

# Enable TCP Fast Open
# Reduces latency for opening connections
# https://lwn.net/Articles/508865/
net.ipv4.tcp_fastopen=3
korewaChino marked this conversation as resolved.
Show resolved Hide resolved

# Enable BBR Congestion Control
# Requires the tcp_bbr module to be loaded, defined in /etc/modules-load.d/bbr.conf
net.core.default_qdisc = cake
korewaChino marked this conversation as resolved.
Show resolved Hide resolved
net.ipv4.tcp_congestion_control = bbr
13 changes: 13 additions & 0 deletions ultramarine/ultramarine-system-configs/tmpfiles-cleanup.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# /etc/tmpfiles.d/tmp-clean.conf
# see tmpfiles.d(5)
# always enable /tmp directory cleaning
D! /tmp 1777 root root 0
korewaChino marked this conversation as resolved.
Show resolved Hide resolved

# remove files in /var/tmp older than 10 days
korewaChino marked this conversation as resolved.
Show resolved Hide resolved
D /var/tmp 1777 root root 10d

# namespace mountpoints (PrivateTmp=yes) are excluded from removal
korewaChino marked this conversation as resolved.
Show resolved Hide resolved
x /tmp/systemd-private-*
x /var/tmp/systemd-private-*
X /tmp/systemd-private-*/tmp
X /var/tmp/systemd-private-*/tmp
22 changes: 22 additions & 0 deletions ultramarine/ultramarine-system-configs/ultramarine-logrotate.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# /etc/logrotate.d/ultramarine-logrotate.conf

# see "man logrotate" for details

# global options do not affect preceding include directives

# rotate log files daily
daily

# keep 1 weeks worth of backlogs
rotate 1
korewaChino marked this conversation as resolved.
Show resolved Hide resolved

# create new (empty) log files after rotating old ones
create

# use date as a suffix of the rotated file
dateext

# uncomment this if you want your log files compressed
compress
korewaChino marked this conversation as resolved.
Show resolved Hide resolved

# system-specific logs may also be configured here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Name: ultramarine-system-configs
Version: 1
Release: 1%{?dist}
Summary: Various configuration files for a more comfortable Ultramarine desktop experience
BuildArch: noarch
License: MIT
URL: https://ultramarine-linux.org
Source0: journal-cleanup.conf
Source1: tmpfiles-cleanup.conf
Source2: ultramarine-logrotate.conf
Source3: networking-tweaks.conf
Source4: bbr.conf

BuildRequires: /usr/bin/install
Requires: systemd


%description
This package provides various systemd configurations
to optimize desktop resource usage and performance on Ultramarine Linux.

The configs attempt to reduce disk usage for journaling and logging, and
cleaning up of unused temporary files periodically.

%prep

%build



%install
install -Dm644 %{SOURCE0} %{buildroot}/etc/systemd/journald.conf.d/journal-cleanup.conf
install -Dm644 %{SOURCE1} %{buildroot}/etc/tmpfiles.d/tmpfiles-cleanup.conf
install -Dm644 %{SOURCE2} %{buildroot}/etc/logrotate.d/ultramarine-logrotate.conf
install -Dm644 %{SOURCE3} %{buildroot}/etc/sysctl.d/50-networking-tweaks.conf
install -Dm644 %{SOURCE4} %{buildroot}/etc/modules-load.d/bbr.conf

%files
%defattr(-,root,root,-)
%config /etc/systemd/journald.conf.d/journal-cleanup.conf
%config /etc/tmpfiles.d/tmpfiles-cleanup.conf
%config /etc/logrotate.d/ultramarine-logrotate.conf
%config /etc/sysctl.d/50-networking-tweaks.conf
%config /etc/modules-load.d/bbr.conf



%changelog
* Sat Aug 03 2024 Cappy Ishihara <[email protected]>
- Initial release
Loading