Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong bracketing of ldconfig_scriptlets with parameters #324

Open
djz88 opened this issue May 20, 2024 · 1 comment
Open

Wrong bracketing of ldconfig_scriptlets with parameters #324

djz88 opened this issue May 20, 2024 · 1 comment

Comments

@djz88
Copy link

djz88 commented May 20, 2024

Hi, using spec-cleaner 1.2.2. from PyPI I have found this weird behaviour. After I run
~/.local/bin/spec-cleaner --no-copyright libreport.spec -o libreport.spec2
It cleaned the spec file but build failed on rpmbuild:

[    4s] + exec rpmbuild --with bugzilla -ba --define '_srcdefattr (-,root,root)' --nosignature --undefine _enable_debug_packages /home/abuild/rpmbuild/SOURCES/libreport.spec
[    4s] error: line 417: Second %post

After investigation I had found the cause. Curly brackets were put right after "scriplets".

-%ldconfig_scriptlets
-%ldconfig_scriptlets web_2
-%ldconfig_scriptlets gtk_1
-%ldconfig_scriptlets -n libreport_2
+%{ldconfig_scriptlets}
+%{ldconfig_scriptlets} web_2
+%{ldconfig_scriptlets} gtk_1
+%{ldconfig_scriptlets} -n libreport_2

When moved after the arguments it passed build.

+%{ldconfig_scriptlets}
+%{ldconfig_scriptlets web_2}
+%{ldconfig_scriptlets gtk_1}
+%{ldconfig_scriptlets -n libreport_2}
@danigm
Copy link
Member

danigm commented May 21, 2024

I can't reproduce this in my tumbleweed installation, this macro is not embraced in my case because is part of rpm --showrc. https://github.com/rpm-software-management/spec-cleaner/blob/master/spec_cleaner/rpmcleaner.py#L168

If this is an usual case with different environments maybe we can add to the whitelist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants