User:Rominet: Difference between revisions

Jump to navigation Jump to search
Add missing dollar signs for commands to be run without superuser privileges
m (Wording)
(Add missing dollar signs for commands to be run without superuser privileges)
Line 42: Line 42:


Go to a directory (folder) of your choice. Let's assume it is <tt>~/flightgear</tt>, but really, you can choose whatever you want. Now clone the [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ FGMeta] repository:
Go to a directory (folder) of your choice. Let's assume it is <tt>~/flightgear</tt>, but really, you can choose whatever you want. Now clone the [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ FGMeta] repository:
  mkdir -p ~/flightgear
  $ mkdir -p ~/flightgear
  cd ~/flightgear
  $ cd ~/flightgear
  git clone https://git.code.sf.net/p/flightgear/fgmeta
  $ git clone https://git.code.sf.net/p/flightgear/fgmeta
You now have a fresh <tt>download_and_compile.sh</tt> script in <tt>~/flightgear/fgmeta</tt>. Want to see the available options?
You now have a fresh <tt>download_and_compile.sh</tt> script in <tt>~/flightgear/fgmeta</tt>. Want to see the available options?
<pre>~/flightgear/fgmeta/download_and_compile.sh --help
<pre>$ ~/flightgear/fgmeta/download_and_compile.sh --help
download_and_compile.sh [OPTION...] [--] [COMPONENT...]
download_and_compile.sh [OPTION...] [--] [COMPONENT...]
Download and compile components belonging to the FlightGear ecosystem.
Download and compile components belonging to the FlightGear ecosystem.
Line 64: Line 64:


