diff --git a/README.md b/README.md index d7663e4..e64ee2b 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ These packages are required: bc binfmt-support bison build-essential bzip2 ca-certificates cgpt cmake cpio debhelper \ debootstrap device-tree-compiler devscripts file flex g++ gawk gcc gcc-arm-none-eabi git gpg \ gpg-agent kmod libc-dev libncurses-dev libssl-dev lzip make parted patch \ - qemu-user-static sudo texinfo u-boot-tools udev vboot-kernel-utils wget + pbuilder qemu-user-static sudo texinfo u-boot-tools udev vboot-kernel-utils wget ``` ## Build diff --git a/makefile b/makefile index 6d75638..a200e03 100644 --- a/makefile +++ b/makefile @@ -23,6 +23,11 @@ endif OUTNAME=PrawnOS-$(PRAWNOS_SUITE)-c201.img BASE=$(OUTNAME)-BASE + +PRAWNOS_ROOT := $(shell pwd) +PBUILDER_CHROOT=$(PRAWNOS_ROOT)/build/prawnos-pbuilder-armhf-base.tgz +PBUILDER_RC=$(PRAWNOS_ROOT)/resources/BuildResources/pbuilder/prawnos-pbuilder.rc + # Otherwise errors are ignored when output is piped to tee: SHELL=/bin/bash -o pipefail @@ -36,7 +41,7 @@ SHELL=/bin/bash -o pipefail #run kernel_inject - +#:::::::::::::::::::::::::::::: cleaning :::::::::::::::::::::::::::::: .PHONY: clean clean: @echo "Enter one of:" @@ -68,6 +73,10 @@ clean_basefs: clean_initramfs: rm -r build/PrawnOS-initramfs.cpio.gz +.PHONY: clean_pbuilder +clean_initramfs: + rm -r build/prawnos-pbuilder-armhf-base.tgz + .PHONY: clean_all clean_all: $(MAKE) clean_kernel @@ -75,60 +84,20 @@ clean_all: $(MAKE) clean_img $(MAKE) clean_basefs $(MAKE) clean_initramfs + $(MAKE) clean_pbuilder +#:::::::::::::::::::::::::::::: premake prep :::::::::::::::::::::::::::::: .PHONY: build_dirs build_dirs: mkdir -p build/logs/ +#:::::::::::::::::::::::::::::: kernel :::::::::::::::::::::::::::::::::::: .PHONY: kernel kernel: $(MAKE) build_dirs rm -rf build/logs/kernel-log.txt ./scripts/buildKernel.sh $(KVER) 2>&1 | tee build/logs/kernel-log.txt -.PHONY: initramfs -initramfs: - $(MAKE) build_dirs - rm -rf build/logs/kernel-log.txt - ./scripts/buildInitramFs.sh $(BASE) 2>&1 | tee build/logs/initramfs-log.txt - -#makes the base filesystem image, no kernel only if the base image isnt present -.PHONY: filesystem -filesystem: - $(MAKE) build_dirs - rm -rf build/logs/kernel-log.txt - [ -f $(BASE) ] || ./scripts/buildFilesystem.sh $(KVER) $(DEBIAN_SUITE) $(BASE) 2>&1 | tee build/logs/fs-log.txt - -.PHONY: kernel_inject -kernel_inject: #Targets an already built .img and swaps the old kernel with the newly compiled kernel - scripts/injectKernelIntoFS.sh $(KVER) $(OUTNAME) - -.PHONY: kernel_update -kernel_update: - $(MAKE) initramfs - $(MAKE) kernel - $(MAKE) kernel_inject - -.PHONY: injected_image -injected_image: #makes a copy of the base image with a new injected kernel - $(MAKE) kernel - cp $(BASE) $(OUTNAME) - $(MAKE) kernel_inject - -.PHONY: image -image: - $(MAKE) clean_img - $(MAKE) filesystem - $(MAKE) initramfs - $(MAKE) kernel -#Make a new copy of the filesystem image - cp $(BASE) $(OUTNAME) - $(MAKE) kernel_inject - -.PHONY: live_image -live_image: - echo "TODO" - .PHONY: kernel_config kernel_config: scripts/crossmenuconfig.sh $(KVER) @@ -136,3 +105,47 @@ kernel_config: .PHONY: patch_kernel patch_kernel: scripts/patchKernel.sh + +#:::::::::::::::::::::::::::::: initramfs ::::::::::::::::::::::::::::::::: +.PHONY: initramfs +initramfs: + $(MAKE) build_dirs + rm -rf build/logs/kernel-log.txt + ./scripts/buildInitramFs.sh $(BASE) 2>&1 | tee build/logs/initramfs-log.txt + +#:::::::::::::::::::::::::::::: 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/kernel-log.txt + [ -f $(BASE) ] || ./scripts/buildFilesystem.sh $(KVER) $(DEBIAN_SUITE) $(BASE) 2>&1 | tee build/logs/fs-log.txt + + +#:::::::::::::::::::::::::::::: image management :::::::::::::::::::::::::: +.PHONY: kernel_update +kernel_update: + $(MAKE) clean_img + $(MAKE) initramfs + $(MAKE) kernel + cp $(BASE) $(OUTNAME) + scripts/injectKernelIntoFS.sh $(KVER) $(OUTNAME) + +.PHONY: image +image: + $(MAKE) clean_img + $(MAKE) filesystem + $(MAKE) initramfs + $(MAKE) kernel + cp $(BASE) $(OUTNAME) + $(MAKE) kernel_inject + + +#:::::::::::::::::::::::::::::: pbuilder management ::::::::::::::::::::::: +.PHONY: pbuilder-create +pbuilder-create: + pbuilder create --basetgz $(PBUILDER_CHROOT) --configfile $(PBUILDER_RC) + +.PHONY: pbuilder-update +pbuilder-update: + pbuilder update --basetgz $(PBUILDER_CHROOT) --configfile $(PBUILDER_RC) diff --git a/packages/filesystem/x11/xsecurelock/.gitignore b/packages/filesystem/x11/xsecurelock/.gitignore new file mode 100644 index 0000000..f56a19a --- /dev/null +++ b/packages/filesystem/x11/xsecurelock/.gitignore @@ -0,0 +1,28 @@ +#only include specific /debian files +src/debian/* +!src/debian/compat +!src/debian/changelog +!src/debian/control +!src/debian/rules +!src/debian/copyright +!src/debian/docs +!src/debian/watch +!src/debian/source/format + +#since we have not changed upstream, and this is packaged don't keep the source files +src/* + + +#generic packaging artifacts +debhelper-build-stamp +.debhelper +*.deb +*.dsc +*.build +*.buildinfo +*.changes +*.log +*.substvars +*.diff.gz +*.upload +*.debian.tar.xz \ No newline at end of file diff --git a/packages/filesystem/x11/xsecurelock/makefile b/packages/filesystem/x11/xsecurelock/makefile new file mode 100644 index 0000000..263bb78 --- /dev/null +++ b/packages/filesystem/x11/xsecurelock/makefile @@ -0,0 +1,29 @@ +SHELL := /bin/bash +PRAWNOS_ROOT := $(shell cd ../../../../; pwd) +PBUILDER_CHROOT=$(PRAWNOS_ROOT)/build/prawnos-pbuilder-armhf-base.tgz +PBUILDER_RC=$(PRAWNOS_ROOT)/resources/BuildResources/pbuilder/prawnos-pbuilder.rc + +all: xsecurelock-deb + +.PHONY: xsecurelock-deb +xsecurelock-deb: + cd src/; pdebuild --configfile $(PBUILDER_RC) \ + --buildresult .. \ + -- \ + --basetgz $(PBUILDER_CHROOT) \ + +.PHONY: clean +clean: + rm -rf *.upload + rm -rf *.deb + rm -rf *.changes + rm -rf *.dsc + rm -rf *.build + rm -rf *.debian.tar.xz + rm -rf *.buildinfo + +.PHONY: upload +upload: + dput deb.prawnos.com *.changes + + diff --git a/packages/filesystem/x11/xsecurelock/xsecurelock_1.5.1.orig.tar.gz b/packages/filesystem/x11/xsecurelock/xsecurelock_1.5.1.orig.tar.gz new file mode 100644 index 0000000..7b2344b Binary files /dev/null and b/packages/filesystem/x11/xsecurelock/xsecurelock_1.5.1.orig.tar.gz differ diff --git a/resources/BuildResources/pbuilder/prawnos-pbuilder.rc b/resources/BuildResources/pbuilder/prawnos-pbuilder.rc new file mode 100644 index 0000000..b6676d1 --- /dev/null +++ b/resources/BuildResources/pbuilder/prawnos-pbuilder.rc @@ -0,0 +1,5 @@ +PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-apt" +DISTRIBUTION=buster +ARCHITECTURE=armhf +DEBOOTSTRAP=qemu-debootstrap +DEBOOTSTRAPOPTS=( '--variant=buildd' '--arch=armhf' ) \ No newline at end of file diff --git a/tests/build-image.sh b/tests/build-image.sh index 1dc68a1..40229ba 100755 --- a/tests/build-image.sh +++ b/tests/build-image.sh @@ -26,7 +26,11 @@ cd "$(dirname "$0")/.." apt-get update # Note: this is a copy/paste from README.md, if you add anything here, also update it! -apt-get -y install --no-install-recommends --no-install-suggests bc binfmt-support bison bzip2 ca-certificates cgpt cmake cpio debootstrap device-tree-compiler file flex g++ gawk gcc gcc-arm-none-eabi git gpg gpg-agent kmod libc-dev libncurses-dev libssl-dev lzip make parted patch qemu-user-static sudo texinfo u-boot-tools udev vboot-kernel-utils wget +apt install --no-install-recommends --no-install-suggests \ + bc binfmt-support bison build-essential bzip2 ca-certificates cgpt cmake cpio debhelper \ + debootstrap device-tree-compiler devscripts file flex g++ gawk gcc gcc-arm-none-eabi git gpg \ + gpg-agent kmod libc-dev libncurses-dev libssl-dev lzip make parted patch \ + pbuilder qemu-user-static sudo texinfo u-boot-tools udev vboot-kernel-utils wget # Note: there's an error for /proc/modules, but at least building the image works fine: