SIGs/KDE/Packaging/Cleanup

From FedoraProject

< SIGs | KDE
Jump to: navigation, search
Warning (medium size).png
This is under review
The new macros are not finalized and also not available in Fedora currently. Do not use these for packages yet.

Contents

Macros

Current Macros

Currently, the macros for KDE packaging are basic and still need directories appended to them constantly for files in KDE packages. Here is a table of the current macros provided:

Macro Definition Path Notes
 %{_kde4_prefix}  %{_prefix} /usr
 %{_kde4_sysconfdir}  %{_sysconfdir} /etc
 %{_kde4_libdir}  %{_libdir} /usr/lib[64]
 %{_kde4_libexecdir}  %{_libexecdir}/kde4 /usr/libexec/kde4
 %{_kde4_datadir}  %{_datadir} /usr/share
 %{_kde4_sharedir}  %{_datadir} /usr/share Why duplicate %{_kde4_datadir}?
 %{_kde4_iconsdir}  %{_kde4_sharedir}/icons /usr/share/icons
 %{_kde4_configdir}  %{_kde4_sharedir}/config /usr/share/config
 %{_kde4_appsdir}  %{_kde4_sharedir}/kde4/apps /usr/share/kde4/apps
 %{_kde4_docdir} /usr/share/doc /usr/share/doc Why is the definition not using a macro?
 %{_kde4_bindir}  %{_kde4_prefix}/bin /usr/bin Not %{_bindir}?
 %{_kde4_sbindir}  %{_kde4_prefix}/sbin /usr/sbin Not %{_sbindir}
 %{_kde4_includedir}  %{_kde4_prefix}/include/kde4 /usr/include/kde4 Not %{_includedir}/kde4 ?

Proposed macros

There are many directories that appear over and over in packaging KDE applications and libraries.

Directory Use Proposed Macro CMake variable Urgency Reason
 %{_kde4_docdir}/HTML HTML/API documentation  %{_kde4_htmldocdir} HTML_INSTALL_DIR medium Used mostly for any HTML documentation
 %{_kde4_datadir}/mime/packages xdg shared-mime-info standard files  %{_kde4_mimedir} XDG_MIME_INSTALL_DIR high Mimetype directory (xdg)
 %{_kde4_datadir}/applications/kde4 .desktop files for applications  %{_kde4_desktopdir} XDG_APPS_INSTALL_DIR high All applications need a .desktop file here (macro name could be better)
 %{_kde4_configdir}.kcfg KCFG files  %{_kde4_kcfgdir} KCFG_INSTALL_DIR high Most applications use KCFG for configuration
 %{_kde4_libdir}/kde4 KPlugin libraries  %{_kde4_plugindir} PLUGIN_INSTALL_DIR high Directory for KPlugin libraries
 %{_kde4_datadir}/kde4/services services for KDE apps (plugin metadata)  %{_kde4_servicesdir} SERVICES_INSTALL_DIR high Directory for KPlugin metadata
 %{_kde4_datadir}/kde4/servicetypes specs for types of services  %{_kde4_servicetypesdir} SERVICETYPES_INSTALL_DIR high Directory for KPlugin metadata
 %{_kde4_datadir}/dbus-1/interfaces DBus interface declarations  %{_kde4_dbusifacedir} DBUS_INTERFACES_INSTALL_DIR low Used outside KDE as well
 %{_kde4_datadir}/dbus-1/services DBus services  %{_kde4_dbusservicedir} DBUS_SERVICES_INSTALL_DIR low Used outside KDE as well
 %{_kde4_sysconfdir}/kde/env scripts for user login/creation low Not used often
 %{_kde4_sysconfdir}/kde/shutdown scripts to run on user logout low Not used often
 %{_kde4_appsdir}/kconf_update kconf update scripts  %{_kde4_kconfdir} KCONF_UPDATE_INSTALL_DIR low Not used often; kconf is known to not work 100% anyways
 %{_kde4_datadir}/autostart session start .desktop files AUTOSTART_INSTALL_DIR low Not used often
 %{_kde4_datadir}/sounds sounds (notifications)  %{_kde4_sounddir} SOUND_INSTALL_DIR medium Convenience; kde-look packages mainly
 %{_kde4_datadir}/mimelnk KDE3 mime data MIME_INSTALL_DIR low KDE3; why do KDE4 apps still use this?
 %{_kde4_datadir}/applnk unused? low Looks mostly unused, delete it altogether?
 %{_kde4_datadir}/emoticons emoticon directory  %{_kde4_emoticondir} medium Convenience; kde-look packages mainly
 %{_kde4_datadir}/templates templates directory  %{_kde4_templatedir} TEMPLATES_INSTALL_DIR medium Convenience; kde-look packages mainly

The old macros would become:

Macro Definition CMake variable
 %{_kde4_prefix}  %{_prefix} CMAKE_INSTALL_PREFIX
 %{_kde4_sysconfdir}  %{_sysconfdir} SYSCONF_INSTALL_DIR
 %{_kde4_libdir}  %{_libdir} LIB_INSTALL_DIR
 %{_kde4_libexecdir}  %{_libexecdir}/kde4 LIBEXEC_INSTALL_DIR
 %{_kde4_datadir}  %{_datadir} SHARE_INSTALL_DIR
 %{_kde4_iconsdir}  %{_kde4_datadir}/icons ICON_INSTALL_DIR
 %{_kde4_configdir}  %{_kde4_datadir}/config CONFIG_INSTALL_DIR
 %{_kde4_appsdir}  %{_kde4_datadir}/kde4/apps DATA_INSTALL_DIR
 %{_kde4_docdir}  %{_docdir} Not sure...can't find it
 %{_kde4_bindir}  %{_bindir} BIN_INSTALL_DIR
 %{_kde4_sbindir}  %{_sbindir} SBIN_INSTALL_DIR
 %{_kde4_includedir}  %{_includedir}/kde4 INCLUDE_INSTALL_DIR

