<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Respeaker on BlocNotes</title>
    <link>https://notes.iopush.net/tags/respeaker/</link>
    <description>Recent content in Respeaker on BlocNotes</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 13 Jul 2017 18:29:37 +0000</lastBuildDate><atom:link href="https://notes.iopush.net/tags/respeaker/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to setup an OpenWrt repository</title>
      <link>https://notes.iopush.net/blog/2017/how-to-setup-an-openwrt-repo/</link>
      <pubDate>Thu, 13 Jul 2017 18:29:37 +0000</pubDate>
      
      <guid>https://notes.iopush.net/blog/2017/how-to-setup-an-openwrt-repo/</guid>
      <description>&lt;p&gt;I recently wanted to setup a repository for some custom OpenWrt packages for
Respeaker. It seems that it is not so well documented, or at least, I did not
found it and I have been helped on
&lt;a href=&#34;https://forum.openwrt.org/viewtopic.php?pid=357835&#34;&gt;OpenWrt forum&lt;/a&gt;. Also, it is
better to sign packages so&amp;hellip;here we go!&lt;/p&gt;
&lt;h3 id=&#34;prepare-the-repository&#34;&gt;Prepare the repository&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Compile and install &lt;code&gt;usign&lt;/code&gt; from &lt;a href=&#34;https://github.com/xypron/usign&#34;&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Generate key thanks to: &lt;code&gt;usign -G -p openWrtUsign.pub -s openWrtUsign.key&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Put the following script in the IPK directory.&lt;/li&gt;
&lt;li&gt;Make it executable: &lt;code&gt;chmod +x repoUpdate.sh&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Execute it: &lt;code&gt;./repoUpdate.sh&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Copy the whole directory and &lt;code&gt;openWrtUsign.pub&lt;/code&gt; to a webserver.&lt;/li&gt;
&lt;li&gt;Done!&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;add-key-and-install-packages-on-the-target&#34;&gt;Add key and install packages on the target&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Add the public key&lt;/span&gt;
wget http://youserver.ext/path/to/openWrtUsign.pub
opkg-key add openWrtUsign.pub
opkg update

&lt;span style=&#34;color:#75715e&#34;&gt;# Install package&lt;/span&gt;
opkg install newPackage
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;manifest-generation-script&#34;&gt;Manifest generation script&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;
SCRIPT&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;../../../../scripts/ipkg-make-index.sh&amp;#34;&lt;/span&gt;
KEY&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;../openWrtUsign.key&amp;#34;&lt;/span&gt;

&lt;span style=&#34;color:#75715e&#34;&gt;# Generates package manifest&lt;/span&gt;
$SCRIPT . 2&amp;gt;/dev/null &amp;gt; Packages.manifest
grep -vE &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;^(Maintainer|LicenseFiles|Source|Require)&amp;#39;&lt;/span&gt; Packages.manifest &amp;gt; Packages
gzip -9nc Packages &amp;gt; Packages.gz
usign -S -m Packages -s $KEY
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    
  </channel>
</rss>
