Index: Makefile
===================================================================
--- Makefile (nonexistent)
+++ Makefile (revision 5)
@@ -0,0 +1,491 @@
+
+COMPONENT_TARGETS = $(HARDWARE_INTEL_PC32)
+COMPONENT_TARGETS += $(HARDWARE_INTEL_PC64)
+COMPONENT_TARGETS += $(HARDWARE_EBOX_3350DX2)
+COMPONENT_TARGETS += $(HARDWARE_CB1X)
+COMPONENT_TARGETS += $(HARDWARE_CB2X)
+COMPONENT_TARGETS += $(HARDWARE_CB3X)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP2E)
+COMPONENT_TARGETS += $(HARDWARE_NANOPI_NEO)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PL2)
+COMPONENT_TARGETS += $(HARDWARE_WECHIP_TX6)
+COMPONENT_TARGETS += $(HARDWARE_FFRK3288)
+COMPONENT_TARGETS += $(HARDWARE_POIN2)
+COMPONENT_TARGETS += $(HARDWARE_RK3328_CC)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_EDGE)
+COMPONENT_TARGETS += $(HARDWARE_LEEZ_P710)
+COMPONENT_TARGETS += $(HARDWARE_M201)
+COMPONENT_TARGETS += $(HARDWARE_MXV)
+COMPONENT_TARGETS += $(HARDWARE_P201)
+COMPONENT_TARGETS += $(HARDWARE_NEXBOX_A95X)
+COMPONENT_TARGETS += $(HARDWARE_ODROID_C2)
+COMPONENT_TARGETS += $(HARDWARE_P212)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM)
+COMPONENT_TARGETS += $(HARDWARE_Q201)
+COMPONENT_TARGETS += $(HARDWARE_ENYBOX_X2)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM2)
+COMPONENT_TARGETS += $(HARDWARE_NIT6Q)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6DL_C)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6Q_C)
+COMPONENT_TARGETS += $(HARDWARE_BONE_BLACK)
+COMPONENT_TARGETS += $(HARDWARE_OMAP5UEVM)
+COMPONENT_TARGETS += $(HARDWARE_DRA7XXEVM)
+COMPONENT_TARGETS += $(HARDWARE_CI20)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_T1)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_M1)
+COMPONENT_TARGETS += $(HARDWARE_S824L)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN)
+COMPONENT_TARGETS += $(HARDWARE_S824L_LSB)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_SIFIVE_U740)
+
+
+NEED_ABS_PATH = true
+COMPONENT_IS_3PP = true
+
+
+include ../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES = sources/packages/b/mariadb
+
+REQUIRES = libs/pcre2/10.36
+REQUIRES += libs/libaio/0.3.112
+REQUIRES += libs/libarchive/3.5.2
+REQUIRES += libs/libevent/2.1.12
+REQUIRES += libs/readline/8.2
+REQUIRES += libs/boost/1.77.0
+REQUIRES += libs/liburing/2.1
+REQUIRES += libs/jemalloc/5.2.1
+REQUIRES += libs/judy/1.0.5
+REQUIRES += net/openssl/1.1.1r
+REQUIRES += net/krb5/1.19.1
+REQUIRES += net/curl/7.75.0
+REQUIRES += secure/cracklib/2.9.7
+REQUIRES += secure/pam/1.5.1
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version = 10.6.5
+tar_gz_archive = $(SRC_PACKAGE_PATH)/packages/b/mariadb/mariadb-$(version).tar.gz
+SRC_ARCHIVE = $(tar_gz_archive)
+SRC_DIR = $(TARGET_BUILD_DIR)/mariadb-$(version)
+src_dir_name = mariadb-$(version)
+src_done = $(TARGET_BUILD_DIR)/.source_done
+
+rc_mysqld = $(CURDIR)/etc/rc.d/rc.mysqld
+
+my_uid = 27
+my_gid = 27
+
+PATCHES = PATCHES
+
+build_target = $(TARGET_BUILD_DIR)/.build_done
+install_target = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = app
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+MARIADB_PKG_NAME = mariadb
+MARIADB_PKG_VERSION = 10.6.5
+MARIADB_PKG_ARCH = $(PKGARCH)
+MARIADB_PKG_DISTRO_NAME = $(DISTRO_NAME)
+MARIADB_PKG_DISTRO_VERSION = $(DISTRO_VERSION)
+MARIADB_PKG_GROUP = $(PKG_GROUP)
+### |---handy-ruler-------------------------------|
+MARIADB_PKG_SHORT_DESCRIPTION = the MySQL Database Server
+MARIADB_PKG_URL = $(BUG_URL)
+MARIADB_PKG_LICENSE = GPLv2
+MARIADB_PKG_DESCRIPTION_FILE = $(TARGET_BUILD_DIR)/$(MARIADB_PKG_NAME)-pkg-description
+MARIADB_PKG_DESCRIPTION_FILE_IN = $(MARIADB_PKG_NAME)-pkg-description.in
+MARIADB_PKG_INSTALL_SCRIPT = $(MARIADB_PKG_NAME)-pkg-install.sh
+
+MARIADB_PKG = $(CURDIR)/$(TARGET_BUILD_DIR)/$(MARIADB_PKG_NAME)-package
+
+pkg_basename = $(MARIADB_PKG_NAME)-$(MARIADB_PKG_VERSION)-$(MARIADB_PKG_ARCH)-$(MARIADB_PKG_DISTRO_NAME)-$(MARIADB_PKG_DISTRO_VERSION)
+
+pkg_archive = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_certificate = $(call cert-name,$(pkg_archive))
+pkg_signature = $(call sign-name,$(pkg_archive))
+pkg_description = $(call desc-name,$(pkg_archive))
+products = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS = $(build_target)
+BUILD_TARGETS += $(install_target)
+
+PRODUCT_TARGETS = $(products)
+
+ROOTFS_TARGETS = $(pkg_archive)
+
+
+include ../../../build-system/core.mk
+
+
+env_sysroot = DESTDIR=$(MARIADB_PKG)
+
+
+#
+# MariaDB cannot use CCACHE:
+# =========================
+# Therefore, we use the following workaround:
+#
+# We do not explicitly set the CMAKE_C_COMPILER variable,
+# but substituting CC from the Build-System environment gives
+# 'ccache gcc' and the variable CMAKE_C_COMPILER is set to
+# CMAKE_C_COMPILER=ccache. Next, we indicate the real path to
+# the compiler through the CMAKE_C_COMPILER_ARG1 variable.
+#
+# -DCMAKE_C_COMPILER='$(CROSS_PREFIX)gcc'
+# -DCMAKE_CXX_COMPILER='$(CROSS_PREFIX)g++'
+#
+
+configure_switches += -DCMAKE_C_COMPILER_ARG1='$(CROSS_PREFIX)gcc'
+configure_switches += -DCMAKE_CXX_COMPILER_ARG1='$(CROSS_PREFIX)g++'
+
+configure_switches += -DCMAKE_LINKER='$(CROSS_PREFIX)ld'
+configure_switches += -DCMAKE_AR='$(CROSS_PREFIX)ar'
+configure_switches += -DCMAKE_NM='$(CROSS_PREFIX)nm'
+configure_switches += -DCMAKE_ADDR2LINE='$(CROSS_PREFIX)addr2line'
+configure_switches += -DCMAKE_READELF='$(CROSS_PREFIX)readelf'
+configure_switches += -DCMAKE_RANLIB='$(CROSS_PREFIX)ranlib'
+configure_switches += -DCMAKE_OBJCOPY='$(CROSS_PREFIX)objcopy'
+configure_switches += -DCMAKE_OBJDUMP='$(CROSS_PREFIX)objdump'
+configure_switches += -DCMAKE_STRIP='$(CROSS_PREFIX)strip'
+
+configure_switches += -DCMAKE_C_COMPILER_AR='$(AR)'
+configure_switches += -DCMAKE_CXX_COMPILER_AR='$(AR)'
+configure_switches += -DCMAKE_C_COMPILER_RANLIB='$(RANLIB)'
+configure_switches += -DCMAKE_CXX_COMPILER_RANLIB='$(RANLIB)'
+
+suppress-warnings = -Wno-restrict -Wformat-overflow=0 -Wimplicit-fallthrough=0 -Wno-return-local-addr
+suppress-warnings += -Wno-stringop-truncation -Wstringop-overflow=0 -Wno-maybe-uninitialized
+
+configure_switches += -DCMAKE_C_FLAGS='--sysroot=$(TARGET_DEST_DIR) $(CFLAGS) $(ARCH_FLAGS) $(ARCH_DEFS) $(HW_FLAGS) -fPIC -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer -fno-delete-null-pointer-checks $(suppress-warnings)'
+configure_switches += -DCMAKE_CXX_FLAGS='--sysroot=$(TARGET_DEST_DIR) $(CFLAGS) $(ARCH_FLAGS) $(ARCH_DEFS) $(HW_FLAGS) -fPIC -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-delete-null-pointer-checks -Wno-range-loop-construct $(suppress-warnings)'
+
+ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_RISCV64_GLIBC)),)
+LDFLAGS += -latomic
+endif
+
+configure_switches += -DCMAKE_EXE_LINKER_FLAGS='--sysroot=$(TARGET_DEST_DIR) $(LDFLAGS)'
+configure_switches += -DCMAKE_SHARED_LINKER_FLAGS='--sysroot=$(TARGET_DEST_DIR) $(LDFLAGS)'
+configure_switches += -DCMAKE_MODULE_LINKER_FLAGS='--sysroot=$(TARGET_DEST_DIR) $(LDFLAGS)'
+
+configure_switches += -DCMAKE_BUILD_TYPE=RelWithDebInfo
+
+configure_switches += -DFEATURE_SET='community'
+configure_switches += -DINSTALL_LAYOUT='RPM'
+configure_switches += -DCMAKE_INSTALL_PREFIX=/usr
+configure_switches += -DINSTALL_LIBDIR='lib$(LIBSUFFIX)'
+configure_switches += -DINSTALL_PCDIR='lib$(LIBSUFFIX)/pkgconfig'
+configure_switches += -DINSTALL_SCRIPTDIR=bin
+configure_switches += -DINSTALL_SBINDIR=libexec
+configure_switches += -DINSTALL_INCLUDEDIR=include/mysql
+configure_switches += -DINSTALL_MYSQLSHAREDIR=share/mysql
+configure_switches += -DINSTALL_SQLBENCHDIR=
+configure_switches += -DINSTALL_MYSQLTESTDIR=share/mysql-test
+configure_switches += -DINSTALL_MANDIR=share/man
+configure_switches += -DINSTALL_PLUGINDIR='lib$(LIBSUFFIX)/mysql/plugin'
+configure_switches += -DINSTALL_SUPPORTFILESDIR=share/mysql
+configure_switches += -DINSTALL_MYSQLDATADIR='/var/lib/mysql'
+configure_switches += -DINSTALL_DOCREADMEDIR='share/doc/$(src_dir_name)'
+configure_switches += -DINSTALL_DOCDIR='share/doc/$(src_dir_name)'
+configure_switches += -DMYSQL_DATADIR='/var/lib/mysql'
+
+configure_switches += -DINSTALL_PAMDATADIR=/etc/security
+configure_switches += -DINSTALL_PAMDIR=/lib$(LIBSUFFIX)/security
+
+configure_switches += -DMYSQL_UNIX_ADDR='/var/run/mysql/mysql.sock'
+configure_switches += -DDEFAULT_CHARSET=utf8mb4
+configure_switches += -DDEFAULT_COLLATION=utf8mb4_general_ci
+configure_switches += -DWITH_EXTRA_CHARSETS=complex
+configure_switches += -DENABLED_LOCAL_INFILE=ON
+configure_switches += -DWITH_EMBEDDED_SERVER=YES
+
+configure_switches += -DWITH_LIBARCHIVE=ON
+configure_switches += -DWITH_READLINE=ON
+configure_switches += -DWITH_JEMALLOC=ON
+configure_switches += -DWITH_ZLIB=system
+configure_switches += -DWITH_EXTERNAL_ZLIB=ON
+configure_switches += -DWITH_ZSTD=system
+configure_switches += -DWITH_SSL=system
+configure_switches += -DWITH_PCRE=system
+
+configure_switches += -DWITH_SYSTEMD=no
+
+configure_switches += -DCONC_WITH_UNIT_TESTS=OFF
+configure_switches += -DWITH_UNIT_TESTS=OFF
+
+configure_switches += -DUSE_ARIA_FOR_TMP_TABLES=ON
+configure_switches += -DAWS_SDK_EXTERNAL_PROJECT=OFF
+
+configure_switches += -DCMAKE_CROSSCOMPILING='TRUE'
+configure_switches += -DCMAKE_SYSTEM_PROCESSOR=$(word 1,$(subst -, ,$(TARGET)))
+
+configure_switches += -DPYTHON_SHEBANG=$(PYTHON3)
+
+configure_switches += -DWITH_READLINE=ON
+configure_switches += -DWITH_LIBWRAP=OFF
+
+############################################################
+#
+# Extra settings:
+#
+configure_switches += -DJudy_INCLUDE_DIR=$(TARGET_DEST_DIR)/usr/include
+configure_switches += -DJudy_LIBRARIES=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libJudy.so
+configure_switches += -DKRB5_CONFIG=$(TARGET_DEST_DIR)/usr/bin/krb5-config
+configure_switches += -DLIBAIO_INCLUDE_DIR=$(TARGET_DEST_DIR)/usr/include
+configure_switches += -DLIBAIO_LIBRARIES=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libaio.so
+configure_switches += -DPAM_LIBRARY=$(TARGET_DEST_DIR)/lib$(LIBSUFFIX)/libpam.so
+
+configure_switches += -DBZIP2_INCLUDE_DIR=$(TARGET_DEST_DIR)/usr/include
+configure_switches += -DBZIP2_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libbz2.so
+configure_switches += -DZLIB_INCLUDE=$(TARGET_DEST_DIR)/usr/include
+configure_switches += -DZLIB_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libz.so
+configure_switches += -DZSTD_INCLUDE_DIR=$(TARGET_DEST_DIR)/usr/include
+configure_switches += -DZSTD_LIBRARIES=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libzstd.so
+configure_switches += -DURING_INCLUDE_DIR=$(TARGET_DEST_DIR)/usr/include
+configure_switches += -DURING_LIBRARIES=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/liburing.so
+
+configure_switches += -DCURSES_INCLUDE_PATH=$(TARGET_DEST_DIR)/usr/include
+configure_switches += -DCURSES_CURSES_LIBRARY=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libcurses.so
+configure_switches += -DCURSES_FORM_LIBRARY=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libform.so
+configure_switches += -DCURSES_NCURSES_LIBRARY=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libncurses.so
+
+configure_switches += -DOPENSSL_CRYPTO_LIBRARY=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libcrypto.so
+configure_switches += -DOPENSSL_INCLUDE_DIR=$(TARGET_DEST_DIR)/usr/include
+configure_switches += -DOPENSSL_SSL_LIBRARY=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libssl.so
+
+configure_switches += -DEVENT_LIBRARY=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libevent.so
+
+
+BOOST_VERSION = 1.77.0
+
+configure_switches += -DBoost_INCLUDE_DIR=$(TARGET_DEST_DIR)/usr/include
+configure_switches += -DBoost_DIR=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/cmake/Boost-$(BOOST_VERSION)
+configure_switches += -DBoost_ATOMIC_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libboost_atomic.so.$(BOOST_VERSION)
+configure_switches += -DBoost_CHRONO_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libboost_chrono.so.$(BOOST_VERSION)
+configure_switches += -DBoost_DATE_TIME_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libboost_date_time.so.$(BOOST_VERSION)
+configure_switches += -DBoost_FILESYSTEM_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libboost_filesystem.so.$(BOOST_VERSION)
+configure_switches += -DBoost_REGEX_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libboost_regex.so.$(BOOST_VERSION)
+configure_switches += -DBoost_SYSTEM_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libboost_system.so.$(BOOST_VERSION)
+configure_switches += -DBoost_THREAD_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/libboost_thread.so.$(BOOST_VERSION)
+
+configure_switches += -Dboost_atomic_DIR=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/cmake/boost_atomic-$(BOOST_VERSION)
+configure_switches += -Dboost_chrono_DIR=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/cmake/boost_chrono-$(BOOST_VERSION)
+configure_switches += -Dboost_date_time_DIR=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/cmake/boost_date_time-$(BOOST_VERSION)
+configure_switches += -Dboost_filesystem_DIR=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/cmake/boost_filesystem-$(BOOST_VERSION)
+configure_switches += -Dboost_headers_DIR=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/cmake/boost_headers-$(BOOST_VERSION)
+configure_switches += -Dboost_regex_DIR=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/cmake/boost_regex-$(BOOST_VERSION)
+configure_switches += -Dboost_system_DIR=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/cmake/boost_system-$(BOOST_VERSION)
+configure_switches += -Dboost_thread_DIR=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/cmake/boost_thread-$(BOOST_VERSION)
+#
+# End of Extra settings
+#
+############################################################
+
+configure_switches += -DPLUGIN_EXAMPLE=NO
+configure_switches += -DPLUGIN_FEDERATED=NO
+configure_switches += -DPLUGIN_FEEDBACK=NO
+
+configure_switches += -DWITH_INNOBASE_STORAGE_ENGINE=1
+
+build_switches = -DCMAKE_C_COMPILER='gcc'
+build_switches += -DCMAKE_CXX_COMPILER='g++'
+build_switches += -DCMAKE_C_FLAGS='-I/usr/include'
+build_switches += -DCMAKE_CXX_FLAGS='-I/usr/include'
+build_switches += -DCMAKE_INSTALL_PREFIX=/usr
+build_switches += -DINSTALL_LIBDIR='lib$(LIBSUFFIX)'
+build_switches += -DINSTALL_INCLUDEDIR='include/mysql'
+build_switches += -DINSTALL_PLUGINDIR='lib$(LIBSUFFIX)/mysql/plugin'
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+ $(UNPACK_SRC_ARCHIVE)
+ $(APPLY_PATCHES)
+ @touch $@
+
+$(build_target): $(src_done)
+ @mkdir -p $(SRC_DIR)/build-machine
+ @( cd $(SRC_DIR)/build-machine ; \
+ PKG_CONFIG_PATH= cmake $(build_switches) .. ; \
+ $(MAKE) import_executables ; \
+ $(MAKE) mariadb_config ; \
+ cp -a libmariadb/mariadb_config/mariadb_config $(TARGET)-mysql_config ; \
+ )
+ @mkdir -p $(SRC_DIR)/build-$(HARDWARE)
+ @( cd $(SRC_DIR)/build-$(HARDWARE) ; \
+ $(BUILD_ENVIRONMENT) cmake $(configure_switches) .. ; \
+ \
+ cp -a ../build-machine/extra/comp_err extra/$(TARGET)-comp_err ; \
+ sed -i 's, \./comp_err, \./$(TARGET)-comp_err,g' extra/CMakeFiles/GenError.dir/build.make ; \
+ \
+ cp -a ../build-machine/sql/gen_lex_hash sql/$(TARGET)-gen_lex_hash ; \
+ sed -i 's, \./gen_lex_hash, \./$(TARGET)-gen_lex_hash,g' sql/CMakeFiles/sql.dir/build.make ; \
+ sed -i 's, \./gen_lex_hash, \./$(TARGET)-gen_lex_hash,g' sql/CMakeFiles/GenServerSource.dir/build.make ; \
+ \
+ cp -a ../build-machine/sql/gen_lex_token sql/$(TARGET)-gen_lex_token ; \
+ sed -i 's, \./gen_lex_token, \./$(TARGET)-gen_lex_token,g' sql/CMakeFiles/sql.dir/build.make ; \
+ sed -i 's, \./gen_lex_token, \./$(TARGET)-gen_lex_token,g' sql/CMakeFiles/GenServerSource.dir/build.make ; \
+ \
+ cp -a ../build-machine/dbug/factorial dbug/$(TARGET)-factorial ; \
+ sed -i 's, \./factorial, \./$(TARGET)-factorial,g' dbug/CMakeFiles/user_t.dir/build.make ; \
+ sed -i 's, \./factorial, \./$(TARGET)-factorial,g' dbug/CMakeFiles/user_ps.dir/build.make ; \
+ \
+ cp -a ../build-machine/scripts/comp_sql scripts/$(TARGET)-comp_sql ; \
+ sed -i 's, $(CURDIR)/$(SRC_DIR)/build-$(HARDWARE)/scripts/comp_sql, \./$(TARGET)-comp_sql,g' scripts/CMakeFiles/GenFixPrivs.dir/build.make ; \
+ \
+ $(BUILD_ENVIRONMENT) $(MAKE) $(environment) ; \
+ )
+ @touch $@
+
+$(install_target): $(build_target)
+ @mkdir -p $(MARIADB_PKG)
+ @( cd $(SRC_DIR)/build-$(HARDWARE) ; \
+ $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot) ; \
+ )
+ # ======= Install mysql_config for development environment =======
+ @mkdir -p $(MARIADB_PKG)/usr/bin
+ @cp -a $(SRC_DIR)/build-machine/$(TARGET)-mysql_config $(MARIADB_PKG)/usr/bin
+ # ======= Install innotop =======
+ @install -m755 $(SRC_DIR)/debian/additions/innotop/innotop $(MARIADB_PKG)/usr/bin/
+ @install -m644 $(SRC_DIR)/debian/additions/innotop/innotop.1 $(MARIADB_PKG)/usr/share/man/man1/
+ # ======= Install mariadb-report =======
+ @install -m755 $(SRC_DIR)/debian/additions/mariadb-report $(MARIADB_PKG)/usr/bin/
+ @install -m644 $(SRC_DIR)/debian/additions/mariadb-report.1 $(MARIADB_PKG)/usr/share/man/man1/
+ifneq ($(__ENABLE_STATIC__),yes)
+ # ======= Remove large static libraries: =======
+ @rm -f $(MARIADB_PKG)/usr/lib$(LIBSUFFIX)/libmariadbclient.a
+ @rm -f $(MARIADB_PKG)/usr/lib$(LIBSUFFIX)/libmariadbd.a
+ @rm -f $(MARIADB_PKG)/usr/lib$(LIBSUFFIX)/libmysqlclient.a
+ @rm -f $(MARIADB_PKG)/usr/lib$(LIBSUFFIX)/libmysqlclient_r.a
+ @rm -f $(MARIADB_PKG)/usr/lib$(LIBSUFFIX)/libmysqld.a
+ @rm -f $(MARIADB_PKG)/usr/lib$(LIBSUFFIX)/libmysqlservices.a
+endif
+ # ======= Do not include the test suite =======
+ @rm -rf $(MARIADB_PKG)/usr/share/mysql-test
+ # ======= Install System Scripts =======
+ @mkdir -p $(MARIADB_PKG)/var/{lib,run}/mysql
+ @chmod 0750 $(MARIADB_PKG)/var/lib/mysql
+ @chmod 0755 $(MARIADB_PKG)/var/run/mysql
+ @mkdir -p $(MARIADB_PKG)/etc/rc.d
+ @cp -a $(rc_mysqld) $(MARIADB_PKG)/etc/rc.d/rc.mysqld.new
+ @chmod 0644 $(MARIADB_PKG)/etc/rc.d/rc.mysqld.new
+ @rm -rf $(MARIADB_PKG)/etc/init.d
+ @rm -f $(MARIADB_PKG)/usr/libexec/rcmysql
+ @install -m 644 $(SRC_DIR)/scripts/mysqlaccess.conf $(MARIADB_PKG)/etc/mysqlaccess.conf.new
+ @mv $(MARIADB_PKG)/etc/my.cnf $(MARIADB_PKG)/etc/my.cnf.new
+ @mv $(MARIADB_PKG)/etc/security/user_map.conf $(MARIADB_PKG)/etc/security/user_map.conf.new
+ @mv $(MARIADB_PKG)/etc/logrotate.d/mysql $(MARIADB_PKG)/etc/logrotate.d/mysql.new
+ @for i in client mysql-clients s3 server spider; do \
+ mv $(MARIADB_PKG)/etc/my.cnf.d/$$i.cnf $(MARIADB_PKG)/etc/my.cnf.d/$$i.cnf.new ; \
+ done
+ # ======= Install Documentation =======
+ @( cd $(MARIADB_PKG)/usr/share/man/man1 ; \
+ for file in *.1 ; do \
+ ln=`head -n 1 $$file` ; \
+ if [ "`echo $$ln | grep '^\.so '`" != "" ] ; then \
+ origin=`echo $$ln | cut -f 2 -d ' '` ; \
+ origin=`basename $$origin` ; \
+ rm -f $$file ; \
+ ln -sf $$origin $$file ; \
+ fi ; \
+ done ; \
+ )
+ @( cd $(MARIADB_PKG)/usr/share/man/man8 ; \
+ for file in *.8 ; do \
+ ln=`head -n 1 $$file` ; \
+ if [ "`echo $$ln | grep '^\.so '`" != "" ] ; then \
+ origin=`echo $$ln | cut -f 2 -d ' '` ; \
+ origin=`basename $$origin` ; \
+ rm -f $$file ; \
+ ln -sf $$origin $$file ; \
+ fi ; \
+ done ; \
+ )
+ @if [ -d $(MARIADB_PKG)/usr/share/man ]; then \
+ ( cd $(MARIADB_PKG)/usr/share/man ; \
+ for manpagedir in `find . -type d -name "man*"` ; do \
+ ( cd $$manpagedir ; \
+ for eachpage in `find . -type l -maxdepth 1` ; do \
+ ln -s `readlink $$eachpage`.gz $$eachpage.gz ; \
+ rm $$eachpage ; \
+ done ; \
+ gzip -9 *.? ; \
+ ) \
+ done \
+ ) \
+ fi
+ @mkdir -p $(MARIADB_PKG)/usr/doc/$(src_dir_name)
+ @cp -a $(SRC_DIR)/COPYING* \
+ $(MARIADB_PKG)/usr/doc/$(src_dir_name)
+ @( cd $(SRC_DIR) ; \
+ cp -a COPYING* INSTALL-SOURCE KNOWN_BUGS.txt README.md VERSION \
+ $(MARIADB_PKG)/usr/share/doc/$(src_dir_name) ; \
+ )
+ @( cd $(MARIADB_PKG)/usr/share ; \
+ for dir in groonga groonga-normalizer-mysql ; do \
+ if [ -d "$${dir}" ] ; then \
+ cp -a $${dir} doc/$(src_dir_name)/ ; \
+ rm -rf $${dir} ; \
+ fi ; \
+ done ; \
+ )
+ # ======= Install the same to $(TARGET_DEST_DIR) =======
+ $(call install-into-devenv, $(MARIADB_PKG))
+ # ======= Remove devenv mysql_config from target package =======
+ @rm -f $(MARIADB_PKG)/usr/bin/$(TARGET)-mysql_config
+ # ======= Tune pkg-config *.pc search path to the target destination for development =======
+ @( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/pkgconfig ; \
+ sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libmariadb.pc mariadb.pc ; \
+ )
+ # ======= Strip Binaries =======
+ @( cd $(MARIADB_PKG) ; \
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ )
+ifeq ($(__ENABLE_STATIC__),yes)
+ @( cd $(MARIADB_PKG); \
+ find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $(STRIP) -g 2> /dev/null ; \
+ )
+endif
+ @touch $@
+
+$(MARIADB_PKG_DESCRIPTION_FILE): $(MARIADB_PKG_DESCRIPTION_FILE_IN)
+ @cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_certificate) : $(pkg_archive) ;
+$(pkg_signature) : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(MARIADB_PKG_DESCRIPTION_FILE) $(MARIADB_PKG_INSTALL_SCRIPT)
+ @cp $(MARIADB_PKG_DESCRIPTION_FILE) $(MARIADB_PKG)/.DESCRIPTION
+ @cp $(MARIADB_PKG_INSTALL_SCRIPT) $(MARIADB_PKG)/.INSTALL
+ @$(BUILD_PKG_REQUIRES) $(MARIADB_PKG)/.REQUIRES
+ @echo "pkgname=$(MARIADB_PKG_NAME)" > $(MARIADB_PKG)/.PKGINFO ; \
+ echo "pkgver=$(MARIADB_PKG_VERSION)" >> $(MARIADB_PKG)/.PKGINFO ; \
+ echo "arch=$(MARIADB_PKG_ARCH)" >> $(MARIADB_PKG)/.PKGINFO ; \
+ echo "distroname=$(MARIADB_PKG_DISTRO_NAME)" >> $(MARIADB_PKG)/.PKGINFO ; \
+ echo "distrover=$(MARIADB_PKG_DISTRO_VERSION)" >> $(MARIADB_PKG)/.PKGINFO ; \
+ echo "group=$(MARIADB_PKG_GROUP)" >> $(MARIADB_PKG)/.PKGINFO ; \
+ echo "short_description=\"$(MARIADB_PKG_SHORT_DESCRIPTION)\"" >> $(MARIADB_PKG)/.PKGINFO ; \
+ echo "url=$(MARIADB_PKG_URL)" >> $(MARIADB_PKG)/.PKGINFO ; \
+ echo "license=$(MARIADB_PKG_LICENSE)" >> $(MARIADB_PKG)/.PKGINFO
+ @$(PSEUDO) sh -c "cd $(MARIADB_PKG) && \
+ chown -R root:root . && \
+ chown $(my_uid):$(my_gid) var/lib/mysql && \
+ chown $(my_uid):$(my_gid) var/run/mysql && \
+ $(MAKE_PACKAGE) -J --linkadd=yes $(GNUPG_OPTIONS) -m -d .. ."
Index: PATCHES
===================================================================
--- PATCHES (nonexistent)
+++ PATCHES (revision 5)
@@ -0,0 +1,2 @@
+
+../../../sources/packages/b/mariadb/patches/mariadb-10.6.5-system-cpu.patch -p0
Index: etc/rc.d/rc.mysqld
===================================================================
--- etc/rc.d/rc.mysqld (nonexistent)
+++ etc/rc.d/rc.mysqld (revision 5)
@@ -0,0 +1,87 @@
+#!/bin/sh
+# Start/stop/restart mysqld.
+#
+# Copyright 2003 Patrick J. Volkerding, Concord, CA
+# Copyright 2003 Slackware Linux, Inc., Concord, CA
+# Copyright 2008, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+#
+# This program comes with NO WARRANTY, to the extent permitted by law.
+# You may redistribute copies of this program under the terms of the
+# GNU General Public License.
+
+# To start MariaDB automatically at boot, be sure this script is executable:
+# chmod 755 /etc/rc.d/rc.mysqld
+
+# Before you can run MariaDB, you must have a database. To install an initial
+# database, do this as root:
+#
+# mysql_install_db --user=mysql
+#
+# Note that the mysql user must exist in /etc/passwd, and the created files
+# will be owned by this dedicated user. This is important, or else mysql
+# (which runs as user "mysql") will not be able to write to the database
+# later (this can be fixed with 'chown -R mysql.mysql /var/lib/mysql').
+#
+# To increase system security, consider using "mysql_secure_installation"
+# as well. For more information on this tool, please read:
+# man mysql_secure_installation
+
+# To allow outside connections to the database comment out the next line.
+# If you don't need incoming network connections, then leave the line
+# uncommented to improve system security.
+SKIP="--skip-networking"
+
+# Start mysqld:
+mysqld_start() {
+ if [ -x /usr/bin/mysqld_safe ]; then
+ # If there is an old PID file (no mysqld running), clean it up:
+ if [ -r /var/run/mysql/mysql.pid ]; then
+ if ! ps axc | grep mysqld 1> /dev/null 2> /dev/null ; then
+ echo "Cleaning up old /var/run/mysql/mysql.pid."
+ rm -f /var/run/mysql/mysql.pid
+ fi
+ fi
+
+ /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid $SKIP &
+ fi
+}
+
+# Stop mysqld:
+mysqld_stop() {
+ # If there is no PID file, ignore this request...
+ if [ -r /var/run/mysql/mysql.pid ]; then
+ PID=$(cat /var/run/mysql/mysql.pid)
+ kill $PID
+ # Wait at least one minute for it to exit, as we don't know how big the DB is...
+ for second in $(seq 0 60) ; do
+ if [ ! -r /var/run/mysql/mysql.pid ]; then
+ break;
+ fi
+ sleep 1
+ done
+ if [ "$second" = "60" ]; then
+ echo "WARNING: Gave up waiting for mysqld to exit!"
+ sleep 15
+ fi
+ fi
+}
+
+# Restart mysqld:
+mysqld_restart() {
+ mysqld_stop
+ mysqld_start
+}
+
+case "$1" in
+'start')
+ mysqld_start
+ ;;
+'stop')
+ mysqld_stop
+ ;;
+'restart')
+ mysqld_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac
Index: etc/rc.d
===================================================================
--- etc/rc.d (nonexistent)
+++ etc/rc.d (revision 5)
Property changes on: etc/rc.d
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: etc
===================================================================
--- etc (nonexistent)
+++ etc (revision 5)
Property changes on: etc
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: mariadb-pkg-description.in
===================================================================
--- mariadb-pkg-description.in (nonexistent)
+++ mariadb-pkg-description.in (revision 5)
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+mariadb: mariadb @VERSION@ (the MySQL Database Server)
+mariadb:
+mariadb: MariaDB is a backward compatible, drop-in replacement branch of the
+mariadb: MySQL(R) Database Server. It includes all major open source storage
+mariadb: engines, including the Aria storage engine.
+mariadb:
+mariadb: Homepage: https://mariadb.org
+mariadb:
+mariadb:
+mariadb:
+mariadb:
Index: mariadb-pkg-install.sh
===================================================================
--- mariadb-pkg-install.sh (nonexistent)
+++ mariadb-pkg-install.sh (revision 5)
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# Preserve new files
+install_file() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ # Keep same perms on rc.mysqld.new:
+ if [ -e etc/rc.d/rc.mysqld ]; then
+ cp -a etc/rc.d/rc.mysqld etc/rc.d/rc.mysqld.new.incoming
+ cat etc/rc.d/rc.mysqld.new > etc/rc.d/rc.mysqld.new.incoming
+ mv etc/rc.d/rc.mysqld.new.incoming etc/rc.d/rc.mysqld.new
+ fi
+
+ install_file etc/rc.d/rc.mysqld.new
+ install_file etc/mysqlaccess.conf.new
+ install_file etc/my.cnf.new
+ install_file etc/my.cnf.d/client.cnf.new
+ install_file etc/my.cnf.d/mysql-clients.cnf.new
+ install_file etc/my.cnf.d/s3.cnf.new
+ install_file etc/my.cnf.d/server.cnf.new
+ install_file etc/my.cnf.d/spider.cnf.new
+ install_file etc/logrotate.d/mysql.new
+ install_file etc/security/user_map.conf.new
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_update() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_update() {
+ post_install
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
Property changes on: mariadb-pkg-install.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: .
===================================================================
--- . (nonexistent)
+++ . (revision 5)
Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~