Skip to content
Snippets Groups Projects
Commit 97f99e41 authored by christian's avatar christian
Browse files

Merge branch 'master' of www.fsmpi.rwth-aachen.de:lipck

parents 71c32d20 371b6316
No related branches found
No related tags found
No related merge requests found
......@@ -79,6 +79,12 @@ define getisoname =
$(ISO_PREFIX)desktop-$(call altarch,$1).iso
endef
#applies all patches in $1 to target directory $2
define patch_all =
$(foreach p,$(wildcard $1/*),echo "Applying \"$1\" to \"$2\":" && \
cat "$p" | patch -d"$2" -p1 && echo "done." && ) true
endef
CASPER_SOURCE_DIR=$(ISO_CONTENT)/casper
INITRD_SOURCE=$(CASPER_SOURCE_DIR)/initrd.lz
SQUASHFS_SOURCE=$(CASPER_SOURCE_DIR)/filesystem.squashfs
......@@ -176,8 +182,11 @@ $(call gentargets,$(STATE_DIR)/rootfs_remastered) : $(call archdir,%)$(STATE_DIR
-s lxc.mount.entry="$(APT_CACHE_DIR) $(call archdir,$*)$(ROOTFS)/var/cache/apt/ none defaults,bind 0 0" \
-s lxc.mount.entry="none $(call archdir,$*)$(ROOTFS)/tmp tmpfs defaults 0 0" \
-s lxc.mount.entry="none $(call archdir,$*)$(ROOTFS)/run tmpfs defaults 0 0" \
-- /bin/bash -l /remaster/remaster.proxy.sh /remaster/scripts/remaster_rootfs.sh
-- /bin/bash -l /remaster/remaster.proxy.sh /remaster/scripts/rootfs_remaster.sh
$(MAKE) ARCH=$* rootfs_finalize
#apply patches
$(call patch_all,$(CURDIR)/patches/rootfs,$(call archdir,$*)$(ROOTFS))
touch "$(call archdir,$*)$(STATE_DIR)/rootfs_remastered"
rootfs_console : $(call archdir,$(ARCH))$(STATE_DIR)/rootfs_extracted | $(APT_CACHE_DIR)
......@@ -271,7 +280,31 @@ initrd_clean_both:
initrd_remaster : $(ARCH_DIR)$(STATE_DIR)/initrd_remastered
$(call gentargets,$(STATE_DIR)/initrd_remastered) : $(call archdir,%)$(STATE_DIR)/initrd_extracted $(call archdir,%)$(STATE_DIR)/rootfs_remastered
$(CURDIR)/scripts/remaster_initrd.sh "$(CURDIR)" "$(call archdir,$*)$(INITRD)" "$(call archdir,$*)$(ROOTFS)"
mkdir -p "$(call archdir,$*)$(INITRD)/lip"
#nmtelekinese
mkdir -p "$(call archdir,$*)$(INITRD)/lip/nm"
cp "$(CURDIR)/contrib/initrd/nmtelekinese/nmtelekinese.desktop" "$(call archdir,$*)$(INITRD)/lip/nm"
cp "$(CURDIR)/contrib/initrd/nmtelekinese/nmtelekinese.py" "$(call archdir,$*)$(INITRD)/lip/nm"
cp "$(CURDIR)/contrib/initrd/nmtelekinese/26mopsmops" "$(call archdir,$*)$(INITRD)/scripts/casper-bottom/"
chmod +x "$(call archdir,$*)$(INITRD)/scripts/casper-bottom/26mopsmops"
#liphook
cp "$(CURDIR)/contrib/initrd/initrd_hook/24liphook" "$(call archdir,$*)$(INITRD)/scripts/casper-bottom/"
chmod +x "$(call archdir,$*)$(INITRD)/scripts/casper-bottom/24liphook"
$(RM) "$(call archdir,$*)$(INITRD)/scripts/casper-bottom/ORDER"
find "$(call archdir,$*)$(INITRD)/scripts/casper-bottom/" -type f \
| xargs basename -a | grep -E "^[0-9]{2}" | sort | xargs -I{} \
echo -e "/scripts/casper-bottom/{}\n[ -e /conf/param.conf ] && . /conf/param.conf" \
>> "$(call archdir,$*)$(INITRD)/scripts/casper-bottom/ORDER"
#install new kernel modules
$(RM) -R "$(call archdir,$*)$(INITRD)/lib/modules/"*
cp -a "$(call archdir,$*)$(ROOTFS)/lib/modules/$(shell basename $$(readlink -f "$(call archdir,$*)$(ROOTFS)/vmlinuz") | cut -d'-' -f2-)" \
"$(call archdir,$*)$(INITRD)/lib/modules"
$(call patch_all,$(CURDIR)/patches/initrd,$(call archdir,$*)$(INITRD))
touch "$(call archdir,$*)$(STATE_DIR)/initrd_remastered"
initrd_pack : $(ARCH_DIR)$(INITRD_TARGET)
......@@ -320,7 +353,7 @@ image_binary_files $(IMAGE_DIR)/.lipbinaries: image_git_pull $(IMAGE_BINARIES)
touch "$(IMAGE_DIR)/.lipbinaries"
image_remaster $(IMAGE_DIR)/.remastered: $(IMAGE_DIR)/.lipbinaries
$(CURDIR)/scripts/remaster_iso.sh "$(CURDIR)" "$(IMAGE_DIR)"
$(call patch_all,$(CURDIR)/patches/iso/,$(IMAGE_DIR))
touch "$(IMAGE_DIR)/.remastered"
image_content: image_git_pull $(IMAGE_DIR)/.remastered $(IMAGE_DIR)/grub/lipinfo.cfg
......@@ -348,7 +381,7 @@ image : image_content
repo_packages : $(REPO_ARCHIVE_DIR)/Packages.$(call altarch,$(ARCH))
$(REPO_ARCHIVE_DIR)/Packages.$(call altarch,$(PRIMARY_ARCH)) $(REPO_ARCHIVE_DIR)/Packages.$(call altarch,$(SECONDARY_ARCH)) : $(REPO_ARCHIVE_DIR)/Packages.% : $(call archdir,$*)$(STATE_DIR)/rootfs_remastered | $(IMAGE_DIR)
$(MAKE) ARCH=$(call to_arch,$*) rootfs_prepare
mkdir "$(call archdir,$*)$(ROOTFS)/cdrom"
mkdir -p "$(call archdir,$*)$(ROOTFS)/cdrom"
mkdir -p "$(call archdir,$*)$(LXC_DIR)"
lxc-execute --name "lipck_remaster_$*" -P "$(call archdir,$*)$(LXC_DIR)" -f "$(CURDIR)/config/lxc_common.conf" \
-s lxc.arch="$(call to_arch,$*)" -s lxc.rootfs="$(call archdir,$*)$(ROOTFS)" \
......@@ -357,7 +390,7 @@ $(REPO_ARCHIVE_DIR)/Packages.$(call altarch,$(PRIMARY_ARCH)) $(REPO_ARCHIVE_DIR)
-s lxc.mount.entry="none $(call archdir,$(ARCH))$(ROOTFS)/run tmpfs defaults 0 0" \
-s lxc.mount.entry="$(IMAGE_DIR) $(call archdir,$*)$(ROOTFS)/cdrom none defaults,bind 0 0" \
-- /bin/bash -l /remaster/remaster.proxy.sh \
/remaster/scripts/fill_offline_repo.sh "$*" "/cdrom"
/remaster/scripts/repo_packages.sh "$*" "/cdrom"
rmdir "$(call archdir,$*)$(ROOTFS)/cdrom"
$(MAKE) ARCH=$(call to_arch,$*) rootfs_finalize
......@@ -365,6 +398,19 @@ repo_package_info : $(REPO_DIST_DIR)/binary-$(call altarch,$(ARCH))/Packages.bz2
$(REPO_DIST_DIR)/binary-$(call altarch,$(PRIMARY_ARCH))/Packages.bz2 $(REPO_DIST_DIR)/binary-$(call altarch,$(SECONDARY_ARCH))/Packages.bz2 : $(REPO_DIST_DIR)/binary-%/Packages.bz2 : $(REPO_ARCHIVE_DIR)/Packages.%
mkdir -p "$(REPO_ARCHIVE_DIR)"
mkdir -p "$(REPO_DIST_DIR)/binary-$*/"
#info/release file
echo "Archive: $(ISO_RELEASE)" > "$(REPO_DIST_DIR)/binary-$*/Release"
echo "Version: $(shell echo $(ISO_VERSION) | cut -f-2 -d'.')" \
>> "$(REPO_DIST_DIR)/binary-$*/Release"
echo "Component: main" \
>> "$(REPO_DIST_DIR)/binary-$*/Release"
echo "Origin: Ubuntu" \
>> "$(REPO_DIST_DIR)/binary-$*/Release"
echo "Label: Ubuntu" \
>> "$(REPO_DIST_DIR)/binary-$*/Release"
echo "Architecture: $*" \
>> "$(REPO_DIST_DIR)/binary-$*/Release"
cd "$(REPO_ARCHIVE_DIR)" \
&& cat Packages.noarch "Packages.$*" | bzip2 -c9 > "$(REPO_DIST_DIR)/binary-$*/Packages.bz2"
......@@ -373,9 +419,24 @@ $(REPO_DIST_DIR)/binary-$(call altarch,$(PRIMARY_ARCH))/Packages.bz2 $(REPO_DIST
repo_metadata : $(REPO_ARCHIVE_DIR)/Release
$(REPO_ARCHIVE_DIR)/Release : $(REPO_DIST_DIR)/binary-$(call altarch,$(PRIMARY_ARCH))/Packages.bz2 $(REPO_DIST_DIR)/binary-$(call altarch,$(SECONDARY_ARCH))/Packages.bz2
mkdir -p "$(REPO_ARCHIVE_DIR)"
$(CURDIR)/scripts/mkdebarchive-metadata.sh "$(ISO_RELEASE)" \
"$$(echo $(ISO_VERSION) | cut -f-2 -d'.')" \
"$(REPO_ARCHIVE_DIR)" "$(PRIMARY_ARCH)" "$(SECONDARY_ARCH)"
echo "Origin: Ubuntu" > "$(REPO_ARCHIVE_DIR)"/Release
echo "Label: LIP Ubuntu Extra Packages" \
>> "$(REPO_ARCHIVE_DIR)"/Release
echo "Suite: $(ISO_RELEASE)" \
>> "$(REPO_ARCHIVE_DIR)"/Release
echo "Version: $(shell echo $(ISO_VERSION) | cut -f-2 -d'.')" \
>> "$(REPO_ARCHIVE_DIR)"/Release
echo "Codename: $(ISO_RELEASE)" \
>> "$(REPO_ARCHIVE_DIR)"/Release
echo "Date: $$(LC_ALL=C date -u)" \
>> "$(REPO_ARCHIVE_DIR)"/Release
echo "Architectures: $(call altarch,$(PRIMARY_ARCH)) $(call altarch,$(SECONDARY_ARCH))" \
>> "$(REPO_ARCHIVE_DIR)"/Release
echo "Components: lip" \
>> "$(REPO_ARCHIVE_DIR)"/Release
echo "Description: Ubuntu $(ISO_RELEASE) $(shell echo $(ISO_VERSION) | cut -f-2 -d'.')" \
>> "$(REPO_ARCHIVE_DIR)"/Release
repo_clean:
$(RM) -r "$(REPO_DIST_DIR)"
......
../../patches/rootfs
\ No newline at end of file
#singular
ftp://jim.mathematik.uni-kl.de/repo/ubuntu14/pool/main/s/singular/singular_4.0.2-1_amd64.deb
ftp://jim.mathematik.uni-kl.de/repo/ubuntu14/pool/main/s/singular/singular-common_4.0.2-1_all.deb
ftp://jim.mathematik.uni-kl.de/repo/ubuntu14/pool/main/s/singular/singular-bin_4.0.2-1_amd64.deb
ftp://jim.mathematik.uni-kl.de/repo/ubuntu14/pool/main/s/singular/singular-bin_4.0.2-1_i386.deb
ftp://jim.mathematik.uni-kl.de/repo/ubuntu14/pool/main/s/singular/singular_4.0.2-1_i386.deb
#mainline kernel
http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-rc2-vivid/linux-image-4.0.0-040000rc2-generic_4.0.0-040000rc2.201503031836_amd64.deb
http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-rc2-vivid/linux-image-4.0.0-040000rc2-generic_4.0.0-040000rc2.201503031836_i386.deb
......@@ -17,29 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with lipck. If not, see <http://www.gnu.org/licenses/>.
function patch_all()
{
PATCH_DIR="$1"
TARGET_DIR="$2"
if [ ! -d "$PATCH_DIR" ]; then
echo "Nothing to patch here!"
return 0
fi
if [ -z "$TARGET_DIR" ]; then
echo "No target directory given, assuming /"
TARGET_DIR="/"
fi
echo "Patching $TARGET_DIR ..."
for p in "$PATCH_DIR/"*
do
cat "$p" | patch -d "$TARGET_DIR" -p1
done
echo "done."
}
function install_debs()
{
DEB_DIR="$1"
......
#! /bin/bash
set -e
#Note: this script is a subset of mkdebarchive.sh. It generates only the metadata and assumes
#that the package files as well as the correct dirctory structure exist.
#The original script may be found in ../legacy_scripts .
echo "mkdebarchive.sh (C) 2012-2014 Mmoebius/ALUG, trilader/ALUG; 2014 Christopher Spinrath/OSAK"
echo "License: GPLv3 GNU Public License"
echo "Usage: mkdebarchive-metadata.sh dist-codename dist-version archives-dir architecture_list..."
test $# -ge 4 || ( echo "Expecting at least 4 arguments!" && exit 1 )
DIST_CODENAME="$1"
DIST_VERSION="$2"
BUILD_DATE="$(LC_ALL=C date -u)"
echo "Running for Ubuntu $DIST_VERSION ($DIST_CODENAME)..."
ARCHIVES_DIR="$3"
#we have three arguments followed by the architecture list
shift 3
echo "Prerequisite: Alle .deb-Packete liegen in $ARCHIVES_DIR"
test -d "$ARCHIVES_DIR" || { echo "FAIL: no '$ARCHIVES_DIR'"; exit 2; }
cd "$ARCHIVES_DIR"
ARCH_STR=""
for ARCH in $@; do
echo
echo "Erzeuge './dists/$DIST_CODENAME/lip/binary-$ARCH/Release'"
mkdir -p "dists/$DIST_CODENAME/lip/binary-$ARCH/"
cat >dists/$DIST_CODENAME/lip/binary-$ARCH/Release <<EOF
Archive: $DIST_CODENAME
Version: $DIST_VERSION
Component: main
Origin: Ubuntu
Label: Ubuntu
Architecture: $ARCH
EOF
ARCH_STR="$ARCH_STR $ARCH"
done
echo
echo "Erzeuge './Release'"
cat >Release <<EOF
Origin: Ubuntu
Label: LIP Ubuntu Extra Packages
Suite: $DIST_CODENAME
Version: $DIST_VERSION
Codename: $DIST_CODENAME
Date: $BUILD_DATE
Architectures: $ARCH_STR
Components: lip
Description: Ubuntu $DIST_CODENAME $DIST_VERSION
EOF
#echo
#echo "Erzeuge einen geeigneten Eintrag für APT in 'sources.list.d/01lip-stick-extra.list'"
#echo "deb [ trusted=yes ] file:/${PWD#/} $DIST_CODENAME lip" > /etc/apt/sources.list.d/01lip-stick-extra.list
#echo
#echo "User: Bitte gleich 'apt-get update' starten. Das sollte das Repository einbinden"
#echo "In diesem Verzeichnis liegen noch 3 Packages.* -Dateien. Die können gelöscht werden"
#echo "Ende."
#end;
#!/bin/bash
#This file is part of lipck - the "linux install party customization kit".
#
# Copyright (C) 2014 trilader, Anwarias, Christopher Spinrath
#
# lipck is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# lipck is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with lipck. If not, see <http://www.gnu.org/licenses/>.
set -e
SCRIPT_DIR="$1"
IRD="$2"
ROOTFS="$3"
if [ ! -d "$SCRIPT_DIR" ]; then
echo "Expected lipck base path as first argument!"
exit 1
fi
if [ ! -d "$IRD" ]; then
echo "Expected initrd root directory as second argument!"
exit 2
fi
if [ ! -d "$ROOTFS" ]; then
echo "Expected rootfs directory as third argument!"
exit 3
fi
CONTRIB_DIR="$SCRIPT_DIR/contrib/initrd"
if [ -e "$SCRIPT_DIR/scripts/common_functions.sh" ]; then
source "$SCRIPT_DIR/scripts/common_functions.sh"
fi
function install_nmtelekinese()
{
mkdir -p "$IRD/lip/nm"
cp "$CONTRIB_DIR/nmtelekinese/nmtelekinese.desktop" "$IRD/lip/nm"
cp "$CONTRIB_DIR/nmtelekinese/nmtelekinese.py" "$IRD/lip/nm"
cp "$CONTRIB_DIR/nmtelekinese/26mopsmops" "$IRD/scripts/casper-bottom/"
chmod +x "$IRD/scripts/casper-bottom/26mopsmops"
}
function add_no_bootloader_icon()
{
mkdir -p "$IRD/lip/no-bootloader-icon"
cp "$CONTRIB_DIR/no-bootloader-icon/ubiquity-kdeui.desktop" "$IRD/lip/no-bootloader-icon/"
# cp "$SCRIPT_DIR/no-bootloader-icon/ubiquity-kdeui-no-bootloader.desktop" "$IRD/lip/no-bootloader-icon/"
cp "$CONTRIB_DIR/no-bootloader-icon/25adduser" "$IRD/scripts/casper-bottom/"
chmod +x "$IRD/scripts/casper-bottom/25adduser"
}
function install_liphook()
{
cp "$CONTRIB_DIR/initrd_hook/24liphook" "$IRD/scripts/casper-bottom/"
chmod +x "$IRD/scripts/casper-bottom/24liphook"
cp "$CONTRIB_DIR/initrd_hook/ORDER" "$IRD/scripts/casper-bottom/"
}
function replace_modules()
{
local version=$(basename $(readlink -f "$ROOTFS/vmlinuz") | cut -d'-' -f2-)
rm -rf "$IRD/lib/modules/*"
cp -a "$ROOTFS/lib/modules/$version" "$IRD/lib/modules"
}
mkdir -p "$IRD/lip"
install_nmtelekinese
#add_no_bootloader_icon
install_liphook
replace_modules
patch_all "$SCRIPT_DIR/patches/initrd" "$IRD"
#!/bin/bash
#This file is part of lipck - the "linux install party customization kit".
#
# Copyright (C) 2014 trilader, Anwarias, Christopher Spinrath
#
# lipck is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# lipck is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with lipck. If not, see <http://www.gnu.org/licenses/>.
set -e
SCRIPT_DIR="$1"
ISO_REMASTER_DIR="$2"
if [ ! -d "$SCRIPT_DIR" ]; then
echo "Expected lipck base path as first argument!"
exit 1
fi
if [ ! -d "$ISO_REMASTER_DIR" ]; then
echo "Expected target iso or target image root directory as second argument!"
exit 2
fi
if [ -e "$SCRIPT_DIR/scripts/common_functions.sh" ]; then
source "$SCRIPT_DIR/scripts/common_functions.sh"
fi
patch_all "$SCRIPT_DIR/patches/iso/" "$ISO_REMASTER_DIR"
......@@ -30,7 +30,7 @@ test -n "$ARCH" || { echo "$(basename $0): fatal error: no architecture specifi
echo
echo "==> Fetching packages for offline repository for $ARCH"
#source common functions (e.g. patch_all)
#source common functions
if [ -e "$SCRIPT_DIR/scripts/common_functions.sh" ]; then
source "$SCRIPT_DIR/scripts/common_functions.sh"
fi
......@@ -56,8 +56,12 @@ echo "Updating package lists..."
apt-get update
echo "ok."
echo "hey apt - which packages do we need (and where do we get them)?"
PKG_URLS=$(apt-get install --reinstall --print-uris -qq $PKG_LIST | cut -d"'" -f2)
PKG_URLS=$PKG_URLS $(get_packages_from_file "$CONTRIB_DIR/offline_repo_packages.manualurls")
echo "downloading archives. this may take some time..."
wget -nc -P $PKG_DESTINATION $(apt-get install --reinstall --print-uris -qq $PKG_LIST | cut -d"'" -f2)
wget -nc -P $PKG_DESTINATION $PKG_URLS
#wget -nc -P $PKG_DESTINATION $(apt-get -o APT::Architecture=$ARCHITECTURE install --reinstall --allow-unauthenticated --print-uris -qq $PKG_LIST | cut -d"'" -f2)
revert_initctl
......
......@@ -23,7 +23,7 @@ set -e
SCRIPT_DIR="/remaster"
CONTRIB_DIR="$SCRIPT_DIR/contrib/"
#source common functions (e.g. patch_all)
#source common functions
if [ -e "$SCRIPT_DIR/scripts/common_functions.sh" ]; then
source "$SCRIPT_DIR/scripts/common_functions.sh"
fi
......@@ -82,9 +82,10 @@ function install_packages()
KERNEL_PKG=$(dpkg -S "$(readlink -f /vmlinuz)" | cut -d ":" -f1)
if [ -z "$KERNEL_PKG" ]; then
echo "LIPCK: remaster_rootfs: unable to determine installed kernel version; giving up..."
exit 1
fi
#[ "$(uname -m)" == "x86_64" ] || KERNEL_PKG=linux-image-generic-lts-trusty
if [ ! -e "$(readlink -f /initrd.img)" ]; then
if [ ! -e "$(readlink -f /vmlinuz)" ]; then
echo "LIPCK: No kernel in place; try to reinstall kernel image package:"
echo " $KERNEL_PKG"
apt-get --reinstall -y install $KERNEL_PKG
......@@ -149,9 +150,6 @@ install_packages
install_kde_defaults
#patch rootfs
patch_all "$SCRIPT_DIR/patches/" "/"
#i.e. required for applying default-wallpaper patch
#echo "compiling glib2 schemas..."
#glib-compile-schemas /usr/share/glib-2.0/schemas
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment