Bug 684622 - FTBFS - unpackaged files
Summary: FTBFS - unpackaged files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mailman
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Kaluža
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-13 22:13 UTC by Zenon Panoussis
Modified: 2011-09-07 13:06 UTC (History)
3 users (show)

Fixed In Version: mailman-2.1.12-17.el6
Doc Type: Bug Fix
Doc Text:
Because of a bug in the brp-python-compile script file, unnecessary /etc/mailman/mm_cfg.pyc and /etc/mailman/mm_cfg.pyo files were generated under certain circumstances. As a result, the Mailman build process could have failed. This update fixes the aforementioned bug by compiling Python script files manually so that the build process no longer fails.
Clone Of:
Environment:
Last Closed: 2011-09-07 13:06:00 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1275 0 normal SHIPPED_LIVE mailman bug fix update 2011-09-07 13:05:53 UTC

Description Zenon Panoussis 2011-03-13 22:13:53 UTC
Rebuilding from SRPM fails with 

Processing files: mailman-debuginfo-2.1.12-14.el6.x86_64
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/mailman-2.1.12-14.el6.x86_64
error: Installed (but unpackaged) file(s) found:
   /etc/mailman/mm_cfg.pyc
   /etc/mailman/mm_cfg.pyo

Those files don't belong there; they should be deleted in %install.

Comment 2 RHEL Program Management 2011-03-13 22:38:02 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 3 Jan Kaluža 2011-03-14 10:59:45 UTC
They can't be deleted in %install, because they are generated after %install block.

Comment 4 Jan Kaluža 2011-03-14 11:56:27 UTC
Note that this is fixed by installing those file in mailman-2.1.12-14.el6_0.2.x86_64.rpm.

Comment 5 Zenon Panoussis 2011-03-14 12:21:46 UTC
[mid-air collission]

You're right, the culprit is brp-python-bytecompile. I'm not sure, but compiling symlinks is probably a bug in brp-python-bytecompile. 

I guess the proper solution in this case is what's described in http://fedoraproject.org/wiki/Packaging/Python#Bytecompiling_with_the_correct_python_version , namely to turn off rpm's brp-python-bytecompile and do the bytecompiling from the specfile itself. 

Alternatively this works too, but it's ugly and it causes rpm -V to report missing files:

[root@builder SPECS]# diff -u mailman.spec.orig mailman.spec
--- mailman.spec.orig	2010-06-21 16:46:46.000000000 +0200
+++ mailman.spec	2011-03-14 13:14:52.660658111 +0100
@@ -94,6 +94,7 @@
 # The mail wrapper program
 %define mail_wrapper mailman
 
+
 %description
 Mailman is software to help manage email discussion lists, much like
 Majordomo and Smartmail. Unlike most similar products, Mailman gives
@@ -234,6 +235,8 @@
 # right direction for FHS compliance.
 mkdir -p $RPM_BUILD_ROOT%{configdir}
 ln -s %{mmdir}/Mailman/mm_cfg.py $RPM_BUILD_ROOT%{configdir}
+ln -s %{mmdir}/Mailman/mm_cfg.pyc $RPM_BUILD_ROOT%{configdir}
+ln -s %{mmdir}/Mailman/mm_cfg.pyo $RPM_BUILD_ROOT%{configdir}
 
 # sitelist.cfg used to live in the DATA_DIR, now as part of the 
 # FHS reoraganization it lives in the CONFIG_DIR. Most of the
@@ -332,6 +335,14 @@
   crontab -u %{mmuser} -r
 fi
 
+# remove our garbage from /etc/mailman/ (bug #684622)
+if [ -L /etc/mailman/mm_cfg.pyc ]; then
+  rm -f /etc/mailman/mm_cfg.pyc
+fi
+if [ -L /etc/mailman/mm_cfg.pyo ]; then
+  rm -f /etc/mailman/mm_cfg.pyo
+fi
+
 # This adds the proper /etc/rc*.d links for the script that runs the mailman qrunner daemon
 chkconfig --add mailman
 
@@ -499,7 +510,7 @@
 /etc/smrsh/%{mail_wrapper}
 %dir %attr(2775,root,%{mmgroup}) %{configdir}
 %attr(0644, root, %{mmgroup}) %config(noreplace) %verify(not md5 size mtime) %{configdir}/sitelist.cfg
-%{configdir}/mm_cfg.py
+%{configdir}/mm_cfg.py*
 %attr(2775,root,%{mmgroup}) %{lockdir}
 %attr(2775,root,%{mmgroup}) %{logdir}
 %attr(2775,root,%{mmgroup}) %{queuedir}

Comment 6 Jan Kaluža 2011-03-14 16:03:16 UTC
It's not brp-python-bytecompile bug (Python itself compiles symlinks too and brp-python-bytecompile has to respect Python's behaviour). To "fix" it, brp-python-bytecompile would have to check if that file is "imported" by another Python script, which is not doable.

I have written something like your patch when thinking about the proper fix, but it's not good to remove files which are in %files list.

The idea with manual compiling would work and I think it's the best solution.

Comment 7 Zenon Panoussis 2011-03-14 17:04:54 UTC
Ideally it should be possible to pass parametres to brp-python-bytecompile. I filed an RFE upstream for it: http://rpm.org/ticket/837 .

Comment 12 Petr Kovar 2011-06-28 13:40:04 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Because of a bug in the brp-python-compile script file, unnecessary /etc/mailman/mm_cfg.pyc and /etc/mailman/mm_cfg.pyo files were generated under certain circumstances. As a result, the Mailman build process could have failed. This update fixes the aforementioned bug by compiling Python script files manually so that the build process no longer fails.

Comment 15 errata-xmlrpc 2011-09-07 13:06:00 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1275.html


Note You need to log in before you can comment on or make changes to this bug.