<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>gsallesl.github.io</title><link href="https://gsallesl.github.io/" rel="alternate"></link><link href="https://gsallesl.github.io/feed" rel="self"></link><id>https://gsallesl.github.io/</id><updated>2018-08-14T10:20:00+02:00</updated><entry><title>Using LXD for your development environment, with some improvements</title><link href="https://gsallesl.github.io/using-lxd-for-your-development-environment-with-some-improvements.html" rel="alternate"></link><published>2018-08-14T10:20:00+02:00</published><updated>2018-08-14T10:20:00+02:00</updated><author><name>Gabriel</name></author><id>tag:gsallesl.github.io,2018-08-14:/using-lxd-for-your-development-environment-with-some-improvements.html</id><summary type="html">&lt;p&gt;I will focus on the creation of a container dedicated to android development. With respect to my &lt;a href="https://gsallesl.github.io/using-lxd-for-your-development-environment.html"&gt;previous entry on the topic&lt;/a&gt; this setup simplifies the directory sharing between the host and the container.&lt;/p&gt;
&lt;p&gt;My updated requirements are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the dev tools will be installed only on the container&lt;/li&gt;
&lt;li&gt;the source …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;I will focus on the creation of a container dedicated to android development. With respect to my &lt;a href="https://gsallesl.github.io/using-lxd-for-your-development-environment.html"&gt;previous entry on the topic&lt;/a&gt; this setup simplifies the directory sharing between the host and the container.&lt;/p&gt;
&lt;p&gt;My updated requirements are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the dev tools will be installed only on the container&lt;/li&gt;
&lt;li&gt;the source code should be accessible both from the host and the guest&lt;/li&gt;
&lt;li&gt;we setup a local mirror for the android repo to save space as I am working on several versions/platforms&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This time we consider the use of a privileged container to ease the directory sharing process between host and container.&lt;/p&gt;
&lt;p&gt;Here is what my setup looks like on a ubuntu system:&lt;/p&gt;
&lt;h2&gt;Container setup&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# - Install and configure lxd (one time operation)&lt;/span&gt;
sudo apt-get install lxd
sudo lxd init

&lt;span class="c1"&gt;# - Create a new environment&lt;/span&gt;
&lt;span class="c1"&gt;# for example ubuntu version 16.04 and I call the container ubuntu-1604&lt;/span&gt;
lxc launch ubuntu:16.04 ubuntu-1604

&lt;span class="c1"&gt;# - Create a directory that will contain the code shared &lt;/span&gt;
&lt;span class="c1"&gt;# between the host and the containers (one time operation)&lt;/span&gt;
mkdir &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/projects

&lt;span class="c1"&gt;# - Mount the project folder as the container user (ubuntu by default) home &lt;/span&gt;
lxc config device add ubuntu-1604 projects disk &lt;span class="nv"&gt;source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/home/projects &lt;span class="nv"&gt;path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/home/ubuntu

&lt;span class="c1"&gt;# - Create a directory that will contain the android mirror&lt;/span&gt;
&lt;span class="c1"&gt;# !!! This directory shouldn&amp;#39;t be user specific (i.e. have the username is the path)&lt;/span&gt;
&lt;span class="c1"&gt;# !!! as the the container user might be different from the host user&lt;/span&gt;
sudo mkdir /home/aosp-mirror

&lt;span class="c1"&gt;# - Mount the project folder as the container user (ubuntu by default) home &lt;/span&gt;
lxc config device add ubuntu-1604 aosp-mirror disk &lt;span class="nv"&gt;source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/home/aosp-mirror &lt;span class="nv"&gt;path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/home/aosp-mirror

&lt;span class="c1"&gt;# - Make the container a priviledged container&lt;/span&gt;
&lt;span class="c1"&gt;# This is required in order to have the correct uid mapping between your guest container and your host system.&lt;/span&gt;
&lt;span class="c1"&gt;# cf previous blog entry for alternative&lt;/span&gt;
lxc config &lt;span class="nb"&gt;set&lt;/span&gt; ubuntu-1604 security.privileged &lt;span class="nb"&gt;true&lt;/span&gt;

&lt;span class="c1"&gt;# - Restart the container to apply the changes&lt;/span&gt;
lxd restart ubuntu-1604
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The next steps consist in:
&lt;em&gt; cloning the android mirror from the container
&lt;/em&gt; repo sync a version to work on and use reference to the local mirror to save space&lt;/p&gt;
&lt;h2&gt;Android mirror setup&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# Cloning the mirror&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; /home/aosp-mirror
repo init -u https://android.googlesource.com/mirror/manifest --mirror
repo sync

