Description of problem: [root@localhost ~]# env LANG=C repoquery --disablerepo=\* --enablerepo=koji-13 --whatprovides '/var/lib/rpm-state' [root@localhost ~]# env LANG=C repoquery --disablerepo=\* --enablerepo=koji-13 --whatprovides '/var/lib/rpm-state/*' GConf2-0:2.28.0-9.fc13.i686 i.e. GConf2 owns /var/lib/rpm-state/gconf, however /var/lib/rpm-state is not owned by any packages. With at least F-13 rpm, this time of directories with missing owners are always created with 0755 so not a big issue, however on F-11 (rpm-4.7.2-1.fc11) this may cause permission error.
CC-ing to spot, as this is related to scriptlets packaging guidelines. By the way, with gconf2 macros introduced in GConf2, trying to use these macros will cause unpleasant result without "BR: GConf2". see: http://koji.fedoraproject.org/koji/taskinfo?taskID=2060393 http://koji.fedoraproject.org/scratch/mtasaka/task_2060393/ I think "BuildRequires: GConf2" must be added to gconf2 scriptlets guideline.
(In reply to comment #0) > With at least F-13 rpm, this time of directories with Actually "this type of directories"
Looking through those logs, I do not see the problem. Those macros should only need to be evaluated in scriptlets (%pre/%post/%preun), so the Requires(pre): GConf2 , Requires(post): GConf2, and Requires(preun): GConf2 should be all that is needed. I'm not sure what unpleasant results arise from not having GConf2 in the BuildRoot during build, could you be more specific?
If you download http://koji.fedoraproject.org/scratch/mtasaka/task_2060393/comix-4.0.4-2.3.fc13.noarch.rpm This returns: $ rpm -qp --scripts comix-4.0.4-2.3.fc13.noarch.rpm preinstall scriptlet (using /bin/sh): %gconf_schema_prepare comix exit 0 postinstall scriptlet (using /bin/sh): %gconf_schema_upgrade comix touch --no-create /usr/share/icons/hicolor update-desktop-database &> /dev/null update-mime-database /usr/share/mime &> /dev/null exit 0 preuninstall scriptlet (using /bin/sh): %gconf_schema_remove comix exit 0 postuninstall scriptlet (using /bin/sh): update-desktop-database &> /dev/null update-mime-database /usr/share/mime &> /dev/null [ $1 -eq 0 ] || exit 0 touch --no-create /usr/share/icons/hicolor /usr/bin/gtk-update-icon-cache --quiet /usr/share/icons/hicolor exit 0 posttrans scriptlet (using /bin/sh): /usr/bin/gtk-update-icon-cache --quiet /usr/share/icons/hicolor exit 0 Note that %gconf_... macros are left unexpanded.
You would only have that problem where GConf2 doesn't include the macros (a non-updated system). On my system with the latest GConf2 (and thus, macros.gconf2): [spot@pterodactyl ~]$ rpm -qp --scripts /home/spot/rpmbuild/RPMS/noarch/comix-4.0.4-2.3.fc14.noarch.rpm preinstall scriptlet (using /bin/sh): if [ "$1" -gt 1 ] ; then rm -rf /var/lib/rpm-state/gconf/* for schema in comix ; do if test -f /etc/gconf/schemas/"$schema".schemas ; then cp -p /etc/gconf/schemas/"$schema".schemas /var/lib/rpm-state/gconf/ || : fi done fi exit 0 postinstall scriptlet (using /bin/sh): for schema in comix ; do if test -f /var/lib/rpm-state/gconf/"$schema".schemas ; then cmp --quiet /etc/gconf/schemas/"$schema".schemas /var/lib/rpm-state/gconf/"$schema".schemas if test $? != 0; then if test -f /etc/gconf/schemas/"$schema".schemas ; then export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/"$schema".schemas > /dev/null || : fi export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-install-rule /etc/gconf/schemas/"$schema".schemas > /dev/null || : fi rm -f /var/lib/rpm-state/gconf/"$schema".schemas else export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-install-rule /etc/gconf/schemas/"$schema".schemas > /dev/null || : fi done touch --no-create /usr/share/icons/hicolor update-desktop-database &> /dev/null update-mime-database /usr/share/mime &> /dev/null exit 0 preuninstall scriptlet (using /bin/sh): if [ "$1" -eq 0 ] ; then for schema in comix ; do if test -f /etc/gconf/schemas/"$schema".schemas ; then export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/"$schema".schemas > /dev/null || : fi done fi exit 0 postuninstall scriptlet (using /bin/sh): update-desktop-database &> /dev/null update-mime-database /usr/share/mime &> /dev/null [ $1 -eq 0 ] || exit 0 touch --no-create /usr/share/icons/hicolor /usr/bin/gtk-update-icon-cache --quiet /usr/share/icons/hicolor exit 0 posttrans scriptlet (using /bin/sh): /usr/bin/gtk-update-icon-cache --quiet /usr/share/icons/hicolor exit 0 ***** So, the logical fix would be to use a versioned Requires here, but that's going to be a pain, since the version of GConf2 isn't consistent across branches. It means that we'd have this: Fedora 11: Requires(post): GConf2 >= 2.26.2-1.1 Fedora 12: Requires(post): GConf2 >= 2.28.0-4.1 Fedora 13: Requires(post): GConf2 >= 2.28.0-9 That's ugly, and I wouldn't like having to do that, even with conditionals. Instead, I propose to add: Provides: GConf2(macros) Then, we can amend the guidelines to use: Requires(post): GConf2(macros) What do you think (both Mamoru and proper GConf2 owners)?
(In reply to comment #5) > You would only have that problem where GConf2 doesn't include the macros (a > non-updated system). > > On my system with the latest GConf2 (and thus, macros.gconf2): > > [spot@pterodactyl ~]$ rpm -qp --scripts > /home/spot/rpmbuild/RPMS/noarch/comix-4.0.4-2.3.fc14.noarch.rpm I guess you are not using the one I specified (note that the URL of the rpm I posted ends with _.fc13_) Note that with explicitly adding "BR: GConfw", gconf2 macros are correctly expanded, see: http://koji.fedoraproject.org/koji/taskinfo?taskID=2060398 I guess you rebuilt my srpm by yourself using normal rpmbuild with GConf2 already _installed_. If you rebuild my srpm with mock or so, you'll see the macros are still unexpanded.
Okay, thats officially weird. These macros should be expanded when they're called, not during build. I'm going to have to ask Panu about this.
Adding the BuildRequires: GConf2 doesn't seem that bad, most gconf using apps will have it anyway. Just python ones I guess won't. More generally on this topic, I'm not a big fan of us doing this in already released distros... But I guess since the old way will always work, the more conservative packagers can ignore this change, and the people who do updates to all three releases in one go can keep their spec files in sync.
Panu confirms that right now, macros are only expanded at build time, even in %post scriptlets. The simplest way to handle this is to BuildRequires: GConf2, so thats what I'll do.
(In reply to comment #8) > More generally on this topic, I'm not a big fan of us doing this in already > released distros... But I guess since the old way will always work, the more > conservative packagers can ignore this change, and the people who do updates to > all three releases in one go can keep their spec files in sync. No objection from me. (In reply to comment #9) > Panu confirms that right now, macros are only expanded at build time, even in > %post scriptlets. The simplest way to handle this is to BuildRequires: GConf2, > so thats what I'll do. I also think that adding "BR: GConf2" is simplest.
GConf2-2.28.0-4.fc12.2 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/GConf2-2.28.0-4.fc12.2
GConf2-2.28.0-10.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/GConf2-2.28.0-10.fc13
GConf2-2.26.2-1.fc11.2 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/GConf2-2.26.2-1.fc11.2
GConf2-2.28.0-10.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update GConf2'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/GConf2-2.28.0-10.fc13
GConf2-2.26.2-1.fc11.2 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update GConf2'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/GConf2-2.26.2-1.fc11.2
GConf2-2.28.0-4.fc12.2 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update GConf2'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/GConf2-2.28.0-4.fc12.2
GConf2-2.28.0-10.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
GConf2-2.28.0-4.fc12.2 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
GConf2-2.26.2-1.fc11.2 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.