diff --git a/filesystem/makefile b/filesystem/makefile index d91f6ba..ffc280d 100644 --- a/filesystem/makefile +++ b/filesystem/makefile @@ -1,8 +1,63 @@ -filesystem_packages: - $(MAKE) -C packages all +ifndef FILESYSTEM_MK +FILESYSTEM_MK := 1 +ifndef PRAWNOS_ROOT +PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel) +endif +include $(PRAWNOS_ROOT)/scripts/BuildScripts/BuildCommon.mk + +FS_BUILD_LOG := $(PRAWNOS_BUILD_LOGS)/fs-log.txt + +PRAWNOS_FILESYSTEM_PACKAGES := $(PRAWNOS_FILESYSTEM)/packages + +PACKAGES_BUILT := $(PRAWNOS_FILESYSTEM_PACKAGES)/.packages_built + +.PHONY: filesystem \ + pbuilder_create \ + pbuilder_update \ + filesystem_packages \ + filesystem_packages_clean \ + filesystem_packages_install + +### Filesystem Image + +filesystem: $(PRAWNOS_IMAGE_BASE) + +### Packages + +filesystem_packages: $(PRAWNOS_BUILD) filesystem_packages_clean: - $(MAKE) -C packages clean + $(MAKE) -C $(PRAWNOS_FILESYSTEM_PACKAGES) clean + rm -f $(PRAWNOS_PACKAGES_BUILT) filesystem_packages_install: - $(MAKE) -C packages INSTALL_TARGET=$(INSTALL_TARGET) install +ifndef INSTALL_TARGET + $(error INSTALL_TARGET is not set) +endif + $(MAKE) -C $(PRAWNOS_FILESYSTEM_PACKAGES) INSTALL_TARGET=$(INSTALL_TARGET) install + +### Pbuilder + +pbuilder_create: $(PBUILDER_CHROOT) + +#TODO: should only update if not updated for a day +pbuilder_update: $(PBUILDER_CHROOT) + @echo UPDATING $(PBUILDER_CHROOT) + pbuilder update --basetgz $(PBUILDER_CHROOT) --configfile $(PBUILDER_RC) + +### REAL TARGETS + +$(PACKAGES_BUILT): $(PRAWNOS_BUILD) + $(MAKE) -C $(PRAWNOS_FILESYSTEM_PACKAGES) all + touch $(PACKAGES_BUILT) + +$(PBUILDER_CHROOT): $(PRAWNOS_BUILD) + @echo BUILDING $(PBUILDER_CHROOT) + pbuilder create --basetgz $(PBUILDER_CHROOT) --configfile $(PBUILDER_RC) + +$(PRAWNOS_IMAGE_BASE): $(PRAWNOS_BUILD) $(PACKAGES_BUILT) + rm -rf $(FS_BUILD_LOG) + $(PRAWNOS_FILESYSTEM_SCRIPTS_BUILD) $(KVER) $(DEBIAN_SUITE) $(PRAWNOS_IMAGE_BASE) $(PRAWNOS_ROOT) $(PRAWNOS_SHARED_SCRIPTS) $(PRAWNOS_FILESYSTEM_RESOURCES) 2>&1 | tee $(FS_BUILD_LOG) + + +endif diff --git a/filesystem/packages/.gitignore b/filesystem/packages/.gitignore new file mode 100644 index 0000000..aad6751 --- /dev/null +++ b/filesystem/packages/.gitignore @@ -0,0 +1 @@ +.packages_built diff --git a/filesystem/packages/flashmap/makefile b/filesystem/packages/flashmap/makefile index 9d1b3d9..0796fd5 100644 --- a/filesystem/packages/flashmap/makefile +++ b/filesystem/packages/flashmap/makefile @@ -1,3 +1,4 @@ +.DEFAULT_GOAL := default #import all shared make vars PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel) include $(PRAWNOS_ROOT)/scripts/BuildScripts/BuildCommon.mk @@ -9,6 +10,9 @@ PACKAGE_NAME_DEB := $(PACKAGE_NAME).deb PACKAGE_LOCAL_BUILD_DEPS := + +default: $(PACKAGE_NAME_DEB) + $(PACKAGE_NAME_DEB): $(PRAWNOS_PACKAGE_SCRIPTS_PBUILD) $(PACKAGE_NAME_DEB) \ $(PBUILDER_VARS) \ diff --git a/filesystem/packages/font-source-code-pro/makefile b/filesystem/packages/font-source-code-pro/makefile index eda57e8..ed6833b 100644 --- a/filesystem/packages/font-source-code-pro/makefile +++ b/filesystem/packages/font-source-code-pro/makefile @@ -1,3 +1,4 @@ +.DEFAULT_GOAL := default #import all shared make vars PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel) include $(PRAWNOS_ROOT)/scripts/BuildScripts/BuildCommon.mk @@ -7,6 +8,8 @@ VERSION := $(shell cd src/; dpkg-parsechangelog --show-field Version) PACKAGE_NAME := font-source-code-pro_$(VERSION)_all PACKAGE_NAME_DEB := $(PACKAGE_NAME).deb +default: $(PACKAGE_NAME_DEB) + $(PACKAGE_NAME_DEB): @echo Building $@ cd src/; debuild -us -uc diff --git a/filesystem/packages/mosys/makefile b/filesystem/packages/mosys/makefile index c3dd922..be5ae0d 100644 --- a/filesystem/packages/mosys/makefile +++ b/filesystem/packages/mosys/makefile @@ -1,3 +1,4 @@ +.DEFAULT_GOAL := default #import all shared make vars PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel) include $(PRAWNOS_ROOT)/scripts/BuildScripts/BuildCommon.mk @@ -9,6 +10,8 @@ PACKAGE_NAME_DEB := $(PACKAGE_NAME).deb PACKAGE_LOCAL_BUILD_DEPS := flashmap +default: $(PACKAGE_NAME_DEB) + $(PACKAGE_NAME_DEB): $(PRAWNOS_PACKAGE_SCRIPTS_PBUILD) $(PACKAGE_NAME_DEB) \ $(PBUILDER_VARS) \ diff --git a/filesystem/packages/xsecurelock/makefile b/filesystem/packages/xsecurelock/makefile index 3069f4c..0853fc1 100644 --- a/filesystem/packages/xsecurelock/makefile +++ b/filesystem/packages/xsecurelock/makefile @@ -1,3 +1,4 @@ +.DEFAULT_GOAL := default #import all shared make vars PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel) include $(PRAWNOS_ROOT)/scripts/BuildScripts/BuildCommon.mk @@ -9,6 +10,8 @@ PACKAGE_NAME_DEB := $(PACKAGE_NAME).deb PACKAGE_LOCAL_BUILD_DEPS := +default: $(PACKAGE_NAME_DEB) + $(PACKAGE_NAME_DEB): $(PRAWNOS_PACKAGE_SCRIPTS_PBUILD) $(PACKAGE_NAME_DEB) \ $(PBUILDER_VARS) \ diff --git a/resources/InstallResources/30-touchpad.conf b/filesystem/resources/InstallResources/30-touchpad.conf similarity index 100% rename from resources/InstallResources/30-touchpad.conf rename to filesystem/resources/InstallResources/30-touchpad.conf diff --git a/resources/InstallResources/default.pa b/filesystem/resources/InstallResources/default.pa similarity index 100% rename from resources/InstallResources/default.pa rename to filesystem/resources/InstallResources/default.pa diff --git a/resources/InstallResources/default.sh b/filesystem/resources/InstallResources/default.sh similarity index 100% rename from resources/InstallResources/default.sh rename to filesystem/resources/InstallResources/default.sh diff --git a/resources/InstallResources/firefox-esr/prawn-settings.js b/filesystem/resources/InstallResources/firefox-esr/prawn-settings.js similarity index 100% rename from resources/InstallResources/firefox-esr/prawn-settings.js rename to filesystem/resources/InstallResources/firefox-esr/prawn-settings.js diff --git a/resources/InstallResources/firefox-esr/prawn.cfg b/filesystem/resources/InstallResources/firefox-esr/prawn.cfg similarity index 100% rename from resources/InstallResources/firefox-esr/prawn.cfg rename to filesystem/resources/InstallResources/firefox-esr/prawn.cfg diff --git a/resources/InstallResources/headphone-acpi-toggle b/filesystem/resources/InstallResources/headphone-acpi-toggle similarity index 100% rename from resources/InstallResources/headphone-acpi-toggle rename to filesystem/resources/InstallResources/headphone-acpi-toggle diff --git a/resources/InstallResources/mmc.partmap b/filesystem/resources/InstallResources/mmc.partmap similarity index 100% rename from resources/InstallResources/mmc.partmap rename to filesystem/resources/InstallResources/mmc.partmap diff --git a/resources/InstallResources/mmc_type2.partmap b/filesystem/resources/InstallResources/mmc_type2.partmap similarity index 100% rename from resources/InstallResources/mmc_type2.partmap rename to filesystem/resources/InstallResources/mmc_type2.partmap diff --git a/resources/InstallResources/packages/Package_Build_Instructions.txt b/filesystem/resources/InstallResources/packages/Package_Build_Instructions.txt similarity index 100% rename from resources/InstallResources/packages/Package_Build_Instructions.txt rename to filesystem/resources/InstallResources/packages/Package_Build_Instructions.txt diff --git a/resources/InstallResources/packages/libinput-gestures.tar.gz b/filesystem/resources/InstallResources/packages/libinput-gestures.tar.gz similarity index 100% rename from resources/InstallResources/packages/libinput-gestures.tar.gz rename to filesystem/resources/InstallResources/packages/libinput-gestures.tar.gz diff --git a/resources/InstallResources/sound.sh b/filesystem/resources/InstallResources/sound.sh similarity index 100% rename from resources/InstallResources/sound.sh rename to filesystem/resources/InstallResources/sound.sh diff --git a/resources/InstallResources/wallpapers/1.JPG b/filesystem/resources/InstallResources/wallpapers/1.JPG similarity index 100% rename from resources/InstallResources/wallpapers/1.JPG rename to filesystem/resources/InstallResources/wallpapers/1.JPG diff --git a/resources/InstallResources/wallpapers/10.JPG b/filesystem/resources/InstallResources/wallpapers/10.JPG similarity index 100% rename from resources/InstallResources/wallpapers/10.JPG rename to filesystem/resources/InstallResources/wallpapers/10.JPG diff --git a/resources/InstallResources/wallpapers/11.JPG b/filesystem/resources/InstallResources/wallpapers/11.JPG similarity index 100% rename from resources/InstallResources/wallpapers/11.JPG rename to filesystem/resources/InstallResources/wallpapers/11.JPG diff --git a/resources/InstallResources/wallpapers/12.JPG b/filesystem/resources/InstallResources/wallpapers/12.JPG similarity index 100% rename from resources/InstallResources/wallpapers/12.JPG rename to filesystem/resources/InstallResources/wallpapers/12.JPG diff --git a/resources/InstallResources/wallpapers/13.JPG b/filesystem/resources/InstallResources/wallpapers/13.JPG similarity index 100% rename from resources/InstallResources/wallpapers/13.JPG rename to filesystem/resources/InstallResources/wallpapers/13.JPG diff --git a/resources/InstallResources/wallpapers/2.JPG b/filesystem/resources/InstallResources/wallpapers/2.JPG similarity index 100% rename from resources/InstallResources/wallpapers/2.JPG rename to filesystem/resources/InstallResources/wallpapers/2.JPG diff --git a/resources/InstallResources/wallpapers/3.jpg b/filesystem/resources/InstallResources/wallpapers/3.jpg similarity index 100% rename from resources/InstallResources/wallpapers/3.jpg rename to filesystem/resources/InstallResources/wallpapers/3.jpg diff --git a/resources/InstallResources/wallpapers/4.jpg b/filesystem/resources/InstallResources/wallpapers/4.jpg similarity index 100% rename from resources/InstallResources/wallpapers/4.jpg rename to filesystem/resources/InstallResources/wallpapers/4.jpg diff --git a/resources/InstallResources/wallpapers/5.JPG b/filesystem/resources/InstallResources/wallpapers/5.JPG similarity index 100% rename from resources/InstallResources/wallpapers/5.JPG rename to filesystem/resources/InstallResources/wallpapers/5.JPG diff --git a/resources/InstallResources/wallpapers/6.JPG b/filesystem/resources/InstallResources/wallpapers/6.JPG similarity index 100% rename from resources/InstallResources/wallpapers/6.JPG rename to filesystem/resources/InstallResources/wallpapers/6.JPG diff --git a/resources/InstallResources/wallpapers/7.jpg b/filesystem/resources/InstallResources/wallpapers/7.jpg similarity index 100% rename from resources/InstallResources/wallpapers/7.jpg rename to filesystem/resources/InstallResources/wallpapers/7.jpg diff --git a/resources/InstallResources/wallpapers/8.JPG b/filesystem/resources/InstallResources/wallpapers/8.JPG similarity index 100% rename from resources/InstallResources/wallpapers/8.JPG rename to filesystem/resources/InstallResources/wallpapers/8.JPG diff --git a/resources/InstallResources/wallpapers/9.JPG b/filesystem/resources/InstallResources/wallpapers/9.JPG similarity index 100% rename from resources/InstallResources/wallpapers/9.JPG rename to filesystem/resources/InstallResources/wallpapers/9.JPG diff --git a/resources/InstallResources/wallpapers/COPYING b/filesystem/resources/InstallResources/wallpapers/COPYING similarity index 100% rename from resources/InstallResources/wallpapers/COPYING rename to filesystem/resources/InstallResources/wallpapers/COPYING diff --git a/resources/InstallResources/wallpapers/default b/filesystem/resources/InstallResources/wallpapers/default similarity index 100% rename from resources/InstallResources/wallpapers/default rename to filesystem/resources/InstallResources/wallpapers/default diff --git a/resources/InstallResources/xfce-config/brightness/backlight.rules b/filesystem/resources/InstallResources/xfce-config/brightness/backlight.rules similarity index 100% rename from resources/InstallResources/xfce-config/brightness/backlight.rules rename to filesystem/resources/InstallResources/xfce-config/brightness/backlight.rules diff --git a/resources/InstallResources/xfce-config/brightness/backlight_down.sh b/filesystem/resources/InstallResources/xfce-config/brightness/backlight_down.sh similarity index 100% rename from resources/InstallResources/xfce-config/brightness/backlight_down.sh rename to filesystem/resources/InstallResources/xfce-config/brightness/backlight_down.sh diff --git a/resources/InstallResources/xfce-config/brightness/backlight_up.sh b/filesystem/resources/InstallResources/xfce-config/brightness/backlight_up.sh similarity index 100% rename from resources/InstallResources/xfce-config/brightness/backlight_up.sh rename to filesystem/resources/InstallResources/xfce-config/brightness/backlight_up.sh diff --git a/resources/InstallResources/xfce-config/inputrc/.inputrc b/filesystem/resources/InstallResources/xfce-config/inputrc/.inputrc similarity index 100% rename from resources/InstallResources/xfce-config/inputrc/.inputrc rename to filesystem/resources/InstallResources/xfce-config/inputrc/.inputrc diff --git a/resources/InstallResources/xfce-config/libinput-gestures/libinput-gestures.conf b/filesystem/resources/InstallResources/xfce-config/libinput-gestures/libinput-gestures.conf similarity index 100% rename from resources/InstallResources/xfce-config/libinput-gestures/libinput-gestures.conf rename to filesystem/resources/InstallResources/xfce-config/libinput-gestures/libinput-gestures.conf diff --git a/resources/InstallResources/xfce-config/libinput-gestures/libinput-gestures.desktop b/filesystem/resources/InstallResources/xfce-config/libinput-gestures/libinput-gestures.desktop similarity index 100% rename from resources/InstallResources/xfce-config/libinput-gestures/libinput-gestures.desktop rename to filesystem/resources/InstallResources/xfce-config/libinput-gestures/libinput-gestures.desktop diff --git a/resources/InstallResources/xfce-config/lightdm/lightdm-gtk-greeter.conf b/filesystem/resources/InstallResources/xfce-config/lightdm/lightdm-gtk-greeter.conf similarity index 100% rename from resources/InstallResources/xfce-config/lightdm/lightdm-gtk-greeter.conf rename to filesystem/resources/InstallResources/xfce-config/lightdm/lightdm-gtk-greeter.conf diff --git a/resources/InstallResources/xfce-config/panel/default.xml b/filesystem/resources/InstallResources/xfce-config/panel/default.xml similarity index 100% rename from resources/InstallResources/xfce-config/panel/default.xml rename to filesystem/resources/InstallResources/xfce-config/panel/default.xml diff --git a/resources/InstallResources/xfce-config/plank/plank-launchers/Thunar.dockitem b/filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/Thunar.dockitem similarity index 100% rename from resources/InstallResources/xfce-config/plank/plank-launchers/Thunar.dockitem rename to filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/Thunar.dockitem diff --git a/resources/InstallResources/xfce-config/plank/plank-launchers/chromium.dockitem b/filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/chromium.dockitem similarity index 100% rename from resources/InstallResources/xfce-config/plank/plank-launchers/chromium.dockitem rename to filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/chromium.dockitem diff --git a/resources/InstallResources/xfce-config/plank/plank-launchers/emacs25.dockitem b/filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/emacs25.dockitem similarity index 100% rename from resources/InstallResources/xfce-config/plank/plank-launchers/emacs25.dockitem rename to filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/emacs25.dockitem diff --git a/resources/InstallResources/xfce-config/plank/plank-launchers/firefox-esr.dockitem b/filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/firefox-esr.dockitem similarity index 100% rename from resources/InstallResources/xfce-config/plank/plank-launchers/firefox-esr.dockitem rename to filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/firefox-esr.dockitem diff --git a/resources/InstallResources/xfce-config/plank/plank-launchers/mousepad.dockitem b/filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/mousepad.dockitem similarity index 100% rename from resources/InstallResources/xfce-config/plank/plank-launchers/mousepad.dockitem rename to filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/mousepad.dockitem diff --git a/resources/InstallResources/xfce-config/plank/plank-launchers/vlc.dockitem b/filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/vlc.dockitem similarity index 100% rename from resources/InstallResources/xfce-config/plank/plank-launchers/vlc.dockitem rename to filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/vlc.dockitem diff --git a/resources/InstallResources/xfce-config/plank/plank-launchers/xfcalendar.dockitem b/filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/xfcalendar.dockitem similarity index 100% rename from resources/InstallResources/xfce-config/plank/plank-launchers/xfcalendar.dockitem rename to filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/xfcalendar.dockitem diff --git a/resources/InstallResources/xfce-config/plank/plank-launchers/xfce4-terminal.dockitem b/filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/xfce4-terminal.dockitem similarity index 100% rename from resources/InstallResources/xfce-config/plank/plank-launchers/xfce4-terminal.dockitem rename to filesystem/resources/InstallResources/xfce-config/plank/plank-launchers/xfce4-terminal.dockitem diff --git a/resources/InstallResources/xfce-config/plank/plank.dconf b/filesystem/resources/InstallResources/xfce-config/plank/plank.dconf similarity index 100% rename from resources/InstallResources/xfce-config/plank/plank.dconf rename to filesystem/resources/InstallResources/xfce-config/plank/plank.dconf diff --git a/resources/InstallResources/xfce-config/plank/plank.desktop b/filesystem/resources/InstallResources/xfce-config/plank/plank.desktop similarity index 100% rename from resources/InstallResources/xfce-config/plank/plank.desktop rename to filesystem/resources/InstallResources/xfce-config/plank/plank.desktop diff --git a/resources/InstallResources/xfce-config/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml b/filesystem/resources/InstallResources/xfce-config/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml similarity index 100% rename from resources/InstallResources/xfce-config/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml rename to filesystem/resources/InstallResources/xfce-config/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml diff --git a/resources/InstallResources/xfce-config/xfce-perchannel-xml/xfce4-power-manager.xml b/filesystem/resources/InstallResources/xfce-config/xfce-perchannel-xml/xfce4-power-manager.xml similarity index 100% rename from resources/InstallResources/xfce-config/xfce-perchannel-xml/xfce4-power-manager.xml rename to filesystem/resources/InstallResources/xfce-config/xfce-perchannel-xml/xfce4-power-manager.xml diff --git a/resources/InstallResources/xfce-config/xfce-perchannel-xml/xfce4-screensaver.xml b/filesystem/resources/InstallResources/xfce-config/xfce-perchannel-xml/xfce4-screensaver.xml similarity index 100% rename from resources/InstallResources/xfce-config/xfce-perchannel-xml/xfce4-screensaver.xml rename to filesystem/resources/InstallResources/xfce-config/xfce-perchannel-xml/xfce4-screensaver.xml diff --git a/resources/InstallResources/xfce-config/xfce-perchannel-xml/xfwm4.xml b/filesystem/resources/InstallResources/xfce-config/xfce-perchannel-xml/xfwm4.xml similarity index 100% rename from resources/InstallResources/xfce-config/xfce-perchannel-xml/xfwm4.xml rename to filesystem/resources/InstallResources/xfce-config/xfce-perchannel-xml/xfwm4.xml diff --git a/resources/InstallResources/xfce-config/xfce-perchannel-xml/xsettings.xml b/filesystem/resources/InstallResources/xfce-config/xfce-perchannel-xml/xsettings.xml similarity index 100% rename from resources/InstallResources/xfce-config/xfce-perchannel-xml/xsettings.xml rename to filesystem/resources/InstallResources/xfce-config/xfce-perchannel-xml/xsettings.xml diff --git a/resources/InstallResources/xfce-config/xflock-xsecurelock.patch b/filesystem/resources/InstallResources/xfce-config/xflock-xsecurelock.patch similarity index 100% rename from resources/InstallResources/xfce-config/xflock-xsecurelock.patch rename to filesystem/resources/InstallResources/xfce-config/xflock-xsecurelock.patch diff --git a/resources/InstallResources/xfce-themes/prawnos-numix-gtk-theme_2.6.6-1_all.deb b/filesystem/resources/InstallResources/xfce-themes/prawnos-numix-gtk-theme_2.6.6-1_all.deb similarity index 100% rename from resources/InstallResources/xfce-themes/prawnos-numix-gtk-theme_2.6.6-1_all.deb rename to filesystem/resources/InstallResources/xfce-themes/prawnos-numix-gtk-theme_2.6.6-1_all.deb diff --git a/resources/InstallResources/xkb/compat/chromebook b/filesystem/resources/InstallResources/xkb/compat/chromebook similarity index 100% rename from resources/InstallResources/xkb/compat/chromebook rename to filesystem/resources/InstallResources/xkb/compat/chromebook diff --git a/resources/InstallResources/xkb/keyboard b/filesystem/resources/InstallResources/xkb/keyboard similarity index 100% rename from resources/InstallResources/xkb/keyboard rename to filesystem/resources/InstallResources/xkb/keyboard diff --git a/resources/InstallResources/xkb/keycodes/chromebook_m b/filesystem/resources/InstallResources/xkb/keycodes/chromebook_m similarity index 100% rename from resources/InstallResources/xkb/keycodes/chromebook_m rename to filesystem/resources/InstallResources/xkb/keycodes/chromebook_m diff --git a/resources/InstallResources/xkb/rules/base.chromebook.patch b/filesystem/resources/InstallResources/xkb/rules/base.chromebook.patch similarity index 100% rename from resources/InstallResources/xkb/rules/base.chromebook.patch rename to filesystem/resources/InstallResources/xkb/rules/base.chromebook.patch diff --git a/resources/InstallResources/xkb/rules/base.lst.chromebook.patch b/filesystem/resources/InstallResources/xkb/rules/base.lst.chromebook.patch similarity index 100% rename from resources/InstallResources/xkb/rules/base.lst.chromebook.patch rename to filesystem/resources/InstallResources/xkb/rules/base.lst.chromebook.patch diff --git a/resources/InstallResources/xkb/rules/base.xml.chromebook.patch b/filesystem/resources/InstallResources/xkb/rules/base.xml.chromebook.patch similarity index 100% rename from resources/InstallResources/xkb/rules/base.xml.chromebook.patch rename to filesystem/resources/InstallResources/xkb/rules/base.xml.chromebook.patch diff --git a/resources/InstallResources/xkb/rules/evdev.chromebook.patch b/filesystem/resources/InstallResources/xkb/rules/evdev.chromebook.patch similarity index 100% rename from resources/InstallResources/xkb/rules/evdev.chromebook.patch rename to filesystem/resources/InstallResources/xkb/rules/evdev.chromebook.patch diff --git a/resources/InstallResources/xkb/rules/evdev.lst.chromebook.patch b/filesystem/resources/InstallResources/xkb/rules/evdev.lst.chromebook.patch similarity index 100% rename from resources/InstallResources/xkb/rules/evdev.lst.chromebook.patch rename to filesystem/resources/InstallResources/xkb/rules/evdev.lst.chromebook.patch diff --git a/resources/InstallResources/xkb/rules/evdev.xml.chromebook.patch b/filesystem/resources/InstallResources/xkb/rules/evdev.xml.chromebook.patch similarity index 100% rename from resources/InstallResources/xkb/rules/evdev.xml.chromebook.patch rename to filesystem/resources/InstallResources/xkb/rules/evdev.xml.chromebook.patch diff --git a/resources/InstallResources/xkb/symbols/chromebook b/filesystem/resources/InstallResources/xkb/symbols/chromebook similarity index 100% rename from resources/InstallResources/xkb/symbols/chromebook rename to filesystem/resources/InstallResources/xkb/symbols/chromebook diff --git a/resources/InstallResources/xkb/symbols/chromebook_m b/filesystem/resources/InstallResources/xkb/symbols/chromebook_m similarity index 100% rename from resources/InstallResources/xkb/symbols/chromebook_m rename to filesystem/resources/InstallResources/xkb/symbols/chromebook_m diff --git a/resources/InstallResources/xkb/symbols/chromebook_m_ralt b/filesystem/resources/InstallResources/xkb/symbols/chromebook_m_ralt similarity index 100% rename from resources/InstallResources/xkb/symbols/chromebook_m_ralt rename to filesystem/resources/InstallResources/xkb/symbols/chromebook_m_ralt diff --git a/resources/InstallResources/xkb/symbols/chromebook_ralt b/filesystem/resources/InstallResources/xkb/symbols/chromebook_ralt similarity index 100% rename from resources/InstallResources/xkb/symbols/chromebook_ralt rename to filesystem/resources/InstallResources/xkb/symbols/chromebook_ralt diff --git a/resources/BuildResources/backports.list b/filesystem/resources/apt/backports.list similarity index 100% rename from resources/BuildResources/backports.list rename to filesystem/resources/apt/backports.list diff --git a/resources/BuildResources/backports.pref b/filesystem/resources/apt/backports.pref similarity index 100% rename from resources/BuildResources/backports.pref rename to filesystem/resources/apt/backports.pref diff --git a/resources/BuildResources/bullseye.list b/filesystem/resources/apt/bullseye.list similarity index 100% rename from resources/BuildResources/bullseye.list rename to filesystem/resources/apt/bullseye.list diff --git a/resources/BuildResources/bullseye.pref b/filesystem/resources/apt/bullseye.pref similarity index 100% rename from resources/BuildResources/bullseye.pref rename to filesystem/resources/apt/bullseye.pref diff --git a/resources/BuildResources/deb.prawnos.com.gpg.key b/filesystem/resources/apt/deb.prawnos.com.gpg.key similarity index 100% rename from resources/BuildResources/deb.prawnos.com.gpg.key rename to filesystem/resources/apt/deb.prawnos.com.gpg.key diff --git a/resources/BuildResources/debian-archive-keyring.gpg b/filesystem/resources/apt/debian-archive-keyring.gpg similarity index 100% rename from resources/BuildResources/debian-archive-keyring.gpg rename to filesystem/resources/apt/debian-archive-keyring.gpg diff --git a/resources/BuildResources/sid.list b/filesystem/resources/apt/sid.list similarity index 100% rename from resources/BuildResources/sid.list rename to filesystem/resources/apt/sid.list diff --git a/resources/BuildResources/sid.pref b/filesystem/resources/apt/sid.pref similarity index 100% rename from resources/BuildResources/sid.pref rename to filesystem/resources/apt/sid.pref diff --git a/resources/BuildResources/sources.list b/filesystem/resources/apt/sources.list similarity index 100% rename from resources/BuildResources/sources.list rename to filesystem/resources/apt/sources.list diff --git a/resources/BuildResources/updates.list b/filesystem/resources/apt/updates.list similarity index 100% rename from resources/BuildResources/updates.list rename to filesystem/resources/apt/updates.list diff --git a/resources/BuildResources/external_fstab b/filesystem/resources/external_fstab similarity index 100% rename from resources/BuildResources/external_fstab rename to filesystem/resources/external_fstab diff --git a/resources/BuildResources/locale.gen b/filesystem/resources/locale.gen similarity index 100% rename from resources/BuildResources/locale.gen rename to filesystem/resources/locale.gen diff --git a/resources/BuildResources/logo/icons/OtherColors/icon-large-dark-blue-back.png b/filesystem/resources/logo/icons/OtherColors/icon-large-dark-blue-back.png similarity index 100% rename from resources/BuildResources/logo/icons/OtherColors/icon-large-dark-blue-back.png rename to filesystem/resources/logo/icons/OtherColors/icon-large-dark-blue-back.png diff --git a/resources/BuildResources/logo/icons/OtherColors/icon-large-dark-grey-back.png b/filesystem/resources/logo/icons/OtherColors/icon-large-dark-grey-back.png similarity index 100% rename from resources/BuildResources/logo/icons/OtherColors/icon-large-dark-grey-back.png rename to filesystem/resources/logo/icons/OtherColors/icon-large-dark-grey-back.png diff --git a/resources/BuildResources/logo/icons/OtherColors/icon-large-light-purple-back-2.png b/filesystem/resources/logo/icons/OtherColors/icon-large-light-purple-back-2.png similarity index 100% rename from resources/BuildResources/logo/icons/OtherColors/icon-large-light-purple-back-2.png rename to filesystem/resources/logo/icons/OtherColors/icon-large-light-purple-back-2.png diff --git a/resources/BuildResources/logo/icons/OtherColors/icon-large-light-purple-back-3.png b/filesystem/resources/logo/icons/OtherColors/icon-large-light-purple-back-3.png similarity index 100% rename from resources/BuildResources/logo/icons/OtherColors/icon-large-light-purple-back-3.png rename to filesystem/resources/logo/icons/OtherColors/icon-large-light-purple-back-3.png diff --git a/resources/BuildResources/logo/icons/OtherColors/icon-large-light-purple-back-4.png b/filesystem/resources/logo/icons/OtherColors/icon-large-light-purple-back-4.png similarity index 100% rename from resources/BuildResources/logo/icons/OtherColors/icon-large-light-purple-back-4.png rename to filesystem/resources/logo/icons/OtherColors/icon-large-light-purple-back-4.png diff --git a/resources/BuildResources/logo/icons/OtherColors/icon-large-light-purple-back-5.png b/filesystem/resources/logo/icons/OtherColors/icon-large-light-purple-back-5.png similarity index 100% rename from resources/BuildResources/logo/icons/OtherColors/icon-large-light-purple-back-5.png rename to filesystem/resources/logo/icons/OtherColors/icon-large-light-purple-back-5.png diff --git a/resources/BuildResources/logo/icons/OtherColors/icon-large-light-purple-back.png b/filesystem/resources/logo/icons/OtherColors/icon-large-light-purple-back.png similarity index 100% rename from resources/BuildResources/logo/icons/OtherColors/icon-large-light-purple-back.png rename to filesystem/resources/logo/icons/OtherColors/icon-large-light-purple-back.png diff --git a/resources/BuildResources/logo/icons/OtherColors/icon-large-light-teal-back-2.png b/filesystem/resources/logo/icons/OtherColors/icon-large-light-teal-back-2.png similarity index 100% rename from resources/BuildResources/logo/icons/OtherColors/icon-large-light-teal-back-2.png rename to filesystem/resources/logo/icons/OtherColors/icon-large-light-teal-back-2.png diff --git a/resources/BuildResources/logo/icons/OtherColors/icon-large-light-teal-back-3.png b/filesystem/resources/logo/icons/OtherColors/icon-large-light-teal-back-3.png similarity index 100% rename from resources/BuildResources/logo/icons/OtherColors/icon-large-light-teal-back-3.png rename to filesystem/resources/logo/icons/OtherColors/icon-large-light-teal-back-3.png diff --git a/resources/BuildResources/logo/icons/OtherColors/icon-large-light-teal-back-4.png b/filesystem/resources/logo/icons/OtherColors/icon-large-light-teal-back-4.png similarity index 100% rename from resources/BuildResources/logo/icons/OtherColors/icon-large-light-teal-back-4.png rename to filesystem/resources/logo/icons/OtherColors/icon-large-light-teal-back-4.png diff --git a/resources/BuildResources/logo/icons/OtherColors/icon-large-light-teal-back.png b/filesystem/resources/logo/icons/OtherColors/icon-large-light-teal-back.png similarity index 100% rename from resources/BuildResources/logo/icons/OtherColors/icon-large-light-teal-back.png rename to filesystem/resources/logo/icons/OtherColors/icon-large-light-teal-back.png diff --git a/resources/BuildResources/logo/icons/ascii/ascii-icon-small.txt b/filesystem/resources/logo/icons/ascii/ascii-icon-small.txt similarity index 100% rename from resources/BuildResources/logo/icons/ascii/ascii-icon-small.txt rename to filesystem/resources/logo/icons/ascii/ascii-icon-small.txt diff --git a/resources/BuildResources/logo/icons/ascii/ascii-icon.txt b/filesystem/resources/logo/icons/ascii/ascii-icon.txt similarity index 100% rename from resources/BuildResources/logo/icons/ascii/ascii-icon.txt rename to filesystem/resources/logo/icons/ascii/ascii-icon.txt diff --git a/resources/BuildResources/logo/icons/icon-full.png b/filesystem/resources/logo/icons/icon-full.png similarity index 100% rename from resources/BuildResources/logo/icons/icon-full.png rename to filesystem/resources/logo/icons/icon-full.png diff --git a/resources/BuildResources/logo/icons/icon-large.png b/filesystem/resources/logo/icons/icon-large.png similarity index 100% rename from resources/BuildResources/logo/icons/icon-large.png rename to filesystem/resources/logo/icons/icon-large.png diff --git a/resources/BuildResources/logo/icons/icon-med.png b/filesystem/resources/logo/icons/icon-med.png similarity index 100% rename from resources/BuildResources/logo/icons/icon-med.png rename to filesystem/resources/logo/icons/icon-med.png diff --git a/resources/BuildResources/logo/icons/icon-small-noback.png b/filesystem/resources/logo/icons/icon-small-noback.png similarity index 100% rename from resources/BuildResources/logo/icons/icon-small-noback.png rename to filesystem/resources/logo/icons/icon-small-noback.png diff --git a/resources/BuildResources/logo/icons/icon-small.png b/filesystem/resources/logo/icons/icon-small.png similarity index 100% rename from resources/BuildResources/logo/icons/icon-small.png rename to filesystem/resources/logo/icons/icon-small.png diff --git a/resources/BuildResources/logo/icons/icon.xcf b/filesystem/resources/logo/icons/icon.xcf similarity index 100% rename from resources/BuildResources/logo/icons/icon.xcf rename to filesystem/resources/logo/icons/icon.xcf diff --git a/resources/BuildResources/logo/newPrawn.xcf b/filesystem/resources/logo/newPrawn.xcf similarity index 100% rename from resources/BuildResources/logo/newPrawn.xcf rename to filesystem/resources/logo/newPrawn.xcf diff --git a/resources/BuildResources/logo/newPrawn_merged.xcf b/filesystem/resources/logo/newPrawn_merged.xcf similarity index 100% rename from resources/BuildResources/logo/newPrawn_merged.xcf rename to filesystem/resources/logo/newPrawn_merged.xcf diff --git a/resources/BuildResources/logo/newPrawn_transparent.png b/filesystem/resources/logo/newPrawn_transparent.png similarity index 100% rename from resources/BuildResources/logo/newPrawn_transparent.png rename to filesystem/resources/logo/newPrawn_transparent.png diff --git a/resources/BuildResources/logo/newPrawn_transparent_high_compression.png b/filesystem/resources/logo/newPrawn_transparent_high_compression.png similarity index 100% rename from resources/BuildResources/logo/newPrawn_transparent_high_compression.png rename to filesystem/resources/logo/newPrawn_transparent_high_compression.png diff --git a/resources/BuildResources/logo/old prawn logo.psd b/filesystem/resources/logo/old prawn logo.psd similarity index 100% rename from resources/BuildResources/logo/old prawn logo.psd rename to filesystem/resources/logo/old prawn logo.psd diff --git a/resources/BuildResources/pbuilder/hooks/D60no-man-db-rebuild b/filesystem/resources/pbuilder/hooks/D60no-man-db-rebuild similarity index 100% rename from resources/BuildResources/pbuilder/hooks/D60no-man-db-rebuild rename to filesystem/resources/pbuilder/hooks/D60no-man-db-rebuild diff --git a/resources/BuildResources/pbuilder/hooks/D70update b/filesystem/resources/pbuilder/hooks/D70update similarity index 100% rename from resources/BuildResources/pbuilder/hooks/D70update rename to filesystem/resources/pbuilder/hooks/D70update diff --git a/resources/BuildResources/pbuilder/prawnos-pbuilder.rc b/filesystem/resources/pbuilder/prawnos-pbuilder.rc similarity index 100% rename from resources/BuildResources/pbuilder/prawnos-pbuilder.rc rename to filesystem/resources/pbuilder/prawnos-pbuilder.rc diff --git a/initramfs/makefile b/initramfs/makefile index aa8f365..0c740b9 100644 --- a/initramfs/makefile +++ b/initramfs/makefile @@ -5,16 +5,19 @@ PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel) endif include $(PRAWNOS_ROOT)/scripts/BuildScripts/BuildCommon.mk -INITRAMFS_RESOURCES := $(PRAWNOS_PACKAGE_INITRAMFS)/resources +INITRAMFS_BUILD_LOG := $(PRAWNOS_BUILD_LOGS)/initramfs-log.txt + +INITRAMFS_RESOURCES := $(PRAWNOS_INITRAMFS)/resources .PHONY: initramfs initramfs_clean -initramfs: $(PRAWNOS_INITRAMFS) +initramfs: $(PRAWNOS_INITRAMFS_IMAGE) initramfs_clean: rm -f $(PRAWNOS_INITRAMFS) -$(PRAWNOS_INITRAMFS): - $(PRAWNOS_INITRAMFS_SCRIPTS_BUILD) $(PRAWNOS_IMAGE_BASE) $(INITRAMFS_RESOURCES) $(PRAWNOS_BUILD) +$(PRAWNOS_INITRAMFS_IMAGE): + rm -rf $(INITRAMFS_BUILD_LOG) + $(PRAWNOS_INITRAMFS_SCRIPTS_BUILD) $(PRAWNOS_IMAGE_BASE) $(INITRAMFS_RESOURCES) $(PRAWNOS_BUILD) 2>&1 | tee $(INITRAMFS_BUILD_LOG) endif diff --git a/kernel/makefile b/kernel/makefile index 159d5a9..7865c18 100644 --- a/kernel/makefile +++ b/kernel/makefile @@ -15,19 +15,20 @@ KERNEL_PATCHES := $(PRAWNOS_KERNEL)/patches KERNEL_TAR := $(KERNEL_SOURCES)/linux-libre-$(KVER)-gnu.tar.lz KERNEL_TAR_SIGNATURE := $(KERNEL_TAR).sign - KERNEL_BUILT := $(PRAWNOS_KERNEL_BUILD)/vmlinux.kpart +KERNEL_BUILD_LOG := $(PRAWNOS_BUILD_LOGS)/kernel-log.txt + ATH9K_TAR := $(KERNEL_SOURCES)/open-ath9k-htc-firmware.tar.gz ATH9K := open-ath9k-htc-firmware +ATH9K_BUILT := $(PRAWNOS_ATH9K_BUILD)/target_firmware/htc_9271.fw ### PHONY TARGETS .PHONY: kernel kernel: $(KERNEL_BUILT) .PHONY: ath9k -ath9k: extract_ath9k - $(PRAWNOS_KERNEL_SCRIPTS_BUILD_ATH9K) $(PRAWNOS_ATH9K_BUILD) +ath9k: $(ATH9K_BUILT) .PHONY: patch_kernel patch_kernel: $(KERNEL_PATCHED) @@ -83,8 +84,12 @@ $(KERNEL_PATCHED): $(KERNEL_EXTRACTED) $(PRAWNOS_KERNEL_SCRIPTS_PATCH) $(KVER) $(KERNEL_PATCHES) $(PRAWNOS_KERNEL_BUILD) touch $(KERNEL_PATCHED) -$(KERNEL_BUILT): $(KERNEL_EXTRACTED) $(KERNEL_PATCHED) ath9k +$(ATH9K_BUILT): $(ATH9K_EXTRACTED) + $(PRAWNOS_KERNEL_SCRIPTS_BUILD_ATH9K) $(PRAWNOS_ATH9K_BUILD) + +$(KERNEL_BUILT): $(KERNEL_EXTRACTED) $(KERNEL_PATCHED) $(ATH9K_BUILT) make -C $(PRAWNOS_INITRAMFS) - $(PRAWNOS_KERNEL_SCRIPTS_BUILD) $(KVER) $(KERNEL_RESOURCES) $(PRAWNOS_KERNEL_BUILD) $(PRAWNOS_INITRAMFS_IMAGE) + rm -rf $(KERNEL_BUILD_LOG) + $(PRAWNOS_KERNEL_SCRIPTS_BUILD) $(KVER) $(KERNEL_RESOURCES) $(PRAWNOS_KERNEL_BUILD) $(PRAWNOS_INITRAMFS_IMAGE) 2>&1 | tee $(KERNEL_BUILD_LOG) endif diff --git a/makefile b/makefile index 840cc27..3400474 100644 --- a/makefile +++ b/makefile @@ -18,6 +18,7 @@ PRAWNOS_ROOT := $(shell git rev-parse --show-toplevel) include $(PRAWNOS_ROOT)/scripts/BuildScripts/BuildCommon.mk include $(PRAWNOS_ROOT)/initramfs/makefile include $(PRAWNOS_ROOT)/kernel/makefile +include $(PRAWNOS_ROOT)/filesystem/makefile #Usage: #run make image @@ -36,7 +37,7 @@ clean: #TODO .PHONY: clean_image -clean_img: +clean_image: rm -f $(PRAWNOS_IMAGE) .PHONY: clean_basefs @@ -54,7 +55,6 @@ clean_all: clean_kernel clean_initramfs clean_ath9k clean_image clean_basefs cle .PHONY: build_dirs build_dirs: $(PRAWNOS_BUILD) - #:::::::::::::::::::::::::::::: kernel :::::::::::::::::::::::::::::::::::: #included from kernel/makefile @@ -64,25 +64,10 @@ build_dirs: $(PRAWNOS_BUILD) #:::::::::::::::::::::::::::::: filesystem :::::::::::::::::::::::::::::::: #makes the base filesystem image without kernel. Only make a new one if the base image isnt present -.PHONY: filesystem -filesystem: - $(MAKE) build_dirs - rm -rf build/logs/fs-log.txt - $(MAKE) pbuilder_create - $(MAKE) filesystem_packages - [ -f $(PRAWNOS_IMAGE_BASE) ] || $(PRAWNOS_FILESYSTEM_SCRIPTS_BUILD) $(KVER) $(DEBIAN_SUITE) $(PRAWNOS_IMAGE_BASE) $(PRAWNOS_ROOT) $(PRAWNOS_SHARED_SCRIPTS) 2>&1 | tee build/logs/fs-log.txt +#included from filesystem/makefile #:::::::::::::::::::::::::::::: packages :::::::::::::::::::::::::::::::: -.PHONY: filesystem_packages -filesystem_packages: - $(MAKE) filesystem_packages -C packages - -.PHONY: filesystem_packages_install -filesystem_packages_install: -ifndef INSTALL_TARGET - $(error INSTALL_TARGET is not set) -endif - $(MAKE) filesystem_packages_install INSTALL_TARGET=$(INSTALL_TARGET) -C filesystem +#included from filesystem/makefile #:::::::::::::::::::::::::::::: image management :::::::::::::::::::::::::: @@ -92,7 +77,7 @@ kernel_inject: #Targets an already built .img and swaps the old kernel with the .PHONY: kernel_update kernel_update: - $(MAKE) clean_img + $(MAKE) clean_image $(MAKE) initramfs $(MAKE) kernel cp $(PRAWNOS_IMAGE_BASE) $(PRAWNOS_IMAGE) @@ -100,22 +85,9 @@ kernel_update: .PHONY: image image: - $(MAKE) clean_img + $(MAKE) clean_image $(MAKE) filesystem $(MAKE) initramfs $(MAKE) kernel cp $(PRAWNOS_IMAGE_BASE) $(PRAWNOS_IMAGE) $(MAKE) kernel_install - -#:::::::::::::::::::::::::::::: pbuilder management ::::::::::::::::::::::: -.PHONY: pbuilder_create -pbuilder_create: - $(MAKE) $(PBUILDER_CHROOT) - -$(PBUILDER_CHROOT): - pbuilder create --basetgz $(PBUILDER_CHROOT) --configfile $(PBUILDER_RC) - -#TODO: should only update if not updated for a day -.PHONY: pbuilder_update -pbuilder_update: - pbuilder update --basetgz $(PBUILDER_CHROOT) --configfile $(PBUILDER_RC) diff --git a/resources/InstallResources/fonts/source-code-pro b/resources/InstallResources/fonts/source-code-pro deleted file mode 160000 index e99ed3b..0000000 --- a/resources/InstallResources/fonts/source-code-pro +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e99ed3b714cd2b3c0d5ac8cc45fd8181d79c0d0b diff --git a/scripts/BuildScripts/BuildCommon.mk b/scripts/BuildScripts/BuildCommon.mk index 4ccbaf7..71c8ec2 100644 --- a/scripts/BuildScripts/BuildCommon.mk +++ b/scripts/BuildScripts/BuildCommon.mk @@ -22,7 +22,9 @@ PRAWNOS_FILESYSTEM := $(PRAWNOS_ROOT)/filesystem ### BUILD DIRS PRAWNOS_BUILD_LOGS := $(PRAWNOS_BUILD)/logs -PRAWNOS_BUILD_APT_CACHE := $(PRAWNOS_BUILD)/apt-cache +PRAWNOS_BUILD_DEBOOTSTRAP_APT_CACHE := $(PRAWNOS_BUILD)/debootstrap-apt-cache +PRAWNOS_BUILD_CHROOT_APT_CACHE := $(PRAWNOS_BUILD)/chroot-apt-cache + ### PRAWNOS IMAGES ifeq ($(DEBIAN_SUITE),) @@ -32,8 +34,8 @@ ifeq ($(PRAWNOS_SUITE),) PRAWNOS_SUITE := Shiba endif -PRAWNOS_IMAGE := PrawnOS-$(PRAWNOS_SUITE)-c201.img -PRAWNOS_IMAGE_BASE := $(OUTNAME)-BASE +PRAWNOS_IMAGE := $(PRAWNOS_ROOT)/PrawnOS-$(PRAWNOS_SUITE)-c201.img +PRAWNOS_IMAGE_BASE := $(PRAWNOS_IMAGE)-BASE ### BUILD SCRIPTS PRAWNOS_BUILD_SCRIPTS := $(PRAWNOS_SCRIPTS)/BuildScripts @@ -66,8 +68,13 @@ PRAWNOS_SHARED_SCRIPTS := $(PRAWNOS_SCRIPTS)/Shared PRAWNOS_SHARED_SCRIPTS_PACKAGE_LISTS := $(PRAWNOS_SHARED_SCRIPTS)/package_lists.sh +### FILESYSTEM RESOURCES +PRAWNOS_FILESYSTEM_RESOURCES := $(PRAWNOS_FILESYSTEM)/resources +PRAWNOS_FILESYSTEM_PACKAGES := $(PRAWNOS_FILESYSTEM)/packages + + ### PBUILDER RESOURCES -PBUILDER_DIR := $(PRAWNOS_ROOT)/resources/BuildResources/pbuilder +PBUILDER_DIR := $(PRAWNOS_FILESYSTEM_RESOURCES)//pbuilder PBUILDER_CHROOT := $(PRAWNOS_BUILD)/prawnos-pbuilder-armhf-base.tgz PBUILDER_RC := $(PBUILDER_DIR)/prawnos-pbuilder.rc PBUILDER_HOOKS := $(PBUILDER_DIR)/hooks @@ -94,13 +101,16 @@ PRAWNOS_ATH9K_BUILD := $(PRAWNOS_BUILD)/open-ath9k-htc-firmware #Place all shared make rules below #========================================================================================= -$(PRAWNOS_BUILD): $(PRAWNOS_BUILD_LOGS) $(PRAWNOS_BUILD_APT_CACHE) +$(PRAWNOS_BUILD): $(PRAWNOS_BUILD_LOGS) $(PRAWNOS_BUILD_DEBOOTSTRAP_APT_CACHE) $(PRAWNOS_BUILD_CHROOT_APT_CACHE) $(PRAWNOS_BUILD_LOGS): mkdir -p $(PRAWNOS_BUILD_LOGS) -$(PRAWNOS_BUILD_APT_CACHE): - mkdir -p $(PRAWNOS_BUILD_APT_CACHE) +$(PRAWNOS_BUILD_DEBOOTSTRAP_APT_CACHE): + mkdir -p $(PRAWNOS_BUILD_DEBOOTSTRAP_APT_CACHE) + +$(PRAWNOS_BUILD_CHROOT_APT_CACHE): + mkdir -p $(PRAWNOS_BUILD_CHROOT_APT_CACHE) #========================================================================================= diff --git a/scripts/BuildScripts/FilesystemScripts/buildFilesystem.sh b/scripts/BuildScripts/FilesystemScripts/buildFilesystem.sh index a5f6e0d..47fbb03 100755 --- a/scripts/BuildScripts/FilesystemScripts/buildFilesystem.sh +++ b/scripts/BuildScripts/FilesystemScripts/buildFilesystem.sh @@ -56,24 +56,30 @@ then echo "No shared scripts path supplied" exit 1 fi +if [ -z "$6" ] +then + echo "No Filesystem resources path supplied" + exit 1 +fi KVER=$1 DEBIAN_SUITE=$2 BASE=$3 PRAWNOS_ROOT=$4 PRAWNOS_SHARED_SCRIPTS=$5 +PRAWNOS_FILESYSTEM_RESOURCES=$6 outmnt=$(mktemp -d -p "$(pwd)") outdev=/dev/loop5 -install_resources=resources/InstallResources -build_resources=resources/BuildResources +install_resources=$PRAWNOS_FILESYSTEM_RESOURCES/InstallResources +build_resources=$PRAWNOS_FILESYSTEM_RESOURCES +build_resources_apt=$build_resources/apt # Import the package lists, shared scripts source $PRAWNOS_SHARED_SCRIPTS/* - #A hacky way to ensure the loops are properly unmounted and the temp files are properly deleted. #Without this, a reboot is sometimes required to properly clean the loop devices and ensure a clean build cleanup() { @@ -95,6 +101,26 @@ cleanup() { trap cleanup INT TERM EXIT +# Download, cache externally, and optionally install the specified packages +# 2: mount of the chroot +# 3: list of packages in install +# 4: if true, download, cache, and install. If false just download and cache +apt_install() { + PRAWNOS_ROOT=$1 + shift + outmnt=$1 + shift + install=$1 + shift + package_list=("$@") + + chroot $outmnt apt install -y -d ${package_list[@]} + cp "$outmnt/var/cache/apt/archives/"* "$PRAWNOS_ROOT/build/chroot-apt-cache/" || true + if [ "$install" = true ]; then + chroot $outmnt apt install -y ${package_list[@]} + fi +} + #layout the partitons and write filesystem information create_image() { dd if=/dev/zero of=$1 bs=$3 count=$4 conv=sparse @@ -131,10 +157,10 @@ export DEBIAN_FRONTEND=noninteractive printf -v debootstrap_debs_install_joined '%s,' "${debootstrap_debs_install[@]}" qemu-debootstrap --arch armhf $DEBIAN_SUITE \ --include ${debootstrap_debs_install_joined%,} \ - --keyring=$build_resources/debian-archive-keyring.gpg \ + --keyring=$build_resources_apt/debian-archive-keyring.gpg \ $outmnt \ $PRAWNOS_DEBOOTSTRAP_MIRROR \ - --cache-dir=$PRAWNOS_ROOT/build/apt-cache/ + --cache-dir=$PRAWNOS_ROOT/build/debootstrap-apt-cache/ chroot $outmnt passwd -d root @@ -153,34 +179,34 @@ chmod +x $outmnt/*.sh #Setup the chroot for apt #This is what https://wiki.debian.org/EmDebian/CrossDebootstrap suggests cp /etc/hosts $outmnt/etc/ -cp $build_resources/sources.list $outmnt/etc/apt/sources.list +cp $build_resources_apt/sources.list $outmnt/etc/apt/sources.list sed -i -e "s/suite/$DEBIAN_SUITE/g" $outmnt/etc/apt/sources.list if [ "$DEBIAN_SUITE" != "sid" ] then # sid doesn't have updates or security; they're present for all other suites - cat $build_resources/updates.list >> $outmnt/etc/apt/sources.list + cat $build_resources_apt/updates.list >> $outmnt/etc/apt/sources.list sed -i -e "s/suite/$DEBIAN_SUITE/g" $outmnt/etc/apt/sources.list # sid doesn't have backports; it's present for all other suites - cp $build_resources/backports.list $outmnt/etc/apt/sources.list.d/ + cp $build_resources_apt/backports.list $outmnt/etc/apt/sources.list.d/ sed -i -e "s/suite/$DEBIAN_SUITE/g" $outmnt/etc/apt/sources.list.d/backports.list #setup apt pinning - cp $build_resources/backports.pref $outmnt/etc/apt/preferences.d/ + cp $build_resources_apt/backports.pref $outmnt/etc/apt/preferences.d/ sed -i -e "s/suite/$DEBIAN_SUITE/g" $outmnt/etc/apt/preferences.d/backports.pref # Install sid (unstable) as an additional source for bleeding edge packages. - cp $build_resources/sid.list $outmnt/etc/apt/sources.list.d/ + cp $build_resources_apt/sid.list $outmnt/etc/apt/sources.list.d/ #setup apt pinning - cp $build_resources/sid.pref $outmnt/etc/apt/preferences.d/ + cp $build_resources_apt/sid.pref $outmnt/etc/apt/preferences.d/ fi if [ "$DEBIAN_SUITE" = "buster" ] then # Install bullseye (testing) as an additional source - cp $build_resources/bullseye.list $outmnt/etc/apt/sources.list.d/ + cp $build_resources_apt/bullseye.list $outmnt/etc/apt/sources.list.d/ #setup apt pinning - cp $build_resources/bullseye.pref $outmnt/etc/apt/preferences.d/ + cp $build_resources_apt/bullseye.pref $outmnt/etc/apt/preferences.d/ fi #Bring in the deb.prawnos.com gpg keyring -cp $build_resources/deb.prawnos.com.gpg.key $outmnt/InstallResources/ +cp $build_resources_apt/deb.prawnos.com.gpg.key $outmnt/InstallResources/ chroot $outmnt apt-key add /InstallResources/deb.prawnos.com.gpg.key chroot $outmnt apt update @@ -188,9 +214,18 @@ chroot $outmnt apt update cp $build_resources/locale.gen $outmnt/etc/locale.gen chroot $outmnt locale-gen +#Copy in the apt cache +cp "$PRAWNOS_ROOT/build/chroot-apt-cache/"* "$outmnt/var/cache/apt/archives/" || true + +echo IMAGE SIZE +df -h + +#Make apt retry on download failure +chroot $outmnt echo "APT::Acquire::Retries \"3\";" > /etc/apt/apt.conf.d/80-retries + #Install the base packages chroot $outmnt apt update -chroot $outmnt apt install -y ${base_debs_install[@]} +apt_install $PRAWNOS_ROOT $outmnt true ${base_debs_install[@]} #add the live-boot fstab cp -f $build_resources/external_fstab $outmnt/etc/fstab @@ -201,17 +236,17 @@ chroot $outmnt apt-get autoremove --purge chroot $outmnt apt-get clean #Download the shared packages to be installed by Install.sh: -chroot $outmnt apt-get install -y -d ${base_debs_download[@]} +apt_install $PRAWNOS_ROOT $outmnt false ${base_debs_download[@]} ## DEs #Download the xfce packages to be installed by Install.sh: -chroot $outmnt apt-get install -y -d ${xfce_debs_download[@]} +apt_install $PRAWNOS_ROOT $outmnt false ${xfce_debs_download[@]} #Download the lxqt packages to be installed by Install.sh: -chroot $outmnt apt-get install -y -d ${lxqt_debs_download[@]} +apt_install $PRAWNOS_ROOT $outmnt false ${lxqt_debs_download[@]} #Download the gnome packages to be installed by Install.sh: -chroot $outmnt apt-get install -y -d ${gnome_debs_download[@]} +apt_install $PRAWNOS_ROOT $outmnt false ${gnome_debs_download[@]} # we want to include all of our built packages in the apt cache for installation later, but we want to let apt download dependencies @@ -223,19 +258,22 @@ chroot $outmnt apt-get install -y -d ${gnome_debs_download[@]} #next call apt install -d on the ./filename or on the package name and apt will recognize it already has the package cached, so will only cache the dependencies #Copy the built prawnos debs over to the image, and update apts cache -cd $PRAWNOS_ROOT && make packages_install INSTALL_TARGET=$outmnt/var/cache/apt/archives/ +cd $PRAWNOS_ROOT && make filesystem_packages_install INSTALL_TARGET=$outmnt/var/cache/apt/archives/ chroot $outmnt apt install -y ${prawnos_base_debs_prebuilt_install[@]} chroot $outmnt apt install -y -d ${prawnos_base_debs_prebuilt_download[@]} chroot $outmnt apt install -y -d ${prawnos_xfce_debs_prebuilt_download[@]} ## GPU support #download mesa packages -chroot $outmnt apt-get install -y -d ${mesa_debs_download[@]} +apt_install $PRAWNOS_ROOT $outmnt false ${mesa_debs_download[@]} #Cleanup hosts rm -rf $outmnt/etc/hosts #This is what https://wiki.debian.org/EmDebian/CrossDebootstrap suggests echo -n "127.0.0.1 PrawnOS" > $outmnt/etc/hosts +#Cleanup apt retry +chroot $outmnt rm -f /etc/apt/apt.conf.d/80-retries + # do a non-error cleanup umount -l $outmnt > /dev/null 2>&1 rmdir $outmnt > /dev/null 2>&1 diff --git a/scripts/BuildScripts/InitramfsScripts/buildInitramFs.sh b/scripts/BuildScripts/InitramfsScripts/buildInitramFs.sh index fdd5195..9e0aa90 100755 --- a/scripts/BuildScripts/InitramfsScripts/buildInitramFs.sh +++ b/scripts/BuildScripts/InitramfsScripts/buildInitramFs.sh @@ -70,7 +70,7 @@ trap cleanup INT TERM EXIT [ ! -d build ] && mkdir build -losetup -P $outdev $$BASE +losetup -P $outdev $BASE #mount the root filesystem mount -o noatime ${outdev}p2 $outmnt diff --git a/scripts/BuildScripts/PackageScripts/pbuildPackage.sh b/scripts/BuildScripts/PackageScripts/pbuildPackage.sh index 2689351..82e8a99 100755 --- a/scripts/BuildScripts/PackageScripts/pbuildPackage.sh +++ b/scripts/BuildScripts/PackageScripts/pbuildPackage.sh @@ -84,7 +84,7 @@ else for dep in $PACKAGE_LOCAL_BUILD_DEPS ; do \ make build_package BUILD_PACKAGE=$dep -C .. ; \ done - rm $PRAWNOS_LOCAL_APT_REPO/Packages + rm -f $PRAWNOS_LOCAL_APT_REPO/Packages cd $PRAWNOS_LOCAL_APT_REPO && dpkg-scanpackages . /dev/null > Packages echo $PACKAGE_NAME build deps satisfied cd $PACKAGE_DIR diff --git a/scripts/Shared/package_lists.sh b/scripts/Shared/package_lists.sh index 6deb20a..a9244be 100755 --- a/scripts/Shared/package_lists.sh +++ b/scripts/Shared/package_lists.sh @@ -167,10 +167,7 @@ gnome_debs_download=( nautilus nautilus-admin network-manager-gnome - network-manager-gnome network-manager-openvpn - network-manager-openvpn - network-manager-openvpn-gnome network-manager-openvpn-gnome pavucontrol-qt seahorse