diff --git a/.gitmodules b/.gitmodules index 162371edb..320cebb1f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,10 +1,6 @@ # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 -[submodule "packaging/live-iso/fedora-kickstarts"] - path = packaging/live-iso/fedora-kickstarts - url = https://pagure.io/fedora-kickstarts.git - [submodule "fpga/thirdparty/libxil"] path = fpga/thirdparty/libxil url = https://github.com/VILLASframework/libxil.git diff --git a/REUSE.toml b/REUSE.toml index b669f4c15..47f97d039 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -7,7 +7,24 @@ SPDX-PackageSupplier = "Steffen Vogel " SPDX-PackageDownloadLocation = "https://fein-aachen.org/en/projects/villas-node/" [[annotations]] -path = ["**.prefs", "**.vi", "**.opal", "**.dft", "**.sib", "**.json", "**.ipynb", "**_pb2.py", "doc/pictures/**", "doc/favicon.png", "clients/opal-rt/rtlab-asyncip/models/send_receive/eonerc_logo.png", "clients/rtds/**/**.txt", "clients/opal-rt/hypersim-ucm/**.ecf", "etc/labs/lab3.pcap", "packaging/live-iso/files/etc/**", "tests/valgrind.supp", "packaging/archlinux/villas-node.install"] +path = [ + "**.prefs", + "**.vi", + "**.opal", + "**.dft", + "**.sib", + "**.json", + "**.ipynb", + "**_pb2.py", + "doc/pictures/**", + "doc/favicon.png", + "clients/opal-rt/rtlab-asyncip/models/send_receive/eonerc_logo.png", + "clients/rtds/**/**.txt", + "clients/opal-rt/hypersim-ucm/**.ecf", + "etc/labs/lab3.pcap", + "tests/valgrind.supp", + "packaging/archlinux/villas-node.install", +] precedence = "aggregate" SPDX-FileCopyrightText = "2018-2023, Institute for Automation of Complex Power Systems, RWTH Aachen University" SPDX-License-Identifier = "Apache-2.0" diff --git a/packaging/live-iso/.gitignore b/packaging/live-iso/.gitignore deleted file mode 100644 index 074e0fe8f..000000000 --- a/packaging/live-iso/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 - -villas.iso -build/ -*.log diff --git a/packaging/live-iso/.gitlab-ci.yml b/packaging/live-iso/.gitlab-ci.yml deleted file mode 100644 index 73c7c936a..000000000 --- a/packaging/live-iso/.gitlab-ci.yml +++ /dev/null @@ -1,50 +0,0 @@ -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 ---- -variables: - GIT_STRATEGY: fetch - GIT_SUBMODULE_STRATEGY: recursive - BUILDDIR: /var/tmp/lmc-build-${CI_JOB_ID} - -before_script: - - eval $(ssh-agent -s) - - ssh-add <(echo "${SSH_PRIVATE_KEY}") - -stages: - - prepare - - build - -# Stage: prepare - -# Build docker image which is used to build & test VILLASnode -docker: - stage: prepare - script: - - docker build -t villas/live-image-creator . - tags: - - shell - - linux - only: - - tags - - trigger - -# Stage: build - -iso: - stage: build - script: - - make - - make deploy - artifacts: - name: "${CI_PROJECT_NAME}-${CI_BUILD_REF}-logs" - paths: - - "*.log" - - "anaconda/*.log" - - "/tmp/ks-script-*" - when: always - image: villas/live-image-creator - tags: - - docker - only: - - tags - - trigger diff --git a/packaging/live-iso/Dockerfile b/packaging/live-iso/Dockerfile deleted file mode 100644 index c2e87cccc..000000000 --- a/packaging/live-iso/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -# Dockerfile for creating VILLAS live images -# -# Author: Steffen Vogel -# SPDX-FileCopyrightText: 2017-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 - -FROM fedora:36 - -RUN dnf -y install \ - git \ - lorax \ - rclone \ - make \ - wget \ - lorax-lmc-novirt \ - lorax-lmc-virt \ - livecd-tools diff --git a/packaging/live-iso/Makefile b/packaging/live-iso/Makefile deleted file mode 100644 index 6b4419ffc..000000000 --- a/packaging/live-iso/Makefile +++ /dev/null @@ -1,85 +0,0 @@ -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 - -NAME ?= VILLASlive -RELEASEVER ?= 35 -RELEASEARCH ?= x86_64 -DATE = $(shell date +%Y-%m-%d) - -DEPLOY_PATH ?= https://files.fein-aachen.org/ -DEPLOY_USER ?= webdav - -ifneq ($(CI),) - VERSION = $(CI_COMMIT_REF_NAME) -else - VERSION = $(shell git describe --tags) -endif - -BASE = $(NAME)-$(RELEASEARCH)-$(RELEASEVER) -IMG = $(BASE)-$(VERSION:v%=%).img -IMG_LATEST = $(BASE)-latest.iso - -BASE_ISO=Fedora-Server-netinst-$(RELEASEARCH)-$(RELEASEVER)-1.2.iso - -SRCDIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) -BUILDDIR ?= $(SRCDIR)/build - -export BUILDDIR - -FILES = $(shell find $(SRCDIR)/files -type f) -PATCHED_FILES = $(FILES:$(SRCDIR)/files/%=$(BUILDDIR)/patched_files/%) - -# Tools -LMC = livemedia-creator \ - --releasever=$(RELEASEVER) \ - --ram=8192 \ - --vcpus=16 - -# Targets -all: iso -iso: $(BUILDDIR)/$(ISO) - -patched: $(PATCHED_FILES) - -clean: - rm -rf $(BUILDDIR) - -deploy: #$(BUILDDIR)/$(ISO) - rclone config create fein webdav url ${DEPLOY_PATH} vendor other user ${DEPLOY_USER} pass ${DEPLOY_PASS} - rclone config show - rclone copy $(BUILDDIR)/$(ISO) fein:villas/iso - -$(BUILDDIR)/$(ISO): $(BUILDDIR)/iso/villas.iso - ln -s $< $@ - -$(BUILDDIR)/iso/%.iso: $(SRCDIR)/%.ks /tmp/$(BASE_ISO) - # livemedia-creator requires that the resultdir is not present - rm -rf $(dir $@) - - # livemedia-creator uses losetup to mount the image - # When used in a Docker container, we must make sure - # that there are some usable /dev/loopX devices. - ./ensure_loop.sh - - $(LMC) \ - --make-iso \ - --iso-only \ - --iso-name=$(notdir $@) \ - --iso /tmp/$(BASE_ISO) \ - --resultdir=$(dir $@) \ - --kernel-args "inst.ks=file:/villas.ks" \ - --ks $< - -/tmp/$(BASE_ISO): - wget -nv -O $@ https://ftp.halifax.rwth-aachen.de/fedora/linux/releases/$(RELEASEVER)/Server/$(RELEASEARCH)/iso/$(BASE_ISO) - -$(BUILDDIR)/patched_files/%: $(SRCDIR)/files/% - @mkdir -p $(dir $@) - sed -e "s/§VERSION§/$(VERSION)/g" \ - -e "s/§RELEASEVER§/$(RELEASEVER)/g" \ - -e "s/§RELEASEARCH§/$(RELEASEARCH)/g" \ - -e "s/§DATE§/$(DATE)/g" < $< > $@ - -.PHONY: all deploy clean deploy patched iso - -.PRECIOUS: % diff --git a/packaging/live-iso/README.md b/packaging/live-iso/README.md deleted file mode 100644 index e2622f641..000000000 --- a/packaging/live-iso/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# VILLAS LiveUSB Image - -This project builds a real-time optimized Fedora version with anaconda/kickstart including some VILLAS software components. - -## Documentation - - - -## Contact - -- Steffen Vogel - -## License - -- SPDX-FileCopyrightText: 2023 OPAL-RT Germany GmbH -- SPDX-License-Identifier: Apache-2.0 diff --git a/packaging/live-iso/ensure_loop.sh b/packaging/live-iso/ensure_loop.sh deleted file mode 100755 index 3510eba6d..000000000 --- a/packaging/live-iso/ensure_loop.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# -# Ensure that we have at least two usable loop devices inside our Docker container -# -# Source: https://github.com/jpetazzo/dind/issues/19#issuecomment-48859883 -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 - -ensure_loop(){ - num="$1" - dev="/dev/loop$num" - if test -b "$dev"; then - echo "$dev is a usable loop device." - return 0 - fi - - echo "Attempting to create $dev for docker ..." - if ! mknod -m660 $dev b 7 $num; then - echo "Failed to create $dev!" 1>&2 - return 3 - fi - - return 0 -} - -LOOP_A=$(losetup -f) -LOOP_A=${LOOP_A#/dev/loop} -LOOP_B=$(expr $LOOP_A + 1) -LOOP_C=$(expr $LOOP_A + 2) - -ensure_loop $LOOP_A -ensure_loop $LOOP_B -ensure_loop $LOOP_C - -losetup -la diff --git a/packaging/live-iso/fedora-kickstarts b/packaging/live-iso/fedora-kickstarts deleted file mode 160000 index dfbad4bdf..000000000 --- a/packaging/live-iso/fedora-kickstarts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dfbad4bdf5f5b9c6a93b3b192bfe91580ac08915 diff --git a/packaging/live-iso/files/etc/image-release b/packaging/live-iso/files/etc/image-release deleted file mode 100644 index f6dc9bc14..000000000 --- a/packaging/live-iso/files/etc/image-release +++ /dev/null @@ -1 +0,0 @@ -§VERSION§ diff --git a/packaging/live-iso/files/etc/issue b/packaging/live-iso/files/etc/issue deleted file mode 100755 index d09d660e3..000000000 --- a/packaging/live-iso/files/etc/issue +++ /dev/null @@ -1,2 +0,0 @@ - - >>>> Login with user "root" with an empty passwort. <<<< diff --git a/packaging/live-iso/files/etc/motd b/packaging/live-iso/files/etc/motd deleted file mode 100755 index 3ab3fd826..000000000 --- a/packaging/live-iso/files/etc/motd +++ /dev/null @@ -1,21 +0,0 @@ - __ _____ _ _ _ ____ - \ \ / /_ _| | | | / \ / ___| - \ \ / / | || | | | / _ \ \___ \ - \ V / | || |___| |___ / ___ \ ___) ) - \_/ |___|_____|_____/_/ \_\____/ - ---------------------------------------------------------------------- - VILLASframework Live Image §VERSION§ (§DATE§) ---------------------------------------------------------------------- - - Institute for Automation of Complex Power Systems (ACS) - EON Energy Research Center (EONERC) - RWTH University, Aachen, Germany - - Steffen Vogel - ---------------------------------------------------------------------- - For further instructions, please consult the documentation: - - >>>> https://villas.fein-aachen.org/ <<<< ---------------------------------------------------------------------- diff --git a/packaging/live-iso/villas.ks b/packaging/live-iso/villas.ks deleted file mode 100644 index a216f93aa..000000000 --- a/packaging/live-iso/villas.ks +++ /dev/null @@ -1,196 +0,0 @@ -# Kickstart file for VILLAS installation -# -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 - -# Configuration -lang en_US.UTF-8 -keyboard us -timezone Europe/Berlin -selinux --disabled -firewall --disabled -services --enabled=sshd,NetworkManager,chronyd,sshd,tuned,initial-setup -network --bootproto=dhcp --device=link --activate --hostname=villas -rootpw --plaintext villas-admin -shutdown - -bootloader --timeout=1 --append "preempt=full" - -zerombr -clearpart --all --initlabel --disklabel=msdos -part / --size=8192 --fstype ext4 - -# make sure that initial-setup runs and lets us do all the configuration bits -firstboot --reconfig - -# Add repositories -repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch -repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch -url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch - -# Install packages -%packages -@core -@hardware-support - --@dial-up --@input-methods --@standard - -rng-tools -initial-setup -glibc-langpack-en - -# remove this in %post -dracut-config-generic --dracut-config-rescue -dracut-live -# install tools needed to manage and boot arm systems --uboot-images-armv7 --initial-setup-gui --glibc-all-langpacks --trousers --gfs2-utils --reiserfs-utils - -# Intel wireless firmware assumed never of use for disk images --iwl* --ipw* --usb_modeswitch --generic-release* - -kernel -kernel-modules -kernel-modules-extra - -# Some custom packages -tuned -tuned-profiles-realtime - -# Tools -autoconf -automake -bash-completion -bind-utils -bison -chrony -cmake -curl -dia -doxygen -flex -gcc -gcc-c++ -git -graphviz -iproute -jq -libtool -lshw -make -mercurial -nano -ninja-build -openssh-clients -pkgconfig -procps-ng -protobuf-c-compiler -protobuf-compiler -psmisc -python-pip -tar -texinfo -tmux -traceroute -wget - -# Libraries and build-time dependencies of VILLASnode -openssl-devel -protobuf-devel -protobuf-c-devel -libuuid-devel -libconfig-devel -libnl3-devel -libcurl-devel -jansson-devel -spdlog-devel -fmt-devel -libwebsockets-devel -zeromq-devel -nanomsg-devel -librabbitmq-devel -mosquitto-devel -libibverbs-devel -librdmacm-devel -re-devel -libusb-devel -lua-devel -librdkafka-devel - -%end - -# Custom post installer -%post - -# Install VILLASnode -mkdir /villas -git clone https://git.rwth-aachen.de/acs/public/villas/node.git /villas/node - -cd /villas/node -git submodule update --init common - -bash ./packaging/deps.sh - -mkdir build -cd build - -cmake .. -make -j$(nproc) install - -echo /usr/local/lib64 > /etc/ld.so.conf.d/local.conf -ldconfig - -# Select real-time tuned profile -PROC=$(nproc) -ISOLATED_CORES= -if ((PROC > 4)); then - ISOLATED_CORES+=$(seq -s, $((PROC/2)) $((PROC-1))) -fi - -echo isolated_cores=${ISOLATED_CORES} >> /etc/tuned/realtime-variables.conf -tuned-adm profile realtime - -# Install patched files -cd /villas/node/packaging/live-iso -make patched -rsync --ignore-errors --archive --verbose /villas/node/packaging/live-iso/build/patched_files/ / -%end - -# From fedora-disk-base -%post - -# Find the architecture we are on -arch=$(uname -m) - -releasever=$(rpm --eval '%{fedora}') -rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary - -echo "Packages within this disk image" -rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn - -# remove random seed, the newly installed instance should make it's own -rm -f /var/lib/systemd/random-seed - -# The enp1s0 interface is a left over from the imagefactory install, clean this up -rm -f /etc/NetworkManager/system-connections/*.nmconnection - -dnf -y remove dracut-config-generic - -# Remove machine-id on pre generated images -rm -f /etc/machine-id -touch /etc/machine-id - -# Note that running rpm recreates the rpm db files which aren't needed or wanted -rm -f /var/lib/rpm/__db* - -%end