SHARE
TWEET

Untitled

a guest Feb 21st, 2020 218 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Description: System and service manager
  2. # URL:         https://www.github.com/systemd/systemd
  3. # Maintainer:  protonesso, nagakamira at gmail dot com
  4. # Depends on:  meson pam libcap shadow xz lz4 kmod libelf iptables util-linux gperf
  5. # Section:     base
  6.  
  7. name=systemd
  8. version=244.3
  9. release=1
  10. backup=('etc/systemd/coredump.conf'
  11.     'etc/systemd/journald.conf'
  12.     'etc/systemd/journal-remote.conf'
  13.     'etc/systemd/journal-upload.conf'
  14.     'etc/systemd/logind.conf'
  15.     'etc/systemd/networkd.conf'
  16.     'etc/systemd/sleep.conf'
  17.     'etc/systemd/system.conf'
  18.     'etc/systemd/timesyncd.conf'
  19.     'etc/systemd/user.conf'
  20.     'etc/udev/udev.conf')
  21. source=("https://github.com/systemd/systemd-stable/archive/v${version}.tar.gz")
  22.  
  23. build() {
  24.     cd "$SRC"/$name-$version
  25.     patch -Np1 -i "$STUFF"/systemd/0001-fix-building-on-musl-libc.patch
  26.  
  27.     sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
  28.         -e 's/GROUP="tape"/GROUP="storage"/' \
  29.         -e 's/GROUP="cdrom"/GROUP="optical"/' \
  30.         -i rules/*.rules
  31.  
  32.     mkdir -p build
  33.     cd build
  34.     hidoi-meson "$SRC"/$name-$version \
  35.         -Ddbuspolicydir=/usr/share/dbus-1/system.d \
  36.         -Ddefault-hierarchy=hybrid \
  37.         -Ddefault-kill-user-processes=false \
  38.         -Ddefault-locale=C \
  39.         -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" \
  40.         -Dfallback-hostname='hidoi' \
  41.         -Dgnu-efi=false \
  42.         -Dgshadow=false \
  43.         -Dhtml=false \
  44.         -Dima=false \
  45.         -Dldconfig=false \
  46.         -Dlibidn2=true \
  47.         -Dlz4=true \
  48.         -Dman=false \
  49.         -Dman=true \
  50.         -Dnologin-path=/usr/bin/nologin \
  51.         -Dnss-myhostname=false \
  52.         -Dnss-mymachines=false \
  53.         -Dnss-resolve=false \
  54.         -Dnss-systemd=false \
  55.         -Dntp-servers="0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org" \
  56.         -Dresolve=false \
  57.         -Dsysvinit-path= \
  58.         -Dsysvrcnd-path= \
  59.         -Dutmp=false
  60.     ninja
  61.     DESTDIR="$PKG" ninja install
  62.  
  63.     rm "$PKG"/usr/share/factory/etc/{issue,nsswitch.conf}
  64.     sed -i -e '/^C \/etc\/nsswitch\.conf/d' \
  65.         -e '/^C \/etc\/issue/d' "$PKG"/usr/lib/tmpfiles.d/etc.conf
  66.  
  67.     echo 'disable *' >"$PKG"/usr/lib/systemd/system-preset/99-default.preset
  68.  
  69.  
  70. cat > "$PKG"/usr/lib/udev/rules.d/60-block.rules << "EOF"
  71. # set bfq by default
  72. ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/scheduler}="bfq"
  73. ACTION=="add|change", KERNEL=="nvme[0-9]", ATTR{queue/scheduler}="bfq"
  74. ACTION=="add|change", KERNEL=="mmcblk[0-9]", ATTR{queue/scheduler}="bfq"
  75. EOF
  76.  
  77.     rm -rf "$PKG"/usr/lib/udev/rules.d/75-mac-spoof.rules
  78. cat > "$PKG"/usr/lib/udev/rules.d/75-mac-spoof.rules << "EOF"
  79. # spoof mac address
  80. 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"
  81. EOF
  82.  
  83.     install -d -o root -g 190 -m 2755 "$PKG"/var/log/journal
  84.     install -d -o root -g 102 -m 0750 "$PKG"/usr/share/polkit-1/rules.d
  85.  
  86.     mkdir -p "$PKG"/etc/systemd/system/getty.target.wants "$PKG"/etc/systemd/system/multi-user.target.wants
  87.     ln -sf /usr/lib/systemd/system/getty@.service "$PKG"/etc/systemd/system/getty.target.wants/getty@tty1.service
  88.     ln -sf /usr/lib/systemd/system/remote-fs.target "$PKG"/etc/systemd/system/multi-user.target.wants/remote-fs.target
  89. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top