lvm2, mkinitcpio, man-pages rebuild
This commit is contained in:
@@ -9,111 +9,38 @@ from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import shelltools
|
||||
|
||||
def builddiet():
|
||||
pisitools.flags.add("-fno-lto")
|
||||
shelltools.export("LIBS","-lpthread -luuid")
|
||||
#dietCC = "diet %s %s %s -Os -static" % (get.CC(), get.CFLAGS(), get.LDFLAGS())
|
||||
dietCC = "%s %s %s -Os -static" % (get.CC(), get.CFLAGS(), get.LDFLAGS())
|
||||
shelltools.export("CC", dietCC)
|
||||
|
||||
autotools.make("distclean")
|
||||
|
||||
autotools.autoreconf("-fi")
|
||||
autotools.configure('--with-thin-check= \
|
||||
--with-thin-dump= \
|
||||
--with-thin-repair= \
|
||||
--with-thin-restore= \
|
||||
--with-cache-check= \
|
||||
--with-cache-dump= \
|
||||
--with-cache-repair= \
|
||||
--with-cache-restore= \
|
||||
ac_cv_lib_dl_dlopen=no \
|
||||
--with-staticdir="/sbin" \
|
||||
--enable-debug \
|
||||
--with-optimisation=\"%s -Os\" \
|
||||
--enable-static_link \
|
||||
--with-lvm1=internal \
|
||||
--disable-readline \
|
||||
--disable-nls \
|
||||
--disable-selinux \
|
||||
--with-confdir=/etc \
|
||||
--enable-applib \
|
||||
--enable-cmdlib \
|
||||
--enable-pkgconfig \
|
||||
--enable-udev_rules \
|
||||
--with-systemdsystemunitdir=no \
|
||||
--enable-udev_sync' % get.CFLAGS())
|
||||
|
||||
#pisitools.dosed("lib/misc/configure.h","rpl_malloc","malloc")
|
||||
#pisitools.dosed("lib/misc/configure.h","rpl_realloc","realloc")
|
||||
|
||||
autotools.make("-j1 -C include")
|
||||
autotools.make("-j1 -C lib LIB_SHARED= VERSIONED_SHLIB=")
|
||||
autotools.make("-j1 -C libdm LIB_SHARED= VERSIONED_SHLIB=")
|
||||
autotools.make("-j1 -C libdaemon LIB_SHARED= VERSIONED_SHLIB=")
|
||||
autotools.make("-j1 -C tools dmsetup.static lvm.static DIETLIBC_LIBS=\"-lcompat\"")
|
||||
|
||||
pisitools.insinto("/usr/lib/dietlibc/lib-i386", "libdm/ioctl/libdevmapper.a")
|
||||
pisitools.insinto("/sbin/", "tools/lvm.static")
|
||||
pisitools.insinto("/sbin/", "tools/dmsetup.static")
|
||||
|
||||
|
||||
def setup():
|
||||
# Breaks linking when sandbox is disabled
|
||||
shelltools.export("CLDFLAGS", "%s -lpthread" %get.LDFLAGS())
|
||||
|
||||
shelltools.export("LIB_PTHREAD", "-lpthread")
|
||||
pisitools.dosed("conf/example.conf.in", "use_lvmetad = 0", "use_lvmetad = 1")
|
||||
|
||||
#shelltools.system(""" sed -i -e "1iAR = $(tc-getAR)" -e "s:CC ?= @CC@:CC = $(tc-getCC):" make.tmpl.in || die """)
|
||||
shelltools.system(""" sed -i -e '/FLAG/s:-O2::' configure || die """)
|
||||
shelltools.system(""" sed -i -e '/FLAG/s:-O2::' configure.ac || die """)
|
||||
|
||||
autotools.autoreconf("-fi")
|
||||
autotools.configure("--with-thin-check= \
|
||||
--with-thin-dump= \
|
||||
--with-thin-repair= \
|
||||
--with-thin-restore= \
|
||||
--with-cache-check= \
|
||||
--with-cache-dump= \
|
||||
--with-cache-repair= \
|
||||
--with-cache-restore= \
|
||||
--enable-lvm1_fallback \
|
||||
shelltools.export("CONFIG_SHELL", "/bin/bash")
|
||||
autotools.configure("--with-usrlibdir=/usr/lib \
|
||||
--with-usrsbindir=%s \
|
||||
--with-confdir=/etc \
|
||||
--with-udevdir=/lib/udev/rules.d \
|
||||
--with-default-pid-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-dmeventd-path=/sbin/dmeventd \
|
||||
--enable-fsadm \
|
||||
--with-pool=internal \
|
||||
--with-user= \
|
||||
--with-group= \
|
||||
--with-usrlibdir=/usr/lib \
|
||||
--with-usrsbindir=%s \
|
||||
--with-udevdir=/lib/udev/rules.d \
|
||||
--with-device-uid=0 \
|
||||
--with-device-gid=6 \
|
||||
--with-device-mode=0660 \
|
||||
--enable-dmeventd \
|
||||
--enable-udev_rules \
|
||||
--enable-udev_sync \
|
||||
--with-cache=internal \
|
||||
--with-snapshots=internal \
|
||||
--with-mirrors=internal \
|
||||
--with-thin=internal \
|
||||
--with-interface=ioctl \
|
||||
--enable-static_link=no \
|
||||
--disable-readline \
|
||||
--disable-realtime \
|
||||
--enable-udev_rules \
|
||||
--enable-udev_sync \
|
||||
--disable-selinux \
|
||||
--with-confdir=/etc \
|
||||
--enable-readline \
|
||||
--enable-fsadm \
|
||||
--enable-applib \
|
||||
--enable-cmdlib \
|
||||
--enable-pkgconfig " % get.sbinDIR())
|
||||
--enable-pkgconfig \
|
||||
--enable-dmeventd \
|
||||
--enable-lvmetad \
|
||||
--enable-lvmpolld" % get.sbinDIR())
|
||||
|
||||
# pisitools.dosed("make.tmpl","-lm","")
|
||||
|
||||
def build():
|
||||
autotools.make("-C include")
|
||||
#autotools.make("-C libdm")
|
||||
#autotools.make("-C lib")
|
||||
autotools.make()
|
||||
|
||||
def install():
|
||||
@@ -121,9 +48,11 @@ def install():
|
||||
|
||||
for dir in ["archive", "backup", "cache"]:
|
||||
pisitools.dodir("/etc/lvm/%s" % dir)
|
||||
shelltools.chmod(get.installDIR() + "/etc/lvm/%s" % dir, 0700)
|
||||
shelltools.chmod(get.installDIR() + "/etc/lvm/%s" % dir, 0755)
|
||||
shelltools.chown(get.installDIR() + "/etc/lvm/%s" % dir, uid = 'root', gid = 'root')
|
||||
|
||||
shelltools.system("sed -i 's,use_lvmetad = 1,use_lvmetad = 1,' %s/etc/lvm/lvm.conf" % get.installDIR())
|
||||
|
||||
#pisitools.move("/sbin/lvmconf","scripts/lvmconf.sh")
|
||||
|
||||
builddiet()
|
||||
pisitools.dodoc("COPYING", "COPYING.LIB", "README", "VERSION", "VERSION_DM", "WHATS_NEW", "WHATS_NEW_DM")
|
||||
pisitools.dodoc("COPYING", "COPYING.LIB", "README", "VERSION", "WHATS_NEW") # "VERSION_DM", "WHATS_NEW_DM"
|
||||
|
||||
Reference in New Issue
Block a user