def install(): kerneltools.install() # add objtool for external module building and enabled VALIDATION_STACK option inarytools.insinto( "/usr/src/linux-headers-%s-sulinos/tools/objtool" % get.srcVERSION(), "%s/tools/objtool/objtool" % get.curDIR()) # Install kernel headers needed for out-of-tree module compilation kerneltools.installHeaders() kerneltools.installLibcHeaders() # Generate some module lists to use within mkinitramfs shelltools.system("./generate-module-list %s/lib/modules/%s" % (get.installDIR(), kerneltools.__getSuffix())) #mkinitcpio default config inarytools.dodir("/etc/mkinitcpio.d") shelltools.touch("linux.preset") shelltools.echo( "linux.preset", "# mkinitcpio preset file for the 'linux' package\n" + 'ALL_config="/etc/mkinitcpio.conf"\n' + 'ALL_kver="/boot/kernel-%s"\n\n' % get.srcVERSION() + "PRESETS=('default' 'fallback') \n\n" + '#default_config="/etc/mkinitcpio.conf"\n' + 'default_image="/boot/initramfs-%s.img"\n' % get.srcVERSION() + '#default_options=""\n\n' + '#fallback_config="/etc/mkinitcpio.conf"\n' + 'fallback_image="/boot/initramfs-%s-fallback.img"\n' % get.srcVERSION() + 'fallback_options="-S autodetect"\n') inarytools.insinto("/etc/mkinitcpio.d", "linux.preset")
def setup(): # Fixup version shelltools.echo(".version", get.srcVERSION().split("_")[0]) # Disable emacs scripts shelltools.export("EMACS", "no") autotools.configure()
def setup(): # Fixup version shelltools.echo(".version", get.srcVERSION().split("_")[0]) # Disable emacs scripts shelltools.export("EMACS", "no") shelltools.move("autoconf.texi", "autoconf213.texi") autotools.configure("--infodir=/usr/share/info --program-suffix=-2.13")
def install(): shelltools.cd("build") autotools.rawInstall("install_root=%s" % get.installDIR()) inarytools.dodir("/etc/ld.so.conf.d") if get.buildTYPE() != "emul32": #Install locales once. autotools.rawInstall("install_root=%s localedata/install-locales" % get.installDIR()) if get.buildTYPE() == "emul32": inarytools.dosym("/lib32/ld-linux.so.2", "/lib/ld-linux.so.2") shelltools.echo( "%s/etc/ld.so.conf.d/60-glibc-32bit.conf" % get.installDIR(), ldconf32bit) inarytools.removeDir("/tmp32") # We'll take care of the cache ourselves if shelltools.isFile("%s/etc/ld.so.cache" % get.installDIR()): inarytools.remove("/etc/ld.so.cache") # Prevent overwriting of the /etc/localtime symlink if shelltools.isFile("%s/etc/localtime" % get.installDIR()): inarytools.remove("/etc/localtime") # Nscd needs this to work inarytools.dodir("/var/run/nscd") inarytools.dodir("/var/db/nscd") # remove zoneinfo files since they are coming from timezone packages # we disable timezone build with a patch, keeping these lines for easier maintenance if shelltools.isDirectory("%s/usr/share/zoneinfo" % get.installDIR()): inarytools.removeDir("/usr/share/zoneinfo") #while bootstrapping whole system zic should not be removed. timezone package does not build without it. # 2013 #for i in ["zdump","zic"]: #if shelltools.isFile("%s/usr/sbin/%s" % (get.installDIR(), i)): #inarytools.remove("/usr/sbin/%s" % i) shelltools.cd("..") #remove unused locale for l in ["ku", "hy"]: shelltools.system("rm -rf {}/usr/lib/locale/{}_*".format( get.installDIR(), l)) shelltools.system("rm -rf {}/usr/share/locale/{}*".format( get.installDIR(), l)) shelltools.system("rm -rf {}/usr/share/i18n/locales/{}_*".format( get.installDIR(), l)) #clean if shelltools.isFile("%s/usr/lib/locale/locale-archive" % get.installDIR()): inarytools.remove("/usr/lib/locale/locale-archive") inarytools.dodoc("NEWS", "README*", "LICENSES")
def install(): autotools.install() # default root certs location shelltools.echo("%s/etc/wgetrc" % get.installDIR(), "ca_certificate=/etc/ssl/certs/ca-certificates.crt") inarytools.dodoc("AUTHORS", "COPYING", "ChangeLog*", "NEWS", "README", "MAILING-LIST")
def install(): autotools.install() major = ".".join(get.srcVERSION().split(".")[:2]) inarytools.dodir("/etc/env.d") shelltools.echo("%s/etc/env.d/50guile" % get.installDIR(), 'GUILE_LOAD_PATH="/usr/share/guile/%s"' % major) inarytools.domove("/usr/lib/libguile-2.0.so.22.*.scm", "/usr/share/gdb/auto-load") inarytools.dodoc("AUTHORS", "ChangeLog", "HACKING", "NEWS", "README", "THANKS")
def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) # Set Options in /etc/dhcpcd.conf Disable ip4vall shelltools.echo("%s/etc/dhcpcd.conf" % get.installDIR(), "noipv4ll") # Remove hooks install the compat one inarytools.remove("/usr/lib/dhcpcd/dhcpcd-hooks/*") inarytools.insinto("/usr/lib/dhcpcd/dhcpcd-hooks", "hooks/50-dhcpcd-compat") inarytools.dodoc("README.md")
def testEcho(self): from inary.actionsapi.shelltools import echo echo('tests/echo-file', 'eco subject') self.assertEqual(os.path.exists('tests/echo-file'), True) self.assertEqual( open('tests/echo-file').readlines()[0].strip(), 'eco subject') echo('tests/echo-file', 'subject eco') self.assertEqual( open('tests/echo-file').readlines()[1].strip(), 'subject eco') os.remove('tests/echo-file')
def setup(): autotools.configure("PYTHON=/usr/bin/python3 \ --enable-gpl \ --enable-gpl3 \ --enable-gtk2 \ --enable-gtk3 \ --qt-libdir=/usr/lib/ \ --qt-includedir=/usr/include/qt5 \ --avformat-swscale") # Enable bindings shelltools.echo("%s/src/swig/config.mak" % get.curDIR(), "SUBDIRS = perl python")
def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) # Simple wrapper for gcc host_gcc = "/usr/bin/%s-dietlibc-gcc" % get.HOST() shelltools.echo("%s%s" % (get.installDIR(), host_gcc), """\ #!/bin/bash exec /usr/bin/diet %s "$@" """ % get.CC()) shelltools.chmod("%s%s" % (get.installDIR(), host_gcc), 0o755) inarytools.dosym(host_gcc, "/usr/bin/dietlibc-gcc") inarytools.dodoc("AUTHOR", "BUGS", "CAVEAT", "CHANGES", "FAQ", "README*", "THANKS", "TODO")
def setup(): # use python2.x inarytools.dosed("configure", "(\/usr\/include\/)python\*", r"\1python2*") # fix unused direct dependency inarytools.dosed("Makefile.in", "(PLFLAGS=)`\$\$pyconfig --libs`", r"\1'-lpython2.7'") inarytools.dosed("Makefile.in", "(PLDFLAGS=)`\$\$pyconfig --ldflags`", r"\1'-lpython2.7 -Xlinker -export-dynamic'") shelltools.echo("config.h.in", "#define USE_INTERP_RESULT 1") shelltools.export("PYTHON", "/usr/bin/python2.7") autotools.configure("\ --with-gpm-support \ ")
def setup(): if get.buildTYPE() == "rebuild_python": shelltools.system( "./bootstrap.sh --with-toolset=gcc --with-icu --with-python=/usr/bin/python3.7 --prefix=%s/usr" % get.installDIR()) else: shelltools.system( "./bootstrap.sh --with-toolset=gcc --with-icu --with-python=/usr/bin/python2.7 --prefix=%s/usr" % get.installDIR()) shelltools.echo( "project-config.jam", "using python : 3.6 : /usr/bin/python3 : /usr/include/python3.6m : /usr/lib ;" )
def testCopy(self): from inary.actionsapi.shelltools import echo from inary.actionsapi.shelltools import copy from inary.actionsapi.shelltools import makedirs makedirs('tests/testdirectory/sample') copy('tests', 'tests-copy') self.assertEqual(os.path.islink('tests-copy'), False) shutil.rmtree("tests-copy") echo('tests/echo-file', 'subject eco') copy('tests/echo-file', 'tests/echo-file-copy') self.assertEqual(os.path.islink('tests/echo-file-copy'), False) os.remove("tests/echo-file")
def install(): autotools.rawInstall("DESTDIR={}".format(get.installDIR())) shelltools.chmod("{}/etc/lxdm/lxdm.conf".format(get.installDIR()), 0o644) inarytools.dodir("/usr/lib/sysusers.d") inarytools.dodir("/usr/lib/tmpfiles.d") # Setup system user and group shelltools.echo( "{}/usr/lib/sysusers.d/lxdm.conf".format(get.installDIR()), 'u lxdm - "Lightweight X11 Display Manager" /var/lib/lxdm') shelltools.echo("{}/usr/lib/tmpfiles.d/lxdm.conf".format(get.installDIR()), 'd /var/lib/lxdm 0700 lxdm lxdm - -') inarytools.dodoc("COPYING", "AUTHORS", "TODO", "README", "ChangeLog", "NEWS")
def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) # fixes #10992 inarytools.dobin("contrib/ssh-copy-id") inarytools.doman("contrib/ssh-copy-id.1") # an script in contrib inarytools.dobin("contrib/findssl.sh") shelltools.chmod("%s/etc/ssh/sshd_config" % get.installDIR(), 0o600) # special request by merensan shelltools.echo("%s/etc/ssh/ssh_config" % get.installDIR(), "ServerAliveInterval 5") inarytools.dodir("/var/empty/sshd") inarytools.dodoc("ChangeLog", "CREDITS", "OVERVIEW", "README*", "TODO", "sshd_config")
def install(): shelltools.cd(NCURSESW) autotools.rawInstall("DESTDIR=%s" % get.installDIR()) LIB = "/usr/lib32" if get.buildTYPE() == "_emul32" else "/usr/lib" print(LIB) for lib in ["ncurses", "form", "panel", "menu"]: shelltools.echo("lib%s.so" % lib, "INPUT(-l%sw)" % lib) inarytools.dolib("lib%s.so" % lib, destinationDirectory=LIB) #inarytools.dosym("lib%sw.a" % lib, "%s/lib%s.a" % (LIB, lib)) inarytools.dosym("libncurses++w.a", "%s/libncurses++.a" % LIB) shelltools.copy("%s/usr/share/pkgconfig/" % get.installDIR(), "%s/%s" % (get.installDIR(), LIB)) for lib in ["ncurses", "ncurses++", "form", "panel", "menu"]: inarytools.dosym("%sw.pc" % lib, "%s/pkgconfig/%s.pc" % (LIB, lib)) shelltools.echo("libcursesw.so", "INPUT(-lncursesw)") #inarytools.dolib("libcursesw.so", destinationDirectory = LIB) #inarytools.dosym("libncurses.so", "%s/libcurses.so" % LIB) #inarytools.dosym("libncursesw.a", "%s/libcursesw.a" % LIB) #inarytools.dosym("libncurses.a", "%s/libcurses.a" % LIB) #for fix inarytools.dosym("libncursesw.so.6.2", "%s/libncursesw.so.5" % LIB) inarytools.dosym("libncurses.so.6.2", "%s/libncurses.so.5" % LIB) inarytools.dosym("libncurses.so.6.2", "%s/libtinfo.so.5" % LIB) inarytools.dosym("libpanelw.so.6.2", "%s/libpanelw.so.5" % LIB) inarytools.dosym("libformw.so.6.2", "%s/libformw.so.5" % LIB) inarytools.dosym("libmenuw.so.6.2", "%s/libmenuw.so.5" % LIB) shelltools.cd("../%s" % NCURSES) for lib in ["ncurses", "form", "panel", "menu"]: inarytools.dolib("lib/lib%s.so.%s" % (lib, get.srcVERSION()), destinationDirectory=LIB) inarytools.dosym("lib%s.so.%s" % (lib, get.srcVERSION()), "%s/lib%s.so.6" % (LIB, lib)) if get.buildTYPE() == "_emul32": inarytools.removeDir("/_emul32") return shelltools.cd(WORKDIR) shelltools.system("grep -B 100 '$Id' README > license.txt") inarytools.dodoc("ANNOUNCE", "NEWS", "README*", "TO-DO", "license.txt")
def setup(): # we must include headers, but kernel headers chango too fast, maybe we should # go back to adding them as a patch # shelltools.sym("/lib/modules/%s/build" % KDIR, "linux") #~ shelltools.copytree("/lib/modules/%s/build" % KDIR, "linux") shelltools.makedirs("linux/include") shelltools.system("ln -s /usr/include/linux linux/include/") shelltools.system("ln -s /usr/include/asm linux/include/") shelltools.system("ln -s /usr/include/asm-generic linux/include/") # don't install kernel headers inarytools.dosed("scripts/Kbuild.install", ".*headers_install") # set the build directory #~ shelltools.echo("MCONFIG", "KRNLOBJ = /lib/modules/%s/build" % KDIR) #shelltools.sym("../linux-3.7","linux") # Workaround for prelink warnings shelltools.echo("70klibc", 'PRELINK_PATH_MASK="/usr/lib/klibc"') inarytools.dosed("Makefile", "/man", "/share/man")
def setup(): options = "--prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --libexecdir=/usr/libexec \ --disable-dependency-tracking \ --disable-static \ --enable-bluez4 \ --disable-rpath \ --disable-systemd \ --enable-oss-output \ --enable-largefile \ --with-system-user=pulse \ --with-system-group=pulse \ --with-access-group=pulse-access \ --with-database=tdb \ --with-module-dir=/usr/lib/pulse/modules \ --with-udev-rules-dir=/lib/udev/rules.d" if get.buildTYPE() == "emul32": options += " --libdir=/usr/lib32 \ --libexecdir=/usr/lib32 \ --disable-gconf \ --disable-gtk2 \ --disable-asyncns \ --disable-lirc \ --disable-x11 \ --disable-bluez4 \ --disable-oss-output \ --disable-oss-wrapper \ --disable-solaris \ --disable-manpages \ --disable-samplerate \ --disable-default-build-tests" shelltools.echo(".tarball-version", get.srcVERSION()) #shelltools.system("NOCONFIGURE=1 ./bootstrap.sh") autotools.configure(options) inarytools.dosed("libtool", "CC(\s-shared\s)", r"CC -Wl,-O1,--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(): # FIXME: shelltools.echo() appends to the end of the file by default so clear them first shelltools.unlink('conf-cc') shelltools.unlink('conf-ld') shelltools.unlink('conf-home') shelltools.echo( 'conf-cc', "%s %s -malign-double -fPIC -DPIC" % (get.CC(), get.CFLAGS().replace( "-D_FORTIFY_SOURCE=2", "").replace("-fomit-frame-pointer", ""))) shelltools.echo('conf-ld', "%s %s" % (get.CC(), get.LDFLAGS())) shelltools.echo('conf-home', "%s/usr" % get.installDIR())
def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) # Install udev rule inarytools.insinto("/lib/udev/rules.d", "tools/udev/libsane.rules", "65-libsane.rules") # Add epson epkowa and brother2 backends also shelltools.echo( "%s/etc/sane.d/dll.conf" % get.installDIR(), "# Epson 'epkowa' backend\n" + "# See http://www.sane-project.org/cgi-bin/driver.pl?manu=Epson&bus=any for supported scanners\n" + "# In order to use this backend, you have to install iscan package\nepkowa" ) shelltools.echo( "%s/etc/sane.d/dll.conf" % get.installDIR(), "\n# Brother backend\n" + "# See http://en.sulin-wiki.org/Brother_scanner_support_for_DCP_and_MFC_models for installation\n" + "brother\nbrother2\nbrother3") shelltools.echo("%s/etc/sane.d/dll.conf" % get.installDIR(), "\n# Added for Xerox Phaser 3100 MFP\nXeroxPhaser3100\n")
def build(): shelltools.cd("build") if get.buildTYPE() == "emul32": shelltools.echo("configparms", "build-programs=no") shelltools.echo("configparms", "slibdir=/lib32") shelltools.echo("configparms", "rtlddir=/lib32") shelltools.echo("configparms", "bindir=/tmp32") shelltools.echo("configparms", "sbindir=/tmp32") shelltools.echo("configparms", "rootsbindir=/tmp32") shelltools.echo("configparms", "datarootdir=/tmp32/share") autotools.make() inarytools.dosed("configparms", "=no", "=yes") else: shelltools.echo("configparms", "slibdir=/lib") shelltools.echo("configparms", "rtlddir=/lib") autotools.make()
def setup(): # TODO: do we need that ? shelltools.export("CXXFLAGS", get.CXXFLAGS().replace("-D_FORTIFY_SOURCE=2", "")) shelltools.export("CFLAGS", get.CFLAGS().replace("-D_FORTIFY_SOURCE=2", "")) inarytools.dosed("runtime/tools/mve.awk", "#!/usr/bin/nawk -f", "#!/usr/bin/awk -f") # define the place for the global (g)vimrc file (set to /etc/vim/vimrc) shelltools.echo("src/feature.h", "#define SYS_VIMRC_FILE \"/etc/vim/vimrc\"") # our binary ctags file is names as exuberant-ctags inarytools.dosed("runtime/doc/syntax.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1") inarytools.dosed("runtime/doc/tagsrch.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1") inarytools.dosed("runtime/doc/usr_29.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1") inarytools.dosed("runtime/menu.vim", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1") # inarytools.dosed("src/configure.in", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1") # TODO: do we need that ? # inarytools.dosed("src/configure.in", r"libc\.h", "") # TODO: we could need that #autotools.make("-C src autoconf") # TODO: * We should use "big" feature instead of "huge". # * Investigate impacts on current use options = "--with-features=huge \ --enable-multibyte \ --enable-perlinterp \ --enable-pythoninterp \ --enable-python3interp \ --with-python3-config-dir=/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu/ \ --enable-rubyinterp \ --enable-gui=no \ --with-tlib=ncurses \ --prefix=/usr \ --localstatedir=/var/lib/vim \ --with-features=big \ --disable-acl \ --with-compiledby=Sulin \ --enable-gpm \ --enable-acl \ --enable-cscope \ --disable-netbeans \ --disable-luainterp \ --with-x=no \ --with-modified-by=Sulin" if get.buildTYPE() == "gui": options += " --enable-gui=gtk2 \ --with-vim-name=gvim \ --with-view-name=gview \ --with-x=yes" autotools.configure(options)
def setup(): shelltools.echo("config.mak", config)