Code changes, symlink files in embedded platforms

Code changes, symlink bundled files in embedded platforms, set file permissions.
This commit is contained in:
JRGTH
2025-09-17 03:37:11 -04:00
parent 4664d71f31
commit ba81b6943b
14 changed files with 43 additions and 31 deletions

View File

@@ -3,6 +3,7 @@
====================== ======================
Version Description Version Description
1.2.06......Code changes, symlink bundled files in embedded platforms.
1.2.05......Mount unionfs for pkg while fetching debootstrap packages. 1.2.05......Mount unionfs for pkg while fetching debootstrap packages.
1.2.04......Fix for missing variable affecting embedded platforms, thanks to tga. 1.2.04......Fix for missing variable affecting embedded platforms, thanks to tga.
1.2.03......Added post upgrade function for convenience, cleanup obsolete code. 1.2.03......Added post upgrade function for convenience, cleanup obsolete code.

View File

@@ -343,9 +343,13 @@ extension_upgrade()
create_addon_env() create_addon_env()
{ {
# Set bastille dir required permissions. # Set bastille dir/files required permissions.
chmod 0750 ${CWDIR} chmod 0750 ${CWDIR}
if [ -f "${CWDIR}/unionfs.sh" ]; then
chmod 0755 ${CWDIR}/unionfs.sh
fi
# Create required directories. # Create required directories.
if [ ! -d "${CWDIR}/backups" ]; then if [ ! -d "${CWDIR}/backups" ]; then
mkdir -p ${CWDIR}/backups mkdir -p ${CWDIR}/backups
@@ -448,35 +452,42 @@ include_files()
if [ "$(freebsd-version | cut -d '.' -f1)" -ge 12 ]; then if [ "$(freebsd-version | cut -d '.' -f1)" -ge 12 ]; then
sysrc -f ${CWDIR}${EXTCONF} VNET_ENABLE="YES" >/dev/null 2>&1 sysrc -f ${CWDIR}${EXTCONF} VNET_ENABLE="YES" >/dev/null 2>&1
# Include missing system files. # Include missing system files.
if [ ! -f "/usr/bin/ar" ]; then # Symlink the files in embedded platforms.
if [ -f "${SYSTEM_INCLUDE}/ar" ]; then USRBIN_FILES="ar diff3 makewhatis setfib sum"
install -m 0555 ${SYSTEM_INCLUDE}/ar /usr/bin/ar LOCALBIN_FILES="jib"
fi if [ "${PRDPLATFORM}" = "x64-embedded" ]; then
fi for _usrbin_file in ${USRBIN_FILES}; do
if [ ! -f "/usr/local/bin/jib" ]; then if [ -f "/usr/bin/${_usrbin_file}" ] && [ ! -L "/usr/bin/${_usrbin_file}" ]; then
if [ -f "${SYSTEM_INCLUDE}/jib" ]; then rm -r /usr/bin/${_usrbin_file}
install -m 0544 ${SYSTEM_INCLUDE}/jib /usr/local/bin/jib fi
fi if [ ! -f "/usr/bin/${_usrbin_file}" ]; then
fi chmod 0555 "${SYSTEM_INCLUDE}/${_usrbin_file}"
if [ ! -f "/usr/sbin/setfib" ]; then ln -fhs ${SYSTEM_INCLUDE}/${_usrbin_file} /usr/bin/${_usrbin_file}
if [ -f "${SYSTEM_INCLUDE}/setfib" ]; then fi
install -m 0555 ${SYSTEM_INCLUDE}/setfib /usr/sbin/setfib done
fi for _localbin_file in ${LOCALBIN_FILES}; do
fi if [ -f "/usr/local/bin/${_localbin_file}" ] && [ ! -L "/usr/local/bin/${_localbin_file}" ]; then
if [ ! -f "/usr/bin/sum" ]; then rm -r /usr/local/bin/${_localbin_file}
if [ -f "${SYSTEM_INCLUDE}/sum" ]; then fi
install -m 0555 ${SYSTEM_INCLUDE}/sum /usr/bin/sum if [ ! -f "/usr/bin/${_localbin_file}" ]; then
fi chmod 0555 "${SYSTEM_INCLUDE}/${_localbin_file}"
fi ln -fhs ${SYSTEM_INCLUDE}/${_localbin_file} /usr/local/bin/${_localbin_file}
if [ ! -f "/usr/bin/diff3" ]; then fi
if [ -f "${SYSTEM_INCLUDE}/diff3" ]; then done
install -m 0555 ${SYSTEM_INCLUDE}/diff3 /usr/bin/diff3 else
fi # Install the files in full platforms natively.
fi for _usrbin_file in ${USRBIN_FILES}; do
if [ ! -f "/usr/bin/makewhatis" ]; then if [ ! -f "/usr/bin/${_usrbin_file}" ]; then
if [ -f "${SYSTEM_INCLUDE}/makewhatis" ]; then install -m 0555 "${SYSTEM_INCLUDE}/${_usrbin_file}" /usr/bin/${_usrbin_file}
install -m 0555 ${SYSTEM_INCLUDE}/makewhatis /usr/bin/makewhatis fi
fi done
for _localbin_file in ${LOCALBIN_FILES}; do
if [ ! -f "/usr/local/bin/${_localbin_file}" ]; then
if [ -f "${SYSTEM_INCLUDE}/${_localbin_file}" ]; then
install -m 0544 ${SYSTEM_INCLUDE}/${_localbin_file} /usr/local/bin/${_localbin_file}
fi
fi
done
fi fi
else else
sysrc -f ${CWDIR}${EXTCONF} VNET_ENABLE="NO" >/dev/null 2>&1 sysrc -f ${CWDIR}${EXTCONF} VNET_ENABLE="NO" >/dev/null 2>&1

0
conf/system/freebsd-update/14.3/freebsd-update Normal file → Executable file
View File

0
conf/system/include/14.3/ar Normal file → Executable file
View File

0
conf/system/include/14.3/diff3 Normal file → Executable file
View File

0
conf/system/include/14.3/jib Normal file → Executable file
View File

0
conf/system/include/14.3/makewhatis Normal file → Executable file
View File

0
conf/system/include/14.3/pfctl Normal file → Executable file
View File

0
conf/system/include/14.3/pfilctl Normal file → Executable file
View File

0
conf/system/include/14.3/pflogd Normal file → Executable file
View File

0
conf/system/include/14.3/setfib Normal file → Executable file
View File

0
conf/system/include/14.3/sum Normal file → Executable file
View File

0
unionfs.sh Normal file → Executable file
View File

View File

@@ -1 +1 @@
1.2.05 1.2.06