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
2d8e0983
Commit
2d8e0983
authored
Feb 19, 2019
by
OSAK Buildhauer
Browse files
Use names from sourced lsb-release
parent
440851b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
create_offlinerepo.sh
View file @
2d8e0983
...
...
@@ -26,13 +26,11 @@ mkdir -p "$dest"
7z e
-so
"
$iso_file
"
casper/filesystem.squashfs
>
"
$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"
echo
"deb
$APT_SOURCE_URL_OVERRIDE
${
ISO_RELEASE
}
-backports main restricted universe multiverse"
>>
"
$workspace
/offlinerepo/squashfs-root/etc/apt/sources.list"
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
{
...
...
@@ -41,12 +39,12 @@ apt-get -o Dir="$workspace"/offlinerepo/squashfs-root update
}
|
cut
-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/
$IS
O_RELEAS
E
/lip/binary-amd64"
(
cd
"
$dest
"
&&
dpkg-scanpackages
.
|
gzip
>
"dists/
$IS
O_RELEAS
E
/lip/binary-amd64/Packages.gz"
)
mkdir
-p
"
$dest
/dists/
$
D
IS
TRIB_CODENAM
E
/lip/binary-amd64"
(
cd
"
$dest
"
&&
dpkg-scanpackages
.
|
gzip
>
"dists/
$
D
IS
TRIB_CODENAM
E
/lip/binary-amd64/Packages.gz"
)
cat
<<
EOF
> "
$dest
/dists/
$IS
O_RELEAS
E
/lip/binary-amd64/Release"
Archive:
$IS
O_RELEAS
E
Version:
$IS
O_VERSION
cat
<<
EOF
> "
$dest
/dists/
$
D
IS
TRIB_CODENAM
E
/lip/binary-amd64/Release"
Archive:
$
D
IS
TRIB_CODENAM
E
Version:
$
D
IS
TRIB_RELEASE
Component: lip
Origin: Ubuntu
Label: Ubuntu
...
...
@@ -57,13 +55,13 @@ touch "$dest/.aptignr"
cat
<<
EOF
> "
$dest
/Release"
Origin: Ubuntu
Label: LIP Ubuntu Extra Packages
Suite:
$IS
O_RELEAS
E
Version:
$IS
O_VERSION
Codename:
$IS
O_RELEAS
E
Suite:
$
D
IS
TRIB_CODENAM
E
Version:
$
D
IS
TRIB_RELEASE
Codename:
$
D
IS
TRIB_CODENAM
E
Date:
$(
LC_ALL
=
C
date
-u
)
Architectures: amd64
Components: lip
Description:
$IS
O
_DESCRIPTION
Description:
$
D
IS
TRIB
_DESCRIPTION
EOF
# 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