Commit 7c8e4089 authored by Dan Johansen's avatar Dan Johansen
Browse files

Merge branch 'logging' into 'master'

implement preliminary logging, (#10)

See merge request !6
parents 3939ab2a 2cc582d1
......@@ -74,6 +74,8 @@ sudo buildarmpkg -p package -a any
The built packages will be copied to `$PKGDIR` as specified in `/usr/share/manjaro-arm-tools/lib/manjaro-arm-tools.conf` and placed in a subdirectory for the respective architecture.
Default package destination is `/var/cache/manjaro-arm-tools/pkg/`.
A log is located at /var/log/buildarmpkg-$(date +%Y-%m-%d-%H.%M).log
## signarmpkgs
This script uses the GPG identity you have setup in your /etc/makepkg.conf to sign the packages in the current folder.
......@@ -169,6 +171,7 @@ To build a factory image for the Pinebook Pro, with BSP uboot:
```
sudo buildarmimg -d pbpro-bsp -e kde-plasma -f
```
A log is located at /var/log/buildarmimg-$(date +%Y-%m-%d-%H.%M).log
## buildemmcinstaller (depricated)
This script does almost the same as the `buildarmimg` script.
......@@ -200,6 +203,8 @@ To build an aarch64 rootfs:
sudo buildrootfs
```
A log is located at /var/log/buildrootfs-$(date +%Y-%m-%d-%H.%M).log
## builddockerimg
This script is similar to `buildrootfs`, except that it builds a rootfs ready for package building and turns it into a docker image, that can be uploaded to DockerHub.
......@@ -209,6 +214,7 @@ sudo builddockerimg
```
This uploads the docker file directly to the Manjaro ARM acccount on DockerHub.
A log is located at /var/log/builddockerimg-$(date +%Y-%m-%d-%H.%M).log
## deployarmimg (depricated)
This script will create checksums for and upload the newly generated image. It assumes you have upload access to our OSDN server.
......
......@@ -80,11 +80,14 @@ done
[[ "$COLORS" = "true" ]] && enable_colors
# Log file
LOG=/var/log/buildarmimg-$(date +%Y-%m-%d-%H.%M).log
IMGNAME=Manjaro-ARM-$EDITION-$DEVICE-$VERSION
ARCH='aarch64'
if [ ! -d "$PROFILES/arm-profiles" ]; then
getarmprofiles
getarmprofiles | tee --append "$LOG"
fi
#Make sure only a known branch is used
......@@ -110,17 +113,17 @@ case "$DEVICE" in
esac
# Creating the rootfs used for the image.
create_rootfs_img
create_img
create_rootfs_img | tee --append "$LOG"
create_img | tee --append "$LOG"
if [ ${BMAP} = true ]; then
create_bmap
create_bmap | tee --append "$LOG"
fi
if [[ "$EXTRACTED" = "true" ]]; then
info "Image not compressed, because you supplied the -x option!"
else
# Create the compressed file, from the .img file which will get deleted.
compress
compress | tee --append "$LOG"
fi
# show timer
show_elapsed_time "${FUNCNAME}" "${timer_start}"
show_elapsed_time "${FUNCNAME}" "${timer_start}" | tee --append "$LOG"
......@@ -56,6 +56,9 @@ done
enable_colors
# Log file
LOG=/var/log/buildarmpkg-$(date +%Y-%m-%d-%H.%M).log
#Need both package and architecture
if [ "x" == "x$PACKAGE" ]; then
echo "-p [option] is required"
......@@ -81,15 +84,15 @@ if [[ "$BUILDCLEAN" = "false" && ! -d $CHROOTDIR ]]; then
elif [[ "$BUILDCLEAN" = "true" ]]; then
#create the rootfs to build in
create_rootfs_pkg
create_rootfs_pkg | tee --append "$LOG"
fi
#build the package
build_pkg
build_pkg | tee --append "$LOG"
#export the package and clean up
export_and_clean
prune_cache
export_and_clean | tee --append "$LOG"
prune_cache | tee --append "$LOG"
# show timer
show_elapsed_time "${FUNCNAME}" "${timer_start}"
show_elapsed_time "${FUNCNAME}" "${timer_start}" | tee --append "$LOG"
......@@ -83,6 +83,9 @@ while getopts "${opt}" arg; do
esac
done
# Log file
LOG=/var/log/builddockerimg-$(date +%Y-%m-%d-%H.%M).log
# Commands
create_rootfs
compress_docker
create_rootfs | tee --append "$LOG"
compress_docker | tee --append "$LOG"
......@@ -72,6 +72,9 @@ while getopts "${opt}" arg; do
esac
done
# Log file
LOG=/var/log/buildrootfs-$(date +%Y-%m-%d-%H.%M).log
# Commands
create_rootfs
compress_rootfs
create_rootfs | tee --append "$LOG"
compress_rootfs | tee --append "$LOG"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment