From ffe6f140b4269c8015609e6c0ed3cf919c293f44 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Thu, 9 Apr 2015 10:22:43 +0200 Subject: [PATCH] Sync to current openmamba target --- Makefile | 6 +-- makedist.inc.sh | 8 ++-- platforms/livecd-gnome-root/post.inc.sh | 5 +++ platforms/livecd-light-root/post.inc.sh | 5 +++ platforms/livecd-root/post.inc.sh | 5 +++ platforms/livecd/Makefile | 2 +- platforms/livecd/post.inc.sh | 41 +++++++++++++++++++ platforms/livedvd-root/post.inc.sh | 5 +++ platforms/livedvd/Makefile | 2 +- platforms/livedvd/post.inc.sh | 41 +++++++++++++++++++ platforms/rootfs-base/Makefile | 15 +++++++ platforms/rootfs-base/Makefile.defs | 2 + platforms/rootfs-base/post.inc.sh | 0 platforms/rootfs-base/root/etc/dhcpd.conf | 30 ++++++++++++++ .../rootfs-base/root/etc/sysconfig/dhcpd | 3 ++ platforms/rootfs-base/settings.inc | 10 +++++ platforms/rootfs-light/Makefile | 2 +- platforms/rootfs/Makefile | 2 +- 18 files changed, 173 insertions(+), 11 deletions(-) create mode 100644 platforms/rootfs-base/Makefile create mode 100644 platforms/rootfs-base/Makefile.defs create mode 100644 platforms/rootfs-base/post.inc.sh create mode 100644 platforms/rootfs-base/root/etc/dhcpd.conf create mode 100644 platforms/rootfs-base/root/etc/sysconfig/dhcpd create mode 100644 platforms/rootfs-base/settings.inc diff --git a/Makefile b/Makefile index 29dd33c..8f106c5 100644 --- a/Makefile +++ b/Makefile @@ -4,14 +4,14 @@ $(MAKEDIST_TARGET)-devel: @[ "$(RELEASE)" = "devel" -o "$(RELEASE)" = "" ] && echo -n "openmamba-devel "; \ : $(MAKEDIST_TARGET)-base: filesystem gzip texinfo ldconfig bash libreadline glibc \ - ncurses initscripts setup coreutils rootfiles chkconfig \ - udev ttf-freefont libpython libgpm debianutils + ncurses systemd setup coreutils rootfiles chkconfig \ + udev debianutils openmamba-release # splashutils $(MAKEDIST_TARGET)-firmwares: ipw2100-firmware ipw2200-firmware zd1211-firmware radeon-firmware \ rt2501-firmware rt2860-firmware rt2870-firmware r5u87x-firmware $(MAKEDIST_TARGET)-commontools: $(_init_system) util-linux kmod \ procps sed grep tar bzip2 unzip zip pciutils lshw \ - pam shadow-common pwdutils acpid mingetty screen \ + pam shadow-common pwdutils acpid screen \ net-tools prelink mc dhcpclient timezone nfs-utils \ wireless_tools wpa_supplicant openmamba-release refit-tools openssh-clients \ dosfstools man mbr iptables cups vim iputils sudo postplug less \ diff --git a/makedist.inc.sh b/makedist.inc.sh index 576168e..d2b67c4 100644 --- a/makedist.inc.sh +++ b/makedist.inc.sh @@ -24,15 +24,15 @@ libattr libstdc++6 libpam pam" "--nodeps --noorder --noscripts" if [ ! "$MULTILANGUAGE" ]; then cat > $MOUNTDIR/etc/vconsole.conf << _EOF KEYMAP=$KEYMAP -FONT=lat9w-16 -FONT_MAP=8859-1_to_uni +FONT=LatGrkCyr-8x16 +FONT_MAP=latin2u FONT_UNIMAP= UNICODE=1 _EOF else cat > $MOUNTDIR/etc/vconsole.conf << _EOF -FONT=lat9w-16 -FONT_MAP=8859-1_to_uni +FONT=LatGrkCyr-8x16 +FONT_MAP=latin2u FONT_UNIMAP= UNICODE=1 _EOF diff --git a/platforms/livecd-gnome-root/post.inc.sh b/platforms/livecd-gnome-root/post.inc.sh index 9b0a3d2..ed8190d 100644 --- a/platforms/livecd-gnome-root/post.inc.sh +++ b/platforms/livecd-gnome-root/post.inc.sh @@ -8,6 +8,11 @@ chroot $MOUNTDIR gtk-update-icon-cache /usr/share/icons/hicolor # FIXME: ensure alternatives are correclty set chroot $MOUNTDIR update-alternatives-set-dri +# install icon on liveuser desktop +chroot $MOUNTDIR cp /usr/share/applications/openmamba-installer.desktop /home/liveuser/Desktop/ +chroot $MOUNTDIR chmod +x /home/liveuser/Desktop/openmamba-installer.desktop +chroot $MOUNTDIR chown liveuser /home/liveuser/Desktop/openmamba-installer.desktop + # clean rpm database before doing other operations with internal rpm # to fix cross x86/x86_64 installation error: # error: db4 error(-30986) from dbcursor->get: DB_PAGE_NOTFOUND: Requested page not found diff --git a/platforms/livecd-light-root/post.inc.sh b/platforms/livecd-light-root/post.inc.sh index 6ba339b..e9a9f03 100644 --- a/platforms/livecd-light-root/post.inc.sh +++ b/platforms/livecd-light-root/post.inc.sh @@ -1,6 +1,11 @@ # FIXME: ensure alternatives are correclty set chroot $MOUNTDIR update-alternatives-set-dri +# install icon on liveuser desktop +chroot $MOUNTDIR cp /usr/share/applications/openmamba-installer.desktop /home/liveuser/Desktop/ +chroot $MOUNTDIR chmod +x /home/liveuser/Desktop/openmamba-installer.desktop +chroot $MOUNTDIR chown liveuser /home/liveuser/Desktop/openmamba-installer.desktop + # clean rpm database before doing other operations with internal rpm # to fix cross x86/x86_64 installation error: # error: db4 error(-30986) from dbcursor->get: DB_PAGE_NOTFOUND: Requested page not found diff --git a/platforms/livecd-root/post.inc.sh b/platforms/livecd-root/post.inc.sh index 73bb7a2..bd392cc 100644 --- a/platforms/livecd-root/post.inc.sh +++ b/platforms/livecd-root/post.inc.sh @@ -6,6 +6,11 @@ for f in /usr/share/applications/chromium-devel.desktop; do chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f || exit 1 done +# install icon on liveuser desktop +chroot $MOUNTDIR cp /usr/share/applications/openmamba-installer.desktop /home/liveuser/Desktop/ +chroot $MOUNTDIR chmod +x /home/liveuser/Desktop/openmamba-installer.desktop +chroot $MOUNTDIR chown liveuser /home/liveuser/Desktop/openmamba-installer.desktop + # clean rpm database before doing other operations with internal rpm # to fix cross x86/x86_64 installation error: # error: db4 error(-30986) from dbcursor->get: DB_PAGE_NOTFOUND: Requested page not found diff --git a/platforms/livecd/Makefile b/platforms/livecd/Makefile index 1ca514e..e8b6eed 100644 --- a/platforms/livecd/Makefile +++ b/platforms/livecd/Makefile @@ -1,4 +1,4 @@ -$(MAKEDIST_TARGET)-livecd: openmamba-release memtest86+ syslinux macbook-tools dracut +$(MAKEDIST_TARGET)-livecd: openmamba-release memtest86+ syslinux macbook-tools dracut grub-efi-x86_64 # Localized targets $(MAKEDIST_TARGET)-livecd-en: $(MAKEDIST_TARGET)-livecd-it: diff --git a/platforms/livecd/post.inc.sh b/platforms/livecd/post.inc.sh index 486ecf5..67aaf7e 100644 --- a/platforms/livecd/post.inc.sh +++ b/platforms/livecd/post.inc.sh @@ -122,6 +122,47 @@ cp $MOUNTDIR/usr/share/syslinux/vesamenu.c32 $MOUNTDIR2/boot/isolinux/ buildinfo="`cat $MOUNTDIR/etc/openmamba-release` [$PRODUCT_NAME build:`date +%c`]" sed -i "s|%buildinfo%|$buildinfo|" $MOUNTDIR2/boot/isolinux/menu.txt +# +# EFI support section BEGIN +# + +# create EFI grub 32 and 64 bit images +mkdir -p $MOUNTDIR2/EFI/BOOT/ +grub-mkimage -o $MOUNTDIR2/EFI/BOOT/bootx64.efi -O x86_64-efi -p /EFI/BOOT \ + part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot linux echo \ + help gfxterm gettext png efi_gop efi_uga search search_label search_fs_uuid \ + iso9660 configfile || { + errorAndExit $"Error: unable to create GRUB x86_64-efi image" +} + +# basic extlinux.conf -> grub.cfg conversion +echo "search --no-floppy --label --set=root openmamba_live" > $MOUNTDIR2/EFI/BOOT/grub.cfg +while read line; do + case $line in + "MENU LABEL "*) [ "$CURR_BRACKET_OPEN" = "1" ] && echo "}" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + echo "menuentry \"${line/MENU LABEL }\" {" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + CURR_BRACKET_OPEN=1 + ;; + "kernel "*) CURR_KERNEL="${line/kernel }" + echo "echo \"Loading ${CURR_KERNEL}\"" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + ;; + "append "*) set -- ${line/append initrd=} + CURR_INITRD="$1" + CURR_CMDLINE="${line/append initrd=$CURR_INITRD}" + echo "linux ${CURR_KERNEL} ${CURR_CMDLINE}" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + echo "echo \"Loading ${CURR_INITRD}\"" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + echo "initrd ${CURR_INITRD}" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + echo "}" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + CURR_BRACKET_OPEN=0 + ;; + esac +done < $MOUNTDIR2/boot/isolinux/isolinux.cfg +[ "$CURR_BRACKET_OPEN" = "1" ] && echo "}" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + +# +# EFI support section END +# + #echo "Adding binary packages from pkggroups.db..." #. $LOCALSTATEDIR/.${MEDIA_NAMES[0]}.distinfo #LANG=${LANGUAGE:0:2} . $MOUNTDIR/usr/share/openmamba/pkggroups.db diff --git a/platforms/livedvd-root/post.inc.sh b/platforms/livedvd-root/post.inc.sh index a96ee49..40f29f2 100644 --- a/platforms/livedvd-root/post.inc.sh +++ b/platforms/livedvd-root/post.inc.sh @@ -6,6 +6,11 @@ for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applicati chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f done +# install icon on liveuser desktop +chroot $MOUNTDIR cp /usr/share/applications/openmamba-installer.desktop /home/liveuser/Desktop/ +chroot $MOUNTDIR chmod +x /home/liveuser/Desktop/openmamba-installer.desktop +chroot $MOUNTDIR chown liveuser /home/liveuser/Desktop/openmamba-installer.desktop + # clean rpm database before doing other operations with internal rpm # to fix cross x86/x86_64 installation error: # error: db4 error(-30986) from dbcursor->get: DB_PAGE_NOTFOUND: Requested page not found diff --git a/platforms/livedvd/Makefile b/platforms/livedvd/Makefile index f3170a2..40cfedc 100644 --- a/platforms/livedvd/Makefile +++ b/platforms/livedvd/Makefile @@ -1,4 +1,4 @@ -$(MAKEDIST_TARGET)-livedvd: openmamba-release memtest86+ syslinux macbook-tools +$(MAKEDIST_TARGET)-livedvd: openmamba-release memtest86+ syslinux macbook-tools dracut grub-efi-x86_64 # Localized targets $(MAKEDIST_TARGET)-livedvd-en: $(MAKEDIST_TARGET)-livedvd-it: diff --git a/platforms/livedvd/post.inc.sh b/platforms/livedvd/post.inc.sh index ef67465..8bc2903 100644 --- a/platforms/livedvd/post.inc.sh +++ b/platforms/livedvd/post.inc.sh @@ -150,6 +150,47 @@ cp $MOUNTDIR/usr/share/syslinux/vesamenu.c32 $MOUNTDIR2/boot/isolinux/ buildinfo="`cat $MOUNTDIR/etc/openmamba-release` [$PRODUCT_NAME build:`date +%c`]" sed -i "s|%buildinfo%|$buildinfo|" $MOUNTDIR2/boot/isolinux/menu.txt +# +# EFI support section BEGIN +# + +# create EFI grub 32 and 64 bit images +mkdir -p $MOUNTDIR2/EFI/BOOT/ +grub-mkimage -o $MOUNTDIR2/EFI/BOOT/bootx64.efi -O x86_64-efi -p /EFI/BOOT \ + part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot linux echo \ + help gfxterm gettext png efi_gop efi_uga search search_label search_fs_uuid \ + iso9660 configfile || { + errorAndExit $"Error: unable to create GRUB x86_64-efi image" +} + +# basic extlinux.conf -> grub.cfg conversion +echo "search --no-floppy --label --set=root openmamba_live" > $MOUNTDIR2/EFI/BOOT/grub.cfg +while read line; do + case $line in + "MENU LABEL "*) [ "$CURR_BRACKET_OPEN" = "1" ] && echo "}" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + echo "menuentry \"${line/MENU LABEL }\" {" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + CURR_BRACKET_OPEN=1 + ;; + "kernel "*) CURR_KERNEL="${line/kernel }" + echo "echo \"Loading ${CURR_KERNEL}\"" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + ;; + "append "*) set -- ${line/append initrd=} + CURR_INITRD="$1" + CURR_CMDLINE="${line/append initrd=$CURR_INITRD}" + echo "linux ${CURR_KERNEL} ${CURR_CMDLINE}" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + echo "echo \"Loading ${CURR_INITRD}\"" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + echo "initrd ${CURR_INITRD}" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + echo "}" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + CURR_BRACKET_OPEN=0 + ;; + esac +done < $MOUNTDIR2/boot/isolinux/isolinux.cfg +[ "$CURR_BRACKET_OPEN" = "1" ] && echo "}" >> $MOUNTDIR2/EFI/BOOT/grub.cfg + +# +# EFI support section END +# + #echo "Adding binary packages from pkggroups.db..." #. $LOCALSTATEDIR/.${MEDIA_NAMES[0]}.distinfo #LANG=${LANGUAGE:0:2} . $MOUNTDIR/usr/share/openmamba/pkggroups.db diff --git a/platforms/rootfs-base/Makefile b/platforms/rootfs-base/Makefile new file mode 100644 index 0000000..76d2c09 --- /dev/null +++ b/platforms/rootfs-base/Makefile @@ -0,0 +1,15 @@ +$(MAKEDIST_TARGET)-$(PLATFORM)-arm: + +$(MAKEDIST_TARGET)-$(PLATFORM)-i586: + +$(MAKEDIST_TARGET)-$(PLATFORM)-x86_64: + +$(MAKEDIST_TARGET)-$(PLATFORM): $(MAKEDIST_TARGET)-devel \ + bash rpm smart + +# Localization targets +$(MAKEDIST_TARGET)-$(PLATFORM)-en: + +$(MAKEDIST_TARGET)-$(PLATFORM)-es: + +$(MAKEDIST_TARGET)-$(PLATFORM)-it: diff --git a/platforms/rootfs-base/Makefile.defs b/platforms/rootfs-base/Makefile.defs new file mode 100644 index 0000000..a9dd47d --- /dev/null +++ b/platforms/rootfs-base/Makefile.defs @@ -0,0 +1,2 @@ +packagekitgui = gnome-packagekit +firewallgui = gui-ufw diff --git a/platforms/rootfs-base/post.inc.sh b/platforms/rootfs-base/post.inc.sh new file mode 100644 index 0000000..e69de29 diff --git a/platforms/rootfs-base/root/etc/dhcpd.conf b/platforms/rootfs-base/root/etc/dhcpd.conf new file mode 100644 index 0000000..6bfe540 --- /dev/null +++ b/platforms/rootfs-base/root/etc/dhcpd.conf @@ -0,0 +1,30 @@ +#ddns-update-style ad-hoc; +ignore client-updates; + +subnet 10.99.99.0 netmask 255.255.255.0 { +# --- default gateway +# option routers 192.168.0.254; +# option subnet-mask 255.255.255.0; +# +# option nis-domain "domain.it"; +# option domain-name "domain.it"; +# option domain-name-servers 192.168.0.254; +# +# option time-offset -18000; # Eastern Standard Time +# option ntp-servers 192.168.0.1; +# option netbios-name-servers 192.168.0.1; +# --- Selects point-to-point node (default is hybrid). Don't change this unless +# -- you understand Netbios very well +# option netbios-node-type 2; +# + range dynamic-bootp 10.99.99.100 10.99.99.199; + default-lease-time 21600; + max-lease-time 43200; +# +# # we want the nameserver to appear at a fixed address +# host ns { +# next-server dns.domain.it; +# hardware ethernet 01:23:45:67:89:AB; +# fixed-address 1.2.3.4; +# } +} diff --git a/platforms/rootfs-base/root/etc/sysconfig/dhcpd b/platforms/rootfs-base/root/etc/sysconfig/dhcpd new file mode 100644 index 0000000..92a5b74 --- /dev/null +++ b/platforms/rootfs-base/root/etc/sysconfig/dhcpd @@ -0,0 +1,3 @@ +# Command line options here +DHCPDIFS="usb0" +DHCPDARGS= diff --git a/platforms/rootfs-base/settings.inc b/platforms/rootfs-base/settings.inc new file mode 100644 index 0000000..b1cf6a5 --- /dev/null +++ b/platforms/rootfs-base/settings.inc @@ -0,0 +1,10 @@ +KERNEL_IGNORE=true +APPLICATION_TARGET="" +MEDIA=archive_xz +#INSTALL_PACKAGES="bash" +TARGET_HOSTNAME=openmamba-rootfs-base +#rpmextraargs="--noscripts" +#DEBUG=1 +#DEVEL=1 +KEEP_RPM=1 +#RPM=rpm diff --git a/platforms/rootfs-light/Makefile b/platforms/rootfs-light/Makefile index 38e9024..8079e34 100644 --- a/platforms/rootfs-light/Makefile +++ b/platforms/rootfs-light/Makefile @@ -17,7 +17,7 @@ $(MAKEDIST_TARGET)-$(PLATFORM): $(MAKEDIST_TARGET)-devel \ liblame expect prelink NetworkManager ModemManager NetworkManager-openvpn \ procps xorg-server x11vnc xkeyboard-config \ xorg-drv-input-tslib xcursor-transparent-theme rpm smart xdg-utils \ - dhcp-server rfkill plymouth livecd-tools rdesktop \ + dhcp-server rfkill plymouth live-user-environment \ postplug-xorg postplug-sound gparted tar net-tools mambatray florence # startactive diff --git a/platforms/rootfs/Makefile b/platforms/rootfs/Makefile index 08eb3af..8def664 100644 --- a/platforms/rootfs/Makefile +++ b/platforms/rootfs/Makefile @@ -24,7 +24,7 @@ $(MAKEDIST_TARGET)-$(PLATFORM): $(MAKEDIST_TARGET)-devel \ liblame expect prelink NetworkManager ModemManager procps \ xorg-server x11vnc xkeyboard-config screen \ xorg-drv-input-tslib xcursor-transparent-theme rpm smart xdg-utils \ - dhcp-server rfkill plymouth livecd-tools rdesktop mingetty \ + dhcp-server rfkill plymouth live-user-environment \ postplug-xorg postplug-sound gparted tar net-tools mambatray kvkbd # startactive