Changeset View
Changeset View
Standalone View
Standalone View
actions.py
| from pisi.actionsapi import shelltools | from pisi.actionsapi import shelltools | ||||
| from pisi.actionsapi import autotools | from pisi.actionsapi import autotools | ||||
| from pisi.actionsapi import pisitools | from pisi.actionsapi import pisitools | ||||
| from pisi.actionsapi import get | from pisi.actionsapi import get | ||||
| def install(): | def install(): | ||||
| def do_chmod(path, mode): | def do_chmod(path, mode): | ||||
| path = "%s/%s" %(get.installDIR(), path) | path = "%s/%s" % (get.installDIR(), path) | ||||
| shelltools.chmod(path, mode=mode) | shelltools.chmod(path, mode=mode) | ||||
| # Install everything | # Install everything | ||||
| pisitools.insinto("/", "root/*") | pisitools.insinto("/", "root/*") | ||||
| for dire in ["/tmp", "/var/tmp", "/dev", "/usr/lib64", "/lib64", "/proc", "/sys", "/run/lock", "/root", "/home", "/run", "/media"]: | for dire in [ | ||||
| "/tmp", "/var/tmp", "/dev", "/usr/lib64", "/lib64", "/proc", | |||||
| "/sys", "/run/lock", "/root", "/home", "/run", "/media" | |||||
| ]: | |||||
| pisitools.dodir(dire) | pisitools.dodir(dire) | ||||
| # Adjust permissions | # Adjust permissions | ||||
| do_chmod("/tmp", 01777) | do_chmod("/tmp", 01777) | ||||
| do_chmod("/var/tmp", 01777) | do_chmod("/var/tmp", 01777) | ||||
| do_chmod("/run/lock", 0775) | do_chmod("/run/lock", 0775) | ||||
| do_chmod("/usr/share/baselayout/shadow", 0600) | do_chmod("/usr/share/baselayout/shadow", 0600) | ||||
| do_chmod("/dev", 0755) | do_chmod("/dev", 0755) | ||||
| do_chmod("/proc", 0555) | do_chmod("/proc", 0555) | ||||
| do_chmod("/sys", 0755) | do_chmod("/sys", 0755) | ||||
| do_chmod("/home", 0755) | do_chmod("/home", 0755) | ||||
| do_chmod("/run", 0755) | do_chmod("/run", 0755) | ||||
| do_chmod("/media", 0755) | do_chmod("/media", 0755) | ||||
| pisitools.dosym("../run", "/var/run") | pisitools.dosym("../run", "/var/run") | ||||
| pisitools.dosym("../run/lock", "/var/lock") | pisitools.dosym("../run/lock", "/var/lock") | ||||
| pisitools.dosym("lib64", "/lib") | pisitools.dosym("lib64", "/lib") | ||||
| pisitools.dosym("lib64", "/usr/lib") | pisitools.dosym("lib64", "/usr/lib") | ||||
JoshStrobl: Nonono. We should not be symlinking this, it should only ever be created by the user per… | |||||
Done Inline Actions@JoshStrobl I remember the reason I did this symlink here now. This was initially @ermo's suggestion and I also think it is a good idea. This is necessary to ensure consistent behaviors among lightdm, sddm and gdm. sddm and gdm looks for /etc/xprofile by default. I tried to make lightdm source /etc/xprofile in D8984. If we don't add this symlink and modify D8984 accordingly, we will only have lightdm source the system xprofile. gdm and sddm won't source that unless a patch is created for that purpose. xulongwu4: @JoshStrobl I remember the reason I did this symlink here now. This was initially @ermo's… | |||||
| pisitools.dosym("/proc/self/mounts", "/etc/mtab") | pisitools.dosym("/proc/self/mounts", "/etc/mtab") | ||||
| # Write out a default .profile.. temporary | # Write out a default .profile.. temporary | ||||
| shelltools.echo("%s/etc/skel/.profile" % get.installDIR(), "source /usr/share/defaults/etc/profile") | shelltools.echo("%s/etc/skel/.profile" % get.installDIR(), | ||||
| shelltools.echo("%s/etc/skel/.bashrc" % get.installDIR(), "source /usr/share/defaults/etc/profile") | "source /usr/share/defaults/etc/profile") | ||||
| shelltools.echo("%s/etc/nsswitch.conf" % get.installDIR(), "hosts: files dns") | shelltools.echo("%s/etc/skel/.bashrc" % get.installDIR(), | ||||
| "source /usr/share/defaults/etc/profile") | |||||
| shelltools.echo("%s/etc/nsswitch.conf" % get.installDIR(), | |||||
| "hosts: files dns") | |||||
| # Remove legacy boot link | # Remove legacy boot link | ||||
| pisitools.remove("/boot/boot") | pisitools.remove("/boot/boot") | ||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.
Nonono. We should not be symlinking this, it should only ever be created by the user per statelessness.