update modules
This commit is contained in:
parent
ad47a7b0ab
commit
d171637d42
|
@ -1,4 +1,4 @@
|
||||||
# This directive defines the new branding for BaseLayout package that will be set by the
|
# This directive defines the new branding for BaseLayout package that will be set by the
|
||||||
# baselayout-branding module. Usually this should be a string representing distribution
|
# baselayout-branding module. Usually this should be a string representing distribution
|
||||||
# name.
|
# name.
|
||||||
CUSTOM_BRANDING="MyOwn Base System"
|
CUSTOMBRANDING="MyOwn Base System"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# Specifies a list of patches that will be applied on generated Portage tree by the
|
# Specifies a list of patches that will be applied on generated Portage tree by the
|
||||||
# custom-patches module. Absolute paths to files are necessary!
|
# custom-patches module. Absolute paths to files are necessary!
|
||||||
CUSTOM_PATCHES=""
|
CUSTOMPATCHES=""
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# This specifies the local repository with the base path. This is the directory, where
|
# This specifies the local repository with the base path. This is the directory, where
|
||||||
# Portage mirror will be saved. Don't forget to uncomment this option!
|
# Portage mirror will be saved. Don't forget to uncomment this option!
|
||||||
#LOCALMIRROR_PATH="/path/to/portage-mirror.git"
|
#LOCALMIRRORPATH="/path/to/portage-mirror"
|
||||||
|
|
||||||
# Directive sets a username, that will be used to pull changes from remote repository.
|
# Directive sets a username, that will be used to pull changes from remote repository.
|
||||||
# This is useful when the local daemon is running with different permissions.
|
# This is useful when the local daemon is running with different permissions.
|
||||||
LOCALMIRROR_USER="root"
|
LOCALMIRRORUSER="root"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# This directive defines the new branding for OpenRC package that will be set by
|
# This directive defines the new branding for OpenRC package that will be set by
|
||||||
# openrc-branding module. Usually this should be a distribution name.
|
# openrc-branding module. Usually this should be a distribution name.
|
||||||
CUSTOM_BRANDING="MyOwn"
|
CUSTOMBRANDING="MyOwn"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# This array specifies a list of packages that will be checked for updates. If any from
|
# This array specifies a list of packages that will be checked for updates. If any from
|
||||||
# listed below is older than the one found in mainline Portage tree, the notification
|
# listed below is older than the one found in mainline Portage tree, the notification
|
||||||
# will be sent.
|
# will be sent.
|
||||||
MUSTCHECK=( "my-cat/package1" "my-cat2/package2" )
|
CHECKPACKAGES=( "my-cat/package1" "my-cat2/package2" )
|
||||||
|
|
||||||
# Specifies an e-mail address, where all notifications about packages that needs update
|
# Specifies an e-mail address, where all notifications about packages that needs update
|
||||||
# will be send to. If this variable is empty, none notification will be sent at all, even
|
# will be send to. If this variable is empty, none notification will be sent at all, even
|
||||||
# if the modules is enabled.
|
# if the modules is enabled.
|
||||||
UPDATE_NOTIFY=""
|
UPDATENOTIFY=""
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
EZMOD_DESCRIPTION="Allows to re-brand the sys-apps/baselayout package"
|
EZMOD_DESCRIPTION="Allows to re-brand the sys-apps/baselayout package"
|
||||||
EZMOD_COMPATIBILITY="ezsync"
|
EZMOD_COMPATIBILITY="ezsync"
|
||||||
EZMOD_AUTHOR="Rafal Kupiec"
|
EZMOD_AUTHOR="Rafal Kupiec"
|
||||||
EZMOD_VERSION="1.0"
|
EZMOD_VERSION="1.1"
|
||||||
|
|
||||||
ezsync_precommit() {
|
ezsync_precommit() {
|
||||||
printInfo "Enabling custom BaseLayout branding..."
|
printInfo "Enabling custom BaseLayout branding..."
|
||||||
find ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/sys-apps/baselayout -type f -name \*.ebuild | while read EBUILD; do
|
while read EBUILD; do
|
||||||
sed -i "s/echo \"Gentoo Base System release/echo \"${CUSTOM_BRANDING}/g" ${EBUILD} || return 1
|
sed -i "s/echo \"Gentoo Base System release/echo \"${CUSTOMBRANDING}/g" ${EBUILD} || return 1
|
||||||
run "ebuild ${EBUILD} manifest" || return 1
|
run "ebuild ${EBUILD} manifest" || return 1
|
||||||
done
|
done < <(find ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/sys-apps/baselayout -type f -name \*.ebuild)
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,22 +3,19 @@
|
||||||
EZMOD_DESCRIPTION="Applies custom patches onto generated Portage tree"
|
EZMOD_DESCRIPTION="Applies custom patches onto generated Portage tree"
|
||||||
EZMOD_COMPATIBILITY="ezsync"
|
EZMOD_COMPATIBILITY="ezsync"
|
||||||
EZMOD_AUTHOR="Rafal Kupiec"
|
EZMOD_AUTHOR="Rafal Kupiec"
|
||||||
EZMOD_VERSION="1.0"
|
EZMOD_VERSION="1.2"
|
||||||
|
|
||||||
ezsync_precommit() {
|
ezsync_precommit() {
|
||||||
local PATCH PREFIX
|
local PATCH PREFIX
|
||||||
if [ "${CUSTOM_PATCHES}" != "" ]; then
|
if [ "${CUSTOMPATCHES}" != "" ]; then
|
||||||
printInfo "Applying custom patches..."
|
printInfo "Applying custom patches..."
|
||||||
for PATCH in ${CUSTOM_PATCHES}; do
|
for PATCH in ${CUSTOMPATCHES}; do
|
||||||
for PREFIX in {0..4}; do
|
applyPatch "${PORTAGESDIR}/${PORTAGE_BUILD[0]}" "${PATH}"
|
||||||
if run "patch -d \"${PORTAGESDIR}/${PORTAGE_BUILD[0]}\" --dry-run -p ${PREFIX} -i \"${PATCH}\" -s"; then
|
if [ ${?} -ne 0 ]; then
|
||||||
run "patch -d \"${PORTAGESDIR}/${PORTAGE_BUILD[0]}\" -p ${PREFIX} -i \"${PATCH}\"" || return 1
|
|
||||||
elif [ ${PREFIX} -ge 4 ]; then
|
|
||||||
printError "Patch ${PATCH} does not fit!"
|
printError "Patch ${PATCH} does not fit!"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ EZMOD_VERSION="1.1"
|
||||||
|
|
||||||
ezsync_precommit() {
|
ezsync_precommit() {
|
||||||
printInfo "Enabling compatibility options..."
|
printInfo "Enabling compatibility options..."
|
||||||
run "rm -rf ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/metadata/cache" || return 1
|
rm -rf ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/metadata/cache
|
||||||
echo "cache-formats = md5-dict pms" >> ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/metadata/layout.conf
|
echo "cache-formats = md5-dict pms" >> ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/metadata/layout.conf
|
||||||
echo "profile-formats = portage-1" >> ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/metadata/layout.conf
|
echo "profile-formats = portage-1" >> ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/metadata/layout.conf
|
||||||
return 0
|
return 0
|
||||||
|
|
|
@ -6,18 +6,18 @@ EZMOD_AUTHOR="Rafal Kupiec"
|
||||||
EZMOD_VERSION="1.0"
|
EZMOD_VERSION="1.0"
|
||||||
|
|
||||||
ezsync_postcommit() {
|
ezsync_postcommit() {
|
||||||
if [ "${LOCALMIRROR_PATH}" != "" ]; then
|
if [ "${LOCALMIRRORPATH}" != "" ]; then
|
||||||
printInfo "Synchronizing local Portage mirror..."
|
printInfo "Synchronizing local Portage mirror..."
|
||||||
if [ "$(toUpper ${PORTAGE_BUILD[1]})" != "GIT" ]; then
|
if [ "$(toUpper ${PORTAGE_BUILD[1]})" != "GIT" ]; then
|
||||||
printWarn "Local mirror actually supports only GIT!"
|
printWarn "Local mirror actually supports only GIT!"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
if [ -d ${LOCALMIRROR_PATH} ]; then
|
if [ -d ${LOCALMIRRORPATH} ]; then
|
||||||
cd ${LOCALMIRROR_PATH}
|
cd ${LOCALMIRRORPATH}
|
||||||
run "su ${LOCALMIRROR_USER} -s \"/bin/sh\" -c \"git fetch --all\"" || return 1
|
run "su ${LOCALMIRRORUSER} -s \"/bin/sh\" -c \"git fetch --all\"" || return 1
|
||||||
else
|
else
|
||||||
makeDirectory ${LOCALMIRROR_PATH}
|
makeDirectory ${LOCALMIRRORPATH}
|
||||||
run "su ${LOCALMIRROR_USER} -s \"/bin/sh\" -c \"git clone --mirror --bare ${PORTAGE_BUILD[2]} ${LOCALMIRROR_PATH}\"" || return 1
|
run "su ${LOCALMIRRORUSER} -s \"/bin/sh\" -c \"git clone --mirror --bare ${PORTAGE_BUILD[2]} ${LOCALMIRRORPATH}\"" || return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
EZMOD_DESCRIPTION="Allows to re-brand the sys-apps/openrc package"
|
EZMOD_DESCRIPTION="Allows to re-brand the sys-apps/openrc package"
|
||||||
EZMOD_COMPATIBILITY="ezsync"
|
EZMOD_COMPATIBILITY="ezsync"
|
||||||
EZMOD_AUTHOR="Rafal Kupiec"
|
EZMOD_AUTHOR="Rafal Kupiec"
|
||||||
EZMOD_VERSION="1.0"
|
EZMOD_VERSION="1.1"
|
||||||
|
|
||||||
ezsync_precommit() {
|
ezsync_precommit() {
|
||||||
printInfo "Enabling custom OpenRC branding..."
|
printInfo "Enabling custom OpenRC branding..."
|
||||||
find ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/sys-apps/openrc -type f -name \*.ebuild | while read EBUILD; do
|
while read EBUILD; do
|
||||||
sed -i "s/BRANDING=\"Gentoo \${brand}\"/BRANDING=\"${CUSTOM_BRANDING} \${brand}\"/g" ${EBUILD} || return 1
|
sed -i "s/BRANDING=\"Gentoo \${brand}\"/BRANDING=\"${CUSTOMBRANDING} \${brand}\"/g" ${EBUILD} || return 1
|
||||||
run "ebuild ${EBUILD} manifest" || return 1
|
run "ebuild ${EBUILD} manifest" || return 1
|
||||||
done
|
done < <(find ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/sys-apps/openrc -type f -name \*.ebuild)
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,8 @@ EZMOD_VERSION="1.0"
|
||||||
ezsync_postcommit() {
|
ezsync_postcommit() {
|
||||||
local BUILDVER MAINLINEVER NEEDSUPDATE NEWER PACKAGE
|
local BUILDVER MAINLINEVER NEEDSUPDATE NEWER PACKAGE
|
||||||
local SENDMESG=0
|
local SENDMESG=0
|
||||||
if [ "${UPDATE_NOTIFY}" != "" ]; then
|
if [ "${UPDATENOTIFY}" != "" ]; then
|
||||||
for PACKAGE in ${MUSTCHECK[*]}; do
|
for PACKAGE in ${CHECKPACKAGES[*]}; do
|
||||||
makeCleanDirectory ${TRASHDIR}/ebuilds
|
makeCleanDirectory ${TRASHDIR}/ebuilds
|
||||||
makeDirectory ${TRASHDIR}/ebuilds/build
|
makeDirectory ${TRASHDIR}/ebuilds/build
|
||||||
makeDirectory ${TRASHDIR}/ebuilds/mainline
|
makeDirectory ${TRASHDIR}/ebuilds/mainline
|
||||||
|
@ -28,7 +28,7 @@ ezsync_postcommit() {
|
||||||
done
|
done
|
||||||
rm -rf ${TRASHDIR}/ebuilds
|
rm -rf ${TRASHDIR}/ebuilds
|
||||||
if isEnabled ${SENDMSG}; then
|
if isEnabled ${SENDMSG}; then
|
||||||
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}
|
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}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user