From 6de42955ca7251f3328e11a6269db1467afd2916 Mon Sep 17 00:00:00 2001 From: Sergey Morozov Date: Tue, 26 Apr 2022 00:35:48 +0300 Subject: [PATCH] Build two images (with and without gui). Add LXDE, Firefox, gparted and NetworkManager to image with gui. Add build and clean scripts. --- README.md | 10 +- ...dbus-org.freedesktop.nm-dispatcher.service | 1 + .../NetworkManager.service | 1 + .../NetworkManager-wait-online.service | 1 + airootfs/root/.config/lxpanel/LXDE/config | 2 + .../root/.config/lxpanel/LXDE/panels/panel | 160 ++++++++++++++++++ .../root/.config/lxpanel/launchtaskbar.cfg | 4 + airootfs/root/.xinitrc | 1 + build | 5 + clean | 2 + lxde/airootfs | 1 + lxde/bootstrap_packages.x86_64 | 1 + lxde/efiboot | 1 + lxde/packages.x86_64 | 132 +++++++++++++++ lxde/pacman.conf | 1 + lxde/profiledef.sh | 23 +++ lxde/syslinux | 1 + nox/airootfs | 1 + nox/bootstrap_packages.x86_64 | 1 + nox/efiboot | 1 + packages.x86_64 => nox/packages.x86_64 | 0 nox/pacman.conf | 1 + profiledef.sh => nox/profiledef.sh | 2 +- nox/syslinux | 1 + 24 files changed, 350 insertions(+), 4 deletions(-) create mode 120000 airootfs/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service create mode 120000 airootfs/etc/systemd/system/multi-user.target.wants/NetworkManager.service create mode 120000 airootfs/etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service create mode 100644 airootfs/root/.config/lxpanel/LXDE/config create mode 100644 airootfs/root/.config/lxpanel/LXDE/panels/panel create mode 100644 airootfs/root/.config/lxpanel/launchtaskbar.cfg create mode 100644 airootfs/root/.xinitrc create mode 100755 build create mode 100755 clean create mode 120000 lxde/airootfs create mode 120000 lxde/bootstrap_packages.x86_64 create mode 120000 lxde/efiboot create mode 100644 lxde/packages.x86_64 create mode 120000 lxde/pacman.conf create mode 100644 lxde/profiledef.sh create mode 120000 lxde/syslinux create mode 120000 nox/airootfs create mode 120000 nox/bootstrap_packages.x86_64 create mode 120000 nox/efiboot rename packages.x86_64 => nox/packages.x86_64 (100%) create mode 120000 nox/pacman.conf rename profiledef.sh => nox/profiledef.sh (96%) create mode 120000 nox/syslinux diff --git a/README.md b/README.md index d59114a..fa3ac55 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,14 @@ sudo pacman-key --lsign-key DDF7DB817396A49B2A2723F7403BD972F75D9D76 Этими ключами подписаны пакеты в archzfs. Далее в каталоге проекта: ``` -sudo mkarchiso -v ./ +sudo ./build ``` -В случае успешного завершения в каталоге out должен быть создан образ диска. +В случае успешного завершения, в каталоге `out` должны быть созданы ISO образы. Если у вас установлен qemu, можете протестировать образ: ``` -run_archiso -u -i out/archlinux-zfs-*.iso +run_archiso -u -i out/archlinux-zfs-lxde-*.iso +``` +Для очистки каталога проекта от результатов сборки используйте команду: +``` +sudo ./clean ``` diff --git a/airootfs/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service b/airootfs/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service new file mode 120000 index 0000000..a7e5cd4 --- /dev/null +++ b/airootfs/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/NetworkManager-dispatcher.service \ No newline at end of file diff --git a/airootfs/etc/systemd/system/multi-user.target.wants/NetworkManager.service b/airootfs/etc/systemd/system/multi-user.target.wants/NetworkManager.service new file mode 120000 index 0000000..e874a9b --- /dev/null +++ b/airootfs/etc/systemd/system/multi-user.target.wants/NetworkManager.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/NetworkManager.service \ No newline at end of file diff --git a/airootfs/etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service b/airootfs/etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service new file mode 120000 index 0000000..b78b586 --- /dev/null +++ b/airootfs/etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/NetworkManager-wait-online.service \ No newline at end of file diff --git a/airootfs/root/.config/lxpanel/LXDE/config b/airootfs/root/.config/lxpanel/LXDE/config new file mode 100644 index 0000000..76228e2 --- /dev/null +++ b/airootfs/root/.config/lxpanel/LXDE/config @@ -0,0 +1,2 @@ +[Command] +Logout=lxde-logout diff --git a/airootfs/root/.config/lxpanel/LXDE/panels/panel b/airootfs/root/.config/lxpanel/LXDE/panels/panel new file mode 100644 index 0000000..e09cf7c --- /dev/null +++ b/airootfs/root/.config/lxpanel/LXDE/panels/panel @@ -0,0 +1,160 @@ +# lxpanel config file. Manually editing is not recommended. +# Use preference dialog in lxpanel to adjust config when you can. + +Global { + edge=bottom + align=left + margin=0 + widthtype=percent + width=100 + height=26 + transparent=0 + tintcolor=#000000 + alpha=0 + setdocktype=1 + setpartialstrut=1 + autohide=0 + heightwhenhidden=0 + usefontcolor=1 + fontcolor=#ffffff + background=1 + backgroundfile=/usr/share/lxpanel/images/background.png +} +Plugin { + type=space + Config { + Size=2 + } +} +Plugin { + type=menu + Config { + image=/usr/share/lxde/images/lxde-icon.png + system { + } + separator { + } + item { + command=run + } + separator { + } + item { + image=gnome-logout + command=logout + } + } +} +Plugin { + type=launchbar + Config { + Button { + id=pcmanfm.desktop + } + Button { + id=firefox.desktop + } + } +} +Plugin { + type=space + Config { + Size=4 + } +} +Plugin { + type=wincmd + Config { + Button1=iconify + Button2=shade + } +} +Plugin { + type=space + Config { + Size=4 + } +} +Plugin { + type=pager + Config { + } +} +Plugin { + type=space + Config { + Size=4 + } +} +Plugin { + type=taskbar + expand=1 + Config { + tooltips=1 + IconsOnly=0 + AcceptSkipPager=1 + ShowIconified=1 + ShowMapped=1 + ShowAllDesks=0 + UseMouseWheel=1 + UseUrgencyHint=1 + FlatButton=0 + MaxTaskWidth=150 + spacing=1 + } +} +Plugin { + type=cpu + Config { + } +} +Plugin { + type=volume + Config { + VolumeMuteKey=XF86AudioMute + VolumeDownKey=XF86AudioLowerVolume + VolumeUpKey=XF86AudioRaiseVolume + } +} +Plugin { + type=tray + Config { + } +} +Plugin { + type=dclock + Config { + ClockFmt=%R + TooltipFmt=%A %x + BoldFont=0 + IconOnly=0 + CenterText=0 + } +} +Plugin { + type=launchbar + Config { + Button { + id=lxde-screenlock.desktop + } + Button { + id=lxde-logout.desktop + } + } +} +Plugin { + type=xkb + Config { + Model=pc105 + LayoutsList=us,ru + VariantsList=, + ToggleOpt=grp:ctrl_shift_toggle + KeepSysLayouts=0 + PerWinLayout=1 + } +} +Plugin { + type=netstatus + Config { + } +} diff --git a/airootfs/root/.config/lxpanel/launchtaskbar.cfg b/airootfs/root/.config/lxpanel/launchtaskbar.cfg new file mode 100644 index 0000000..a3d0e52 --- /dev/null +++ b/airootfs/root/.config/lxpanel/launchtaskbar.cfg @@ -0,0 +1,4 @@ +[special_cases] +synaptic=synaptic-pkexec +soffice.bin=libreoffice +x-terminal-emulator=lxterminal diff --git a/airootfs/root/.xinitrc b/airootfs/root/.xinitrc new file mode 100644 index 0000000..e0d1745 --- /dev/null +++ b/airootfs/root/.xinitrc @@ -0,0 +1 @@ +exec startlxde \ No newline at end of file diff --git a/build b/build new file mode 100755 index 0000000..9d87568 --- /dev/null +++ b/build @@ -0,0 +1,5 @@ +#!/bin/bash +mkarchiso -v ./nox +rm -rf work +mkarchiso -v ./lxde +rm -rf work diff --git a/clean b/clean new file mode 100755 index 0000000..b2af817 --- /dev/null +++ b/clean @@ -0,0 +1,2 @@ +#!/bin/bash +rm -rf work out diff --git a/lxde/airootfs b/lxde/airootfs new file mode 120000 index 0000000..b63377c --- /dev/null +++ b/lxde/airootfs @@ -0,0 +1 @@ +../airootfs \ No newline at end of file diff --git a/lxde/bootstrap_packages.x86_64 b/lxde/bootstrap_packages.x86_64 new file mode 120000 index 0000000..2af374f --- /dev/null +++ b/lxde/bootstrap_packages.x86_64 @@ -0,0 +1 @@ +../bootstrap_packages.x86_64 \ No newline at end of file diff --git a/lxde/efiboot b/lxde/efiboot new file mode 120000 index 0000000..55c412e --- /dev/null +++ b/lxde/efiboot @@ -0,0 +1 @@ +../efiboot \ No newline at end of file diff --git a/lxde/packages.x86_64 b/lxde/packages.x86_64 new file mode 100644 index 0000000..f50df18 --- /dev/null +++ b/lxde/packages.x86_64 @@ -0,0 +1,132 @@ +alsa-utils +amd-ucode +arch-install-scripts +archinstall +b43-fwcutter +base +bind-tools +brltty +broadcom-wl +btrfs-progs +clonezilla +cloud-init +crda +cryptsetup +darkhttpd +ddrescue +dhclient +dhcpcd +diffutils +dmraid +dnsmasq +dosfstools +e2fsprogs +edk2-shell +efibootmgr +espeakup +ethtool +exfatprogs +f2fs-tools +fatresize +fsarchiver +gnu-netcat +gpart +gpm +gptfdisk +grml-zsh-config +hdparm +intel-ucode +ipw2100-fw +ipw2200-fw +irssi +iw +iwd +jfsutils +kitty-terminfo +less +lftp +libfido2 +libusb-compat +linux +linux-atm +linux-firmware +livecd-sounds +lsscsi +lvm2 +lynx +man-db +man-pages +mc +mdadm +memtest86+ +mkinitcpio +mkinitcpio-archiso +mkinitcpio-nfs-utils +modemmanager +mtools +nano +nbd +ndisc6 +nfs-utils +nilfs-utils +nmap +ntfs-3g +nvme-cli +openconnect +openssh +openvpn +partclone +parted +partimage +pcsclite +ppp +pptpclient +pv +qemu-guest-agent +reflector +reiserfsprogs +rp-pppoe +rsync +rxvt-unicode-terminfo +screen +sdparm +sg3_utils +smartmontools +sof-firmware +squashfs-tools +sudo +syslinux +systemd-resolvconf +tcpdump +terminus-font +testdisk +tmux +tpm2-tss +udftools +usb_modeswitch +usbmuxd +usbutils +vim +virtualbox-guest-utils-nox +vpnc +wireless-regdb +wireless_tools +wpa_supplicant +wvdial +xfsprogs +xl2tpd +zsh + +# Custom +linux-headers +zfs-dkms +ncdu +xorg +xorg-xinit +lxde +networkmanager +nm-connection-editor +firefox +firefox-i18n-en-us +firefox-i18n-ru +gparted \ No newline at end of file diff --git a/lxde/pacman.conf b/lxde/pacman.conf new file mode 120000 index 0000000..4db290e --- /dev/null +++ b/lxde/pacman.conf @@ -0,0 +1 @@ +../pacman.conf \ No newline at end of file diff --git a/lxde/profiledef.sh b/lxde/profiledef.sh new file mode 100644 index 0000000..126863c --- /dev/null +++ b/lxde/profiledef.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2034 + +iso_name="archlinux-zfs-lxde" +iso_label="ARCH_$(date +%Y%m)" +iso_publisher="Arch Linux " +iso_application="Arch Linux Live/Rescue CD" +iso_version="$(date +%Y.%m.%d)" +install_dir="arch" +buildmodes=('iso') +bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' 'uefi-x64.systemd-boot.esp' 'uefi-x64.systemd-boot.eltorito') +arch="x86_64" +pacman_conf="pacman.conf" +airootfs_image_type="squashfs" +airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M') +file_permissions=( + ["/etc/shadow"]="0:0:400" + ["/root"]="0:0:750" + ["/root/.automated_script.sh"]="0:0:755" + ["/usr/local/bin/choose-mirror"]="0:0:755" + ["/usr/local/bin/Installation_guide"]="0:0:755" + ["/usr/local/bin/livecd-sound"]="0:0:755" +) diff --git a/lxde/syslinux b/lxde/syslinux new file mode 120000 index 0000000..bfbc469 --- /dev/null +++ b/lxde/syslinux @@ -0,0 +1 @@ +../syslinux \ No newline at end of file diff --git a/nox/airootfs b/nox/airootfs new file mode 120000 index 0000000..b63377c --- /dev/null +++ b/nox/airootfs @@ -0,0 +1 @@ +../airootfs \ No newline at end of file diff --git a/nox/bootstrap_packages.x86_64 b/nox/bootstrap_packages.x86_64 new file mode 120000 index 0000000..2af374f --- /dev/null +++ b/nox/bootstrap_packages.x86_64 @@ -0,0 +1 @@ +../bootstrap_packages.x86_64 \ No newline at end of file diff --git a/nox/efiboot b/nox/efiboot new file mode 120000 index 0000000..55c412e --- /dev/null +++ b/nox/efiboot @@ -0,0 +1 @@ +../efiboot \ No newline at end of file diff --git a/packages.x86_64 b/nox/packages.x86_64 similarity index 100% rename from packages.x86_64 rename to nox/packages.x86_64 diff --git a/nox/pacman.conf b/nox/pacman.conf new file mode 120000 index 0000000..4db290e --- /dev/null +++ b/nox/pacman.conf @@ -0,0 +1 @@ +../pacman.conf \ No newline at end of file diff --git a/profiledef.sh b/nox/profiledef.sh similarity index 96% rename from profiledef.sh rename to nox/profiledef.sh index 4eb4a85..b8163aa 100644 --- a/profiledef.sh +++ b/nox/profiledef.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # shellcheck disable=SC2034 -iso_name="archlinux-zfs" +iso_name="archlinux-zfs-nox" iso_label="ARCH_$(date +%Y%m)" iso_publisher="Arch Linux " iso_application="Arch Linux Live/Rescue CD" diff --git a/nox/syslinux b/nox/syslinux new file mode 120000 index 0000000..bfbc469 --- /dev/null +++ b/nox/syslinux @@ -0,0 +1 @@ +../syslinux \ No newline at end of file