Skip to content

Commit

Permalink
Replace rpm2cpio by rpm2archive entirely
Browse files Browse the repository at this point in the history
Now that rpm2archive knows how to impersonate rpm2cpio when called by
that name, we can just drop the latter entirely. The one notable
behavior change is src.rpm contents now getting ./ prepended to the
paths. We could fixup for that too, but there's doesn't seem to be
any reason to bother.

It's crucial that we start steering people away from rpm2cpio because it
wont be able to deal with v6 content. cpio is obsolete even in POSIX now.
  • Loading branch information
pmatilai committed Nov 10, 2023
1 parent 3151a18 commit 833cd91
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 108 deletions.
4 changes: 2 additions & 2 deletions tests/rpmgeneral.at
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ RPMTEST_CHECK([
runroot_other rpm2cpio /data/SRPMS/hello-1.0-1.src.rpm | cpio -t --quiet
],
[0],
[hello-1.0.tar.gz
hello.spec
[./hello-1.0.tar.gz
./hello.spec
],
[])
RPMTEST_CLEANUP
Expand Down
10 changes: 8 additions & 2 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ add_library(cliutils OBJECT cliutils.c cliutils.h)
add_executable(rpm rpm.c cliutils)
add_executable(rpmdb rpmdb.c cliutils)
add_executable(rpmkeys rpmkeys.c cliutils)
add_executable(rpm2cpio rpm2cpio.c cliutils)
add_executable(rpmsign rpmsign.c cliutils)
add_executable(rpmbuild rpmbuild.c cliutils)
add_executable(rpmspec rpmspec.c cliutils)
Expand Down Expand Up @@ -48,8 +47,15 @@ foreach(cmd rpmverify rpmquery)
BYPRODUCTS ${cmd})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${cmd} TYPE BIN)
endforeach()
if (WITH_ARCHIVE)
add_custom_target(rpm2cpio ALL COMMAND
${CMAKE_COMMAND} -E create_symlink rpm2archive rpm2cpio
BYPRODUCTS rpm2cpio)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rpm2cpio TYPE BIN)
endif()

install(TARGETS
rpm rpmdb rpmkeys rpm2cpio rpmsign rpmbuild rpmspec
rpm rpmdb rpmkeys rpmsign rpmbuild rpmspec
rpmlua rpmgraph rpmsort
)
install(TARGETS elfdeps rpmdeps rpmuncompress DESTINATION ${RPM_CONFIGDIR})
Expand Down
104 changes: 0 additions & 104 deletions tools/rpm2cpio.c

This file was deleted.

0 comments on commit 833cd91

Please sign in to comment.