#947 Deprecate Old Style Dependency Generators
Closed by james. Opened by vondruch.
vondruch/packaging-committee deprecated-old-style-generators  into  master

Download 947.patch

The "old style dependency generators", also known as "the external dependency generators", are deprecated by RPM [1]. Therefore any occurrence of the old macros %filter_provides_in, %filter_requires_in, %filter_from_provides, %filter_from_requires together with %filter_setup MUST be replaced by their modern alternatives %__requires_exclude, %__requires_exclude_from, %__provides_exclude, %__provides_exclude_from.

rebased onto b2ee0c1a9b003d72f17e011f4f7bba41065f51cb

Please note that there is ~100 packages which are still using the %filter_setup:

$ grep -R -l filter_setup | sort 
audacious-plugins.spec
bluefish.spec
calamaris.spec
code-editor.spec
compizconfig-python.spec
cvs2cl.spec
debhelper.spec
dhcp.spec
dyninst.spec
eggdrop.spec
eiciel.spec
fcitx-qt5.spec
gfal2-python.spec
glusterfs.spec
gprbuild.spec
gr-osmosdr.spec
highlight.spec
hplip.spec
hypre.spec
Io-language.spec
ldns.spec
libcouchbase.spec
libdasm.spec
libfreenect.spec
libglvnd.spec
libkdegames4.spec
libkolabxml.spec
libpfm.spec
libvirt-python.spec
libxsmm.spec
mhonarc.spec
mod_authnz_pam.spec
mod_intercept_form_submit.spec
mod_lookup_identity.spec
mod_perl.spec
mod_wsgi.spec
nant.spec
nordugrid-arc.spec
omniORB.spec
opendbx.spec
openvas-scanner.spec
perl-Ace.spec
perl-AppConfig.spec
perl-Catalyst-Controller-FormBuilder.spec
perl-CGI-Prototype.spec
perl-DateTime-Precise.spec
perl-File-FnMatch.spec
perl-HTML-TreeBuilder-XPath.spec
perl-IO-InSitu.spec
perl-MooseX-Types-DateTimeX.spec
perl-Regexp-Grammars.spec
perl-Rose-DateTime.spec
perl-Rose-DB-Object.spec
perl-Rose-Object.spec
perl-Socket-Netlink-Route.spec
perl-Socket-Netlink.spec
perl-Template-Toolkit.spec
perl-Unicode-LineBreak.spec
perl-Wx.spec
php-pecl-couchbase2.spec
php-phpiredis.spec
php.spec
php-zmq.spec
portmidi.spec
purple-facebook.spec
pyicu.spec
pymilia.spec
PyPAM.spec
pysendfile.spec
pythia8.spec
python-apsw.spec
python-cups.spec
python-iptables.spec
python-logbook.spec
python-poppler-qt4.spec
python-sane.spec
python-signalfd.spec
python-smbc.spec
python-subvertpy.spec
python3-poppler-qt5.spec
qgis.spec
qpid-proton.spec
q.spec
rb_libtorrent.spec
scala.spec
scorep.spec
scribus.spec
scummvm.spec
shutter.spec
smokeping.spec
suil.spec
sympa.spec
uuid.spec
uwsgi.spec
vdr-femon.spec
vdr-osdteletext.spec
vdr-remote.spec
vdr-skinsoppalusikka.spec
veusz.spec
vym.spec
whatsup.spec
xapian-bindings.spec

Also, I think that at some point, we should consider replacing the above mentioned macros [1] by some empty stubs and phase them out at some point.

@pmatilai WDYT?

Just for some background, yesterday, I have spent one hour hunting for missing provides. As it turned out, this is because of the %{?filter_setup} [1], which as a side effect turns off the regular generators, we are using more and more these days. Moreover, I don't think that anybody knows why the macro is used there. Neither I think it serves its purpose, because AFAIK, the .so files are processed just in `%{_libdir}. So these macros very likely causes more harm these days then good and therefore we should deprecate and remove them ASAP.

Metadata Update from @churchyard:
- Pull-request tagged with: meeting

