obs-build/0001-add-settings.patch
2021-01-07 11:20:08 +08:00

45 lines
1.2 KiB
Diff

From 81bfa0fb035176127c82b186c9eddbd47e9de76c Mon Sep 17 00:00:00 2001
From: miao_kaibo <miaokaibo@outlook.com>
Date: Thu, 7 Jan 2021 09:48:09 +0800
Subject: [PATCH] add settings
---
build | 3 +++
settings.xml | 10 ++++++++++
2 files changed, 13 insertions(+)
create mode 100644 settings.xml
diff --git a/build b/build
index 9b2d0f2..5f7bb19 100755
--- a/build
+++ b/build
@@ -1357,6 +1357,9 @@ for RECIPEFILE in "${RECIPEFILES[@]}" ; do
if test -f $BUILD_ROOT/etc/gshadow ; then
sed -i -e "s@^root::@root:*:@" $BUILD_ROOT/etc/gshadow
fi
+ mkdir -p $BUILD_ROOT/home/abuild/.m2
+ chown $ABUILD_UID:$ABUILD_GID $BUILD_ROOT/home/abuild/.m2
+ cp $BUILD_DIR/settings.xml $BUILD_ROOT/home/abuild/.m2/
BUILD_USER_ABUILD_USED=true
else
# building as root
diff --git a/settings.xml b/settings.xml
new file mode 100644
index 0000000..99a806f
--- /dev/null
+++ b/settings.xml
@@ -0,0 +1,10 @@
+<settings>
+ <mirrors>
+ <mirror>
+ <id>huaweicloud</id>
+ <name>huaweicloud</name>
+ <mirrorOf>*</mirrorOf>
+ <url>https://mirrors.huaweicloud.com/repository/maven/</url>
+ </mirror>
+ </mirrors>
+</settings>
--
2.27.0