Quellcode durchsuchen

update modules

master
belliash vor 7 Jahren
Ursprung
Commit
d171637d42

+ 1
- 1
config/modules/baselayout-branding.conf Datei anzeigen

@@ -1,4 +1,4 @@
1 1
 # This directive defines the new branding for BaseLayout package that will be set by the
2 2
 # baselayout-branding module. Usually this should be a string representing distribution
3 3
 # name.
4
-CUSTOM_BRANDING="MyOwn Base System"
4
+CUSTOMBRANDING="MyOwn Base System"

+ 1
- 1
config/modules/custom-patches.conf Datei anzeigen

@@ -1,3 +1,3 @@
1 1
 # Specifies a list of patches that will be applied on generated Portage tree by the
2 2
 # custom-patches module. Absolute paths to files are necessary!
3
-CUSTOM_PATCHES=""
3
+CUSTOMPATCHES=""

+ 2
- 2
config/modules/local-mirror.conf Datei anzeigen

@@ -1,7 +1,7 @@
1 1
 # This specifies the local repository with the base path. This is the directory, where
2 2
 # Portage mirror will be saved. Don't forget to uncomment this option!
3
-#LOCALMIRROR_PATH="/path/to/portage-mirror.git"
3
+#LOCALMIRRORPATH="/path/to/portage-mirror"
4 4
 
5 5
 # Directive sets a username, that will be used to pull changes from remote repository.
6 6
 # This is useful when the local daemon is running with different permissions.
7
-LOCALMIRROR_USER="root"
7
+LOCALMIRRORUSER="root"

+ 1
- 1
config/modules/openrc-branding.conf Datei anzeigen

@@ -1,3 +1,3 @@
1 1
 # This directive defines the new branding for OpenRC package that will be set by
2 2
 # openrc-branding module. Usually this should be a distribution name.
3
-CUSTOM_BRANDING="MyOwn"
3
+CUSTOMBRANDING="MyOwn"

+ 2
- 2
config/modules/update-notification.conf Datei anzeigen

@@ -1,9 +1,9 @@
1 1
 # This array specifies a list of packages that will be checked for updates. If any from
2 2
 # listed below is older than the one found in mainline Portage tree, the notification
3 3
 # will be sent.
4
-MUSTCHECK=( "my-cat/package1" "my-cat2/package2" )
4
+CHECKPACKAGES=( "my-cat/package1" "my-cat2/package2" )
5 5
 
6 6
 # Specifies an e-mail address, where all notifications about packages that needs update
7 7
 # will be send to. If this variable is empty, none notification will be sent at all, even
8 8
 # if the modules is enabled.
9
-UPDATE_NOTIFY=""
9
+UPDATENOTIFY=""

+ 4
- 4
modules/baselayout-branding.ezmod Datei anzeigen

@@ -3,13 +3,13 @@
3 3
 EZMOD_DESCRIPTION="Allows to re-brand the sys-apps/baselayout package"
4 4
 EZMOD_COMPATIBILITY="ezsync"
5 5
 EZMOD_AUTHOR="Rafal Kupiec"
6
-EZMOD_VERSION="1.0"
6
+EZMOD_VERSION="1.1"
7 7
 
8 8
 ezsync_precommit() {
9 9
 	printInfo "Enabling custom BaseLayout branding..."
10
-	find ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/sys-apps/baselayout -type f -name \*.ebuild | while read EBUILD; do
11
-		sed -i "s/echo \"Gentoo Base System release/echo \"${CUSTOM_BRANDING}/g" ${EBUILD} || return 1
10
+	while read EBUILD; do
11
+		sed -i "s/echo \"Gentoo Base System release/echo \"${CUSTOMBRANDING}/g" ${EBUILD} || return 1
12 12
 		run "ebuild ${EBUILD} manifest" || return 1
13
-	done
13
+	done < <(find ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/sys-apps/baselayout -type f -name \*.ebuild)
14 14
 	return 0
15 15
 }

+ 8
- 11
modules/custom-patches.ezmod Datei anzeigen

@@ -3,21 +3,18 @@
3 3
 EZMOD_DESCRIPTION="Applies custom patches onto generated Portage tree"
4 4
 EZMOD_COMPATIBILITY="ezsync"
5 5
 EZMOD_AUTHOR="Rafal Kupiec"
6
-EZMOD_VERSION="1.0"
6
+EZMOD_VERSION="1.2"
7 7
 
