Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Description: System and service manager
- # URL: https://www.github.com/systemd/systemd
- # Maintainer: protonesso, nagakamira at gmail dot com
- # Depends on: meson pam libcap shadow xz lz4 kmod libelf iptables util-linux gperf
- # Section: base
- name=systemd
- version=244.3
- release=1
- backup=('etc/systemd/coredump.conf'
- 'etc/systemd/journald.conf'
- 'etc/systemd/journal-remote.conf'
- 'etc/systemd/journal-upload.conf'
- 'etc/systemd/logind.conf'
- 'etc/systemd/networkd.conf'
- 'etc/systemd/sleep.conf'
- 'etc/systemd/system.conf'
- 'etc/systemd/timesyncd.conf'
- 'etc/systemd/user.conf'
- 'etc/udev/udev.conf')
- source=("https://github.com/systemd/systemd-stable/archive/v${version}.tar.gz")
- build() {
- cd "$SRC"/$name-$version
- patch -Np1 -i "$STUFF"/systemd/0001-fix-building-on-musl-libc.patch
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -e 's/GROUP="tape"/GROUP="storage"/' \
- -e 's/GROUP="cdrom"/GROUP="optical"/' \
- -i rules/*.rules
- mkdir -p build
- cd build
- hidoi-meson "$SRC"/$name-$version \
- -Ddbuspolicydir=/usr/share/dbus-1/system.d \
- -Ddefault-hierarchy=hybrid \
- -Ddefault-kill-user-processes=false \
- -Ddefault-locale=C \
- -Ddns-servers="1.1.1.1 1.0.0.1 9.9.9.9 8.8.8.8 8.8.4.4 2606:4700:4700::1111 2620:fe::10 2001:4860:4860::8888" \
- -Dfallback-hostname='hidoi' \
- -Dgnu-efi=false \
- -Dgshadow=false \
- -Dhtml=false \
- -Dima=false \
- -Dldconfig=false \
- -Dlibidn2=true \
- -Dlz4=true \
- -Dman=false \
- -Dman=true \
- -Dnologin-path=/usr/bin/nologin \
- -Dnss-myhostname=false \
- -Dnss-mymachines=false \
- -Dnss-resolve=false \
- -Dnss-systemd=false \
- -Dntp-servers="0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org" \
- -Dresolve=false \
- -Dsysvinit-path= \
- -Dsysvrcnd-path= \
- -Dutmp=false
- ninja
- DESTDIR="$PKG" ninja install
- rm "$PKG"/usr/share/factory/etc/{issue,nsswitch.conf}
- sed -i -e '/^C \/etc\/nsswitch\.conf/d' \
- -e '/^C \/etc\/issue/d' "$PKG"/usr/lib/tmpfiles.d/etc.conf
- echo 'disable *' >"$PKG"/usr/lib/systemd/system-preset/99-default.preset
- cat > "$PKG"/usr/lib/udev/rules.d/60-block.rules << "EOF"
- # set bfq by default
- ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/scheduler}="bfq"
- ACTION=="add|change", KERNEL=="nvme[0-9]", ATTR{queue/scheduler}="bfq"
- ACTION=="add|change", KERNEL=="mmcblk[0-9]", ATTR{queue/scheduler}="bfq"
- EOF
- rm -rf "$PKG"/usr/lib/udev/rules.d/75-mac-spoof.rules
- cat > "$PKG"/usr/lib/udev/rules.d/75-mac-spoof.rules << "EOF"
- # spoof mac address
- ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="XX:XX:XX:XX:XX:XX", RUN+="/usr/bin/ip link set dev $name address YY:YY:YY:YY:YY:YY"
- EOF
- install -d -o root -g 190 -m 2755 "$PKG"/var/log/journal
- install -d -o root -g 102 -m 0750 "$PKG"/usr/share/polkit-1/rules.d
- mkdir -p "$PKG"/etc/systemd/system/getty.target.wants "$PKG"/etc/systemd/system/multi-user.target.wants
- ln -sf /usr/lib/systemd/system/getty@.service "$PKG"/etc/systemd/system/getty.target.wants/getty@tty1.service
- ln -sf /usr/lib/systemd/system/remote-fs.target "$PKG"/etc/systemd/system/multi-user.target.wants/remote-fs.target
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement