Skip to content

Commit

Permalink
switch nodejs and update mobile package list
Browse files Browse the repository at this point in the history
  • Loading branch information
Seshpenguin committed Nov 8, 2023
1 parent 02022c2 commit d2082b6
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 9 deletions.
2 changes: 1 addition & 1 deletion distro-files/layout/etc/systemd/system/prolinuxd.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Description=Sineware ProLinux Daemon

[Service]
Type=simple
ExecStart=/usr/bin/node /opt/prolinuxd/index.js
ExecStart=/opt/nodejs/bin/node /opt/prolinuxd/index.js
StandardOutput=kmsg+console
StandardError=kmsg+console
Environment=CONFIG_FILE=/sineware/data/prolinux.toml
Expand Down
4 changes: 3 additions & 1 deletion src/helpers/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,6 @@ export const MEGI_KERNEL = "https://codeberg.org/megi/linux/archive/orange-pi-6.

//export const GIT_COMMIT = exec("git rev-parse HEAD", false).toString().trim() ?? "unknown";
export let PROLINUX_VARIANT = process.env.PROLINUX_VARIANT;
export let PROLINUX_CHANNEL = process.env.PROLINUX_CHANNEL;
export let PROLINUX_CHANNEL = process.env.PROLINUX_CHANNEL;

export const NODEJS_PACKAGE = `https://nodejs.org/dist/v20.9.0/node-v20.9.0-linux-${arch}.tar.xz`;
14 changes: 11 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as dotenv from 'dotenv';
dotenv.config();
import fs from "fs";
import { BUILD_DIR, ROOTFS_DIR, OUTPUT_DIR, FILES_DIR, arch, TARGET_DEVICE, PROLINUX_CHANNEL, PROLINUX_VARIANT } from './helpers/consts';
import { BUILD_DIR, ROOTFS_DIR, OUTPUT_DIR, FILES_DIR, arch, TARGET_DEVICE, PROLINUX_CHANNEL, PROLINUX_VARIANT, NODEJS_PACKAGE } from './helpers/consts';
import exec from "./helpers/exec";
import { createAndMountPMOSImage, genPMOSImage, pmosFinalCleanup } from './pmbootstrap';
import axios from 'axios';
Expand All @@ -17,7 +17,7 @@ import { buildMobileCommon } from './os-variants/mobile/mobile-common';
console.log("Starting ProLinux build on " + new Date().toLocaleString());

const ARCH_URL = {
"x64": "https://archive.archlinux.org/iso/2023.04.01/archlinux-bootstrap-x86_64.tar.gz",
"x64": "https://archive.archlinux.org/iso/2023.11.01/archlinux-bootstrap-x86_64.tar.gz",
"arm64": "http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz"
}

