Opened 5 years ago

Closed 5 years ago

#4085 enhancement closed fixed (fixed)

tap2rpm should not use os.system for running other commands

Reported by: TimAllen Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:
Author: Launchpad Bug:

Description

Currently tap2rpm uses os.system to call various commands including tar and rpmbuild, which has two issues:

  • Little attempt has been made at quoting, which means a single $ or " could make the whole thing blow up.
  • The entire, horribly verbose rpm build process gets dumped to stdout.

tap2rpm should be updated to use Python's popen2 or subprocess modules, or even Twisted's own t.i.utils.getProcessOutputAndValue(). If the return value is zero, the process has probably been successful and the output can be discarded; otherwise the output probably contains useful error messages and should be printed.

Change History (3)

comment:1 Changed 5 years ago by TimAllen

This ticket split off from #3292.

comment:2 Changed 5 years ago by therve

  • Resolution set to fixed
  • Status changed from new to closed

(In [28572]) Merge modern-tap2rpm-3292

Authors: TimAllen, jml
Reviewers: glyph, exarkun, therve
Fixes #3292
Fixes #4085

Revive the long-dead tap2rpm. This remerge fixes failure with RPM/Tar versions
under Fedora 5.

comment:3 Changed 4 years ago by <automation>

  • Owner glyph deleted
Note: See TracTickets for help on using tickets.