Re: [Rpm-maint] [rpm-software-management/rpm] macros: Use /bin/bash instead of /bin/sh by default (PR #3490)

2024-12-18 Thread Matteo Croce
The shebang must reflect the type of script that are going to be run. If the scripts are 100% POSIX, then `/bin/sh` is correct, but if they use bashisms, it should point to `/bin/bash`, otherwise this won't work on systems when `/bin/sh` is not a link to `/bin/bash`, e.g. Debian, *BSD, other UNIX

Re: [Rpm-maint] [rpm-software-management/rpm] plugins: extend API to allow file install (PR #3466)

2024-12-02 Thread Matteo Croce
@pmatilai I went through the comments. Let's say I kill rpm2extents, and replace with another tool which reads the package from stdin, creates a directory like /var/cache/rpm/objects, and extracts every file with its hash as name. Then, save the metadata somewhere in a sort of db, and the install

Re: [Rpm-maint] [rpm-software-management/rpm] plugins: extend API to allow file install (PR #3466)

2024-11-22 Thread Matteo Croce
@teknoraver pushed 1 commit. 5494dfc0d80cbc64018b359e963a4937af55e0b8 plugins: extend API to allow file install -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3466/files/4502c2d444b074a5621bcac1cf6ea1e44ff96257..5494dfc0d80cbc64018b359e963a4937af55e0b8 You are receiv

[Rpm-maint] [rpm-software-management/rpm] plugins: extend API to allow file install (PR #3466)

2024-11-22 Thread Matteo Croce
Extend the plugin API with two new methods: - plugin_fsm_file_install_func - plugin_fsm_file_archive_reader_func The first one allows a plugin to take care of the file install, the second instead allows a plugin to handle the archive read. This is used in the "reflink" plugin which uses CoW to e

[Rpm-maint] [rpm-software-management/rpm] fix rpmdump output (PR #3428)

2024-11-05 Thread Matteo Croce
`rpmdump` prints the OS type fiels as architecture type. Print the correct value. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/3428 -- Commit Summary -- * fix rpmdump output -- File Changes -- M tools/rpmdump.cc (

[Rpm-maint] [rpm-software-management/rpm] RPM with Copy on Write (PR #3007)

2024-03-28 Thread Matteo Croce
This is part of https://fedoraproject.org/wiki/Changes/RPMCoW The majority of changes are in two new programs: ### rpm2extents Modeled as a 'stream processor'. It reads a regular .rpm file on stdin, and produces a modified .rpm file on stdout. The lead, signature and headers are preserved 1:1

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Make `%setup` work with archives regardless of inner structure (Issue #2664)

2024-02-02 Thread Matteo Croce
Done in #2859 -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2664#issuecomment-1923698654 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing l

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-02-02 Thread Matteo Croce
@teknoraver commented on this pull request. > @@ -22,6 +26,8 @@ static struct poptOption optionsTable[] = { N_("provide more detailed output"), NULL }, { "dry-run", 'n', POPT_ARG_VAL, &dryrun, 1, N_("only print what would be done"), NULL }, +{ "path", 'C', POPT_ARG_STRIN

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-02-02 Thread Matteo Croce
@teknoraver commented on this pull request. > @@ -22,6 +26,8 @@ static struct poptOption optionsTable[] = { N_("provide more detailed output"), NULL }, { "dry-run", 'n', POPT_ARG_VAL, &dryrun, 1, N_("only print what would be done"), NULL }, +{ "path", 'C', POPT_ARG_STRIN

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-02-02 Thread Matteo Croce
@teknoraver pushed 1 commit. ec9985bd9ea1e330d967988be8d279a18c902c5f add build directory auto path to %autosetup -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2859/files/638f6e55aab62c063146ad5a1f748c604398f8f6..ec9985bd9ea1e330d967988be8d279a18c902c5f You are rece

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-02-02 Thread Matteo Croce
Oops, I uploaded both the uncompressed .tar and the compressed .tar.gz by mistake. I'll remove the uncompressed in the new push. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2859#issuecomment-1923310778 You are receiving this because y

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-02-01 Thread Matteo Croce
@teknoraver pushed 1 commit. 7ec499b901958001dd587258d191acb9df761640 add build directory auto path to %autosetup -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2859/files/61abc03412741efe05730e5d2d405c155a9ceac4..7ec499b901958001dd587258d191acb9df761640 You are rece

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-01-31 Thread Matteo Croce
@teknoraver pushed 1 commit. 61abc03412741efe05730e5d2d405c155a9ceac4 add build directory auto path to %autosetup -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2859/files/170bfc9dcd8e04b5a6681a56dbaa9414f6d3a2a5..61abc03412741efe05730e5d2d405c155a9ceac4 You are rece

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-01-31 Thread Matteo Croce
What about adding those two archives in `tree/master/tests/data/SOURCES` and add a test to `tests/rpmbuild.at`? -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2859#issuecomment-1919422189 You are receiving this because you are subscribed

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-01-22 Thread Matteo Croce
@teknoraver commented on this pull request. > @@ -78,16 +84,81 @@ static char *doUncompress(const char *fn) return cmd; } +/** + * Detect if an archive has a single top level entry, and it's a directory. + * + * @param path path of the archive + * @return 1 if archive as only a direc

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-01-22 Thread Matteo Croce
@teknoraver pushed 1 commit. 170bfc9dcd8e04b5a6681a56dbaa9414f6d3a2a5 add build directory auto path to %autosetup -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2859/files/4817366827aa1ae0a9ed72c57a34872aa4e50744..170bfc9dcd8e04b5a6681a56dbaa9414f6d3a2a5 You are rece

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-01-22 Thread Matteo Croce
@teknoraver pushed 1 commit. c50d761a07872da8073a4fde11af0f2f1ddd2b01 add build directory auto path to %autosetup -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2859/files/fa5e4d372bc1ca9adac586050ef098161294fb02..c50d761a07872da8073a4fde11af0f2f1ddd2b01 You are rece

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-01-22 Thread Matteo Croce
@teknoraver commented on this pull request. > @@ -17,6 +17,7 @@ target_link_libraries(rpmlua PRIVATE LUA::LUA) target_link_libraries(rpmbuild PRIVATE librpmbuild) target_link_libraries(rpmspec PRIVATE librpmbuild) target_link_libraries(rpmdeps PRIVATE librpmbuild) +target_link_libraries(rpmun

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-01-22 Thread Matteo Croce
@teknoraver pushed 1 commit. fa5e4d372bc1ca9adac586050ef098161294fb02 add build directory auto path to %autosetup -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2859/files/8a6a1b73597487f1103994a9f796e00e7217be22..fa5e4d372bc1ca9adac586050ef098161294fb02 You are rece

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to setup step (PR #2859)

2024-01-19 Thread Matteo Croce
@teknoraver commented on this pull request. > @@ -17,6 +17,7 @@ target_link_libraries(rpmlua PRIVATE LUA::LUA) target_link_libraries(rpmbuild PRIVATE librpmbuild) target_link_libraries(rpmspec PRIVATE librpmbuild) target_link_libraries(rpmdeps PRIVATE librpmbuild) +target_link_libraries(rpmun

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to setup step (PR #2859)

2024-01-19 Thread Matteo Croce
@teknoraver pushed 1 commit. 270555dfa40b2f4f4ecdb002275d6e956832041f add build directory auto path to %autosetup -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2859/files/aed6cd0f9a69813c9b6f7937110eb4597620c91c..270555dfa40b2f4f4ecdb002275d6e956832041f You are rece

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to setup step (PR #2859)

2024-01-19 Thread Matteo Croce
@teknoraver commented on this pull request. > @@ -509,6 +509,9 @@ can just create the directory. It accepts a number of > options: -n DIR set the name of build directory (default is `%{name}-%{version}`) -T skip the default unpacking of the first source (used with `

[Rpm-maint] [rpm-software-management/rpm] add build directory auto path to setup step (PR #2859)

2024-01-19 Thread Matteo Croce
Implement RFE #2664 Add a `-p` flag to %setup which ensures that the sources will be extracted in the root of the build directory. It works by inspecting the archive and stripping the first path entry if the archive has a top level directory alone in the root. The archive inspection and path st

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Make `%setup` work with archives regardless of inner structure (Issue #2664)

2024-01-17 Thread Matteo Croce
I have a draft change in https://github.com/teknoraver/rpm/tree/libarchive2 Most of the work needed to be done in `rpmuncompress`, I added a `-p` flag which does the following: ``` $ tar vtf source-singleroot.tar.gz drwxr-xr-x root/root 0 2024-01-16 19:13 source-xx/ -rw-r--r-- roo

[Rpm-maint] [rpm-software-management/rpm] don't attempt to install html pages if they're not built (PR #2848)

2024-01-16 Thread Matteo Croce
On systems without Doxygen, html pages are not built, but the install fails with: Install the project... -- Install configuration: "" CMake Error at docs/cmake_install.cmake:51 (file): file INSTALL cannot find "/html": No such file or directory. Call Stac

Re: [Rpm-maint] [rpm-software-management/rpm] Add missing include (PR #2831)

2024-01-08 Thread Matteo Croce
This is a fresh boot of the Fedora arm64 image available for download here: https://fedora.mirrorservice.org/fedora/linux/releases/39/Workstation/aarch64/images/Fedora-Workstation-39-1.5.aarch64.raw.xz I'm using it only to build RPM in a VM (my host is an Apple ARM notebook) -- Reply to this em

Re: [Rpm-maint] [rpm-software-management/rpm] Add missing include (PR #2831)

2024-01-08 Thread Matteo Croce
Sure, this is what happens with a fresh clone: ``` teknoraver@fedora:~/src/rpm$ git reset --hard upstream/master HEAD is now at 75965c1e7 rpmcli.h forces a public dependency on popt includes teknoraver@fedora:~/src/rpm$ git clean -fdx Removing CMakeCache.txt Removing CMakeFiles/ teknoraver@fedora

Re: [Rpm-maint] [rpm-software-management/rpm] Add missing include (PR #2831)

2024-01-08 Thread Matteo Croce
I'm using Fedora 39: ``` $ cmake --version cmake version 3.27.7 ``` -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2831#issuecomment-1880801345 You are receiving this because you are subscribed to this thread. Message ID: ___

[Rpm-maint] [rpm-software-management/rpm] Add missing include (PR #2831)

2024-01-05 Thread Matteo Croce
The build fails because of a missing include in cmake: CMake Error at CMakeLists.txt:353 (check_symbol_exists): Unknown CMake command "check_symbol_exists". Include the needed file to fix the issue. You can view, comment on, or merge this pull request online at: https://github.com/rp

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Make `%setup` work with archives regardless of inner structure (Issue #2664)

2024-01-04 Thread Matteo Croce
In simple words the logic will be: if the archive contains a single entry extract it as is, otherwise create an entry like $name-$version? -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2664#issuecomment-1877537481 You are receiving th

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Make `%setup` work with archives regardless of inner structure (Issue #2664)

2024-01-04 Thread Matteo Croce
@Conan-Kudo how libarchive can help in detect if the archive needs to be extracted as is or in a subdirectory? Is there a]is some function to detect it, or we need to inspect the archive to see if the root entry has just one entry? -- Reply to this email directly or view it on GitHub: https://g