Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#54110 - [ufw] pyc should be ignored by paccheck

Attached to Project: Community Packages
Opened by Alexandre Magno (alexandre-mbm) - Friday, 19 May 2017, 01:42 GMT
Last edited by Kyle Keen (keenerd) - Tuesday, 23 May 2017, 21:01 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Kyle Keen (keenerd)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

After that ufw is executed the pyc files are detected by paccheck.


Additional info:

* 0.35-2


Steps to reproduce:

$ sudo ufw disable
$ sudo pacman -S ufw
$ sudo paccheck --md5sum --quiet ufw
$ sudo ufw enable
Firewall is active and enabled on system startup
$ sudo paccheck --md5sum --quiet ufw
ufw: '/usr/lib/python2.7/site-packages/ufw/__init__.pyc' md5sum mismatch (expected 54601a1fa2caa7de9978e1fe408590af)
ufw: '/usr/lib/python2.7/site-packages/ufw/applications.pyc' md5sum mismatch (expected f53850d592831927ac411dc16a8e9bd1)
ufw: '/usr/lib/python2.7/site-packages/ufw/backend.pyc' md5sum mismatch (expected 2ca312a76e4967a08dce5897b8f636ca)
ufw: '/usr/lib/python2.7/site-packages/ufw/backend_iptables.pyc' md5sum mismatch (expected 9a9e4a56783eacb0fe9d6dedf76366f8)
ufw: '/usr/lib/python2.7/site-packages/ufw/frontend.pyc' md5sum mismatch (expected 12cbc5af7a03429b4b02d02dd7dc0b69)
ufw: '/usr/lib/python2.7/site-packages/ufw/parser.pyc' md5sum mismatch (expected 7f0a2f3597243dc9124c81b8db4547d7)
ufw: '/usr/lib/python2.7/site-packages/ufw/util.pyc' md5sum mismatch (expected 4586018352eeb6b05d49aeb91fd160a0)
This task depends upon

Closed by  Kyle Keen (keenerd)
Tuesday, 23 May 2017, 21:01 GMT
Reason for closing:  Fixed
Additional comments about closing:  ufw 0.35-3
Comment by Doug Newgard (Scimmia) - Friday, 19 May 2017, 03:50 GMT
Yeah, you can't edit the files after the running setup.py. Line 47 needs to be moved.
Comment by Alexandre Magno (alexandre-mbm) - Friday, 19 May 2017, 04:03 GMT
I don't understand. Which line 47?
Comment by Doug Newgard (Scimmia) - Friday, 19 May 2017, 14:22 GMT
Line 47 of the PKGBUILD is causing this, needs to be done before setup.py
Comment by Alexandre Magno (alexandre-mbm) - Friday, 19 May 2017, 14:32 GMT
I think that it is just a case of ignoring these pyc files. In some way. I do not believe that that sed command changes the files, because are binaries. And they are generated only after the first run of the python programs.

By the way, should they exist in the building environment, to have their md5 computed? I do not think so.
Comment by Alexandre Magno (alexandre-mbm) - Friday, 19 May 2017, 14:50 GMT
Same issue involving temporary files in building time — I think — is the problem at  FS#54111 . But you heave rejected it summarily...
Comment by Alexandre Magno (alexandre-mbm) - Friday, 19 May 2017, 14:51 GMT
And  FS#54109 .
Comment by Alexandre Magno (alexandre-mbm) - Friday, 19 May 2017, 15:01 GMT
@keenerd, is there a guide on how contribute with patches? Or which are the possible workflows?
Comment by Alexandre Magno (alexandre-mbm) - Friday, 19 May 2017, 15:14 GMT
$ pacman -Ql ufw | grep pyc
ufw /usr/lib/python2.7/site-packages/ufw/__init__.pyc
ufw /usr/lib/python2.7/site-packages/ufw/applications.pyc
ufw /usr/lib/python2.7/site-packages/ufw/backend.pyc
ufw /usr/lib/python2.7/site-packages/ufw/backend_iptables.pyc
ufw /usr/lib/python2.7/site-packages/ufw/common.pyc
ufw /usr/lib/python2.7/site-packages/ufw/frontend.pyc
ufw /usr/lib/python2.7/site-packages/ufw/parser.pyc
ufw /usr/lib/python2.7/site-packages/ufw/util.pyc

They should not exist into package.
Comment by Alexandre Magno (alexandre-mbm) - Saturday, 20 May 2017, 00:48 GMT
@keenerd, a patch was sent to your e-mail.

--

Sorry, only now I see the "attach a file" button.

To apply:

$ patch PKGBUILD < PKGBUILD.patch
Comment by Alexandre Magno (alexandre-mbm) - Saturday, 20 May 2017, 06:15 GMT
Maybe we should make a wipe when removing. See this:

$ sudo pacman -Rs ufw
$ ls -1 /usr/lib/python2.7/site-packages/ufw/
applications.pyc
backend.pyc
frontend.pyc
parser.pyc
backend_iptables.pyc
common.pyc
__init__.pyc
util.pyc
Comment by Alexandre Magno (alexandre-mbm) - Saturday, 20 May 2017, 07:07 GMT
More to apply:

$ patch ufw.install < install.patch
Comment by Antonio Rojas (arojas) - Saturday, 20 May 2017, 07:13 GMT
That is wrong, pyc files *are* supposed to be in the package, as they are in all other python packages. The right fix for this is the one Scimmia posted.
Comment by Alexandre Magno (alexandre-mbm) - Saturday, 20 May 2017, 07:19 GMT
> That is wrong, pyc files *are* supposed to be in the package, as they are in all other python packages.

They will differ in each target system. Regenerated.

> The right fix for this is the one Scimmia posted.

Where? Show me it please.

UPDATED

Ah! Okay. I see: Friday, 19 May 2017, 11:22 GMT-3
Comment by Alexandre Magno (alexandre-mbm) - Saturday, 20 May 2017, 07:53 GMT
I think that not. The pyc files will are there.
Comment by Alexandre Magno (alexandre-mbm) - Saturday, 20 May 2017, 07:57 GMT
Maybe the solution was a way to ignore these files for .MTREE. Because in case of them being corrupted, Python will regenerate them...

Loading...