Now that you have <tt>download_and_compile.sh</tt> from the [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ FGMeta] repository, it is very easy to update (this assumes you didn't modify anything yourself inside <tt>~/flightgear/fgmeta</tt>!):
Now that you have <tt>download_and_compile.sh</tt> from the [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ FGMeta] repository, it is very easy to update (this assumes you didn't modify anything yourself inside <tt>~/flightgear/fgmeta</tt>!):
  cd ~/flightgear/fgmeta && git pull
  $ cd ~/flightgear/fgmeta && git pull
Simple, isn't it? If you want to see the latest commits affecting <tt>download_and_compile.sh</tt>, it is quite easy too:
Simple, isn't it? If you want to see the latest commits affecting <tt>download_and_compile.sh</tt>, it is quite easy too:
  cd ~/flightgear/fgmeta
  $ cd ~/flightgear/fgmeta
  git log -- download_and_compile.sh
  $ git log -- download_and_compile.sh
(then quit by typing <tt>q</tt>, assuming your <tt>$GIT_PAGER</tt> is <tt>less</tt>)
(then quit by typing <tt>q</tt>, assuming your <tt>$GIT_PAGER</tt> is <tt>less</tt>)
The same with patches?
The same with patches?
  cd ~/flightgear/fgmeta
  $ cd ~/flightgear/fgmeta
  git log -p -- download_and_compile.sh
  $ git log -p -- download_and_compile.sh
    
    
All will be well as long as you ''don't modify anything yourself'' inside your [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ FGMeta] clone. <tt>download_and_compile.sh</tt> has plenty of options that should make it completely unnecessary to modify the script. Just run <code>download_and_compile.sh --help</code> and learn about the available options when you feel the need to change something.
All will be well as long as you ''don't modify anything yourself'' inside your [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ FGMeta] clone. <tt>download_and_compile.sh</tt> has plenty of options that should make it completely unnecessary to modify the script. Just run <code>download_and_compile.sh --help</code> and learn about the available options when you feel the need to change something.
Line 79: Line 79:
Still reading? Oh well... If you really, ''really'' want to modify the script, the easiest way is to add your changes to your FGMeta clone in the form of one or more Git ''commits'' (no need to push them anywhere, commits can remain in your clone). How to do that is beyond the scope of this document, read Git tutorials if you want to learn that. Make sure your FGMeta repository is clean (use <code>git status</code>); then you can update it with:
Still reading? Oh well... If you really, ''really'' want to modify the script, the easiest way is to add your changes to your FGMeta clone in the form of one or more Git ''commits'' (no need to push them anywhere, commits can remain in your clone). How to do that is beyond the scope of this document, read Git tutorials if you want to learn that. Make sure your FGMeta repository is clean (use <code>git status</code>); then you can update it with:


  # --rebase will apply your commits on top of the latest state of the repository
  $ cd ~/flightgear/fgmeta && git pull --rebase
cd ~/flightgear/fgmeta && git pull --rebase


(this will apply your commits on top of the latest commit of the official branch)<br />
If your changes conflict with the update, Git will tell you and you'll have to resolve the conflict manually (look for “Git resolve conflict” on your favorite search engine)... or start again from a pristine FGMeta clone.
If your changes conflict with the update, Git will tell you and you'll have to resolve the conflict manually (look for “Git resolve conflict” on your favorite search engine)... or start again from a pristine FGMeta clone.


Line 89: Line 89:


In what follows, we won't give the full path to <tt>download_and_compile.sh</tt> when showing commands to be run, but you should prepend it to <tt>download_and_compile.sh</tt> whenever you see a <tt>download_and_compile.sh</tt> command. For instance, if you used the same path as in the preceding section and see the command:
In what follows, we won't give the full path to <tt>download_and_compile.sh</tt> when showing commands to be run, but you should prepend it to <tt>download_and_compile.sh</tt> whenever you see a <tt>download_and_compile.sh</tt> command. For instance, if you used the same path as in the preceding section and see the command:
  download_and_compile.sh --help
  $ download_and_compile.sh --help
what you should actually run is:
what you should actually run is:
  ~/flightgear/fgmeta/download_and_compile.sh --help
  $ ~/flightgear/fgmeta/download_and_compile.sh --help
 
Apart from this harmless command, ''don't'' run other <tt>download_and_compile.sh</tt> commands from an arbitrary directory, in particular ''don't'' run them from <tt>~/flightgear/fgmeta</tt>. This is because '''most other <tt>download_and_compile.sh</tt> commands write to the current directory''' (<code>download_and_compile.sh --help</code> and <code>download_and_compile.sh --version</code> are safe to run from any directory, but I don't guarantee others).
Apart from this harmless command, ''don't'' run other <tt>download_and_compile.sh</tt> commands from an arbitrary directory, in particular ''don't'' run them from <tt>~/flightgear/fgmeta</tt>. This is because '''most other <tt>download_and_compile.sh</tt> commands write to the current directory''' (<code>download_and_compile.sh --help</code> and <code>download_and_compile.sh --version</code> are safe to run from any directory, but I don't guarantee others).


Line 114: Line 115:


All options of <tt>download_and_compile.sh</tt> can be seen by running the following command:
All options of <tt>download_and_compile.sh</tt> can be seen by running the following command:
  download_and_compile.sh --help.
  $ download_and_compile.sh --help
Now the instructions we promised you. You have chosen a dedicated directory where all the stuff that is downloaded and built by <tt>download_and_compile.sh</tt> will be stored. This is the directory we called ''$dir'' above, and should be empty before you run <tt>download_and_compile.sh</tt> for the first time. However, it is quite correct to start <tt>download_and_compile.sh</tt> from the same directory for subsequent runs, even when non-empty (otherwise, <tt>download_and_compile.sh</tt> would automatically redownload all the FlightGear repositories every time you run it; that would be completely unmanageable).
Now the instructions we promised you. You have chosen a dedicated directory where all the stuff that is downloaded and built by <tt>download_and_compile.sh</tt> will be stored. This is the directory we called ''$dir'' above, and should be empty before you run <tt>download_and_compile.sh</tt> for the first time. However, it is quite correct to start <tt>download_and_compile.sh</tt> from the same directory for subsequent runs, even when non-empty (otherwise, <tt>download_and_compile.sh</tt> would automatically redownload all the FlightGear repositories every time you run it; that would be completely unmanageable).


Ready? Let's go!
Ready? Let's go!
<pre>
<pre>$ cd "$dir"
$ cd "$dir"
$ download_and_compile.sh --git-clone-site-params SourceForge=ssh:username DATA
$ download_and_compile.sh --git-clone-site-params SourceForge=ssh:username DATA
**************************************
**************************************
Line 256: Line 256:


All that remains to do is to run:
All that remains to do is to run:
  download_and_compile.sh
  $ download_and_compile.sh


from the same directory as before (what we called <tt>''$dir''</tt> above). If you pass no option as done here, it will take care of the three base components needed to run FlightGear: <tt>SIMGEAR</tt>, <tt>FGFS</tt> and <tt>DATA</tt> (these are the component names used by <tt>download_and_compile.sh</tt>, i.e., the final arguments one can optionally give in a <tt>download_and_compile.sh</tt> command; in normal speech, they correspond to the [https://sourceforge.net/p/flightgear/simgear/ci/next/tree/ SimGear], [https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/ FlightGear] and [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/ FGData] repositories). Therefore, the above command is presently exactly equivalent to:
from the same directory as before (what we called <tt>''$dir''</tt> above). If you pass no option as done here, it will take care of the three base components needed to run FlightGear: <tt>SIMGEAR</tt>, <tt>FGFS</tt> and <tt>DATA</tt> (these are the component names used by <tt>download_and_compile.sh</tt>, i.e., the final arguments one can optionally give in a <tt>download_and_compile.sh</tt> command; in normal speech, they correspond to the [https://sourceforge.net/p/flightgear/simgear/ci/next/tree/ SimGear], [https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/ FlightGear] and [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/ FGData] repositories). Therefore, the above command is presently exactly equivalent to:
  download_and_compile.sh SIMGEAR FGFS DATA
  $ download_and_compile.sh SIMGEAR FGFS DATA


In case you wanted to build another component such as <tt>OSG</tt> (OpenSceneGraph), you could add it to the command, like this:
In case you wanted to build another component such as <tt>OSG</tt> (OpenSceneGraph), you could add it to the command, like this:
  download_and_compile.sh SIMGEAR FGFS DATA OSG
  $ download_and_compile.sh SIMGEAR FGFS DATA OSG


(With current Debian stable, this is not necessary because it has OpenSceneGraph 3.4. But if your distribution only has an older version, you'll certainly need to select the <tt>OSG</tt> component like this.)
(With current Debian stable, this is not necessary because it has OpenSceneGraph 3.4. But if your distribution only has an older version, you'll certainly need to select the <tt>OSG</tt> component like this.)


When the command terminates, you should have a script called <tt>run_fgfs.sh</tt> in the directory ''$dir'' from which you ran <tt>download_and_compile.sh</tt>. This will be your script to run FlightGear. For instance, in order to start the built-in launcher, simply run the following command from ''$dir'':
When the command terminates, you should have a script called <tt>run_fgfs.sh</tt> in the directory ''$dir'' from which you ran <tt>download_and_compile.sh</tt>. This will be your script to run FlightGear. For instance, in order to start the built-in launcher, simply run the following command from ''$dir'':
  ./run_fgfs.sh --launcher
  $ ./run_fgfs.sh --launcher
In case you find this tedious to type or have more arguments to pass on a regular basis, you can follow the advice given at the end of [https://sourceforge.net/p/flightgear/mailman/message/36634426/ this message] or use another launcher such as [[FFGo]] (but the [[FlightGear Qt launcher|FlightGear built-in launcher]] started with <code>run_fgfs.sh --launcher</code> is quite fine, be sure to try it first!).
In case you find this tedious to type or have more arguments to pass on a regular basis, you can follow the advice given at the end of [https://sourceforge.net/p/flightgear/mailman/message/36634426/ this message] or use another launcher such as [[FFGo]] (but the [[FlightGear Qt launcher|FlightGear built-in launcher]] started with <code>run_fgfs.sh --launcher</code> is quite fine, be sure to try it first!).


Line 322: Line 322:


Quand <tt>download_and_compile.sh</tt> clone un nouveau dépôt, il utilise par défaut le protocole <tt>https</tt>. Ceci fonctionne bien sauf pour [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/ FGData], à cause de ce qui vient d'être dit (dépôt très volumineux, problème probable chez SourceForge). Comme le protocole <tt>git</tt> n'est pas satisfaisant non plus, je propose de cloner les dépôts hébergés chez SourceForge avec le protocole <tt>ssh</tt>. En appelant <tt>download_and_compile.sh</tt> de la manière suivante :
Quand <tt>download_and_compile.sh</tt> clone un nouveau dépôt, il utilise par défaut le protocole <tt>https</tt>. Ceci fonctionne bien sauf pour [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/ FGData], à cause de ce qui vient d'être dit (dépôt très volumineux, problème probable chez SourceForge). Comme le protocole <tt>git</tt> n'est pas satisfaisant non plus, je propose de cloner les dépôts hébergés chez SourceForge avec le protocole <tt>ssh</tt>. En appelant <tt>download_and_compile.sh</tt> de la manière suivante :
  download_and_compile.sh --git-clone-site-params SourceForge=ssh:''username'' DATA
  $ download_and_compile.sh --git-clone-site-params SourceForge=ssh:''username'' DATA
on dit à <tt>download_and_compile.sh</tt> de cloner ou mettre à jour FGData. Si ce dépôt existe déjà à l'endroit attendu par <tt>download_and_compile.sh</tt>, il sera mis à jour en utilisant le protocole indiqué dans le fichier <tt>.git/config</tt> à l'intérieur du dépôt (qui, sauf si vous l'avez modifié, est celui utilisé lorsque le dépôt a été cloné). Sinon, il sera cloné et comme on a passé l'option <code>--git-clone-site-params SourceForge=ssh:''username''</code> et que FGData est situé chez SourceForge, <tt>download_and_compile.sh</tt> utilisera pour cette opération de clonage le protocole <tt>ssh</tt> ; il dira au serveur chez SourceForge que vous êtes l'utilisateur ''username'', et il faudra donc prouver à SourceForge que c'est bien le cas (il faut bien sûr remplacer ''username'' par votre nom d'utilisateur chez SourceForge).
on dit à <tt>download_and_compile.sh</tt> de cloner ou mettre à jour FGData. Si ce dépôt existe déjà à l'endroit attendu par <tt>download_and_compile.sh</tt>, il sera mis à jour en utilisant le protocole indiqué dans le fichier <tt>.git/config</tt> à l'intérieur du dépôt (qui, sauf si vous l'avez modifié, est celui utilisé lorsque le dépôt a été cloné). Sinon, il sera cloné et comme on a passé l'option <code>--git-clone-site-params SourceForge=ssh:''username''</code> et que FGData est situé chez SourceForge, <tt>download_and_compile.sh</tt> utilisera pour cette opération de clonage le protocole <tt>ssh</tt> ; il dira au serveur chez SourceForge que vous êtes l'utilisateur ''username'', et il faudra donc prouver à SourceForge que c'est bien le cas (il faut bien sûr remplacer ''username'' par votre nom d'utilisateur chez SourceForge).


La manière la plus simple d'apporter une telle preuve consiste à entrer votre mot de passe SourceForge, mais il faudra alors le faire pour chaque opération de clonage ou de mise à jour du dépôt via <tt>ssh</tt>. Si vous travaillez avec plusieurs dépôts, par exemple si vous faites :
La manière la plus simple d'apporter une telle preuve consiste à entrer votre mot de passe SourceForge, mais il faudra alors le faire pour chaque opération de clonage ou de mise à jour du dépôt via <tt>ssh</tt>. Si vous travaillez avec plusieurs dépôts, par exemple si vous faites :
  download_and_compile.sh --git-clone-site-params SourceForge=ssh:''username''
  $ download_and_compile.sh --git-clone-site-params SourceForge=ssh:''username''
(commande qui clone ou met à jour, puis compile [https://sourceforge.net/p/flightgear/simgear/ci/next/tree/ SimGear] et [https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/ FlightGear], et clone ou met à jour [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/ FGData]), il faudra entrer le mot de passe pour chaque dépôt. Vous devinez que cela devient vite pénible. '''Il est cependant possible de seulement cloner avec SSH, puis changer le protocole pour chaque dépôt cloné grâce au <tt>.git/config</tt> à l'intérieur du dépôt et ainsi faire en sorte que les mises à jour des dépôts utilisent le protocole <tt>https</tt>, qui ne nécessite ni de créer vous-même une paire de clés, ni d'entrer un mot de passe.''' Si vous êtes pressé, c'est la méthode que je conseillerais. Voir [[#alternate-method-clone-with-ssh-and-update-with-https|ci-dessous]] pour plus de détails sur cette méthode.
(commande qui clone ou met à jour, puis compile [https://sourceforge.net/p/flightgear/simgear/ci/next/tree/ SimGear] et [https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/ FlightGear], et clone ou met à jour [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/ FGData]), il faudra entrer le mot de passe pour chaque dépôt. Vous devinez que cela devient vite pénible. '''Il est cependant possible de seulement cloner avec SSH, puis changer le protocole pour chaque dépôt cloné grâce au <tt>.git/config</tt> à l'intérieur du dépôt et ainsi faire en sorte que les mises à jour des dépôts utilisent le protocole <tt>https</tt>, qui ne nécessite ni de créer vous-même une paire de clés, ni d'entrer un mot de passe.''' Si vous êtes pressé, c'est la méthode que je conseillerais. Voir [[#alternate-method-clone-with-ssh-and-update-with-https|ci-dessous]] pour plus de détails sur cette méthode.


Line 400: Line 400:
   <li>Il est temps de faire les premiers tests. Par exemple :</p>
   <li>Il est temps de faire les premiers tests. Par exemple :</p>


  cd /tmp
  $ cd /tmp
  git clone ssh://''username''@git.code.sf.net/p/flightgear/fgmeta
  $ git clone ssh://''username''@git.code.sf.net/p/flightgear/fgmeta


(j'ai choisi [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ fgmeta] parce que c'est assez petit)
(j'ai choisi [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ fgmeta] parce que c'est assez petit)
Line 417: Line 417:
   <li>Si vous avez été rapide à valider l'empreinte du serveur à l'étape e), vous devez avoir un clone de [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ fgmeta] tout neuf dans <tt>/tmp</tt>. Sinon, il suffit de relancer la commande</p>
   <li>Si vous avez été rapide à valider l'empreinte du serveur à l'étape e), vous devez avoir un clone de [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ fgmeta] tout neuf dans <tt>/tmp</tt>. Sinon, il suffit de relancer la commande</p>


  git clone ssh://''username''@git.code.sf.net/p/flightgear/fgmeta
  $ git clone ssh://''username''@git.code.sf.net/p/flightgear/fgmeta


<p>Comme l'empreinte du serveur est désormais connue de votre client SSH, cela devrait passer comme une lettre à la poste. SSH va juste vous demander la “passphrase” pour déverrouiller votre clé privée, comme je l'ai expliqué au point d). C'est celle que vous avez donnée à <tt>ssh-keygen</tt> lorsque vous avez généré votre paire de clés.</p>
<p>Comme l'empreinte du serveur est désormais connue de votre client SSH, cela devrait passer comme une lettre à la poste. SSH va juste vous demander la “passphrase” pour déverrouiller votre clé privée, comme je l'ai expliqué au point d). C'est celle que vous avez donnée à <tt>ssh-keygen</tt> lorsque vous avez généré votre paire de clés.</p>
Line 502: Line 502:
La deuxième manière « artisanale » de lancer <tt>ssh-agent</tt> consiste à exécuter l'une des commandes suivantes dans un shell :
La deuxième manière « artisanale » de lancer <tt>ssh-agent</tt> consiste à exécuter l'une des commandes suivantes dans un shell :


<pre>eval $(ssh-agent -s)  # pour un shell de type Bourne (Bash, Zsh...)</pre>
<pre>$ eval $(ssh-agent -s)  # pour un shell de type Bourne (Bash, Zsh...)</pre>
ou
ou
<pre>eval $(ssh-agent -c)  # pour un shell dérivé de csh</pre>
<pre>$ eval $(ssh-agent -c)  # pour un shell dérivé de csh</pre>


Contrairement à la méthode précédente, celle-ci ne crée pas de nouveau shell : elle se contente de lancer <tt>ssh-agent</tt> et de positionner les variables d'environnement <tt>SSH_AUTH_SOCK</tt> et <tt>SSH_AGENT_PID</tt> de sorte que tout programme lancé depuis le shell où vous avez exécuté l'une des deux commandes <code>eval</code> ci-dessus soit en mesure de contacter l'agent SSH.
Contrairement à la méthode précédente, celle-ci ne crée pas de nouveau shell : elle se contente de lancer <tt>ssh-agent</tt> et de positionner les variables d'environnement <tt>SSH_AUTH_SOCK</tt> et <tt>SSH_AGENT_PID</tt> de sorte que tout programme lancé depuis le shell où vous avez exécuté l'une des deux commandes <code>eval</code> ci-dessus soit en mesure de contacter l'agent SSH.
Line 521: Line 521:
     <p>Vous pouvez tester cela en lançant des commandes telles que</p>
     <p>Vous pouvez tester cela en lançant des commandes telles que</p>


  git clone ssh://''username''@git.code.sf.net/p/flightgear/fgmeta
  $ git clone ssh://''username''@git.code.sf.net/p/flightgear/fgmeta


     <p>et les autres indiquées ci-dessous (pour celle-ci, placez-vous dans un répertoire temporaire car vous allez récupérer un clone de [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ FGMeta] dans le répertoire courant).</p>
     <p>et les autres indiquées ci-dessous (pour celle-ci, placez-vous dans un répertoire temporaire car vous allez récupérer un clone de [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ FGMeta] dans le répertoire courant).</p>
Line 556: Line 556:
Pour télécharger un clone de [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ FGMeta] dans le répertoire courant :</p>
Pour télécharger un clone de [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ FGMeta] dans le répertoire courant :</p>


  git clone ssh://''username''@git.code.sf.net/p/flightgear/fgmeta
  $ git clone ssh://''username''@git.code.sf.net/p/flightgear/fgmeta


Pour cloner [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/ FGData] avec le protocole SSH, à supposer que <tt>download_and_compile.sh</tt> ne l'ait pas encore cloné ici (sinon, il va simplement mettre à jour FGData en utilisant le protocole indiqué dans <tt>install/flightgear/fgdata/.git/config</tt>, qui n'est pas forcément SSH) :
Pour cloner [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/ FGData] avec le protocole SSH, à supposer que <tt>download_and_compile.sh</tt> ne l'ait pas encore cloné ici (sinon, il va simplement mettre à jour FGData en utilisant le protocole indiqué dans <tt>install/flightgear/fgdata/.git/config</tt>, qui n'est pas forcément SSH) :
  download_and_compile.sh --git-clone-site-params SourceForge=ssh:''username'' DATA
  $ download_and_compile.sh --git-clone-site-params SourceForge=ssh:''username'' DATA


Même chose pour les trois dépôts [https://sourceforge.net/p/flightgear/simgear/ci/next/tree/ SimGear], [https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/ FlightGear] et [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/ FGData] correspondant aux arguments optionnels <code>SIMGEAR</code>, <code>FGFS</code> et <code>DATA</code> de <tt>download_and_compile.sh</tt>. Vous pouvez mettre en place un alias ou un mini-script pour ne pas vous embêter à retenir l'option un peu longue.
Même chose pour les trois dépôts [https://sourceforge.net/p/flightgear/simgear/ci/next/tree/ SimGear], [https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/ FlightGear] et [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/ FGData] correspondant aux arguments optionnels <code>SIMGEAR</code>, <code>FGFS</code> et <code>DATA</code> de <tt>download_and_compile.sh</tt>. Vous pouvez mettre en place un alias ou un mini-script pour ne pas vous embêter à retenir l'option un peu longue.
  download_and_compile.sh --git-clone-site-params SourceForge=ssh:''username''
  $ download_and_compile.sh --git-clone-site-params SourceForge=ssh:''username''


Pour obtenir de l'aide relative à la commande suivante (voir le [https://sourceforge.net/p/forge/documentation/Shell%20Service/ service ''shell'' de SourceForge]) :
Pour obtenir de l'aide relative à la commande suivante (voir le [https://sourceforge.net/p/forge/documentation/Shell%20Service/ service ''shell'' de SourceForge]) :
  ssh ''username''@shell.sourceforge.net
  $ ssh ''username''@shell.sourceforge.net


Pour démarrer un shell chez SourceForge :
Pour démarrer un shell chez SourceForge :
  ssh -t ''username''@shell.sourceforge.net create
  $ ssh -t ''username''@shell.sourceforge.net create
   </li>
   </li>
</ol>
</ol>
Line 581: Line 581:
   <li>Clonez les dépôts qui vous intéressent avec le protocole SSH :</p>
   <li>Clonez les dépôts qui vous intéressent avec le protocole SSH :</p>


  download_and_compile.sh --git-clone-site-params SourceForge=ssh:''username''
  $ download_and_compile.sh --git-clone-site-params SourceForge=ssh:''username''


ou bien, par exemple :
ou bien, par exemple :


  git clone ssh://''username''@git.code.sf.net/p/flightgear/fgmeta
  $ git clone ssh://''username''@git.code.sf.net/p/flightgear/fgmeta


À moins que vous ne vous soyez déjà connecté à <tt>git.code.sf.net</tt> avec le protocole SSH, vous devriez voir un message de ce genre :
À moins que vous ne vous soyez déjà connecté à <tt>git.code.sf.net</tt> avec le protocole SSH, vous devriez voir un message de ce genre :
Line 604: Line 604:


La première ligne indique à Git le nom de la ''remote'' correspondant à la source utilisée lors du clonage, donc ici un serveur chez SourceForge (par défaut, la ''remote'' s'appelle <tt>origin</tt>). La ligne commençant par <code>url =</code> précise le protocole utilisé pour communiquer avec cette ''remote''. Ici, nous avons le protocole <tt>ssh</tt> car c'est lui qui a été utilisé pour l'opération de clonage. Changez-le en <tt>https</tt> en remplaçant la ligne :
La première ligne indique à Git le nom de la ''remote'' correspondant à la source utilisée lors du clonage, donc ici un serveur chez SourceForge (par défaut, la ''remote'' s'appelle <tt>origin</tt>). La ligne commençant par <code>url =</code> précise le protocole utilisé pour communiquer avec cette ''remote''. Ici, nous avons le protocole <tt>ssh</tt> car c'est lui qui a été utilisé pour l'opération de clonage. Changez-le en <tt>https</tt> en remplaçant la ligne :
  url = ssh://''username''@git.code.sf.net/p/flightgear/fgmeta
  url = ssh://''username''@git.code.sf.net/p/flightgear/fgmeta
 
par<br />
par
<pre>url = https://git.code.sf.net/p/flightgear/fgmeta</pre>
 
<pre>url = https://git.code.sf.net/p/flightgear/fgmeta</pre>


(<tt>fgmeta</tt> est pris comme exemple ici, mais vous devez bien sûr laisser le nom du dépôt tel que vous l'avez trouvé).
(<tt>fgmeta</tt> est pris comme exemple ici, mais vous devez bien sûr laisser le nom du dépôt tel que vous l'avez trouvé).
377

edits

Navigation menu