Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
arch-boxes
Commits
7da735e2
Verified
Commit
7da735e2
authored
Oct 12, 2020
by
Sven-Hendrik Haase
Browse files
Merge branch 'mr-origin-138' into master
parents
e0414adb
c8b8e667
Pipeline
#2165
passed with stages
in 30 minutes and 14 seconds
Changes
3
Pipelines
6
Hide whitespace changes
Inline
Side-by-side
build-host.sh
View file @
7da735e2
...
...
@@ -136,7 +136,7 @@ function main() {
expect "# "
## Start build and copy output to local disk
send "bash -x ./build-inside-vm.sh ${BUILD_VERSION}\n"
send "bash -x ./build-inside-vm.sh ${BUILD_VERSION
:-
}\n"
expect "# " 240 # qemu-img convert can take a long time
send "cp -r --preserve=mode,timestamps output /mnt/arch-boxes/tmp/$(basename "${TMPDIR}")/\n"
expect "# " 60
...
...
build-inside-vm.sh
View file @
7da735e2
...
...
@@ -89,8 +89,9 @@ function postinstall() {
echo
"COMPRESSION=
\"
xz
\"
"
>>
"
${
MOUNT
}
/etc/mkinitcpio.conf"
arch-chroot
"
${
MOUNT
}
"
/usr/bin/mkinitcpio
-p
linux
echo
"archlinux"
>
"
${
MOUNT
}
/etc/hostname"
echo
"KEYMAP=us"
>
"
${
MOUNT
}
/etc/vconsole.conf"
sed
-i
-e
's/^#\(en_US.UTF-8\)/\1/'
"
${
MOUNT
}
/etc/locale.gen"
arch-chroot
"
${
MOUNT
}
"
/usr/bin/locale-gen
arch-chroot
"
${
MOUNT
}
"
/usr/bin/systemd-firstboot
--locale
=
en_US.UTF-8
--timezone
=
UTC
--hostname
=
archlinux
--keymap
=
us
ln
-sf
/var/run/systemd/resolve/resolv.conf
"
${
MOUNT
}
/etc/resolv.conf"
}
...
...
@@ -147,17 +148,17 @@ function mv_to_output() {
}
# Helper function: create a new image from the "base" image
# ${1} - new image file
# ${2} - final file
# ${3} - pre
# ${4} - post
# ${1} - final file
# ${2} - pre
# ${3} - post
function
create_image
()
{
copy_and_mount_image
"
${
1
}
"
"
${
3
}
"
local
tmp_image
=
"
$(
basename
"
$(
mktemp
-u
)
"
)
"
copy_and_mount_image
"
${
tmp_image
}
"
"
${
2
}
"
image_cleanup
unmount_image
"
${
4
}
"
"
${
1
}
"
"
${
2
}
"
mv_to_output
"
${
2
}
"
"
${
3
}
"
"
${
tmp_image
}
"
"
${
1
}
"
mv_to_output
"
${
1
}
"
}
function
cloud_image
()
{
...
...
@@ -250,8 +251,8 @@ function main() {
else
build_version
=
"
${
1
}
"
fi
create_image
"cloud-img.img"
"Arch-Linux-x86_64-cloudimg-
${
build_version
}
.qcow2"
cloud_image cloud_image_post
create_image
"vagrant-qemu.img"
"Arch-Linux-x86_64-libvirt-
${
build_version
}
.box"
vagrant_qemu vagrant_qemu_post
create_image
"vagrant-virtualbox.img"
"Arch-Linux-x86_64-virtualbox-
${
build_version
}
.box"
vagrant_
qemu
vagrant_virtualbox_post
create_image
"Arch-Linux-x86_64-cloudimg-
${
build_version
}
.qcow2"
cloud_image cloud_image_post
create_image
"Arch-Linux-x86_64-libvirt-
${
build_version
}
.box"
vagrant_qemu vagrant_qemu_post
create_image
"Arch-Linux-x86_64-virtualbox-
${
build_version
}
.box"
vagrant_
virtualbox
vagrant_virtualbox_post
}
main
"
$@
"
http/install-common.sh
View file @
7da735e2
...
...
@@ -3,13 +3,7 @@
set
-e
set
-x
ln
-sf
/usr/share/zoneinfo/UTC /etc/localtime
sed
-i
-e
's/^#\(en_US.UTF-8\)/\1/'
/etc/locale.gen
locale-gen
echo
'LANG=en_US.UTF-8'
>
/etc/locale.conf
# setting the user credentials
echo
-e
"
${
NEWUSER
}
\n
${
NEWUSER
}
"
| passwd
useradd
-m
-U
"
${
NEWUSER
}
"
echo
-e
"
${
NEWUSER
}
\n
${
NEWUSER
}
"
| passwd
"
${
NEWUSER
}
"
...
...
@@ -90,9 +84,6 @@ sed -i 's/^GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="net.ifnames=0"/' /etc/defa
sed
-i
's/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"rootflags=compress-force=zstd\"/'
/etc/default/grub
grub-mkconfig
-o
/boot/grub/grub.cfg
# lock root account
usermod
-p
"*"
root
if
declare
-f
post
>
/dev/null
;
then
post
fi
Write
Preview
Markdown
is supported
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