Kaynağa Gözat

update modules

master
belliash 7 yıl önce
ebeveyn
işleme
d171637d42

+ 1
- 1
config/modules/baselayout-branding.conf Dosyayı Görüntüle

@@ -1,4 +1,4 @@
# 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
# name.
CUSTOM_BRANDING="MyOwn Base System"
CUSTOMBRANDING="MyOwn Base System"

+ 1
- 1
config/modules/custom-patches.conf Dosyayı Görüntüle

@@ -1,3 +1,3 @@
# 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=""
CUSTOMPATCHES=""

+ 2
- 2
config/modules/local-mirror.conf Dosyayı Görüntüle

@@ -1,7 +1,7 @@
# 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!
#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.
# This is useful when the local daemon is running with different permissions.
LOCALMIRROR_USER="root"
LOCALMIRRORUSER="root"

+ 1
- 1
config/modules/openrc-branding.conf Dosyayı Görüntüle

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

+ 2
- 2
config/modules/update-notification.conf Dosyayı Görüntüle

@@ -1,9 +1,9 @@
# 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
# 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
# will be send to. If this variable is empty, none notification will be sent at all, even
# if the modules is enabled.
UPDATE_NOTIFY=""
UPDATENOTIFY=""

+ 4
- 4
modules/baselayout-branding.ezmod Dosyayı Görüntüle

@@ -3,13 +3,13 @@
EZMOD_DESCRIPTION="Allows to re-brand the sys-apps/baselayout package"
EZMOD_COMPATIBILITY="ezsync"
EZMOD_AUTHOR="Rafal Kupiec"
EZMOD_VERSION="1.0"
EZMOD_VERSION="1.1"

ezsync_precommit() {
printInfo "Enabling custom BaseLayout branding..."
find ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/sys-apps/baselayout -type f -name \*.ebuild | while read EBUILD; do
sed -i "s/echo \"Gentoo Base System release/echo \"${CUSTOM_BRANDING}/g" ${EBUILD} || return 1
while read EBUILD; do
sed -i "s/echo \"Gentoo Base System release/echo \"${CUSTOMBRANDING}/g" ${EBUILD} || return 1
run "ebuild ${EBUILD} manifest" || return 1
done
done < <(find ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/sys-apps/baselayout -type f -name \*.ebuild)
return 0
}

+ 8
- 11
modules/custom-patches.ezmod Dosyayı Görüntüle

@@ -3,21 +3,18 @@
EZMOD_DESCRIPTION="Applies custom patches onto generated Portage tree"
EZMOD_COMPATIBILITY="ezsync"
EZMOD_AUTHOR="Rafal Kupiec"
EZMOD_VERSION="1.0"
EZMOD_VERSION="1.2"

ezsync_precommit() {
local PATCH PREFIX
if [ "${CUSTOM_PATCHES}" != "" ]; then
if [ "${CUSTOMPATCHES}" != "" ]; then
printInfo "Applying custom patches..."
for PATCH in ${CUSTOM_PATCHES}; do
for PREFIX in {0..4}; do
if run "patch -d \"${PORTAGESDIR}/${PORTAGE_BUILD[0]}\" --dry-run -p ${PREFIX} -i \"${PATCH}\" -s"; 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!"
return 1
fi
done
for PATCH in ${CUSTOMPATCHES}; do
applyPatch "${PORTAGESDIR}/${PORTAGE_BUILD[0]}" "${PATH}"
if [ ${?} -ne 0 ]; then
printError "Patch ${PATCH} does not fit!"
return 1
fi
done
fi
return 0

+ 1
- 1
modules/gentoo-compat.ezmod Dosyayı Görüntüle

@@ -7,7 +7,7 @@ EZMOD_VERSION="1.1"

ezsync_precommit() {
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 "profile-formats = portage-1" >> ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/metadata/layout.conf
return 0

+ 6
- 6
modules/local-mirror.ezmod Dosyayı Görüntüle

@@ -6,18 +6,18 @@ EZMOD_AUTHOR="Rafal Kupiec"
EZMOD_VERSION="1.0"

ezsync_postcommit() {
if [ "${LOCALMIRROR_PATH}" != "" ]; then
if [ "${LOCALMIRRORPATH}" != "" ]; then
printInfo "Synchronizing local Portage mirror..."
if [ "$(toUpper ${PORTAGE_BUILD[1]})" != "GIT" ]; then
printWarn "Local mirror actually supports only GIT!"
return 0
fi
if [ -d ${LOCALMIRROR_PATH} ]; then
cd ${LOCALMIRROR_PATH}
run "su ${LOCALMIRROR_USER} -s \"/bin/sh\" -c \"git fetch --all\"" || return 1
if [ -d ${LOCALMIRRORPATH} ]; then
cd ${LOCALMIRRORPATH}
run "su ${LOCALMIRRORUSER} -s \"/bin/sh\" -c \"git fetch --all\"" || return 1
else
makeDirectory ${LOCALMIRROR_PATH}
run "su ${LOCALMIRROR_USER} -s \"/bin/sh\" -c \"git clone --mirror --bare ${PORTAGE_BUILD[2]} ${LOCALMIRROR_PATH}\"" || return 1
makeDirectory ${LOCALMIRRORPATH}
run "su ${LOCALMIRRORUSER} -s \"/bin/sh\" -c \"git clone --mirror --bare ${PORTAGE_BUILD[2]} ${LOCALMIRRORPATH}\"" || return 1
fi
fi
return 0

+ 4
- 4
modules/openrc-branding.ezmod Dosyayı Görüntüle

@@ -3,13 +3,13 @@
EZMOD_DESCRIPTION="Allows to re-brand the sys-apps/openrc package"
EZMOD_COMPATIBILITY="ezsync"
EZMOD_AUTHOR="Rafal Kupiec"
EZMOD_VERSION="1.0"
EZMOD_VERSION="1.1"

ezsync_precommit() {
printInfo "Enabling custom OpenRC branding..."
find ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/sys-apps/openrc -type f -name \*.ebuild | while read EBUILD; do
sed -i "s/BRANDING=\"Gentoo \${brand}\"/BRANDING=\"${CUSTOM_BRANDING} \${brand}\"/g" ${EBUILD} || return 1
while read EBUILD; do
sed -i "s/BRANDING=\"Gentoo \${brand}\"/BRANDING=\"${CUSTOMBRANDING} \${brand}\"/g" ${EBUILD} || return 1
run "ebuild ${EBUILD} manifest" || return 1
done
done < <(find ${PORTAGESDIR}/${PORTAGE_BUILD[0]}/sys-apps/openrc -type f -name \*.ebuild)
return 0
}

+ 3
- 3
modules/update-notification.ezmod Dosyayı Görüntüle

@@ -8,8 +8,8 @@ EZMOD_VERSION="1.0"
ezsync_postcommit() {
local BUILDVER MAINLINEVER NEEDSUPDATE NEWER PACKAGE
local SENDMESG=0
if [ "${UPDATE_NOTIFY}" != "" ]; then
for PACKAGE in ${MUSTCHECK[*]}; do
if [ "${UPDATENOTIFY}" != "" ]; then
for PACKAGE in ${CHECKPACKAGES[*]}; do
makeCleanDirectory ${TRASHDIR}/ebuilds
makeDirectory ${TRASHDIR}/ebuilds/build
makeDirectory ${TRASHDIR}/ebuilds/mainline
@@ -28,7 +28,7 @@ ezsync_postcommit() {
done
rm -rf ${TRASHDIR}/ebuilds
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
return 0

Loading…
İptal
Kaydet