8 8
 ezsync_precommit() {
9 9
 	local PATCH PREFIX
10
-	if [ "${CUSTOM_PATCHES}" != "" ]; then
10
+	if [ "${CUSTOMPATCHES}" != "" ]; then
11 11
 		printInfo "Applying custom patches..."
12
-		for PATCH in ${CUSTOM_PATCHES}; do
13
-			for PREFIX in {0..4}; do
14
-				if run "patch -d \"${PORTAGESDIR}/${PORTAGE_BUILD[0]}\" --dry-run -p ${PREFIX} -i \"${PATCH}\" -s"; then
15
-					run "patch -d \"${PORTAGESDIR}/${PORTAGE_BUILD[0]}\" -p ${PREFIX} -i \"${PATCH}\"" || return 1
16
-				elif [ ${PREFIX} -ge 4 ]; then
17
-					printError "Patch ${PATCH} does not fit!"
18
-					return 1
19
-				fi
20
-			done
12
+		for PATCH in ${CUSTOMPATCHES}; do
13
+			applyPatch "${PORTAGESDIR}/${PORTAGE_BUILD[0]}" "${PATH}"
14
+			if [ ${?} -ne 0 ]; then
15
+				printError "Patch ${PATCH} does not fit!"
16
+				return 1
17
+			fi
21 18
 		done
22 19
 	fi
23 20
 	return 0

+ 1
- 1
modules/gentoo-compat.ezmod Datei anzeigen

@@ -7,7 +7,7 @@ EZMOD_VERSION="1.1"
7 7
 
8 8
 ezsync_precommit() {
9 9
 	printInfo "Enabling compatibility options..."
10
-	run "rm -rf ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/metadata/cache" || return 1
10
+	rm -rf ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/metadata/cache
11 11
 	echo "cache-formats = md5-dict pms" >> ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/metadata/layout.conf
12 12
 	echo "profile-formats = portage-1" >> ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/metadata/layout.conf
13 13
 	return 0

+ 6
- 6
modules/local-mirror.ezmod Datei anzeigen

@@ -6,18 +6,18 @@ EZMOD_AUTHOR="Rafal Kupiec"
6 6
 EZMOD_VERSION="1.0"
7 7
 
8 8
 ezsync_postcommit() {
9
-	if [ "${LOCALMIRROR_PATH}" != "" ]; then
9
+	if [ "${LOCALMIRRORPATH}" != "" ]; then
10 10
 		printInfo "Synchronizing local Portage mirror..."
11 11
 		if [ "$(toUpper ${PORTAGE_BUILD[1]})" != "GIT" ]; then
12 12
 			printWarn "Local mirror actually supports only GIT!"
13 13
 			return 0
14 14
 		fi
15
-		if [ -d ${LOCALMIRROR_PATH} ]; then
16
-			cd ${LOCALMIRROR_PATH}
17
-			run "su ${LOCALMIRROR_USER} -s \"/bin/sh\" -c \"git fetch --all\"" || return 1
15
+		if [ -d ${LOCALMIRRORPATH} ]; then
16
+			cd ${LOCALMIRRORPATH}
17
+			run "su ${LOCALMIRRORUSER} -s \"/bin/sh\" -c \"git fetch --all\"" || return 1
18 18
 		else
19
-			makeDirectory ${LOCALMIRROR_PATH}
20
-			run "su ${LOCALMIRROR_USER} -s \"/bin/sh\" -c \"git clone --mirror --bare ${PORTAGE_BUILD[2]} ${LOCALMIRROR_PATH}\"" || return 1
19
+			makeDirectory ${LOCALMIRRORPATH}
20
+			run "su ${LOCALMIRRORUSER} -s \"/bin/sh\" -c \"git clone --mirror --bare ${PORTAGE_BUILD[2]} ${LOCALMIRRORPATH}\"" || return 1
21 21
 		fi
22 22
 	fi
23 23
 	return 0

+ 4
- 4
modules/openrc-branding.ezmod Datei anzeigen

@@ -3,13 +3,13 @@
3 3
 EZMOD_DESCRIPTION="Allows to re-brand the sys-apps/openrc package"
4 4
 EZMOD_COMPATIBILITY="ezsync"
5 5
 EZMOD_AUTHOR="Rafal Kupiec"
6
-EZMOD_VERSION="1.0"
6
+EZMOD_VERSION="1.1"
7 7
 
8 8
 ezsync_precommit() {
9 9
 	printInfo "Enabling custom OpenRC branding..."
10
-	find ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/sys-apps/openrc -type f -name \*.ebuild | while read EBUILD; do
11
-		sed -i "s/BRANDING=\"Gentoo \${brand}\"/BRANDING=\"${CUSTOM_BRANDING} \${brand}\"/g" ${EBUILD} || return 1
10
+	while read EBUILD; do
11
+		sed -i "s/BRANDING=\"Gentoo \${brand}\"/BRANDING=\"${CUSTOMBRANDING} \${brand}\"/g" ${EBUILD} || return 1
12 12
 		run "ebuild ${EBUILD} manifest" || return 1
13
-	done
13
+	done < <(find ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/sys-apps/openrc -type f -name \*.ebuild)
14 14
 	return 0
15 15
 }

+ 3
- 3
modules/update-notification.ezmod Datei anzeigen

@@ -8,8 +8,8 @@ EZMOD_VERSION="1.0"
8 8
 ezsync_postcommit() {
9 9
 	local BUILDVER MAINLINEVER NEEDSUPDATE NEWER PACKAGE
10 10
 	local SENDMESG=0
11
-	if [ "${UPDATE_NOTIFY}" != "" ]; then
12
-		for PACKAGE in ${MUSTCHECK[*]}; do
11
+	if [ "${UPDATENOTIFY}" != "" ]; then
12
+		for PACKAGE in ${CHECKPACKAGES[*]}; do
13 13
 			makeCleanDirectory ${TRASHDIR}/ebuilds
14 14
 			makeDirectory ${TRASHDIR}/ebuilds/build
15 15
 			makeDirectory ${TRASHDIR}/ebuilds/mainline
@@ -28,7 +28,7 @@ ezsync_postcommit() {
28 28
 		done
29 29
 		rm -rf ${TRASHDIR}/ebuilds
30 30
 		if isEnabled ${SENDMSG}; then
31
-			echo "The following packages needs your attention, because they probably has been updated in mainline Portage tree: ${NEEDSUPDATE}" | mailx -s "Packages need an update!" ${UPDATE_NOTIFY}
31
+			echo "The following packages needs your attention, because they probably has been updated in mainline Portage tree: ${NEEDSUPDATE}" | mailx -s "Packages need an update!" ${UPDATENOTIFY}
32 32
 		fi
33 33
 	fi
34 34
 	return 0

Laden…
Abbrechen
Speichern