Other CMake variable not represented by macros:

  • DATA_INSTALL_DIR (%{_kde4_datadir}/apps)
  • DEMO_INSTALL_DIR (%{_kde4_datadir}/demos)
  • LOCALE_INSTALL_DIR (%{_kde4_datadir}/locale)
  • WALLPAPER_INSTALL_DIR (%{_kde4_datadir}/wallpapers)
  • XDG_DIRECTORY_INSTALL_DIR (%{_kde4_datadir}/desktop-directories)
  • INFO_INSTALL_DIR (%{_kde4_datadir}/info)
  • MAN_INSTALL_DIR (%{_kde4_datadir}/man)

We will not bump the KDE macros API to 3 and force a rebuild of all KDE apps, as no such rebuild is required. If you want to ensure that your package gets built against a recent enough kde-filesystem, please just BR a minimum EVR of kde-filesystem.

In addition, there should be a macro to validate .desktop files since most KDE4 apps install these automatically. In order to conform to the guidelines, we should validate these files rather than manually installing each one and duplicating work.

%_kde4_validatedesktop \
    pushd %{buildroot} \
        for file in `find -name "*.desktop"`; do \
            desktop-file-validate $file; \
        done \
    popd

Process

Here is how the migration could work (KDE-SIG approval pending)

  • Include new macros in kde-filesystem
  • File bugs against KDE4 packages to use new macros. Possible bug text:
Note.png
Bug report text
The path macros for KDE4 have been updated so that more of the common directories are macros. The new macros are at <https://fedoraproject.org/wiki/SIGs/KDE/Packaging/Cleanup#Macros>. Please update the spec file to use these new macros and close this bug when all stable branches are updated. If it is not done by <some date>, provenpackager access will be used to use the new macros. Thank you for your cooperation.
  • If no response by (some date TBD), use provenpackager to use new macros.

Affected Packages and Status

Package Maintainer Bug filed? devel F-12 F-11 F-10
kde-filesystem KDE SIG
kdeaccessibility KDE SIG
kdeadmin KDE SIG
kdeartwork KDE SIG
kdebase KDE SIG
kdebase-runtime KDE SIG
kdebase-workspace KDE SIG
kdebindings KDE SIG
kdeedu KDE SIG
kdegames KDE SIG
kdegraphics KDE SIG
kdelibs KDE SIG
kdelibs-experimental KDE SIG
kdemultimedia KDE SIG
kdenetwork KDE SIG
kdepim KDE SIG
kdepimlibs KDE SIG
kdeplasma-addons KDE SIG
kdesdk KDE SIG
kde-settings KDE SIG
kdetoys KDE SIG
kdeutils KDE SIG
amarok abompard
audex liquidat
bespin jknife
bibletime anderson
bilbo mathstuf
choqok tejas
compiz krh
crystal chitlesh
digikam mgarski
filelight† nbecker
gnash kkofler
gtk-qt-engine rdieter
k3b† rrakus
kaffeine† rdieter
kchmviewer rdieter
kcoloredit svahl
kcometen4 nucleo
kdebluetooth arbiter
kde-plasma-ihatethecashew eliwap
kde-plasma-daisy†† <sievert>*
kde-plasma-networkmanagement mathstuf
kde-plasma-quickaccess jreznik
kde-plasma-runcommand jreznik
kde-plasma-stasks slankes
kde-plasma-translatoid eliwap
kde-plasma-weather kkofler
kde-plasma-yawp oget
kde-style-skulpture jreznik
kdesvn orion
kdevelop† than
kdevplatform mathstuf
kdewebdev† than
kdiff3 nbecker
keurocalc chitlesh
kio-ftps kreznik
kio_gopher kkofler
kgrab svahl
kgtk faucamp
kiconedit svahl
kid3 scop
kile† rdieter
kio_sysinfo than
kipi-plugins rdieter
kmess tuxbrewr
kmid svahl
kmplayer rdieter
kmymoney2† rdieter
kmymoney2-aqbanking† rdieter
knemo itamarjp
kobby mathstuf
koffice† awjb
konq-plugins svahl
konversation ausil
kopete-cryptography jreznik
kover adrian
kpackagekit tuxbrewr
kphotoalbum rdieter
kradio4 roma
krusader mgarski
ksig svahl
krename† mathstuf
ksshaskpass abompard
ktorrent liquidat
kvirc nucleo
kvkbd jreznik
mailody red
PolicyKit-kde than
polyester svahl
qalculate-kde† deji
quarticurve-kwin-theme kkofler
quassel tuxbrewr
rekonq kaboon
rkward pingou
rsibreak liquidat
sigen mathstuf
skanlite slankes
skrooge thomasj
smb4k mgarski
subtitlecomposer tuxbrewr
taglib-extras rdieter
tellico† jamatos
webkitkde nucleo
yakuake trasher

† KDE3 application to watch for KDE4 release †† Still under review

This list was generated with:

repoquery --whatrequires --alldeps --qf "%{sourcerpm}" kdelibs | sort | uniq

and under-review KDE4 apps added as well.