Update for bookworm release

This commit is contained in:
Jeroen Oudshoorn
2023-12-14 12:34:14 +01:00
parent 6591ea2e37
commit d1158e8825
12 changed files with 304 additions and 297 deletions

View File

@ -3,7 +3,7 @@
packer {
required_plugins {
#arm = {
# version = "1.0.0"
# version = "~> 1"
# source = "github.com/cdecoux/builder-arm"
#}
ansible = {
@ -22,12 +22,12 @@ variable "pwn_version" {
}
source "arm" "rpi64-pwnagotchi" {
file_checksum_url = "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz.sha256"
file_urls = ["https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz"]
file_checksum_url = "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-12-06/2023-12-05-raspios-bookworm-arm64-lite.img.xz.sha256"
file_urls = ["https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-12-06/2023-12-05-raspios-bookworm-arm64-lite.img.xz"]
file_checksum_type = "sha256"
file_target_extension = "xz"
file_unarchive_cmd = ["unxz", "$ARCHIVE_PATH"]
image_path = "../../pwnagotchi-rpi-bullseye-${var.pwn_version}-arm64.img"
image_path = "../../../pwnagotchi-rpi-bookworm-${var.pwn_version}-arm64.img"
qemu_binary_source_path = "/usr/bin/qemu-aarch64-static"
qemu_binary_destination_path = "/usr/bin/qemu-aarch64-static"
image_build_method = "resize"
@ -39,7 +39,7 @@ source "arm" "rpi64-pwnagotchi" {
start_sector = "8192"
filesystem = "fat"
size = "256M"
mountpoint = "/boot"
mountpoint = "/boot/firmware"
}
image_partitions {
name = "root"
@ -51,12 +51,12 @@ source "arm" "rpi64-pwnagotchi" {
}
}
source "arm" "rpi32-pwnagotchi" {
file_checksum_url = "https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2023-05-03/2023-05-03-raspios-bullseye-armhf-lite.img.xz.sha256"
file_urls = ["https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2023-05-03/2023-05-03-raspios-bullseye-armhf-lite.img.xz"]
file_checksum_url = "https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2023-12-06/2023-12-05-raspios-bookworm-armhf-lite.img.xz.sha256"
file_urls = ["https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2023-12-06/2023-12-05-raspios-bookworm-armhf-lite.img.xz"]
file_checksum_type = "sha256"
file_target_extension = "xz"
file_unarchive_cmd = ["unxz", "$ARCHIVE_PATH"]
image_path = "../../pwnagotchi-rpi-bullseye-${var.pwn_version}-armhf.img"
image_path = "../../../pwnagotchi-rpi-bookworm-${var.pwn_version}-armhf.img"
qemu_binary_source_path = "/usr/bin/qemu-arm-static"
qemu_binary_destination_path = "/usr/bin/qemu-arm-static"
image_build_method = "resize"
@ -85,7 +85,7 @@ source "arm" "opi-pwnagotchi" {
file_checksum_type = "sha256"
file_target_extension = "xz"
file_unarchive_cmd = ["unxz", "$ARCHIVE_PATH"]
image_path = "../../pwnagotchi-opi-bullseye-${var.pwn_version}-arm64.img"
image_path = "../../../pwnagotchi-opi-bullseye-${var.pwn_version}-arm64.img"
qemu_binary_source_path = "/usr/bin/qemu-aarch64-static"
qemu_binary_destination_path = "/usr/bin/qemu-aarch64-static"
image_build_method = "resize"
@ -132,6 +132,7 @@ build {
"data/etc/systemd/system/pwngrid-peer.service",
]
}
provisioner "file" {
destination = "/etc/update-motd.d/01-motd"
source = "data/etc/update-motd.d/01-motd"
@ -149,92 +150,92 @@ build {
}
}
build {
name = "Raspberry Pi 32 Pwnagotchi"
sources = ["source.arm.rpi32-pwnagotchi"]
provisioner "file" {
destination = "/usr/bin/"
sources = [
"data/usr/bin/bettercap-launcher",
"data/usr/bin/hdmioff",
"data/usr/bin/hdmion",
"data/usr/bin/monstart",
"data/usr/bin/monstop",
"data/usr/bin/pwnagotchi-launcher",
"data/usr/bin/pwnlib",
]
}
provisioner "shell" {
inline = ["chmod +x /usr/bin/*"]
}
#build {
# name = "Raspberry Pi 32 Pwnagotchi"
# sources = ["source.arm.rpi32-pwnagotchi"]
# provisioner "file" {
# destination = "/usr/bin/"
# sources = [
# "data/usr/bin/bettercap-launcher",
# "data/usr/bin/hdmioff",
# "data/usr/bin/hdmion",
# "data/usr/bin/monstart",
# "data/usr/bin/monstop",
# "data/usr/bin/pwnagotchi-launcher",
# "data/usr/bin/pwnlib",
# ]
# }
# provisioner "shell" {
# inline = ["chmod +x /usr/bin/*"]
# }
provisioner "file" {
destination = "/etc/systemd/system/"
sources = [
"data/etc/systemd/system/bettercap.service",
"data/etc/systemd/system/pwnagotchi.service",
"data/etc/systemd/system/pwngrid-peer.service",
]
}
provisioner "file" {
destination = "/etc/update-motd.d/01-motd"
source = "data/etc/update-motd.d/01-motd"
}
provisioner "shell" {
inline = ["chmod +x /etc/update-motd.d/*"]
}
provisioner "shell" {
inline = ["apt-get -y --allow-releaseinfo-change update", "apt-get -y dist-upgrade", "apt-get install -y --no-install-recommends ansible"]
}
provisioner "ansible-local" {
command = "ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 PWN_VERSION=${var.pwn_version} PWN_HOSTNAME=${var.pwn_hostname} ansible-playbook"
extra_arguments = ["--extra-vars \"ansible_python_interpreter=/usr/bin/python3\""]
playbook_dir = "extras/"
playbook_file = "raspberrypi32.yml"
}
}
# provisioner "file" {
# destination = "/etc/systemd/system/"
# sources = [
# "data/etc/systemd/system/bettercap.service",
# "data/etc/systemd/system/pwnagotchi.service",
# "data/etc/systemd/system/pwngrid-peer.service",
# ]
# }
# provisioner "file" {
# destination = "/etc/update-motd.d/01-motd"
# source = "data/etc/update-motd.d/01-motd"
# }
# provisioner "shell" {
# inline = ["chmod +x /etc/update-motd.d/*"]
# }
# provisioner "shell" {
# inline = ["apt-get -y --allow-releaseinfo-change update", "export LC_ALL=en_GB.UTF-8", "apt-get -y dist-upgrade", "apt-get install -y --no-install-recommends ansible"]
# }
# provisioner "ansible-local" {
# command = "ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 PWN_VERSION=${var.pwn_version} PWN_HOSTNAME=${var.pwn_hostname} ansible-playbook"
# extra_arguments = ["--extra-vars \"ansible_python_interpreter=/usr/bin/python3\""]
# playbook_dir = "extras/"
# playbook_file = "raspberrypi32.yml"
# }
#}
build {
name = "Orange Pi Pwnagotchi"
sources = ["source.arm.opi-pwnagotchi"]
#build {
# name = "Orange Pi Pwnagotchi"
# sources = ["source.arm.opi-pwnagotchi"]
provisioner "file" {
destination = "/usr/bin/"
sources = [
"data/usr/bin/bettercap-launcher",
"data/usr/bin/hdmioff",
"data/usr/bin/hdmion",
"data/usr/bin/monstart",
"data/usr/bin/monstop",
"data/usr/bin/pwnagotchi-launcher",
"data/usr/bin/pwnlib",
]
}
provisioner "shell" {
inline = ["chmod +x /usr/bin/*"]
}
# provisioner "file" {
# destination = "/usr/bin/"
# sources = [
# "data/usr/bin/bettercap-launcher",
# "data/usr/bin/hdmioff",
# "data/usr/bin/hdmion",
# "data/usr/bin/monstart",
# "data/usr/bin/monstop",
# "data/usr/bin/pwnagotchi-launcher",
# "data/usr/bin/pwnlib",
# ]
# }
# provisioner "shell" {
# inline = ["chmod +x /usr/bin/*"]
# }
provisioner "file" {
destination = "/etc/systemd/system/"
sources = [
"data/etc/systemd/system/bettercap.service",
"data/etc/systemd/system/pwnagotchi.service",
"data/etc/systemd/system/pwngrid-peer.service",
]
}
provisioner "file" {
destination = "/etc/update-motd.d/01-motd"
source = "data/etc/update-motd.d/01-motd"
}
provisioner "shell" {
inline = ["chmod +x /etc/update-motd.d/*"]
}
provisioner "shell" {
inline = ["apt-get -y --allow-releaseinfo-change update", "apt-get -y dist-upgrade", "apt-get install -y --no-install-recommends ansible"]
}
provisioner "ansible-local" {
command = "ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 PWN_VERSION=${var.pwn_version} PWN_HOSTNAME=${var.pwn_hostname} ansible-playbook"
extra_arguments = ["--extra-vars \"ansible_python_interpreter=/usr/bin/python3\""]
playbook_file = "orangepi.yml"
}
}
# provisioner "file" {
# destination = "/etc/systemd/system/"
# sources = [
# "data/etc/systemd/system/bettercap.service",
# "data/etc/systemd/system/pwnagotchi.service",
# "data/etc/systemd/system/pwngrid-peer.service",
# ]
# }
# provisioner "file" {
# destination = "/etc/update-motd.d/01-motd"
# source = "data/etc/update-motd.d/01-motd"
# }
# provisioner "shell" {
# inline = ["chmod +x /etc/update-motd.d/*"]
# }
# provisioner "shell" {
# inline = ["apt-get -y --allow-releaseinfo-change update", "apt-get -y dist-upgrade", "apt-get install -y --no-install-recommends ansible"]
# }
# provisioner "ansible-local" {
# command = "ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 PWN_VERSION=${var.pwn_version} PWN_HOSTNAME=${var.pwn_hostname} ansible-playbook"
# extra_arguments = ["--extra-vars \"ansible_python_interpreter=/usr/bin/python3\""]
# playbook_file = "orangepi.yml"
# }
#}