[tor-bugs] #31253 [Circumvention/Snowflake]: Add a webext packaging target to the build script

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Oct 10 17:46:40 UTC 2019


#31253: Add a webext packaging target to the build script
-------------------------------------+------------------------------
 Reporter:  arlolra                  |          Owner:  (none)
     Type:  defect                   |         Status:  needs_review
 Priority:  Medium                   |      Milestone:
Component:  Circumvention/Snowflake  |        Version:
 Severity:  Normal                   |     Resolution:
 Keywords:                           |  Actual Points:
Parent ID:                           |         Points:
 Reviewer:                           |        Sponsor:
-------------------------------------+------------------------------

Comment (by cohosh):

 Replying to [comment:2 dcf]:
 Thanks, I updated that same link above.
 > {{{
 > +  execSync(`git clean -x -d -f .`);
 > }}}
 > I
 > `git clean` makes me nervous because it has the potential to delete work
 in progress. Instead of archiving files directly in the working directory,
 would it be possible to cpoy the files into a temporary directory, and
 leave the working directory untouched? Something like this may be safer:
 I switched to using the archive option. Note that a call to `npm run
 webext` will do a `git clean` on the webext/ subdirectory anyway.
 > You need to `rm -f webext.zip` first, because otherwise `zip` will
 modify an existing file, potentially leaving garbage in it. The `-X`
 option to `zip` omits filesystem metadata such as uid/gid. (You can
 inspect the difference using `zipinfo -v webext.zip`.)
 Done
 > What happens if one of the `execSync` calls fails? Does the whole `pack-
 webext` task fail, or does it try to execute the remaining code?
 The task fails. I added some try-catch code around commands that are
 likely to fail.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31253#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list