Skip to content

Commit

Permalink
recipes: Undergo WORKDIR -> UNPACKDIR transition
Browse files Browse the repository at this point in the history
Signed-off-by: Khem Raj <raj.khem@gmail.com>
  • Loading branch information
kraj committed May 14, 2024
1 parent e46e89d commit 4864f53
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 29 deletions.
16 changes: 7 additions & 9 deletions meta-oe/recipes-dbs/mysql/mariadb.inc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ SRC_URI[sha256sum] = "5239a245ed90517e96396605cd01ccd8f73cd7442d1b3076b6ffe25811

UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases"

S = "${WORKDIR}/mariadb-${PV}"

BINCONFIG_GLOB = "mysql_config"

inherit cmake gettext binconfig update-rc.d systemd multilib_script pkgconfig
Expand Down Expand Up @@ -125,8 +123,8 @@ do_configure:append() {
do_generate_toolchain_file:append:class-native () {
# If these are set cmake will assume we're cross-compiling, which will
# result in certain things we want being disabled
sed -i "/set( CMAKE_SYSTEM_NAME/d" ${WORKDIR}/toolchain.cmake
sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake
sed -i "/set( CMAKE_SYSTEM_NAME/d" ${UNPACKDIR}/toolchain.cmake
sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${UNPACKDIR}/toolchain.cmake
}


Expand Down Expand Up @@ -163,18 +161,18 @@ do_install() {
oe_runmake 'DESTDIR=${D}' install

install -d ${D}/${sysconfdir}/init.d
install -m 0644 ${WORKDIR}/my.cnf ${D}/${sysconfdir}/
install -m 0755 ${WORKDIR}/install_db ${D}/${sysconfdir}/init.d/
install -m 0644 ${UNPACKDIR}/my.cnf ${D}/${sysconfdir}/
install -m 0755 ${UNPACKDIR}/install_db ${D}/${sysconfdir}/init.d/
mv ${D}/${sysconfdir}/init.d/mysql ${D}/${sysconfdir}/init.d/mysqld

install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/mysqld.service ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/install_db.service ${D}${systemd_unitdir}/system
install -m 0644 ${UNPACKDIR}/mysqld.service ${D}${systemd_unitdir}/system
install -m 0644 ${UNPACKDIR}/install_db.service ${D}${systemd_unitdir}/system
sed -i -e 's,@BINDIR@,${bindir},g' -e 's,@PREFIX@,${prefix},g' ${D}${systemd_unitdir}/system/mysqld.service \
${D}${systemd_unitdir}/system/install_db.service

install -d ${D}${bindir}
install -m 755 ${WORKDIR}/mysql-systemd-start ${D}${bindir}
install -m 755 ${UNPACKDIR}/mysql-systemd-start ${D}${bindir}
install -d ${D}${datadir}/doc/${PN}
if [ -f ${D}${datadir}/doc/README ]; then
mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/
Expand Down
10 changes: 5 additions & 5 deletions meta-oe/recipes-dbs/postgresql/postgresql.inc
Original file line number Diff line number Diff line change
Expand Up @@ -198,24 +198,24 @@ do_install:append() {

# install dirs and server init
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/${BPN}.init ${D}${sysconfdir}/init.d/${BPN}-server
install -m 0755 ${UNPACKDIR}/${BPN}.init ${D}${sysconfdir}/init.d/${BPN}-server
sed -i -e "s/^PGVERSION=.*$/PGVERSION=${PV}/g" ${D}${sysconfdir}/init.d/${BPN}-server
install -m 0755 ${WORKDIR}/${BPN}-setup ${D}${bindir}/${BPN}-setup
install -m 0755 ${UNPACKDIR}/${BPN}-setup ${D}${bindir}/${BPN}-setup
install -d -m 700 ${D}${localstatedir}/lib/${BPN}/data
install -d -m 700 ${D}${localstatedir}/lib/${BPN}/backups
install -m 644 ${WORKDIR}/${BPN}-profile ${D}${localstatedir}/lib/${BPN}/.profile
install -m 644 ${UNPACKDIR}/${BPN}-profile ${D}${localstatedir}/lib/${BPN}/.profile
chown -R postgres:postgres ${D}${localstatedir}/lib/${BPN}
# multiple server config directory
install -d -m 700 ${D}${sysconfdir}/default/${BPN}

if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/pam.d
install -m 644 ${WORKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql
install -m 644 ${UNPACKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql
fi

# Install systemd unit files
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/postgresql.service ${D}${systemd_unitdir}/system
install -m 0644 ${UNPACKDIR}/postgresql.service ${D}${systemd_unitdir}/system
sed -i -e 's,@BINDIR@,${bindir},g' \
${D}${systemd_unitdir}/system/postgresql.service
# Remove the build path
Expand Down
6 changes: 3 additions & 3 deletions meta-oe/recipes-extended/redis/redis_7.2.4.bb
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ do_install() {
export PREFIX=${D}/${prefix}
oe_runmake install
install -d ${D}/${sysconfdir}/redis
install -m 0644 ${WORKDIR}/redis.conf ${D}/${sysconfdir}/redis/redis.conf
install -m 0644 ${UNPACKDIR}/redis.conf ${D}/${sysconfdir}/redis/redis.conf
install -d ${D}/${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init-redis-server ${D}/${sysconfdir}/init.d/redis-server
install -m 0755 ${UNPACKDIR}/init-redis-server ${D}/${sysconfdir}/init.d/redis-server
install -d ${D}/var/lib/redis/
chown redis.redis ${D}/var/lib/redis/

install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/redis.service ${D}${systemd_system_unitdir}
install -m 0644 ${UNPACKDIR}/redis.service ${D}${systemd_system_unitdir}
sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_system_unitdir}/redis.service

if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
Expand Down
8 changes: 4 additions & 4 deletions meta-oe/recipes-extended/rsyslog/rsyslog_8.2404.0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ do_install_ptest() {
do_install:append() {
install -d "${D}${sysconfdir}/init.d"
install -d "${D}${sysconfdir}/logrotate.d"
install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog
install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog
install -m 755 ${UNPACKDIR}/initscript ${D}${sysconfdir}/init.d/syslog
install -m 644 ${UNPACKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
install -m 644 ${UNPACKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog
sed -i -e "s#@BINDIR@#${bindir}#g" ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog

if ${@bb.utils.contains('PACKAGECONFIG', 'imjournal', 'true', 'false', d)}; then
Expand All @@ -152,7 +152,7 @@ do_install:append() {
fi
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/rsyslog.service ${D}${systemd_system_unitdir}
install -m 644 ${UNPACKDIR}/rsyslog.service ${D}${systemd_system_unitdir}
sed -i -e "s,@sbindir@,${sbindir},g" ${D}${systemd_system_unitdir}/rsyslog.service
fi
}
Expand Down
2 changes: 1 addition & 1 deletion meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ inherit autotools pkgconfig ptest

EXTRA_OECONF = "--with-kernel=${STAGING_DIR_HOST}${prefix} --without-x ac_cv_prog_XSLTPROC="
do_configure () {
cp ${WORKDIR}/acinclude.m4 ${S}/
cp ${UNPACKDIR}/acinclude.m4 ${S}/
autotools_do_configure
}

Expand Down
2 changes: 1 addition & 1 deletion meta-oe/recipes-support/c-ares/c-ares_1.27.0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ EXTRA_OECMAKE = "-DCARES_STATIC=${@ 'ON' if d.getVar('DISABLE_STATIC') == '' els
do_install_ptest () {
install -d ${D}${PTEST_PATH}
install -m 0755 ${B}/bin/arestest ${D}${PTEST_PATH}
install -m 0755 ${WORKDIR}/run-ptest ${D}${PTEST_PATH}
install -m 0755 ${UNPACKDIR}/run-ptest ${D}${PTEST_PATH}
}

PACKAGE_BEFORE_PN = "${PN}-utils"
Expand Down
2 changes: 1 addition & 1 deletion meta-oe/recipes-support/libee/libee.inc
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ do_install_ptest() {
install -d ${D}${PTEST_PATH}
install -m 0755 ${B}/${TESTDIR}/genfile ${D}${PTEST_PATH}
install -m 0755 ${B}/${TESTDIR}/.libs/ezapi1 ${D}${PTEST_PATH}
install -m 0755 ${WORKDIR}/ezapi1.sh ${D}${PTEST_PATH}
install -m 0755 ${UNPACKDIR}/ezapi1.sh ${D}${PTEST_PATH}
}
2 changes: 1 addition & 1 deletion meta-oe/recipes-support/nspr/nspr_4.35.bb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ do_compile:append() {
}

do_install:append() {
install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
install -D ${UNPACKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
sed -i \
-e 's:NSPRVERSION:${PV}:g' \
-e 's:OEPREFIX:${prefix}:g' \
Expand Down
8 changes: 4 additions & 4 deletions meta-oe/recipes-support/nss/nss_3.98.bb
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ do_install:append() {
done

install -d ${D}${libdir}/pkgconfig/
sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
sed 's/%NSS_VERSION%/${PV}/' ${UNPACKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc
sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
Expand All @@ -239,9 +239,9 @@ do_install:append:class-target() {
# databases by:
# certutil -N -d sql:/database/path/ --empty-password
install -d ${D}${sysconfdir}/pki/nssdb/
install -m 0644 ${WORKDIR}/blank-cert9.db ${D}${sysconfdir}/pki/nssdb/cert9.db
install -m 0644 ${WORKDIR}/blank-key4.db ${D}${sysconfdir}/pki/nssdb/key4.db
install -m 0644 ${WORKDIR}/system-pkcs11.txt ${D}${sysconfdir}/pki/nssdb/pkcs11.txt
install -m 0644 ${UNPACKDIR}/blank-cert9.db ${D}${sysconfdir}/pki/nssdb/cert9.db
install -m 0644 ${UNPACKDIR}/blank-key4.db ${D}${sysconfdir}/pki/nssdb/key4.db
install -m 0644 ${UNPACKDIR}/system-pkcs11.txt ${D}${sysconfdir}/pki/nssdb/pkcs11.txt
}

PACKAGE_WRITE_DEPS += "nss-native"
Expand Down

0 comments on commit 4864f53

Please sign in to comment.