Skip to content

Commit

Permalink
Call RPM_CONFIGDIR just that consistently
Browse files Browse the repository at this point in the history
For whatever historical reasons RPMCONFIGDIR was used in automake
whereas the environment variable is RPM_CONFIGDIR. Just call it that
everywhere.
  • Loading branch information
pmatilai committed Mar 30, 2023
1 parent a2b4927 commit 97c9d89
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ option(WITH_AUDIT "Build with audit support" ON)
option(WITH_FSVERITY "Build with fsverity support" OFF)
option(WITH_IMAEVM "Build with IMA support" OFF)

set(RPMCONFIGDIR "${CMAKE_INSTALL_PREFIX}/lib/rpm" CACHE PATH "rpm home")
set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/lib/rpm" CACHE PATH "rpm home")
set(RPM_VENDOR "vendor" CACHE STRING "rpm vendor string")

# emulate libtool versioning
Expand Down Expand Up @@ -104,7 +104,7 @@ function(makemacros)
configure_file(rpm.pc.in rpm.pc @ONLY)

install(CODE "execute_process(COMMAND
${CMAKE_COMMAND} -E env pkglibdir=${RPMCONFIGDIR}
${CMAKE_COMMAND} -E env pkglibdir=${RPM_CONFIGDIR}
${CMAKE_SOURCE_DIR}/installplatform
rpmrc platform macros
${RPMCANONVENDOR} ${RPMCANONOS} ${RPMCANONGNU})"
Expand Down Expand Up @@ -368,11 +368,11 @@ install(TARGETS
rpm rpmdb rpmkeys rpm2cpio rpmsign rpmbuild rpmspec
rpmlua rpmgraph rpmsort
)
install(TARGETS elfdeps rpmdeps rpmuncompress DESTINATION ${RPMCONFIGDIR})
install(TARGETS elfdeps rpmdeps rpmuncompress DESTINATION ${RPM_CONFIGDIR})

makemacros()
foreach(f macros rpmrc rpmpopt-${PROJECT_VERSION})
install(FILES ${CMAKE_BINARY_DIR}/${f} DESTINATION ${RPMCONFIGDIR})
install(FILES ${CMAKE_BINARY_DIR}/${f} DESTINATION ${RPM_CONFIGDIR})
endforeach()

if (ENABLE_TESTSUITE)
Expand All @@ -386,8 +386,8 @@ if (ENABLE_TESTSUITE)
endif()

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rpm.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(DIRECTORY DESTINATION ${RPMCONFIGDIR}/lua)
install(DIRECTORY DESTINATION ${RPMCONFIGDIR}/macros.d)
install(DIRECTORY DESTINATION ${RPM_CONFIGDIR}/lua)
install(DIRECTORY DESTINATION ${RPM_CONFIGDIR}/macros.d)
install(FILES CONTRIBUTING.md COPYING CREDITS INSTALL README TYPE DOC)

function(add_tarball targetname namever treeish)
Expand Down
2 changes: 1 addition & 1 deletion fileattrs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ install(FILES
debuginfo.attr desktop.attr elf.attr font.attr metainfo.attr
perl.attr perllib.attr pkgconfig.attr ocaml.attr
rpm_macro.attr script.attr
DESTINATION ${RPMCONFIGDIR}/fileattrs
DESTINATION ${RPM_CONFIGDIR}/fileattrs
)
2 changes: 1 addition & 1 deletion macros.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/*! \page config_macros Default configuration: @RPMCONFIGDIR@/macros
#/*! \page config_macros Default configuration: @RPMHOME@/macros
# \verbatim
#
# This is a global RPM configuration file. All changes made here will
Expand Down
2 changes: 1 addition & 1 deletion rpm.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
rpmhome=@RPMCONFIGDIR@
rpmhome=@RPM_CONFIGDIR@

Name: @CMAKE_PROJECT_NAME@
Description: @CMAKE_PROJECT_DESCRIPTION@
Expand Down
2 changes: 1 addition & 1 deletion rpmio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ target_sources(librpmio PRIVATE
rpmver.c rpmstring.c rpmfileutil.c rpmglob.c rpmkeyring.c
rpmstrpool.c rpmmacro_internal.h rpmlua.c rpmlua.h lposix.c
)
target_compile_definitions(librpmio PRIVATE RPMCONFIGDIR="${RPMCONFIGDIR}")
target_compile_definitions(librpmio PRIVATE RPM_CONFIGDIR="${RPM_CONFIGDIR}")

if (WITH_INTERNAL_OPENPGP)
target_sources(librpmio PRIVATE rpmpgp_internal.h rpmpgp_internal.c)
Expand Down
2 changes: 1 addition & 1 deletion rpmio/rpmfileutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ int rpmMkdirs(const char *root, const char *pathstr)
static void setConfigDir(void)
{
char *rpmenv = getenv("RPM_CONFIGDIR");
rpm_config_dir = rpmenv ? xstrdup(rpmenv) : RPMCONFIGDIR;
rpm_config_dir = rpmenv ? xstrdup(rpmenv) : RPM_CONFIGDIR;
}

const char *rpmConfigDir(void)
Expand Down
2 changes: 1 addition & 1 deletion rpmpopt.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/*! \page config_rpmpopt Default configuration: @RPMCONFIGDIR@/rpmpopt-@PROJECT_VERSION@
#/*! \page config_rpmpopt Default configuration: @RPM_CONFIGDIR@/rpmpopt-@PROJECT_VERSION@
# \verbatim
#
# This file *should not be modified*. Local customizations
Expand Down
2 changes: 1 addition & 1 deletion rpmrc.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/*! \page config_rpmrc Default configuration: @RPMCONFIGDIR@/rpmrc
#/*! \page config_rpmrc Default configuration: @RPM_CONFIGDIR@/rpmrc
# \verbatim
#
# This is a global RPM configuration file. All changes made here will
Expand Down
4 changes: 2 additions & 2 deletions scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ install(PROGRAMS
rpm_macros_provides.sh
rpmdb_dump rpmdb_load
rpm2cpio.sh tgpg
DESTINATION ${RPMCONFIGDIR}
DESTINATION ${RPM_CONFIGDIR}
)
install(FILES
rpm.daily rpm.log rpm.supp
DESTINATION ${RPMCONFIGDIR}
DESTINATION ${RPM_CONFIGDIR}
)
4 changes: 2 additions & 2 deletions tests/atlocal.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fi
RPMTEST="${abs_builddir}/testing"
RPMDATA="${abs_srcdir}/data/"

RPM_CONFIGDIR="${RPMTEST}/@RPMCONFIGDIR@"
RPM_CONFIGDIR="${RPMTEST}/@RPM_CONFIGDIR@"
RPM_POPTEXEC_PATH="${RPMTEST}/@usrbindir@"
export RPM_CONFIGDIR RPM_POPTEXEC_PATH

Expand Down Expand Up @@ -84,7 +84,7 @@ function setup_env()
if [ -d testing ]; then
RPMTEST=${PWD}/testing
HOME=${RPMTEST}
RPM_CONFIGDIR=${RPMTEST}/@RPMCONFIGDIR@
RPM_CONFIGDIR=${RPMTEST}/@RPM_CONFIGDIR@
export RPMTEST HOME RPM_CONFIGDIR
fi
}
Expand Down

0 comments on commit 97c9d89

Please sign in to comment.