-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Determine remote-os build version from git
Use script directory to determine git version and git hash. The output directory might be outside the git branch, e.g. in the Docker build image. This also fixes a build issue in #46 where the Docker build failed calling `git rev-parse` in the wrong directory.
- Loading branch information
Showing
2 changed files
with
5 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,29 +12,26 @@ if [ -e ${TARGET_DIR}/etc/inittab ]; then | |
tty1::respawn:/sbin/getty -L tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab | ||
fi | ||
|
||
echo "Creating systemd services" | ||
ln -fs ../../../../usr/lib/systemd/system/[email protected] $1/etc/systemd/system/multi-user.target.wants/[email protected] | ||
|
||
ln -fs ../../../../usr/lib/systemd/system/backlight.service $1/etc/systemd/system/multi-user.target.wants/backlight.service | ||
|
||
ln -fs ../../../../usr/lib/systemd/system/sharp-init.service $1/etc/systemd/system/multi-user.target.wants/sharp-init.service | ||
|
||
ln -fs ../../../../usr/lib/systemd/system/app.service $1/etc/systemd/system/multi-user.target.wants/app.service | ||
|
||
|
||
rm -rf $1/var/log/journal | ||
|
||
#rm -r $1/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service | ||
|
||
#rm -r $1/etc/systemd/system/multi-user.target.wants/dhcpcd.service | ||
|
||
# Determine build version | ||
BUILD_VERSION=$("$SCRIPT_DIR/git-version.sh" "$BR2_EXTERNAL/version") | ||
|
||
# We need the Git hash of remote-os and not of the buildroot submodule! | ||
GIT_HASH=`cd $1; git rev-parse HEAD` | ||
|
||
echo "Setting build version in YIO env variable: $BUILD_VERSION" | ||
sed -i "s/\$BUILD_VERSION/$BUILD_VERSION/g" $1/etc/profile.d/yio.sh | ||
|
||
# We need the Git hash of remote-os and not of the buildroot submodule! | ||
GIT_HASH=`cd $SCRIPT_DIR; git rev-parse HEAD` | ||
|
||
echo "Setting Git hash in YIO env variable: $GIT_HASH" | ||
sed -i "s/\$GIT_HASH/$GIT_HASH/g" $1/etc/profile.d/yio.sh |