Expand Down Expand Up @@ -96,7 +96,7 @@ async function main() {
yes | pacman-key --populate ${arch === "arm64" ? "archlinuxarm" : "archlinux"}
pacman -Syu --noconfirm
pacman -S --noconfirm base-devel git nano neofetch htop wget curl sudo bash-completion dialog qt6-base qt6-tools polkit libpipewire pipewire pipewire-pulse libwireplumber wireplumber libxcvt libnm networkmanager modemmanager wpa_supplicant libqalculate distcc ccache gdb kwayland5
pacman -S --noconfirm bluez xorg-xwayland openssh mold nodejs npm flatpak rsync xdg-desktop-portal xdg-user-dirs ddcutil lcms2
pacman -S --noconfirm bluez xorg-xwayland openssh mold flatpak rsync xdg-desktop-portal xdg-user-dirs ddcutil lcms2
pacman -S --noconfirm appstream-qt libdmtx libxaw lua ttf-hack qrencode xorg-xmessage xorg-xsetroot zxing-cpp accountsservice exiv2 lmdb zsync
pacman -S --noconfirm maliit-keyboard qt5-graphicaleffects xdotool libdisplay-info qcoro-qt6 qtkeychain-qt6 libquotient cmark libphonenumber callaudiod reuse gpgme
pacman -S --noconfirm $(pacman -Ssq qt6-)
Expand Down Expand Up @@ -139,11 +139,19 @@ EOF`);
console.log("Merging files from " + FILES_DIR + "/layout into " + ROOTFS_DIR);
exec(`sudo rsync -a ${FILES_DIR}/layout/ ${ROOTFS_DIR}/`);

/* Install NODEJS_PACKAGE */
console.log("Installing NodeJS");
exec(`sudo mkdir -pv ${ROOTFS_DIR}/opt/nodejs`);
exec(`sudo curl -L ${NODEJS_PACKAGE} | sudo tar -xJv -C ${ROOTFS_DIR}/opt/nodejs --strip-components=1`);

/* ------------- ProLinuxD ------------- */
exec(`
set -e
pwd
pushd .
# Set PATH to include nodejs
export PATH=${ROOTFS_DIR}/opt/nodejs/bin:$PATH
node --version
cd ${__dirname}/../ocs2-prolinuxd
npm i
npm run build
Expand Down
139 changes: 135 additions & 4 deletions src/os-variants/mobile/mobile-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export async function buildMobileDev() {
//"export DISTCC_HOSTS='192.168.11.138/20'",
//"export CC='ccache gcc'",
//"export CXX='ccache g++'",
"export CMAKE_CXX_COMPILER_LAUNCHER=ccache"
] : [
//"export CC='ccache gcc'",
//"export CXX='ccache g++'",
Expand All @@ -24,11 +25,141 @@ export async function buildMobileDev() {
//["plasma-mobile", "work/devinlin/foliorewrite"],
]

//const packagesToBuild = "kcmutils plasma5support kirigami-addons plasma-mobile plasma-pa plasma-nm qqc2-breeze-style"
// ktextwidgets gpgme
const packagesToBuild = "extra-cmake-modules kcoreaddons ki18n kconfig plasma-wayland-protocols karchive kdoctools kwidgetsaddons polkit-qt-1 kcodecs kauth kguiaddons kwindowsystem kcolorscheme kconfigwidgets kdbusaddons kcrash kiconthemes kcompletion kitemviews sonnet kglobalaccel kservice ktextwidgets qca knotifications kxmlgui kbookmarks kjobwidgets kwallet kwallet-pam solid kactivities kpackage kio kcmutils kirigami kdeclarative kwayland kidletime oxygen-icons kparts syntax-highlighting kdnssd kitemmodels ktexteditor kunitconversion threadweaver attica kcmutils ksvg plasma-framework syndication knewstuff frameworkintegration kdecoration layer-shell-qt libkscreen poppler krunner breeze kscreenlocker libqaccessibilityclient zxing-cpp phonon kfilemetadata kpty networkmanager-qt kpipewire kglobalacceld wayland-protocols kwin libkexiv2 selenium-webdriver-at-spi baloo kactivities-stats kded kdesu kholidays knotifyconfig kpeople kquickcharts modemmanager-qt prison libksysguard plasma-nano kuserfeedback kirigami-addons plasma5support kstatusnotifieritem plasma-workspace bluez-qt milou plasma-mobile plasma-nm plasma-pa qqc2-breeze-style plasma-settings kactivitymanagerd ksystemstats qqc2-desktop-style kscreen powerdevil plasma-desktop bluedevil plasma-integration breeze-icons konsole qmlkonsole purpose futuresql kquickimageeditor angelfish kclock kweathercore extragear/utils/kweather kalk appstream discover polkit-kde-agent-1 kde-cli-tools xdg-desktop-portal-kde kcontacts kmoretools dolphin alligator elisa kasts keysmith koko tokodon spectacle"
const packageList = [
"extra-cmake-modules",
"kcoreaddons",
"ki18n",
"kconfig",
"plasma-wayland-protocols",
"karchive",
"kdoctools",
"kwidgetsaddons",
"polkit-qt-1",
"kcodecs",
"kauth",
"kguiaddons",
"kwindowsystem",
"kcolorscheme",
"kconfigwidgets",
"kdbusaddons",
"kcrash",
"kiconthemes",
"kcompletion",
"kitemviews",
"sonnet",
"kglobalaccel",
"kservice",
"ktextwidgets",
"qca",
"knotifications",
"kxmlgui",
"kbookmarks",
"kjobwidgets",
"kwallet",
"kwallet-pam",
"solid",
"kactivities",
"kpackage",
"kio",
"kcmutils",
"kirigami",
"kdeclarative",
"kwayland",
"kidletime",
"oxygen-icons",
"kparts",
"syntax-highlighting",
"kdnssd",
"kitemmodels",
"ktexteditor",
"kunitconversion",
"threadweaver",
"attica",
"ksvg",
"plasma-framework",
"syndication",
"knewstuff",
"frameworkintegration",
"kdecoration",
"layer-shell-qt",
"libkscreen",
"poppler",
"krunner",
"breeze",
"kscreenlocker",
"libqaccessibilityclient",
"zxing-cpp",
"phonon",
"kfilemetadata",
"kpty",
"networkmanager-qt",
"kpipewire",
"kglobalacceld",
"wayland-protocols",
"kwin",
"libkexiv2",
"selenium-webdriver-at-spi",
"baloo",
"kactivities-stats",
"kded",
"kdesu",
"kholidays",
"knotifyconfig",
"kpeople",
"kquickcharts",
"modemmanager-qt",
"prison",
"libksysguard",
"plasma-nano",
"kuserfeedback",
"kirigami-addons",
"plasma5support",
"kstatusnotifieritem",
"plasma-workspace",
"bluez-qt",
"milou",
"plasma-mobile",
"plasma-nm",
"plasma-pa",
"qqc2-breeze-style",
"plasma-settings",
"kactivitymanagerd",
"ksystemstats",
"qqc2-desktop-style",
"kscreen",
"powerdevil",
"plasma-desktop",
"bluedevil",
"plasma-integration",
"breeze-icons",
"konsole",
"qmlkonsole",
"purpose",
"futuresql",
"kquickimageeditor",
"angelfish",
//"kclock",
"kweathercore",
"extragear/utils/kweather",
"kalk",
"appstream",
"discover",
"polkit-kde-agent-1",
"kde-cli-tools",
"xdg-desktop-portal-kde",
"kcontacts",
"kmoretools",
"dolphin",
"alligator",
"elisa",
"kasts",
"keysmith",
"koko",
"tokodon",
"spectacle"
];
const packagesToBuild = packageList.join(" ");

// todo remove ssh-keygen -A from here
if(process.env.KDE_CACHE === "true") {
console.log("Using cached KDE build");
exec(`sudo mkdir -pv ${ROOTFS_DIR}/opt/kde/ && sudo tar --exclude='src' -xvf ${BUILD_DIR}/kde-cache.tar -C ${ROOTFS_DIR}/opt/kde/`);
Expand Down

0 comments on commit d2082b6

Please sign in to comment.