def setup(): inarytools.flags.add("-fPIC") inarytools.dosed("makeinclude.in", "^(docdir.*)$", r"\1/html") autotools.autoconf() options = "\ --enable-gl \ --enable-shared \ --enable-threads \ " if get.buildTYPE() == "emul32": shelltools.export("CFLAGS", "-m32") shelltools.export("CXXFLAGS", "-m32") options += "--prefix=/emul32 \ --libdir=/usr/lib32 \ --with-optim='%s' \ " % get.CFLAGS() elif get.ARCH() == "x86_64": options += "--with-optim='%s' \ " % get.CFLAGS() autotools.configure(options)
def setup(): inarytools.dosed("Configure", " $prefix/$libdir/engines ", " /%{_lib}/engines ") options = " --prefix=/usr \ --libdir=lib \ --openssldir=/etc/ssl \ shared -Wa,--noexecstack \ zlib enable-camellia enable-idea \ enable-seed enable-rfc3779 enable-rc5 \ enable-cms enable-md2 enable-mdc2 threads" if get.buildTYPE() == "_emul32": options += " --prefix=/_emul32 --libdir=lib32".format(get.installDIR()) shelltools.export("CC", "%s -m32" % get.CC()) shelltools.export("CXX", "%s -m32" % get.CXX()) shelltools.system("./Configure linux-elf %s" % options) shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig") elif get.ARCH() == "i686": shelltools.system("./Configure linux-elf %s" % options) inarytools.dosed("Makefile", "^(SHARED_LDFLAGS=).*", "\\1 ${LDFLAGS}") inarytools.dosed("Makefile", "^(CFLAG=.*)", "\\1 ${CFLAGS}") else: options += " enable-ec_nistp_64_gcc_128" shelltools.system("./Configure linux-x86_64 %s" % options) inarytools.dosed("Makefile", "^(SHARED_LDFLAGS=).*", "\\1 ${LDFLAGS}") inarytools.dosed("Makefile", "^(CFLAG=.*)", "\\1 ${CFLAGS}")
def install(): for i in {"/bin", "/sbin", "/lib", "/lib32", "/etc", "/media", "/boot", "/mnt", "/opt", "/tmp", "/var/tmp", "/var/lock", "/usr", "/usr/bin", "/usr/lib", "/usr/lib32", "/usr/share", "/run", "/run/shm", "/usr/local", "/usr/local/bin", "/usr/local/lib", "/usr/local/lib32"}: inarytools.dodir(i) autotools.rawInstall("DESTDIR={}".format(get.installDIR())) def chmod(path, mode): shelltools.chmod("%s%s" % (get.installDIR(), path), mode) # Adjust permissions chmod("/tmp", 0o1777) chmod("/var/tmp", 0o1777) chmod("/run/shm", 0o1777) chmod("/var/lock", 0o775) chmod("/usr/share/baselayout/shadow", 0o600) inarytools.dosym("/run","/var/run") if get.ARCH() == "x86_64": # Directories for 32bit libraries inarytools.dodir("/lib32") inarytools.dodir("/usr/lib32") # Hack for binary blobs built on multi-lib systems inarytools.dosym("lib", "/lib64") inarytools.dosym("sulin-release", "/etc/system-release")
def build(): global CONFIGPARAMS shelltools.cd(NCURSESW) autotools.make() if not get.buildTYPE() == "_emul32" and get.ARCH() == "x86_64": CONFIGPARAMS += " --with-chtype=long" shelltools.cd("../%s" % NCURSES) shelltools.system("%s/configure %s" % (WORKDIR, CONFIGPARAMS)) autotools.make()
def setup(): # use system zlib shelltools.unlinkDir("cpan/Compress-Raw-Zlib/zlib-src") inarytools.dosed("MANIFEST", "zlib-src", deleteLine=True) inarytools.dosed("cpan/Compress-Raw-Zlib/config.in", "(BUILD_ZLIB\s+=\s)True", r"\1False") inarytools.dosed("cpan/Compress-Raw-Zlib/config.in", "(INCLUDE\s+=\s)\.\/zlib-src", r"\1/usr/include") inarytools.dosed("cpan/Compress-Raw-Zlib/config.in", "(LIB\s+=\s)\.\/zlib-src", r"\1/usr/lib") shelltools.export("LC_ALL", "C") #fix one of tests #shelltools.system('sed -i "s#version vutil.c .*#version vutil.c f1c7e4778fcf78c04141f562b80183b91cbbf6c9#" t/porting/customized.dat') shelltools.system('sh Configure -des \ -Darchname=%s-linux \ -Dcccdlflags=-fPIC \ -Dusedevel \ -Dccdlflags="-rdynamic -Wl,--enable-new-dtags" \ -Dcc=%s \ -Dprefix=/usr \ -Dvendorprefix=/usr \ -Dsiteprefix=/usr \ -Ulocincpth= \ -Doptimize="%s" \ -Duselargefiles \ -Dusethreads \ -Duseithreads \ -Dd_semctl_semun \ -Dscriptdir=/usr/bin \ -Dman1dir=/usr/share/man/man1 \ -Dman3dir=/usr/share/man/man3 \ -Dinstallman1dir=%s/usr/share/man/man1 \ -Dinstallman3dir=%s/usr/share/man/man3 \ -Dlibperl=libperl.so.%s \ -Duseshrplib \ -Dman1ext=1 \ -Dman3ext=3pm \ -Dcf_by="Sulin" \ -Ud_csh \ -Di_ndbm \ -Di_gdbm \ -Di_db \ -Ubincompat5005 \ -Uversiononly \ -Dpager="/usr/bin/less -isr" \ -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto \ -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto \ -Ud_endservent_r_proto -Ud_setservent_r_proto \ -Dlibpth="/lib /usr/lib" \ ' %(get.ARCH(), get.CC(), get.CFLAGS(), get.installDIR(), get.installDIR(), get.srcVERSION()))
def setup(): cpu = "x86-64" if get.ARCH() == "x86_64" else "sse" inarytools.dosed("configure", "-faltivec") options = '--with-audio="alsa oss" \ --with-cpu=%s \ --with-optimization=2 \ --enable-network=yes \ --disable-ltdl-install' % cpu if get.buildTYPE() == "emul32": options += " --with-cpu=i586" shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS()) autotools.configure(options)
def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) if get.buildTYPE() == "emul32": inarytools.remove("/usr/lib32/libelf.a") inarytools.remove("/usr/lib32/libasm.a") inarytools.remove("/usr/lib32/libdw.a") elif get.ARCH() == "x86_64": # Don't remove all the static libs as libebl.a is needed by other packages inarytools.remove("/usr/lib/libelf.a") inarytools.remove("/usr/lib/libasm.a") inarytools.remove("/usr/lib/libdw.a") inarytools.dodoc("AUTHORS", "COPYING", "ChangeLog", "NEWS", "NOTES", "README", "THANKS", "TODO")
def setup(): autotools.configure( "--disable-static \ --disable-dependency-tracking \ --enable-fast-install \ --enable-debugalloc \ %s" % ("--enable-frame-pointers" if get.ARCH() == "x86_64" else "")) # Disable rpath inarytools.dosed("libtool", "^hardcode_libdir_flag_spec=.*", "hardcode_libdir_flag_spec=\"\"") inarytools.dosed("libtool", "^runpath_var=LD_RUN_PATH", "runpath_var=DIE_RPATH_DIE") inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
def configure(): # Copy the relevant configuration file shutil.copy("configs/kernel-{}-config".format(get.ARCH()), ".config") # Set EXTRAVERSION inarytools.dosed("Makefile", "EXTRAVERSION =.*", "EXTRAVERSION = {}".format(__getExtraVersion())) # Configure the kernel interactively if # configuration contains new options autotools.make("ARCH={} oldconfig".format(__getKernelARCH())) # Check configuration with listnewconfig try: autotools.make("ARCH={} listnewconfig".format(__getKernelARCH())) except: pass
def install(): shelltools.cd("../build") autotools.rawInstall("DESTDIR=%s" % get.installDIR()) #autotools.install() for header in ["limits.h", "syslimits.h"]: inarytools.insinto( "/usr/lib/gcc/%s/%s/include" % (get.HOST(), verMajor), "gcc/include-fixed/%s" % header) # Not needed inarytools.removeDir("/usr/lib/gcc/*/*/include-fixed") inarytools.removeDir("/usr/lib/gcc/*/*/install-tools") # This one comes with binutils inarytools.remove("/usr/lib*/libiberty.a") # cc symlink inarytools.dosym("/usr/bin/gcc", "/usr/bin/cc") # /lib/cpp symlink for legacy X11 stuff inarytools.dosym("/usr/bin/cpp", "/lib/cpp") inarytools.dosym("/usr/bin/x86_64-pc-linux-gnu-gcc-ar", "/usr/bin/x86_64-pc-linux-gnu-ar") # Remove our options section from crt stuff removeSulinLinuxSection("%s/usr/lib/" % get.installDIR()) if get.ARCH() == "x86_64": removeSulinLinuxSection("%s/usr/lib32/" % get.installDIR()) # autoload gdb pretty printers gdbpy_dir = "/usr/share/gdb/auto-load/usr/lib/" inarytools.dodir(gdbpy_dir) gdbpy_files = shelltools.ls("%s/usr/lib/libstdc++*gdb.py*" % get.installDIR()) for i in gdbpy_files: inarytools.domove("/usr/lib/%s" % shelltools.baseName(i), gdbpy_dir) if arch == "x86-64": inarytools.remove("/usr/lib32/libstdc++*gdb.py*") inarytools.rename("/usr/bin/go", "go1.12.2") inarytools.rename("/usr/bin/gofmt", "gofmt1.12.2")
def build(): shelltools.cd("nss") inarytools.dosed("coreconf/Linux.mk", " -shared ", " -Wl,-O1,--as-needed -shared ") if get.ARCH() == "x86_64": shelltools.export("USE_64", "1") shelltools.export("BUILD_OPT", "1") shelltools.export("NSS_ENABLE_ECC", "1") shelltools.export("NSS_USE_SYSTEM_SQLITE", "1") shelltools.export("NSPR_INCLUDE_DIR", "`nspr-config --includedir`") shelltools.export("NSPR_LIB_DIR", "`nspr-config --libdir`") shelltools.export("XCFLAGS", get.CFLAGS()) # Use system zlib shelltools.export("PKG_CONFIG_ALLOW_SYSTEM_LIBS", "1") shelltools.export("PKG_CONFIG_ALLOW_SYSTEM_CFLAGS", "1") autotools.make("-C coreconf -j1") autotools.make("-C lib/dbm") autotools.make("-j1")
def setup(): autotools.autoreconf("-vif") # --enable-sysfs option provides better hardware information support with "lspci" # --enable-32-bit option is not present anymore. Although build fails in emul32. With --disable-asm option, not fail. Needs to be tested. options = "PYTHON=/usr/bin/python3 \ --prefix=/usr \ --sysconfdir=/etc \ --enable-llvm \ --enable-gbm \ --enable-gles1 \ --enable-gles2 \ --enable-glx-tls \ --enable-osmesa \ --enable-texture-float \ --enable-autotools \ --enable-xa \ --enable-vdpau \ --enable-llvm-shared-libs \ --disable-dependency-tracking \ --with-platforms=x11,drm,wayland \ --with-gallium-drivers=r300,r600,radeonsi,nouveau,virgl,svga,swrast \ --with-dri-drivers=i915,i965,r200,nouveau \ --with-vulkan-drivers=intel,radeon" if get.buildTYPE() == "emul32": shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig") shelltools.export("LLVM_CONFIG", "/usr/bin/llvm-config-32") options += " --with-dri-driverdir=/usr/lib32/xorg/modules/dri \ --with-clang-libdir=/usr/lib32 \ --disable-asm " elif get.ARCH() == "x86_64": options += " --with-clang-libdir=/usr/lib \ --enable-omx-bellagio \ --enable-opencl-icd " autotools.configure(options) inarytools.dosed("libtool", "( -shared )", " -Wl,--as-needed\\1")
def setup(): shelltools.echo("config.layout", config_layout()) inarytools.dosed("config.layout", "version", get.srcNAME()) #for d in ["apr","apr-util","pcre"]: #shelltools.unlinkDir("srclib/%s" % d) # this fixes segfaults, remember omit-frame-pointer will be default soon if get.ARCH() == "i686": shelltools.export("CFLAGS", "%s -fno-omit-frame-pointer" % get.CFLAGS()) shelltools.export("LDFLAGS", "-Wl,-z,relro,-z,now") autotools.rawConfigure('--with-mpm=prefork \ --enable-layout=Sulin \ --enable-mods-shared=all \ --with-ssl=/usr \ --enable-ssl=shared \ %s \ --with-z=/usr \ --with-port=80 \ --with-program-name=apache2 \ --with-apr=/usr/bin/apr-1-config \ --with-apr-util=/usr/bin/apu-1-config \ --with-suexec-safepath="/usr/bin:/bin" \ --with-suexec-logfile=/var/log/apache2/suexec_log \ --with-suexec-bin=/usr/sbin/suexec \ --with-suexec-userdir="public_html" \ --with-suexec-caller=apache \ --with-suexec-docroot=/var/www \ --with-suexec-uidmin=1000 \ --with-suexec-gidmin=100 \ --with-suexec-umask=077 \ --enable-suexec=shared \ --enable-pie \ --with-pcre=/usr/bin/pcre-config' % modules_config()) inarytools.dosed("include/ap_config_auto.h", "apache2\.conf", "httpd.conf")
def setup(): shelltools.copy("INSTALL/make.inc.gfortran", "make.inc") if get.ARCH() == "x86_64": inarytools.dosed("make.inc", "-O2", "%s -fPIC -m64 -funroll-all-loops" % get.CFLAGS()) inarytools.dosed("make.inc", "NOOPT =", "NOOPT =-m64 -fPIC ") else: inarytools.dosed("make.inc", "-O2", "%s -fPIC -funroll-all-loops" % get.CFLAGS()) shelltools.makedirs("build") shelltools.cd("build") options = "-DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=ON \ -DBUILD_TESTING=OFF" if get.buildTYPE() == "static": options = "-DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=OFF \ -DBUILD_TESTING=OFF" cmaketools.configure(options, sourceDir="..")
def setup(): # Remove -Wall from default flags. The makefiles enable enough warnings # themselves, and they use -Werror. options ='-disable-nls --program-prefix=\"eu-\" --with-zlib' if get.buildTYPE() == "emul32": shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig") elif get.ARCH() == "x86_64": inarytools.flags.add("-fexceptions") autotools.autoreconf("-vfi") inarytools.cflags.remove("-Wall") options +=" \ --enable-dwz \ --enable-thread-safety \ --enable-deterministic-archives" autotools.configure(options)
# # Licensed under the GNU General Public License, version 3. # See the file http://www.gnu.org/licenses/gpl.txt from inary.actionsapi import autotools from inary.actionsapi import inarytools from inary.actionsapi import shelltools from inary.actionsapi import kerneltools from inary.actionsapi import get import os WorkDir = "klibc-%s" % get.srcVERSION() NoStrip = "/" KDIR = kerneltools.getKernelVersion() klibcarch = "x86_64" if get.ARCH() == "x86_64" else "i386" docs = { "usr/klibc/arch/README.klibc.arch": "README.arch", "usr/dash/README.dash": "README.dash", "usr/dash/TOUR": "TOUR.dash", "usr/gzip/README": "README.gzip", "usr/gzip/COPYING": "COPYING.gzip", "usr/kinit/README": "README.kinit" } configh = """ #ifndef _LINUX_CONFIG_H #define _LINUX_CONFIG_H #include <linux/autoconf.h>
def __getKernelARCH(): """i386 is relevant for our i686 architecture.""" return get.ARCH()
def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) inarytools.remove("/usr/bin/perl") # Conflicts with perl-Module-Build # inarytools.remove("/usr/bin/config_data") inarytools.dosym("/usr/bin/perl%s" % get.srcVERSION(), "/usr/bin/perl") # Perl5 library # NEEDS MODIFICATION FOR NEW VERSION inarytools.dosym("/usr/lib/perl5/%s/%s-linux-thread-multi/CORE/libperl.so.%s" % (get.srcVERSION(), get.ARCH(), get.srcVERSION()), "/usr/lib/libperl.so") inarytools.dosym("/usr/lib/perl5/%s/%s-linux-thread-multi/CORE/libperl.so.%s" % (get.srcVERSION(), get.ARCH(), get.srcVERSION()), "/usr/lib/libperl.so.5") inarytools.dosym("/usr/lib/perl5/%s/%s-linux-thread-multi/CORE/libperl.so.%s" % (get.srcVERSION(), get.ARCH(), get.srcVERSION()), "/usr/lib/libperl.so.5.26") inarytools.dosym("/usr/lib/perl5/%s/%s-linux-thread-multi/CORE/libperl.so.%s" % (get.srcVERSION(), get.ARCH(), get.srcVERSION()), "/usr/lib/libperl.so.5.26.1") # Docs inarytools.dodir("/usr/share/doc/%s/html" % get.srcNAME()) shelltools.system('LD_LIBRARY_PATH=%s ./perl installhtml \ --podroot="." \ --podpath="lib:ext:pod:vms" \ --recurse \ --htmldir="%s/usr/share/doc/%s/html"' % (get.curDIR(), get.installDIR(), get.srcNAME())) perlmodules.removePodfiles() perlmodules.removePacklist() inarytools.dodoc("Changes*", "Artistic", "Copying", "README", "AUTHORS")
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Licensed under the GNU General Public License, version 3. # See the file http://www.gnu.org/copyleft/gpl.txt. from inary.actionsapi import autotools from inary.actionsapi import inarytools from inary.actionsapi import shelltools from inary.actionsapi import get flags = "%s -fPIC" % get.CFLAGS() if get.ARCH() == "x86_64" else get.CFLAGS() def setup(): shelltools.export("CFLAGS", flags) shelltools.system("./autogen.sh") autotools.configure("--enable-nls \ --disable-rpath") # --enable-python \ # --enable-python-bindings \ def build(): autotools.make() # FIXME: python tests fail, others fail in 64bit, gentoo says tests are wrong def check(): autotools.make("check")
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Licensed under the GNU General Public License, version 3. # See the file http://www.gnu.org/licenses/gpl.txt from inary.actionsapi import autotools from inary.actionsapi import inarytools from inary.actionsapi import shelltools from inary.actionsapi import get multilib = "--enable-multilib" if get.ARCH() == "x86_64" else "" def setup(): autotools.configure('--enable-shared \ --build=x86_64-pc-linux-gnu \ --enable-threads \ --enable-ld=default \ --enable-gold \ --enable-plugins \ --with-pkgversion="Sulin" \ --with-bugurl=http://gitlab.com/sulinos/main/issues \ %s \ --with-pic \ --disable-werror' % (multilib)) def build(): autotools.make("configure-host") autotools.make("tooldir=/usr")
def setup(): # -fno-strict-aliasing workarounds some aliasing violations, see: https://bugzilla.redhat.com/show_bug.cgi?id=487844 --> shelltools.system('nspr/configure \ --prefix=/usr \ --disable-debug \ %s \ --enable-optimize="%s -fno-strict-aliasing"' % ("--enable-64bit" if get.ARCH() == "x86_64" else "", get.CFLAGS()))
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Licensed under the GNU General Public License, version 3. # See the file http://www.gnu.org/licenses/gpl.txt from inary.actionsapi import inarytools from inary.actionsapi import get WorkDir = "%s/%s" % (get.ARCH(), get.srcNAME()) NoStrip = ["/"] def install(): inarytools.insinto("/opt/rar/bin", "rar") inarytools.insinto("/opt/rar/lib", "default.sfx") inarytools.insinto("/opt/rar/etc", "rarfiles.lst") inarytools.dosym("/opt/rar/bin/rar", "/usr/bin/rar") inarytools.dodoc("license.txt", "readme.txt", "whatsnew.txt", "order.htm", "rar.txt")
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Licensed under the GNU General Public License, version 3. # See the file http://www.gnu.org/licenses/gpl.txt from inary.actionsapi import autotools from inary.actionsapi import shelltools from inary.actionsapi import inarytools from inary.actionsapi import get #optimizationtype = "--enable-amd64" if get.ARCH() == "x86_64", "--enable-asd" if get.ARCH() == "armv7h" else "--enable-mmx" if get.ARCH() == 'x86_64': optimizationtype = " --enable-amd64" elif get.ARCH() == 'armv7h': optimizationtype = " " else: optimizationtype = " --enable-mmx" def setup(): autotools.autoreconf("-fi") autotools.configure("--disable-static \ --with-x \ --with-jpeg \ --with-png \ --with-tiff \ --with-gif \
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Licensed under the GNU General Public License, version 3. # See the file http://www.gnu.org/licenses/gpl.txt from inary.actionsapi import autotools from inary.actionsapi import inarytools from inary.actionsapi import shelltools from inary.actionsapi import get import os arch = "x86-64" if get.ARCH( ) == "x86_64" and not get.buildTYPE() == "emul32" else "i686" defaultflags = "-O3 -g -fasynchronous-unwind-tables -mtune=generic -march=%s" % arch if get.buildTYPE() == "emul32": defaultflags += " -m32" # this is getting ridiculous, also gdb3 breaks resulting binary sysflags = "-mtune=generic -march=x86-64" if get.ARCH( ) == "x86_64" else "-mtune=generic -march=i686" ### helper functions ### def removeSulinLinuxSection(_dir): for root, dirs, files in os.walk(_dir): for name in files: # FIXME: should we do this only on nonshared or all ? # if ("crt" in name and name.endswith(".o")) or name.endswith("nonshared.a"): if ("crt" in name and name.endswith(".o")) or name.endswith(".a"): i = os.path.join(root, name) shelltools.system(
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Licensed under the GNU General Public License, version 3. # See the file http://www.gnu.org/copyleft/gpl.txt from inary.actionsapi import inarytools from inary.actionsapi import get WorkDir = "%s/.dropbox-dist" % get.ARCH() NoStrip = "/opt/dropbox/library.zip" def install(): #inarytools.dodir("/opt/dropbox") inarytools.insinto("/opt/dropbox", "*") # Arch removes this lib, Pardus libgcc package provides libstdc++.so.6 #inarytools.remove("/opt/dropbox/libstdc++.so.6") inarytools.dodoc("VERSION") inarytools.remove("/opt/dropbox/VERSION") # you can remove these lines if u don't like monochromatic systemtry icons # i'm going to try find a way to make this optional #inarytools.insinto("/opt/dropbox/icons/hicolor/16x16/status", "../../hede/*.png")
def install(): for i in {"/bin", "/sbin", "/lib", "/lib32","/data/srv","/kernel","/kernel/boot", "/etc","/tmp","/data/misc","/data","/data/user","/data/app","/data/user/root", "/tmp", "/usr", "/usr/bin","/kernel/modules","/data/app/system", "/usr/lib", "/usr/lib32", "/usr/libexec", "/usr/share","/kernel/firmware", "/run", "/usr/local", "/usr/local/bin", "/usr/local/lib", "/usr/local/libexec", "/usr/local/lib32","/data/log","/data/lock","/var","/data/srv/www","/usr/src"}: inarytools.dodir(i) autotools.rawInstall("DESTDIR={}".format(get.installDIR())) # SulinOS GNU/Linux filesystem architecture (like android and LFS) # # /data/ # ->app = Userspace application directory # ->system = Userspace optional system application # ->data = Infinitive loop directory ( /data linked here ) # ->media = userspace mounted volumes ( /var/run/mount linked here ) # ->user = User's home directory # ->root = The root home ( /root linked here ) # ->misc = Is an unused directory # ->tmp = Temp directory ( linked /tmp ) # ->srv = Served directory # ->www = Web directory # ->log = System logs # ->lock = System locks # # /kernel/ # ->boot = Linux kernel files ( /boot linked here ) # ->modules = Linux kernel module files ( /lib/modules linked here ) # ->firmware = Linux kernel firmware files ( /lib/firmware linked here ) # ->dev = The dev directory ( /dev linked here ) # ->sys = The sys directory ( /sys linked here ) # ->proc = The proc directory ( /proc linked here ) # # /run => /var/run # inarytools.dosym("../run", "/var/run") inarytools.dosym("../tmp", "/var/tmp") inarytools.dosym("data/user/root", "/root") inarytools.dosym("../tmp/", "/data/tmp") inarytools.dosym("../data", "/data/data") inarytools.dosym("../data/log", "/var/log") inarytools.dosym("../data/srv/www", "/var/www") inarytools.dosym("../data/lock", "/var/lock") inarytools.dosym("../run/media", "/data/media") inarytools.dosym("../dev","/kernel/dev") inarytools.dosym("../sys","/kernel/sys") inarytools.dosym("../proc","/kernel/proc") inarytools.dosym("kernel/boot", "/boot") inarytools.dosym("../kernel/modules", "/lib/modules") inarytools.dosym("../kernel/firmware", "/lib/firmware") if get.ARCH() == "x86_64": # Directories for 32bit libraries inarytools.dodir("/lib32") inarytools.dodir("/usr/lib32") inarytools.dodir("/usr/local/lib32") # Hack for binary blobs built on multi-lib systems inarytools.dosym("lib", "/lib64") inarytools.dosym("lib32", "/libx32") inarytools.dosym("lib", "/usr/lib64") inarytools.dosym("../lib", "/usr/lib/x86_64-linux-gnu") inarytools.dosym("../lib32", "/usr/lib32/i686-linux-gnu") inarytools.dosym("lib32", "/usr/libx32") inarytools.dosym("lib", "/usr/local/lib64") inarytools.dosym("lib32", "/usr/local/libx32") inarytools.dosym("../lib", "/usr/local/lib/x86_64-linux-gnu") inarytools.dosym("../lib32", "/usr/local/lib32/i686-linux-gnu") # Adjust permissions shelltools.system("chmod 755 -R {}/".format(get.installDIR())) shelltools.chmod("{}/usr/share/baselayout/shadow".format(get.installDIR()), 0o600) shelltools.chmod("{}/data/user/root".format(get.installDIR()), 0o600)
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Licensed under the GNU General Public License, version 3. # See the file http://www.gnu.org/licenses/gpl.txt from inary.actionsapi import autotools from inary.actionsapi import inarytools from inary.actionsapi import shelltools from inary.actionsapi import get import os verMajor = get.srcVERSION() arch = get.ARCH().replace("x86_64", "x86-64") opt_unwind = "--with-system-libunwind" if get.ARCH( ) == "x86_64" else "--without-system-libunwind" opt_arch = "--with-arch_32=i686" if get.ARCH( ) == "x86_64" else "--with-arch=i686" opt_multilib = "--enable-multilib --with-multilib-list=m32,m64" if get.ARCH( ) == "x86_64" else "" # WARNING: even -fomit-frame-pointer may break the build, stack protector, fortify source etc. are off limits cflags = "-O2 -g" def removeSulinLinuxSection(_dir): for root, dirs, files in os.walk(_dir): for name in files: