Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
osak
TARDIS
Commits
7c3b85bb
Commit
7c3b85bb
authored
Jan 09, 2019
by
OSAK Buildhauer
Browse files
Finished create_offlinerepo.sh and added offlinerepo creation to build process
parent
2d7f46ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
assemble_image.sh
View file @
7c3b85bb
...
@@ -24,6 +24,7 @@ mv "$workspace/part_files"/grub/* "$workspace/part_files"/boot/grub/
...
@@ -24,6 +24,7 @@ mv "$workspace/part_files"/grub/* "$workspace/part_files"/boot/grub/
rm
-rf
"
$workspace
/part_files"
/grub
rm
-rf
"
$workspace
/part_files"
/grub
cp
"
$iso_file
"
"
$workspace
/part_files/kubuntu.iso"
cp
"
$iso_file
"
"
$workspace
/part_files/kubuntu.iso"
./create_offlinerepo.sh
"
$workspace
/part_files/archive"
"
$iso_file
"
vim htop
rm
-f
"
$workspace
/part.img"
rm
-f
"
$workspace
/part.img"
truncate
-s
"
$image_size
"
"
$workspace
/part.img"
truncate
-s
"
$image_size
"
"
$workspace
/part.img"
...
...
create_offlinerepo.sh
View file @
7c3b85bb
...
@@ -17,24 +17,52 @@ shift || usage
...
@@ -17,24 +17,52 @@ shift || usage
packages
=
"
$@
"
packages
=
"
$@
"
workspace
=
"/workspace"
workspace
=
"/workspace"
APT_SOURCE_URL_OVERRIDE
=
"http://ftp.halifax.rwth-aachen.de/ubuntu/"
rm
-rf
"
$workspace
"
/offlinerepo
rm
-rf
"
$workspace
"
/offlinerepo
mkdir
-p
"
$workspace
"
/offlinerepo
mkdir
-p
"
$workspace
"
/offlinerepo
mkdir
-p
"
$dest
"
7z e
-so
"
$iso_file
"
casper/filesystem.squashfs
>
"
$workspace
"
/offlinerepo/filesystem.squashfs
7z e
-so
"
$iso_file
"
casper/filesystem.squashfs
>
"
$workspace
"
/offlinerepo/filesystem.squashfs
unsquashfs
-no-xattrs
-d
"
$workspace
"
/offlinerepo/squashfs-root
"
$workspace
"
/offlinerepo/filesystem.squashfs
unsquashfs
-no-xattrs
-d
"
$workspace
"
/offlinerepo/squashfs-root
"
$workspace
"
/offlinerepo/filesystem.squashfs
ISO_RELEASE
=
"
$(
grep
DISTRIB_CODENAME
"
$workspace
/offlinerepo/squashfs-root/etc/lsb-release"
|
cut
-d
=
-f
2-
)
"
ISO_VERSION
=
"
$(
grep
DISTRIB_RELEASE
"
$workspace
/offlinerepo/squashfs-root/etc/lsb-release"
|
cut
-d
=
-f
2-
)
"
ISO_DESCRIPTION
=
"
$(
grep
DISTRIB_DESCRIPTION
"
$workspace
/offlinerepo/squashfs-root/etc/lsb-release"
|
cut
-d
'"'
-f
2
)
"
echo
"deb
$APT_SOURCE_URL_OVERRIDE
${
ISO_RELEASE
}
main restricted universe multiverse"
>
"
$workspace
/offlinerepo/squashfs-root/etc/apt/sources.list"
echo
"deb
$APT_SOURCE_URL_OVERRIDE
${
ISO_RELEASE
}
-security main restricted universe multiverse"
>>
"
$workspace
/offlinerepo/squashfs-root/etc/apt/sources.list"
echo
"deb
$APT_SOURCE_URL_OVERRIDE
${
ISO_RELEASE
}
-updates 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 update
{
{
apt-get
-o
Dir
=
"
$workspace
"
/offlinerepo/squashfs-root upgrade
--print-uris
-qq
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
apt-get
-o
Dir
=
"
$workspace
"
/offlinerepo/squashfs-root
install
--reinstall
--print-uris
-qq
$packages
}
|
cut
-d
"'"
-f2
|
while
read
url
;
do
wget
-nc
-P
"
$dest
"
"
$url
"
;
done
}
|
cut
-d
"'"
-f2
|
while
read
url
;
do
wget
-nc
-P
"
$dest
"
"
$url
"
;
done
apt-get
-o
Dir
=
"
$workspace
"
/offlinerepo/squashfs-root
install
--reinstall
--print-uris
-qq
$packages
{
mkdir
-p
"
$dest
/dists/
$ISO_RELEASE
/lip/binary-amd64"
cd
"
$dest
"
(
cd
"
$dest
"
&&
dpkg-scanpackages
.
|
gzip
>
"dists/
$ISO_RELEASE
/lip/binary-amd64/Packages.gz"
)
rm
-rf
"
$dest
"
/Packages.
*
dpkg-scanpackages
.
|
gzip
>
Packages.gz
cat
<<
EOF
> "
$dest
/dists/
$ISO_RELEASE
/lip/binary-amd64/Release"
}
Archive:
$ISO_RELEASE
Version:
$ISO_VERSION
Component: lip
Origin: Ubuntu
Label: Ubuntu
Architecture: amd64
EOF
touch
"
$dest
/.aptignr"
cat
<<
EOF
> "
$dest
/Release"
Origin: Ubuntu
Label: LIP Ubuntu Extra Packages
Suite:
$ISO_RELEASE
Version:
$ISO_VERSION
Codename:
$ISO_RELEASE
Date:
$(
LC_ALL
=
C
date
-u
)
Architectures: amd64
Components: lip
Description:
$ISO_DESCRIPTION
EOF
# Maybe sort files into the usual directory structure ("pool/main/g/glib2.0...")
# Maybe sort files into the usual directory structure ("pool/main/g/glib2.0...")
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment