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

Remove ubuntu specific files

parent 3be4ddfc
Branches
No related tags found
No related merge requests found
*.iso *.iso
grub_target.cfg grub_target.cfg
ubuntu-dependencies/tardis.deb
#!/bin/bash
set -e
usage () {
echo "usage: create_offlinerepo.sh repodir isofile [list of packages]" >&2
echo >&2
echo "Downloads all packages required to fully update the system in 'isofile' and" >&2
echo "to install the listed packages and adds them to the package archive in 'repodir'." >&2
exit 1
}
dest="$1"
shift || usage
iso_file="$1"
shift || usage
packages="$@"
: ${workspace:="/workspace"}
APT_SOURCE_URL_OVERRIDE="http://ftp.halifax.rwth-aachen.de/ubuntu/"
rm -rf "$workspace"/offlinerepo
mkdir -p "$workspace"/offlinerepo
mkdir -p "$dest"
7z e -so "$iso_file" casper/filesystem.squashfs > "$workspace"/offlinerepo/filesystem.squashfs
unsquashfs -no-progress -no-xattrs -d "$workspace"/offlinerepo/squashfs-root "$workspace"/offlinerepo/filesystem.squashfs
source "$workspace/offlinerepo/squashfs-root/etc/lsb-release"
echo "deb $APT_SOURCE_URL_OVERRIDE ${DISTRIB_CODENAME} main restricted universe multiverse" > "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
echo "deb $APT_SOURCE_URL_OVERRIDE ${DISTRIB_CODENAME}-security main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
echo "deb $APT_SOURCE_URL_OVERRIDE ${DISTRIB_CODENAME}-updates main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
echo "deb $APT_SOURCE_URL_OVERRIDE ${DISTRIB_CODENAME}-backports main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
apt-get -o Dir="$workspace"/offlinerepo/squashfs-root update
{
apt-get -o Dir="$workspace"/offlinerepo/squashfs-root upgrade --print-uris -qq
apt-get -o Dir="$workspace"/offlinerepo/squashfs-root install --reinstall --print-uris -qq $packages
} | cut -s -d"'" -f2 | while read url; do wget -q -nc -P "$dest" "$url"; done
apt-get -o Dir="$workspace"/offlinerepo/squashfs-root install --reinstall --print-uris -qq $packages
mkdir -p "$dest/dists/$DISTRIB_CODENAME/lip/binary-amd64"
# For some reason apt does not like the gziped package list in the installed system. Leaving the packages list uncompressed solves the problem.
#( cd "$dest" && dpkg-scanpackages . | gzip > "dists/$DISTRIB_CODENAME/lip/binary-amd64/Packages.gz" )
( cd "$dest" && dpkg-scanpackages . > "dists/$DISTRIB_CODENAME/lip/binary-amd64/Packages" )
cat <<EOF > "$dest/dists/$DISTRIB_CODENAME/lip/binary-amd64/Release"
Archive: $DISTRIB_CODENAME
Version: $DISTRIB_RELEASE
Component: lip
Origin: Ubuntu
Label: Ubuntu
Architecture: amd64
EOF
touch "$dest/.aptignr"
cat <<EOF > "$dest/Release"
Origin: Ubuntu
Label: LIP Ubuntu Extra Packages
Suite: $DISTRIB_CODENAME
Version: $DISTRIB_RELEASE
Codename: $DISTRIB_CODENAME
Date: $(LC_ALL=C date -u)
Architectures: amd64
Components: lip
Description: $DISTRIB_DESCRIPTION
EOF
# Maybe sort files into the usual directory structure ("pool/main/g/glib2.0...")
#!/bin/bash
# This script is potentially useless.
deb="linux-image-unsigned-5.0.5-050005-generic_5.0.5-050005.201903271212_amd64.deb"
name="vmlinuz-5.0.5-050005-generic"
wget "https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0.5/$deb"
ar -x $deb data.tar.xz
rm $deb
tar -xOvf data.tar.xz ./boot/$name --wildcards > $name
rm data.tar.xz
if loadfont /boot/grub/font.pf2 ; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
color yellow/black white/red
set pager=1
set gfxpayload=keep
function loadCasper {
set isoname="$1"
set kernel="$2"
set initrd="$3"
loopback loop ($root)/${isoname}
echo "Loading kernel"
linux (loop)${kernel} boot=casper file=/cdrom/preseed/lip.seed ${cmdline} iso-scan/filename=/${isoname} sysrq_always_enabled pstore.pstore_disable nosplash verbose --
echo "Loading initrd"
initrd (loop)${initrd}
echo "Starting kernel"
}
# Arguments: RELEASE ISONAME KERNEL INITRD
function img_menu {
set release="$1"
menuentry "Empfohlen: ${release} (deutsch)" "$2" "$3" "$4" {
set cmdline="debian-installer/locale=de_DE keyboard-configuration/layoutcode?=de"
loadCasper "$2" "$3" "$4"
}
menuentry "Recommended: ${release} (english)" "$2" "$3" "$4" {
set cmdline=""
loadCasper "$2" "$3" "$4"
}
menuentry "${release} (deutsch, failsafe)" "$2" "$3" "$4" {
set cmdline="debian-installer/locale=de_DE console-setup/layoutcode=de nomodeset noplymouth nosplash verbose text noacpi"
loadCasper "$2" "$3" "$4"
}
menuentry "${release} (english, failsafe)" "$2" "$3" "$4" {
set cmdline="nomodeset noplymouth nosplash verbose text noacpi"
loadCasper "$2" "$3" "$4"
}
menuentry "${release} (deutsch, ohne LIPNSA)" "$2" "$3" "$4" {
set cmdline="debian-installer/locale=de_DE console-setup/layoutcode=de fnord"
loadCasper "$2" "$3" "$4"
}
menuentry "${release} (english, without LIPNSA)" "$2" "$3" "$4" {
set cmdline="fnord"
loadCasper "$2" "$3" "$4"
}
}
#TEMPLATE img_menu "__RELEASE__" "__ISONAME__" "__KERNEL__" "__INITRD__"
menuentry "Show bootflags" {
cat "/bootflags.txt"
read
}
if [ ${grub_platform} == "efi" ]; then
menuentry "UEFI Shell v2" {
insmod fat
insmod chain
search --no-floppy --set=root --file /efi/shell/Shell_Full_v2.efi
chainloader /efi/shell/Shell_Full_v2.efi
}
menuentry "UEFI Shell v1" {
insmod fat
insmod chain
search --no-floppy --set=root --file /efi/shell/Shell_Full_v1.efi
chainloader /efi/shell/Shell_Full_v1.efi
}
menuentry "UEFI Firmware Settings" --id "uefi-firmware" {
fwsetup
}
fi
dpkg -b tardisDev tardis.deb
Package: osak-tardis-dependencies
Version: 0.1.0
Architecture: all
Essential: no
Section: utils
Priority: optional
Depends: mtools, gddrescue, p7zip-full, coreutils, fdisk, rsync, git, dosfstools, grub-theme-starfield, squashfs-tools, dpkg-dev, grub-pc, grub-common, xorriso, apt, bash, grep, tar, binutils, wget, sed
Maintainer: OSAK <osak@fsmpi.rwth-aachen.de>
Installed-Size: 0
Description: dependencies to develop and use TARDIS
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment