Skip to content
Snippets Groups Projects
Verified Commit c9690db0 authored by Lars Frost's avatar Lars Frost
Browse files

Do monster commit

- Generates Doku on livefs
- Use customized calamares
- Fix package installation
parent 4bf810e0
No related branches found
No related tags found
No related merge requests found
Showing with 361 additions and 57 deletions
\subsection{tmux}\label{ch_tmux}
Tmux ist ein weiterer Terminalmultiplexer für die Kommandozeile.
Die Benutzung und Funktionalität ist ähnlich der von \texttt{screen}.
Eine detailierte Beschreibung findest du mit \texttt{man screen} in der Manpage.
\section{tofrodos}
Das Packet \textsl{tofrodos} fasst die Programme \texttt{todos} und
\texttt{fromdos} zusammen, welche DOS- und UNIX-Textdateien ineinander
konvertiert.
Während in UNIX-Textdateien die Zeilen lediglich mit einem Zeilenumbruch
enden, besitzen DOS-Dateien zusätzlich noch ein Zeichen für den
Wagenrücklauf, ein Relikt aus Zeiten von Fernschreibern.
Dieses Zeichen kann unter UNIX, wenn man eine Textdatei von einem Windows-System
hat, zu Problemen führen. Umgekehrt hat Windows mit Textdateien von Unix manchmal
Probleme.
Um nun die Dateien umzuwandeln kann eine Datei mit DOS-Zeilenumbrüchen mit
\texttt{fromdos \textsl{dateiname}} in Unix-Kodierung umgewandelt und umgekehrt
eine Datei in Unix-Kodierung mit \texttt{todos \textsl{dateiname}} in DOS-Kodierung
umgewandelt werden.
Dass es Probleme mit der Kodierung gibt kannst du beispielsweise erkennen, wenn
du unter Linux seltsame Zeichen am Zeilenende (bspw. \texttt{\textasciicircum M}) siehst oder wenn
du unter Windows alles in einer Zeile stehen hast.
\subsection{unrar-free}
Unrar-free ist ein Kommandozeilen-Tool zum Entpacken von Rar-Archiven. Es wird unter anderem vom KDE Tool Ark, welches in den Dateimanager integriert ist, verwendet.
Aufzurufen mit: \texttt{unrar-free 'Argumente'}.
Eine Übersicht der möglichen Argumente gibt es im Handbuch des Paketes, welches auf der Kommandozeile über \texttt{man unrar-free} angezeigt werden kann.
\subsection{Valgrind}
Valgrind ist ein Werkzeug zum Debuggen von compilierten Programmen, insbesondere von Speicherfehlern.
Wenn man beispielsweise ein C oder C++-Programm geschrieben hat, kann man es mit Flags zum Debuggen (\texttt{-g} bei gcc und g++) kompilieren und danach mit \texttt{valgrind a.out} ausführen.
Valgrind bietet darüber hinaus Auswertungswerkzeuge, die bei der Programmoptimierung helfen, wie das dynamic heap analysis tool DHAT\footnote{siehe \url{https://valgrind.org/docs/manual/dh-manual.html}}.
Weitere Informationen findet man in der Manpage \texttt{man valgrind} oder Online auf \url{https://valgrind.org/docs/manual/}.
\subsection{Vim}
Vim ist ein sehr mächtiger, kommandozeilenbasierter Texteditor. Dieser ist zum einen,
wenn du nur eine Kommandozeile zur Verfügung hast, sehr praktisch, ist zum anderen
aber auch als normaler Editor interessant.
Wenn du \texttt{vim} von der Kommandozeile startest befindest du dich zuerst im
\textsl{normal mode}. Um nun etwas zu editiern musst du mit \texttt{i} in den
\textsl{insert mode} wechseln. Dort kannst du die Datei nun einfach editieren.
Um vim wieder zu verlassen wechselst du mit \texttt{Esc} wieder in den
\textsl{normal mode} und kannst nun mit \texttt{:wq} die Datei speichern und schließen.
Eine Einführung in vim kannst du mit \texttt{vimtutor} erhalten und in vim
kannst du aus dem \textsl{normal mode} heraus mit \texttt{:help} Hilfe aufrufen.
\subsection{VLC}
Der VLC Mediaplayer ist ein Programm zum Abspielen von Audio- und Videodateien. Im Terminal wird er mit \texttt{vlc} gestartet.
Eine unvollständige Dokumentation ist unter \url{https://wiki.videolan.org/Documentation:Documentation} zu finden.
\subsection{wxMaxima}
wxMaxima ist eine grafische Oberfläche für das Computer-Algebra-System Maxima, mit dem man symbolisch rechnen kann.
Es wird im Terminal mit \texttt{wxmaxima} aufgerufen.
\subsection{x2go}
Immer mal wieder kommt es vor, dass man im Studium Software benutzen möchte/muss, die nicht auf dem heimischen Rechner zur Verfügung stehen; wohl aber auf Institutspoolrechnern, die über SSH (siehe Abschnitt \ref{ch_ssh}) über das Internet erreichbar sind. (In der Physik zum Beispiel liegt das nicht-freie Computeralgebrasystem "`MAPLE"' auf den CIP-Pool-Rechnern bereit.)
Wenn man nun nicht immer ins Institut fahren will, bietet SSH einem Erreichbarkeit über das Internet, aber wenn Programme mit graphischer Oberfläche benötigt werden, ist das X-Forwarding über SSH -- je nach Geschwindigkeit der Verbindung -- alles andere als performant.
Manche Institute bieten zwischenzeitlich zusätzlich zum normalen SSH-Server auch einen x2go-Server, der eine einfache graphische Verbindung zum Institutsrechner gestattet.
Hat man auf dem eigenen PC einen x2go-Client (zu finden -- je nach Benutzeroberfläche -- unter den Internetprogrammen) installiert, kann man sich über ein halbwegs intuitives Interface eine Verbindung konfigurieren und hat am Ende auf seinem lokalen Rechner den Desktop laufen, den man bei der Anmeldung am Server sehen würde.
Der Vorteil an x2go ist, dass es sich automatisch per SSH verbindet, damit also sämtlicher Traffic verschlüsselt erfolgt, und es die Datenkompression sehr gut automatisch regelt. Es ist also auch ohne vertiefte Fähigkeiten der Kommandozeilennutzung nutzbar und dabei auch bei langsameren Internetverbindungen noch recht performant.
Weitere Dokumentation findet man auf der x2go-Website:
\url{http://wiki.x2go.org/doku.php}
\subsection{xubuntu-Desktop}
Xubuntu-Desktop installiert das XFCE-Desktop-Environment (kurz XFCE) zusammen mit den zugehörigen Standardprogrammen.
XFCE ist etwas ressourcenschonender als KDE oder Gnome und ist damit ggf. besser für Netbooks oder ältere Geräte geeignet.
Es hat dabei ein anderes Bedienkonzept als KDE oder Gnome. Nachdem xubuntu-desktop installiert wurde, kann es im Login-Manager vor dem Login ausgewählt werden.
\subsection{zsh}
Die \texttt{zsh} ist eine Shell. Wenn du ein Terminal\footnote{auch bekannt unter den Begriffen \emph{Konsole}, \emph{Kommandozeile}, \emph{Eingabeaufforderung}, ...} öffnest, kannst du dort Programme starten und andere Kommandos ausführen. Das Programm, das dir im Terminal diese Möglichkeit zur Verfügung stellt ist eine sogenannte Shell. In der Standardkonfiguration ist diese Shell \texttt{bash}; die \texttt{zsh} ist eine Alternative.
Du startest die \texttt{zsh} durch Eingabe dieser drei Buchstaben in deinem Terminal. Wenn du \texttt{exec} (und ein Leerzeichen) davor schreibst, sorgst du dafür, dass deine aktuelle Shell beim Wechsel beendet wird. Um die Shell dauerhaft zu ändern gib:
\begin{lstlisting}
chsh
Passwort:
Login-Shell für lumi wird geändert.
Geben Sie einen neuen Wert an oder drücken Sie ENTER für den Standardwert
Login-Shell [/bin/bash]: /usr/bin/zsh
\end{lstlisting}
Doch was bietet die \texttt{zsh} im Gegensatz zum Standard? Wenn du sie das erste Mal startest, durchläufst du einen Konfigurationsassistenten mit dem du die vielen Funktionen so einstellen kannst, wie du es möchtest. Dabei werden dir einige sinnvolle Möglichkeiten vorgeschlagen, die du einfach auswählen kannst. Dir wird auffallen, dass dir umfangreiche Möglichkeiten zur automatischen Vervollständigung und Korrektur deiner Eingaben angeboten werden.
Eine Shell bietet dir umfangreiche Möglichkeiten zur Steuerung und Benutzung deines Systems und lässt sich ebenso sehr gut skripten, d.h. automatisieren.
%Zur Einrichtung und grundlegenden Benutzung wird es bei der KISS\footnote{Kommunikation und Installation schöner Software, unsere Linux Workshops} einen Workshop geben. Auch im Internet findest du Lernmaterial.
Die \texttt{zsh} ist POSIX-kompatibel, d.h. du kannst sehr viele Anleitungen zu Shells im Allgemeinen benutzen, die du im Internet finden kannst.
......@@ -9,9 +9,10 @@ Its name could mean at least one of:
# How to use it
1. Setup a manjaro system, either a virtual machine or preferably directly on hardware. Manjaro in docker doesn't work.
2. Install the dependencies. You can do that by going to [manjaro-dependencies](manjaro-dependencies), executing `makepkg` and then installing the created pavkage with `sudo pacman -U ./tardis-dev-dependencies-1.0-1-x86_64.pkg.tar.zst`.
3. You call [assemble\_image.sh](assemble_image.sh). This takes some time.
4. The compiled image is at `workspace/output.img`. It is an MBR/DOS-partitioned image, that can be copied byte-by-byte onto a stick (for example with `sudo dd if=/workspace/output.img of=/dev/sdX bs=4M conv=fsync oflag=direct status=progress` replacing `/dev/sdX`, with your stick's device-file and sudo with the privilege elevation tool of your choice).
1. Install the dependencies for calamares. You can do that by going to [calamares-dev-dependencies](calamares-dev-dependencies), executing `makepkg` and then installing the created package with `sudo pacman -U ./calamares-dev-dependencies-*.pkg.tar.zst`.
1. Install the dependencies. You can do that by going to [manjaro-dependencies](manjaro-dependencies), executing `makepkg` and then installing the created package with `sudo pacman -U ./tardis-dev-dependencies-*.pkg.tar.zst`.
1. You call [assemble\_image.sh](assemble_image.sh). This takes some time.
1. The compiled image is at `workspace/output.img`. It is an MBR/DOS-partitioned image, that can be copied byte-by-byte onto a stick (for example with `sudo dd if=/workspace/output.img of=/dev/sdX bs=4M conv=fsync oflag=direct status=progress` replacing `/dev/sdX`, with your stick's device-file and sudo with the privilege elevation tool of your choice).
# How it works internally
We use the [well documented](https://github.com/calamares/calamares/wiki/Deploy-Guide) [calamares](https://github.com/calamares/calamares) installer and the [somewhat documented](https://wiki.manjaro.org/index.php?title=Build_Manjaro_ISOs_with_buildiso) [buildiso manjaro-tool](https://gitlab.manjaro.org/tools/development-tools/manjaro-tools).
......
......@@ -5,6 +5,7 @@ set -x
# Params
WORKSPACE="workspace"
REBUILD_CALAMARES=1
# Helpers
REGULAR_USER="${SUDO_USER:-${USER}}"
......@@ -12,14 +13,6 @@ REGULAR_USER_HOME=$(getent passwd "$REGULAR_USER" | cut -d: -f6)
ISO_PROFILES_REPO="$REGULAR_USER_HOME/iso-profiles"
PROFILE="$ISO_PROFILES_REPO/osak/lip"
# https://stackoverflow.com/questions/1527049/how-can-i-join-elements-of-an-array-in-bash
function join_by {
local d=${1-} f=${2-}
if shift 2; then
printf %s "$f" "${@/#/$d}"
fi
}
rm -rf "$ISO_PROFILES_REPO"
rm -rf workspace
mkdir workspace
......@@ -27,8 +20,8 @@ chmod a+rx workspace
git clone --depth 1 https://gitlab.manjaro.org/profiles-and-settings/iso-profiles.git "$ISO_PROFILES_REPO"
mkdir -p "$PROFILE"
rsync -a --copy-links "$ISO_PROFILES_REPO/manjaro/kde/" "$PROFILE"
grep '^[^|#]*L[^|]*|' packages | cut -d'|' -f 2 >> "$PROFILE/Packages-Live"
grep '^[^|#]*D[^|]*|' packages | cut -d'|' -f 2 >> "$PROFILE/Packages-Desktop"
grep '^[^|#]*L[^|]*|' packages | cut -d'|' -f 2 | tr " " "\n" >> "$PROFILE/Packages-Live"
grep '^[^|#]*D[^|]*|' packages | cut -d'|' -f 2 | tr " " "\n" >> "$PROFILE/Packages-Desktop"
remove_live_package() {
pkg="${1:?}"
......@@ -45,76 +38,119 @@ remove_desktop_package() {
remove_live_package "manjaro-hello"
remove_desktop_package "manjaro-hello"
LIVE="$PROFILE/live-overlay"
mkdir -p "$PROFILE/live-overlay/usr/share/grub/cfg"
rsync --recursive grub-cfg/ "$PROFILE/live-overlay/usr/share/grub/cfg"
set +e # buildiso returns a 1 on partial builds
buildiso -p lip -x -k linux515 # build only filesystems, but not the iso
BO="$?"
set -e
[[ 1 -eq "$BO" ]]
create_offline_repo() {
local DESKTOPFS="/var/lib/manjaro-tools/buildiso/lip/x86_64/desktopfs"
local PACMAN_DB="$DESKTOPFS/var/lib/pacman"
mkdir -p "$PACMAN_DB"
local PACMAN_CACHE="$DESKTOPFS/var/cache/pacman/pkg"
mkdir -p "$PACMAN_CACHE"
grep '^[^|#]*[cCmMpPiI][^|]*|' packages | cut -d'|' -f 2 | tr '\n' ' ' > "$WORKSPACE/offline_packages.txt"
local CACHE="${XDG_CACHE_HOME:-"$HOME/.cache"}/lip-build/pacman"
mkdir -p "$CACHE/db"
mkdir -p "$CACHE/pkg"
pacman -Sy --dbpath "$CACHE/db"
rsync --recursive "$CACHE/db/" "$PACMAN_DB"
pacman -S --dbpath "$PACMAN_DB" --print --noconfirm $(cat "$WORKSPACE/offline_packages.txt") | sed "s#^http://#https://#" > "$WORKSPACE/packages_urls.txt"
wget --no-verbose --show-progress --continue --input-file <(grep "^https://" "$WORKSPACE/packages_urls.txt") --directory-prefix "$CACHE/pkg"
wget --no-verbose --show-progress --continue --input-file <(grep "^https://" "$WORKSPACE/packages_urls.txt" | sed 's#$#.sig#') --directory-prefix "$CACHE/pkg"
rsync --files-from <(grep "^file://" "$WORKSPACE/packages_urls.txt" | sed "s#file:///var/cache/pacman/pkg/##") /var/cache/pacman/pkg "$CACHE/pkg"
rsync --files-from <(grep "^file://" "$WORKSPACE/packages_urls.txt" | sed "s#file:///var/cache/pacman/pkg/##" | sed 's#$#.sig#') /var/cache/pacman/pkg "$CACHE/pkg"
rsync --recursive "$CACHE/pkg/" "$PACMAN_CACHE"
}
LIVE="/var/lib/manjaro-tools/buildiso/lip/x86_64/livefs"
mkdir -p "$LIVE/usr/share/applications"
ETC_CAL="$LIVE/etc/calamares"
mkdir -p "$ETC_CAL/modules"
mkdir -p "$LIVE/usr/share/grub/cfg"
rsync --recursive grub-cfg/ "$LIVE/usr/share/grub/cfg"
cp "calamares.desktop" "$LIVE/usr/share/applications/calamares.desktop"
mkdir -p "$LIVE/usr/share/tardis"
rsync --recursive "Doku" "$LIVE/usr/share/tardis"
cp "packages" "$LIVE/usr/share/tardis/Doku"
cp "tardis-make-doku.sh" "$LIVE/usr/bin/tardis-make-doku.sh"
configure_package_chooser() {
local ID="${1:?}"
local WILDCARD="${2:?}"
local EN="${3:?}"
local DE="${4:?}"
cat > "$ETC_CAL/modules/packages_$ID.conf" << EOF
local DEFAULT_WILDCARD="${3:?}"
local EN="${4:?}"
local DE="${5:?}"
local OUT="$ETC_CAL/modules/packages_$ID.conf"
cat > "$OUT" << EOF
mode: optionalmultiple
method: packages
labels:
step: "$EN"
step[de]: "$DE"
default: id0
items:
default:
EOF
local i=0
while read -r line; do
id="id$i"
i="$((i + 1))"
if (echo "$line" | grep "^[^|#]*[$DEFAULT_WILDCARD][^|]*|"); then
echo "- $id" >> "$OUT"
fi
done < <(grep "^[^|#]*[$WILDCARD$DEFAULT_WILDCARD][^|]*|" packages)
echo "" >> "$OUT"
echo "items:" >> "$OUT"
i=0
while read -r line; do
name="$(echo "$line" | cut -d'|' -f 3)"
packages="$(echo "$line" | cut -d'|' -f 2)"
packages="$(echo "$line" | cut -d'|' -f 2 | sed 's/ /, /g')"
id="id$i"
i="$((i + 1))"
echo "- id: $id" >> "$ETC_CAL/modules/packages_$ID.conf"
echo " name: \"$name\"" >> "$ETC_CAL/modules/packages_$ID.conf"
echo " packages: [$(join_by ", " $packages)]" >> "$ETC_CAL/modules/packages_$ID.conf"
done < <(grep "^[^|#]*[$WILDCARD][^|]*|" packages)
echo "- id: $id" >> "$OUT"
echo " name: \"$name\"" >> "$OUT"
echo " packages: [$packages]" >> "$OUT"
done < <(grep "^[^|#]*[$WILDCARD$DEFAULT_WILDCARD][^|]*|" packages)
}
configure_package_chooser common "cC" "Common Packages" "Allgemeine Software"
configure_package_chooser mathe "mM" "Mathematics Packages" "Mathematik-Software"
configure_package_chooser physik "pP" "Physics Packages" "Physik-Software"
configure_package_chooser informatik "iI" "Computer Science Packages" "Informatik-Software"
configure_package_chooser common "c" "C" "Common Packages" "Allgemeine Software"
configure_package_chooser mathe "m" "M" "Mathematics" "Mathematik"
configure_package_chooser physik "p" "P" "Physics" "Physik"
configure_package_chooser informatik "i" "I" "Computer Science" "Informatik"
cp calamares-packages.conf "$ETC_CAL/modules/packages.conf"
chown "$REGULAR_USER:$REGULAR_USER" -R "$ISO_PROFILES_REPO"
create_offline_repo() {
local DESKTOPFS="/var/lib/manjaro-tools/buildiso/lip/x86_64/desktopfs"
local PACMAN_DB="$DESKTOPFS/var/lib/pacman"
mkdir -p "$PACMAN_DB"
local PACMAN_CACHE="$DESKTOPFS/var/cache/pacman/pkg"
mkdir -p "$PACMAN_CACHE"
grep '^[^|#][cCmMpPiI][^|]*|' packages | cut -d'|' -f 2 | tr '\n' ' ' > "$WORKSPACE/offline_packages.txt"
CACHE="${XDG_CACHE_HOME:-"$HOME/.cache"}/lip-build/pacman"
mkdir -p "$CACHE/db"
mkdir -p "$CACHE/pkg"
pacman -Sy --dbpath "$CACHE/db"
rsync -a "$CACHE/db/" "$PACMAN_DB"
pacman -S --dbpath "$PACMAN_DB" --cachedir "$CACHE/pkg" --downloadonly --noconfirm $(cat "$WORKSPACE/offline_packages.txt")
rsync -a "$CACHE/pkg/" "$PACMAN_CACHE"
}
create_offline_repo
set +e # buildiso returns a 1 on partial builds
buildiso -p lip -x -k linux515 # build only filesystems, but not the iso
BO="$?"
set -e
[[ 1 -eq "$BO" ]]
install_custom_calamares() {
local CACHE="${XDG_CACHE_HOME:-"$HOME/.cache"}/lip-build/calamares-build"
if [ "$REBUILD_CALAMARES" -ne 0 ] || ! ls "$CACHE"/calamares*.pkg.tar.* > /dev/null 2&>1
then
local BUILD_DIR="workspace/calamares-build"
mkdir -p "$BUILD_DIR"
cp "calamares/PKGBUILD" "$BUILD_DIR"
cd "$BUILD_DIR"
chown lars:lars -R .
doas -u lars makepkg
cd -
rsync -a "$BUILD_DIR"/ "$CACHE"
fi
mkdir -p /var/lib/manjaro-tools/buildiso/lip/x86_64/livefs/var/cache/pacman/pkg
cp "$CACHE"/*pkg.tar.* "$LIVE/var/cache/pacman/pkg"
tar --directory "$LIVE" --extract --same-owner --same-permissions --file "$CACHE"/calamares*pkg.tar.* usr/bin usr/lib
}
install_custom_calamares
# override some of the generated files
cp -f calamares-settings.conf /var/lib/manjaro-tools/buildiso/lip/x86_64/livefs/etc/calamares/settings.conf
create_offline_repo
cp "calamares.desktop" "$LIVE/usr/share/applications/calamares.desktop"
rsync --recursive makedoku /var/lib/manjaro-tools/buildiso/lip/x86_64/livefs/usr/lib/calamares/modules
set +e # buildiso returns a 1 on partial builds
buildiso -p lip -zc -k linux515 # and then build the iso
......
dontChroot: true
timeout: 300 # seconds
script: "/usr/bin/tardis-make-doku.sh ${USER} ${ROOT}"
i18n:
name: "Build LIP Documentation"
name[de]: "Baue LIP Dokumentation"
# vim: filetype=yaml tabstop=2 shiftwidth=2 expandtab
# Maintainer: Philip Müller <philm[at]manjaro[dog]org>
pkgname=calamares-dev-dependencies
pkgver=3.2.61
_pkgver=3.2.61
pkgrel=4
_commit=8a6b3d19e17d5a92d0ad8f743c55965f03ff9fac
pkgdesc='dev dependencies for calamares'
arch=('i686' 'x86_64')
license=(GPL)
url="https://gitlab.manjaro.org/applications/calamares"
license=('LGPL')
depends=('kconfig' 'kcoreaddons' 'kiconthemes' 'ki18n' 'kio' 'solid' 'yaml-cpp' 'kpmcore>=22.04.0' 'mkinitcpio-openswap'
'boost-libs' 'ckbcomp' 'hwinfo' 'qt5-svg' 'polkit-qt5' 'gtk-update-icon-cache' 'plasma-framework'
'qt5-xmlpatterns' 'squashfs-tools' 'libpwquality' 'appstream-qt' 'icu' 'python' 'qt5-webview'
'ttf-comfortaa' 'extra-cmake-modules' 'qt5-tools' 'qt5-translations' 'git' 'boost' 'kparts' 'kdbusaddons')
......@@ -50,6 +50,7 @@ sequence:
- bootloader
- postcfg
- packages
- makedoku
- umount
- show:
- finished
......
# Maintainer: Philip Müller <philm[at]manjaro[dog]org>
pkgname=calamares
pkgver=3.2.61
_pkgver=3.2.61
pkgrel=4
_branch="3.2.x-stable"
pkgdesc='Distribution-independent installer framework'
arch=('i686' 'x86_64')
license=(GPL)
url="https://git.fsmpi.rwth-aachen.de/osak/calamares"
license=('LGPL')
depends=('kconfig' 'kcoreaddons' 'kiconthemes' 'ki18n' 'kio' 'solid' 'yaml-cpp' 'kpmcore>=22.04.0' 'mkinitcpio-openswap'
'boost-libs' 'ckbcomp' 'hwinfo' 'qt5-svg' 'polkit-qt5' 'gtk-update-icon-cache' 'plasma-framework'
'qt5-xmlpatterns' 'squashfs-tools' 'libpwquality' 'appstream-qt' 'icu' 'python' 'qt5-webview'
'ttf-comfortaa')
makedepends=('extra-cmake-modules' 'qt5-tools' 'qt5-translations' 'git' 'boost' 'kparts' 'kdbusaddons')
backup=('usr/share/calamares/modules/bootloader.conf'
'usr/share/calamares/modules/displaymanager.conf'
'usr/share/calamares/modules/initcpio.conf'
'usr/share/calamares/modules/unpackfs.conf')
source+=(
"$pkgname-$pkgver-$pkgrel.tar.gz::$url/-/archive/$_branch/$pkgname-$_branch.tar.gz"
'https://gitlab.manjaro.org/codesardine/calamares/-/commit/b140b67c9fddb96701e46d23e9a72ddfbe77e0d0.patch'
)
sha256sums=(
'SKIP'
'39c38180b6c7d6088984c300e3fdf125b571525d1d252b59a52388e1780f98e4'
)
prepare() {
mv ${srcdir}/calamares-${_branch} ${srcdir}/calamares-${pkgver}
cd ${srcdir}/calamares-${pkgver}
sed -i -e 's/"Install configuration files" OFF/"Install configuration files" ON/' CMakeLists.txt
# change version
sed -i -e "s|$pkgver|$_pkgver|g" CMakeLists.txt
#_ver="$(cat CMakeLists.txt | grep -m3 -e " VERSION" | grep -o "[[:digit:]]*" | xargs | sed s'/ /./g')"
_ver="$pkgver"
printf 'Version: %s-%s' "${_ver}" "${pkgrel}"
echo ""
sed -i -e "s|\${CALAMARES_VERSION_MAJOR}.\${CALAMARES_VERSION_MINOR}.\${CALAMARES_VERSION_PATCH}|${_ver}-${pkgrel}|g" CMakeLists.txt
sed -i -e "s|CALAMARES_VERSION_RC 1|CALAMARES_VERSION_RC 0|g" CMakeLists.txt
# https://github.com/calamares/calamares/issues/2014
sed -i -e 's|"$@"|"-D6" "$@"|g' data/calamares_polkit
# change branding
sed -i -e "s/default/manjaro/g" src/branding/CMakeLists.txt
# https://github.com/calamares/calamares/issues/1945
patch -Np1 -i ../b140b67c9fddb96701e46d23e9a72ddfbe77e0d0.patch
}
build() {
cd ${srcdir}/calamares-${pkgver}
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DWITH_KF5DBus=OFF \
-DBoost_NO_BOOST_CMAKE=ON \
-DSKIP_MODULES="initramfs initramfscfg \
dummyprocess dummypython \
dummycpp dummypythonqt \
services-openrc"
make
}
package() {
cd ${srcdir}/calamares-${pkgver}/build
make DESTDIR="$pkgdir" install
install -Dm644 "../data/manjaro-icon.svg" "$pkgdir/usr/share/icons/hicolor/scalable/apps/calamares.svg"
install -Dm644 "../data/calamares.desktop" "$pkgdir/usr/share/applications/calamares.desktop"
install -Dm755 "../data/calamares_polkit" "$pkgdir/usr/bin/calamares_polkit"
install -Dm644 "../data/49-nopasswd-calamares.rules" "$pkgdir/etc/polkit-1/rules.d/49-nopasswd-calamares.rules"
chmod 750 "$pkgdir"/etc/polkit-1/rules.d
# rename services-systemd back to services
mv "$pkgdir/usr/lib/calamares/modules/services-systemd" "$pkgdir/usr/lib/calamares/modules/services"
mv "$pkgdir/usr/share/calamares/modules/services-systemd.conf" "$pkgdir/usr/share/calamares/modules/services.conf"
sed -i -e 's/-systemd//' "$pkgdir/usr/lib/calamares/modules/services/module.desc"
sed -i -e 's/-systemd//' "$pkgdir/usr/share/calamares/settings.conf"
# fix branding install
cp -av "../src/branding/manjaro" "$pkgdir/usr/share/calamares/branding/"
}
#!/bin/bash
ISO="/mnt/osiris/distros/manjaro/manjaro-kde-22.0.0-220816-linux515.iso"
ISO="/mnt/osiris/distros/manjaro/manjaro-kde-21.3.7-220816-linux515.iso"
MOUNTED_ISO="/tmp/manjaro-iso"
DEST="iso-content"
rm -rf "$MOUNTED_ISO" "$DEST"
......@@ -8,7 +8,8 @@ mkdir "$MOUNTED_ISO"
mkdir "$DEST"
LOOP=$(losetup --partscan --find --show "$ISO")
mount /dev/loop0p1 "$MOUNTED_ISO"
mount -o ro /dev/loop0p1 "$MOUNTED_ISO"
rsync -a "$MOUNTED_ISO" "$DEST"
unsquashfs -dest "$DEST/livefs" "$MOUNTED_ISO/manjaro/x86_64/livefs.sfs"
unsquashfs -dest "$DEST/desktopfs" "$MOUNTED_ISO/manjaro/x86_64/desktopfs.sfs"
unsquashfs -dest "$DEST/mhwdfs" "$MOUNTED_ISO/manjaro/x86_64/mhwdfs.sfs"
......
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# === This file is part of Calamares - <https://calamares.io> ===
#
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
# SPDX-FileCopyrightText: 2017 Alf Gaida <agaida@siduction.org>
# SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Calamares is Free Software: see the License-Identifier above.
#
"""
=== Example Python jobmodule.
A Python jobmodule is a Python program which imports libcalamares and
has a function run() as entry point. run() must return None if everything
went well, or a tuple (str,str) with an error message and description
if something went wrong.
"""
import libcalamares
import os
from time import gmtime, strftime, sleep
import gettext
_ = gettext.translation("calamares-python",
localedir=libcalamares.utils.gettext_path(),
languages=libcalamares.utils.gettext_languages(),
fallback=True).gettext
def pretty_name():
return _("Build Documentation")
status = _("Build Dokumentation")
def pretty_status_message():
return status
def run():
username = libcalamares.globalstorage.value("username")
root = libcalamares.globalstorage.value("rootMountPoint")
libcalamares.utils.host_env_process_output(["/usr/bin/tardis-make-doku.sh", username, root])
return None
type: "job"
name: "makedoku"
interface: "python"
script: "main.py"
# vim: filetype=yaml
......@@ -7,4 +7,4 @@ pkgdesc="LIP automation tool dependencies"
arch=(x86_64)
url="https://git.fsmpi.rwth-aachen.de/osak/tardis"
license=('GPL3')
depends=(zsh coreutils git rsync grep pacman wget squashfs-tools manjaro-tools-iso util-linux)
depends=(zsh coreutils git rsync grep pacman wget squashfs-tools manjaro-tools-iso util-linux calamares-dev-dependencies tar)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment