Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lipck
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osak
lipck
Commits
e18dce16
Commit
e18dce16
authored
Oct 7, 2014
by
Christopher Spinrath
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of shin-project:lipck
parents
3f3deb62
e4720e42
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+8
-7
8 additions, 7 deletions
Makefile
scripts/remaster_rootfs.sh
+22
-16
22 additions, 16 deletions
scripts/remaster_rootfs.sh
with
30 additions
and
23 deletions
Makefile
+
8
−
7
View file @
e18dce16
...
...
@@ -4,6 +4,9 @@ CONFIG_FILE=$(CURDIR)/config/Makefile.conf
include
$(CONFIG_FILE_DEFAULTS)
include
$(CONFIG_FILE)
#read all offically config options from CONFIG_FILE_DEFAULTS
CONFIGURABLE
=
$(
shell
cat
"
$(
CONFIG_FILE_DEFAULTS
)
"
|
grep
-v
"^
\#
"
|
cut
-s
-d
"="
-f1
)
ifndef
ARCH
ARCH
=
$(
PRIMARY_ARCH
)
endif
...
...
@@ -106,12 +109,12 @@ $(call gentargets,$(STATE_DIR)/rootfs_prepared) : $(call archdir,%)$(STATE_DIR)/
test
!
-e
"
$(
call archdir,
$*
)$(
ROOTFS
)
/remaster/"
if
[
-e
"
$(
call archdir,
$*
)$(
ROOTFS
)
/etc/resolv.conf"
]
;
\
then
\
cp
"
$(
call archdir,
$*
)$(
ROOTFS
)
/etc/resolv.conf"
"
$(
call archdir,
$*
)$(
ROOTFS
)
/etc/resolv.conf.bak"
;
\
cp
-a
--remove-destination
"
$(
call archdir,
$*
)$(
ROOTFS
)
/etc/resolv.conf"
"
$(
call archdir,
$*
)$(
ROOTFS
)
/etc/resolv.conf.bak"
;
\
fi
echo
"#!/bin/bash"
>
"
$(
call archdir,
$*
)$(
ROOTFS
)
/usr/sbin/init.lxc"
echo
"shift; exec
\$
$@
"
>>
"
$(
call archdir,
$*
)$(
ROOTFS
)
/usr/sbin/init.lxc"
chmod
+x
"
$(
call archdir,
$*
)$(
ROOTFS
)
/usr/sbin/init.lxc"
cp
/etc/resolv.conf
"
$(
call archdir,
$*
)$(
ROOTFS
)
/etc/resolv.conf"
cp
-a
--remove-destination
/etc/resolv.conf
"
$(
call archdir,
$*
)$(
ROOTFS
)
/etc/resolv.conf"
mkdir
-p
"
$(
call archdir,
$*
)$(
ROOTFS
)
/remaster"
cp
-Lr
"
$(
CURDIR
)
"
/config/copy_to_rootfs_remaster_dir/
*
"
$(
call archdir,
$*
)$(
ROOTFS
)
/remaster"
echo
"#!/bin/bash"
>
"
$(
call archdir,
$*
)$(
ROOTFS
)
/remaster/remaster.gen.sh"
...
...
@@ -259,10 +262,8 @@ image : image_content
config $(CONFIG_FILE)
:
@
echo
"Generating configuration
$(
CONFIG_FILE
)
"
echo
-n
""
>
$(
CONFIG_FILE
)
echo
"PRIMARY_ARCH=
$(
PRIMARY_ARCH
)
"
>>
"
$(
CONFIG_FILE
)
"
echo
"SECONDARY_ARCH=
$(
SECONDARY_ARCH
)
"
>>
"
$(
CONFIG_FILE
)
"
echo
"WORKSPACE=
$(
WORKSPACE
)
"
>>
"
$(
CONFIG_FILE
)
"
echo
"#see
$(
CONFIG_FILE_DEFAULTS
)
for default values."
>
"
$(
CONFIG_FILE
)
"
echo
-e
-n
"
$(
foreach option,
$(
CONFIGURABLE
)
,
$(
option
)
=
$($(
option
))
\n
)
"
|
tr
-d
"[:blank:]"
>>
"
$(
CONFIG_FILE
)
"
config_clean
:
$(
RM
)
$(
CONFIG_FILE
)
...
...
@@ -272,7 +273,7 @@ help:
@
echo
"Workspace:
$(
WORKSPACE
)
"
@
echo
"You may specify the Architecture by setting ARCH="
@
echo
@
echo
"=== How to run
make
==="
@
echo
"=== How to run
lipck
==="
@
echo
"0. Run make config as user e.g.
\"\$
$
make WORKSPACE=/media/drivewithspace config
\"
."
@
echo
"1. Optional: Run
\"
make image_skel_file
\"
to obtain an empty image file."
@
echo
" You may specify the target file with IMAGE_FILE="
...
...
This diff is collapsed.
Click to expand it.
scripts/remaster_rootfs.sh
+
22
−
16
View file @
e18dce16
...
...
@@ -58,15 +58,32 @@ function install_packages_from_file()
aptitude
install
-y
$APT_OPTIONS
$PKGS
}
function
install_lang_packages
()
{
#the content of this function is extracted from UCK
MISSING_LANG_PKG
=
"
$(
check-language-support
-l
de_DE
)
"
MISSING_LANG_PKG
=
"
$(
check-language-support
-l
en_US
)
$MISSING_LANG_PKG
"
# check for missing packages for de_DE and en_US
if
[
-n
"
$MISSING_LANG_PKG
"
]
;
then
aptitude
install
$MISSING_LANG_PKG
-y
fi
EXTRA_LANG_PKG
=
"
$(
dpkg-query
--show
|
cut
-f1
|
grep
-E
'^(language-pack|language-support|firefox-locale|thunderbird-locale|libreoffice-help|libreoffice-l10n)'
|
grep
-Ev
"[-](de|en)
\>
"
)
"
# remove extra language packages
if
[
-n
"
$EXTRA_LANG_PKG
"
]
;
then
aptitude purge
$EXTRA_LANG_PKG
-y
fi
}
function
install_packages
()
{
apt-get dist-upgrade
--assume-yes
--force-yes
apt-get
install
aptitude
-y
#aptitude full-upgrade -y # make sure we have the newest versions
# Some daily images do not have a kernel ?!?
#uncomment this if you remaster a daily build (fix kernel version!)
#Some daily images do not have a kernel;
#ensure that a valid kernel is installed
KERNEL_PKG
=
linux-signed-generic-lts-trusty
[
"
$(
uname
-m
)
"
==
"x86_64"
]
||
KERNEL_PKG
=
linux-image-generic-lts-trusty
aptitude reinstall
$KERNEL_PKG
-y
...
...
@@ -75,18 +92,7 @@ function install_packages()
install_packages_from_file
"
$CONTRIB_DIR
/pre_installed_packages"
""
install_packages_from_file
"
$CONTRIB_DIR
/pre_installed_packages.without-recommends"
"--without-recommends"
MISSING_LANG_PKG
=
"
$(
check-language-support
-l
de_DE
)
"
MISSING_LANG_PKG
=
"
$(
check-language-support
-l
en_US
)
$MISSING_LANG_PKG
"
# check for missing packages for de_DE and en_US
if
[
-n
"
$MISSING_LANG_PKG
"
]
;
then
aptitude
install
$MISSING_LANG_PKG
-y
fi
EXTRA_LANG_PKG
=
"
$(
dpkg-query
--show
|
cut
-f1
|
grep
-E
'^(language-pack|language-support|firefox-locale|thunderbird-locale|libreoffice-help|libreoffice-l10n)'
|
grep
-Ev
"[-](de|en)
\>
"
)
"
# remove extra language packages
if
[
-n
"
$EXTRA_LANG_PKG
"
]
;
then
aptitude purge
$EXTRA_LANG_PKG
-y
fi
install_lang_packages
install_debs
"
$CONTRIB_DIR
/debs/"
}
...
...
@@ -96,7 +102,7 @@ function finalize()
echo
-n
"Europe/Berlin"
>
/etc/timezone
rm
-rf
/var/crash/
*
#TODO: verify
if
[
-z
"
$LIPCK_HAS_APT_CACHE
"
]
then
rm
-rf
/var/cache/apt/
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment