Re: [Rpm-maint] [rpm-software-management/rpm] Process scriplets by dependency generators (#1033)

2020-02-06 Thread mikhailnov
Ok, another hack is possible. I can make a macro ` %__scriptlets_directory`, create that directory inside the buildroot and copy scriptlets there. Then process them with a dependency generator. But, according to docs https://rpm.org/user_doc/dependency_generators.html , a generator cannot make

Re: [Rpm-maint] [rpm-software-management/rpm] Process scriplets by dependency generators (#1033)

2020-02-06 Thread mikhailnov
`rpmMkTempFile()` stores scriptlets in `%_tmppath` (`/var/tmp`), I have made a dependency generator which runs `ls /var/tmp`, it showed that there are no files with scriptlets in %_tmppath at that stage :-( I thought to process them via a generator as a hack. -- You are receiving this because

Re: [Rpm-maint] [rpm-software-management/rpm] Process scriplets by dependency generators (#1033)

2020-02-06 Thread mikhailnov
ALT's rpm-build does have this feature. I am unsecsessfully trying to find where and how they do it. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Process scriplets by dependency generators (#1033)

2020-02-06 Thread mikhailnov
> They do nothing as far as I know. I'm pretty sure those are just stubs. Thay seems to work, `build/build.c`. For me it is not very clear what code like `(void) fputs(buildPost, fp);` does. And I see that `doScript()` does create temporary files with scriptlets (`rpmMkTempFile()`). That is

Re: [Rpm-maint] [rpm-software-management/rpm] Process scriplets by dependency generators (#1033)

2020-02-05 Thread ニール・ゴンパ
They do nothing as far as I know. I'm pretty sure those are just stubs. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Process scriplets by dependency generators (#1033)

2020-02-05 Thread mikhailnov
``` macros.in:918:#%__spec_autodep_shell%{___build_shell} macros.in-919-#%__spec_autodep_args %{___build_args} macros.in-920-#%__spec_autodep_cmd %{___build_cmd} macros.in-921-#%__spec_autodep_pre %{___build_pre} macros.in-922-#%__spec_autodep_body %{___build_body}

Re: [Rpm-maint] [rpm-software-management/rpm] Process scriplets by dependency generators (#1033)

2020-02-04 Thread mikhailnov
Thanks for explaining. Very bad! I see that scriptlets are not treated as separate files there. Maybe it is possible to send scriptlet text to stdin of a generator? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Process scriplets by dependency generators (#1033)

2020-02-04 Thread ニール・ゴンパ
> Here I would appreceate pointing to code that generates dependencies by > shebangs for scriplets to see how it works. That's not code generation. The shebang is set as a program in macros or via `-p` and just pushed as `Requires(interp)` dependencies. -- You are receiving this because you

Re: [Rpm-maint] [rpm-software-management/rpm] Process scriplets by dependency generators (#1033)

2020-02-04 Thread mikhailnov
Here I would appreceate pointing to code that generates dependencies by shebangs for scriplets to see how it works. > Moreover, attempts to identify programs in shell scripts have been > problematic. If this identifies >50% of programs and does not produces a lot of unresolvable Requires,

Re: [Rpm-maint] [rpm-software-management/rpm] Process scriplets by dependency generators (#1033)

2020-02-04 Thread ニール・ゴンパ
It is not possible to evaluate scriptlets for dependencies and pushing that back into rpm. Dependency generators work off of evaluating files to generate dependencies leveraging specific content. Scriptlets generally lack this information. Moreover, attempts to identify programs in shell