From this weeks meeting (https://meetbot-raw.fedoraproject.org/fedora-meeting-1/2020-05-14/fpc.2020-05-14-16.00.txt):

  • #pr-#947 Deprecate Old Style Dependency Generators (geppetto,
    16:39:51)
  • LINK: https://pagure.io/packaging-committee/pull-request/947
    (geppetto, 16:39:55)
  • LINK:
    https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/K3NLDLK4XVARTSROC6XVKNVW72BMMHYE/
    (mhroncok, 16:48:11)
  • ACTION: mhroncok to look at how python can get fixed for automatic
    lib provides (geppetto, 17:05:46)
  • ACTION: decathorpe will help mhroncok (geppetto, 17:07:33)
  • ACTION: tibbs agrees to fix everything else :) (geppetto, 17:14:27)
  • ACTION: turn the %filter macros to error to avoid silent failures,
    we ban them (+1:5, 0:0, -1:0) (geppetto, 17:17:20)

ACTION: mhroncok to look at how python can get fixed for automatic lib provides

https://github.com/rpm-software-management/rpm/issues/1227

Metadata Update from @churchyard:
- Pull-request untagged with: meeting

So it's been... quite some time since we looked at this one. I still a bunch ofpackages using %filter_setup but there are a number of false positives where the macro use is behind a conditional. A quick run over them shows the following 65:

code-editor.spec
debhelper.spec
dhcp.spec
dmlite.spec
dyninst.spec
eiciel.spec
fcitx-qt5.spec
gprbuild.spec
gr-osmosdr.spec
highlight.spec
hplip.spec
hypre.spec
Io-language.spec
ldns.spec
libcouchbase.spec
libdasm.spec
libkolabxml.spec
libpfm.spec
libpst.spec
libvirt-python.spec
libxsmm.spec
mod_authnz_pam.spec
mod_intercept_form_submit.spec
mod_lookup_identity.spec
mod_wsgi.spec
nant.spec
omniORB.spec
opendbx.spec
perl-AppConfig.spec
perl-Catalyst-Controller-FormBuilder.spec
perl-CGI-Prototype.spec
perl-DateTime-Precise.spec
perl-File-FnMatch.spec
perl-HTML-TreeBuilder-XPath.spec
perl-IO-InSitu.spec
perl-MooseX-Types-DateTimeX.spec
perl-Regexp-Grammars.spec
perl-Rose-DateTime.spec
perl-Rose-Object.spec
perl-Socket-Netlink-Route.spec
perl-Socket-Netlink.spec
perl-Template-Toolkit.spec
perl-Unicode-LineBreak.spec
perl-Wx.spec
php-phpiredis.spec
portmidi.spec
pyicu.spec
pymilia.spec
PyPAM.spec
python3-poppler-qt5.spec
python-apsw.spec
python-cups.spec
python-logbook.spec
python-sane.spec
python-signalfd.spec
python-smbc.spec
python-subvertpy.spec
q.spec
scribus.spec
scummvm.spec
smokeping.spec
veusz.spec
vym.spec
whatsup.spec
xapian-bindings.spec

I see some old perl things which probably just never got updated to use %perl_default_filter, and several python things filtering stuff under %python3_sitearch which I guess is still necessary since the rpm issue mentioned above didn't really go anywhere.

I guess it's time to do a more thorough walk through the list of packages, figure out what needs to change and then start working towards getting packages fixed before finally setting the macros to error out.

The idea of this PR was to deprecate the filters in guidelines first, so there is more stress on their removal (or that new package won't use them by accident). Trying to remove them first and follow with guidelines update is quite different feat and of course, the PR should be also different in that case.

Pretty sure all the docs. for the old style macros are gone now, so we don't need to warn not to use what isn't there.

Pull-Request has been closed by james

But those macros are still used by quite a lot of packages:

$ grep -R filter_setup | wc -l
86

Those packages are likely broken, because they disables the new generators. So it would still be useful to mention this.

There were also other parts elaborating about other macros, which would be better if they are removed from the guidelines.

Anyway, I have sent a note to fedora-devel

Metadata