&lt;span class="c1"&gt;# Sync a working dir against the local repo.&lt;/span&gt;
&lt;span class="c1"&gt;# Use --reference to link the git refs to the mirror&lt;/span&gt;
&lt;span class="c1"&gt;# (optional) Sync only a branch (-c option). Might be dangerous if you want to commit code later on.&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; ~
mkdir aosp-working-dir
&lt;span class="nb"&gt;cd&lt;/span&gt; !$
repo init --reference&lt;span class="o"&gt;=&lt;/span&gt;/home/aosp-mirror -u /home/aosp-mirror/platform/manifest.git -b android-5.0.1_r1
repo sync -j&lt;span class="k"&gt;$(&lt;/span&gt;nproc&lt;span class="k"&gt;)&lt;/span&gt; -c
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;One advantage of this lxc setup is that the local git references can be resolved both from the host and the container.&lt;/p&gt;</content><category term="admin"></category><category term="dev"></category></entry><entry><title>Using LXD for your development environment</title><link href="https://gsallesl.github.io/using-lxd-for-your-development-environment.html" rel="alternate"></link><published>2016-04-24T10:20:00+02:00</published><updated>2016-05-05T00:20:00+02:00</updated><author><name>Gabriel</name></author><id>tag:gsallesl.github.io,2016-04-24:/using-lxd-for-your-development-environment.html</id><summary type="html">&lt;p&gt;&lt;a href="https://linuxcontainers.org/lxd/"&gt;LXD linux containers&lt;/a&gt; provides an interesting solution to isolate project development environments (python, android) from your host system.&lt;/p&gt;
&lt;p&gt;The motivations for isolating your project development environments are well known and projects such as &lt;a href="https://www.vagrantup.com/docs/why-vagrant/"&gt;Vagrant&lt;/a&gt; already provide dev environment on top of Virtualbox, Hyper-V or Docker.&lt;/p&gt;
&lt;p&gt;However, if you don't need …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;a href="https://linuxcontainers.org/lxd/"&gt;LXD linux containers&lt;/a&gt; provides an interesting solution to isolate project development environments (python, android) from your host system.&lt;/p&gt;
&lt;p&gt;The motivations for isolating your project development environments are well known and projects such as &lt;a href="https://www.vagrantup.com/docs/why-vagrant/"&gt;Vagrant&lt;/a&gt; already provide dev environment on top of Virtualbox, Hyper-V or Docker.&lt;/p&gt;
&lt;p&gt;However, if you don't need all the functionalities of Vagrant and just look to get a simple and probably more permanent setup, this blog post is for you. &lt;a href="https://roots.io/linux-containers-lxd-as-an-alternative-to-virtualbox-for-wordpress-development/"&gt;This article&lt;/a&gt; describes how to use LXD for wordpress development. In this article we will focus on improving the accessibility to the code.&lt;/p&gt;
&lt;p&gt;My requirements for my dev environment are as follow:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;My dev tools (e.g.: compilers) must be running fast, if possible without the overhead added by a virtualization solution such as VirtualBox or Qemu.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;My code must be accessible on my host: I want to be able to edit my code on my host and to have my changes already commited to my dev environment (e.g.: I don't want to have to copy my code from my host to my dev environment, especially when working on big projects such as the linux kernel or the AOSP framework).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;LXD provides interesting features for this use case: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Nearly native performances, or at least performances not as bad as they are when compiling in a virtual machine, thanks to the linux namespace system LXD is build on top of.&lt;/li&gt;
&lt;li&gt;Easily accessible code: shared folders between the containers and the host use bind mounts. This architecture can be leveraged to editing the code from your host and only compile from the container.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is what my setup looks like on a ubuntu system:&lt;/p&gt;
&lt;h2&gt;Setup&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# - Install and configure lxd (one time operation)&lt;/span&gt;
sudo apt-get install lxd
sudo lxd init

&lt;span class="c1"&gt;# - Create a new environment&lt;/span&gt;
&lt;span class="c1"&gt;# for example ubuntu version 14.04 and I call the container ubuntu-dev&lt;/span&gt;
lxc launch ubuntu:14.04 ubuntu-dev

&lt;span class="c1"&gt;# - Create a user that corresponds to the uid given&lt;/span&gt;
&lt;span class="c1"&gt;# to the containers file (one time operation)&lt;/span&gt;

&lt;span class="c1"&gt;# First lookup the uid that corresponds to the container&lt;/span&gt;
sudo ls -la /var/lib/lxd/containers/ubuntu-dev/rootfs
&lt;span class="o"&gt;[&lt;/span&gt;output&lt;span class="o"&gt;]&lt;/span&gt; drwxr-xr-x  &lt;span class="m"&gt;24&lt;/span&gt; &lt;span class="m"&gt;165536&lt;/span&gt; &lt;span class="m"&gt;165536&lt;/span&gt; &lt;span class="m"&gt;4096&lt;/span&gt; Apr &lt;span class="m"&gt;21&lt;/span&gt; &lt;span class="m"&gt;20&lt;/span&gt;:26 .
&lt;span class="o"&gt;[&lt;/span&gt;output&lt;span class="o"&gt;]&lt;/span&gt; drwxr-xr-x+  &lt;span class="m"&gt;4&lt;/span&gt; &lt;span class="m"&gt;165536&lt;/span&gt; &lt;span class="m"&gt;165536&lt;/span&gt; &lt;span class="m"&gt;4096&lt;/span&gt; Apr &lt;span class="m"&gt;21&lt;/span&gt; &lt;span class="m"&gt;19&lt;/span&gt;:13 ..
&lt;span class="o"&gt;[&lt;/span&gt;output&lt;span class="o"&gt;]&lt;/span&gt; drwxr-xr-x   &lt;span class="m"&gt;2&lt;/span&gt; &lt;span class="m"&gt;165536&lt;/span&gt; &lt;span class="m"&gt;165536&lt;/span&gt; &lt;span class="m"&gt;4096&lt;/span&gt; Apr &lt;span class="m"&gt;20&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;:57 bin
&lt;span class="o"&gt;[&lt;/span&gt;output&lt;span class="o"&gt;]&lt;/span&gt; ...

&lt;span class="c1"&gt;# Create the user using the container files uid (one time operation)&lt;/span&gt;
sudo adduser --home&lt;span class="o"&gt;=&lt;/span&gt;/dev/null --no-create-home --gecos &lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt; --uid &lt;span class="m"&gt;166536&lt;/span&gt; --disabled-password --shell /bin/false lxduser

&lt;span class="c1"&gt;# - Create a directory that will contain the code shared &lt;/span&gt;
&lt;span class="c1"&gt;# between the host and the containers (one time operation)&lt;/span&gt;
sudo mkdir /home/projects
chown -R lxduser:lxduser /home/projects

&lt;span class="c1"&gt;# - Mount a filesystem outside of the container as the home &lt;/span&gt;
&lt;span class="c1"&gt;# for the container user (ubuntu by default)&lt;/span&gt;
lxc config device add ubuntu-dev projects disk &lt;span class="nv"&gt;source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/home/projects &lt;span class="nv"&gt;path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/home/ubuntu

&lt;span class="c1"&gt;# - Restart the container to apply the changes&lt;/span&gt;
lxd restart ubuntu-dev

&lt;span class="c1"&gt;# - Change ownership of the files in your containers&lt;/span&gt;
lxc &lt;span class="nb"&gt;exec&lt;/span&gt; ubuntu-dev -- chown -R ubuntu:ubuntu /home/ubuntu

&lt;span class="c1"&gt;# - Mount /home/project, which currently belongs to lxduser&lt;/span&gt;
&lt;span class="c1"&gt;# in your host user (gsalles) home tree so you can edit your code locally&lt;/span&gt;
&lt;span class="c1"&gt;# We are going to use bindfs for this operation:&lt;/span&gt;
&lt;span class="c1"&gt;# we use the mapping feature between the lxd container user (lxduser) &lt;/span&gt;
&lt;span class="c1"&gt;# and your host user (gsallesl)&lt;/span&gt;
sudo mount -t fuse.bindfs /home/projects /home/gsallesl/projects -o &lt;span class="nv"&gt;map&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;lxduser/gsallesl:@lxduser/@gsallesl

&lt;span class="c1"&gt;# An fstab entry looks as follow to make the mount automatic at startup&lt;/span&gt;
/home/projects  /home/gsallesl/projects     fuse.bindfs     &lt;span class="nv"&gt;map&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;lxduser/gsallesl:@lxduser/@gsallesl   &lt;span class="m"&gt;0&lt;/span&gt;       &lt;span class="m"&gt;0&lt;/span&gt;

&lt;span class="c1"&gt;# (optional) Hide lxduser user from the lightdm login screen on ubuntu:&lt;/span&gt;
&lt;span class="c1"&gt;# http://askubuntu.com/questions/92349/how-do-i-hide-a-particular-user-from-the-login-screen/575390#575390&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;</content><category term="admin"></category><category term="dev"></category></entry><entry><title>SSH ProxyCommand Resolver</title><link href="https://gsallesl.github.io/ssh-proxycommand-resolver.html" rel="alternate"></link><published>2015-05-12T10:20:00+02:00</published><updated>2015-05-12T19:30:00+02:00</updated><author><name>Gabriel</name></author><id>tag:gsallesl.github.io,2015-05-12:/ssh-proxycommand-resolver.html</id><summary type="html">&lt;p&gt;SSH ProxyResolver dynamically determines the &lt;code&gt;ProxyCommand&lt;/code&gt; to use for a SSH &lt;code&gt;Host&lt;/code&gt; alias based on your current network connection and a configuration you provide.&lt;/p&gt;
&lt;p&gt;SSH ProxyCommand configuration parameter provides a great way to nicely access a computer not directly accessible on the internet with a simple command.&lt;/p&gt;
&lt;p&gt;This configuration parameter …&lt;/p&gt;</summary><content type="html">&lt;p&gt;SSH ProxyResolver dynamically determines the &lt;code&gt;ProxyCommand&lt;/code&gt; to use for a SSH &lt;code&gt;Host&lt;/code&gt; alias based on your current network connection and a configuration you provide.&lt;/p&gt;
&lt;p&gt;SSH ProxyCommand configuration parameter provides a great way to nicely access a computer not directly accessible on the internet with a simple command.&lt;/p&gt;
&lt;p&gt;This configuration parameter is particularly useful on a laptop SSH configuration to access such a system. You may have to change this parameter when switching between networks: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When connected to the same network as &lt;code&gt;myhost&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# .ssh/config&lt;/span&gt;
Host myhost
HostName IPAddress
&lt;/pre&gt;&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;When proxying via a server facing the internet that can access &lt;code&gt;myhost&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# .ssh/config&lt;/span&gt;
Host myhost
ProxyCommand ssh internet_facing_server_IP -W IPAddress:some_port
&lt;/pre&gt;&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;When using a meeting point on another server, for example when the system facing the internet and on the same network as &lt;code&gt;myhost&lt;/code&gt; is down:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On my host:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ssh -NR &lt;span class="m"&gt;2345&lt;/span&gt;:localhost:22  internet_facing_server2_IP
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;On the client:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# .ssh/config&lt;/span&gt;
Host myhost
ProxyCommand ssh internet_facing_server2_IP -W localhost:2345
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If the system &lt;code&gt;myhost&lt;/code&gt; actually hosts some of your code on git bare repositories, you may be constrained to use a single SSH alias and adapt the SSH configuration depending on the network you are connected to so that you can still perform &lt;code&gt;pull&lt;/code&gt; and &lt;code&gt;push&lt;/code&gt; operations. However, you may want to avoid modifying your configuration many times a day.&lt;/p&gt;
&lt;p&gt;To avoid having to make these changes manually, here is a little tool, ProxyCommandResolver (pcr), which will pick up the correct &lt;code&gt;ProxyCommand&lt;/code&gt; to use for you. pcr uses a configuration file that make an association between an SSH Host alias, multiple &lt;code&gt;ProxyCommand&lt;/code&gt; and your current connection parameters (Wifi access point name for example) and returns the &lt;code&gt;ProxyCommand&lt;/code&gt; to be used.&lt;/p&gt;
&lt;p&gt;So far, the connection parameters supported by pcr are the default routing interface, your wifi ESSID, your NetworkManager connection name or your current IP address.&lt;/p&gt;
&lt;p&gt;The tool consists of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="code/pcr/pcr.py"&gt;The pcr.py python script&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="code/pcr/pcr.xml"&gt;An XML based configuration file&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The corresponding SSH configuration to make use of this script is the following. One of the nice feature of the proxy command parameter is that it allows to take the output of a command as a parameter with the following syntax.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;Host foo
ProxyCommand &lt;span class="k"&gt;$(&lt;/span&gt;/path/to/pcr.py %h&lt;span class="k"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# for example $HOME/.ssh/pcr.py&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The configuration elements works as follow:
 * &lt;code&gt;ProxyHost&lt;/code&gt;: correspond to the configuration that apply to a SSH Host alias.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Host&lt;/code&gt;: the Host Alias as defined in the SSH configuration&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Proxy&lt;/code&gt;: Delimits a ProxyCommand and the conditions that lead to this specific ProxyCommand&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;DefaultNetworkInterfaceName&lt;/code&gt;: the name of the default network interface that must be matched&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;LocalConnectionName&lt;/code&gt;: either the ESSID or the name of the connection defined in the &lt;code&gt;NetworkManager&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;DefaultNetworkIPAddress&lt;/code&gt;: the IP address of your default interface.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A &lt;code&gt;Condition&lt;/code&gt; section defines one or multiple conditions that must apply to chose a specific &lt;code&gt;ProxyCommand&lt;/code&gt;. A &lt;code&gt;Proxy&lt;/code&gt; that have the &lt;code&gt;fallback="yes"&lt;/code&gt; attribute is used in case of any of the previous Proxy's Condition(s) worked.&lt;/p&gt;
&lt;p&gt;This script is designed to work on Linux and has been tested on Ubuntu LTS only. Use at your own risks!&lt;/p&gt;
&lt;p&gt;I hope it will help you to save some of your SSH configuration edition time ;)&lt;/p&gt;</content><category term="admin"></category><category term="SSH"></category><category term="ProxyCommand"></category><category term="mobility"></category></entry><entry><title>Compiling PySide 1.0.8 for IDAPRO 6.5 on Windows 7</title><link href="https://gsallesl.github.io/compiling-pyside-108-for-idapro-65-on-windows-7.html" rel="alternate"></link><published>2015-05-07T10:20:00+02:00</published><updated>2015-05-07T19:30:00+02:00</updated><author><name>Gabriel</name></author><id>tag:gsallesl.github.io,2015-05-07:/compiling-pyside-108-for-idapro-65-on-windows-7.html</id><summary type="html">&lt;p&gt;The &lt;a href="https://gist.github.com/ancat/8078106"&gt;Compiling PySide for IDA Pro on Windows&lt;/a&gt; page provides very useful instructions. However, as we tried to compile PySide following these instructions, we had to make a few changes to the &lt;code&gt;packaging&lt;/code&gt;, &lt;code&gt;shiboken&lt;/code&gt;, and &lt;code&gt;PySide&lt;/code&gt; repositories to make the PySide plugging compile properly.&lt;/p&gt;
&lt;p&gt;First you will notice that the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The &lt;a href="https://gist.github.com/ancat/8078106"&gt;Compiling PySide for IDA Pro on Windows&lt;/a&gt; page provides very useful instructions. However, as we tried to compile PySide following these instructions, we had to make a few changes to the &lt;code&gt;packaging&lt;/code&gt;, &lt;code&gt;shiboken&lt;/code&gt;, and &lt;code&gt;PySide&lt;/code&gt; repositories to make the PySide plugging compile properly.&lt;/p&gt;
&lt;p&gt;First you will notice that the &lt;code&gt;build.py&lt;/code&gt; script under &lt;code&gt;packaging/setuptools&lt;/code&gt; automatically removes the modules directory. This behavior prevents us to apply the &lt;a href="http://dvlabs.tippingpoint.com/img/mindshare/pyside_diff.diff"&gt;initial patch&lt;/a&gt; correctly. We broke down this patchset by repository: our new patches can be applied to each repository/module individually.&lt;/p&gt;
&lt;p&gt;We also made two small changes to the shiboken patch and PySide patch to successfully compile the PySide module. The resulting installer under packaging\setuptools\dist should work properly. &lt;/p&gt;
&lt;p&gt;The 5 corresponding patches are available bellow:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../code/pyside_patch/pyside_packaging.diff"&gt;Patch for &lt;code&gt;packaging/setuptools/build.py&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../code/pyside_patch/pyside_Apiextractor.diff"&gt;Patch for &lt;code&gt;packaging/setuptools/modules/Apiextractor&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../code/pyside_patch/pyside_Generatorrunner.diff"&gt;Patch for &lt;code&gt;packaging/setuptools/modules/Generatorrunner&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../code/pyside_patch/pyside_Shiboken.diff"&gt;Patch for &lt;code&gt;packaging/setuptools/modules/Shiboken&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../code/pyside_patch/pyside_PySide.diff"&gt;Patch for &lt;code&gt;packaging/setuptools/modules/PySide&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><category term="IDAPRO"></category><category term="MARE"></category></entry></feed>