[issue809163] Can't add files with spaces under bdist_rpm

2021-02-03 Thread Steve Dower


Steve Dower  added the comment:

Distutils is now deprecated (see PEP 632) and all tagged issues are being 
closed. From now until removal, only release blocking issues will be considered 
for distutils.

If this issue does not relate to distutils, please remove the component and 
reopen it. If you believe it still requires a fix, most likely the issue should 
be re-reported at https://github.com/pypa/setuptools

--
nosy: +steve.dower
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces under bdist_rpm

2014-04-05 Thread Jason R. Coombs

Jason R. Coombs added the comment:

In issue21153, I explored this problem as well, before being aware of this 
issue. I had searched for bdist_rpm.

I've since confirmed that the sed approach is viable. For example, the 
following works around the issue by overriding the install_script with the sed 
technique:

$ cat  install.txt
python setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
sed -i -e 's/.*/\0/' INSTALLED_FILES

$ python setup.py bdist_rpm --install-script install.txt

I agree that sed can probably be assumed to be present, though it would be 
nicer not to depend on it.

It may also be possible not to have to list the files explicitly. In reading 
the rpm docs 
(http://www.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html), I 
discovered that rpm will traverse a directory, adding it and its contents. 
Perhaps the whole routine of recording installed files and then listing them 
explicitly can be replaced by simply referencing the build root.

--
nosy: +jason.coombs
title: Can't add files with spaces - Can't add files with spaces under 
bdist_rpm

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces under bdist_rpm

2014-04-05 Thread Jason R. Coombs

Jason R. Coombs added the comment:

I decided to test my proposition. It seems that simply specifying / for %files 
leads to the RPM including parent directories. Here's the output I get when 
running my test with the sed workaround:

$ rpm -q -filesbypkg -p dist/issue21153-package-0.0.0-1.noarch.rpm
issue21153-package
/usr/local/lib/python2.7/dist-packages/issue21153_package-0.0.0.egg-info
issue21153-package/usr/local/lib/python2.7/dist-packages/pkg/__init__.py
issue21153-package
/usr/local/lib/python2.7/dist-packages/pkg/__init__.pyc
issue21153-package
/usr/local/lib/python2.7/dist-packages/pkg/__init__.pyo
issue21153-package/usr/local/lib/python2.7/dist-packages/pkg/file with 
spaces.py
issue21153-package/usr/local/lib/python2.7/dist-packages/pkg/file with 
spaces.pyc
issue21153-package/usr/local/lib/python2.7/dist-packages/pkg/file with 
spaces.pyo

If instead I apply the no-record patch (attached), I can run bdist_rpm (not 
using sed workaround) without errors, but the resulting RPM has more 
directories specified:

$ rpm -q -filesbypkg -p dist/issue21153-package-0.0.0-1.noarch.rpm
issue21153-package/
issue21153-package/usr
issue21153-package/usr/local
issue21153-package/usr/local/lib
issue21153-package/usr/local/lib/python2.7
issue21153-package/usr/local/lib/python2.7/dist-packages
issue21153-package
/usr/local/lib/python2.7/dist-packages/issue21153_package-0.0.0.egg-info
issue21153-package/usr/local/lib/python2.7/dist-packages/pkg
issue21153-package/usr/local/lib/python2.7/dist-packages/pkg/__init__.py
issue21153-package
/usr/local/lib/python2.7/dist-packages/pkg/__init__.pyc
issue21153-package
/usr/local/lib/python2.7/dist-packages/pkg/__init__.pyo
issue21153-package/usr/local/lib/python2.7/dist-packages/pkg/file with 
spaces.py
issue21153-package/usr/local/lib/python2.7/dist-packages/pkg/file with 
spaces.pyc
issue21153-package/usr/local/lib/python2.7/dist-packages/pkg/file with 
spaces.pyo

Perhaps that's acceptable. If it is, it makes the code simpler and cleaner.

Can someone comment on the impact of the presence of those parent directories 
in the RPM?

--
Added file: http://bugs.python.org/file34737/issue809163-no-record.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2014-03-12 Thread Éric Araujo

Éric Araujo added the comment:

Previous comment: “If there is a way to make rpm read one line at a time, we 
should use it.”

If there isn’t such an option, and if sed is guaranteed to be installed on 
rpm-based systems, we can try the sed script.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2014-03-08 Thread Matheus Vieira Portela

Matheus Vieira Portela added the comment:

As far as I noticed, in bdist_rpm.py, the _make_spec_file() method generates an 
.spec file for RPM build and attaches the install script to setup.py install 
-O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES.

Later, the .spec refers to the record file as the one which contains all 
necessary files to build the RPM package with the directive %files -f 
INSTALLED_FILES. If any path contains an space character, it will triggers an 
error.

I could fix this problem by attaching to the installation a small sed script 
that appends double quotes to the beginning and the end of each line of 
INSTALLED_FILES. I'm not sure whether this is allowed though. Any ideas how to 
make this more Pythonic without using sed?

Apparently, it works since the test passed. However, there is an warning which 
I have no idea what it means: unknown, 0: Warning: using regular magic file 
`/etc/magic'.

I attached the diff file with the changes so far.

--
Added file: http://bugs.python.org/file34308/quoted_files.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2014-03-07 Thread Éric Araujo

Éric Araujo added the comment:

Yes, this issue is not addressed.  A test is added by the latest patch and 
reproduces the issue; now bdist_rpm should be changed to make the test pass.  
See also my previous comment.

--
components:  -Distutils2
stage: patch review - needs patch
versions: +Python 3.3, Python 3.4, Python 3.5 -3rd party, Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2014-03-07 Thread Matheus Vieira Portela

Matheus Vieira Portela added the comment:

I tried to apply the last patch but it returned me and error of failing hunk. I 
think it was based on an old version of the test_bdist_rpm.py file.

Hence, I made this updated version of the patch and could get the expected 
failure during the tests.

I should try and solve this bug soon.

--
Added file: 
http://bugs.python.org/file34303/test_bdist_rpm_filename_with_whitespaces.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2014-03-06 Thread Matheus Vieira Portela

Matheus Vieira Portela added the comment:

Is this issue still going on?

--
nosy: +matheus.v.portela

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2011-01-07 Thread xiscu

xiscu xi...@email.de added the comment:

This is also my first contribution.

The attached file is a diff against :
- http://code.python.org/hg/branches/py3k/

The actual tip was:
- 9489:4db13b4e76aa

The patch adds only a test that triggers the issue.

Please feel free to comment on that commit (so I can improve)

Thanks

--
nosy: +xiscu
Added file: 
http://bugs.python.org/file20306/test_bdist_rpm_filename_with_whitespaces.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2010-11-21 Thread John Keyes

John Keyes johnke...@gmail.com added the comment:

Gah! Silly mistake with the assert.

What filelist.py patch are you referring to? I've tested this on py3k with no 
changes to filelist.py.

Thanks for your patience.

--
Added file: http://bugs.python.org/file19730/issue809163v3.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2010-11-21 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

assertEquals is deprecated, I’ll change to assertEqual.

 What filelist.py patch are you referring to? I've tested this on py3k
 with no changes to filelist.py.
The goal of a test is to show an error so that it can be fixed.  In this case, 
the test is still useful to make sure things work, especially in distutils2 
where we are changing the filelist (now manifest) module a lot.

I think now that my comment “forget RPM” was wrong.  This is not a problem with 
RPM, but with bdist_rpm, so even if filelist behaves correctly with spaces, 
bdist_rpm does not.  If there is a way to make rpm read one line at a time, we 
should use it.

Toshio: Do you have an idea how to do that?  Otherwise we’ll close as wontfix 
and forward to the bdist_rpm2 project, where they have more freedom to change 
code.

--
nosy: +a.badger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2010-11-20 Thread John Keyes

John Keyes johnke...@gmail.com added the comment:

I'll change the test to use TESTFN later today. Thanks for the feedback.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2010-11-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thanks for the patch John.  Instead of low-level use of TESTFN, you can use 
distutils.tests.support.TempdirManager to create a temporary directory and 
write files to it in a few lines.

--
assignee: tarek - eric.araujo
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2010-11-20 Thread John Keyes

John Keyes johnke...@gmail.com added the comment:

I see that distutils.tests.support.TempdirManager uses tempfile for directory 
creation.

What's the best course of action here? 

1. Use TESTFN or
2. Use TempdirManager or
3. Change the test to use TempdirManager and change TempdirManager to use 
TESTFN instead of tempfile.

Thanks.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2010-11-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

TempdirManager hasn’t caused buildbots failures so far, so there is no need to 
change it.  You can use it, it’s convenient and works :)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2010-11-20 Thread John Keyes

John Keyes johnke...@gmail.com added the comment:

This patch uses TempdirManager to handle the temporary directory and file 
creation.

--
Added file: http://bugs.python.org/file19718/issue809163v2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2010-11-20 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

TempdirManager is new, which is why I forgot about it.  It works with the 
buildbots because it is a context manager, so if things go badly the cleanup 
code is still going to run and delete the cruft.  Since the distutils tests are 
unlikely to hang (which is the only time the cleanup code would not get run), 
it should be perfectly fine.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2010-11-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Looks good.  You’ll want to use assertEqual here:
self.assertTrue(1, len(file_list.files))

Do you want to patch filelist.py now?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2010-11-19 Thread John Keyes

John Keyes johnke...@gmail.com added the comment:

This is my first contribution as part of the Bug Weekend (and possibly my first 
to Python).

I tested this by writing a MANIFEST.in and a very small setup.py but after 
looking at distutils I narrowed the area down to the FileList.

I wrote a unittest and have attached the diff. I tested this on py3k.

--
keywords: +patch
nosy: +johnkeyes
Added file: http://bugs.python.org/file19650/issue809163.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2010-11-19 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Thanks for diagnosis and the test patch, and welcome to the bug weekend.

Some comments:

test.support has a symbol, TESTFN, which is guaranteed to be unique for the 
test run and located in an appropriate writeable location.  Many tests use it 
to create a directory via os.mkdir and then create working files in it.  The 
test should also clean up the directory afterward, which can be done easily 
using test.support.rmtree.  Using these two test support items should simplify 
your test.  The other advantage of using TESTFN rather than the tempfile module 
is that TESTFN locates the file/directory in a place that the buildbot runner 
cleans up after each test run, so no cruft is left on the buildbot system even 
if the test runs ends abnormally in the middle of the test.

--
nosy: +r.david.murray
stage: unit test needed - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2010-10-07 Thread Anders Sandvig

Changes by Anders Sandvig anders.sand...@gmail.com:


--
nosy: +asandvig

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2010-09-29 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Adding the “easy” keyword so that a beginner or sprinter can find this and 
write a test.  Hint: Forget the part about RPM, write a test about inclusion of 
file with spaces in their name.

--
keywords: +easy
versions: +3rd party, Python 2.7, Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2010-07-21 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thanks for the report Antonio. I’m sorry noone replied before; bugs are triaged 
by volunteers and distutils had no dedicated maintainer in the previous years. 
This needs a test to make sure the bug still exists, and if confirmed a patch 
to fix it. I don’t have time right now but it will be done. Thanks again.

--
assignee:  - tarek
components: +Distutils2
nosy: +merwok, tarek
stage:  - unit test needed
versions:  -Python 2.6, Python 2.7, Python 3.0, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809163] Can't add files with spaces

2009-02-04 Thread Akira Kitada

Changes by Akira Kitada akit...@gmail.com:


--
type:  - behavior
versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com